@everymatrix/user-deposit-withdrawal 1.31.2 → 1.32.4

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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +3 -2
  3. package/dist/cjs/index-0e9931a1.js +0 -1259
  4. package/dist/cjs/index.cjs.js +0 -2
  5. package/dist/cjs/loader.cjs.js +0 -21
  6. package/dist/cjs/user-deposit-withdrawal.cjs.entry.js +0 -213
  7. package/dist/cjs/user-deposit-withdrawal.cjs.js +0 -19
  8. package/dist/collection/collection-manifest.json +0 -12
  9. package/dist/collection/components/user-deposit-withdrawal/user-deposit-withdrawal.css +0 -35
  10. package/dist/collection/components/user-deposit-withdrawal/user-deposit-withdrawal.js +0 -560
  11. package/dist/collection/index.js +0 -1
  12. package/dist/collection/utils/locale.utils.js +0 -24
  13. package/dist/collection/utils/utils.js +0 -29
  14. package/dist/components/index.d.ts +0 -26
  15. package/dist/components/index.js +0 -1
  16. package/dist/components/user-deposit-withdrawal.d.ts +0 -11
  17. package/dist/components/user-deposit-withdrawal.js +0 -251
  18. package/dist/esm/index-fe945b18.js +0 -1233
  19. package/dist/esm/index.js +0 -1
  20. package/dist/esm/loader.js +0 -17
  21. package/dist/esm/polyfills/core-js.js +0 -11
  22. package/dist/esm/polyfills/css-shim.js +0 -1
  23. package/dist/esm/polyfills/dom.js +0 -79
  24. package/dist/esm/polyfills/es5-html-element.js +0 -1
  25. package/dist/esm/polyfills/index.js +0 -34
  26. package/dist/esm/polyfills/system.js +0 -6
  27. package/dist/esm/user-deposit-withdrawal.entry.js +0 -209
  28. package/dist/esm/user-deposit-withdrawal.js +0 -17
  29. package/dist/index.cjs.js +0 -1
  30. package/dist/index.js +0 -1
  31. package/dist/stencil.config.js +0 -22
  32. package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/user-deposit-withdrawal/.stencil/packages/user-deposit-withdrawal/stencil.config.d.ts +0 -2
  33. package/dist/types/components/user-deposit-withdrawal/user-deposit-withdrawal.d.ts +0 -74
  34. package/dist/types/components.d.ts +0 -98
  35. package/dist/types/index.d.ts +0 -1
  36. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  37. package/dist/types/utils/locale.utils.d.ts +0 -1
  38. package/dist/types/utils/utils.d.ts +0 -8
  39. package/dist/user-deposit-withdrawal/index.esm.js +0 -0
  40. package/dist/user-deposit-withdrawal/p-086a6b5a.js +0 -1
  41. package/dist/user-deposit-withdrawal/p-3eda2d99.entry.js +0 -1
  42. package/dist/user-deposit-withdrawal/user-deposit-withdrawal.esm.js +0 -1
  43. package/loader/cdn.js +0 -3
  44. package/loader/index.cjs.js +0 -3
  45. package/loader/index.d.ts +0 -12
  46. package/loader/index.es2017.js +0 -3
  47. package/loader/index.js +0 -4
  48. package/loader/package.json +0 -10
@@ -1,2 +0,0 @@
1
- 'use strict';
2
-
@@ -1,21 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-0e9931a1.js');
6
-
7
- /*
8
- Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
9
- */
10
- const patchEsm = () => {
11
- return index.promiseResolve();
12
- };
13
-
14
- const defineCustomElements = (win, options) => {
15
- if (typeof window === 'undefined') return Promise.resolve();
16
- return patchEsm().then(() => {
17
- return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"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"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
18
- });
19
- };
20
-
21
- exports.defineCustomElements = defineCustomElements;
@@ -1,213 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-0e9931a1.js');
6
-
7
- const DEFAULT_LANGUAGE = 'en';
8
- const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'hr'];
9
- const TRANSLATIONS = {
10
- en: {
11
- Deposit: 'Deposit',
12
- Withdraw: 'Withdraw',
13
- },
14
- ro: {
15
- Deposit: 'Depozit',
16
- Withdraw: 'Retragere',
17
- },
18
- fr: {
19
- Deposit: 'Deposit',
20
- Withdraw: 'Withdraw',
21
- },
22
- hr: {
23
- Deposit: 'Letét',
24
- Withdraw: 'Visszavonás'
25
- }
26
- };
27
- const translate = (key, customLang) => {
28
- const lang = customLang;
29
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
30
- };
31
-
32
- /**
33
- * @name isMobile
34
- * @description A method that returns if the browser used to access the app is from a mobile device or not
35
- * @param {String} userAgent window.navigator.userAgent
36
- * @returns {Boolean} true or false
37
- */
38
- const isMobile = (userAgent) => {
39
- return !!(userAgent.toLowerCase().match(/android/i) ||
40
- userAgent.toLowerCase().match(/blackberry|bb/i) ||
41
- userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
42
- userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
43
- };
44
-
45
- const userDepositWithdrawalCss = ":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.MenuReturnButton {\n font: inherit;\n color: var(--emfe-w-color-gray-300, #58586B);\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n}\n.MenuReturnButton svg {\n fill: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n.MenuReturnButton h2.CategoryTitleMobile {\n font-size: 16px;\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n\n.DepositWithdrawalWrapper {\n width: 100%;\n padding: 0;\n margin: 0;\n height: 100vh;\n}\n\n@container (max-width: 475px) {\n .DepositWithdrawalWrapper {\n height: 100vh;\n }\n}";
46
-
47
- const emptyFunction = () => { };
48
- const UserDepositWithdrawal = class {
49
- constructor(hostRef) {
50
- index.registerInstance(this, hostRef);
51
- /**
52
- * Client custom styling via inline style
53
- */
54
- this.clientStyling = '';
55
- /**
56
- * Client custom styling via url
57
- */
58
- this.clientStylingUrl = '';
59
- /*
60
- * Operator selected currency
61
- */
62
- this.currency = '';
63
- /*
64
- * Display bonus dropdown
65
- */
66
- this.showBonusSelectionInput = 'true';
67
- /*
68
- * State of deposit - short cashier enabled or not
69
- */
70
- this.isShortCashier = 'false';
71
- this.beforeRedirect = emptyFunction;
72
- this.limitStylingAppends = false;
73
- this.bindedHandler = this.handleMessage.bind(this);
74
- this.userAgent = window.navigator.userAgent;
75
- this.isMobile = isMobile(this.userAgent);
76
- this.setClientStyling = () => {
77
- let sheet = document.createElement('style');
78
- sheet.innerHTML = this.clientStyling;
79
- this.stylingContainer.prepend(sheet);
80
- };
81
- this.setClientStylingURL = () => {
82
- let url = new URL(this.clientStylingUrl);
83
- let cssFile = document.createElement('style');
84
- fetch(url.href)
85
- .then((res) => res.text())
86
- .then((data) => {
87
- cssFile.innerHTML = data;
88
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
89
- })
90
- .catch((err) => {
91
- console.log('error ', err);
92
- });
93
- };
94
- }
95
- get typeParameter() {
96
- if (this.type === 'deposit') {
97
- return 'Deposit';
98
- }
99
- if (this.type === 'withdraw') {
100
- return 'Withdraw';
101
- }
102
- }
103
- watchLoadWidget() {
104
- this.loadWidget();
105
- }
106
- async componentWillLoad() {
107
- await this.loadWidget();
108
- }
109
- toggleScreen(isMobile) {
110
- window.postMessage({ type: 'PlayerAccountMenuActive', isMobile }, window.location.href);
111
- }
112
- componentDidLoad() {
113
- window.addEventListener('message', this.bindedHandler, false);
114
- }
115
- disconnectedCallback() {
116
- window.removeEventListener('message', this.bindedHandler, false);
117
- }
118
- componentDidRender() {
119
- // start custom styling area
120
- if (!this.limitStylingAppends && this.stylingContainer) {
121
- if (this.clientStyling)
122
- this.setClientStyling();
123
- if (this.clientStylingUrl)
124
- this.setClientStylingURL();
125
- this.limitStylingAppends = true;
126
- }
127
- // end custom styling area
128
- }
129
- render() {
130
- return (index.h(index.Host, null, index.h("div", { ref: el => this.stylingContainer = el }, index.h("div", { class: "DepositWithdrawalWrapper", style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? '30px' : '0' } }, index.h("div", null, (this.isMobile && !this.isShortCashier &&
131
- index.h("div", { class: "MenuReturnButton", onClick: () => this.toggleScreen(this.isMobile) }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, index.h("defs", null), index.h("g", { transform: "translate(-20 -158)" }, index.h("g", { transform: "translate(20 158)" }, index.h("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))), index.h("h2", { class: "CategoryTitleMobile" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language))))), index.h("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl })))));
132
- }
133
- async loadWidget() {
134
- const requestObject = {
135
- Channel: this.channel,
136
- Type: this.typeParameter,
137
- SuccessUrl: this.successUrl,
138
- CancelUrl: this.cancelUrl,
139
- FailUrl: this.failUrl,
140
- Language: this.language,
141
- productType: this.productType,
142
- isShortCashier: this.isShortCashier,
143
- currency: this.currency,
144
- showBonusSelectionInput: this.showBonusSelectionInput
145
- };
146
- try {
147
- const url = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`;
148
- const response = await fetch(url, {
149
- method: 'POST',
150
- headers: {
151
- 'X-Sessionid': this.session,
152
- 'Content-Type': 'application/json',
153
- },
154
- body: JSON.stringify(requestObject)
155
- });
156
- if (!response.ok) {
157
- const err = await response.text();
158
- throw new Error(err);
159
- }
160
- const data = await response.json();
161
- this.cashierInfoUrl = data.CashierInfo.Url;
162
- }
163
- catch (ex) {
164
- console.error(ex);
165
- }
166
- }
167
- handleMessage(message) {
168
- var _a, _b, _c, _d, _e, _f, _g;
169
- if (message.data["MMFE:setIFrameHeight"] && this.isShortCashier === 'true') {
170
- this.dynamicHeight = message.data["MMFE:setIFrameHeight"].toString() + 'px';
171
- }
172
- if (((_a = message.data) === null || _a === void 0 ? void 0 : _a.type) === 'mm-hcback-to-merchant') {
173
- this.doRedirect(message.data.type, this.homeUrl);
174
- }
175
- if (((_b = message.data) === null || _b === void 0 ? void 0 : _b.redirect) === 'mm-hc-back-tomerchant') {
176
- this.doRedirect(message.data.redirect, this.homeUrl);
177
- }
178
- if (((_c = message.data) === null || _c === void 0 ? void 0 : _c.redirect) === 'mm-hc-sports') {
179
- this.doRedirect((_d = message.data) === null || _d === void 0 ? void 0 : _d.redirect, this.sportsUrl);
180
- }
181
- if (((_e = message.data) === null || _e === void 0 ? void 0 : _e.redirect) === 'mm-hc-casino') {
182
- this.doRedirect(window.location.href, this.casinoUrl);
183
- }
184
- if (((_f = message.data) === null || _f === void 0 ? void 0 : _f.redirect) === 'mm-hc-contact') {
185
- window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
186
- this.doRedirect(window.location.href, this.contactUrl);
187
- }
188
- if (((_g = message.data) === null || _g === void 0 ? void 0 : _g.redirect) === 'mm-wm-hc-init-deposit') {
189
- window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
190
- this.doRedirect(window.location.href, this.depositUrl);
191
- }
192
- }
193
- doRedirect(reason, url) {
194
- const redirectArgs = { reason, url, cancel: false };
195
- this.beforeRedirect(redirectArgs);
196
- if (redirectArgs.cancel) {
197
- return;
198
- }
199
- if (!redirectArgs.url) {
200
- window.location.href = '/';
201
- return;
202
- }
203
- window.location.href = redirectArgs.url;
204
- }
205
- static get watchers() { return {
206
- "session": ["watchLoadWidget"],
207
- "userId": ["watchLoadWidget"],
208
- "isShortCashier": ["watchLoadWidget"]
209
- }; }
210
- };
211
- UserDepositWithdrawal.style = userDepositWithdrawalCss;
212
-
213
- exports.user_deposit_withdrawal = UserDepositWithdrawal;
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-0e9931a1.js');
4
-
5
- /*
6
- Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
7
- */
8
- const patchBrowser = () => {
9
- const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('user-deposit-withdrawal.cjs.js', document.baseURI).href));
10
- const opts = {};
11
- if (importMeta !== '') {
12
- opts.resourcesUrl = new URL('.', importMeta).href;
13
- }
14
- return index.promiseResolve(opts);
15
- };
16
-
17
- patchBrowser().then(options => {
18
- return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"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"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
19
- });
@@ -1,12 +0,0 @@
1
- {
2
- "entries": [
3
- "./components/user-deposit-withdrawal/user-deposit-withdrawal.js"
4
- ],
5
- "compiler": {
6
- "name": "@stencil/core",
7
- "version": "2.15.2",
8
- "typescriptVersion": "4.5.4"
9
- },
10
- "collections": [],
11
- "bundles": []
12
- }
@@ -1,35 +0,0 @@
1
- :host {
2
- font: inherit;
3
- display: block;
4
- height: 100%;
5
- overflow: hidden;
6
- }
7
-
8
- .MenuReturnButton {
9
- font: inherit;
10
- color: var(--emfe-w-color-gray-300, #58586B);
11
- display: inline-flex;
12
- align-items: center;
13
- column-gap: 10px;
14
- margin-bottom: 10px;
15
- }
16
- .MenuReturnButton svg {
17
- fill: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));
18
- }
19
- .MenuReturnButton h2.CategoryTitleMobile {
20
- font-size: 16px;
21
- color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));
22
- }
23
-
24
- .DepositWithdrawalWrapper {
25
- width: 100%;
26
- padding: 0;
27
- margin: 0;
28
- height: 100vh;
29
- }
30
-
31
- @container (max-width: 475px) {
32
- .DepositWithdrawalWrapper {
33
- height: 100vh;
34
- }
35
- }