@everymatrix/player-account-controller 1.65.2 → 1.66.0
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/components/{PlayerAccountController-Du23H-Ha.js → PlayerAccountController-B0bfe6uR.js} +5 -5
- package/components/{PlayerAccountController-N9ebI09s.cjs → PlayerAccountController-CVL0HQhg.cjs} +1 -1
- package/components/{PlayerAccountController-Dy_EYTXi.js → PlayerAccountController-CWeJ_3lf.js} +5 -5
- package/components/PlayerProfileInfo-B7evfW4V.cjs +4 -0
- package/components/PlayerProfileInfo-DKx18BjF.js +2426 -0
- package/components/PlayerProfileInfo-HvWkhklW.js +2463 -0
- package/es2015/player-account-controller.cjs +1 -1
- package/es2015/player-account-controller.js +1 -1
- package/esnext/player-account-controller.js +1 -1
- package/package.json +1 -1
- package/stencil/{checkbox-group-input_9-CNtARK8C.js → checkbox-group-input_9-CBypfsS3.js} +7 -5
- package/stencil/{checkbox-group-input_9-CQr3DUDJ.cjs → checkbox-group-input_9-DPHNOESE.cjs} +2 -2
- package/stencil/{checkbox-group-input_9-BBp8uUcZ.js → checkbox-group-input_9-DnV_tWRw.js} +7 -5
- package/stencil/{general-input-Bv0i36QX.js → general-input-BL6gaRFm.js} +2 -2
- package/stencil/{general-input-Bcw5i0ZC.cjs → general-input-D4dlhqRt.cjs} +1 -1
- package/stencil/{general-input-wub-4Sk2.js → general-input-PK2GjmMy.js} +2 -2
- package/stencil/{index-9c0f6c58-pr1WGVFu.js → index-9c0f6c58-BB5opCt9.js} +1 -1
- package/stencil/{index-9c0f6c58-DkHHwpww.cjs → index-9c0f6c58-DmOKHEVq.cjs} +1 -1
- package/stencil/{index-9c0f6c58-BNoMpTuB.js → index-9c0f6c58-bxjYqwOi.js} +1 -1
- package/stencil/{index-9cd44522-CsUuNLBU.js → index-9cd44522-CS2DUMAh.js} +4 -4
- package/stencil/{index-9cd44522-D6uuyxLp.cjs → index-9cd44522-DSTEjWLL.cjs} +1 -1
- package/stencil/{index-9cd44522-Bs5-rSFb.js → index-9cd44522-DywmIvct.js} +4 -4
- package/stencil/locale-CB060R77.cjs +1 -0
- package/stencil/{locale-ioQf6ZrW.js → locale-Cxpe53Ym.js} +9 -3
- package/stencil/{password-input_2-ClvpWVfZ.js → password-input_2-B-hB_TyI.js} +28 -26
- package/stencil/{password-input_2-CJq7wtMJ.js → password-input_2-Cv3sojDW.js} +28 -26
- package/stencil/{password-input_2-BMAMY-nX.cjs → password-input_2-D3RpMK9l.cjs} +2 -2
- package/stencil/{player-change-password-gm2-5cb5c6c1-C1DPqzV1.cjs → player-change-password-gm2-5cb5c6c1-48be6rQP.cjs} +1 -1
- package/stencil/{player-change-password-gm2-5cb5c6c1-BqiJMiOw.js → player-change-password-gm2-5cb5c6c1-BDrm2Ck6.js} +1 -1
- package/stencil/{player-change-password-gm2-5cb5c6c1-D-Az5JzJ.js → player-change-password-gm2-5cb5c6c1-Bo3Z7Tq3.js} +1 -1
- package/stencil/{player-change-password-gm2-DSVGYS4v.cjs → player-change-password-gm2-Dyen7kuQ.cjs} +1 -1
- package/stencil/{player-change-password-gm2-AbQzJtHf.js → player-change-password-gm2-Lslcce6X.js} +1 -1
- package/stencil/{player-change-password-gm2-Cr2Rfbg8.js → player-change-password-gm2-O8hU8m1J.js} +1 -1
- package/stencil/{player-kyc-verification-CUhrMPde.js → player-kyc-verification-CMAkNiAB.js} +79 -76
- package/stencil/player-kyc-verification-DYcPWwfi.cjs +180 -0
- package/stencil/{player-kyc-verification-DPUx1txP.js → player-kyc-verification-p2WFnKBp.js} +25 -22
- package/stencil/{toggle-checkbox-input-CYU_o2ph.js → toggle-checkbox-input-C9PFEsSj.js} +2 -2
- package/stencil/{toggle-checkbox-input-BlXLUVpo.js → toggle-checkbox-input-CdoZzW97.js} +2 -2
- package/stencil/{toggle-checkbox-input-Dsxm6_EO.cjs → toggle-checkbox-input-D6Dot9Sr.cjs} +1 -1
- package/components/PlayerProfileInfo-C--m-_0F.js +0 -2419
- package/components/PlayerProfileInfo-CD0xjooF.js +0 -2383
- package/components/PlayerProfileInfo-D5YZWH2T.cjs +0 -4
- package/stencil/locale-BB2iZ4t0.cjs +0 -1
- package/stencil/player-kyc-verification-DAy-szI5.cjs +0 -180
|
@@ -14,14 +14,14 @@ var p = (e, t, n) => new Promise((o, a) => {
|
|
|
14
14
|
}, l = (d) => d.done ? o(d.value) : Promise.resolve(d.value).then(s, c);
|
|
15
15
|
l((n = n.apply(e, t)).next());
|
|
16
16
|
});
|
|
17
|
-
import { b as w, p as k, r as C, h as i, F as h } from "./index-9c0f6c58-
|
|
17
|
+
import { b as w, p as k, r as C, h as i, F as h } from "./index-9c0f6c58-bxjYqwOi.js";
|
|
18
18
|
import { a as x } from "./app-globals-0f993ce5-DzSE6TtH.js";
|
|
19
19
|
var S = () => {
|
|
20
20
|
const e = import.meta.url, t = {};
|
|
21
21
|
return e !== "" && (t.resourcesUrl = new URL(".", e).href), k(t);
|
|
22
22
|
};
|
|
23
23
|
S().then((e) => p(void 0, null, function* () {
|
|
24
|
-
return yield x(), w([["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"], mbSource: [1, "mb-source"], verificationType: [32], isLoading: [32], selectedFile: [32], uploadingStatus: [32], uploadSizeExceeded: [32],
|
|
24
|
+
return yield x(), w([["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"], mbSource: [1, "mb-source"], verificationType: [32], isLoading: [32], selectedFile: [32], uploadingStatus: [32], uploadSizeExceeded: [32], expandedOnDesktop: [32] }, null, { translationUrl: ["handleNewTranslations"], clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingUrlChange"] }]]]], e);
|
|
25
25
|
}));
|
|
26
26
|
const b = "en";
|
|
27
27
|
let u = {
|
|
@@ -534,7 +534,7 @@ let u = {
|
|
|
534
534
|
Voucher: "Voucher"
|
|
535
535
|
}
|
|
536
536
|
};
|
|
537
|
-
const
|
|
537
|
+
const g = (e) => new Promise((t) => {
|
|
538
538
|
fetch(e).then((n) => n.json()).then((n) => {
|
|
539
539
|
Object.keys(n).forEach((o) => {
|
|
540
540
|
u[o] || (u[o] = {});
|
|
@@ -546,7 +546,7 @@ const y = (e) => new Promise((t) => {
|
|
|
546
546
|
const o = t;
|
|
547
547
|
return u[o !== void 0 && o in u ? o : b][e];
|
|
548
548
|
}, P = (e) => !!(e.toLowerCase().match(/android/i) || e.toLowerCase().match(/blackberry|bb/i) || e.toLowerCase().match(/iphone|ipad|ipod/i) || e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
549
|
-
function
|
|
549
|
+
function y(e, t) {
|
|
550
550
|
if (e) {
|
|
551
551
|
const n = document.createElement("style");
|
|
552
552
|
n.innerHTML = t, e.appendChild(n);
|
|
@@ -752,27 +752,27 @@ button, select {
|
|
|
752
752
|
constructor(e) {
|
|
753
753
|
C(this, e), this.scriptInjected = !1, this.MAX_UPLOAD_SIZE = 5e7, this.userAgent = window.navigator.userAgent, this.isMobile = P(this.userAgent), this.handleToggleScreen = () => {
|
|
754
754
|
this.toggleScreen(this.isMobile);
|
|
755
|
-
}, this.userId = "", this.session = "", this.language = void 0, this.endpoint = "", this.translationUrl = "", this.clientStyling = "", this.verifiedIcon = "", this.failedIcon = "", this.defaultIcon = "", this.clientStylingUrl = "", this.mbSource = void 0, this.verificationType = [], this.isLoading = !1, this.selectedFile = null, this.uploadingStatus = void 0, this.uploadSizeExceeded = !1, this.
|
|
755
|
+
}, this.userId = "", this.session = "", this.language = void 0, this.endpoint = "", this.translationUrl = "", this.clientStyling = "", this.verifiedIcon = "", this.failedIcon = "", this.defaultIcon = "", this.clientStylingUrl = "", this.mbSource = void 0, this.verificationType = [], this.isLoading = !1, this.selectedFile = null, this.uploadingStatus = void 0, this.uploadSizeExceeded = !1, this.expandedOnDesktop = !1;
|
|
756
756
|
}
|
|
757
757
|
handleNewTranslations() {
|
|
758
|
-
this.isLoading = !0,
|
|
758
|
+
this.isLoading = !0, g(this.translationUrl).then(() => {
|
|
759
759
|
this.isLoading = !1;
|
|
760
760
|
});
|
|
761
761
|
}
|
|
762
762
|
componentWillLoad() {
|
|
763
763
|
return p(this, null, function* () {
|
|
764
|
-
this.translationUrl.length > 2 && (yield
|
|
764
|
+
this.translationUrl.length > 2 && (yield g(this.translationUrl));
|
|
765
765
|
});
|
|
766
766
|
}
|
|
767
767
|
handleClientStylingChange(e, t) {
|
|
768
|
-
e != t &&
|
|
768
|
+
e != t && y(this.stylingContainer, this.clientStyling);
|
|
769
769
|
}
|
|
770
770
|
handleClientStylingUrlChange(e, t) {
|
|
771
771
|
e != t && this.clientStylingUrl && v(this.stylingContainer, this.clientStylingUrl);
|
|
772
772
|
}
|
|
773
773
|
componentDidLoad() {
|
|
774
774
|
return p(this, null, function* () {
|
|
775
|
-
this.stylingContainer && (window.emMessageBus != null ? D(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling &&
|
|
775
|
+
this.stylingContainer && (window.emMessageBus != null ? D(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && y(this.stylingContainer, this.clientStyling), this.clientStylingUrl && v(this.stylingContainer, this.clientStylingUrl))), window.innerWidth > 700 && (this.expandedOnDesktop = !0);
|
|
776
776
|
try {
|
|
777
777
|
let e = new URL(`${this.endpoint}/v2/player/${this.userId}/verification/GetKYCCustomerStatus`);
|
|
778
778
|
const t = {
|
|
@@ -802,7 +802,7 @@ button, select {
|
|
|
802
802
|
}
|
|
803
803
|
handleOptionChange(e, t) {
|
|
804
804
|
const n = e.target;
|
|
805
|
-
this.
|
|
805
|
+
this.verificationType = this.verificationType.map((o) => (o.type === t && (o.optionChosen = n.value), o));
|
|
806
806
|
}
|
|
807
807
|
handleDocumentsStatus(e, t, n) {
|
|
808
808
|
this.verificationType = this.verificationType.map((o) => {
|
|
@@ -849,12 +849,15 @@ button, select {
|
|
|
849
849
|
if (a.ok)
|
|
850
850
|
return this.uploadingStatus = r("uploading", this.language), this.handleDocumentsStatus(n, this.uploadingStatus, t), a.json();
|
|
851
851
|
}).then((a) => {
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
852
|
+
if (a.ResponseCode == "Success") {
|
|
853
|
+
const s = new FormData();
|
|
854
|
+
s.append(t, this.selectedFile[0]), fetch(a.Url, { method: "POST", body: s }).then((c) => {
|
|
855
|
+
c.ok ? (this.selectedFile.length > 1 ? this.uploadingStatus = r("successUploadMultipleFiles", this.language) : this.uploadingStatus = r("successUpload", this.language), this.handleDocumentsStatus(n, this.uploadingStatus, t)) : (this.uploadingStatus = r("failedUpload", this.language), this.handleDocumentsStatus(n, this.uploadingStatus, t), console.error("File upload error:", c.status));
|
|
856
|
+
}).catch((c) => {
|
|
857
|
+
console.error("File upload error:", c);
|
|
858
|
+
});
|
|
859
|
+
} else
|
|
860
|
+
this.uploadingStatus = r("failedUpload", this.language), this.handleDocumentsStatus(n, this.uploadingStatus, t);
|
|
858
861
|
}).catch((a) => {
|
|
859
862
|
console.error("File upload error:", a);
|
|
860
863
|
});
|
|
@@ -878,11 +881,11 @@ button, select {
|
|
|
878
881
|
return !!(e && e.status === "Uploaded");
|
|
879
882
|
}
|
|
880
883
|
getFirstRequestedDocument(e) {
|
|
881
|
-
var t;
|
|
882
|
-
let
|
|
883
|
-
return (t = e == null ? void 0 : e.documents) === null || t === void 0 || t.forEach((
|
|
884
|
-
|
|
885
|
-
}), n;
|
|
884
|
+
var t, n;
|
|
885
|
+
let o;
|
|
886
|
+
return (t = e == null ? void 0 : e.documents) === null || t === void 0 || t.forEach((a) => {
|
|
887
|
+
a.status == "Requested" && (o = o != null ? o : a.code);
|
|
888
|
+
}), o || (o = (n = e == null ? void 0 : e.documents[0]) === null || n === void 0 ? void 0 : n.code), o;
|
|
886
889
|
}
|
|
887
890
|
renderVerificationTypeBox(e) {
|
|
888
891
|
this.expandedOnDesktop && (e.expanded = !0);
|
|
@@ -894,7 +897,7 @@ button, select {
|
|
|
894
897
|
} }, i("div", { class: "box-icon" }, d ? i("div", null, 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 ? i("div", null, 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" }))) : i("div", null, 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" }, r(o, this.language)), 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: n ? "M6 15l6-6 6 6" : "M6 9l6 6 6-6" })))), n ? this.renderExpandedContent(e, a, s, c, l, d, f) : i("div", { class: "box box-content" }, i("div", { id: "__avs-wrapper" })));
|
|
895
898
|
}
|
|
896
899
|
renderDocumentsActions(e, t, n) {
|
|
897
|
-
return i("div", null, this.isStatusUploaded(e) ? i("div", { class: "upload-status" }, r("uploaded", this.language)) : e != null && e.statusUploaded ? i("div", { class: "upload-status" }, e == null ? void 0 : e.statusUploaded) : i("div", { class: "documents-action" }, i("div", { class: "sample-file" }, (e == null ? void 0 : e.sampleType) === "FileDownload" ? i("button", { class: "download-button", onClick: () => this.downloadPDF(e == null ? void 0 : e.sampleUrl) }, i("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("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))" }), i("path", { d: "M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z", fill: "var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))" })), i("span", null, r("download", this.language))) : null), i("div", { class: "upload-button" }, t ? i("label", null, i("input", { type: "file", accept: "*", onChange: (o) => this.handleFileSelection(o.target.files,
|
|
900
|
+
return i("div", null, this.isStatusUploaded(e) ? i("div", { class: "upload-status" }, r("uploaded", this.language)) : e != null && e.statusUploaded ? i("div", { class: "upload-status" }, e == null ? void 0 : e.statusUploaded) : i("div", { class: "documents-action" }, i("div", { class: "sample-file" }, (e == null ? void 0 : e.sampleType) === "FileDownload" ? i("button", { class: "download-button", onClick: () => this.downloadPDF(e == null ? void 0 : e.sampleUrl) }, i("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("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))" }), i("path", { d: "M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z", fill: "var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))" })), i("span", null, r("download", this.language))) : null), i("div", { class: "upload-button" }, t ? i("label", null, i("input", { type: "file", accept: "*", onChange: (o) => this.handleFileSelection(o.target.files, t, n.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: "var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))" }), 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)));
|
|
898
901
|
}
|
|
899
902
|
renderExpandedContent(e, t, n, o, a, s, c) {
|
|
900
903
|
return (a == null ? void 0 : a.type) === "Widget" ? i("div", null, i("hr", { style: { margin: "5px" } }), i("iframe", { src: a.url, frameborder: "0", height: "400px", width: "100%", allowfullScreen: !0, allow: "camera *;microphone *" })) : (a == null ? void 0 : a.type) === "Redirect" && e.vendorName !== "Manual" && n !== "Verified" ? i("div", null, i("hr", { style: { margin: "5px" } }), i("iframe", { src: a.url, frameborder: "0", height: "400px", width: "100%", allowfullScreen: !0, allow: "camera *;microphone *" })) : i("div", { class: "box box-content" }, i(h, null, s ? i("div", { class: "verification-status" }, r("verificationComplete", this.language)) : c ? i("div", { class: "verification-status" }, n === "Failed" ? r("verificationFailed", this.language) : r("verificationExpired", this.language)) : o.length > 0 ? i("div", { class: "documents-dropdown" }, i("select", { class: "nice-select", onChange: (l) => this.handleOptionChange(l, e.type) }, o.map((l) => i("option", { selected: l.code == t, value: l.code }, r(l.type, this.language)))), this.renderDocumentsActions(o.find((l) => l.code === t), t, e)) : null));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as a, c as o, h as t } from "./index-9cd44522-
|
|
2
|
-
import { t as n } from "./locale-
|
|
1
|
+
import { r as a, c as o, h as t } from "./index-9cd44522-CS2DUMAh.js";
|
|
2
|
+
import { t as n } from "./locale-Cxpe53Ym.js";
|
|
3
3
|
import { t as s } from "./tooltipIcon-ee9760a8-BCCb4EU-.js";
|
|
4
4
|
const r = '*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}', c = r, h = class {
|
|
5
5
|
constructor(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as a, c as o, h as t } from "./index-9cd44522-
|
|
2
|
-
import { t as n } from "./locale-
|
|
1
|
+
import { r as a, c as o, h as t } from "./index-9cd44522-DywmIvct.js";
|
|
2
|
+
import { t as n } from "./locale-Cxpe53Ym.js";
|
|
3
3
|
import { t as s } from "./tooltipIcon-ee9760a8-BCCb4EU-.js";
|
|
4
4
|
const r = '*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}', c = r, h = class {
|
|
5
5
|
constructor(e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-9cd44522-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-9cd44522-DSTEjWLL.cjs"),a=require("./locale-CB060R77.cjs"),n=require("./tooltipIcon-ee9760a8-Bd9l1O5C.cjs"),s='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}',c=s,o=class{constructor(e){t.registerInstance(this,e),this.sendValidityState=t.createEvent(this,"sendValidityState"),this.sendInputValue=t.createEvent(this,"sendInputValue"),this.callBackObject={},this.subFieldsObject={},this.value="",this.handleRevealField=(i,l)=>{i.stopPropagation(),window.postMessage({type:`registration${l}Clicked`},window.location.href)},this.setClientStyling=()=>{let i=document.createElement("style");i.innerHTML=this.clientStyling,this.stylingContainer.prepend(i)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.options=void 0,this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.showFields=this.defaultValue==="true"}handleStylingChange(e,i){e!==i&&this.setClientStyling()}validityStateHandler(e){this.sendValidityState.emit(e)}valueHandler(e){this.sendInputValue.emit(e)}handleClickOutside(e){e.composedPath()[0]!==this.tooltipIconReference&&e.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.options.length!==0&&this.options.forEach(e=>{this.callBackObject[e.name]=i=>{this.handleRevealField(i,e.name)},this.subFieldsObject[e.name].addEventListener("click",this.callBackObject[e.name])})}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.valueHandler({name:this.name,value:this.checkboxReference.checked?"true":"false",type:"toggle"})}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return a.translate("requiredError",this.language)}disconnectedCallback(){this.options.forEach(e=>{this.subFieldsObject[e.name].removeEventListener("click",this.callBackObject[e.name])})}renderLabel(){return t.h("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},t.h("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?t.h("div",{class:`togglecheckbox__tooltip ${this.showTooltip?"visible":""}`,ref:e=>this.tooltipReference=e,innerHTML:this.tooltip}):null}render(){return t.h("div",{key:"d7084a7f82d45b3d1e7f8ae373b663b2aefdf5ec",class:`togglecheckbox__wrapper ${this.name}__input`,ref:e=>this.stylingContainer=e},t.h("div",{key:"f065f4611805dd8490234bcec1fecdbcfcaefab8",class:"togglecheckbox__wrapper--flex"},t.h("input",{key:"c5196d5a4cd2f114a610037285ee644fcabc37bd",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:e=>this.checkboxReference=e,name:this.name,checked:this.defaultValue==="true",readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),t.h("small",{key:"06d5db0994272ec9dde1b5cd0d525bb53ff1a058",class:"togglecheckbox__error-message"},this.errorMessage),t.h("div",{key:"aff16ac9ed0adb896f2c1822014c5c8c4d6db2d4",class:"togglecheckbox__wrapper--relative"},this.tooltip&&t.h("img",{key:"6b049cecc095a2127eb566f50fd0f8feaa8cb3d5",class:"togglecheckbox__tooltip-icon",src:n.tooltipIconSvg,alt:"",ref:e=>this.tooltipIconReference=e,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),t.h("div",{key:"372c3eb72cffd482fe1c179047ec3900cef00d46",class:`togglecheckbox__fields-wrapper ${this.showFields?"":"hidden"}`},this.options.map(e=>t.h("general-input",{type:e.inputType,name:e.name,displayName:e.displayName,validation:e.validate,action:e.action||null,defaultValue:e.defaultValue,autofilled:e.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:e.tooltip,placeholder:e.placeholder==null?"":e.placeholder,ref:i=>this.subFieldsObject[e.name]=i}))))}static get watchers(){return{clientStyling:["handleStylingChange"]}}};o.style=c;exports.toggle_checkbox_input=o;
|