@everymatrix/player-account-controller 1.60.2 → 1.61.1
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-1pHrtkdF.js → PlayerAccountController-CFveIiLH.js} +14 -14
- package/components/{PlayerAccountController-BgblJNy4.js → PlayerAccountController-CP2uODru.js} +14 -14
- package/components/{PlayerAccountController-BhhrsiNx.cjs → PlayerAccountController-DsIsI9ww.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsPage2Gm16-BjlDW58o.cjs → PlayerAccountGamingLimitsPage2Gm16-BEYO8tnS.cjs} +6 -6
- package/components/{PlayerAccountGamingLimitsPage2Gm16-DeJCm4u2.js → PlayerAccountGamingLimitsPage2Gm16-CAfx0SZl.js} +386 -380
- package/components/{PlayerAccountGamingLimitsPage2Gm16-r8hmIPcw.js → PlayerAccountGamingLimitsPage2Gm16-djQdW8L6.js} +660 -654
- package/components/{PlayerAccountGamingLimitsWrapper2-BcKG_TxP.js → PlayerAccountGamingLimitsWrapper2-BKVQxFca.js} +1 -1
- package/components/{PlayerAccountGamingLimitsWrapper2-C8_zv-Gl.cjs → PlayerAccountGamingLimitsWrapper2-Coq_1wOX.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsWrapper2-CrOkdCAL.js → PlayerAccountGamingLimitsWrapper2-DY7OziU-.js} +1 -1
- package/components/{PlayerAccountMenu-0dwfNXzd.js → PlayerAccountMenu-CARKaeb_.js} +111 -110
- package/components/{PlayerAccountMenu-CIexYUdx.js → PlayerAccountMenu-CSjfFSiS.js} +111 -110
- package/components/PlayerAccountMenu-DbPwX5s7.cjs +1 -0
- package/components/PlayerAccountNotifications-C1NLTeZY.js +372 -0
- package/components/{PlayerAccountNotifications-C69KyNWq.js → PlayerAccountNotifications-DFauPmd4.js} +62 -61
- package/components/PlayerAccountNotifications-VnrN4aPw.cjs +1 -0
- package/components/{PlayerAccountSelfExclusion-BK4Qt06B.js → PlayerAccountSelfExclusion-BKNMjGeJ.js} +2 -2
- package/components/{PlayerAccountSelfExclusion-C3aFEBGZ.js → PlayerAccountSelfExclusion-BYJ28ASb.js} +2 -2
- package/components/{PlayerAccountSelfExclusion-EEwqevwK.cjs → PlayerAccountSelfExclusion-CcBtRscg.cjs} +2 -2
- package/components/{PlayerAccountTimeout-Dt4WJonL.js → PlayerAccountTimeout-B3AH6XOt.js} +2 -2
- package/components/{PlayerAccountTimeout-C5AtNWo7.js → PlayerAccountTimeout-Bkmp3-eA.js} +2 -2
- package/components/{PlayerAccountTimeout-gK_YDrBY.cjs → PlayerAccountTimeout-CLi5If_j.cjs} +1 -1
- package/components/{PlayerActiveBonuses-CLoyGNwd.js → PlayerActiveBonuses-BRNrSu8p.js} +1 -1
- package/components/{PlayerActiveBonuses-BVXu2xEB.js → PlayerActiveBonuses-C2N9z4Wk.js} +1 -1
- package/components/{PlayerActiveBonuses-B3sDjZPu.cjs → PlayerActiveBonuses-NHzgl6B8.cjs} +1 -1
- package/components/PlayerBonusCard-B1SyuM2F.cjs +1 -0
- package/components/{PlayerBonusCard-B6SaZ0cC.js → PlayerBonusCard-BnXPy7Pl.js} +144 -143
- package/components/{PlayerBonusCard-DMwbLjEW.js → PlayerBonusCard-ys8sEqaW.js} +144 -143
- package/components/{PlayerBonusHistory-D3v1Hfnf.js → PlayerBonusHistory-DMarejVg.js} +2 -2
- package/components/{PlayerBonusHistory-DLUJJGqO.js → PlayerBonusHistory-DSTP6ZoH.js} +2 -2
- package/components/{PlayerBonusHistory-BmOgSTUS.cjs → PlayerBonusHistory-Dg5LjtIZ.cjs} +1 -1
- package/components/{PlayerGamingHistory-CNBltDve.cjs → PlayerGamingHistory-Bz-tWEB-.cjs} +1 -1
- package/components/{PlayerGamingHistory-BYvXvoys.js → PlayerGamingHistory-C-a7eWUa.js} +1 -1
- package/components/{PlayerGamingHistory-C5cNuG6o.js → PlayerGamingHistory-CUv-flEN.js} +1 -1
- package/components/{PlayerProfileInfo-4pEf39os.cjs → PlayerProfileInfo-B2B_yWpR.cjs} +1 -1
- package/components/{PlayerProfileInfo-DKjkFgUz.js → PlayerProfileInfo-DCG1m8s7.js} +1 -1
- package/components/{PlayerProfileInfo-CpFhQZ8r.js → PlayerProfileInfo-TSYhIxp0.js} +1 -1
- package/components/{PlayerRealityCheck-CEu6HPSc.js → PlayerRealityCheck-BCc9e1-4.js} +1 -1
- package/components/{PlayerRealityCheck-DiJJz_Fj.cjs → PlayerRealityCheck-Bs__HuR3.cjs} +1 -1
- package/components/{PlayerRealityCheck-CYMfPzuq.js → PlayerRealityCheck-YPtJgHZo.js} +1 -1
- 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/{app-globals-0f993ce5-DzSE6TtH.js → app-globals-0f993ce5-CQ9uDp49.js} +4 -2
- package/stencil/app-globals-0f993ce5-zj2RKZu-.cjs +1 -0
- package/stencil/{checkbox-group-input_9-DEGGgpku.js → checkbox-group-input_9-BRv_piPJ.js} +102 -99
- package/stencil/{checkbox-group-input_9-DDKGgkML.cjs → checkbox-group-input_9-DCA5sbPo.cjs} +2 -2
- package/stencil/{checkbox-group-input_9-Cge1uYJD.js → checkbox-group-input_9-bIi7h3_V.js} +102 -99
- package/stencil/{general-input-D6ZzAION.js → general-input-CQs-v3_Y.js} +2 -2
- package/stencil/{general-input-CbzyUMpM.cjs → general-input-DgKQ0KIf.cjs} +2 -2
- package/stencil/{general-input-DGX9cnfM.js → general-input-OUKrtuTp.js} +2 -2
- package/stencil/{index-1ef3a64c-Cb8qLHe4.js → index-1ef3a64c-BQUwxiUT.js} +1 -1
- package/stencil/{index-1ef3a64c-CzlpRJE7.cjs → index-1ef3a64c-Btq5IvMJ.cjs} +1 -1
- package/stencil/{index-1ef3a64c-C4-h3nXC.js → index-1ef3a64c-Kn7ohe2t.js} +1 -1
- package/stencil/{index-7c5e707a-B9tD4t-g.js → index-21ba09dd-C-HsjTUn.js} +4 -4
- package/stencil/{index-7c5e707a-40SRy2Ab.js → index-21ba09dd-DNkmY6MF.js} +4 -4
- package/stencil/index-21ba09dd-lQRQL1Nd.cjs +1 -0
- package/stencil/index-34008883-B7S8keyz.js +577 -0
- package/stencil/index-34008883-CX1Vpol5.cjs +1 -0
- package/stencil/{index-9c0f6c58-DeLVbTUg.js → index-34008883-DRJSKOUl.js} +228 -200
- package/stencil/{index-9cd44522-DNHOiqex.js → index-9cd44522-C566YWys.js} +4 -4
- package/stencil/{index-9cd44522-bcseM6Tc.js → index-9cd44522-Crt8CtBe.js} +4 -4
- package/stencil/{index-9cd44522-BZa-k0xO.cjs → index-9cd44522-jv76DI6J.cjs} +1 -1
- package/stencil/{index-b2193545-DRVj_AmB.js → index-b2193545-BTiWOlSy.js} +1 -1
- package/stencil/{index-b2193545-lh5NrH1l.cjs → index-b2193545-CZLTKj69.cjs} +1 -1
- package/stencil/{index-b2193545-C2qi7zn0.js → index-b2193545-DXYxg-Ur.js} +1 -1
- package/stencil/index-b7bbd57e-98ddCQYl.js +534 -0
- package/stencil/index-b7bbd57e-BTUOk4HF.js +550 -0
- package/stencil/index-b7bbd57e-CCr8MvU_.cjs +1 -0
- package/stencil/{password-input_2-DfibVL8H.js → password-input_2-C84wWI7v.js} +2 -2
- package/stencil/{password-input_2-ChFdsN2L.cjs → password-input_2-Cb1ahifk.cjs} +1 -1
- package/stencil/{password-input_2-IaELIWPu.js → password-input_2-DQO_Gwqq.js} +2 -2
- package/stencil/{player-change-password-gm2-039e300e-h73P3BnO.cjs → player-change-password-gm2-039e300e-DIjTdjzy.cjs} +1 -1
- package/stencil/{player-change-password-gm2-039e300e-DQu1Qy42.js → player-change-password-gm2-039e300e-mRLvAYzw.js} +1 -1
- package/stencil/{player-change-password-gm2-039e300e-Cbvlv_Cc.js → player-change-password-gm2-039e300e-s9osP-86.js} +1 -1
- package/stencil/{player-change-password-gm2-Ddu97gwX.cjs → player-change-password-gm2-ADkIHrgJ.cjs} +1 -1
- package/stencil/{player-change-password-gm2-o8J_07IZ.js → player-change-password-gm2-CfP6Qbnu.js} +3 -3
- package/stencil/{player-change-password-gm2-CZ4CLVdX.js → player-change-password-gm2-imi6O1-U.js} +3 -3
- package/stencil/player-kyc-verification-CJSQoIZp.js +25 -0
- package/stencil/player-kyc-verification-ChHU4NZP.js +7 -0
- package/stencil/player-kyc-verification-YKqDy8y5.cjs +1 -0
- package/stencil/{player-kyc-verification-dmJNIHni.js → player-kyc-verification_2-EJZCFPKM.js} +67 -39
- package/stencil/player-kyc-verification_2-HIgoVn9n.cjs +180 -0
- package/stencil/{player-kyc-verification-z8R7nMzo.js → player-kyc-verification_2-w8_XwPSF.js} +58 -28
- package/stencil/{toggle-checkbox-input-BJReK7u2.js → toggle-checkbox-input-Bh9dCfaE.js} +1 -1
- package/stencil/{toggle-checkbox-input-DPSvf8jJ.cjs → toggle-checkbox-input-CDg0DAAQ.cjs} +1 -1
- package/stencil/{toggle-checkbox-input-CphJPGIs.js → toggle-checkbox-input-CFvMg26A.js} +1 -1
- package/stencil/ui-image-38c3c15f-B5VYjuwc.cjs +1 -0
- package/stencil/ui-image-38c3c15f-GCugIif_.js +39 -0
- package/stencil/ui-image-38c3c15f-jIUUUHF_.js +39 -0
- package/stencil/ui-image-C3z33p-I.js +29 -0
- package/stencil/ui-image-DZDIlV4g.js +11 -0
- package/stencil/ui-image-Doro4rUa.cjs +1 -0
- package/stencil/{user-transaction-history-BO92Qvk4.js → ui-image_2-CYG1_Yew.js} +111 -81
- package/stencil/ui-image_2-Cyb78tZB.cjs +1 -0
- package/stencil/{user-transaction-history-Bg6onQ-I.js → ui-image_2-nVKXie9g.js} +121 -93
- package/stencil/{ui-skeleton-BCpuJt-t.js → ui-skeleton-1aZpiK3a.js} +5 -5
- package/stencil/{ui-skeleton-ea659b95-79vEjTsx.js → ui-skeleton-6d1c12ae-C3kv5BUk.js} +2 -2
- package/stencil/{ui-skeleton-ea659b95-BrjFstai.js → ui-skeleton-6d1c12ae-CaaJODhZ.js} +2 -2
- package/stencil/{ui-skeleton-ea659b95-DuSAPIG5.cjs → ui-skeleton-6d1c12ae-DJPgMPrF.cjs} +2 -2
- package/stencil/{ui-skeleton-BAxmxOly.cjs → ui-skeleton-84ZRJzrd.cjs} +1 -1
- package/stencil/{ui-skeleton-BnjJK_-z.js → ui-skeleton-DX9fcIIz.js} +3 -3
- package/stencil/{user-deposit-withdrawal-CBWlU3d2.cjs → user-deposit-withdrawal-BC5Vpfet.cjs} +1 -1
- package/stencil/{user-deposit-withdrawal-Dnqg2IvK.js → user-deposit-withdrawal-DHbTwAxF.js} +2 -2
- package/stencil/{user-deposit-withdrawal-CE9oDw4W.js → user-deposit-withdrawal-IExj2XcB.js} +2 -2
- package/stencil/user-transaction-history-BQjF7asc.cjs +1 -0
- package/stencil/user-transaction-history-BhqF7ecn.js +7 -0
- package/stencil/user-transaction-history-GwpbhIB0.js +25 -0
- package/components/PlayerAccountMenu-Bra1jlKa.cjs +0 -1
- package/components/PlayerAccountNotifications-BJWMhwFJ.js +0 -371
- package/components/PlayerAccountNotifications-BgE2Nu5e.cjs +0 -1
- package/components/PlayerBonusCard-4A6XzJO6.cjs +0 -1
- package/stencil/app-globals-0f993ce5-DgYhdguE.cjs +0 -1
- package/stencil/index-7c5e707a-DosLPDO6.cjs +0 -1
- package/stencil/index-9c0f6c58-D5txcAjr.js +0 -549
- package/stencil/index-9c0f6c58-DeCWAW-B.cjs +0 -1
- package/stencil/player-kyc-verification-C0h2CP_Y.cjs +0 -180
- package/stencil/user-transaction-history-COJbthDt.cjs +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { b as r, p as s } from "./index-b7bbd57e-98ddCQYl.js";
|
|
2
|
+
import { b as a } from "./app-globals-0f993ce5-CQ9uDp49.js";
|
|
3
|
+
import { U as n } from "./ui-image-38c3c15f-jIUUUHF_.js";
|
|
4
|
+
var i = () => {
|
|
5
|
+
const t = import.meta.url, e = {};
|
|
6
|
+
return t !== "" && (e.resourcesUrl = new URL(".", t).href), s(e);
|
|
7
|
+
};
|
|
8
|
+
i().then(async (t) => (await a(), r([["ui-image", [[0, "ui-image", { src: [1], width: [1], height: [1], alt: [1], imgClass: [1, "img-class"], styles: [8], detectDistance: [1, "detect-distance"], imgLoaded: [32], shouldLoad: [32] }, null, { src: ["handleSrc"] }]]]], t)));
|
|
9
|
+
export {
|
|
10
|
+
n as ui_image
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var o=(t,i,r)=>new Promise((l,a)=>{var d=e=>{try{c(r.next(e))}catch(n){a(n)}},m=e=>{try{c(r.throw(e))}catch(n){a(n)}},c=e=>e.done?l(e.value):Promise.resolve(e.value).then(d,m);c((r=r.apply(t,i)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-b7bbd57e-CCr8MvU_.cjs"),p=require("./app-globals-0f993ce5-zj2RKZu-.cjs"),g=require("./ui-image-38c3c15f-B5VYjuwc.cjs");var s=typeof document!="undefined"?document.currentScript:null,f=()=>{const t=typeof document=="undefined"?require("url").pathToFileURL(__filename).href:s&&s.tagName.toUpperCase()==="SCRIPT"&&s.src||new URL("stencil/ui-image-Doro4rUa.cjs",document.baseURI).href,i={};return t!==""&&(i.resourcesUrl=new URL(".",t).href),u.promiseResolve(i)};f().then(t=>o(exports,null,function*(){return yield p.globalScripts$2(),u.bootstrapLazy([["ui-image",[[0,"ui-image",{src:[1],width:[1],height:[1],alt:[1],imgClass:[1,"img-class"],styles:[8],detectDistance:[1,"detect-distance"],imgLoaded:[32],shouldLoad:[32]},null,{src:["handleSrc"]}]]]],t)}));exports.ui_image=g.UiImage;
|
|
@@ -1,11 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { r as u, h as e, g as p, a as d, H as y } from "./index-21ba09dd-DNkmY6MF.js";
|
|
2
|
+
const v = ":host{display:block}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;transition:opacity 0.5s ease-in-out}", x = v, w = class {
|
|
3
|
+
constructor(t) {
|
|
4
|
+
u(this, t), this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.imgClass = "", this.styles = void 0, this.detectDistance = "200px", this.imgLoaded = !1, this.shouldLoad = !1;
|
|
5
|
+
}
|
|
6
|
+
handleSrc() {
|
|
7
|
+
if (!this.shouldLoad)
|
|
8
|
+
return;
|
|
9
|
+
const t = new Image();
|
|
10
|
+
t.src = this.src, t.onload = () => {
|
|
11
|
+
this.image && (this.image.src = this.src, this.imgLoaded = !0, this.el.dispatchEvent(new CustomEvent("load", { bubbles: !0 })));
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
componentDidLoad() {
|
|
15
|
+
"IntersectionObserver" in window ? (this.el.__uxComponent = this, window.EMUxObserver || (window.EMUxObserver = new IntersectionObserver((t) => {
|
|
16
|
+
t.forEach((a) => {
|
|
17
|
+
if (a.isIntersecting) {
|
|
18
|
+
const n = a.target.__uxComponent;
|
|
19
|
+
n && (n.shouldLoad = !0, n.handleSrc()), window.EMUxObserver.unobserve(a.target);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}, { rootMargin: this.detectDistance })), window.EMUxObserver.observe(this.el)) : (this.shouldLoad = !0, this.handleSrc());
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
return e("img", { key: "2bb4dc391fc2f753514103e91c0abf065de3236a", ref: (t) => this.image = t, style: this.styles, class: `${this.imgClass} ${this.imgLoaded ? "Visible" : "Hidden"}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" });
|
|
26
|
+
}
|
|
27
|
+
get el() {
|
|
28
|
+
return p(this);
|
|
29
|
+
}
|
|
30
|
+
static get watchers() {
|
|
31
|
+
return {
|
|
32
|
+
src: ["handleSrc"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
6
35
|
};
|
|
7
|
-
|
|
8
|
-
const
|
|
36
|
+
w.style = x;
|
|
37
|
+
const S = {
|
|
9
38
|
en: {
|
|
10
39
|
deposit: "Deposit",
|
|
11
40
|
withdrawals: "Withdrawals",
|
|
@@ -40,38 +69,38 @@ class o {
|
|
|
40
69
|
}
|
|
41
70
|
static async loadCustomTranslations(a) {
|
|
42
71
|
try {
|
|
43
|
-
const
|
|
72
|
+
const n = await fetch(a, {
|
|
44
73
|
headers: {
|
|
45
74
|
"Content-Type": "application/json"
|
|
46
75
|
}
|
|
47
76
|
});
|
|
48
|
-
if (!
|
|
49
|
-
const
|
|
50
|
-
throw new Error(
|
|
77
|
+
if (!n.ok) {
|
|
78
|
+
const s = await n.text();
|
|
79
|
+
throw new Error(s);
|
|
51
80
|
}
|
|
52
|
-
const
|
|
53
|
-
o.updateTranslations(
|
|
54
|
-
} catch (
|
|
55
|
-
console.error(`Failed to load translations ${a}. ${
|
|
81
|
+
const i = await n.json();
|
|
82
|
+
o.updateTranslations(i);
|
|
83
|
+
} catch (n) {
|
|
84
|
+
console.error(`Failed to load translations ${a}. ${n.message}`);
|
|
56
85
|
}
|
|
57
86
|
}
|
|
58
|
-
static translate(a,
|
|
59
|
-
var
|
|
60
|
-
const
|
|
61
|
-
return ((
|
|
87
|
+
static translate(a, n) {
|
|
88
|
+
var i, s;
|
|
89
|
+
const r = o.getAvaliableLanguages(n);
|
|
90
|
+
return ((s = (i = o.customTranslation) === null || i === void 0 ? void 0 : i[r.customLanguage]) === null || s === void 0 ? void 0 : s[a]) || o.defaultTranslation[r.predefinedLanguage][a];
|
|
62
91
|
}
|
|
63
92
|
static getAvaliableLanguages(a) {
|
|
64
|
-
var
|
|
65
|
-
const
|
|
66
|
-
return { predefinedLanguage: o.supportedLanguages.includes(a) ? a : o.defaultLanguage, customLanguage:
|
|
93
|
+
var n;
|
|
94
|
+
const i = !((n = o.customLanguages) === null || n === void 0) && n.includes(a) ? a : o.defaultLanguage;
|
|
95
|
+
return { predefinedLanguage: o.supportedLanguages.includes(a) ? a : o.defaultLanguage, customLanguage: i };
|
|
67
96
|
}
|
|
68
97
|
static updateTranslations(a) {
|
|
69
|
-
o.customLanguages = Array.from(/* @__PURE__ */ new Set([...o.supportedLanguages, ...Object.keys(a).map((
|
|
98
|
+
o.customLanguages = Array.from(/* @__PURE__ */ new Set([...o.supportedLanguages, ...Object.keys(a).map((n) => n.toLowerCase())])), o.customTranslation = a;
|
|
70
99
|
}
|
|
71
100
|
}
|
|
72
101
|
o.defaultLanguage = "en";
|
|
73
102
|
o.supportedLanguages = ["en"];
|
|
74
|
-
o.defaultTranslation =
|
|
103
|
+
o.defaultTranslation = S;
|
|
75
104
|
const k = () => e(
|
|
76
105
|
"div",
|
|
77
106
|
{ class: "loader" },
|
|
@@ -88,30 +117,30 @@ const k = () => e(
|
|
|
88
117
|
e("div", null),
|
|
89
118
|
e("div", null)
|
|
90
119
|
);
|
|
91
|
-
class
|
|
120
|
+
class g {
|
|
92
121
|
constructor() {
|
|
93
122
|
}
|
|
94
123
|
static dateToFormatedString(a) {
|
|
95
|
-
const
|
|
96
|
-
return `${
|
|
124
|
+
const n = a.toLocaleDateString("en-gb"), i = a.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 });
|
|
125
|
+
return `${n}, ${i}`;
|
|
97
126
|
}
|
|
98
127
|
}
|
|
99
|
-
class
|
|
128
|
+
class m {
|
|
100
129
|
constructor() {
|
|
101
130
|
}
|
|
102
|
-
static format(a,
|
|
103
|
-
let
|
|
131
|
+
static format(a, n) {
|
|
132
|
+
let i = `${n} ${a}`;
|
|
104
133
|
try {
|
|
105
|
-
|
|
134
|
+
i = new Intl.NumberFormat("en-US", {
|
|
106
135
|
style: "currency",
|
|
107
136
|
currency: a
|
|
108
|
-
}).format(
|
|
137
|
+
}).format(n);
|
|
109
138
|
} catch {
|
|
110
139
|
}
|
|
111
|
-
return
|
|
140
|
+
return i;
|
|
112
141
|
}
|
|
113
142
|
}
|
|
114
|
-
const
|
|
143
|
+
const C = (t) => e(
|
|
115
144
|
"div",
|
|
116
145
|
{ class: "data-transaction" },
|
|
117
146
|
e("p", null, t.productType),
|
|
@@ -125,25 +154,25 @@ const T = (t) => e(
|
|
|
125
154
|
{ class: "date" },
|
|
126
155
|
t.transId,
|
|
127
156
|
" | ",
|
|
128
|
-
|
|
157
|
+
g.dateToFormatedString(new Date(t.created))
|
|
129
158
|
),
|
|
130
159
|
e(
|
|
131
160
|
"p",
|
|
132
161
|
{ class: "text-style" },
|
|
133
|
-
|
|
162
|
+
m.format(t.currency, t.realAmount),
|
|
134
163
|
" "
|
|
135
164
|
)
|
|
136
|
-
),
|
|
165
|
+
), T = (t) => e(
|
|
137
166
|
"div",
|
|
138
167
|
{ class: "page-size" },
|
|
139
168
|
e("span", null, o.translate("show", t.language)),
|
|
140
169
|
t.pageSizes.map((a) => e("button", { class: t.currentPageSize === a ? "active" : "", onClick: () => t.changePageSize(a) }, a))
|
|
141
|
-
),
|
|
142
|
-
let
|
|
143
|
-
const
|
|
144
|
-
t =
|
|
145
|
-
},
|
|
146
|
-
a =
|
|
170
|
+
), B = ({ from: t, to: a, applyFilters: n, language: i }) => {
|
|
171
|
+
let s, r;
|
|
172
|
+
const f = () => {
|
|
173
|
+
t = s.value;
|
|
174
|
+
}, b = () => {
|
|
175
|
+
a = r.value;
|
|
147
176
|
};
|
|
148
177
|
return e(
|
|
149
178
|
"div",
|
|
@@ -154,7 +183,7 @@ const T = (t) => e(
|
|
|
154
183
|
e(
|
|
155
184
|
"div",
|
|
156
185
|
{ class: "date-input" },
|
|
157
|
-
e("vaadin-date-picker", { value: t, ref: (l) =>
|
|
186
|
+
e("vaadin-date-picker", { value: t, ref: (l) => s = l, label: o.translate("from", i), onChange: f })
|
|
158
187
|
),
|
|
159
188
|
e(
|
|
160
189
|
"span",
|
|
@@ -168,13 +197,13 @@ const T = (t) => e(
|
|
|
168
197
|
e(
|
|
169
198
|
"div",
|
|
170
199
|
{ class: "date-input" },
|
|
171
|
-
e("vaadin-date-picker", { value: a, ref: (l) =>
|
|
200
|
+
e("vaadin-date-picker", { value: a, ref: (l) => r = l, label: o.translate("to", i), onChange: b })
|
|
172
201
|
),
|
|
173
|
-
e("button", { class: "filter-btn", onClick: () =>
|
|
202
|
+
e("button", { class: "filter-btn", onClick: () => n(t, a) }, o.translate("filter", i))
|
|
174
203
|
)
|
|
175
204
|
);
|
|
176
|
-
},
|
|
177
|
-
const
|
|
205
|
+
}, L = ({ source: t, language: a }) => {
|
|
206
|
+
const n = [
|
|
178
207
|
{ name: o.translate("transactionId", a) },
|
|
179
208
|
{
|
|
180
209
|
name: o.translate("date", a)
|
|
@@ -193,54 +222,54 @@ const T = (t) => e(
|
|
|
193
222
|
e(
|
|
194
223
|
"thead",
|
|
195
224
|
null,
|
|
196
|
-
e("tr", null,
|
|
225
|
+
e("tr", null, n.map((i) => e("th", null, i.name)))
|
|
197
226
|
),
|
|
198
|
-
e("tbody", null, t.map((
|
|
227
|
+
e("tbody", null, t.map((i) => e(
|
|
199
228
|
"tr",
|
|
200
229
|
null,
|
|
201
|
-
e("td", null,
|
|
202
|
-
e("td", null,
|
|
230
|
+
e("td", null, i.transId),
|
|
231
|
+
e("td", null, g.dateToFormatedString(new Date(i.created))),
|
|
203
232
|
e(
|
|
204
233
|
"td",
|
|
205
234
|
null,
|
|
206
|
-
|
|
235
|
+
m.format(i.currency, i.realAmount),
|
|
207
236
|
" "
|
|
208
237
|
),
|
|
209
|
-
e("td", null,
|
|
238
|
+
e("td", null, i.productType),
|
|
210
239
|
e(
|
|
211
240
|
"td",
|
|
212
241
|
null,
|
|
213
|
-
e("span", { class:
|
|
242
|
+
e("span", { class: i.status.toLowerCase() }, i.status)
|
|
214
243
|
)
|
|
215
244
|
)))
|
|
216
245
|
);
|
|
217
246
|
};
|
|
218
247
|
function c(t, a) {
|
|
219
248
|
if (t) {
|
|
220
|
-
const
|
|
221
|
-
|
|
249
|
+
const n = document.createElement("style");
|
|
250
|
+
n.innerHTML = a, t.appendChild(n);
|
|
222
251
|
}
|
|
223
252
|
}
|
|
224
253
|
function h(t, a) {
|
|
225
|
-
const
|
|
226
|
-
fetch(
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
}).catch((
|
|
230
|
-
console.error("There was an error while trying to load client styling from URL",
|
|
254
|
+
const n = new URL(a);
|
|
255
|
+
fetch(n.href).then((i) => i.text()).then((i) => {
|
|
256
|
+
const s = document.createElement("style");
|
|
257
|
+
s.innerHTML = i, t && t.appendChild(s);
|
|
258
|
+
}).catch((i) => {
|
|
259
|
+
console.error("There was an error while trying to load client styling from URL", i);
|
|
231
260
|
});
|
|
232
261
|
}
|
|
233
|
-
function
|
|
262
|
+
function D(t, a, n) {
|
|
234
263
|
if (window.emMessageBus) {
|
|
235
|
-
const
|
|
236
|
-
window.emMessageBus.subscribe(a, (
|
|
237
|
-
|
|
264
|
+
const i = document.createElement("style");
|
|
265
|
+
window.emMessageBus.subscribe(a, (s) => {
|
|
266
|
+
i.innerHTML = s, t && t.appendChild(i);
|
|
238
267
|
});
|
|
239
268
|
}
|
|
240
269
|
}
|
|
241
|
-
const
|
|
270
|
+
const F = ':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:"";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}', I = F, M = class {
|
|
242
271
|
constructor(t) {
|
|
243
|
-
|
|
272
|
+
u(this, t), this.pageSizes = [10, 25, 50], this.pagination = null, this.endpoint = void 0, this.session = void 0, this.language = o.defaultLanguage, this.userId = void 0, this.translationUrl = void 0, this.mobile = !1, this.clientStyling = null, this.clientStylingUrl = null, this.mbSource = void 0, this.page = 0, this.pageSize = this.pageSizes[0], this.showMobileFilter = !1, this.to = void 0, this.from = void 0, this.type = "0", this.transactions = void 0, this.showLoader = !0;
|
|
244
273
|
}
|
|
245
274
|
watchMultiple() {
|
|
246
275
|
this.loadTransactions();
|
|
@@ -255,7 +284,7 @@ const M = ':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--h
|
|
|
255
284
|
this.translationUrl && await o.loadCustomTranslations(this.translationUrl), this.loadTransactions();
|
|
256
285
|
}
|
|
257
286
|
componentDidLoad() {
|
|
258
|
-
this.stylingContainer && (window.emMessageBus != null ?
|
|
287
|
+
this.stylingContainer && (window.emMessageBus != null ? D(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && c(this.stylingContainer, this.clientStyling), this.clientStylingUrl && h(this.stylingContainer, this.clientStylingUrl)));
|
|
259
288
|
}
|
|
260
289
|
componentDidRender() {
|
|
261
290
|
this.getComponentHeight();
|
|
@@ -296,8 +325,8 @@ const M = ':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--h
|
|
|
296
325
|
}
|
|
297
326
|
render() {
|
|
298
327
|
var t;
|
|
299
|
-
const a = d("../assets/filter.svg"),
|
|
300
|
-
return e(
|
|
328
|
+
const a = d("../assets/filter.svg"), n = d("../assets/warning.svg");
|
|
329
|
+
return e(y, { key: "d467e9c565084cc1cdd633e00448b3f96389ce34" }, this.showLoader ? e(k, null) : "", e("div", { key: "e1286eeb391fa540ffa413a2ad55f8b9161c1a2d", class: "wrapper", ref: (i) => this.stylingContainer = i }, e("div", { key: "3482b2f6417b78c402b6499c1e80e79772e066ae", class: { "types types-mobile": this.mobile, "types types-desktop": !this.mobile } }, e("button", { key: "37c9da8cd84ac3b01e0d28088999604005b22740", class: "transaction-type " + (this.type === "0" ? "clicked" : ""), onClick: () => this.changeTransactionsType("0") }, o.translate("deposit", this.language)), e("button", { key: "e6fd6057fc0adaf6741023997c870004baf8eb5d", class: "transaction-type " + (this.type === "1" ? "clicked" : ""), onClick: () => this.changeTransactionsType("1") }, o.translate("withdrawals", this.language))), this.mobile ? "" : e(T, { language: this.language, pageSizes: this.pageSizes, currentPageSize: this.pageSize, changePageSize: (i) => this.changePageSize(i) }), this.mobile ? e("button", { class: "mobile-filter-button", onClick: () => this.showFilter() }, e("ui-image", { src: a, alt: "Filter" }), o.translate("filter", this.language)) : "", !this.mobile || this.showMobileFilter && this.mobile ? e(B, { language: this.language, applyFilters: (i, s) => this.applyFilters(i, s) }) : "", ((t = this.transactions) === null || t === void 0 ? void 0 : t.length) > 0 ? e("div", { class: "table" }, this.mobile ? e("div", { class: "mobile-table" }, this.transactions.map((i) => e(C, Object.assign({}, i)))) : e(L, { source: this.transactions, language: this.language })) : e("div", { class: "noData" }, e("ui-image", { src: n, alt: "Warning" }), e("span", null, o.translate("noData", this.language))), e("div", { key: "f1e16d2395614016c31dd35f422ca9146c7dfdfa", class: "pagination" }, e("button", { key: "be18928021e45ed4e4c3dc5fe6e3d41a51c2c95e", onClick: () => this.prev() }, "<"), e("button", { key: "3e871ad1f4aff6c8f43c93ba2f95d122c6bc8af8", onClick: () => this.next() }, ">"))));
|
|
301
330
|
}
|
|
302
331
|
async loadTransactions() {
|
|
303
332
|
this.showLoader = !0;
|
|
@@ -309,11 +338,11 @@ const M = ':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--h
|
|
|
309
338
|
}
|
|
310
339
|
});
|
|
311
340
|
if (!a.ok) {
|
|
312
|
-
const
|
|
313
|
-
throw new Error(
|
|
341
|
+
const i = await a.text();
|
|
342
|
+
throw new Error(i);
|
|
314
343
|
}
|
|
315
|
-
const
|
|
316
|
-
this.pagination =
|
|
344
|
+
const n = await a.json();
|
|
345
|
+
this.pagination = n.pagination, this.transactions = n.transactions;
|
|
317
346
|
} catch (t) {
|
|
318
347
|
console.error(t);
|
|
319
348
|
} finally {
|
|
@@ -322,14 +351,14 @@ const M = ':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--h
|
|
|
322
351
|
}
|
|
323
352
|
getParams() {
|
|
324
353
|
var t, a;
|
|
325
|
-
const
|
|
326
|
-
return `offset=${
|
|
354
|
+
const n = /* @__PURE__ */ new Date(), i = (this.page * this.pageSize).toString(), s = (t = this.from) !== null && t !== void 0 ? t : new Date(n.getFullYear(), n.getMonth(), 1).toISOString(), r = (a = this.to) !== null && a !== void 0 ? a : new Date(n.getFullYear(), n.getMonth() + 1, 0).toISOString();
|
|
355
|
+
return `offset=${i}&endDate=${r}&startDate=${s}&type=${this.type}&limit=${this.pageSize}`;
|
|
327
356
|
}
|
|
328
357
|
static get assetsDirs() {
|
|
329
358
|
return ["../assets"];
|
|
330
359
|
}
|
|
331
360
|
get el() {
|
|
332
|
-
return
|
|
361
|
+
return p(this);
|
|
333
362
|
}
|
|
334
363
|
static get watchers() {
|
|
335
364
|
return {
|
|
@@ -344,7 +373,8 @@ const M = ':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--h
|
|
|
344
373
|
};
|
|
345
374
|
}
|
|
346
375
|
};
|
|
347
|
-
|
|
376
|
+
M.style = I;
|
|
348
377
|
export {
|
|
349
|
-
|
|
378
|
+
w as ui_image,
|
|
379
|
+
M as user_transaction_history
|
|
350
380
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var h=(t,a,n)=>new Promise((i,s)=>{var l=r=>{try{d(n.next(r))}catch(u){s(u)}},c=r=>{try{d(n.throw(r))}catch(u){s(u)}},d=r=>r.done?i(r.value):Promise.resolve(r.value).then(l,c);d((n=n.apply(t,a)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-21ba09dd-lQRQL1Nd.cjs"),v=":host{display:block}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;transition:opacity 0.5s ease-in-out}",x=v,m=class{constructor(t){e.registerInstance(this,t),this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.imgClass="",this.styles=void 0,this.detectDistance="200px",this.imgLoaded=!1,this.shouldLoad=!1}handleSrc(){if(!this.shouldLoad)return;const t=new Image;t.src=this.src,t.onload=()=>{this.image&&(this.image.src=this.src,this.imgLoaded=!0,this.el.dispatchEvent(new CustomEvent("load",{bubbles:!0})))}}componentDidLoad(){"IntersectionObserver"in window?(this.el.__uxComponent=this,window.EMUxObserver||(window.EMUxObserver=new IntersectionObserver(t=>{t.forEach(a=>{if(a.isIntersecting){const n=a.target.__uxComponent;n&&(n.shouldLoad=!0,n.handleSrc()),window.EMUxObserver.unobserve(a.target)}})},{rootMargin:this.detectDistance})),window.EMUxObserver.observe(this.el)):(this.shouldLoad=!0,this.handleSrc())}render(){return e.h("img",{key:"2bb4dc391fc2f753514103e91c0abf065de3236a",ref:t=>this.image=t,style:this.styles,class:`${this.imgClass} ${this.imgLoaded?"Visible":"Hidden"}`,alt:this.alt,width:this.width,height:this.height,loading:"lazy"})}get el(){return e.getElement(this)}static get watchers(){return{src:["handleSrc"]}}};m.style=x;const w={en:{deposit:"Deposit",withdrawals:"Withdrawals",show:"Show",from:"From",to:"To",filter:"Filter",transactionId:"Transaction ID",date:"Date",amount:"Amount",productType:"Product Type",status:"Status",noData:"There are no account activities"},hr:{deposit:"Uplate",withdrawals:"Isplate",show:"Prikaži",from:"Od",to:"Do",filter:"Filter",transactionId:"ID transakcije",date:"Datum",amount:"Iznos",productType:"Vrsta proizvoda",status:"Status",noData:"Nema aktivnosti na računu"}};class o{constructor(){}static loadCustomTranslations(a){return h(this,null,function*(){try{const n=yield fetch(a,{headers:{"Content-Type":"application/json"}});if(!n.ok){const s=yield n.text();throw new Error(s)}const i=yield n.json();o.updateTranslations(i)}catch(n){console.error(`Failed to load translations ${a}. ${n.message}`)}})}static translate(a,n){var i,s;const l=o.getAvaliableLanguages(n);return((s=(i=o.customTranslation)===null||i===void 0?void 0:i[l.customLanguage])===null||s===void 0?void 0:s[a])||o.defaultTranslation[l.predefinedLanguage][a]}static getAvaliableLanguages(a){var n;const i=!((n=o.customLanguages)===null||n===void 0)&&n.includes(a)?a:o.defaultLanguage;return{predefinedLanguage:o.supportedLanguages.includes(a)?a:o.defaultLanguage,customLanguage:i}}static updateTranslations(a){o.customLanguages=Array.from(new Set([...o.supportedLanguages,...Object.keys(a).map(n=>n.toLowerCase())])),o.customTranslation=a}}o.defaultLanguage="en";o.supportedLanguages=["en"];o.defaultTranslation=w;const S=()=>e.h("div",{class:"loader"},e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null));class f{constructor(){}static dateToFormatedString(a){const n=a.toLocaleDateString("en-gb"),i=a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1});return`${n}, ${i}`}}class b{constructor(){}static format(a,n){let i=`${n} ${a}`;try{i=new Intl.NumberFormat("en-US",{style:"currency",currency:a}).format(n)}catch(s){}return i}}const k=t=>e.h("div",{class:"data-transaction"},e.h("p",null,t.productType),e.h("p",{class:"text-style text-style-status"},e.h("span",{class:t.status.toLowerCase()},t.status)),e.h("p",{class:"date"},t.transId," | ",f.dateToFormatedString(new Date(t.created))),e.h("p",{class:"text-style"},b.format(t.currency,t.realAmount)," ")),C=t=>e.h("div",{class:"page-size"},e.h("span",null,o.translate("show",t.language)),t.pageSizes.map(a=>e.h("button",{class:t.currentPageSize===a?"active":"",onClick:()=>t.changePageSize(a)},a))),T=({from:t,to:a,applyFilters:n,language:i})=>{let s,l;const c=()=>{t=s.value},d=()=>{a=l.value};return e.h("div",{class:"period"},e.h("div",{class:"period-content"},e.h("div",{class:"date-input"},e.h("vaadin-date-picker",{value:t,ref:r=>s=r,label:o.translate("from",i),onChange:c})),e.h("span",null,e.h("svg",{width:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{d:"m21 11.75c0-.414-.336-.75-.75-.75h-16.5c-.414 0-.75.336-.75.75s.336.75.75.75h16.5c.414 0 .75-.336.75-.75z","fill-rule":"nonzero",fill:"#5d687b"}))),e.h("div",{class:"date-input"},e.h("vaadin-date-picker",{value:a,ref:r=>l=r,label:o.translate("to",i),onChange:d})),e.h("button",{class:"filter-btn",onClick:()=>n(t,a)},o.translate("filter",i))))},B=({source:t,language:a})=>{const n=[{name:o.translate("transactionId",a)},{name:o.translate("date",a)},{name:o.translate("amount",a)},{name:o.translate("productType",a)},{name:o.translate("status",a)}];return e.h("table",null,e.h("thead",null,e.h("tr",null,n.map(i=>e.h("th",null,i.name)))),e.h("tbody",null,t.map(i=>e.h("tr",null,e.h("td",null,i.transId),e.h("td",null,f.dateToFormatedString(new Date(i.created))),e.h("td",null,b.format(i.currency,i.realAmount)," "),e.h("td",null,i.productType),e.h("td",null,e.h("span",{class:i.status.toLowerCase()},i.status))))))};function p(t,a){if(t){const n=document.createElement("style");n.innerHTML=a,t.appendChild(n)}}function g(t,a){const n=new URL(a);fetch(n.href).then(i=>i.text()).then(i=>{const s=document.createElement("style");s.innerHTML=i,t&&t.appendChild(s)}).catch(i=>{console.error("There was an error while trying to load client styling from URL",i)})}function L(t,a,n){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(a,s=>{i.innerHTML=s,t&&t.appendChild(i)})}}const D=':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:"";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}',I=D,y=class{constructor(t){e.registerInstance(this,t),this.pageSizes=[10,25,50],this.pagination=null,this.endpoint=void 0,this.session=void 0,this.language=o.defaultLanguage,this.userId=void 0,this.translationUrl=void 0,this.mobile=!1,this.clientStyling=null,this.clientStylingUrl=null,this.mbSource=void 0,this.page=0,this.pageSize=this.pageSizes[0],this.showMobileFilter=!1,this.to=void 0,this.from=void 0,this.type="0",this.transactions=void 0,this.showLoader=!0}watchMultiple(){this.loadTransactions()}handleClientStylingChange(t,a){t!=a&&p(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,a){t!=a&&this.clientStylingUrl&&g(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){return h(this,null,function*(){this.translationUrl&&(yield o.loadCustomTranslations(this.translationUrl)),this.loadTransactions()})}componentDidLoad(){this.stylingContainer&&(window.emMessageBus!=null?L(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&p(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&g(this.stylingContainer,this.clientStylingUrl)))}componentDidRender(){this.getComponentHeight()}getComponentHeight(){var t;if(this.mobile){let a=this.el.getBoundingClientRect().height-((t=this.el.shadowRoot.querySelector(".table"))===null||t===void 0?void 0:t.getBoundingClientRect().y);this.el.style.setProperty("--heightScrollableContainer",a+"px")}}setHeightTableProperty(){let t=this.getComponentHeight();this.el.style.setProperty("--heightScrollableContainer",t+"px")}changeTransactionsType(t){this.type=t}changePageSize(t){this.pageSize=t}prev(){var t;!((t=this.pagination)===null||t===void 0)&&t.previous&&this.page--}next(){var t;!((t=this.pagination)===null||t===void 0)&&t.next&&this.page++}applyFilters(t,a){this.from=t?new Date(t).toISOString():null,this.to=a?new Date(a).toISOString():null,this.loadTransactions()}showFilter(){this.showMobileFilter=!this.showMobileFilter}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){var t;const a=e.getAssetPath("../assets/filter.svg"),n=e.getAssetPath("../assets/warning.svg");return e.h(e.Host,{key:"d467e9c565084cc1cdd633e00448b3f96389ce34"},this.showLoader?e.h(S,null):"",e.h("div",{key:"e1286eeb391fa540ffa413a2ad55f8b9161c1a2d",class:"wrapper",ref:i=>this.stylingContainer=i},e.h("div",{key:"3482b2f6417b78c402b6499c1e80e79772e066ae",class:{"types types-mobile":this.mobile,"types types-desktop":!this.mobile}},e.h("button",{key:"37c9da8cd84ac3b01e0d28088999604005b22740",class:"transaction-type "+(this.type==="0"?"clicked":""),onClick:()=>this.changeTransactionsType("0")},o.translate("deposit",this.language)),e.h("button",{key:"e6fd6057fc0adaf6741023997c870004baf8eb5d",class:"transaction-type "+(this.type==="1"?"clicked":""),onClick:()=>this.changeTransactionsType("1")},o.translate("withdrawals",this.language))),this.mobile?"":e.h(C,{language:this.language,pageSizes:this.pageSizes,currentPageSize:this.pageSize,changePageSize:i=>this.changePageSize(i)}),this.mobile?e.h("button",{class:"mobile-filter-button",onClick:()=>this.showFilter()},e.h("ui-image",{src:a,alt:"Filter"}),o.translate("filter",this.language)):"",!this.mobile||this.showMobileFilter&&this.mobile?e.h(T,{language:this.language,applyFilters:(i,s)=>this.applyFilters(i,s)}):"",((t=this.transactions)===null||t===void 0?void 0:t.length)>0?e.h("div",{class:"table"},this.mobile?e.h("div",{class:"mobile-table"},this.transactions.map(i=>e.h(k,Object.assign({},i)))):e.h(B,{source:this.transactions,language:this.language})):e.h("div",{class:"noData"},e.h("ui-image",{src:n,alt:"Warning"}),e.h("span",null,o.translate("noData",this.language))),e.h("div",{key:"f1e16d2395614016c31dd35f422ca9146c7dfdfa",class:"pagination"},e.h("button",{key:"be18928021e45ed4e4c3dc5fe6e3d41a51c2c95e",onClick:()=>this.prev()},"<"),e.h("button",{key:"3e871ad1f4aff6c8f43c93ba2f95d122c6bc8af8",onClick:()=>this.next()},">"))))}loadTransactions(){return h(this,null,function*(){this.showLoader=!0;try{const t=`${this.endpoint}/v1/player/${this.userId}/transactions/banking?${this.getParams()}`,a=yield fetch(t,{headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!a.ok){const i=yield a.text();throw new Error(i)}const n=yield a.json();this.pagination=n.pagination,this.transactions=n.transactions}catch(t){console.error(t)}finally{this.showLoader=!1}})}getParams(){var t,a;const n=new Date,i=(this.page*this.pageSize).toString(),s=(t=this.from)!==null&&t!==void 0?t:new Date(n.getFullYear(),n.getMonth(),1).toISOString(),l=(a=this.to)!==null&&a!==void 0?a:new Date(n.getFullYear(),n.getMonth()+1,0).toISOString();return`offset=${i}&endDate=${l}&startDate=${s}&type=${this.type}&limit=${this.pageSize}`}static get assetsDirs(){return["../assets"]}get el(){return e.getElement(this)}static get watchers(){return{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],showMobileFilter:["getComponentHeight"]}}};y.style=I;exports.ui_image=m;exports.user_transaction_history=y;
|