@everymatrix/player-kyc-verification 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-ff559e5a.js +1249 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/player-kyc-verification.cjs.entry.js +564 -0
- package/dist/cjs/player-kyc-verification.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/player-kyc-verification/index.js +1 -0
- package/dist/collection/components/player-kyc-verification/player-kyc-verification.css +173 -0
- package/dist/collection/components/player-kyc-verification/player-kyc-verification.js +508 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +242 -0
- package/dist/collection/utils/utils.js +30 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-065b5928.js +1222 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/player-kyc-verification.entry.js +560 -0
- package/dist/esm/player-kyc-verification.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/player-kyc-verification/index.esm.js +0 -0
- package/dist/player-kyc-verification/p-0635ee37.entry.js +1 -0
- package/dist/player-kyc-verification/p-72182c55.js +2 -0
- package/dist/player-kyc-verification/p-e1255160.js +1 -0
- package/dist/player-kyc-verification/player-kyc-verification.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-kyc-verification/.stencil/packages/stencil/player-kyc-verification/stencil.config.d.ts +2 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/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 +75 -0
- package/dist/types/components.d.ts +117 -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 +14 -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,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-ff559e5a.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
const defineCustomElements = async (win, options) => {
|
|
9
|
+
if (typeof window === 'undefined') return undefined;
|
|
10
|
+
await appGlobals.globalScripts();
|
|
11
|
+
return index.bootstrapLazy([["player-kyc-verification.cjs",[[1,"player-kyc-verification",{"userId":[1,"user-id"],"session":[1],"language":[1],"endpoint":[1],"translationUrl":[1,"translation-url"],"clientStyling":[1,"client-styling"],"verifiedIcon":[1,"verified-icon"],"failedIcon":[1,"failed-icon"],"defaultIcon":[1,"default-icon"],"clientStylingUrl":[1,"client-styling-url"],"verificationType":[32],"isLoading":[32],"stylingAppends":[32],"selectedFile":[32],"uploadingStatus":[32],"uploadSizeExceeded":[32],"selectedOption":[32],"expandedOnDesktop":[32]},null,{"translationUrl":["handleNewTranslations"]}]]]], options);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.setNonce = index.setNonce;
|
|
15
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-ff559e5a.js');
|
|
6
|
+
|
|
7
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
+
const SUPPORTED_LANGUAGES = ['de', 'en', 'hr'];
|
|
9
|
+
let TRANSLATIONS = {
|
|
10
|
+
en: {
|
|
11
|
+
loading: 'Loading, please wait ...',
|
|
12
|
+
noVerificationRequired: 'There is no verification required for your account at this moment.',
|
|
13
|
+
verificationComplete: 'Verification complete',
|
|
14
|
+
verificationFailed: 'Verification failed',
|
|
15
|
+
verificationExpired: 'Verification expired',
|
|
16
|
+
fileSizeExceeded: 'Maximum file size exceeded. Max file size is: 50mb',
|
|
17
|
+
uploading: 'Uploading ... ',
|
|
18
|
+
successUpload: 'Your document has been uploaded and it will be reviewed shortly',
|
|
19
|
+
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
20
|
+
failedUpload: 'Upload failed please try again',
|
|
21
|
+
chooseDocument: 'Choose Document',
|
|
22
|
+
kycTitle: 'Account Verification',
|
|
23
|
+
kycDescription: 'We require some documents to protect your account and to comply with legal and license requirements.',
|
|
24
|
+
download: 'Download',
|
|
25
|
+
Age: 'Age',
|
|
26
|
+
Aml: 'AML',
|
|
27
|
+
Documents: 'Documents',
|
|
28
|
+
PEP: 'PEP',
|
|
29
|
+
Sanction: 'Sanctions',
|
|
30
|
+
Recheck: 'Recheck',
|
|
31
|
+
Biometric: 'Biometric',
|
|
32
|
+
ProofOfAddress: 'Proof of Address',
|
|
33
|
+
SourceOfWealth: 'Source of Wealth',
|
|
34
|
+
SocialMedia: 'Social Media',
|
|
35
|
+
ProofOfPayment: 'Proof of Payment',
|
|
36
|
+
},
|
|
37
|
+
de: {
|
|
38
|
+
loading: 'Loading, please wait ...',
|
|
39
|
+
noVerificationRequired: 'There is no verification required for your account at this moment.',
|
|
40
|
+
verificationComplete: 'Verification complete',
|
|
41
|
+
verificationFailed: 'Verification failed',
|
|
42
|
+
verificationExpired: 'Verification expired',
|
|
43
|
+
fileSizeExceeded: 'Maximum file size exceeded. Max file size is: 50mb',
|
|
44
|
+
uploading: 'Uploading ... ',
|
|
45
|
+
successUpload: 'Your document has been uploaded and it will be reviewed shortly',
|
|
46
|
+
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
47
|
+
failedUpload: 'Upload failed please try again',
|
|
48
|
+
chooseDocument: 'Choose Document',
|
|
49
|
+
kycTitle: 'Account-Verifizierung',
|
|
50
|
+
kycDescription: 'Wir benötigen einige Dokumente, um Ihr Konto zu schützen und den rechtlichen und Lizenzanforderungen zu entsprechen.',
|
|
51
|
+
download: 'Download',
|
|
52
|
+
Age: 'Age',
|
|
53
|
+
Aml: 'AML',
|
|
54
|
+
Documents: 'Documents',
|
|
55
|
+
PEP: 'PEP',
|
|
56
|
+
Sanction: 'Sanctions',
|
|
57
|
+
Biometric: 'Biometric',
|
|
58
|
+
Recheck: 'Recheck',
|
|
59
|
+
ProofOfAddress: 'Proof of Address',
|
|
60
|
+
SourceOfWealth: 'Source of Wealth',
|
|
61
|
+
SocialMedia: 'Social Media',
|
|
62
|
+
ProofOfPayment: 'Proof of Payment',
|
|
63
|
+
},
|
|
64
|
+
ro: {
|
|
65
|
+
loading: 'Loading, please wait ...',
|
|
66
|
+
noVerificationRequired: 'There is no verification required for your account at this moment.',
|
|
67
|
+
verificationComplete: 'Verification complete',
|
|
68
|
+
verificationFailed: 'Verification failed',
|
|
69
|
+
verificationExpired: 'Verification expired',
|
|
70
|
+
fileSizeExceeded: 'Maximum file size exceeded. Max file size is: 50mb',
|
|
71
|
+
uploading: 'Uploading ... ',
|
|
72
|
+
successUpload: 'Your document has been uploaded and it will be reviewed shortly',
|
|
73
|
+
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
74
|
+
failedUpload: 'Upload failed please try again',
|
|
75
|
+
chooseDocument: 'Choose Document',
|
|
76
|
+
kycTitle: 'Verificarea contului',
|
|
77
|
+
kycDescription: 'Avem nevoie de câteva documente pentru a proteja contul dvs. și pentru a respecta cerințele legale și de licență.',
|
|
78
|
+
download: 'Download',
|
|
79
|
+
Age: 'Age',
|
|
80
|
+
Aml: 'AML',
|
|
81
|
+
Documents: 'Documents',
|
|
82
|
+
PEP: 'PEP',
|
|
83
|
+
Sanction: 'Sanctions',
|
|
84
|
+
Biometric: 'Biometric',
|
|
85
|
+
Recheck: 'Recheck',
|
|
86
|
+
ProofOfAddress: 'Proof of Address',
|
|
87
|
+
SourceOfWealth: 'Source of Wealth',
|
|
88
|
+
SocialMedia: 'Social Media',
|
|
89
|
+
ProofOfPayment: 'Proof of Payment',
|
|
90
|
+
},
|
|
91
|
+
fr: {
|
|
92
|
+
loading: 'Loading, please wait ...',
|
|
93
|
+
noVerificationRequired: 'There is no verification required for your account at this moment.',
|
|
94
|
+
verificationComplete: 'Verification complete',
|
|
95
|
+
verificationFailed: 'Verification failed',
|
|
96
|
+
verificationExpired: 'Verification expired',
|
|
97
|
+
fileSizeExceeded: 'Maximum file size exceeded. Max file size is: 50mb',
|
|
98
|
+
uploading: 'Uploading ... ',
|
|
99
|
+
successUpload: 'Your document has been uploaded and it will be reviewed shortly',
|
|
100
|
+
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
101
|
+
failedUpload: 'Upload failed please try again',
|
|
102
|
+
chooseDocument: 'Choose Document',
|
|
103
|
+
kycTitle: 'Vérification de compte',
|
|
104
|
+
kycDescription: 'Nous avons besoin de certains documents pour protéger votre compte et pour nous conformer aux exigences légales et de licence.',
|
|
105
|
+
download: 'Download',
|
|
106
|
+
Age: 'Age',
|
|
107
|
+
Aml: 'AML',
|
|
108
|
+
Documents: 'Documents',
|
|
109
|
+
PEP: 'PEP',
|
|
110
|
+
Sanction: 'Sanctions',
|
|
111
|
+
Biometric: 'Biometric',
|
|
112
|
+
Recheck: 'Recheck',
|
|
113
|
+
ProofOfAddress: 'Proof of Address',
|
|
114
|
+
SourceOfWealth: 'Source of Wealth',
|
|
115
|
+
SocialMedia: 'Social Media',
|
|
116
|
+
ProofOfPayment: 'Proof of Payment',
|
|
117
|
+
},
|
|
118
|
+
ar: {
|
|
119
|
+
loading: 'Loading, please wait ...',
|
|
120
|
+
noVerificationRequired: 'There is no verification required for your account at this moment.',
|
|
121
|
+
verificationComplete: 'Verification complete',
|
|
122
|
+
verificationFailed: 'Verification failed',
|
|
123
|
+
verificationExpired: 'Verification expired',
|
|
124
|
+
fileSizeExceeded: 'Maximum file size exceeded. Max file size is: 50mb',
|
|
125
|
+
uploading: 'Uploading ... ',
|
|
126
|
+
successUpload: 'Your document has been uploaded and it will be reviewed shortly',
|
|
127
|
+
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
128
|
+
failedUpload: 'Upload failed please try again',
|
|
129
|
+
chooseDocument: 'Choose Document',
|
|
130
|
+
kycTitle: 'التحقق من الحساب',
|
|
131
|
+
kycDescription: 'نحتاج إلى بعض الوثائق لحماية حسابك والامتثال للمتطلبات القانونية والترخيص.',
|
|
132
|
+
download: 'Download',
|
|
133
|
+
Age: 'Age',
|
|
134
|
+
Aml: 'AML',
|
|
135
|
+
Documents: 'Documents',
|
|
136
|
+
PEP: 'PEP',
|
|
137
|
+
Sanction: 'Sanctions',
|
|
138
|
+
Biometric: 'Biometric',
|
|
139
|
+
Recheck: 'Recheck',
|
|
140
|
+
ProofOfAddress: 'Proof of Address',
|
|
141
|
+
SourceOfWealth: 'Source of Wealth',
|
|
142
|
+
SocialMedia: 'Social Media',
|
|
143
|
+
ProofOfPayment: 'Proof of Payment',
|
|
144
|
+
},
|
|
145
|
+
hr: {
|
|
146
|
+
loading: 'Učitavanje, molimo pričekajte ...',
|
|
147
|
+
noVerificationRequired: 'Trenutačno nije potrebna provjera vašeg računa.',
|
|
148
|
+
verificationComplete: 'Provjera dovršena',
|
|
149
|
+
verificationFailed: 'Provjera nije uspjela',
|
|
150
|
+
verificationExpired: 'Provjera je istekla',
|
|
151
|
+
fileSizeExceeded: 'Premašena je maksimalna veličina datoteke. Maksimalna veličina datoteke je: 50mb',
|
|
152
|
+
uploading: 'Prijenos…',
|
|
153
|
+
successUpload: 'Vaš dokument je učitan i uskoro će biti pregledan',
|
|
154
|
+
successUploadMultipleFiles: 'Vaši su dokumenti učitani i uskoro će biti pregledani',
|
|
155
|
+
failedUpload: 'Prijenos nije uspio pokušajte ponovo',
|
|
156
|
+
chooseDocument: 'Odaberite Dokument',
|
|
157
|
+
kycTitle: 'Verifikacija računa',
|
|
158
|
+
kycDescription: 'Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva.',
|
|
159
|
+
download: 'Download',
|
|
160
|
+
Age: 'Dob',
|
|
161
|
+
Aml: 'AML',
|
|
162
|
+
Documents: 'Dokumenti',
|
|
163
|
+
PEP: 'Politički izložena osoba',
|
|
164
|
+
Sanction: 'Sankcija',
|
|
165
|
+
Biometric: 'Verifikacija',
|
|
166
|
+
Recheck: 'Ponovna provjera',
|
|
167
|
+
ProofOfAddress: 'Potvrda adrese',
|
|
168
|
+
SourceOfWealth: 'Izvor sredstava',
|
|
169
|
+
SocialMedia: 'Društvene mreže',
|
|
170
|
+
ProofOfPayment: 'Platna metoda',
|
|
171
|
+
},
|
|
172
|
+
'pt-br': {
|
|
173
|
+
Age: 'Age',
|
|
174
|
+
Aml: 'AML',
|
|
175
|
+
Documents: 'Documents',
|
|
176
|
+
PEP: 'PEP',
|
|
177
|
+
Sanction: 'Sanctions',
|
|
178
|
+
Biometric: 'Biometric',
|
|
179
|
+
Recheck: 'Recheck',
|
|
180
|
+
'Loading': 'Carregando, espere por favor…',
|
|
181
|
+
'noVerificationRequired': 'Não há necessidade de verificação para sua conta no momento',
|
|
182
|
+
'verificationComplete': 'Verificação completa',
|
|
183
|
+
'verificationFailed': 'Verificação de falha',
|
|
184
|
+
'verificationExpired': 'A verificação expirou',
|
|
185
|
+
'fileSizeExceeded': 'Tamanho máximo do arquivo excedido. O tamanho máximo do arquivo é: 50 MB',
|
|
186
|
+
'uploading': 'Carregando...',
|
|
187
|
+
'successUpload': 'Seu documento foi carregado e será analisado em breve',
|
|
188
|
+
'successUploadMultipleFiles': 'Seus documentos foram enviados e serão revisados em breve',
|
|
189
|
+
'failedUpload': 'Falha no upload do arquivo, tente novamente',
|
|
190
|
+
'chooseDocument': 'Escolha um arquivo',
|
|
191
|
+
'download': 'Download',
|
|
192
|
+
ProofOfAddress: 'Proof of Address',
|
|
193
|
+
SourceOfWealth: 'Source of Wealth',
|
|
194
|
+
SocialMedia: 'Social Media',
|
|
195
|
+
ProofOfPayment: 'Proof of Payment',
|
|
196
|
+
},
|
|
197
|
+
'es-mx': {
|
|
198
|
+
Age: 'Age',
|
|
199
|
+
Aml: 'AML',
|
|
200
|
+
Documents: 'Documents',
|
|
201
|
+
PEP: 'PEP',
|
|
202
|
+
Sanction: 'Sanctions',
|
|
203
|
+
Biometric: 'Biometric',
|
|
204
|
+
Recheck: 'Recheck',
|
|
205
|
+
'Loading': 'Cargando, espere por favor…',
|
|
206
|
+
'noVerificationRequired': 'No hay verificación requerida para su cuenta al momento',
|
|
207
|
+
'verificationComplete': 'Verificación completa',
|
|
208
|
+
'verificationFailed': 'Verificación fallo',
|
|
209
|
+
'verificationExpired': 'Verificación expiro',
|
|
210
|
+
'fileSizeExceeded': 'Tamaño máximo de archivo se excedió. El tamaño máximo del archivo es: 50mb',
|
|
211
|
+
'uploading': 'Cargando ...',
|
|
212
|
+
'successUpload': 'Su documento ha sido cargado y será revisado en breve',
|
|
213
|
+
'successUploadMultipleFiles': 'Sus documento han sido cargados y serán revisado en breve',
|
|
214
|
+
'failedUpload': 'La carga del archivo falló, por favor intente de nuevo',
|
|
215
|
+
'chooseDocument': 'Elija un archivo',
|
|
216
|
+
'download': 'Download',
|
|
217
|
+
ProofOfAddress: 'Proof of Address',
|
|
218
|
+
SourceOfWealth: 'Source of Wealth',
|
|
219
|
+
SocialMedia: 'Social Media',
|
|
220
|
+
ProofOfPayment: 'Proof of Payment',
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
const getTranslations = (url) => {
|
|
224
|
+
// fetch url, get the data, replace the TRANSLATIONS content
|
|
225
|
+
return new Promise((resolve) => {
|
|
226
|
+
fetch(url)
|
|
227
|
+
.then((res) => res.json())
|
|
228
|
+
.then((data) => {
|
|
229
|
+
Object.keys(data).forEach((item) => {
|
|
230
|
+
for (let key in data[item]) {
|
|
231
|
+
TRANSLATIONS[item][key] = data[item][key];
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
resolve(true);
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
const translate = (key, customLang, values) => {
|
|
239
|
+
const lang = customLang;
|
|
240
|
+
let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
241
|
+
if (values !== undefined) {
|
|
242
|
+
for (const [key, value] of Object.entries(values.values)) {
|
|
243
|
+
const regex = new RegExp(`{${key}}`, 'g');
|
|
244
|
+
translation = translation.replace(regex, value);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return translation;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* @name isMobile
|
|
252
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
253
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
254
|
+
* @returns {Boolean} true or false
|
|
255
|
+
*/
|
|
256
|
+
const isMobile = (userAgent) => {
|
|
257
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
258
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
259
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
260
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
const playerKycVerificationCss = ":host {\n font-family: inherit;\n}\n\nbutton, select {\n font-family: inherit;\n}\n\n.ModalContainer {\n container-type: inline-size;\n}\n\n.player-kyc-verification-widget {\n padding: 20px;\n align-items: center;\n}\n.player-kyc-verification-widget h2 {\n margin: 15px;\n}\n.player-kyc-verification-widget .widget-description {\n margin: 24px 0px;\n}\n.player-kyc-verification-widget .verification-types {\n width: 100%;\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 34px;\n}\n.player-kyc-verification-widget .verification-types .verification-box {\n transition: height 0.3s, border-color 0.3s;\n border: solid 1px var(--emfe-w-color-gray-100, #E6E6E6);\n border-radius: 2px;\n display: flex;\n flex-direction: column;\n padding: 0px 14px;\n border-width: 2px 2px 8px 2px;\n align-self: start;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box {\n flex-shrink: 0;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header {\n display: flex;\n padding: 14px 0px;\n justify-content: space-between;\n cursor: pointer;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon {\n flex-grow: 1;\n display: flex;\n justify-content: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon svg {\n height: 24px;\n width: 24px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-title {\n flex-grow: 1;\n font-size: 18px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon {\n flex-grow: 10;\n width: 14px;\n height: 14px;\n display: flex;\n justify-content: flex-end;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon svg {\n width: 20px;\n height: 22px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content {\n display: none;\n flex-grow: 1;\n border-top: 0.4px solid var(--emfe-w-color-gray-100, #E6E6E6);\n padding: 10px 0px;\n flex-grow: 1;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .upload-status {\n text-align: center;\n padding: 20px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown {\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown svg {\n margin: 16px;\n cursor: pointer;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .nice-select {\n cursor: pointer;\n width: 100%;\n height: 30px;\n padding: 4px 14px;\n font-size: 14px;\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n border-radius: 2px;\n background-color: var(--emfe-w-color-white, #FFFFFF);\n color: #333;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n padding-right: 30px;\n background-repeat: no-repeat;\n background-position: right 10px center;\n background-image: url('data:image/svg+xml;charset=utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><path fill=\"%23333\" d=\"M10 18.4l-6.5-6.5h13z\"/><path fill=\"%23333\" d=\"M10 1.6l6.5 6.5H3.5z\"/></svg>');\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .sample-file .download-button {\n font-family: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--emfe-w-color-white, #FFFFFF);\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n border: none;\n font-size: 16px;\n padding: 10px 0px 0px 0px;\n cursor: pointer;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .sample-file .download-button svg {\n margin-right: 10px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n min-height: 120px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.failed {\n border-color: var(--emfe-w-color-error var(--emfe-w-color-red, #FD2839));\n}\n.player-kyc-verification-widget .verification-types .verification-box.success {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content .verification-status {\n margin: 12px 0px 16px;\n font-size: 18px;\n text-align: center;\n color: var(--emfe-w-color-gray-150, #828282);\n}\n\n.MenuReturnButton {\n display: flex;\n align-items: center;\n}\n\n@container (min-width: 700px) {\n .player-kyc-verification-widget {\n padding: 100px 60px;\n }\n}\n@container (max-width: 700px) {\n .player-kyc-verification-widget h2 {\n margin: 15px;\n text-align: center;\n }\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: 1fr;\n grid-gap: 16px;\n }\n}\n@container (max-width: 1240px) and (min-width: 701px) {\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: repeat(2, 1fr);\n }\n}";
|
|
264
|
+
const PlayerKycVerificationStyle0 = playerKycVerificationCss;
|
|
265
|
+
|
|
266
|
+
const PlayerKycVerificationWidget = class {
|
|
267
|
+
constructor(hostRef) {
|
|
268
|
+
index.registerInstance(this, hostRef);
|
|
269
|
+
this.scriptInjected = false;
|
|
270
|
+
this.MAX_UPLOAD_SIZE = 50000000;
|
|
271
|
+
this.userAgent = window.navigator.userAgent;
|
|
272
|
+
this.isMobile = isMobile(this.userAgent);
|
|
273
|
+
this.setClientStyling = () => {
|
|
274
|
+
let sheet = document.createElement('style');
|
|
275
|
+
sheet.innerHTML = this.clientStyling;
|
|
276
|
+
this.stylingContainer.prepend(sheet);
|
|
277
|
+
};
|
|
278
|
+
this.setClientStylingURL = () => {
|
|
279
|
+
let url = new URL(this.clientStylingUrl);
|
|
280
|
+
let cssFile = document.createElement('style');
|
|
281
|
+
fetch(url.href)
|
|
282
|
+
.then((res) => res.text())
|
|
283
|
+
.then((data) => {
|
|
284
|
+
cssFile.innerHTML = data;
|
|
285
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
286
|
+
})
|
|
287
|
+
.catch((err) => {
|
|
288
|
+
console.log('error ', err);
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
this.handleToggleScreen = () => {
|
|
292
|
+
this.toggleScreen(this.isMobile);
|
|
293
|
+
};
|
|
294
|
+
this.userId = '';
|
|
295
|
+
this.session = '';
|
|
296
|
+
this.language = undefined;
|
|
297
|
+
this.endpoint = '';
|
|
298
|
+
this.translationUrl = '';
|
|
299
|
+
this.clientStyling = '';
|
|
300
|
+
this.verifiedIcon = '';
|
|
301
|
+
this.failedIcon = '';
|
|
302
|
+
this.defaultIcon = '';
|
|
303
|
+
this.clientStylingUrl = '';
|
|
304
|
+
this.verificationType = [];
|
|
305
|
+
this.isLoading = false;
|
|
306
|
+
this.stylingAppends = false;
|
|
307
|
+
this.selectedFile = null;
|
|
308
|
+
this.uploadingStatus = undefined;
|
|
309
|
+
this.uploadSizeExceeded = false;
|
|
310
|
+
this.selectedOption = undefined;
|
|
311
|
+
this.expandedOnDesktop = false;
|
|
312
|
+
}
|
|
313
|
+
handleNewTranslations() {
|
|
314
|
+
this.isLoading = true;
|
|
315
|
+
getTranslations(this.translationUrl).then(() => {
|
|
316
|
+
this.isLoading = false;
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
async componentWillLoad() {
|
|
320
|
+
if (this.translationUrl.length > 2) {
|
|
321
|
+
await getTranslations(this.translationUrl);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
componentDidRender() {
|
|
325
|
+
// start custom styling area
|
|
326
|
+
if (!this.stylingAppends && this.stylingContainer) {
|
|
327
|
+
if (this.clientStyling)
|
|
328
|
+
this.setClientStyling();
|
|
329
|
+
if (this.clientStylingUrl)
|
|
330
|
+
this.setClientStylingURL();
|
|
331
|
+
this.stylingAppends = true;
|
|
332
|
+
}
|
|
333
|
+
// end custom styling area
|
|
334
|
+
}
|
|
335
|
+
async componentDidLoad() {
|
|
336
|
+
if (window.innerWidth > 700) {
|
|
337
|
+
this.expandedOnDesktop = true;
|
|
338
|
+
}
|
|
339
|
+
try {
|
|
340
|
+
let url = new URL(`${this.endpoint}/v2/player/${this.userId}/verification/GetKYCCustomerStatus`);
|
|
341
|
+
const options = {
|
|
342
|
+
method: 'POST',
|
|
343
|
+
headers: {
|
|
344
|
+
'X-SessionId': this.session,
|
|
345
|
+
'Content-Type': 'application/json',
|
|
346
|
+
},
|
|
347
|
+
body: JSON.stringify({})
|
|
348
|
+
};
|
|
349
|
+
fetch(url.href, options)
|
|
350
|
+
.then((res) => {
|
|
351
|
+
if (res.status === 200) {
|
|
352
|
+
return res.json();
|
|
353
|
+
}
|
|
354
|
+
else {
|
|
355
|
+
throw new Error("HTTP status " + res.status);
|
|
356
|
+
}
|
|
357
|
+
})
|
|
358
|
+
.then((data) => {
|
|
359
|
+
this.verificationType = data.verifications;
|
|
360
|
+
})
|
|
361
|
+
.catch((err) => {
|
|
362
|
+
// Handle any errors
|
|
363
|
+
console.error(err);
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
catch (error) {
|
|
367
|
+
console.error('Error fetching verification types:', error);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
handleOptionChange(event, verificationTypeId) {
|
|
371
|
+
const target = event.target;
|
|
372
|
+
this.selectedOption = target.value;
|
|
373
|
+
this.verificationType = this.verificationType.map((type) => {
|
|
374
|
+
if (type.type === verificationTypeId) {
|
|
375
|
+
type.optionChosen = target.value;
|
|
376
|
+
}
|
|
377
|
+
return type;
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
handleDocumentsStatus(verificationTypeId, documentsStatus, documentCode) {
|
|
381
|
+
this.verificationType = this.verificationType.map((vType) => {
|
|
382
|
+
if (vType.type === verificationTypeId) {
|
|
383
|
+
const document = vType.documents.find((doc) => doc.code === documentCode);
|
|
384
|
+
if (document) {
|
|
385
|
+
document.statusUploaded = documentsStatus;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
return vType;
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
downloadPDF(pdfUrl) {
|
|
392
|
+
const link = document.createElement('a');
|
|
393
|
+
link.href = pdfUrl;
|
|
394
|
+
link.download = 'file.pdf';
|
|
395
|
+
link.target = '_blank';
|
|
396
|
+
link.dispatchEvent(new MouseEvent('click'));
|
|
397
|
+
}
|
|
398
|
+
toggleVerificationType(verificationTypeId, verificationTypeFlowInfoType) {
|
|
399
|
+
this.expandedOnDesktop = false;
|
|
400
|
+
this.verificationType = this.verificationType.map((type) => {
|
|
401
|
+
var _a;
|
|
402
|
+
if (type.type === verificationTypeId && ((_a = type.flowInfo) === null || _a === void 0 ? void 0 : _a.type) == verificationTypeFlowInfoType) {
|
|
403
|
+
type.expanded = !type.expanded;
|
|
404
|
+
}
|
|
405
|
+
return type;
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
toggleScreen(isMobile) {
|
|
409
|
+
window.postMessage({ type: 'PlayerAccountMenuActive', isMobile }, window.location.href);
|
|
410
|
+
}
|
|
411
|
+
checkFileSize(file) {
|
|
412
|
+
let size = 0;
|
|
413
|
+
Object.keys(file).forEach(element => {
|
|
414
|
+
size += file[element].size;
|
|
415
|
+
});
|
|
416
|
+
return size <= this.MAX_UPLOAD_SIZE;
|
|
417
|
+
}
|
|
418
|
+
handleFileSelection(file, documentType, verificationTypeId) {
|
|
419
|
+
if (file && file.length > 0) {
|
|
420
|
+
this.selectedFile = file;
|
|
421
|
+
if (!this.checkFileSize(this.selectedFile)) {
|
|
422
|
+
console.error(translate('fileSizeExceeded', this.language));
|
|
423
|
+
this.uploadingStatus = translate('fileSizeExceeded', this.language);
|
|
424
|
+
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
425
|
+
this.uploadSizeExceeded = true;
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
const uploadOptions = {
|
|
429
|
+
method: 'POST',
|
|
430
|
+
headers: {
|
|
431
|
+
'Content-Type': 'application/json',
|
|
432
|
+
'X-SessionId': this.session,
|
|
433
|
+
},
|
|
434
|
+
body: JSON.stringify({ DocumentCode: documentType }),
|
|
435
|
+
};
|
|
436
|
+
fetch(`${this.endpoint}/v1/player/${this.userId}/verification/GetKYCVerificationDocumentUploadUrl`, uploadOptions)
|
|
437
|
+
.then(response => {
|
|
438
|
+
if (response.ok) {
|
|
439
|
+
this.uploadingStatus = translate('uploading', this.language);
|
|
440
|
+
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
441
|
+
return response.json();
|
|
442
|
+
}
|
|
443
|
+
}).then((data) => {
|
|
444
|
+
const formData = new FormData();
|
|
445
|
+
formData.append(documentType, this.selectedFile[0]);
|
|
446
|
+
fetch(data.Url, { method: "POST", body: formData })
|
|
447
|
+
.then(res => {
|
|
448
|
+
if (res.ok) {
|
|
449
|
+
if (this.selectedFile.length > 1) {
|
|
450
|
+
this.uploadingStatus = translate('successUploadMultipleFiles', this.language);
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
this.uploadingStatus = translate('successUpload', this.language);
|
|
454
|
+
}
|
|
455
|
+
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
this.uploadingStatus = translate('failedUpload', this.language);
|
|
459
|
+
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
460
|
+
console.error('File upload error:', res.status);
|
|
461
|
+
}
|
|
462
|
+
})
|
|
463
|
+
.catch(error => {
|
|
464
|
+
console.error('File upload error:', error);
|
|
465
|
+
});
|
|
466
|
+
})
|
|
467
|
+
.catch(error => {
|
|
468
|
+
console.error('File upload error:', error);
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
importScript(url) {
|
|
474
|
+
return new Promise((resolve, reject) => {
|
|
475
|
+
fetch(url)
|
|
476
|
+
.then((res) => res.text())
|
|
477
|
+
.then((res) => {
|
|
478
|
+
const scriptFunction = new Function(res);
|
|
479
|
+
scriptFunction();
|
|
480
|
+
if (this.scriptInjected) {
|
|
481
|
+
resolve(true);
|
|
482
|
+
}
|
|
483
|
+
else {
|
|
484
|
+
const scriptElement = document.createElement('script');
|
|
485
|
+
scriptElement.src = 'https://test.insic.de/frontend3/static/js/avs-loader.min.js';
|
|
486
|
+
document.head.appendChild(scriptElement);
|
|
487
|
+
this.scriptInjected = true;
|
|
488
|
+
resolve(true);
|
|
489
|
+
}
|
|
490
|
+
})
|
|
491
|
+
.catch(error => {
|
|
492
|
+
reject(error);
|
|
493
|
+
});
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
isStatusUploaded(document) {
|
|
497
|
+
if (document && document.status === 'Uploaded')
|
|
498
|
+
return true;
|
|
499
|
+
return false;
|
|
500
|
+
}
|
|
501
|
+
renderVerificationTypeBox(verificationType) {
|
|
502
|
+
if (this.expandedOnDesktop) {
|
|
503
|
+
verificationType.expanded = true;
|
|
504
|
+
}
|
|
505
|
+
let expanded = verificationType.expanded;
|
|
506
|
+
let name = verificationType.type.trim();
|
|
507
|
+
let optionChosen = verificationType.optionChosen;
|
|
508
|
+
let status = verificationType.status;
|
|
509
|
+
let documents = verificationType.documents;
|
|
510
|
+
let flowInfo = verificationType.flowInfo;
|
|
511
|
+
const isVerified = status === 'Verified';
|
|
512
|
+
const isFailedOrExpired = status === 'Failed' || status === 'Expired';
|
|
513
|
+
return (index.h("div", { class: `verification-box ${expanded ? 'expanded' : ''} ${isFailedOrExpired ? 'failed' : ''} ${isVerified ? 'success' : ''}` }, index.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); } }, index.h("div", { class: "box-icon" }, isVerified ? (index.h("div", null, this.verifiedIcon ? (index.h("img", { class: "CustomVerifiedIcon", src: this.verifiedIcon, alt: "" })) : (index.h("svg", { width: "100", height: "100", viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg" }, index.h("circle", { cx: "50", cy: "50", r: "40", fill: "#388D79" }), index.h("circle", { cx: "50", cy: "50", r: "34", fill: "none", stroke: "#fff", "stroke-width": "12px" }), index.h("polyline", { points: "30,50 45,63 70,35", fill: "none", stroke: "#fff", "stroke-width": "8px" }))))) : (isFailedOrExpired ? (index.h("div", null, this.failedIcon ? (index.h("img", { class: "CustomFailedIcon", src: this.failedIcon, alt: "" })) : (index.h("svg", { width: "100", height: "100", viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg" }, index.h("circle", { cx: "50", cy: "50", r: "40", fill: "red" }), index.h("line", { x1: "30", y1: "30", x2: "70", y2: "70", stroke: "#fff", "stroke-width": "10px" }), index.h("line", { x1: "30", y1: "70", x2: "70", y2: "30", stroke: "#fff", "stroke-width": "10px" }))))) : (index.h("div", null, this.defaultIcon ? (index.h("img", { class: "CustomDefaultIcon", src: this.defaultIcon, alt: "" })) : (index.h("svg", { width: "800px", height: "800px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.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" }), index.h("path", { d: "M9 13H15", stroke: "#000000", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M9 17H12", stroke: "#000000", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M14 2V6C14 7.10457 14.8954 8 16 8H20", stroke: "#000000", "stroke-width": "2", "stroke-linejoin": "round" }))))))), index.h("div", { class: "box-title" }, translate(name, this.language)), index.h("div", { class: "chevron-icon" }, index.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" }, index.h("path", { d: expanded ? 'M6 15l6-6 6 6' : 'M6 9l6 6 6-6' })))), expanded ? (this.renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired)) :
|
|
514
|
+
(index.h("div", { class: "box box-content" }, index.h("div", { id: "__avs-wrapper" })))));
|
|
515
|
+
}
|
|
516
|
+
renderDocumentsActions(selectedDocument, optionChosen, verificationType) {
|
|
517
|
+
return (index.h("div", null, this.isStatusUploaded(selectedDocument) ? (index.h("div", { class: "upload-status" }, translate('uploaded', this.language))) :
|
|
518
|
+
(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded) ? (index.h("div", { class: "upload-status" }, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded)) : (index.h("div", { class: "documents-action" }, index.h("div", { class: "sample-file" }, (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleType) === "FileDownload" ? (index.h("button", { class: "download-button", onClick: () => this.downloadPDF(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleUrl) }, index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.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))" }), index.h("path", { d: "M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" })), index.h("span", null, translate('download', this.language)))) : null), index.h("div", { class: "upload-button" }, optionChosen ? (index.h("label", null, index.h("input", { type: "file", accept: "*", onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }), index.h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" }, index.h("circle", { cx: "50", cy: "50", r: "40", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }), index.h("line", { x1: "30", y1: "50", x2: "70", y2: "50", stroke: "white", "stroke-width": "6" }), index.h("line", { x1: "50", y1: "30", x2: "50", y2: "70", stroke: "white", "stroke-width": "6" })))) : null)))));
|
|
519
|
+
}
|
|
520
|
+
;
|
|
521
|
+
renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired) {
|
|
522
|
+
if ((flowInfo === null || flowInfo === void 0 ? void 0 : flowInfo.type) === 'Widget') {
|
|
523
|
+
return (index.h("div", null, index.h("hr", { style: { margin: '5px' } }), index.h("iframe", { src: flowInfo.url, frameborder: "0", height: "400px", width: "100%", allowfullScreen: true, allow: "camera *;microphone *" })));
|
|
524
|
+
// comment the functionality under because it might have a different type of script that we might have to handle
|
|
525
|
+
// this.importScript(flowInfo.url)
|
|
526
|
+
// .then(() => {
|
|
527
|
+
// // Script imported successfully
|
|
528
|
+
// console.log('Script imported correctly');
|
|
529
|
+
// // Open/show the widget
|
|
530
|
+
// // You'll need to check the widget documentation for how to open/show it
|
|
531
|
+
// })
|
|
532
|
+
// .catch(error => {
|
|
533
|
+
// // Handle script import error
|
|
534
|
+
// console.error('Error importing script:', error);
|
|
535
|
+
// });
|
|
536
|
+
}
|
|
537
|
+
else if ((flowInfo === null || flowInfo === void 0 ? void 0 : flowInfo.type) === 'Redirect' && verificationType.vendorName !== "Manual" && status !== "Verified") {
|
|
538
|
+
return (index.h("div", null, index.h("hr", { style: { margin: '5px' } }), index.h("iframe", { src: flowInfo.url, frameborder: "0", height: "400px", width: "100%", allowfullScreen: true, allow: "camera *;microphone *" })));
|
|
539
|
+
}
|
|
540
|
+
else {
|
|
541
|
+
return (index.h("div", { class: "box box-content" }, index.h(index.Fragment, null, isVerified ? (index.h("div", { class: "verification-status" }, translate('verificationComplete', this.language))) : isFailedOrExpired ? (index.h("div", { class: "verification-status" }, status === 'Failed' ? translate('verificationFailed', this.language) : translate('verificationExpired', this.language))) : documents.length > 0 ? (index.h("div", { class: "documents-dropdown" }, index.h("select", { class: "nice-select", onChange: (event) => this.handleOptionChange(event, verificationType.type) }, index.h("option", { value: "", selected: true, disabled: true, hidden: true }, translate('chooseDocument', this.language)), documents.map((doc) => (index.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)));
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
render() {
|
|
545
|
+
if (this.isLoading) {
|
|
546
|
+
return (index.h("div", null, index.h("p", null, translate('loading', this.language))));
|
|
547
|
+
}
|
|
548
|
+
else {
|
|
549
|
+
return (index.h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, index.h("div", { class: "player-kyc-verification-widget" }, (this.isMobile ?
|
|
550
|
+
index.h("div", { class: "MenuReturnButton", onClick: this.handleToggleScreen }, 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", null, translate('kycTitle', this.language)))
|
|
551
|
+
:
|
|
552
|
+
index.h("h2", null, translate('kycTitle', this.language))), this.verificationType.length === 0 ?
|
|
553
|
+
index.h("div", { class: "no-verification-description", style: { padding: '24px', fontSize: '18px' } }, translate('noVerificationRequired', this.language))
|
|
554
|
+
:
|
|
555
|
+
index.h(index.Fragment, null, index.h("div", { class: "widget-description" }, translate('kycDescription', this.language)), index.h("div", { class: "verification-types" }, this.verificationType.map((verificationType) => verificationType ? this.renderVerificationTypeBox(verificationType) : null))))));
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
static get watchers() { return {
|
|
559
|
+
"translationUrl": ["handleNewTranslations"]
|
|
560
|
+
}; }
|
|
561
|
+
};
|
|
562
|
+
PlayerKycVerificationWidget.style = PlayerKycVerificationStyle0;
|
|
563
|
+
|
|
564
|
+
exports.player_kyc_verification = PlayerKycVerificationWidget;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-ff559e5a.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
|
|
10
|
+
*/
|
|
11
|
+
var patchBrowser = () => {
|
|
12
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('player-kyc-verification.cjs.js', document.baseURI).href));
|
|
13
|
+
const opts = {};
|
|
14
|
+
if (importMeta !== "") {
|
|
15
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
16
|
+
}
|
|
17
|
+
return index.promiseResolve(opts);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
patchBrowser().then(async (options) => {
|
|
21
|
+
await appGlobals.globalScripts();
|
|
22
|
+
return index.bootstrapLazy([["player-kyc-verification.cjs",[[1,"player-kyc-verification",{"userId":[1,"user-id"],"session":[1],"language":[1],"endpoint":[1],"translationUrl":[1,"translation-url"],"clientStyling":[1,"client-styling"],"verifiedIcon":[1,"verified-icon"],"failedIcon":[1,"failed-icon"],"defaultIcon":[1,"default-icon"],"clientStylingUrl":[1,"client-styling-url"],"verificationType":[32],"isLoading":[32],"stylingAppends":[32],"selectedFile":[32],"uploadingStatus":[32],"uploadSizeExceeded":[32],"selectedOption":[32],"expandedOnDesktop":[32]},null,{"translationUrl":["handleNewTranslations"]}]]]], options);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PlayerKycVerificationWidget } from './player-kyc-verification';
|