@everymatrix/player-kyc-verification 1.44.0 → 1.45.2
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-ff559e5a.js +1249 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/cjs/player-kyc-verification.cjs.entry.js +789 -812
- package/dist/cjs/player-kyc-verification.cjs.js +17 -11
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/player-kyc-verification/index.js +1 -0
- package/dist/collection/components/player-kyc-verification/player-kyc-verification.js +484 -548
- package/dist/collection/utils/locale.utils.js +506 -506
- package/dist/collection/utils/utils.js +14 -14
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-065b5928.js +1222 -0
- package/dist/esm/loader.js +7 -13
- package/dist/esm/player-kyc-verification.entry.js +789 -812
- package/dist/esm/player-kyc-verification.js +14 -11
- package/dist/player-kyc-verification/p-72182c55.js +2 -0
- package/dist/player-kyc-verification/{p-e48f90ad.entry.js → p-a68d44c9.entry.js} +1 -1
- package/dist/player-kyc-verification/p-e1255160.js +1 -0
- package/dist/player-kyc-verification/player-kyc-verification.esm.js +1 -1
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-kyc-verification/.stencil/packages/stencil/player-kyc-verification/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-kyc-verification/.stencil/packages/stencil/player-kyc-verification/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/player-kyc-verification/index.d.ts +1 -0
- package/dist/types/components/player-kyc-verification/player-kyc-verification.d.ts +73 -73
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +8 -1
- package/dist/cjs/index-95fc1c57.js +0 -1279
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/player-kyc-verification.d.ts +0 -11
- package/dist/components/player-kyc-verification.js +0 -893
- package/dist/esm/index-abf8c718.js +0 -1253
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/player-kyc-verification/p-1f2596d0.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/player-kyc-verification/.stencil/packages/player-kyc-verification/stencil.config.d.ts +0 -2
|
@@ -1,572 +1,508 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getTranslations, translate } from
|
|
3
|
-
import { isMobile } from
|
|
1
|
+
import { h, Fragment } from "@stencil/core";
|
|
2
|
+
import { getTranslations, translate } from "../../utils/locale.utils";
|
|
3
|
+
import { isMobile } from "../../utils/utils";
|
|
4
4
|
export class PlayerKycVerificationWidget {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
this.stylingContainer.prepend(sheet);
|
|
56
|
-
};
|
|
57
|
-
this.setClientStylingURL = () => {
|
|
58
|
-
let url = new URL(this.clientStylingUrl);
|
|
59
|
-
let cssFile = document.createElement('style');
|
|
60
|
-
fetch(url.href)
|
|
61
|
-
.then((res) => res.text())
|
|
62
|
-
.then((data) => {
|
|
63
|
-
cssFile.innerHTML = data;
|
|
64
|
-
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
65
|
-
})
|
|
66
|
-
.catch((err) => {
|
|
67
|
-
console.log('error ', err);
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
this.handleToggleScreen = () => {
|
|
71
|
-
this.toggleScreen(this.isMobile);
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
handleNewTranslations() {
|
|
75
|
-
this.isLoading = true;
|
|
76
|
-
getTranslations(this.translationUrl).then(() => {
|
|
77
|
-
this.isLoading = false;
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
async componentWillLoad() {
|
|
81
|
-
if (this.translationUrl.length > 2) {
|
|
82
|
-
await getTranslations(this.translationUrl);
|
|
5
|
+
constructor() {
|
|
6
|
+
this.scriptInjected = false;
|
|
7
|
+
this.MAX_UPLOAD_SIZE = 50000000;
|
|
8
|
+
this.userAgent = window.navigator.userAgent;
|
|
9
|
+
this.isMobile = isMobile(this.userAgent);
|
|
10
|
+
this.setClientStyling = () => {
|
|
11
|
+
let sheet = document.createElement('style');
|
|
12
|
+
sheet.innerHTML = this.clientStyling;
|
|
13
|
+
this.stylingContainer.prepend(sheet);
|
|
14
|
+
};
|
|
15
|
+
this.setClientStylingURL = () => {
|
|
16
|
+
let url = new URL(this.clientStylingUrl);
|
|
17
|
+
let cssFile = document.createElement('style');
|
|
18
|
+
fetch(url.href)
|
|
19
|
+
.then((res) => res.text())
|
|
20
|
+
.then((data) => {
|
|
21
|
+
cssFile.innerHTML = data;
|
|
22
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
23
|
+
})
|
|
24
|
+
.catch((err) => {
|
|
25
|
+
console.log('error ', err);
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
this.handleToggleScreen = () => {
|
|
29
|
+
this.toggleScreen(this.isMobile);
|
|
30
|
+
};
|
|
31
|
+
this.userId = '';
|
|
32
|
+
this.session = '';
|
|
33
|
+
this.language = undefined;
|
|
34
|
+
this.endpoint = '';
|
|
35
|
+
this.translationUrl = '';
|
|
36
|
+
this.clientStyling = '';
|
|
37
|
+
this.verifiedIcon = '';
|
|
38
|
+
this.failedIcon = '';
|
|
39
|
+
this.defaultIcon = '';
|
|
40
|
+
this.clientStylingUrl = '';
|
|
41
|
+
this.verificationType = [];
|
|
42
|
+
this.isLoading = false;
|
|
43
|
+
this.stylingAppends = false;
|
|
44
|
+
this.selectedFile = null;
|
|
45
|
+
this.uploadingStatus = undefined;
|
|
46
|
+
this.uploadSizeExceeded = false;
|
|
47
|
+
this.selectedOption = undefined;
|
|
48
|
+
this.expandedOnDesktop = false;
|
|
49
|
+
}
|
|
50
|
+
handleNewTranslations() {
|
|
51
|
+
this.isLoading = true;
|
|
52
|
+
getTranslations(this.translationUrl).then(() => {
|
|
53
|
+
this.isLoading = false;
|
|
54
|
+
});
|
|
83
55
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if (this.clientStyling)
|
|
89
|
-
this.setClientStyling();
|
|
90
|
-
if (this.clientStylingUrl)
|
|
91
|
-
this.setClientStylingURL();
|
|
92
|
-
this.stylingAppends = true;
|
|
56
|
+
async componentWillLoad() {
|
|
57
|
+
if (this.translationUrl.length > 2) {
|
|
58
|
+
await getTranslations(this.translationUrl);
|
|
59
|
+
}
|
|
93
60
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
61
|
+
componentDidRender() {
|
|
62
|
+
// start custom styling area
|
|
63
|
+
if (!this.stylingAppends && this.stylingContainer) {
|
|
64
|
+
if (this.clientStyling)
|
|
65
|
+
this.setClientStyling();
|
|
66
|
+
if (this.clientStylingUrl)
|
|
67
|
+
this.setClientStylingURL();
|
|
68
|
+
this.stylingAppends = true;
|
|
69
|
+
}
|
|
70
|
+
// end custom styling area
|
|
99
71
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
method: 'POST',
|
|
104
|
-
headers: {
|
|
105
|
-
'X-SessionId': this.session,
|
|
106
|
-
'Content-Type': 'application/json',
|
|
107
|
-
},
|
|
108
|
-
body: JSON.stringify({})
|
|
109
|
-
};
|
|
110
|
-
fetch(url.href, options)
|
|
111
|
-
.then((res) => {
|
|
112
|
-
if (res.status === 200) {
|
|
113
|
-
return res.json();
|
|
72
|
+
async componentDidLoad() {
|
|
73
|
+
if (window.innerWidth > 700) {
|
|
74
|
+
this.expandedOnDesktop = true;
|
|
114
75
|
}
|
|
115
|
-
|
|
116
|
-
|
|
76
|
+
try {
|
|
77
|
+
let url = new URL(`${this.endpoint}/v2/player/${this.userId}/verification/GetKYCCustomerStatus`);
|
|
78
|
+
const options = {
|
|
79
|
+
method: 'POST',
|
|
80
|
+
headers: {
|
|
81
|
+
'X-SessionId': this.session,
|
|
82
|
+
'Content-Type': 'application/json',
|
|
83
|
+
},
|
|
84
|
+
body: JSON.stringify({})
|
|
85
|
+
};
|
|
86
|
+
fetch(url.href, options)
|
|
87
|
+
.then((res) => {
|
|
88
|
+
if (res.status === 200) {
|
|
89
|
+
return res.json();
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
throw new Error("HTTP status " + res.status);
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
.then((data) => {
|
|
96
|
+
this.verificationType = data.verifications;
|
|
97
|
+
})
|
|
98
|
+
.catch((err) => {
|
|
99
|
+
// Handle any errors
|
|
100
|
+
console.error(err);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
console.error('Error fetching verification types:', error);
|
|
117
105
|
}
|
|
118
|
-
})
|
|
119
|
-
.then((data) => {
|
|
120
|
-
this.verificationType = data.verifications;
|
|
121
|
-
})
|
|
122
|
-
.catch((err) => {
|
|
123
|
-
// Handle any errors
|
|
124
|
-
console.error(err);
|
|
125
|
-
});
|
|
126
106
|
}
|
|
127
|
-
|
|
128
|
-
|
|
107
|
+
handleOptionChange(event, verificationTypeId) {
|
|
108
|
+
const target = event.target;
|
|
109
|
+
this.selectedOption = target.value;
|
|
110
|
+
this.verificationType = this.verificationType.map((type) => {
|
|
111
|
+
if (type.type === verificationTypeId) {
|
|
112
|
+
type.optionChosen = target.value;
|
|
113
|
+
}
|
|
114
|
+
return type;
|
|
115
|
+
});
|
|
129
116
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
});
|
|
177
|
-
return size <= this.MAX_UPLOAD_SIZE;
|
|
178
|
-
}
|
|
179
|
-
handleFileSelection(file, documentType, verificationTypeId) {
|
|
180
|
-
if (file && file.length > 0) {
|
|
181
|
-
this.selectedFile = file;
|
|
182
|
-
if (!this.checkFileSize(this.selectedFile)) {
|
|
183
|
-
console.error(translate('fileSizeExceeded', this.language));
|
|
184
|
-
this.uploadingStatus = translate('fileSizeExceeded', this.language);
|
|
185
|
-
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
186
|
-
this.uploadSizeExceeded = true;
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
const uploadOptions = {
|
|
190
|
-
method: 'POST',
|
|
191
|
-
headers: {
|
|
192
|
-
'Content-Type': 'application/json',
|
|
193
|
-
'X-SessionId': this.session,
|
|
194
|
-
},
|
|
195
|
-
body: JSON.stringify({ DocumentCode: documentType }),
|
|
196
|
-
};
|
|
197
|
-
fetch(`${this.endpoint}/v1/player/${this.userId}/verification/GetKYCVerificationDocumentUploadUrl`, uploadOptions)
|
|
198
|
-
.then(response => {
|
|
199
|
-
if (response.ok) {
|
|
200
|
-
this.uploadingStatus = translate('uploading', this.language);
|
|
201
|
-
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
202
|
-
return response.json();
|
|
203
|
-
}
|
|
204
|
-
}).then((data) => {
|
|
205
|
-
const formData = new FormData();
|
|
206
|
-
formData.append(documentType, this.selectedFile[0]);
|
|
207
|
-
fetch(data.Url, { method: "POST", body: formData })
|
|
208
|
-
.then(res => {
|
|
209
|
-
if (res.ok) {
|
|
210
|
-
if (this.selectedFile.length > 1) {
|
|
211
|
-
this.uploadingStatus = translate('successUploadMultipleFiles', this.language);
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
this.uploadingStatus = translate('successUpload', this.language);
|
|
215
|
-
}
|
|
216
|
-
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
117
|
+
handleDocumentsStatus(verificationTypeId, documentsStatus, documentCode) {
|
|
118
|
+
this.verificationType = this.verificationType.map((vType) => {
|
|
119
|
+
if (vType.type === verificationTypeId) {
|
|
120
|
+
const document = vType.documents.find((doc) => doc.code === documentCode);
|
|
121
|
+
if (document) {
|
|
122
|
+
document.statusUploaded = documentsStatus;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return vType;
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
downloadPDF(pdfUrl) {
|
|
129
|
+
const link = document.createElement('a');
|
|
130
|
+
link.href = pdfUrl;
|
|
131
|
+
link.download = 'file.pdf';
|
|
132
|
+
link.target = '_blank';
|
|
133
|
+
link.dispatchEvent(new MouseEvent('click'));
|
|
134
|
+
}
|
|
135
|
+
toggleVerificationType(verificationTypeId, verificationTypeFlowInfoType) {
|
|
136
|
+
this.expandedOnDesktop = false;
|
|
137
|
+
this.verificationType = this.verificationType.map((type) => {
|
|
138
|
+
var _a;
|
|
139
|
+
if (type.type === verificationTypeId && ((_a = type.flowInfo) === null || _a === void 0 ? void 0 : _a.type) == verificationTypeFlowInfoType) {
|
|
140
|
+
type.expanded = !type.expanded;
|
|
141
|
+
}
|
|
142
|
+
return type;
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
toggleScreen(isMobile) {
|
|
146
|
+
window.postMessage({ type: 'PlayerAccountMenuActive', isMobile }, window.location.href);
|
|
147
|
+
}
|
|
148
|
+
checkFileSize(file) {
|
|
149
|
+
let size = 0;
|
|
150
|
+
Object.keys(file).forEach(element => {
|
|
151
|
+
size += file[element].size;
|
|
152
|
+
});
|
|
153
|
+
return size <= this.MAX_UPLOAD_SIZE;
|
|
154
|
+
}
|
|
155
|
+
handleFileSelection(file, documentType, verificationTypeId) {
|
|
156
|
+
if (file && file.length > 0) {
|
|
157
|
+
this.selectedFile = file;
|
|
158
|
+
if (!this.checkFileSize(this.selectedFile)) {
|
|
159
|
+
console.error(translate('fileSizeExceeded', this.language));
|
|
160
|
+
this.uploadingStatus = translate('fileSizeExceeded', this.language);
|
|
161
|
+
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
162
|
+
this.uploadSizeExceeded = true;
|
|
217
163
|
}
|
|
218
164
|
else {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
165
|
+
const uploadOptions = {
|
|
166
|
+
method: 'POST',
|
|
167
|
+
headers: {
|
|
168
|
+
'Content-Type': 'application/json',
|
|
169
|
+
'X-SessionId': this.session,
|
|
170
|
+
},
|
|
171
|
+
body: JSON.stringify({ DocumentCode: documentType }),
|
|
172
|
+
};
|
|
173
|
+
fetch(`${this.endpoint}/v1/player/${this.userId}/verification/GetKYCVerificationDocumentUploadUrl`, uploadOptions)
|
|
174
|
+
.then(response => {
|
|
175
|
+
if (response.ok) {
|
|
176
|
+
this.uploadingStatus = translate('uploading', this.language);
|
|
177
|
+
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
178
|
+
return response.json();
|
|
179
|
+
}
|
|
180
|
+
}).then((data) => {
|
|
181
|
+
const formData = new FormData();
|
|
182
|
+
formData.append(documentType, this.selectedFile[0]);
|
|
183
|
+
fetch(data.Url, { method: "POST", body: formData })
|
|
184
|
+
.then(res => {
|
|
185
|
+
if (res.ok) {
|
|
186
|
+
if (this.selectedFile.length > 1) {
|
|
187
|
+
this.uploadingStatus = translate('successUploadMultipleFiles', this.language);
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
this.uploadingStatus = translate('successUpload', this.language);
|
|
191
|
+
}
|
|
192
|
+
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
this.uploadingStatus = translate('failedUpload', this.language);
|
|
196
|
+
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
197
|
+
console.error('File upload error:', res.status);
|
|
198
|
+
}
|
|
199
|
+
})
|
|
200
|
+
.catch(error => {
|
|
201
|
+
console.error('File upload error:', error);
|
|
202
|
+
});
|
|
203
|
+
})
|
|
204
|
+
.catch(error => {
|
|
205
|
+
console.error('File upload error:', error);
|
|
206
|
+
});
|
|
222
207
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
importScript(url) {
|
|
211
|
+
return new Promise((resolve, reject) => {
|
|
212
|
+
fetch(url)
|
|
213
|
+
.then((res) => res.text())
|
|
214
|
+
.then((res) => {
|
|
215
|
+
const scriptFunction = new Function(res);
|
|
216
|
+
scriptFunction();
|
|
217
|
+
if (this.scriptInjected) {
|
|
218
|
+
resolve(true);
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
const scriptElement = document.createElement('script');
|
|
222
|
+
scriptElement.src = 'https://test.insic.de/frontend3/static/js/avs-loader.min.js';
|
|
223
|
+
document.head.appendChild(scriptElement);
|
|
224
|
+
this.scriptInjected = true;
|
|
225
|
+
resolve(true);
|
|
226
|
+
}
|
|
227
|
+
})
|
|
228
|
+
.catch(error => {
|
|
229
|
+
reject(error);
|
|
230
|
+
});
|
|
230
231
|
});
|
|
231
|
-
}
|
|
232
232
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
233
|
+
isStatusUploaded(document) {
|
|
234
|
+
if (document && document.status === 'Uploaded')
|
|
235
|
+
return true;
|
|
236
|
+
return false;
|
|
237
|
+
}
|
|
238
|
+
renderVerificationTypeBox(verificationType) {
|
|
239
|
+
if (this.expandedOnDesktop) {
|
|
240
|
+
verificationType.expanded = true;
|
|
241
|
+
}
|
|
242
|
+
let expanded = verificationType.expanded;
|
|
243
|
+
let name = verificationType.type.trim();
|
|
244
|
+
let optionChosen = verificationType.optionChosen;
|
|
245
|
+
let status = verificationType.status;
|
|
246
|
+
let documents = verificationType.documents;
|
|
247
|
+
let flowInfo = verificationType.flowInfo;
|
|
248
|
+
const isVerified = status === 'Verified';
|
|
249
|
+
const isFailedOrExpired = status === 'Failed' || status === 'Expired';
|
|
250
|
+
return (h("div", { class: `verification-box ${expanded ? 'expanded' : ''} ${isFailedOrExpired ? 'failed' : ''} ${isVerified ? 'success' : ''}` }, h("div", { class: `box box-header ${expanded ? 'expanded' : ''}`, onClick: () => { var _a; return this.toggleVerificationType(verificationType.type, (_a = verificationType.flowInfo) === null || _a === void 0 ? void 0 : _a.type); } }, h("div", { class: "box-icon" }, isVerified ? (h("div", null, this.verifiedIcon ? (h("img", { class: "CustomVerifiedIcon", src: this.verifiedIcon, alt: "" })) : (h("svg", { width: "100", height: "100", viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { cx: "50", cy: "50", r: "40", fill: "#388D79" }), h("circle", { cx: "50", cy: "50", r: "34", fill: "none", stroke: "#fff", "stroke-width": "12px" }), h("polyline", { points: "30,50 45,63 70,35", fill: "none", stroke: "#fff", "stroke-width": "8px" }))))) : (isFailedOrExpired ? (h("div", null, this.failedIcon ? (h("img", { class: "CustomFailedIcon", src: this.failedIcon, alt: "" })) : (h("svg", { width: "100", height: "100", viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { cx: "50", cy: "50", r: "40", fill: "red" }), h("line", { x1: "30", y1: "30", x2: "70", y2: "70", stroke: "#fff", "stroke-width": "10px" }), h("line", { x1: "30", y1: "70", x2: "70", y2: "30", stroke: "#fff", "stroke-width": "10px" }))))) : (h("div", null, this.defaultIcon ? (h("img", { class: "CustomDefaultIcon", src: this.defaultIcon, alt: "" })) : (h("svg", { width: "800px", height: "800px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M4 4V20C4 21.1046 4.89543 22 6 22L18 22C19.1046 22 20 21.1046 20 20V8.34162C20 7.8034 19.7831 7.28789 19.3982 6.91161L14.9579 2.56999C14.5842 2.20459 14.0824 2 13.5597 2L6 2C4.89543 2 4 2.89543 4 4Z", stroke: "#000000", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M9 13H15", stroke: "#000000", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M9 17H12", stroke: "#000000", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M14 2V6C14 7.10457 14.8954 8 16 8H20", stroke: "#000000", "stroke-width": "2", "stroke-linejoin": "round" }))))))), h("div", { class: "box-title" }, translate(name, this.language)), h("div", { class: "chevron-icon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: expanded ? 'M6 15l6-6 6 6' : 'M6 9l6 6 6-6' })))), expanded ? (this.renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired)) :
|
|
251
|
+
(h("div", { class: "box box-content" }, h("div", { id: "__avs-wrapper" })))));
|
|
252
|
+
}
|
|
253
|
+
renderDocumentsActions(selectedDocument, optionChosen, verificationType) {
|
|
254
|
+
return (h("div", null, this.isStatusUploaded(selectedDocument) ? (h("div", { class: "upload-status" }, translate('uploaded', this.language))) :
|
|
255
|
+
(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded) ? (h("div", { class: "upload-status" }, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded)) : (h("div", { class: "documents-action" }, h("div", { class: "sample-file" }, (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleType) === "FileDownload" ? (h("button", { class: "download-button", onClick: () => this.downloadPDF(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleUrl) }, h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M12 0C5.372 0 0 5.372 0 12C0 18.628 5.372 24 12 24C18.628 24 24 18.628 24 12C24 5.372 18.628 0 12 0ZM12 22C6.485 22 2 17.515 2 12C2 6.485 6.485 2 12 2C17.515 2 22 6.485 22 12C22 17.515 17.515 22 12 22Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }), h("path", { d: "M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" })), h("span", null, translate('download', this.language)))) : null), h("div", { class: "upload-button" }, optionChosen ? (h("label", null, h("input", { type: "file", accept: "*", onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }), h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { cx: "50", cy: "50", r: "40", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }), h("line", { x1: "30", y1: "50", x2: "70", y2: "50", stroke: "white", "stroke-width": "6" }), h("line", { x1: "50", y1: "30", x2: "50", y2: "70", stroke: "white", "stroke-width": "6" })))) : null)))));
|
|
256
|
+
}
|
|
257
|
+
;
|
|
258
|
+
renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired) {
|
|
259
|
+
if ((flowInfo === null || flowInfo === void 0 ? void 0 : flowInfo.type) === 'Widget') {
|
|
260
|
+
return (h("div", null, h("hr", { style: { margin: '5px' } }), h("iframe", { src: flowInfo.url, frameborder: "0", height: "400px", width: "100%", allowfullScreen: true, allow: "camera *;microphone *" })));
|
|
261
|
+
// comment the functionality under because it might have a different type of script that we might have to handle
|
|
262
|
+
// this.importScript(flowInfo.url)
|
|
263
|
+
// .then(() => {
|
|
264
|
+
// // Script imported successfully
|
|
265
|
+
// console.log('Script imported correctly');
|
|
266
|
+
// // Open/show the widget
|
|
267
|
+
// // You'll need to check the widget documentation for how to open/show it
|
|
268
|
+
// })
|
|
269
|
+
// .catch(error => {
|
|
270
|
+
// // Handle script import error
|
|
271
|
+
// console.error('Error importing script:', error);
|
|
272
|
+
// });
|
|
273
|
+
}
|
|
274
|
+
else if ((flowInfo === null || flowInfo === void 0 ? void 0 : flowInfo.type) === 'Redirect' && verificationType.vendorName !== "Manual" && status !== "Verified") {
|
|
275
|
+
return (h("div", null, h("hr", { style: { margin: '5px' } }), h("iframe", { src: flowInfo.url, frameborder: "0", height: "400px", width: "100%", allowfullScreen: true, allow: "camera *;microphone *" })));
|
|
243
276
|
}
|
|
244
277
|
else {
|
|
245
|
-
|
|
246
|
-
scriptElement.src = 'https://test.insic.de/frontend3/static/js/avs-loader.min.js';
|
|
247
|
-
document.head.appendChild(scriptElement);
|
|
248
|
-
this.scriptInjected = true;
|
|
249
|
-
resolve(true);
|
|
278
|
+
return (h("div", { class: "box box-content" }, h(Fragment, null, isVerified ? (h("div", { class: "verification-status" }, translate('verificationComplete', this.language))) : isFailedOrExpired ? (h("div", { class: "verification-status" }, status === 'Failed' ? translate('verificationFailed', this.language) : translate('verificationExpired', this.language))) : documents.length > 0 ? (h("div", { class: "documents-dropdown" }, h("select", { class: "nice-select", onChange: (event) => this.handleOptionChange(event, verificationType.type) }, h("option", { value: "", selected: true, disabled: true, hidden: true }, translate('chooseDocument', this.language)), documents.map((doc) => (h("option", { selected: optionChosen == doc.code ? true : false, value: doc.code }, translate(doc.type, this.language))))), this.renderDocumentsActions(documents.find((e) => e.code === optionChosen), optionChosen, verificationType))) : null)));
|
|
250
279
|
}
|
|
251
|
-
})
|
|
252
|
-
.catch(error => {
|
|
253
|
-
reject(error);
|
|
254
|
-
});
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
isStatusUploaded(document) {
|
|
258
|
-
if (document && document.status === 'Uploaded')
|
|
259
|
-
return true;
|
|
260
|
-
return false;
|
|
261
|
-
}
|
|
262
|
-
renderVerificationTypeBox(verificationType) {
|
|
263
|
-
if (this.expandedOnDesktop) {
|
|
264
|
-
verificationType.expanded = true;
|
|
265
280
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
h("polyline", { points: "30,50 45,63 70,35", fill: "none", stroke: "#fff", "stroke-width": "8px" }))))) : (isFailedOrExpired ? (h("div", null, this.failedIcon ? (h("img", { class: "CustomFailedIcon", src: this.failedIcon, alt: "" })) : (h("svg", { width: "100", height: "100", viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg" },
|
|
280
|
-
h("circle", { cx: "50", cy: "50", r: "40", fill: "red" }),
|
|
281
|
-
h("line", { x1: "30", y1: "30", x2: "70", y2: "70", stroke: "#fff", "stroke-width": "10px" }),
|
|
282
|
-
h("line", { x1: "30", y1: "70", x2: "70", y2: "30", stroke: "#fff", "stroke-width": "10px" }))))) : (h("div", null, this.defaultIcon ? (h("img", { class: "CustomDefaultIcon", src: this.defaultIcon, alt: "" })) : (h("svg", { width: "800px", height: "800px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
283
|
-
h("path", { d: "M4 4V20C4 21.1046 4.89543 22 6 22L18 22C19.1046 22 20 21.1046 20 20V8.34162C20 7.8034 19.7831 7.28789 19.3982 6.91161L14.9579 2.56999C14.5842 2.20459 14.0824 2 13.5597 2L6 2C4.89543 2 4 2.89543 4 4Z", stroke: "#000000", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
284
|
-
h("path", { d: "M9 13H15", stroke: "#000000", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
285
|
-
h("path", { d: "M9 17H12", stroke: "#000000", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
286
|
-
h("path", { d: "M14 2V6C14 7.10457 14.8954 8 16 8H20", stroke: "#000000", "stroke-width": "2", "stroke-linejoin": "round" }))))))),
|
|
287
|
-
h("div", { class: "box-title" }, translate(name, this.language)),
|
|
288
|
-
h("div", { class: "chevron-icon" },
|
|
289
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
|
|
290
|
-
h("path", { d: expanded ? 'M6 15l6-6 6 6' : 'M6 9l6 6 6-6' })))),
|
|
291
|
-
expanded ? (this.renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired)) :
|
|
292
|
-
(h("div", { class: "box box-content" },
|
|
293
|
-
h("div", { id: "__avs-wrapper" })))));
|
|
294
|
-
}
|
|
295
|
-
renderDocumentsActions(selectedDocument, optionChosen, verificationType) {
|
|
296
|
-
return (h("div", null, this.isStatusUploaded(selectedDocument) ? (h("div", { class: "upload-status" }, translate('uploaded', this.language))) :
|
|
297
|
-
(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded) ? (h("div", { class: "upload-status" }, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded)) : (h("div", { class: "documents-action" },
|
|
298
|
-
h("div", { class: "sample-file" }, (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleType) === "FileDownload" ? (h("button", { class: "download-button", onClick: () => this.downloadPDF(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleUrl) },
|
|
299
|
-
h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
300
|
-
h("path", { d: "M12 0C5.372 0 0 5.372 0 12C0 18.628 5.372 24 12 24C18.628 24 24 18.628 24 12C24 5.372 18.628 0 12 0ZM12 22C6.485 22 2 17.515 2 12C2 6.485 6.485 2 12 2C17.515 2 22 6.485 22 12C22 17.515 17.515 22 12 22Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }),
|
|
301
|
-
h("path", { d: "M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" })),
|
|
302
|
-
h("span", null, translate('download', this.language)))) : null),
|
|
303
|
-
h("div", { class: "upload-button" }, optionChosen ? (h("label", null,
|
|
304
|
-
h("input", { type: "file", accept: "*", onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }),
|
|
305
|
-
h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" },
|
|
306
|
-
h("circle", { cx: "50", cy: "50", r: "40", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }),
|
|
307
|
-
h("line", { x1: "30", y1: "50", x2: "70", y2: "50", stroke: "white", "stroke-width": "6" }),
|
|
308
|
-
h("line", { x1: "50", y1: "30", x2: "50", y2: "70", stroke: "white", "stroke-width": "6" })))) : null)))));
|
|
309
|
-
}
|
|
310
|
-
;
|
|
311
|
-
renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired) {
|
|
312
|
-
if ((flowInfo === null || flowInfo === void 0 ? void 0 : flowInfo.type) === 'Widget') {
|
|
313
|
-
return (h("div", null,
|
|
314
|
-
h("hr", { style: { margin: '5px' } }),
|
|
315
|
-
h("iframe", { src: flowInfo.url, frameborder: "0", height: "400px", width: "100%", allowfullScreen: true, allow: "camera *;microphone *" })));
|
|
316
|
-
// comment the functionality under because it might have a different type of script that we might have to handle
|
|
317
|
-
// this.importScript(flowInfo.url)
|
|
318
|
-
// .then(() => {
|
|
319
|
-
// // Script imported successfully
|
|
320
|
-
// console.log('Script imported correctly');
|
|
321
|
-
// // Open/show the widget
|
|
322
|
-
// // You'll need to check the widget documentation for how to open/show it
|
|
323
|
-
// })
|
|
324
|
-
// .catch(error => {
|
|
325
|
-
// // Handle script import error
|
|
326
|
-
// console.error('Error importing script:', error);
|
|
327
|
-
// });
|
|
281
|
+
render() {
|
|
282
|
+
if (this.isLoading) {
|
|
283
|
+
return (h("div", null, h("p", null, translate('loading', this.language))));
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
return (h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, h("div", { class: "player-kyc-verification-widget" }, (this.isMobile ?
|
|
287
|
+
h("div", { class: "MenuReturnButton", onClick: this.handleToggleScreen }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, h("defs", null), h("g", { transform: "translate(-20 -158)" }, h("g", { transform: "translate(20 158)" }, 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)" })))), h("h2", null, translate('kycTitle', this.language)))
|
|
288
|
+
:
|
|
289
|
+
h("h2", null, translate('kycTitle', this.language))), this.verificationType.length === 0 ?
|
|
290
|
+
h("div", { class: "no-verification-description", style: { padding: '24px', fontSize: '18px' } }, translate('noVerificationRequired', this.language))
|
|
291
|
+
:
|
|
292
|
+
h(Fragment, null, h("div", { class: "widget-description" }, translate('kycDescription', this.language)), h("div", { class: "verification-types" }, this.verificationType.map((verificationType) => verificationType ? this.renderVerificationTypeBox(verificationType) : null))))));
|
|
293
|
+
}
|
|
328
294
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
295
|
+
static get is() { return "player-kyc-verification"; }
|
|
296
|
+
static get encapsulation() { return "shadow"; }
|
|
297
|
+
static get originalStyleUrls() {
|
|
298
|
+
return {
|
|
299
|
+
"$": ["player-kyc-verification.scss"]
|
|
300
|
+
};
|
|
333
301
|
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
h("option", { value: "", selected: true, disabled: true, hidden: true }, translate('chooseDocument', this.language)),
|
|
339
|
-
documents.map((doc) => (h("option", { selected: optionChosen == doc.code ? true : false, value: doc.code }, translate(doc.type, this.language))))),
|
|
340
|
-
this.renderDocumentsActions(documents.find((e) => e.code === optionChosen), optionChosen, verificationType))) : null)));
|
|
302
|
+
static get styleUrls() {
|
|
303
|
+
return {
|
|
304
|
+
"$": ["player-kyc-verification.css"]
|
|
305
|
+
};
|
|
341
306
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
307
|
+
static get properties() {
|
|
308
|
+
return {
|
|
309
|
+
"userId": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"mutable": false,
|
|
312
|
+
"complexType": {
|
|
313
|
+
"original": "string",
|
|
314
|
+
"resolved": "string",
|
|
315
|
+
"references": {}
|
|
316
|
+
},
|
|
317
|
+
"required": false,
|
|
318
|
+
"optional": false,
|
|
319
|
+
"docs": {
|
|
320
|
+
"tags": [],
|
|
321
|
+
"text": "The userId"
|
|
322
|
+
},
|
|
323
|
+
"attribute": "user-id",
|
|
324
|
+
"reflect": false,
|
|
325
|
+
"defaultValue": "''"
|
|
326
|
+
},
|
|
327
|
+
"session": {
|
|
328
|
+
"type": "string",
|
|
329
|
+
"mutable": false,
|
|
330
|
+
"complexType": {
|
|
331
|
+
"original": "string",
|
|
332
|
+
"resolved": "string",
|
|
333
|
+
"references": {}
|
|
334
|
+
},
|
|
335
|
+
"required": false,
|
|
336
|
+
"optional": false,
|
|
337
|
+
"docs": {
|
|
338
|
+
"tags": [],
|
|
339
|
+
"text": "The session"
|
|
340
|
+
},
|
|
341
|
+
"attribute": "session",
|
|
342
|
+
"reflect": false,
|
|
343
|
+
"defaultValue": "''"
|
|
344
|
+
},
|
|
345
|
+
"language": {
|
|
346
|
+
"type": "string",
|
|
347
|
+
"mutable": false,
|
|
348
|
+
"complexType": {
|
|
349
|
+
"original": "string",
|
|
350
|
+
"resolved": "string",
|
|
351
|
+
"references": {}
|
|
352
|
+
},
|
|
353
|
+
"required": false,
|
|
354
|
+
"optional": false,
|
|
355
|
+
"docs": {
|
|
356
|
+
"tags": [],
|
|
357
|
+
"text": "The language"
|
|
358
|
+
},
|
|
359
|
+
"attribute": "language",
|
|
360
|
+
"reflect": false
|
|
361
|
+
},
|
|
362
|
+
"endpoint": {
|
|
363
|
+
"type": "string",
|
|
364
|
+
"mutable": false,
|
|
365
|
+
"complexType": {
|
|
366
|
+
"original": "string",
|
|
367
|
+
"resolved": "string",
|
|
368
|
+
"references": {}
|
|
369
|
+
},
|
|
370
|
+
"required": false,
|
|
371
|
+
"optional": false,
|
|
372
|
+
"docs": {
|
|
373
|
+
"tags": [],
|
|
374
|
+
"text": "The NorWAy endpoint"
|
|
375
|
+
},
|
|
376
|
+
"attribute": "endpoint",
|
|
377
|
+
"reflect": false,
|
|
378
|
+
"defaultValue": "''"
|
|
379
|
+
},
|
|
380
|
+
"translationUrl": {
|
|
381
|
+
"type": "string",
|
|
382
|
+
"mutable": false,
|
|
383
|
+
"complexType": {
|
|
384
|
+
"original": "string",
|
|
385
|
+
"resolved": "string",
|
|
386
|
+
"references": {}
|
|
387
|
+
},
|
|
388
|
+
"required": false,
|
|
389
|
+
"optional": false,
|
|
390
|
+
"docs": {
|
|
391
|
+
"tags": [],
|
|
392
|
+
"text": "The translationurl"
|
|
393
|
+
},
|
|
394
|
+
"attribute": "translation-url",
|
|
395
|
+
"reflect": false,
|
|
396
|
+
"defaultValue": "''"
|
|
397
|
+
},
|
|
398
|
+
"clientStyling": {
|
|
399
|
+
"type": "string",
|
|
400
|
+
"mutable": false,
|
|
401
|
+
"complexType": {
|
|
402
|
+
"original": "string",
|
|
403
|
+
"resolved": "string",
|
|
404
|
+
"references": {}
|
|
405
|
+
},
|
|
406
|
+
"required": false,
|
|
407
|
+
"optional": false,
|
|
408
|
+
"docs": {
|
|
409
|
+
"tags": [],
|
|
410
|
+
"text": "Client custom styling via string"
|
|
411
|
+
},
|
|
412
|
+
"attribute": "client-styling",
|
|
413
|
+
"reflect": false,
|
|
414
|
+
"defaultValue": "''"
|
|
415
|
+
},
|
|
416
|
+
"verifiedIcon": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"mutable": false,
|
|
419
|
+
"complexType": {
|
|
420
|
+
"original": "string",
|
|
421
|
+
"resolved": "string",
|
|
422
|
+
"references": {}
|
|
423
|
+
},
|
|
424
|
+
"required": false,
|
|
425
|
+
"optional": false,
|
|
426
|
+
"docs": {
|
|
427
|
+
"tags": [],
|
|
428
|
+
"text": "For verified status this icon will be displayed"
|
|
429
|
+
},
|
|
430
|
+
"attribute": "verified-icon",
|
|
431
|
+
"reflect": false,
|
|
432
|
+
"defaultValue": "''"
|
|
433
|
+
},
|
|
434
|
+
"failedIcon": {
|
|
435
|
+
"type": "string",
|
|
436
|
+
"mutable": false,
|
|
437
|
+
"complexType": {
|
|
438
|
+
"original": "string",
|
|
439
|
+
"resolved": "string",
|
|
440
|
+
"references": {}
|
|
441
|
+
},
|
|
442
|
+
"required": false,
|
|
443
|
+
"optional": false,
|
|
444
|
+
"docs": {
|
|
445
|
+
"tags": [],
|
|
446
|
+
"text": "For failed status this icon will be displayed"
|
|
447
|
+
},
|
|
448
|
+
"attribute": "failed-icon",
|
|
449
|
+
"reflect": false,
|
|
450
|
+
"defaultValue": "''"
|
|
451
|
+
},
|
|
452
|
+
"defaultIcon": {
|
|
453
|
+
"type": "string",
|
|
454
|
+
"mutable": false,
|
|
455
|
+
"complexType": {
|
|
456
|
+
"original": "string",
|
|
457
|
+
"resolved": "string",
|
|
458
|
+
"references": {}
|
|
459
|
+
},
|
|
460
|
+
"required": false,
|
|
461
|
+
"optional": false,
|
|
462
|
+
"docs": {
|
|
463
|
+
"tags": [],
|
|
464
|
+
"text": "For the default status this icon will be displayed"
|
|
465
|
+
},
|
|
466
|
+
"attribute": "default-icon",
|
|
467
|
+
"reflect": false,
|
|
468
|
+
"defaultValue": "''"
|
|
469
|
+
},
|
|
470
|
+
"clientStylingUrl": {
|
|
471
|
+
"type": "string",
|
|
472
|
+
"mutable": false,
|
|
473
|
+
"complexType": {
|
|
474
|
+
"original": "string",
|
|
475
|
+
"resolved": "string",
|
|
476
|
+
"references": {}
|
|
477
|
+
},
|
|
478
|
+
"required": false,
|
|
479
|
+
"optional": false,
|
|
480
|
+
"docs": {
|
|
481
|
+
"tags": [],
|
|
482
|
+
"text": "Client custom styling via url content"
|
|
483
|
+
},
|
|
484
|
+
"attribute": "client-styling-url",
|
|
485
|
+
"reflect": false,
|
|
486
|
+
"defaultValue": "''"
|
|
487
|
+
}
|
|
488
|
+
};
|
|
347
489
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
:
|
|
360
|
-
h("h2", null, translate('kycTitle', this.language))),
|
|
361
|
-
this.verificationType.length === 0 ?
|
|
362
|
-
h("div", { class: "no-verification-description", style: { padding: '24px', fontSize: '18px' } }, translate('noVerificationRequired', this.language))
|
|
363
|
-
:
|
|
364
|
-
h(Fragment, null,
|
|
365
|
-
h("div", { class: "widget-description" }, translate('kycDescription', this.language)),
|
|
366
|
-
h("div", { class: "verification-types" }, this.verificationType.map((verificationType) => verificationType ? this.renderVerificationTypeBox(verificationType) : null))))));
|
|
490
|
+
static get states() {
|
|
491
|
+
return {
|
|
492
|
+
"verificationType": {},
|
|
493
|
+
"isLoading": {},
|
|
494
|
+
"stylingAppends": {},
|
|
495
|
+
"selectedFile": {},
|
|
496
|
+
"uploadingStatus": {},
|
|
497
|
+
"uploadSizeExceeded": {},
|
|
498
|
+
"selectedOption": {},
|
|
499
|
+
"expandedOnDesktop": {}
|
|
500
|
+
};
|
|
367
501
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
}; }
|
|
374
|
-
static get styleUrls() { return {
|
|
375
|
-
"$": ["player-kyc-verification.css"]
|
|
376
|
-
}; }
|
|
377
|
-
static get properties() { return {
|
|
378
|
-
"userId": {
|
|
379
|
-
"type": "string",
|
|
380
|
-
"mutable": false,
|
|
381
|
-
"complexType": {
|
|
382
|
-
"original": "string",
|
|
383
|
-
"resolved": "string",
|
|
384
|
-
"references": {}
|
|
385
|
-
},
|
|
386
|
-
"required": false,
|
|
387
|
-
"optional": false,
|
|
388
|
-
"docs": {
|
|
389
|
-
"tags": [],
|
|
390
|
-
"text": "The userId"
|
|
391
|
-
},
|
|
392
|
-
"attribute": "user-id",
|
|
393
|
-
"reflect": false,
|
|
394
|
-
"defaultValue": "''"
|
|
395
|
-
},
|
|
396
|
-
"session": {
|
|
397
|
-
"type": "string",
|
|
398
|
-
"mutable": false,
|
|
399
|
-
"complexType": {
|
|
400
|
-
"original": "string",
|
|
401
|
-
"resolved": "string",
|
|
402
|
-
"references": {}
|
|
403
|
-
},
|
|
404
|
-
"required": false,
|
|
405
|
-
"optional": false,
|
|
406
|
-
"docs": {
|
|
407
|
-
"tags": [],
|
|
408
|
-
"text": "The session"
|
|
409
|
-
},
|
|
410
|
-
"attribute": "session",
|
|
411
|
-
"reflect": false,
|
|
412
|
-
"defaultValue": "''"
|
|
413
|
-
},
|
|
414
|
-
"language": {
|
|
415
|
-
"type": "string",
|
|
416
|
-
"mutable": false,
|
|
417
|
-
"complexType": {
|
|
418
|
-
"original": "string",
|
|
419
|
-
"resolved": "string",
|
|
420
|
-
"references": {}
|
|
421
|
-
},
|
|
422
|
-
"required": false,
|
|
423
|
-
"optional": false,
|
|
424
|
-
"docs": {
|
|
425
|
-
"tags": [],
|
|
426
|
-
"text": "The language"
|
|
427
|
-
},
|
|
428
|
-
"attribute": "language",
|
|
429
|
-
"reflect": false
|
|
430
|
-
},
|
|
431
|
-
"endpoint": {
|
|
432
|
-
"type": "string",
|
|
433
|
-
"mutable": false,
|
|
434
|
-
"complexType": {
|
|
435
|
-
"original": "string",
|
|
436
|
-
"resolved": "string",
|
|
437
|
-
"references": {}
|
|
438
|
-
},
|
|
439
|
-
"required": false,
|
|
440
|
-
"optional": false,
|
|
441
|
-
"docs": {
|
|
442
|
-
"tags": [],
|
|
443
|
-
"text": "The NorWAy endpoint"
|
|
444
|
-
},
|
|
445
|
-
"attribute": "endpoint",
|
|
446
|
-
"reflect": false,
|
|
447
|
-
"defaultValue": "''"
|
|
448
|
-
},
|
|
449
|
-
"translationUrl": {
|
|
450
|
-
"type": "string",
|
|
451
|
-
"mutable": false,
|
|
452
|
-
"complexType": {
|
|
453
|
-
"original": "string",
|
|
454
|
-
"resolved": "string",
|
|
455
|
-
"references": {}
|
|
456
|
-
},
|
|
457
|
-
"required": false,
|
|
458
|
-
"optional": false,
|
|
459
|
-
"docs": {
|
|
460
|
-
"tags": [],
|
|
461
|
-
"text": "The translationurl"
|
|
462
|
-
},
|
|
463
|
-
"attribute": "translation-url",
|
|
464
|
-
"reflect": false,
|
|
465
|
-
"defaultValue": "''"
|
|
466
|
-
},
|
|
467
|
-
"clientStyling": {
|
|
468
|
-
"type": "string",
|
|
469
|
-
"mutable": false,
|
|
470
|
-
"complexType": {
|
|
471
|
-
"original": "string",
|
|
472
|
-
"resolved": "string",
|
|
473
|
-
"references": {}
|
|
474
|
-
},
|
|
475
|
-
"required": false,
|
|
476
|
-
"optional": false,
|
|
477
|
-
"docs": {
|
|
478
|
-
"tags": [],
|
|
479
|
-
"text": "Client custom styling via string"
|
|
480
|
-
},
|
|
481
|
-
"attribute": "client-styling",
|
|
482
|
-
"reflect": false,
|
|
483
|
-
"defaultValue": "''"
|
|
484
|
-
},
|
|
485
|
-
"verifiedIcon": {
|
|
486
|
-
"type": "string",
|
|
487
|
-
"mutable": false,
|
|
488
|
-
"complexType": {
|
|
489
|
-
"original": "string",
|
|
490
|
-
"resolved": "string",
|
|
491
|
-
"references": {}
|
|
492
|
-
},
|
|
493
|
-
"required": false,
|
|
494
|
-
"optional": false,
|
|
495
|
-
"docs": {
|
|
496
|
-
"tags": [],
|
|
497
|
-
"text": "For verified status this icon will be displayed"
|
|
498
|
-
},
|
|
499
|
-
"attribute": "verified-icon",
|
|
500
|
-
"reflect": false,
|
|
501
|
-
"defaultValue": "''"
|
|
502
|
-
},
|
|
503
|
-
"failedIcon": {
|
|
504
|
-
"type": "string",
|
|
505
|
-
"mutable": false,
|
|
506
|
-
"complexType": {
|
|
507
|
-
"original": "string",
|
|
508
|
-
"resolved": "string",
|
|
509
|
-
"references": {}
|
|
510
|
-
},
|
|
511
|
-
"required": false,
|
|
512
|
-
"optional": false,
|
|
513
|
-
"docs": {
|
|
514
|
-
"tags": [],
|
|
515
|
-
"text": "For failed status this icon will be displayed"
|
|
516
|
-
},
|
|
517
|
-
"attribute": "failed-icon",
|
|
518
|
-
"reflect": false,
|
|
519
|
-
"defaultValue": "''"
|
|
520
|
-
},
|
|
521
|
-
"defaultIcon": {
|
|
522
|
-
"type": "string",
|
|
523
|
-
"mutable": false,
|
|
524
|
-
"complexType": {
|
|
525
|
-
"original": "string",
|
|
526
|
-
"resolved": "string",
|
|
527
|
-
"references": {}
|
|
528
|
-
},
|
|
529
|
-
"required": false,
|
|
530
|
-
"optional": false,
|
|
531
|
-
"docs": {
|
|
532
|
-
"tags": [],
|
|
533
|
-
"text": "For the default status this icon will be displayed"
|
|
534
|
-
},
|
|
535
|
-
"attribute": "default-icon",
|
|
536
|
-
"reflect": false,
|
|
537
|
-
"defaultValue": "''"
|
|
538
|
-
},
|
|
539
|
-
"clientStylingUrl": {
|
|
540
|
-
"type": "string",
|
|
541
|
-
"mutable": false,
|
|
542
|
-
"complexType": {
|
|
543
|
-
"original": "string",
|
|
544
|
-
"resolved": "string",
|
|
545
|
-
"references": {}
|
|
546
|
-
},
|
|
547
|
-
"required": false,
|
|
548
|
-
"optional": false,
|
|
549
|
-
"docs": {
|
|
550
|
-
"tags": [],
|
|
551
|
-
"text": "Client custom styling via url content"
|
|
552
|
-
},
|
|
553
|
-
"attribute": "client-styling-url",
|
|
554
|
-
"reflect": false,
|
|
555
|
-
"defaultValue": "''"
|
|
502
|
+
static get watchers() {
|
|
503
|
+
return [{
|
|
504
|
+
"propName": "translationUrl",
|
|
505
|
+
"methodName": "handleNewTranslations"
|
|
506
|
+
}];
|
|
556
507
|
}
|
|
557
|
-
}; }
|
|
558
|
-
static get states() { return {
|
|
559
|
-
"verificationType": {},
|
|
560
|
-
"isLoading": {},
|
|
561
|
-
"stylingAppends": {},
|
|
562
|
-
"selectedFile": {},
|
|
563
|
-
"uploadingStatus": {},
|
|
564
|
-
"uploadSizeExceeded": {},
|
|
565
|
-
"selectedOption": {},
|
|
566
|
-
"expandedOnDesktop": {}
|
|
567
|
-
}; }
|
|
568
|
-
static get watchers() { return [{
|
|
569
|
-
"propName": "translationUrl",
|
|
570
|
-
"methodName": "handleNewTranslations"
|
|
571
|
-
}]; }
|
|
572
508
|
}
|