@everymatrix/player-kyc-verification 1.93.13 → 1.93.15
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 +125 -83
- package/dist/cjs/player-kyc-verification.cjs.js +1 -1
- package/dist/collection/components/player-kyc-verification/player-kyc-verification.css +29 -0
- package/dist/collection/components/player-kyc-verification/player-kyc-verification.js +129 -83
- package/dist/esm/loader.js +1 -1
- package/dist/esm/player-kyc-verification.entry.js +125 -83
- package/dist/esm/player-kyc-verification.js +1 -1
- package/dist/player-kyc-verification/player-kyc-verification.entry.js +1 -1
- package/dist/player-kyc-verification/player-kyc-verification.esm.js +1 -1
- package/dist/types/components/player-kyc-verification/player-kyc-verification.d.ts +24 -19
- package/package.json +1 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["player-kyc-verification.cjs",[[1,"player-kyc-verification",{"hideVulnerabilityCheck":[1,"hide-vulnerability-check"],"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"],"mbSource":[1,"mb-source"],"hideKycDescription":[1,"hide-kyc-description"],"verificationType":[32],"hasAllDocumentsUploaded":[32],"verificationsGeneralStatus":[32],"isLoading":[32],"selectedFile":[32],"uploadingStatus":[32],"uploadSizeExceeded":[32],"expandedOnDesktop":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["player-kyc-verification.cjs",[[1,"player-kyc-verification",{"hideVulnerabilityCheck":[1,"hide-vulnerability-check"],"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"],"mbSource":[1,"mb-source"],"hideKycDescription":[1,"hide-kyc-description"],"verificationType":[32],"hasAllDocumentsUploaded":[32],"verificationsGeneralStatus":[32],"isLoading":[32],"isKYCLoading":[32],"selectedFile":[32],"uploadingStatus":[32],"uploadSizeExceeded":[32],"expandedOnDesktop":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -753,7 +753,7 @@ function getAdoptStyleSubscription(stylingContainer, domain) {
|
|
|
753
753
|
});
|
|
754
754
|
}
|
|
755
755
|
|
|
756
|
-
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 font-weight: var(--emw--font-weight-semibold, 500);\n}\n.player-kyc-verification-widget .widget-description, .player-kyc-verification-widget .widget-description-verified, .player-kyc-verification-widget .widget-description-failed {\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(--emw--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 flex-grow: 1;\n border-top: 0.4px solid var(--emw--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(--emw--color-gray-150, #828282);\n border-radius: 2px;\n background-color: var(--emw--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(--emw--color-white, #FFFFFF);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\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(--emw--color-valid, var(--emw--color-green, #48952a));\n min-height: 120px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.failed {\n border-color: var(--emw--color-error, var(--emw--color-red, #FD2839));\n}\n.player-kyc-verification-widget .verification-types .verification-box.success {\n border-color: var(--emw--color-valid, var(--emw--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(--emw--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: 475px) {\n .player-kyc-verification-widget .verification-types {\n display: block;\n }\n .player-kyc-verification-widget .verification-types .verification-box {\n margin-bottom: 20px;\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}";
|
|
756
|
+
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 font-weight: var(--emw--font-weight-semibold, 500);\n}\n.player-kyc-verification-widget .widget-description, .player-kyc-verification-widget .widget-description-verified, .player-kyc-verification-widget .widget-description-failed {\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(--emw--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 flex-grow: 1;\n border-top: 0.4px solid var(--emw--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(--emw--color-gray-150, #828282);\n border-radius: 2px;\n background-color: var(--emw--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(--emw--color-white, #FFFFFF);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\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(--emw--color-valid, var(--emw--color-green, #48952a));\n min-height: 120px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.failed {\n border-color: var(--emw--color-error, var(--emw--color-red, #FD2839));\n}\n.player-kyc-verification-widget .verification-types .verification-box.success {\n border-color: var(--emw--color-valid, var(--emw--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(--emw--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: 475px) {\n .player-kyc-verification-widget .verification-types {\n display: block;\n }\n .player-kyc-verification-widget .verification-types .verification-box {\n margin-bottom: 20px;\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}\n.ModalLoader {\n width: 300px;\n height: 300px;\n margin: 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.ModalLoader:after {\n content: \" \";\n display: block;\n width: 64px;\n height: 64px;\n margin: 8px;\n border-radius: 50%;\n border: 5px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n border-color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E)) transparent var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E)) transparent;\n animation: Loader 1.2s linear infinite;\n}\n\n@keyframes Loader {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}";
|
|
757
757
|
const PlayerKycVerificationStyle0 = playerKycVerificationCss;
|
|
758
758
|
|
|
759
759
|
const PlayerKycVerificationWidget = class {
|
|
@@ -763,13 +763,84 @@ const PlayerKycVerificationWidget = class {
|
|
|
763
763
|
this.MAX_UPLOAD_SIZE = 50000000;
|
|
764
764
|
this.userAgent = window.navigator.userAgent;
|
|
765
765
|
this.isMobile = isMobile(this.userAgent);
|
|
766
|
+
this.getKYCCustomerStatus = () => {
|
|
767
|
+
try {
|
|
768
|
+
this.isKYCLoading = true;
|
|
769
|
+
let url = new URL(`${this.endpoint}/v2/player/${this.userId}/verification/GetKYCCustomerStatus?language=${this.language}`);
|
|
770
|
+
const options = {
|
|
771
|
+
method: 'POST',
|
|
772
|
+
headers: {
|
|
773
|
+
'X-SessionId': this.session,
|
|
774
|
+
'Content-Type': 'application/json'
|
|
775
|
+
},
|
|
776
|
+
body: JSON.stringify({})
|
|
777
|
+
};
|
|
778
|
+
fetch(url.href, options)
|
|
779
|
+
.then((res) => {
|
|
780
|
+
if (res.status === 200) {
|
|
781
|
+
return res.json();
|
|
782
|
+
}
|
|
783
|
+
else {
|
|
784
|
+
throw new Error('HTTP status ' + res.status);
|
|
785
|
+
}
|
|
786
|
+
})
|
|
787
|
+
.then((data) => {
|
|
788
|
+
var _a;
|
|
789
|
+
this.verificationType = data.verifications;
|
|
790
|
+
if (((_a = this.verificationType) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
791
|
+
if (this.hideKycDescription === 'true') {
|
|
792
|
+
this.hasAllDocumentsUploaded = this.verificationType.every((kycElement) => {
|
|
793
|
+
var _a;
|
|
794
|
+
if ((kycElement === null || kycElement === void 0 ? void 0 : kycElement.documents.length) === 0)
|
|
795
|
+
return;
|
|
796
|
+
return (_a = kycElement === null || kycElement === void 0 ? void 0 : kycElement.documents) === null || _a === void 0 ? void 0 : _a.some((document) => document.status === 'Uploaded');
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
this.verificationsGeneralStatus = this.getGeneralVerificationStatus(this.verificationType);
|
|
800
|
+
if (Array.isArray(this.verificationType)) {
|
|
801
|
+
this.handleVerificationShuftiMessage(this.verificationType);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
this.isKYCLoading = false;
|
|
805
|
+
})
|
|
806
|
+
.catch((err) => {
|
|
807
|
+
// Handle any errors
|
|
808
|
+
this.isKYCLoading = false;
|
|
809
|
+
console.error(err);
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
catch (error) {
|
|
813
|
+
console.error('Error fetching verification types:', error);
|
|
814
|
+
}
|
|
815
|
+
};
|
|
816
|
+
this.handleShuftiMessage = (event) => {
|
|
817
|
+
const data = event.data;
|
|
818
|
+
const status = data.event || data.verification_status;
|
|
819
|
+
if (status) {
|
|
820
|
+
const DELAY_KYC_API = 5500;
|
|
821
|
+
const DELAY_IFRAME_SHUFTI_LOADING = 500;
|
|
822
|
+
switch (status) {
|
|
823
|
+
case 'verification.declined':
|
|
824
|
+
case 'verification.accepted':
|
|
825
|
+
// Use for delayed iframe render UI and then trigger loading
|
|
826
|
+
setTimeout(() => {
|
|
827
|
+
this.isKYCLoading = true;
|
|
828
|
+
}, DELAY_IFRAME_SHUFTI_LOADING);
|
|
829
|
+
// Use for delayed BE handle the content take around 5 sec and FE re-call again
|
|
830
|
+
setTimeout(() => {
|
|
831
|
+
this.getKYCCustomerStatus();
|
|
832
|
+
}, DELAY_KYC_API);
|
|
833
|
+
break;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
};
|
|
766
837
|
this.handleToggleScreen = () => {
|
|
767
838
|
this.toggleScreen(this.isMobile);
|
|
768
839
|
};
|
|
769
840
|
this.hideVulnerabilityCheck = 'false';
|
|
770
841
|
this.userId = '';
|
|
771
842
|
this.session = '';
|
|
772
|
-
this.language =
|
|
843
|
+
this.language = 'en';
|
|
773
844
|
this.endpoint = '';
|
|
774
845
|
this.translationUrl = '';
|
|
775
846
|
this.clientStyling = '';
|
|
@@ -783,6 +854,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
783
854
|
this.hasAllDocumentsUploaded = false;
|
|
784
855
|
this.verificationsGeneralStatus = undefined;
|
|
785
856
|
this.isLoading = false;
|
|
857
|
+
this.isKYCLoading = false;
|
|
786
858
|
this.selectedFile = null;
|
|
787
859
|
this.uploadingStatus = undefined;
|
|
788
860
|
this.uploadSizeExceeded = false;
|
|
@@ -825,61 +897,33 @@ const PlayerKycVerificationWidget = class {
|
|
|
825
897
|
if (window.innerWidth > 700) {
|
|
826
898
|
this.expandedOnDesktop = true;
|
|
827
899
|
}
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
fetch(url.href, options)
|
|
839
|
-
.then((res) => {
|
|
840
|
-
if (res.status === 200) {
|
|
841
|
-
return res.json();
|
|
842
|
-
}
|
|
843
|
-
else {
|
|
844
|
-
throw new Error("HTTP status " + res.status);
|
|
845
|
-
}
|
|
846
|
-
})
|
|
847
|
-
.then((data) => {
|
|
848
|
-
var _a;
|
|
849
|
-
this.verificationType = data.verifications;
|
|
850
|
-
if (this.hideKycDescription === "true" && ((_a = this.verificationType) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
851
|
-
this.hasAllDocumentsUploaded = this.verificationType.every((kycElement) => {
|
|
852
|
-
var _a;
|
|
853
|
-
if ((kycElement === null || kycElement === void 0 ? void 0 : kycElement.documents.length) === 0)
|
|
854
|
-
return;
|
|
855
|
-
return (_a = kycElement === null || kycElement === void 0 ? void 0 : kycElement.documents) === null || _a === void 0 ? void 0 : _a.some((document) => document.status === "Uploaded");
|
|
856
|
-
});
|
|
857
|
-
this.verificationsGeneralStatus = this.getGeneralVerificationStatus(this.verificationType);
|
|
858
|
-
}
|
|
859
|
-
})
|
|
860
|
-
.catch((err) => {
|
|
861
|
-
// Handle any errors
|
|
862
|
-
console.error(err);
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
catch (error) {
|
|
866
|
-
console.error('Error fetching verification types:', error);
|
|
900
|
+
this.getKYCCustomerStatus();
|
|
901
|
+
}
|
|
902
|
+
removeVerificationShuftiMessage() {
|
|
903
|
+
window.removeEventListener('message', this.handleShuftiMessage);
|
|
904
|
+
}
|
|
905
|
+
handleVerificationShuftiMessage(verifications) {
|
|
906
|
+
const isActionNeeded = verifications.find((val) => { var _a; return val.vendorName === 'ShuftiPro' && ((_a = val.flowInfo) === null || _a === void 0 ? void 0 : _a.actionNeeded) === true; });
|
|
907
|
+
this.removeVerificationShuftiMessage();
|
|
908
|
+
if (isActionNeeded) {
|
|
909
|
+
window.addEventListener('message', this.handleShuftiMessage);
|
|
867
910
|
}
|
|
868
911
|
}
|
|
869
912
|
getGeneralVerificationStatus(verifications) {
|
|
870
|
-
const statuses = verifications === null || verifications === void 0 ? void 0 : verifications.map(docType => docType.status.toLowerCase());
|
|
871
|
-
if (statuses.includes(
|
|
872
|
-
return
|
|
873
|
-
if (statuses.includes(
|
|
874
|
-
return
|
|
875
|
-
if (statuses.includes(
|
|
876
|
-
return
|
|
877
|
-
if (statuses.every(status => status ===
|
|
878
|
-
return
|
|
879
|
-
return
|
|
913
|
+
const statuses = verifications === null || verifications === void 0 ? void 0 : verifications.map((docType) => docType.status.toLowerCase());
|
|
914
|
+
if (statuses.includes('failed'))
|
|
915
|
+
return 'Failed';
|
|
916
|
+
if (statuses.includes('expired'))
|
|
917
|
+
return 'Expired';
|
|
918
|
+
if (statuses.includes('inprogress'))
|
|
919
|
+
return 'InProgress';
|
|
920
|
+
if (statuses.every((status) => status === 'verified'))
|
|
921
|
+
return 'Verified';
|
|
922
|
+
return 'Unknown';
|
|
880
923
|
}
|
|
881
924
|
disconnectedCallback() {
|
|
882
925
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
926
|
+
this.removeVerificationShuftiMessage();
|
|
883
927
|
}
|
|
884
928
|
handleOptionChange(event, verificationTypeId) {
|
|
885
929
|
const target = event.target;
|
|
@@ -923,7 +967,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
923
967
|
}
|
|
924
968
|
checkFileSize(file) {
|
|
925
969
|
let size = 0;
|
|
926
|
-
Object.keys(file).forEach(element => {
|
|
970
|
+
Object.keys(file).forEach((element) => {
|
|
927
971
|
size += file[element].size;
|
|
928
972
|
});
|
|
929
973
|
return size <= this.MAX_UPLOAD_SIZE;
|
|
@@ -942,23 +986,24 @@ const PlayerKycVerificationWidget = class {
|
|
|
942
986
|
method: 'POST',
|
|
943
987
|
headers: {
|
|
944
988
|
'Content-Type': 'application/json',
|
|
945
|
-
'X-SessionId': this.session
|
|
989
|
+
'X-SessionId': this.session
|
|
946
990
|
},
|
|
947
|
-
body: JSON.stringify({ DocumentCode: documentType })
|
|
991
|
+
body: JSON.stringify({ DocumentCode: documentType })
|
|
948
992
|
};
|
|
949
993
|
fetch(`${this.endpoint}/v1/player/${this.userId}/verification/GetKYCVerificationDocumentUploadUrl`, uploadOptions)
|
|
950
|
-
.then(response => {
|
|
994
|
+
.then((response) => {
|
|
951
995
|
if (response.ok) {
|
|
952
996
|
this.uploadingStatus = translate('uploading', this.language);
|
|
953
997
|
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
954
998
|
return response.json();
|
|
955
999
|
}
|
|
956
|
-
})
|
|
1000
|
+
})
|
|
1001
|
+
.then((data) => {
|
|
957
1002
|
if (data.ResponseCode == 'Success') {
|
|
958
1003
|
const formData = new FormData();
|
|
959
1004
|
formData.append(documentType, this.selectedFile[0]);
|
|
960
|
-
fetch(data.Url, { method:
|
|
961
|
-
.then(res => {
|
|
1005
|
+
fetch(data.Url, { method: 'POST', body: formData })
|
|
1006
|
+
.then((res) => {
|
|
962
1007
|
if (res.ok) {
|
|
963
1008
|
if (this.selectedFile.length > 1) {
|
|
964
1009
|
this.uploadingStatus = translate('successUploadMultipleFiles', this.language);
|
|
@@ -973,7 +1018,8 @@ const PlayerKycVerificationWidget = class {
|
|
|
973
1018
|
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
974
1019
|
console.error('File upload error:', res.status);
|
|
975
1020
|
}
|
|
976
|
-
})
|
|
1021
|
+
})
|
|
1022
|
+
.catch((error) => {
|
|
977
1023
|
console.error('File upload error:', error);
|
|
978
1024
|
});
|
|
979
1025
|
}
|
|
@@ -982,7 +1028,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
982
1028
|
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
983
1029
|
}
|
|
984
1030
|
})
|
|
985
|
-
.catch(error => {
|
|
1031
|
+
.catch((error) => {
|
|
986
1032
|
console.error('File upload error:', error);
|
|
987
1033
|
});
|
|
988
1034
|
}
|
|
@@ -1006,7 +1052,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
1006
1052
|
resolve(true);
|
|
1007
1053
|
}
|
|
1008
1054
|
})
|
|
1009
|
-
.catch(error => {
|
|
1055
|
+
.catch((error) => {
|
|
1010
1056
|
reject(error);
|
|
1011
1057
|
});
|
|
1012
1058
|
});
|
|
@@ -1020,7 +1066,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
1020
1066
|
var _a, _b;
|
|
1021
1067
|
let result;
|
|
1022
1068
|
(_a = verificationType === null || verificationType === void 0 ? void 0 : verificationType.documents) === null || _a === void 0 ? void 0 : _a.forEach((item) => {
|
|
1023
|
-
if (item.status ==
|
|
1069
|
+
if (item.status == 'Requested') {
|
|
1024
1070
|
result = result !== null && result !== void 0 ? result : item.code;
|
|
1025
1071
|
}
|
|
1026
1072
|
});
|
|
@@ -1032,14 +1078,14 @@ const PlayerKycVerificationWidget = class {
|
|
|
1032
1078
|
renderDescription(status) {
|
|
1033
1079
|
const shouldHideDescription = this.hideKycDescription === 'true' && this.hasAllDocumentsUploaded;
|
|
1034
1080
|
switch (status) {
|
|
1035
|
-
case
|
|
1036
|
-
return index.h("div", { class: "widget-description-verified" }, translate(
|
|
1037
|
-
case
|
|
1038
|
-
return index.h("div", { class: "widget-description-failed" }, translate(
|
|
1081
|
+
case 'Verified':
|
|
1082
|
+
return index.h("div", { class: "widget-description-verified" }, translate('kycVerifiedDescription', this.language));
|
|
1083
|
+
case 'Failed':
|
|
1084
|
+
return index.h("div", { class: "widget-description-failed" }, translate('kycFailedDescription', this.language));
|
|
1039
1085
|
default:
|
|
1040
1086
|
if (shouldHideDescription)
|
|
1041
1087
|
return null;
|
|
1042
|
-
return index.h("div", { class: "widget-description" }, translate(
|
|
1088
|
+
return index.h("div", { class: "widget-description" }, translate('kycDescription', this.language));
|
|
1043
1089
|
}
|
|
1044
1090
|
}
|
|
1045
1091
|
renderVerificationTypeBox(verificationType) {
|
|
@@ -1053,20 +1099,20 @@ const PlayerKycVerificationWidget = class {
|
|
|
1053
1099
|
let status = verificationType.status;
|
|
1054
1100
|
let documents = verificationType.documents;
|
|
1055
1101
|
let flowInfo = verificationType.flowInfo;
|
|
1102
|
+
const vendorName = verificationType.vendorName;
|
|
1103
|
+
const isShuftiButNotInProgress = vendorName === 'ShuftiPro' && status !== 'InProgress';
|
|
1056
1104
|
const isVerified = status === 'Verified';
|
|
1057
1105
|
const isFailedOrExpired = status === 'Failed' || status === 'Expired';
|
|
1058
|
-
const isVulnerabilityCheck = name ===
|
|
1059
|
-
|
|
1106
|
+
const isVulnerabilityCheck = name === 'VulnerabilityCheck';
|
|
1107
|
+
const isHiddenVulnerability = isVerified && isVulnerabilityCheck && this.hideVulnerabilityCheck === 'true';
|
|
1108
|
+
if (isHiddenVulnerability || isShuftiButNotInProgress) {
|
|
1060
1109
|
return null;
|
|
1061
1110
|
}
|
|
1062
|
-
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" }))))) :
|
|
1063
|
-
(index.h("div", { class: "box box-content" }, index.h("div", { id: "__avs-wrapper" })))));
|
|
1111
|
+
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)) : (index.h("div", { class: "box box-content" }, index.h("div", { id: "__avs-wrapper" })))));
|
|
1064
1112
|
}
|
|
1065
1113
|
renderDocumentsActions(selectedDocument, optionChosen, verificationType) {
|
|
1066
|
-
return (index.h("div", null, this.isStatusUploaded(selectedDocument) ? (index.h("div", { class: "upload-status" }, translate('uploaded', this.language))) :
|
|
1067
|
-
(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(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))" }), index.h("path", { d: "M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z", fill: "var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))" })), 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, optionChosen, 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(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))" }), 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)))));
|
|
1114
|
+
return (index.h("div", null, this.isStatusUploaded(selectedDocument) ? (index.h("div", { class: "upload-status" }, translate('uploaded', this.language))) : (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(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))" }), index.h("path", { d: "M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z", fill: "var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))" })), 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, optionChosen, 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(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))" }), 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)))));
|
|
1068
1115
|
}
|
|
1069
|
-
;
|
|
1070
1116
|
renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired) {
|
|
1071
1117
|
if ((flowInfo === null || flowInfo === void 0 ? void 0 : flowInfo.type) === 'Widget') {
|
|
1072
1118
|
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 *" })));
|
|
@@ -1083,12 +1129,14 @@ const PlayerKycVerificationWidget = class {
|
|
|
1083
1129
|
// console.error('Error importing script:', error);
|
|
1084
1130
|
// });
|
|
1085
1131
|
}
|
|
1086
|
-
else if ((flowInfo === null || flowInfo === void 0 ? void 0 : flowInfo.type) === 'Redirect' && verificationType.vendorName !==
|
|
1132
|
+
else if ((flowInfo === null || flowInfo === void 0 ? void 0 : flowInfo.type) === 'Redirect' && verificationType.vendorName !== 'Manual' && status !== 'Verified') {
|
|
1087
1133
|
const iframeSize = verificationType.vendorName === 'ShuftiPro' ? '650px' : '400px';
|
|
1088
1134
|
return (index.h("div", null, index.h("hr", { style: { margin: '5px' } }), index.h("iframe", { src: flowInfo.url, frameborder: "0", height: iframeSize, width: "100%", allowfullScreen: true, allow: "camera *;microphone *" })));
|
|
1089
1135
|
}
|
|
1090
1136
|
else {
|
|
1091
|
-
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'
|
|
1137
|
+
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'
|
|
1138
|
+
? translate('verificationFailed', this.language)
|
|
1139
|
+
: 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) }, documents.map((doc) => (index.h("option", { selected: doc.code == optionChosen, value: doc.code }, translate(doc.type, this.language))))), this.renderDocumentsActions(documents.find((e) => e.code === optionChosen), optionChosen, verificationType))) : null)));
|
|
1092
1140
|
}
|
|
1093
1141
|
}
|
|
1094
1142
|
render() {
|
|
@@ -1096,13 +1144,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
1096
1144
|
return (index.h("div", null, index.h("p", null, translate('loading', this.language))));
|
|
1097
1145
|
}
|
|
1098
1146
|
else {
|
|
1099
|
-
return (index.h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, index.h("div", { class: "player-kyc-verification-widget" },
|
|
1100
|
-
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)))
|
|
1101
|
-
:
|
|
1102
|
-
index.h("h2", null, translate('kycTitle', this.language))), this.verificationType.length === 0 ?
|
|
1103
|
-
index.h("div", { class: "no-verification-description", style: { padding: '24px', fontSize: '18px' } }, translate('noVerificationRequired', this.language))
|
|
1104
|
-
:
|
|
1105
|
-
index.h(index.Fragment, null, this.hideKycDescription === "true" ? this.renderDescription(this.verificationsGeneralStatus) : 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))))));
|
|
1147
|
+
return (index.h("div", { class: "ModalContainer", ref: (el) => (this.stylingContainer = el) }, index.h("div", { class: "player-kyc-verification-widget" }, this.isMobile ? (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)))) : (index.h("h2", null, translate('kycTitle', this.language))), this.isKYCLoading ? (index.h("div", { class: "ModalLoader" })) : this.verificationType.length === 0 ? (index.h("div", { class: "no-verification-description", style: { padding: '24px', fontSize: '18px' } }, translate('noVerificationRequired', this.language))) : (index.h(index.Fragment, null, this.hideKycDescription === 'true' ? (this.renderDescription(this.verificationsGeneralStatus)) : (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)))))));
|
|
1106
1148
|
}
|
|
1107
1149
|
}
|
|
1108
1150
|
static get watchers() { return {
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["player-kyc-verification.cjs",[[1,"player-kyc-verification",{"hideVulnerabilityCheck":[1,"hide-vulnerability-check"],"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"],"mbSource":[1,"mb-source"],"hideKycDescription":[1,"hide-kyc-description"],"verificationType":[32],"hasAllDocumentsUploaded":[32],"verificationsGeneralStatus":[32],"isLoading":[32],"selectedFile":[32],"uploadingStatus":[32],"uploadSizeExceeded":[32],"expandedOnDesktop":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["player-kyc-verification.cjs",[[1,"player-kyc-verification",{"hideVulnerabilityCheck":[1,"hide-vulnerability-check"],"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"],"mbSource":[1,"mb-source"],"hideKycDescription":[1,"hide-kyc-description"],"verificationType":[32],"hasAllDocumentsUploaded":[32],"verificationsGeneralStatus":[32],"isLoading":[32],"isKYCLoading":[32],"selectedFile":[32],"uploadingStatus":[32],"uploadSizeExceeded":[32],"expandedOnDesktop":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -178,4 +178,33 @@ button, select {
|
|
|
178
178
|
.player-kyc-verification-widget .verification-types {
|
|
179
179
|
grid-template-columns: repeat(2, 1fr);
|
|
180
180
|
}
|
|
181
|
+
}
|
|
182
|
+
.ModalLoader {
|
|
183
|
+
width: 300px;
|
|
184
|
+
height: 300px;
|
|
185
|
+
margin: 0 auto;
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
justify-content: center;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.ModalLoader:after {
|
|
192
|
+
content: " ";
|
|
193
|
+
display: block;
|
|
194
|
+
width: 64px;
|
|
195
|
+
height: 64px;
|
|
196
|
+
margin: 8px;
|
|
197
|
+
border-radius: 50%;
|
|
198
|
+
border: 5px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));
|
|
199
|
+
border-color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E)) transparent var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E)) transparent;
|
|
200
|
+
animation: Loader 1.2s linear infinite;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@keyframes Loader {
|
|
204
|
+
0% {
|
|
205
|
+
transform: rotate(0deg);
|
|
206
|
+
}
|
|
207
|
+
100% {
|
|
208
|
+
transform: rotate(360deg);
|
|
209
|
+
}
|
|
181
210
|
}
|