@everymatrix/player-lugas-limit 1.0.69
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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-449fb94e.js +1201 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/player-lugas-limit.cjs.entry.js +428 -0
- package/dist/cjs/player-lugas-limit.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/player-lugas-limit/index.js +1 -0
- package/dist/collection/components/player-lugas-limit/player-lugas-limit.css +181 -0
- package/dist/collection/components/player-lugas-limit/player-lugas-limit.js +490 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +192 -0
- package/dist/collection/utils/utils.js +0 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-7e4db82e.js +1174 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/player-lugas-limit.entry.js +424 -0
- package/dist/esm/player-lugas-limit.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/player-lugas-limit/index.esm.js +0 -0
- package/dist/player-lugas-limit/p-1b35b3bc.js +2 -0
- package/dist/player-lugas-limit/p-5a488bd2.entry.js +1 -0
- package/dist/player-lugas-limit/p-e1255160.js +1 -0
- package/dist/player-lugas-limit/player-lugas-limit.esm.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +17 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/player-lugas-limit/.stencil/packages/stencil/player-lugas-limit/stencil.config.d.ts +2 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/player-lugas-limit/.stencil/packages/stencil/player-lugas-limit/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/player-lugas-limit/index.d.ts +1 -0
- package/dist/types/components/player-lugas-limit/player-lugas-limit.d.ts +83 -0
- package/dist/types/components.d.ts +146 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +0 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +26 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");
|
|
2
|
+
:host {
|
|
3
|
+
font-family: "Roboto", sans-serif;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.ModalContainer {
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
width: 100vw;
|
|
11
|
+
height: 100vh;
|
|
12
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
align-items: center;
|
|
16
|
+
font-size: 12px;
|
|
17
|
+
container-type: inline-size;
|
|
18
|
+
}
|
|
19
|
+
.ModalContainer .Container {
|
|
20
|
+
position: fixed;
|
|
21
|
+
top: 30vh;
|
|
22
|
+
width: 25%;
|
|
23
|
+
background: #fff;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
border-radius: 4px;
|
|
28
|
+
transform: scale(1.1);
|
|
29
|
+
}
|
|
30
|
+
.ModalContainer .ModalHeader {
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
align-items: center;
|
|
34
|
+
background-color: #ffffff;
|
|
35
|
+
border-radius: 4px 4px 0px 0px;
|
|
36
|
+
padding: 10px;
|
|
37
|
+
}
|
|
38
|
+
.ModalContainer .ModalBody {
|
|
39
|
+
background: #F5F6F6;
|
|
40
|
+
padding: 16px 10px 10px;
|
|
41
|
+
container-type: inline-size;
|
|
42
|
+
border-radius: 4px;
|
|
43
|
+
}
|
|
44
|
+
.ModalContainer .ModalBody hr {
|
|
45
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
46
|
+
margin: 12px 0px;
|
|
47
|
+
}
|
|
48
|
+
.ModalContainer .ModalBody p {
|
|
49
|
+
margin: 0;
|
|
50
|
+
}
|
|
51
|
+
.ModalContainer .ModalBody .ValidatorContainer {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
}
|
|
56
|
+
.ModalContainer .ModalBody .ValidatorContainer .CrossProvider {
|
|
57
|
+
background-color: #404350;
|
|
58
|
+
color: white;
|
|
59
|
+
margin: 5px 0px;
|
|
60
|
+
padding: 10px 15px;
|
|
61
|
+
border-radius: 2px;
|
|
62
|
+
}
|
|
63
|
+
.ModalContainer .ModalBody .ValidatorContainer .CrossProvider svg {
|
|
64
|
+
position: absolute;
|
|
65
|
+
width: 5px;
|
|
66
|
+
height: 28px;
|
|
67
|
+
}
|
|
68
|
+
.ModalContainer .ModalBody .ValidatorContainer .CrossProvider p {
|
|
69
|
+
padding-left: 15px;
|
|
70
|
+
}
|
|
71
|
+
.ModalContainer .ModalBody .ValidatorContainer .Paragraphs {
|
|
72
|
+
padding: 5px 0px;
|
|
73
|
+
}
|
|
74
|
+
.ModalContainer .ModalBody .ValidatorContainer .Paragraphs p {
|
|
75
|
+
padding: 5px 0px;
|
|
76
|
+
}
|
|
77
|
+
.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons {
|
|
78
|
+
display: flex;
|
|
79
|
+
justify-content: space-around;
|
|
80
|
+
gap: 10px;
|
|
81
|
+
padding-top: 5px;
|
|
82
|
+
}
|
|
83
|
+
.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons .FirstButton {
|
|
84
|
+
background-color: #ffffff;
|
|
85
|
+
font-weight: bold;
|
|
86
|
+
color: #002554;
|
|
87
|
+
font-size: 10px;
|
|
88
|
+
border: 2.5px solid #dee2e6;
|
|
89
|
+
width: 100%;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons .SecondButton {
|
|
93
|
+
background-color: #6BB816;
|
|
94
|
+
border: none;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
font-weight: bold;
|
|
97
|
+
font-size: 10px;
|
|
98
|
+
color: #ffffff;
|
|
99
|
+
width: 100%;
|
|
100
|
+
}
|
|
101
|
+
.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons button {
|
|
102
|
+
width: 240px;
|
|
103
|
+
height: 30px;
|
|
104
|
+
}
|
|
105
|
+
.ModalContainer .ModalFooter {
|
|
106
|
+
display: flex;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
background-color: rgba(161, 156, 156, 0.11);
|
|
109
|
+
margin: 5px 0px;
|
|
110
|
+
}
|
|
111
|
+
.ModalContainer .ModalFooter .Dropdown {
|
|
112
|
+
background-color: white;
|
|
113
|
+
padding: 8px;
|
|
114
|
+
width: 100%;
|
|
115
|
+
border: 1px solid rgb(222, 226, 230);
|
|
116
|
+
}
|
|
117
|
+
.ModalContainer .ModalFooter .Dropdown .InvalidParagraph {
|
|
118
|
+
font-size: 10px;
|
|
119
|
+
color: #FF0000;
|
|
120
|
+
}
|
|
121
|
+
.ModalContainer .ModalFooter .Dropdown .DropdownInput {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: row;
|
|
124
|
+
width: 100%;
|
|
125
|
+
gap: 10px;
|
|
126
|
+
}
|
|
127
|
+
.ModalContainer .ModalFooter .Dropdown .DropdownInput input {
|
|
128
|
+
flex: 4;
|
|
129
|
+
border: 1px solid #E3E3E3;
|
|
130
|
+
}
|
|
131
|
+
.ModalContainer .ModalFooter .Dropdown .DropdownInput button {
|
|
132
|
+
padding: 2px;
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
transition: background-color 0.2s ease-in-out 0s;
|
|
135
|
+
flex: 1;
|
|
136
|
+
font-size: 10px;
|
|
137
|
+
}
|
|
138
|
+
.ModalContainer .ModalFooter .Dropdown .DropdownInput button:enabled {
|
|
139
|
+
background-color: #6BB816;
|
|
140
|
+
color: #ffffff;
|
|
141
|
+
font-weight: bold;
|
|
142
|
+
border: none;
|
|
143
|
+
border: 2.5px solid rgba(255, 255, 255, 0);
|
|
144
|
+
}
|
|
145
|
+
.ModalContainer .ModalFooter .Dropdown .DropdownInput button:disabled {
|
|
146
|
+
background-color: #ffffff;
|
|
147
|
+
color: #002554;
|
|
148
|
+
font-weight: bold;
|
|
149
|
+
cursor: not-allowed;
|
|
150
|
+
border: 1px solid #E3E3E3;
|
|
151
|
+
}
|
|
152
|
+
.ModalContainer .ModalFooter .Dropdown .DropdownInput:first-child {
|
|
153
|
+
margin-left: 0px;
|
|
154
|
+
display: flex;
|
|
155
|
+
padding: 10px 0px;
|
|
156
|
+
justify-content: center;
|
|
157
|
+
}
|
|
158
|
+
.ModalContainer .ModalFooter .Dropdown .DropdownInput .InvalidInput {
|
|
159
|
+
border: 1px solid #FF0000;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
input {
|
|
163
|
+
/* Firefox */
|
|
164
|
+
-moz-appearance: textfield;
|
|
165
|
+
/* Chrome, Safari, Edge, Opera */
|
|
166
|
+
}
|
|
167
|
+
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
|
|
168
|
+
-webkit-appearance: none;
|
|
169
|
+
margin: 0;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@container (max-width: 1300px) {
|
|
173
|
+
.ModalContainer .Container {
|
|
174
|
+
width: 50%;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
@container (max-width: 800px) {
|
|
178
|
+
.ModalContainer .Container {
|
|
179
|
+
width: 70%;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { getTranslations, translate } from "../../utils/locale.utils";
|
|
3
|
+
export class PlayerLugasLimit {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.setClientStyling = () => {
|
|
6
|
+
let sheet = document.createElement('style');
|
|
7
|
+
sheet.innerHTML = this.clientStyling;
|
|
8
|
+
this.stylingContainer.prepend(sheet);
|
|
9
|
+
};
|
|
10
|
+
this.setClientStylingURL = () => {
|
|
11
|
+
let url = new URL(this.clientStylingUrl);
|
|
12
|
+
let cssFile = document.createElement('style');
|
|
13
|
+
fetch(url.href)
|
|
14
|
+
.then((res) => res.text())
|
|
15
|
+
.then((data) => {
|
|
16
|
+
cssFile.innerHTML = data;
|
|
17
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
18
|
+
})
|
|
19
|
+
.catch((err) => {
|
|
20
|
+
console.log('error ', err);
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
this.postPlayerSituation = (userAmount, keepLimit = false, initialNewLimit = false) => {
|
|
24
|
+
this.isButtonDisabled = true;
|
|
25
|
+
let url = new URL(`${this.endpoint}v2/player/${this.userId}/limit/lugas`);
|
|
26
|
+
let roleLimitAmount = initialNewLimit ? this.amount : 0;
|
|
27
|
+
let bodyDraft = {
|
|
28
|
+
softMigration: this.flow == '1',
|
|
29
|
+
keepLimit: keepLimit,
|
|
30
|
+
roleLimitAmount: roleLimitAmount
|
|
31
|
+
};
|
|
32
|
+
userAmount && (bodyDraft['amount'] = `${userAmount}`);
|
|
33
|
+
let options = {
|
|
34
|
+
method: 'POST',
|
|
35
|
+
headers: {
|
|
36
|
+
'X-SessionId': this.session,
|
|
37
|
+
'Content-Type': 'application/json',
|
|
38
|
+
'Authorization': `Bearer ${this.session}`
|
|
39
|
+
},
|
|
40
|
+
body: JSON.stringify(bodyDraft)
|
|
41
|
+
};
|
|
42
|
+
fetch(url.href, options)
|
|
43
|
+
.then((res) => {
|
|
44
|
+
if (res.status === 200) {
|
|
45
|
+
return res.json();
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this.crossProviders = true;
|
|
49
|
+
this.dropDown = true;
|
|
50
|
+
throw new Error("HTTP status " + res.status);
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
.then((data) => {
|
|
54
|
+
this.isButtonDisabled = false;
|
|
55
|
+
this.kyc = data.popup;
|
|
56
|
+
this.validation = false;
|
|
57
|
+
this.dropDown = false;
|
|
58
|
+
if (data.operatorDepositLimitAmount) {
|
|
59
|
+
this.operatorDepositLimitAmount = data.operatorDepositLimitAmount;
|
|
60
|
+
}
|
|
61
|
+
if (data.regulatorDepositLimitAmount) {
|
|
62
|
+
this.regularDepositLimitAmount = data.regulatorDepositLimitAmount;
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
.catch((err) => {
|
|
66
|
+
this.isButtonDisabled = false;
|
|
67
|
+
// Handle any errors
|
|
68
|
+
console.error(err);
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
this.handleClick = (input) => {
|
|
72
|
+
switch (input) {
|
|
73
|
+
case 'keepCurrentLimit':
|
|
74
|
+
this.postPlayerSituation(this.amount, true);
|
|
75
|
+
break;
|
|
76
|
+
case 'keepCurrentLimitNewUser':
|
|
77
|
+
// new user should not have a limit amount
|
|
78
|
+
this.postPlayerSituation(null, true);
|
|
79
|
+
break;
|
|
80
|
+
case 'postSituation':
|
|
81
|
+
this.postPlayerSituation();
|
|
82
|
+
break;
|
|
83
|
+
case 'setNewLimit':
|
|
84
|
+
this.dropDown = true;
|
|
85
|
+
break;
|
|
86
|
+
case 'UploadDocuments':
|
|
87
|
+
this.uploadDocuments.emit();
|
|
88
|
+
window.postMessage({ type: 'uploadDocuments' }, window.location.href);
|
|
89
|
+
break;
|
|
90
|
+
case 'Close':
|
|
91
|
+
this.closePopup.emit();
|
|
92
|
+
window.postMessage({ type: 'closePopup' }, window.location.href);
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
this.userId = '';
|
|
97
|
+
this.session = '';
|
|
98
|
+
this.endpoint = '';
|
|
99
|
+
this.currency = 'EUR';
|
|
100
|
+
this.flow = '';
|
|
101
|
+
this.amountMinMax = '';
|
|
102
|
+
this.amount = '';
|
|
103
|
+
this.lang = undefined;
|
|
104
|
+
this.clientStyling = '';
|
|
105
|
+
this.clientStylingUrl = '';
|
|
106
|
+
this.translationUrl = '';
|
|
107
|
+
this.validation = true;
|
|
108
|
+
this.kyc = undefined;
|
|
109
|
+
this.dropDown = false;
|
|
110
|
+
this.isLoading = false;
|
|
111
|
+
this.hasErrors = false;
|
|
112
|
+
this.inputValue = '';
|
|
113
|
+
this.isButtonDisabled = true;
|
|
114
|
+
this.crossProviders = false;
|
|
115
|
+
this.invalidInput = undefined;
|
|
116
|
+
this.userAmount = '';
|
|
117
|
+
this.operatorDepositLimitAmount = '';
|
|
118
|
+
this.regularDepositLimitAmount = '';
|
|
119
|
+
this.stylingAppends = false;
|
|
120
|
+
this.isWithinRange = undefined;
|
|
121
|
+
this.minimumRange = undefined;
|
|
122
|
+
}
|
|
123
|
+
componentDidRender() {
|
|
124
|
+
// start custom styling area
|
|
125
|
+
if (!this.stylingAppends && this.stylingContainer) {
|
|
126
|
+
if (this.clientStyling)
|
|
127
|
+
this.setClientStyling();
|
|
128
|
+
if (this.clientStylingUrl)
|
|
129
|
+
this.setClientStylingURL();
|
|
130
|
+
this.stylingAppends = true;
|
|
131
|
+
}
|
|
132
|
+
// end custom styling area
|
|
133
|
+
}
|
|
134
|
+
handleNewTranslations() {
|
|
135
|
+
this.isLoading = true;
|
|
136
|
+
getTranslations(this.translationUrl).then(() => {
|
|
137
|
+
this.isLoading = false;
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
async componentWillLoad() {
|
|
141
|
+
if (this.translationUrl.length > 2) {
|
|
142
|
+
await getTranslations(this.translationUrl);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
handleSubmit(event) {
|
|
146
|
+
event.preventDefault();
|
|
147
|
+
if (this.invalidInput) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
this.userAmount = this.inputValue;
|
|
151
|
+
this.postPlayerSituation(this.inputValue, false, true);
|
|
152
|
+
}
|
|
153
|
+
containsOnlyDigits(input) {
|
|
154
|
+
const regex = /^[0-9]+$/;
|
|
155
|
+
return regex.test(input);
|
|
156
|
+
}
|
|
157
|
+
handleInputChange(event) {
|
|
158
|
+
const inputValue = event.target.value;
|
|
159
|
+
this.inputValue = inputValue;
|
|
160
|
+
let min = parseInt(this.amountMinMax.split(',')[0]);
|
|
161
|
+
let max = parseInt(this.amountMinMax.split(',')[1]);
|
|
162
|
+
// Perform validation checks
|
|
163
|
+
this.isValidNumber = !isNaN(Number(inputValue)) && this.containsOnlyDigits(inputValue);
|
|
164
|
+
this.invalidInput = !this.isValidNumber;
|
|
165
|
+
this.minimumRange = Number(inputValue) >= min;
|
|
166
|
+
this.isWithinRange = Number(inputValue) <= max;
|
|
167
|
+
this.isButtonDisabled = !this.isValidNumber || !this.isWithinRange || !this.minimumRange;
|
|
168
|
+
}
|
|
169
|
+
renderKYC(step) {
|
|
170
|
+
if (step == 0) {
|
|
171
|
+
//CLOSE MODAL
|
|
172
|
+
this.closePopup.emit();
|
|
173
|
+
window.postMessage({ type: 'closePopup' }, window.location.href);
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (step == 1) {
|
|
177
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycSure', this.lang, { values: { currency: this.currency } })), h("p", null, translate('kyc1', this.lang, { values: { currency: this.currency } })), h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.postPlayerSituation(this.userAmount, false) }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimit') }, translate('keepExistingLimit', this.lang, { values: { currency: this.currency } }))))));
|
|
178
|
+
}
|
|
179
|
+
else if (step == 2) {
|
|
180
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })), h("p", { innerHTML: translate('kyc2', this.lang, { values: { currency: this.currency, amount: this.regularDepositLimitAmount } }) }), h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('Close') }, translate('Close', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('UploadDocuments') }, translate('UploadDocuments', this.lang, { values: { currency: this.currency } }))))));
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })), h("p", null, translate('kyc3', this.lang, { values: { currency: this.currency } })), h("div", { class: "ContainerButtons" }, h("button", { class: "SecondButton", onClick: () => this.handleClick('Close') }, translate('Close', this.lang, { values: { currency: this.currency } }))))));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
renderValidator(input) {
|
|
187
|
+
if (input == '1') {
|
|
188
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('softMigrationP1', this.lang, { values: { currency: this.currency } })), h("p", { innerHTML: translate('softMigrationP2', this.lang, { values: { currency: this.currency } }) }), h("p", { innerHTML: translate('softMigrationP3', this.lang, { values: { currency: this.currency, amount: this.amount } }) })), this.crossProviders ?
|
|
189
|
+
h("div", { class: "CrossProvider" }, h("svg", { width: "4", height: "17", viewBox: "0 0 4 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("rect", { width: "4", height: "12", rx: "2", fill: "white" }), h("rect", { y: "14", width: "4", height: "3", rx: "1.5", fill: "white" })), h("p", null, translate('crossProviders', this.lang, { values: { currency: this.currency } })))
|
|
190
|
+
:
|
|
191
|
+
h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimit') }, translate('confirm', this.lang, { values: { currency: this.currency } })))));
|
|
192
|
+
}
|
|
193
|
+
else if (input == '2') {
|
|
194
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('newUserP1', this.lang, { values: { currency: this.currency } })), h("p", null, translate('newUserP2', this.lang, { values: { currency: this.currency } })), h("p", null, translate('newUserP3', this.lang, { values: { currency: this.currency } }))), this.crossProviders ?
|
|
195
|
+
h("div", { class: "CrossProvider" }, h("svg", { width: "4", height: "17", viewBox: "0 0 4 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("rect", { width: "4", height: "12", rx: "2", fill: "white" }), h("rect", { y: "14", width: "4", height: "3", rx: "1.5", fill: "white" })), h("p", null, translate('crossProviders', this.lang, { values: { currency: this.currency } })))
|
|
196
|
+
:
|
|
197
|
+
h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimitNewUser') }, translate('keepExistingLimit', this.lang, { values: { currency: this.currency } })))));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
render() {
|
|
201
|
+
let kycConfirmation = this.renderKYC(this.kyc);
|
|
202
|
+
let validationContainer = this.renderValidator(this.flow);
|
|
203
|
+
if (this.isLoading) {
|
|
204
|
+
return (h("div", null, h("p", null, translate('loading', this.lang, { values: { currency: this.currency } }))));
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
if (this.hasErrors) {
|
|
208
|
+
return (h("div", null, h("p", null, translate('error', this.lang, { values: { currency: this.currency } }))));
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
return (h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, h("div", { class: "Container" }, h("div", { class: "ModalHeader" }, h("svg", { width: "107", height: "20", viewBox: "0 0 107 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M2.7948 17.4348C10.9082 18.9412 30.1923 20.0001 52.698 20.0001C75.2036 20.0001 94.4729 18.9412 102.601 17.4348H2.7948Z", fill: "#7EC51E" }), h("path", { d: "M66.4489 3.87771H64.1074L64.7934 0L60.7815 1.37211L58.3505 14.9143H62.1089L63.481 7.308C63.5705 6.84565 63.7942 6.65177 64.1969 6.65177H64.5697C64.9426 6.65177 65.0917 6.80091 65.0321 7.14394L63.6301 14.9292H67.4034L68.8949 6.63685C69.1931 4.95154 68.5518 3.87771 66.4489 3.87771Z", fill: "#002554" }), h("path", { d: "M93.0858 3.87769H92.6831H85.3901H81.6913L79.6928 14.9143H83.4512L84.8233 7.30797C84.9128 6.84563 85.1365 6.65174 85.5392 6.65174H85.9121C86.2849 6.65174 86.4341 6.80088 86.3744 7.14391L84.9725 14.9292H88.7309L90.103 7.32288C90.1925 6.86054 90.4162 6.66666 90.8189 6.66666H91.1917C91.5646 6.66666 91.7137 6.8158 91.6541 7.15883L90.2521 14.9441H94.0105L95.5019 6.65174C95.8301 4.95151 95.1887 3.87769 93.0858 3.87769Z", fill: "#002554" }), h("path", { d: "M51.9523 10.6639H57.0828L57.5302 8.11353H52.3997L51.9523 10.6639Z", fill: "#002554" }), h("path", { d: "M51.2363 1.34229L47.2244 2.7144L45.5093 12.1701C45.211 13.8255 45.897 14.9143 48.2684 14.9143H50.1476L50.6398 12.1551H49.8195C49.4466 12.1551 49.2975 12.006 49.3571 11.663L50.3266 6.42805H51.6689L52.1163 3.87771H50.7889L51.2363 1.34229Z", fill: "#002554" }), h("path", { d: "M27.2095 1.34229L23.1976 2.7144L21.4825 12.1701C21.1842 13.8255 21.8702 14.9143 24.2416 14.9143H26.1208L26.613 12.1551H25.7927C25.4198 12.1551 25.2707 12.006 25.3303 11.663L26.2998 6.42805H27.6421L28.0895 3.87771H26.7621L27.2095 1.34229Z", fill: "#002554" }), h("path", { d: "M27.8807 10.6639H33.0112L33.4736 8.11353H28.3431L27.8807 10.6639Z", fill: "#002554" }), h("path", { d: "M7.6569 3.87771H5.31536L6.01633 0L2.00439 1.37211L0.169932 11.5735L0.0655323 12.1701C-0.232753 13.8255 0.453304 14.9143 2.82467 14.9143H5.65839C7.7613 14.9143 8.79039 13.8255 9.08867 12.1701L10.0879 6.62194C10.4011 4.95154 9.75981 3.87771 7.6569 3.87771ZM6.25496 7.12903L5.43467 11.663C5.37502 11.9911 5.16622 12.1551 4.79336 12.1551H4.4205C4.01782 12.1551 3.85376 11.9613 3.94324 11.4989L4.70387 7.32291C4.79336 6.86057 5.01707 6.66668 5.41976 6.66668H5.79262C6.16547 6.63685 6.31461 6.786 6.25496 7.12903Z", fill: "#002554" }), h("path", { d: "M76.8891 3.87769H74.0852C71.7138 3.87769 70.7444 4.96643 70.4461 6.62191L69.4468 12.17C69.1486 13.8255 69.7302 14.9143 72.0867 14.9143H74.8906C77.2619 14.9143 78.2313 13.8255 78.5296 12.17L79.5289 6.62191C79.8421 4.95151 79.2604 3.87769 76.8891 3.87769ZM75.7854 6.96494L74.9055 11.8121C74.8458 12.1402 74.637 12.3043 74.2641 12.3043H73.6676C73.2947 12.3043 73.1456 12.1551 73.2052 11.8121L74.0852 6.96494C74.1448 6.63683 74.3536 6.47277 74.7265 6.47277H75.3231C75.6959 6.47277 75.8451 6.63683 75.7854 6.96494Z", fill: "#002554" }), h("path", { d: "M18.082 3.87769H15.3825C13.0111 3.87769 11.9373 4.96643 11.639 6.62191L10.6398 12.17C10.3415 13.8255 11.0275 14.9143 13.3989 14.9143H16.0984C18.4697 14.9143 19.5436 13.8255 19.8419 12.17L19.991 11.3796H16.4265L16.3519 11.7972C16.2923 12.1253 16.0835 12.3341 15.6957 12.3341H14.7263C14.3534 12.3341 14.2043 12.1849 14.2639 11.8419L14.4727 10.6637H20.1103L20.4832 8.62043L20.8411 6.62191C21.1394 4.95151 20.4384 3.87769 18.082 3.87769ZM17.2169 6.95003L17.0081 8.12825H14.9351L15.1439 6.95003C15.2035 6.62191 15.4123 6.45786 15.7852 6.45786H16.7546C17.1275 6.45786 17.2766 6.607 17.2169 6.95003Z", fill: "#002554" }), h("path", { d: "M42.2133 3.87769H39.5138C37.1424 3.87769 36.0686 4.96643 35.7703 6.62191L35.6212 7.41237H39.1857L39.2602 6.99477C39.3199 6.66666 39.5287 6.45786 39.9165 6.45786H40.8859C41.2588 6.45786 41.4079 6.607 41.3482 6.95003L41.1394 8.12825H37.0828C36.2028 8.12825 35.3676 8.82923 35.2185 9.70917L35.0842 10.4101L34.771 12.17C34.4728 13.8255 35.1588 14.9143 37.5302 14.9143H43.4959L44.9873 6.62191C45.2707 4.95151 44.5846 3.87769 42.2133 3.87769ZM40.4683 11.827C40.4086 12.1551 40.1998 12.3192 39.827 12.3192H38.8576C38.4847 12.3192 38.3356 12.17 38.3952 11.827L38.604 10.6488H40.6771L40.4683 11.827Z", fill: "#002554" }), h("path", { d: "M103.63 3.87769H100.931C98.5593 3.87769 97.4855 4.96643 97.1872 6.62191L96.1879 12.17C95.8896 13.8255 96.5757 14.9143 98.947 14.9143H101.647C104.018 14.9143 105.092 13.8255 105.39 12.17L105.539 11.3796H101.975L101.9 11.7972C101.84 12.1253 101.632 12.3341 101.259 12.3341H100.289C99.9165 12.3341 99.7673 12.1849 99.827 11.8419L100.036 10.6637H105.673L106.046 8.62043L106.404 6.62191C106.688 4.95151 106.002 3.87769 103.63 3.87769ZM102.765 6.95003L102.556 8.12825H100.483L100.692 6.95003C100.752 6.62191 100.96 6.45786 101.333 6.45786H102.303C102.676 6.45786 102.825 6.607 102.765 6.95003Z", fill: "#002554" }))), h("div", { class: "ModalBody" }, this.validation ? validationContainer : kycConfirmation, this.dropDown ?
|
|
212
|
+
h("div", null, h("hr", null), h("div", { class: "ModalFooter" }, h("div", { class: "Dropdown" }, h("p", null, translate('monthlyDeposit', this.lang, { values: { currency: this.currency } })), h("form", { onSubmit: (event) => this.handleSubmit(event) }, h("div", { class: "DropdownInput" }, h("input", { type: "number", value: this.inputValue, class: !this.invalidInput || this.invalidInput == undefined ? '' : "InvalidInput", placeholder: "0", onInput: (event) => this.handleInputChange(event) }), h("button", { disabled: this.isButtonDisabled }, translate('setLimit', this.lang, { values: { currency: this.currency } }))), (this.invalidInput || !this.isWithinRange || !this.minimumRange) && this.invalidInput != undefined ?
|
|
213
|
+
h("p", { class: "InvalidParagraph" }, !this.isValidNumber ? (translate('invalidNumber', this.lang, { values: { currency: this.currency } })) : !this.isWithinRange ? (translate('outOfRange', this.lang, { values: { currency: this.currency, min: this.amountMinMax.split(',')[0], max: this.amountMinMax.split(',')[1] } })) : !this.minimumRange ? (translate('minimumRange', this.lang, { values: { currency: this.currency, min: this.amountMinMax.split(',')[0], max: this.amountMinMax.split(',')[1] } })) : null)
|
|
214
|
+
: null))))
|
|
215
|
+
: null))));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
static get is() { return "player-lugas-limit"; }
|
|
220
|
+
static get encapsulation() { return "shadow"; }
|
|
221
|
+
static get originalStyleUrls() {
|
|
222
|
+
return {
|
|
223
|
+
"$": ["player-lugas-limit.scss"]
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
static get styleUrls() {
|
|
227
|
+
return {
|
|
228
|
+
"$": ["player-lugas-limit.css"]
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
static get properties() {
|
|
232
|
+
return {
|
|
233
|
+
"userId": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"mutable": false,
|
|
236
|
+
"complexType": {
|
|
237
|
+
"original": "string",
|
|
238
|
+
"resolved": "string",
|
|
239
|
+
"references": {}
|
|
240
|
+
},
|
|
241
|
+
"required": false,
|
|
242
|
+
"optional": false,
|
|
243
|
+
"docs": {
|
|
244
|
+
"tags": [],
|
|
245
|
+
"text": "The userId"
|
|
246
|
+
},
|
|
247
|
+
"attribute": "user-id",
|
|
248
|
+
"reflect": false,
|
|
249
|
+
"defaultValue": "''"
|
|
250
|
+
},
|
|
251
|
+
"session": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"mutable": false,
|
|
254
|
+
"complexType": {
|
|
255
|
+
"original": "string",
|
|
256
|
+
"resolved": "string",
|
|
257
|
+
"references": {}
|
|
258
|
+
},
|
|
259
|
+
"required": false,
|
|
260
|
+
"optional": false,
|
|
261
|
+
"docs": {
|
|
262
|
+
"tags": [],
|
|
263
|
+
"text": "The session"
|
|
264
|
+
},
|
|
265
|
+
"attribute": "session",
|
|
266
|
+
"reflect": false,
|
|
267
|
+
"defaultValue": "''"
|
|
268
|
+
},
|
|
269
|
+
"endpoint": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"mutable": false,
|
|
272
|
+
"complexType": {
|
|
273
|
+
"original": "string",
|
|
274
|
+
"resolved": "string",
|
|
275
|
+
"references": {}
|
|
276
|
+
},
|
|
277
|
+
"required": false,
|
|
278
|
+
"optional": false,
|
|
279
|
+
"docs": {
|
|
280
|
+
"tags": [],
|
|
281
|
+
"text": "The NorWAy endpoint"
|
|
282
|
+
},
|
|
283
|
+
"attribute": "endpoint",
|
|
284
|
+
"reflect": false,
|
|
285
|
+
"defaultValue": "''"
|
|
286
|
+
},
|
|
287
|
+
"currency": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"mutable": false,
|
|
290
|
+
"complexType": {
|
|
291
|
+
"original": "string",
|
|
292
|
+
"resolved": "string",
|
|
293
|
+
"references": {}
|
|
294
|
+
},
|
|
295
|
+
"required": false,
|
|
296
|
+
"optional": false,
|
|
297
|
+
"docs": {
|
|
298
|
+
"tags": [],
|
|
299
|
+
"text": "Currency of the player"
|
|
300
|
+
},
|
|
301
|
+
"attribute": "currency",
|
|
302
|
+
"reflect": false,
|
|
303
|
+
"defaultValue": "'EUR'"
|
|
304
|
+
},
|
|
305
|
+
"flow": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"mutable": false,
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "string",
|
|
310
|
+
"resolved": "string",
|
|
311
|
+
"references": {}
|
|
312
|
+
},
|
|
313
|
+
"required": false,
|
|
314
|
+
"optional": false,
|
|
315
|
+
"docs": {
|
|
316
|
+
"tags": [],
|
|
317
|
+
"text": "This chooses what type of flow the widget will have, \u201C1\u201D will be the Soft Migration Dialog and the \u201C2\u201D will be the New User"
|
|
318
|
+
},
|
|
319
|
+
"attribute": "flow",
|
|
320
|
+
"reflect": false,
|
|
321
|
+
"defaultValue": "''"
|
|
322
|
+
},
|
|
323
|
+
"amountMinMax": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"mutable": false,
|
|
326
|
+
"complexType": {
|
|
327
|
+
"original": "string",
|
|
328
|
+
"resolved": "string",
|
|
329
|
+
"references": {}
|
|
330
|
+
},
|
|
331
|
+
"required": false,
|
|
332
|
+
"optional": false,
|
|
333
|
+
"docs": {
|
|
334
|
+
"tags": [],
|
|
335
|
+
"text": "This decides the minimum and maximum mandatory amount for setting a new limit, example: amountMinMax=\u201C10,3000\u201D"
|
|
336
|
+
},
|
|
337
|
+
"attribute": "amount-min-max",
|
|
338
|
+
"reflect": false,
|
|
339
|
+
"defaultValue": "''"
|
|
340
|
+
},
|
|
341
|
+
"amount": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"mutable": false,
|
|
344
|
+
"complexType": {
|
|
345
|
+
"original": "string",
|
|
346
|
+
"resolved": "string",
|
|
347
|
+
"references": {}
|
|
348
|
+
},
|
|
349
|
+
"required": false,
|
|
350
|
+
"optional": false,
|
|
351
|
+
"docs": {
|
|
352
|
+
"tags": [],
|
|
353
|
+
"text": "The amount"
|
|
354
|
+
},
|
|
355
|
+
"attribute": "amount",
|
|
356
|
+
"reflect": false,
|
|
357
|
+
"defaultValue": "''"
|
|
358
|
+
},
|
|
359
|
+
"lang": {
|
|
360
|
+
"type": "string",
|
|
361
|
+
"mutable": false,
|
|
362
|
+
"complexType": {
|
|
363
|
+
"original": "string",
|
|
364
|
+
"resolved": "string",
|
|
365
|
+
"references": {}
|
|
366
|
+
},
|
|
367
|
+
"required": false,
|
|
368
|
+
"optional": false,
|
|
369
|
+
"docs": {
|
|
370
|
+
"tags": [],
|
|
371
|
+
"text": "The lang"
|
|
372
|
+
},
|
|
373
|
+
"attribute": "lang",
|
|
374
|
+
"reflect": false
|
|
375
|
+
},
|
|
376
|
+
"clientStyling": {
|
|
377
|
+
"type": "string",
|
|
378
|
+
"mutable": false,
|
|
379
|
+
"complexType": {
|
|
380
|
+
"original": "string",
|
|
381
|
+
"resolved": "string",
|
|
382
|
+
"references": {}
|
|
383
|
+
},
|
|
384
|
+
"required": false,
|
|
385
|
+
"optional": false,
|
|
386
|
+
"docs": {
|
|
387
|
+
"tags": [],
|
|
388
|
+
"text": "Client custom styling via string"
|
|
389
|
+
},
|
|
390
|
+
"attribute": "client-styling",
|
|
391
|
+
"reflect": false,
|
|
392
|
+
"defaultValue": "''"
|
|
393
|
+
},
|
|
394
|
+
"clientStylingUrl": {
|
|
395
|
+
"type": "string",
|
|
396
|
+
"mutable": false,
|
|
397
|
+
"complexType": {
|
|
398
|
+
"original": "string",
|
|
399
|
+
"resolved": "string",
|
|
400
|
+
"references": {}
|
|
401
|
+
},
|
|
402
|
+
"required": false,
|
|
403
|
+
"optional": false,
|
|
404
|
+
"docs": {
|
|
405
|
+
"tags": [],
|
|
406
|
+
"text": "Client custom styling via url"
|
|
407
|
+
},
|
|
408
|
+
"attribute": "client-styling-url",
|
|
409
|
+
"reflect": false,
|
|
410
|
+
"defaultValue": "''"
|
|
411
|
+
},
|
|
412
|
+
"translationUrl": {
|
|
413
|
+
"type": "string",
|
|
414
|
+
"mutable": false,
|
|
415
|
+
"complexType": {
|
|
416
|
+
"original": "string",
|
|
417
|
+
"resolved": "string",
|
|
418
|
+
"references": {}
|
|
419
|
+
},
|
|
420
|
+
"required": false,
|
|
421
|
+
"optional": false,
|
|
422
|
+
"docs": {
|
|
423
|
+
"tags": [],
|
|
424
|
+
"text": "The translationurl"
|
|
425
|
+
},
|
|
426
|
+
"attribute": "translation-url",
|
|
427
|
+
"reflect": false,
|
|
428
|
+
"defaultValue": "''"
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
static get states() {
|
|
433
|
+
return {
|
|
434
|
+
"validation": {},
|
|
435
|
+
"kyc": {},
|
|
436
|
+
"dropDown": {},
|
|
437
|
+
"isLoading": {},
|
|
438
|
+
"hasErrors": {},
|
|
439
|
+
"inputValue": {},
|
|
440
|
+
"isButtonDisabled": {},
|
|
441
|
+
"crossProviders": {},
|
|
442
|
+
"invalidInput": {},
|
|
443
|
+
"userAmount": {},
|
|
444
|
+
"operatorDepositLimitAmount": {},
|
|
445
|
+
"regularDepositLimitAmount": {},
|
|
446
|
+
"stylingAppends": {},
|
|
447
|
+
"isWithinRange": {},
|
|
448
|
+
"minimumRange": {}
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
static get events() {
|
|
452
|
+
return [{
|
|
453
|
+
"method": "uploadDocuments",
|
|
454
|
+
"name": "uploadDocuments",
|
|
455
|
+
"bubbles": true,
|
|
456
|
+
"cancelable": true,
|
|
457
|
+
"composed": true,
|
|
458
|
+
"docs": {
|
|
459
|
+
"tags": [],
|
|
460
|
+
"text": "Upload documents event"
|
|
461
|
+
},
|
|
462
|
+
"complexType": {
|
|
463
|
+
"original": "any",
|
|
464
|
+
"resolved": "any",
|
|
465
|
+
"references": {}
|
|
466
|
+
}
|
|
467
|
+
}, {
|
|
468
|
+
"method": "closePopup",
|
|
469
|
+
"name": "closePopup",
|
|
470
|
+
"bubbles": true,
|
|
471
|
+
"cancelable": true,
|
|
472
|
+
"composed": true,
|
|
473
|
+
"docs": {
|
|
474
|
+
"tags": [],
|
|
475
|
+
"text": ""
|
|
476
|
+
},
|
|
477
|
+
"complexType": {
|
|
478
|
+
"original": "any",
|
|
479
|
+
"resolved": "any",
|
|
480
|
+
"references": {}
|
|
481
|
+
}
|
|
482
|
+
}];
|
|
483
|
+
}
|
|
484
|
+
static get watchers() {
|
|
485
|
+
return [{
|
|
486
|
+
"propName": "translationUrl",
|
|
487
|
+
"methodName": "handleNewTranslations"
|
|
488
|
+
}];
|
|
489
|
+
}
|
|
490
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|