@everymatrix/player-kyc-verification 1.27.0 → 1.27.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/loader.cjs.js +1 -1
- package/dist/cjs/player-kyc-verification.cjs.entry.js +13 -9
- package/dist/cjs/player-kyc-verification.cjs.js +1 -1
- package/dist/collection/components/player-kyc-verification/player-kyc-verification.js +2 -46
- package/dist/collection/utils/locale.utils.js +12 -0
- package/dist/components/player-kyc-verification.js +13 -11
- package/dist/esm/loader.js +1 -1
- package/dist/esm/player-kyc-verification.entry.js +13 -9
- package/dist/esm/player-kyc-verification.js +1 -1
- package/dist/player-kyc-verification/p-c3a42c2a.entry.js +1 -0
- package/dist/player-kyc-verification/player-kyc-verification.esm.js +1 -1
- package/dist/types/components/player-kyc-verification/player-kyc-verification.d.ts +0 -8
- package/dist/types/components.d.ts +0 -16
- package/package.json +1 -1
- package/dist/player-kyc-verification/p-f71e51ae.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["player-kyc-verification.cjs",[[1,"player-kyc-verification",{"
|
|
17
|
+
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],"selectedFiles":[32],"uploadingStatus":[32],"uploadSizeExceeded":[32],"selectedOption":[32],"expandedOnDesktop":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -19,6 +19,8 @@ let TRANSLATIONS = {
|
|
|
19
19
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
20
20
|
failedUpload: 'Upload failed please try again',
|
|
21
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.',
|
|
22
24
|
},
|
|
23
25
|
de: {
|
|
24
26
|
loading: 'Loading, please wait ...',
|
|
@@ -32,6 +34,8 @@ let TRANSLATIONS = {
|
|
|
32
34
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
33
35
|
failedUpload: 'Upload failed please try again',
|
|
34
36
|
chooseDocument: 'Choose Document',
|
|
37
|
+
kycTitle: 'Account-Verifizierung',
|
|
38
|
+
kycDescription: 'Wir benötigen einige Dokumente, um Ihr Konto zu schützen und den rechtlichen und Lizenzanforderungen zu entsprechen.',
|
|
35
39
|
},
|
|
36
40
|
ro: {
|
|
37
41
|
loading: 'Loading, please wait ...',
|
|
@@ -45,6 +49,8 @@ let TRANSLATIONS = {
|
|
|
45
49
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
46
50
|
failedUpload: 'Upload failed please try again',
|
|
47
51
|
chooseDocument: 'Choose Document',
|
|
52
|
+
kycTitle: 'Verificarea contului',
|
|
53
|
+
kycDescription: 'Avem nevoie de câteva documente pentru a proteja contul dvs. și pentru a respecta cerințele legale și de licență.',
|
|
48
54
|
},
|
|
49
55
|
fr: {
|
|
50
56
|
loading: 'Loading, please wait ...',
|
|
@@ -58,6 +64,8 @@ let TRANSLATIONS = {
|
|
|
58
64
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
59
65
|
failedUpload: 'Upload failed please try again',
|
|
60
66
|
chooseDocument: 'Choose Document',
|
|
67
|
+
kycTitle: 'Vérification de compte',
|
|
68
|
+
kycDescription: 'Nous avons besoin de certains documents pour protéger votre compte et pour nous conformer aux exigences légales et de licence.',
|
|
61
69
|
},
|
|
62
70
|
ar: {
|
|
63
71
|
loading: 'Loading, please wait ...',
|
|
@@ -71,6 +79,8 @@ let TRANSLATIONS = {
|
|
|
71
79
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
72
80
|
failedUpload: 'Upload failed please try again',
|
|
73
81
|
chooseDocument: 'Choose Document',
|
|
82
|
+
kycTitle: 'التحقق من الحساب',
|
|
83
|
+
kycDescription: 'نحتاج إلى بعض الوثائق لحماية حسابك والامتثال للمتطلبات القانونية والترخيص.',
|
|
74
84
|
},
|
|
75
85
|
hr: {
|
|
76
86
|
loading: 'Učitavanje, molimo pričekajte ...',
|
|
@@ -84,6 +94,8 @@ let TRANSLATIONS = {
|
|
|
84
94
|
successUploadMultipleFiles: 'Vaši su dokumenti učitani i uskoro će biti pregledani',
|
|
85
95
|
failedUpload: 'Prijenos nije uspio pokušajte ponovo',
|
|
86
96
|
chooseDocument: 'Odaberite Dokument',
|
|
97
|
+
kycTitle: 'Verifikacija računa',
|
|
98
|
+
kycDescription: 'Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva.',
|
|
87
99
|
}
|
|
88
100
|
};
|
|
89
101
|
const getTranslations = (url) => {
|
|
@@ -118,14 +130,6 @@ const playerKycVerificationCss = "@import url(\"https://fonts.googleapis.com/css
|
|
|
118
130
|
const PlayerKycVerificationWidget = class {
|
|
119
131
|
constructor(hostRef) {
|
|
120
132
|
index.registerInstance(this, hostRef);
|
|
121
|
-
/**
|
|
122
|
-
* The kyc title
|
|
123
|
-
*/
|
|
124
|
-
this.kycTitle = '';
|
|
125
|
-
/**
|
|
126
|
-
* The description
|
|
127
|
-
*/
|
|
128
|
-
this.description = '';
|
|
129
133
|
/**
|
|
130
134
|
* The userId
|
|
131
135
|
*/
|
|
@@ -404,7 +408,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
404
408
|
return index.h("div", { style: { padding: '24px', fontSize: '18px' } }, translate('noVerificationRequired', this.language));
|
|
405
409
|
}
|
|
406
410
|
else {
|
|
407
|
-
return (index.h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, index.h("div", { class: "player-kyc-verification-widget" }, index.h("h2", null, this.
|
|
411
|
+
return (index.h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, index.h("div", { class: "player-kyc-verification-widget" }, index.h("h2", null, translate('kycTitle', this.language)), index.h("div", { class: "widget-description" }, translate('kycDescription', this.language)), index.h("div", { class: "verification-types" }, this.verificationType.map((verificationType) => verificationType.vendorName === "Manual" || verificationType.vendorName === "Insic" ? this.renderVerificationTypeBox(verificationType) : null)))));
|
|
408
412
|
}
|
|
409
413
|
}
|
|
410
414
|
}
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["player-kyc-verification.cjs",[[1,"player-kyc-verification",{"
|
|
18
|
+
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],"selectedFiles":[32],"uploadingStatus":[32],"uploadSizeExceeded":[32],"selectedOption":[32],"expandedOnDesktop":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -2,14 +2,6 @@ import { Component, h, State, Prop, Fragment, Watch } from '@stencil/core';
|
|
|
2
2
|
import { getTranslations, translate } from '../../utils/locale.utils';
|
|
3
3
|
export class PlayerKycVerificationWidget {
|
|
4
4
|
constructor() {
|
|
5
|
-
/**
|
|
6
|
-
* The kyc title
|
|
7
|
-
*/
|
|
8
|
-
this.kycTitle = '';
|
|
9
|
-
/**
|
|
10
|
-
* The description
|
|
11
|
-
*/
|
|
12
|
-
this.description = '';
|
|
13
5
|
/**
|
|
14
6
|
* The userId
|
|
15
7
|
*/
|
|
@@ -319,8 +311,8 @@ export class PlayerKycVerificationWidget {
|
|
|
319
311
|
else {
|
|
320
312
|
return (h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el },
|
|
321
313
|
h("div", { class: "player-kyc-verification-widget" },
|
|
322
|
-
h("h2", null, this.
|
|
323
|
-
h("div", { class: "widget-description" }, this.
|
|
314
|
+
h("h2", null, translate('kycTitle', this.language)),
|
|
315
|
+
h("div", { class: "widget-description" }, translate('kycDescription', this.language)),
|
|
324
316
|
h("div", { class: "verification-types" }, this.verificationType.map((verificationType) => verificationType.vendorName === "Manual" || verificationType.vendorName === "Insic" ? this.renderVerificationTypeBox(verificationType) : null)))));
|
|
325
317
|
}
|
|
326
318
|
}
|
|
@@ -334,42 +326,6 @@ export class PlayerKycVerificationWidget {
|
|
|
334
326
|
"$": ["player-kyc-verification.css"]
|
|
335
327
|
}; }
|
|
336
328
|
static get properties() { return {
|
|
337
|
-
"kycTitle": {
|
|
338
|
-
"type": "string",
|
|
339
|
-
"mutable": false,
|
|
340
|
-
"complexType": {
|
|
341
|
-
"original": "string",
|
|
342
|
-
"resolved": "string",
|
|
343
|
-
"references": {}
|
|
344
|
-
},
|
|
345
|
-
"required": false,
|
|
346
|
-
"optional": false,
|
|
347
|
-
"docs": {
|
|
348
|
-
"tags": [],
|
|
349
|
-
"text": "The kyc title"
|
|
350
|
-
},
|
|
351
|
-
"attribute": "kyc-title",
|
|
352
|
-
"reflect": false,
|
|
353
|
-
"defaultValue": "''"
|
|
354
|
-
},
|
|
355
|
-
"description": {
|
|
356
|
-
"type": "string",
|
|
357
|
-
"mutable": false,
|
|
358
|
-
"complexType": {
|
|
359
|
-
"original": "string",
|
|
360
|
-
"resolved": "string",
|
|
361
|
-
"references": {}
|
|
362
|
-
},
|
|
363
|
-
"required": false,
|
|
364
|
-
"optional": false,
|
|
365
|
-
"docs": {
|
|
366
|
-
"tags": [],
|
|
367
|
-
"text": "The description"
|
|
368
|
-
},
|
|
369
|
-
"attribute": "description",
|
|
370
|
-
"reflect": false,
|
|
371
|
-
"defaultValue": "''"
|
|
372
|
-
},
|
|
373
329
|
"userId": {
|
|
374
330
|
"type": "string",
|
|
375
331
|
"mutable": false,
|
|
@@ -13,6 +13,8 @@ let TRANSLATIONS = {
|
|
|
13
13
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
14
14
|
failedUpload: 'Upload failed please try again',
|
|
15
15
|
chooseDocument: 'Choose Document',
|
|
16
|
+
kycTitle: 'Account Verification',
|
|
17
|
+
kycDescription: 'We require some documents to protect your account and to comply with legal and license requirements.',
|
|
16
18
|
},
|
|
17
19
|
de: {
|
|
18
20
|
loading: 'Loading, please wait ...',
|
|
@@ -26,6 +28,8 @@ let TRANSLATIONS = {
|
|
|
26
28
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
27
29
|
failedUpload: 'Upload failed please try again',
|
|
28
30
|
chooseDocument: 'Choose Document',
|
|
31
|
+
kycTitle: 'Account-Verifizierung',
|
|
32
|
+
kycDescription: 'Wir benötigen einige Dokumente, um Ihr Konto zu schützen und den rechtlichen und Lizenzanforderungen zu entsprechen.',
|
|
29
33
|
},
|
|
30
34
|
ro: {
|
|
31
35
|
loading: 'Loading, please wait ...',
|
|
@@ -39,6 +43,8 @@ let TRANSLATIONS = {
|
|
|
39
43
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
40
44
|
failedUpload: 'Upload failed please try again',
|
|
41
45
|
chooseDocument: 'Choose Document',
|
|
46
|
+
kycTitle: 'Verificarea contului',
|
|
47
|
+
kycDescription: 'Avem nevoie de câteva documente pentru a proteja contul dvs. și pentru a respecta cerințele legale și de licență.',
|
|
42
48
|
},
|
|
43
49
|
fr: {
|
|
44
50
|
loading: 'Loading, please wait ...',
|
|
@@ -52,6 +58,8 @@ let TRANSLATIONS = {
|
|
|
52
58
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
53
59
|
failedUpload: 'Upload failed please try again',
|
|
54
60
|
chooseDocument: 'Choose Document',
|
|
61
|
+
kycTitle: 'Vérification de compte',
|
|
62
|
+
kycDescription: 'Nous avons besoin de certains documents pour protéger votre compte et pour nous conformer aux exigences légales et de licence.',
|
|
55
63
|
},
|
|
56
64
|
ar: {
|
|
57
65
|
loading: 'Loading, please wait ...',
|
|
@@ -65,6 +73,8 @@ let TRANSLATIONS = {
|
|
|
65
73
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
66
74
|
failedUpload: 'Upload failed please try again',
|
|
67
75
|
chooseDocument: 'Choose Document',
|
|
76
|
+
kycTitle: 'التحقق من الحساب',
|
|
77
|
+
kycDescription: 'نحتاج إلى بعض الوثائق لحماية حسابك والامتثال للمتطلبات القانونية والترخيص.',
|
|
68
78
|
},
|
|
69
79
|
hr: {
|
|
70
80
|
loading: 'Učitavanje, molimo pričekajte ...',
|
|
@@ -78,6 +88,8 @@ let TRANSLATIONS = {
|
|
|
78
88
|
successUploadMultipleFiles: 'Vaši su dokumenti učitani i uskoro će biti pregledani',
|
|
79
89
|
failedUpload: 'Prijenos nije uspio pokušajte ponovo',
|
|
80
90
|
chooseDocument: 'Odaberite Dokument',
|
|
91
|
+
kycTitle: 'Verifikacija računa',
|
|
92
|
+
kycDescription: 'Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva.',
|
|
81
93
|
}
|
|
82
94
|
};
|
|
83
95
|
export const getTranslations = (url) => {
|
|
@@ -15,6 +15,8 @@ let TRANSLATIONS = {
|
|
|
15
15
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
16
16
|
failedUpload: 'Upload failed please try again',
|
|
17
17
|
chooseDocument: 'Choose Document',
|
|
18
|
+
kycTitle: 'Account Verification',
|
|
19
|
+
kycDescription: 'We require some documents to protect your account and to comply with legal and license requirements.',
|
|
18
20
|
},
|
|
19
21
|
de: {
|
|
20
22
|
loading: 'Loading, please wait ...',
|
|
@@ -28,6 +30,8 @@ let TRANSLATIONS = {
|
|
|
28
30
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
29
31
|
failedUpload: 'Upload failed please try again',
|
|
30
32
|
chooseDocument: 'Choose Document',
|
|
33
|
+
kycTitle: 'Account-Verifizierung',
|
|
34
|
+
kycDescription: 'Wir benötigen einige Dokumente, um Ihr Konto zu schützen und den rechtlichen und Lizenzanforderungen zu entsprechen.',
|
|
31
35
|
},
|
|
32
36
|
ro: {
|
|
33
37
|
loading: 'Loading, please wait ...',
|
|
@@ -41,6 +45,8 @@ let TRANSLATIONS = {
|
|
|
41
45
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
42
46
|
failedUpload: 'Upload failed please try again',
|
|
43
47
|
chooseDocument: 'Choose Document',
|
|
48
|
+
kycTitle: 'Verificarea contului',
|
|
49
|
+
kycDescription: 'Avem nevoie de câteva documente pentru a proteja contul dvs. și pentru a respecta cerințele legale și de licență.',
|
|
44
50
|
},
|
|
45
51
|
fr: {
|
|
46
52
|
loading: 'Loading, please wait ...',
|
|
@@ -54,6 +60,8 @@ let TRANSLATIONS = {
|
|
|
54
60
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
55
61
|
failedUpload: 'Upload failed please try again',
|
|
56
62
|
chooseDocument: 'Choose Document',
|
|
63
|
+
kycTitle: 'Vérification de compte',
|
|
64
|
+
kycDescription: 'Nous avons besoin de certains documents pour protéger votre compte et pour nous conformer aux exigences légales et de licence.',
|
|
57
65
|
},
|
|
58
66
|
ar: {
|
|
59
67
|
loading: 'Loading, please wait ...',
|
|
@@ -67,6 +75,8 @@ let TRANSLATIONS = {
|
|
|
67
75
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
68
76
|
failedUpload: 'Upload failed please try again',
|
|
69
77
|
chooseDocument: 'Choose Document',
|
|
78
|
+
kycTitle: 'التحقق من الحساب',
|
|
79
|
+
kycDescription: 'نحتاج إلى بعض الوثائق لحماية حسابك والامتثال للمتطلبات القانونية والترخيص.',
|
|
70
80
|
},
|
|
71
81
|
hr: {
|
|
72
82
|
loading: 'Učitavanje, molimo pričekajte ...',
|
|
@@ -80,6 +90,8 @@ let TRANSLATIONS = {
|
|
|
80
90
|
successUploadMultipleFiles: 'Vaši su dokumenti učitani i uskoro će biti pregledani',
|
|
81
91
|
failedUpload: 'Prijenos nije uspio pokušajte ponovo',
|
|
82
92
|
chooseDocument: 'Odaberite Dokument',
|
|
93
|
+
kycTitle: 'Verifikacija računa',
|
|
94
|
+
kycDescription: 'Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva.',
|
|
83
95
|
}
|
|
84
96
|
};
|
|
85
97
|
const getTranslations = (url) => {
|
|
@@ -116,14 +128,6 @@ const PlayerKycVerificationWidget = /*@__PURE__*/ proxyCustomElement(class exten
|
|
|
116
128
|
super();
|
|
117
129
|
this.__registerHost();
|
|
118
130
|
this.__attachShadow();
|
|
119
|
-
/**
|
|
120
|
-
* The kyc title
|
|
121
|
-
*/
|
|
122
|
-
this.kycTitle = '';
|
|
123
|
-
/**
|
|
124
|
-
* The description
|
|
125
|
-
*/
|
|
126
|
-
this.description = '';
|
|
127
131
|
/**
|
|
128
132
|
* The userId
|
|
129
133
|
*/
|
|
@@ -402,7 +406,7 @@ const PlayerKycVerificationWidget = /*@__PURE__*/ proxyCustomElement(class exten
|
|
|
402
406
|
return h("div", { style: { padding: '24px', fontSize: '18px' } }, translate('noVerificationRequired', this.language));
|
|
403
407
|
}
|
|
404
408
|
else {
|
|
405
|
-
return (h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, h("div", { class: "player-kyc-verification-widget" }, h("h2", null, this.
|
|
409
|
+
return (h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, h("div", { class: "player-kyc-verification-widget" }, h("h2", null, translate('kycTitle', this.language)), h("div", { class: "widget-description" }, translate('kycDescription', this.language)), h("div", { class: "verification-types" }, this.verificationType.map((verificationType) => verificationType.vendorName === "Manual" || verificationType.vendorName === "Insic" ? this.renderVerificationTypeBox(verificationType) : null)))));
|
|
406
410
|
}
|
|
407
411
|
}
|
|
408
412
|
}
|
|
@@ -411,8 +415,6 @@ const PlayerKycVerificationWidget = /*@__PURE__*/ proxyCustomElement(class exten
|
|
|
411
415
|
}; }
|
|
412
416
|
static get style() { return playerKycVerificationCss; }
|
|
413
417
|
}, [1, "player-kyc-verification", {
|
|
414
|
-
"kycTitle": [1, "kyc-title"],
|
|
415
|
-
"description": [1],
|
|
416
418
|
"userId": [1, "user-id"],
|
|
417
419
|
"session": [1],
|
|
418
420
|
"language": [1],
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["player-kyc-verification",[[1,"player-kyc-verification",{"
|
|
13
|
+
return bootstrapLazy([["player-kyc-verification",[[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],"selectedFiles":[32],"uploadingStatus":[32],"uploadSizeExceeded":[32],"selectedOption":[32],"expandedOnDesktop":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -15,6 +15,8 @@ let TRANSLATIONS = {
|
|
|
15
15
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
16
16
|
failedUpload: 'Upload failed please try again',
|
|
17
17
|
chooseDocument: 'Choose Document',
|
|
18
|
+
kycTitle: 'Account Verification',
|
|
19
|
+
kycDescription: 'We require some documents to protect your account and to comply with legal and license requirements.',
|
|
18
20
|
},
|
|
19
21
|
de: {
|
|
20
22
|
loading: 'Loading, please wait ...',
|
|
@@ -28,6 +30,8 @@ let TRANSLATIONS = {
|
|
|
28
30
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
29
31
|
failedUpload: 'Upload failed please try again',
|
|
30
32
|
chooseDocument: 'Choose Document',
|
|
33
|
+
kycTitle: 'Account-Verifizierung',
|
|
34
|
+
kycDescription: 'Wir benötigen einige Dokumente, um Ihr Konto zu schützen und den rechtlichen und Lizenzanforderungen zu entsprechen.',
|
|
31
35
|
},
|
|
32
36
|
ro: {
|
|
33
37
|
loading: 'Loading, please wait ...',
|
|
@@ -41,6 +45,8 @@ let TRANSLATIONS = {
|
|
|
41
45
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
42
46
|
failedUpload: 'Upload failed please try again',
|
|
43
47
|
chooseDocument: 'Choose Document',
|
|
48
|
+
kycTitle: 'Verificarea contului',
|
|
49
|
+
kycDescription: 'Avem nevoie de câteva documente pentru a proteja contul dvs. și pentru a respecta cerințele legale și de licență.',
|
|
44
50
|
},
|
|
45
51
|
fr: {
|
|
46
52
|
loading: 'Loading, please wait ...',
|
|
@@ -54,6 +60,8 @@ let TRANSLATIONS = {
|
|
|
54
60
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
55
61
|
failedUpload: 'Upload failed please try again',
|
|
56
62
|
chooseDocument: 'Choose Document',
|
|
63
|
+
kycTitle: 'Vérification de compte',
|
|
64
|
+
kycDescription: 'Nous avons besoin de certains documents pour protéger votre compte et pour nous conformer aux exigences légales et de licence.',
|
|
57
65
|
},
|
|
58
66
|
ar: {
|
|
59
67
|
loading: 'Loading, please wait ...',
|
|
@@ -67,6 +75,8 @@ let TRANSLATIONS = {
|
|
|
67
75
|
successUploadMultipleFiles: 'Your documents have been uploaded and it will be reviewed shortly',
|
|
68
76
|
failedUpload: 'Upload failed please try again',
|
|
69
77
|
chooseDocument: 'Choose Document',
|
|
78
|
+
kycTitle: 'التحقق من الحساب',
|
|
79
|
+
kycDescription: 'نحتاج إلى بعض الوثائق لحماية حسابك والامتثال للمتطلبات القانونية والترخيص.',
|
|
70
80
|
},
|
|
71
81
|
hr: {
|
|
72
82
|
loading: 'Učitavanje, molimo pričekajte ...',
|
|
@@ -80,6 +90,8 @@ let TRANSLATIONS = {
|
|
|
80
90
|
successUploadMultipleFiles: 'Vaši su dokumenti učitani i uskoro će biti pregledani',
|
|
81
91
|
failedUpload: 'Prijenos nije uspio pokušajte ponovo',
|
|
82
92
|
chooseDocument: 'Odaberite Dokument',
|
|
93
|
+
kycTitle: 'Verifikacija računa',
|
|
94
|
+
kycDescription: 'Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva.',
|
|
83
95
|
}
|
|
84
96
|
};
|
|
85
97
|
const getTranslations = (url) => {
|
|
@@ -114,14 +126,6 @@ const playerKycVerificationCss = "@import url(\"https://fonts.googleapis.com/css
|
|
|
114
126
|
const PlayerKycVerificationWidget = class {
|
|
115
127
|
constructor(hostRef) {
|
|
116
128
|
registerInstance(this, hostRef);
|
|
117
|
-
/**
|
|
118
|
-
* The kyc title
|
|
119
|
-
*/
|
|
120
|
-
this.kycTitle = '';
|
|
121
|
-
/**
|
|
122
|
-
* The description
|
|
123
|
-
*/
|
|
124
|
-
this.description = '';
|
|
125
129
|
/**
|
|
126
130
|
* The userId
|
|
127
131
|
*/
|
|
@@ -400,7 +404,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
400
404
|
return h("div", { style: { padding: '24px', fontSize: '18px' } }, translate('noVerificationRequired', this.language));
|
|
401
405
|
}
|
|
402
406
|
else {
|
|
403
|
-
return (h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, h("div", { class: "player-kyc-verification-widget" }, h("h2", null, this.
|
|
407
|
+
return (h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, h("div", { class: "player-kyc-verification-widget" }, h("h2", null, translate('kycTitle', this.language)), h("div", { class: "widget-description" }, translate('kycDescription', this.language)), h("div", { class: "verification-types" }, this.verificationType.map((verificationType) => verificationType.vendorName === "Manual" || verificationType.vendorName === "Insic" ? this.renderVerificationTypeBox(verificationType) : null)))));
|
|
404
408
|
}
|
|
405
409
|
}
|
|
406
410
|
}
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["player-kyc-verification",[[1,"player-kyc-verification",{"
|
|
16
|
+
return bootstrapLazy([["player-kyc-verification",[[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],"selectedFiles":[32],"uploadingStatus":[32],"uploadSizeExceeded":[32],"selectedOption":[32],"expandedOnDesktop":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as i,F as t}from"./p-1f2596d0.js";const n=["de","en","hr"];let o={en:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Account Verification",kycDescription:"We require some documents to protect your account and to comply with legal and license requirements."},de:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Account-Verifizierung",kycDescription:"Wir benötigen einige Dokumente, um Ihr Konto zu schützen und den rechtlichen und Lizenzanforderungen zu entsprechen."},ro:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Verificarea contului",kycDescription:"Avem nevoie de câteva documente pentru a proteja contul dvs. și pentru a respecta cerințele legale și de licență."},fr:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Vérification de compte",kycDescription:"Nous avons besoin de certains documents pour protéger votre compte et pour nous conformer aux exigences légales et de licence."},ar:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"التحقق من الحساب",kycDescription:"نحتاج إلى بعض الوثائق لحماية حسابك والامتثال للمتطلبات القانونية والترخيص."},hr:{loading:"Učitavanje, molimo pričekajte ...",noVerificationRequired:"Trenutačno nije potrebna provjera vašeg računa.",verificationComplete:"Provjera dovršena",verificationFailed:"Provjera nije uspjela",verificationExpired:"Provjera je istekla",fileSizeExceeded:"Premašena je maksimalna veličina datoteke. Maksimalna veličina datoteke je: 50mb",uploading:"Prijenos…",successUpload:"Vaš dokument je učitan i uskoro će biti pregledan",successUploadMultipleFiles:"Vaši su dokumenti učitani i uskoro će biti pregledani",failedUpload:"Prijenos nije uspio pokušajte ponovo",chooseDocument:"Odaberite Dokument",kycTitle:"Verifikacija računa",kycDescription:"Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva."}};const r=e=>new Promise((i=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((i=>{for(let t in e[i])o[i][t]=e[i][t]})),i(!0)}))})),a=(e,i,t)=>{const r=i;let a=o[void 0!==r&&n.includes(r)?r:"en"][e];if(void 0!==t)for(const[e,i]of Object.entries(t.values)){const t=new RegExp(`{${e}}`,"g");a=a.replace(t,i)}return a},s=class{constructor(i){e(this,i),this.userId="",this.session="",this.endpoint="",this.translationUrl="",this.clientStyling="",this.verifiedIcon="",this.failedIcon="",this.defaultIcon="",this.clientStylingUrl="",this.verificationType=[],this.isLoading=!1,this.stylingAppends=!1,this.selectedFiles=null,this.uploadSizeExceeded=!1,this.expandedOnDesktop=!1,this.scriptInjected=!1,this.MAX_UPLOAD_SIZE=5e7,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{i.innerHTML=e,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((e=>{console.log("error ",e)}))}}handleNewTranslations(){this.isLoading=!0,r(this.translationUrl).then((()=>{this.isLoading=!1}))}async componentWillLoad(){this.translationUrl.length>2&&await r(this.translationUrl)}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentDidLoad(){window.innerWidth>700&&(this.expandedOnDesktop=!0);try{let e=new URL(`${this.endpoint}/v2/player/${this.userId}/verification/GetKYCCustomerStatus`);const i={method:"POST",headers:{"X-SessionId":this.session,"Content-Type":"application/json"},body:JSON.stringify({})};fetch(e.href,i).then((e=>{if(200===e.status)return e.json();throw new Error("HTTP status "+e.status)})).then((e=>{this.verificationType=e.verifications})).catch((e=>{console.error(e)}))}catch(e){console.error("Error fetching verification types:",e)}}handleOptionChange(e,i){const t=e.target;this.selectedOption=t.value,this.verificationType=this.verificationType.map((e=>(e.type===i&&(e.optionChosen=t.value),e)))}handleDocumentsStatus(e,i,t){this.verificationType=this.verificationType.map((n=>{if(n.type===e){const e=n.documents.find((e=>e.code===t));e&&(e.statusUploaded=i)}return n}))}toggleVerificationType(e,i){this.expandedOnDesktop=!1,this.verificationType=this.verificationType.map((t=>{var n;return t.type===e&&(null===(n=t.flowInfo)||void 0===n?void 0:n.type)==i&&(t.expanded=!t.expanded),t}))}checkFileSize(e){let i=0;return Object.keys(e).forEach((t=>{i+=e[t].size})),i<=this.MAX_UPLOAD_SIZE}handleFileSelection(e,i,t){if(this.selectedFiles=e,this.selectedFiles)if(this.checkFileSize(this.selectedFiles)){const e={method:"POST",headers:{"Content-Type":"application/json","X-SessionId":this.session},body:JSON.stringify({DocumentCode:i})};fetch(`${this.endpoint}/v1/player/${this.userId}/verification/GetKYCVerificationDocumentUploadUrl`,e).then((e=>{if(e.ok)return this.uploadingStatus=a("uploading",this.language),this.handleDocumentsStatus(t,this.uploadingStatus,i),e.json()})).then((e=>{const n=new FormData,o=this.selectedFiles;for(let e=0;e<o.length;e++)n.append("files",o[e]);fetch(e.Url,{method:"POST",body:n}).then((e=>{e.ok?(this.uploadingStatus=a(this.selectedFiles.length>1?"successUploadMultipleFiles":"successUpload",this.language),this.handleDocumentsStatus(t,this.uploadingStatus,i)):(this.uploadingStatus=a("failedUpload",this.language),this.handleDocumentsStatus(t,this.uploadingStatus,i),console.error("File upload error:",e.status))})).catch((e=>{console.error("File upload error:",e)}))})).catch((e=>{console.error("File upload error:",e)}))}else console.error(a("fileSizeExceeded",this.language)),this.uploadingStatus=a("fileSizeExceeded",this.language),this.handleDocumentsStatus(t,this.uploadingStatus,i),this.uploadSizeExceeded=!0}importScript(e){return new Promise(((i,t)=>{fetch(e).then((e=>e.text())).then((e=>{if(new Function(e)(),this.scriptInjected)i(!0);else{const e=document.createElement("script");e.src="https://test.insic.de/frontend3/static/js/avs-loader.min.js",document.head.appendChild(e),this.scriptInjected=!0,i(!0)}})).catch((e=>{t(e)}))}))}renderVerificationTypeBox(e){var n,o;this.expandedOnDesktop&&(e.expanded=!0);let r=e.expanded,s=e.type.replace(/([A-Z])/g," $1"),c=e.optionChosen,l=e.status,d=e.documents,p=e.flowInfo;"Widget"===(null==p?void 0:p.type)&&this.importScript(p.url).then((()=>{console.log("Script imported correctly")})).catch((e=>{console.error("Error importing script:",e)}));const h="Verified"===l,f="Failed"===l||"Expired"===l;return i("div",{class:`verification-box ${r?"expanded":""} ${f?"failed":""} ${h?"success":""}`},i("div",{class:"box box-header "+(r?"expanded":""),onClick:()=>{var i;return this.toggleVerificationType(e.type,null===(i=e.flowInfo)||void 0===i?void 0:i.type)}},i("div",{class:"box-icon"},i("div",null,h?this.verifiedIcon?i("img",{class:"CustomVerifiedIcon",src:this.verifiedIcon,alt:""}):i("svg",{width:"100",height:"100",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"#388D79"}),i("circle",{cx:"50",cy:"50",r:"34",fill:"none",stroke:"#fff","stroke-width":"12px"}),i("polyline",{points:"30,50 45,63 70,35",fill:"none",stroke:"#fff","stroke-width":"8px"})):f?this.failedIcon?i("img",{class:"CustomFailedIcon",src:this.failedIcon,alt:""}):i("svg",{width:"100",height:"100",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"red"}),i("line",{x1:"30",y1:"30",x2:"70",y2:"70",stroke:"#fff","stroke-width":"10px"}),i("line",{x1:"30",y1:"70",x2:"70",y2:"30",stroke:"#fff","stroke-width":"10px"})):this.defaultIcon?i("img",{class:"CustomDefaultIcon",src:this.defaultIcon,alt:""}):i("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("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"}),i("path",{d:"M9 13H15",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M9 17H12",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M14 2V6C14 7.10457 14.8954 8 16 8H20",stroke:"#000000","stroke-width":"2","stroke-linejoin":"round"})))),i("div",{class:"box-title"},s),i("div",{class:"chevron-icon"},i("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"},i("path",{d:r?"M6 15l6-6 6 6":"M6 9l6 6 6-6"})))),i("div",{class:"box box-content"},r&&"Widget"!=(null==p?void 0:p.type)?i(t,null,h?i("div",{class:"verification-status"},a("verificationComplete",this.language)):f?i("div",{class:"verification-status"},a("Failed"===l?"verificationFailed":"verificationExpired",this.language)):d.length>0?i("div",{class:"documents-dropdown"},i("select",{class:"nice-select",onChange:i=>this.handleOptionChange(i,e.type)},i("option",{value:"",selected:!0,disabled:!0,hidden:!0},a("chooseDocument",this.language)),d.map((e=>i("option",{selected:c==e.code,value:e.code},e.type.replace(/([A-Z])/g," $1"))))),(null===(n=d.find((e=>e.code==c)))||void 0===n?void 0:n.statusUploaded)?i("div",{class:"upload-status"},null===(o=d.find((e=>e.code==c)))||void 0===o?void 0:o.statusUploaded):i("div",{class:"upload-button"},c?i("label",null,i("input",{type:"file",accept:"*",multiple:!0,onChange:i=>this.handleFileSelection(i.target.files,this.selectedOption,e.type),style:{display:"none"}}),i("svg",{width:"100",height:"100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"#388D79"}),i("line",{x1:"30",y1:"50",x2:"70",y2:"50",stroke:"white","stroke-width":"6"}),i("line",{x1:"50",y1:"30",x2:"50",y2:"70",stroke:"white","stroke-width":"6"}))):null)):null):i("div",{id:"__avs-wrapper"})))}render(){return this.isLoading?i("div",null,i("p",null,a("loading",this.language))):0===this.verificationType.length?i("div",{style:{padding:"24px",fontSize:"18px"}},a("noVerificationRequired",this.language)):i("div",{class:"ModalContainer",ref:e=>this.stylingContainer=e},i("div",{class:"player-kyc-verification-widget"},i("h2",null,a("kycTitle",this.language)),i("div",{class:"widget-description"},a("kycDescription",this.language)),i("div",{class:"verification-types"},this.verificationType.map((e=>"Manual"===e.vendorName||"Insic"===e.vendorName?this.renderVerificationTypeBox(e):null)))))}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};s.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");\n:host {\n font-family: "Roboto", sans-serif;\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: 4px;\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 1.4px #b5b5b5;\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 #bcbcbc;\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 #ccc;\n border-radius: 2px;\n background-color: #fff;\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.expanded {\n border-color: green;\n min-height: 120px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.failed {\n border-color: #d42323;\n}\n.player-kyc-verification-widget .verification-types .verification-box.success {\n border-color: green;\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: #9b9b9b;\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: 4px;\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}';export{s as player_kyc_verification}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as i}from"./p-1f2596d0.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),e(n)})().then((e=>i([["p-
|
|
1
|
+
import{p as e,b as i}from"./p-1f2596d0.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),e(n)})().then((e=>i([["p-c3a42c2a",[[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],selectedFiles:[32],uploadingStatus:[32],uploadSizeExceeded:[32],selectedOption:[32],expandedOnDesktop:[32]}]]]],e)));
|
|
@@ -19,10 +19,6 @@ export namespace Components {
|
|
|
19
19
|
* For the default status this icon will be displayed
|
|
20
20
|
*/
|
|
21
21
|
"defaultIcon": string;
|
|
22
|
-
/**
|
|
23
|
-
* The description
|
|
24
|
-
*/
|
|
25
|
-
"description": string;
|
|
26
22
|
/**
|
|
27
23
|
* The NorWAy endpoint
|
|
28
24
|
*/
|
|
@@ -31,10 +27,6 @@ export namespace Components {
|
|
|
31
27
|
* For failed status this icon will be displayed
|
|
32
28
|
*/
|
|
33
29
|
"failedIcon": string;
|
|
34
|
-
/**
|
|
35
|
-
* The kyc title
|
|
36
|
-
*/
|
|
37
|
-
"kycTitle": string;
|
|
38
30
|
/**
|
|
39
31
|
* The language
|
|
40
32
|
*/
|
|
@@ -82,10 +74,6 @@ declare namespace LocalJSX {
|
|
|
82
74
|
* For the default status this icon will be displayed
|
|
83
75
|
*/
|
|
84
76
|
"defaultIcon"?: string;
|
|
85
|
-
/**
|
|
86
|
-
* The description
|
|
87
|
-
*/
|
|
88
|
-
"description"?: string;
|
|
89
77
|
/**
|
|
90
78
|
* The NorWAy endpoint
|
|
91
79
|
*/
|
|
@@ -94,10 +82,6 @@ declare namespace LocalJSX {
|
|
|
94
82
|
* For failed status this icon will be displayed
|
|
95
83
|
*/
|
|
96
84
|
"failedIcon"?: string;
|
|
97
|
-
/**
|
|
98
|
-
* The kyc title
|
|
99
|
-
*/
|
|
100
|
-
"kycTitle"?: string;
|
|
101
85
|
/**
|
|
102
86
|
* The language
|
|
103
87
|
*/
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,h as e,F as t}from"./p-1f2596d0.js";const n=["de","en","hr"];let o={en:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document"},de:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document"},ro:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document"},fr:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document"},ar:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document"},hr:{loading:"Učitavanje, molimo pričekajte ...",noVerificationRequired:"Trenutačno nije potrebna provjera vašeg računa.",verificationComplete:"Provjera dovršena",verificationFailed:"Provjera nije uspjela",verificationExpired:"Provjera je istekla",fileSizeExceeded:"Premašena je maksimalna veličina datoteke. Maksimalna veličina datoteke je: 50mb",uploading:"Prijenos…",successUpload:"Vaš dokument je učitan i uskoro će biti pregledan",successUploadMultipleFiles:"Vaši su dokumenti učitani i uskoro će biti pregledani",failedUpload:"Prijenos nije uspio pokušajte ponovo",chooseDocument:"Odaberite Dokument"}};const a=i=>new Promise((e=>{fetch(i).then((i=>i.json())).then((i=>{Object.keys(i).forEach((e=>{for(let t in i[e])o[e][t]=i[e][t]})),e(!0)}))})),r=(i,e,t)=>{const a=e;let r=o[void 0!==a&&n.includes(a)?a:"en"][i];if(void 0!==t)for(const[i,e]of Object.entries(t.values)){const t=new RegExp(`{${i}}`,"g");r=r.replace(t,e)}return r},s=class{constructor(e){i(this,e),this.kycTitle="",this.description="",this.userId="",this.session="",this.endpoint="",this.translationUrl="",this.clientStyling="",this.verifiedIcon="",this.failedIcon="",this.defaultIcon="",this.clientStylingUrl="",this.verificationType=[],this.isLoading=!1,this.stylingAppends=!1,this.selectedFiles=null,this.uploadSizeExceeded=!1,this.expandedOnDesktop=!1,this.scriptInjected=!1,this.MAX_UPLOAD_SIZE=5e7,this.setClientStyling=()=>{let i=document.createElement("style");i.innerHTML=this.clientStyling,this.stylingContainer.prepend(i)},this.setClientStylingURL=()=>{let i=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(i.href).then((i=>i.text())).then((i=>{e.innerHTML=i,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((i=>{console.log("error ",i)}))}}handleNewTranslations(){this.isLoading=!0,a(this.translationUrl).then((()=>{this.isLoading=!1}))}async componentWillLoad(){this.translationUrl.length>2&&await a(this.translationUrl)}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentDidLoad(){window.innerWidth>700&&(this.expandedOnDesktop=!0);try{let i=new URL(`${this.endpoint}/v2/player/${this.userId}/verification/GetKYCCustomerStatus`);const e={method:"POST",headers:{"X-SessionId":this.session,"Content-Type":"application/json"},body:JSON.stringify({})};fetch(i.href,e).then((i=>{if(200===i.status)return i.json();throw new Error("HTTP status "+i.status)})).then((i=>{this.verificationType=i.verifications})).catch((i=>{console.error(i)}))}catch(i){console.error("Error fetching verification types:",i)}}handleOptionChange(i,e){const t=i.target;this.selectedOption=t.value,this.verificationType=this.verificationType.map((i=>(i.type===e&&(i.optionChosen=t.value),i)))}handleDocumentsStatus(i,e,t){this.verificationType=this.verificationType.map((n=>{if(n.type===i){const i=n.documents.find((i=>i.code===t));i&&(i.statusUploaded=e)}return n}))}toggleVerificationType(i,e){this.expandedOnDesktop=!1,this.verificationType=this.verificationType.map((t=>{var n;return t.type===i&&(null===(n=t.flowInfo)||void 0===n?void 0:n.type)==e&&(t.expanded=!t.expanded),t}))}checkFileSize(i){let e=0;return Object.keys(i).forEach((t=>{e+=i[t].size})),e<=this.MAX_UPLOAD_SIZE}handleFileSelection(i,e,t){if(this.selectedFiles=i,this.selectedFiles)if(this.checkFileSize(this.selectedFiles)){const i={method:"POST",headers:{"Content-Type":"application/json","X-SessionId":this.session},body:JSON.stringify({DocumentCode:e})};fetch(`${this.endpoint}/v1/player/${this.userId}/verification/GetKYCVerificationDocumentUploadUrl`,i).then((i=>{if(i.ok)return this.uploadingStatus=r("uploading",this.language),this.handleDocumentsStatus(t,this.uploadingStatus,e),i.json()})).then((i=>{const n=new FormData,o=this.selectedFiles;for(let i=0;i<o.length;i++)n.append("files",o[i]);fetch(i.Url,{method:"POST",body:n}).then((i=>{i.ok?(this.uploadingStatus=r(this.selectedFiles.length>1?"successUploadMultipleFiles":"successUpload",this.language),this.handleDocumentsStatus(t,this.uploadingStatus,e)):(this.uploadingStatus=r("failedUpload",this.language),this.handleDocumentsStatus(t,this.uploadingStatus,e),console.error("File upload error:",i.status))})).catch((i=>{console.error("File upload error:",i)}))})).catch((i=>{console.error("File upload error:",i)}))}else console.error(r("fileSizeExceeded",this.language)),this.uploadingStatus=r("fileSizeExceeded",this.language),this.handleDocumentsStatus(t,this.uploadingStatus,e),this.uploadSizeExceeded=!0}importScript(i){return new Promise(((e,t)=>{fetch(i).then((i=>i.text())).then((i=>{if(new Function(i)(),this.scriptInjected)e(!0);else{const i=document.createElement("script");i.src="https://test.insic.de/frontend3/static/js/avs-loader.min.js",document.head.appendChild(i),this.scriptInjected=!0,e(!0)}})).catch((i=>{t(i)}))}))}renderVerificationTypeBox(i){var n,o;this.expandedOnDesktop&&(i.expanded=!0);let a=i.expanded,s=i.type.replace(/([A-Z])/g," $1"),l=i.optionChosen,c=i.status,d=i.documents,p=i.flowInfo;"Widget"===(null==p?void 0:p.type)&&this.importScript(p.url).then((()=>{console.log("Script imported correctly")})).catch((i=>{console.error("Error importing script:",i)}));const h="Verified"===c,f="Failed"===c||"Expired"===c;return e("div",{class:`verification-box ${a?"expanded":""} ${f?"failed":""} ${h?"success":""}`},e("div",{class:"box box-header "+(a?"expanded":""),onClick:()=>{var e;return this.toggleVerificationType(i.type,null===(e=i.flowInfo)||void 0===e?void 0:e.type)}},e("div",{class:"box-icon"},e("div",null,h?this.verifiedIcon?e("img",{class:"CustomVerifiedIcon",src:this.verifiedIcon,alt:""}):e("svg",{width:"100",height:"100",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},e("circle",{cx:"50",cy:"50",r:"40",fill:"#388D79"}),e("circle",{cx:"50",cy:"50",r:"34",fill:"none",stroke:"#fff","stroke-width":"12px"}),e("polyline",{points:"30,50 45,63 70,35",fill:"none",stroke:"#fff","stroke-width":"8px"})):f?this.failedIcon?e("img",{class:"CustomFailedIcon",src:this.failedIcon,alt:""}):e("svg",{width:"100",height:"100",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},e("circle",{cx:"50",cy:"50",r:"40",fill:"red"}),e("line",{x1:"30",y1:"30",x2:"70",y2:"70",stroke:"#fff","stroke-width":"10px"}),e("line",{x1:"30",y1:"70",x2:"70",y2:"30",stroke:"#fff","stroke-width":"10px"})):this.defaultIcon?e("img",{class:"CustomDefaultIcon",src:this.defaultIcon,alt:""}):e("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("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"}),e("path",{d:"M9 13H15",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M9 17H12",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M14 2V6C14 7.10457 14.8954 8 16 8H20",stroke:"#000000","stroke-width":"2","stroke-linejoin":"round"})))),e("div",{class:"box-title"},s),e("div",{class:"chevron-icon"},e("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"},e("path",{d:a?"M6 15l6-6 6 6":"M6 9l6 6 6-6"})))),e("div",{class:"box box-content"},a&&"Widget"!=(null==p?void 0:p.type)?e(t,null,h?e("div",{class:"verification-status"},r("verificationComplete",this.language)):f?e("div",{class:"verification-status"},r("Failed"===c?"verificationFailed":"verificationExpired",this.language)):d.length>0?e("div",{class:"documents-dropdown"},e("select",{class:"nice-select",onChange:e=>this.handleOptionChange(e,i.type)},e("option",{value:"",selected:!0,disabled:!0,hidden:!0},r("chooseDocument",this.language)),d.map((i=>e("option",{selected:l==i.code,value:i.code},i.type.replace(/([A-Z])/g," $1"))))),(null===(n=d.find((i=>i.code==l)))||void 0===n?void 0:n.statusUploaded)?e("div",{class:"upload-status"},null===(o=d.find((i=>i.code==l)))||void 0===o?void 0:o.statusUploaded):e("div",{class:"upload-button"},l?e("label",null,e("input",{type:"file",accept:"*",multiple:!0,onChange:e=>this.handleFileSelection(e.target.files,this.selectedOption,i.type),style:{display:"none"}}),e("svg",{width:"100",height:"100",xmlns:"http://www.w3.org/2000/svg"},e("circle",{cx:"50",cy:"50",r:"40",fill:"#388D79"}),e("line",{x1:"30",y1:"50",x2:"70",y2:"50",stroke:"white","stroke-width":"6"}),e("line",{x1:"50",y1:"30",x2:"50",y2:"70",stroke:"white","stroke-width":"6"}))):null)):null):e("div",{id:"__avs-wrapper"})))}render(){return this.isLoading?e("div",null,e("p",null,r("loading",this.language))):0===this.verificationType.length?e("div",{style:{padding:"24px",fontSize:"18px"}},r("noVerificationRequired",this.language)):e("div",{class:"ModalContainer",ref:i=>this.stylingContainer=i},e("div",{class:"player-kyc-verification-widget"},e("h2",null,this.kycTitle),e("div",{class:"widget-description"},this.description),e("div",{class:"verification-types"},this.verificationType.map((i=>"Manual"===i.vendorName||"Insic"===i.vendorName?this.renderVerificationTypeBox(i):null)))))}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};s.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");\n:host {\n font-family: "Roboto", sans-serif;\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: 4px;\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 1.4px #b5b5b5;\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 #bcbcbc;\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 #ccc;\n border-radius: 2px;\n background-color: #fff;\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.expanded {\n border-color: green;\n min-height: 120px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.failed {\n border-color: #d42323;\n}\n.player-kyc-verification-widget .verification-types .verification-box.success {\n border-color: green;\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: #9b9b9b;\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: 4px;\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}';export{s as player_kyc_verification}
|