@everymatrix/player-account-controller 1.52.6 → 1.53.10
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/{GeneralLogout-DMvKimEo.js → GeneralLogout-Ddt-oH9k.js} +1597 -1648
- package/components/{PlayerAccountBettingHistory-YNLbWHxl.js → PlayerAccountBettingHistory-C7xwYi03.js} +34 -35
- package/components/{PlayerAccountBiometrics-CXLK5_xT.js → PlayerAccountBiometrics-D7WS5cnI.js} +1 -1
- package/components/{PlayerAccountClosure-BkKcpa4J.js → PlayerAccountClosure-yRlo8hXR.js} +1 -1
- package/components/{PlayerAccountController-CiUzS_BP.js → PlayerAccountController-BZYAo3oo.js} +1159 -839
- package/components/{PlayerAccountGamingLimits-CncKhl1f.js → PlayerAccountGamingLimits-CTBhVGgC.js} +3 -3
- package/components/{PlayerAccountGamingLimitsConfirmationModal-CNTlXu7V.js → PlayerAccountGamingLimitsConfirmationModal-CuQvNzww.js} +38 -38
- package/components/{PlayerAccountGamingLimitsGroupEdit-xwjN2SUl.js → PlayerAccountGamingLimitsGroupEdit-Du2YQlDU.js} +16 -16
- package/components/{PlayerAccountGamingLimitsHistory2-DF8kvIf6.js → PlayerAccountGamingLimitsHistory2-CXKA0L0d.js} +121 -132
- package/components/{PlayerAccountGamingLimitsInfoCard-mx0b5AlT.js → PlayerAccountGamingLimitsInfoCard-CWTybgoQ.js} +4 -4
- package/components/{PlayerAccountGamingLimitsPage2Gm16-DOrDUxtW.js → PlayerAccountGamingLimitsPage2Gm16-CXjNcIFP.js} +1519 -1116
- package/components/{PlayerAccountGamingLimitsPopup-Bt4YlCWi.js → PlayerAccountGamingLimitsPopup-CJu5RRl6.js} +1 -1
- package/components/{PlayerAccountGamingLimitsWrapper2-DWYQKT4Z.js → PlayerAccountGamingLimitsWrapper2-BdpxEDlV.js} +75 -81
- package/components/PlayerAccountGeneralConfirmationModal-DG0N686t.js +365 -0
- package/components/{PlayerAccountMenu-5esyJ_VN.js → PlayerAccountMenu-CZBa8_5G.js} +66 -67
- package/components/PlayerAccountModal-BmKjtXKT.js +213 -0
- package/components/{PlayerAccountNotifications-B02Ownhe.js → PlayerAccountNotifications-B4Ht-hHj.js} +1 -1
- package/components/{PlayerAccountSelfExclusion-DqsaRZd-.js → PlayerAccountSelfExclusion-DxGHXTb8.js} +7663 -6480
- package/components/{PlayerAccountTimeout-Bv1n-ekz.js → PlayerAccountTimeout-DOSjICsY.js} +448 -288
- package/components/PlayerActiveBonuses-DMAG7NUP.js +1088 -0
- package/components/PlayerBonusCard-Dss1REmn.js +701 -0
- package/components/{PlayerBonusHistory-CgmyowiO.js → PlayerBonusHistory-BxBiQwQf.js} +53 -53
- package/components/{PlayerChangePassword-N_UEFJNT.js → PlayerChangePassword-DnCj-wcc.js} +1 -1
- package/components/{PlayerDeposit-B75tYEgl.js → PlayerDeposit-CHIQ8EaC.js} +1 -1
- package/components/{PlayerGamingHistory-r_Ze8tP6.js → PlayerGamingHistory-BtQ73TId.js} +375 -388
- package/components/{PlayerPendingWithdrawals-BSTgce9H.js → PlayerPendingWithdrawals-BbTa7_8U.js} +1 -1
- package/components/{PlayerProfileInfo-yn20xol3.js → PlayerProfileInfo-CvAqD3Dk.js} +532 -549
- package/components/{PlayerRealityCheck-A_mZq3YZ.js → PlayerRealityCheck-3d-B64ie.js} +175 -191
- package/components/{PlayerTransactionHistory-DllIB_qE.js → PlayerTransactionHistory-BYJNabMB.js} +1 -1
- package/components/{PlayerWithdrawal-t5mlX5CD.js → PlayerWithdrawal-DDWroufG.js} +1 -1
- package/esnext/player-account-controller.js +14 -0
- package/package.json +8 -33
- package/stencil/active-mixin-59dfae2a-BphP4pp5.js +9700 -0
- package/stencil/{app-globals-0f993ce5-aPSxk6sG.js → app-globals-0f993ce5-C0vi_PY4.js} +5 -3
- package/stencil/checkbox-group-input_9-CMFoK7_E.js +15610 -0
- package/stencil/general-input-DnFPstQP.js +48 -0
- package/stencil/index-062e829b-DAFsZs6D.js +686 -0
- package/stencil/index-33f005e1-fFxPaeNy.js +632 -0
- package/stencil/index-9b3245b3-rzHgwqlB.js +625 -0
- package/stencil/index-fc58390d-BSwfXuUs.js +691 -0
- package/stencil/locale-BG_TzyDt.js +141 -0
- package/stencil/password-input_2-Bb9Q6Fe0.js +2359 -0
- package/stencil/player-change-password-gm2-98dcb7bc-gLcZhl3S.js +253 -0
- package/stencil/player-change-password-gm2-DR3e2gh5.js +7 -0
- package/stencil/{player-kyc-verification-BwGXWzTR.js → player-kyc-verification-BQZdJFEJ.js} +62 -84
- package/stencil/toggle-checkbox-input-CCLW6-uK.js +46 -0
- package/stencil/tooltipIcon-ee9760a8-BCCb4EU-.js +4 -0
- package/stencil/user-deposit-withdrawal-CmF0LoNb.js +646 -0
- package/stencil/{user-transaction-history-DcAGbFDl.js → user-transaction-history-BgV-k2Cl.js} +109 -135
- package/components/GeneralLogout-BW6b3iuS.cjs +0 -8
- package/components/PlayerAccountBettingHistory-BsFzBNDY.cjs +0 -1
- package/components/PlayerAccountBiometrics-BrlNlZ5N.cjs +0 -1
- package/components/PlayerAccountClosure-DfJc6Ip_.cjs +0 -1
- package/components/PlayerAccountController-BCgHKjX_.cjs +0 -1
- package/components/PlayerAccountGamingLimits-96NZsRcC.cjs +0 -1
- package/components/PlayerAccountGamingLimitsConfirmationModal-IgBYV9F2.cjs +0 -1
- package/components/PlayerAccountGamingLimitsGroupEdit-DKM3If51.cjs +0 -10
- package/components/PlayerAccountGamingLimitsHistory2-B_7Y0DgS.cjs +0 -1
- package/components/PlayerAccountGamingLimitsInfoCard-ZuPsBZ-7.cjs +0 -1
- package/components/PlayerAccountGamingLimitsPage2Gm16-Bk3IO9F3.cjs +0 -21
- package/components/PlayerAccountGamingLimitsPopup-ChBLdQR7.cjs +0 -1
- package/components/PlayerAccountGamingLimitsWrapper2-BZk_esEY.cjs +0 -1
- package/components/PlayerAccountMenu-C704oUrC.cjs +0 -1
- package/components/PlayerAccountModal-C52SG5dV.cjs +0 -1
- package/components/PlayerAccountModal-xliz3ECZ.js +0 -198
- package/components/PlayerAccountNotifications-DkgHtUGj.cjs +0 -1
- package/components/PlayerAccountSelfExclusion-ZG_OgxFL.cjs +0 -4171
- package/components/PlayerAccountTimeout-Xd8jT-L0.cjs +0 -1
- package/components/PlayerActiveBonuses-B53gZwaj.cjs +0 -1
- package/components/PlayerActiveBonuses-ChTcxPXy.js +0 -998
- package/components/PlayerBonusCard-CT1IXXnh.js +0 -579
- package/components/PlayerBonusCard-Crm5CyLi.cjs +0 -1
- package/components/PlayerBonusHistory-BefrVGm1.cjs +0 -1
- package/components/PlayerChangePassword-CzR4Xz0H.cjs +0 -3
- package/components/PlayerDeposit-3qNMb75V.cjs +0 -1
- package/components/PlayerGamingHistory-BQUPgJN5.cjs +0 -1
- package/components/PlayerPendingWithdrawals-BG3I8ifu.cjs +0 -1
- package/components/PlayerProfileInfo-BX32t6wz.cjs +0 -1
- package/components/PlayerRealityCheck-C26ZBWae.cjs +0 -1
- package/components/PlayerTransactionHistory-CJqhYnbs.cjs +0 -1
- package/components/PlayerWithdrawal-GDc_7hZX.cjs +0 -1
- package/es2015/player-account-controller.cjs +0 -1
- package/es2015/player-account-controller.js +0 -16
- package/stencil/app-globals-0f993ce5-CKh2cbmz.cjs +0 -1
- package/stencil/index-0437c9c0-06LlHN6E.cjs +0 -1
- package/stencil/index-0437c9c0-1mLvhyVA.js +0 -592
- package/stencil/index-657e7a14-Dopxomhu.cjs +0 -1
- package/stencil/index-657e7a14-P-JSyx_m.js +0 -588
- package/stencil/index-e8249896-BNsgFr_R.cjs +0 -1
- package/stencil/index-e8249896-CIP0iOYr.js +0 -658
- package/stencil/player-kyc-verification-B9QbNY0o.cjs +0 -180
- package/stencil/user-deposit-withdrawal-C5Lmtrkj.cjs +0 -59
- package/stencil/user-deposit-withdrawal-D5CgtcqD.js +0 -651
- package/stencil/user-transaction-history-AoseShHM.cjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var d=(e,a,n)=>new Promise((o,r)=>{var l=s=>{try{c(n.next(s))}catch(p){r(p)}},h=s=>{try{c(n.throw(s))}catch(p){r(p)}},c=s=>s.done?o(s.value):Promise.resolve(s.value).then(l,h);c((n=n.apply(e,a)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-e8249896-BNsgFr_R.cjs"),b=require("./app-globals-0f993ce5-CKh2cbmz.cjs");var u=typeof document!="undefined"?document.currentScript:null,y=()=>{const e=typeof document=="undefined"?require("url").pathToFileURL(__filename).href:u&&u.tagName.toUpperCase()==="SCRIPT"&&u.src||new URL("stencil/user-transaction-history-AoseShHM.cjs",document.baseURI).href,a={};return e!==""&&(a.resourcesUrl=new URL(".",e).href),t.promiseResolve(a)};y().then(e=>d(exports,null,function*(){return yield b.globalScripts$2(),t.bootstrapLazy([["user-transaction-history",[[1,"user-transaction-history",{endpoint:[513],session:[513],language:[513],userId:[513,"user-id"],translationUrl:[513,"translation-url"],mobile:[516],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],page:[32],pageSize:[32],showMobileFilter:[32],to:[32],from:[32],type:[32],transactions:[32],showLoader:[32]},[[9,"resize","getComponentHeight"]],{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],showMobileFilter:["getComponentHeight"]}]]]],e)}));const v={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 i{constructor(){}static loadCustomTranslations(a){return d(this,null,function*(){try{const n=yield fetch(a,{headers:{"Content-Type":"application/json"}});if(!n.ok){const r=yield n.text();throw new Error(r)}const o=yield n.json();i.updateTranslations(o)}catch(n){console.error(`Failed to load translations ${a}. ${n.message}`)}})}static translate(a,n){var o,r;const l=i.getAvaliableLanguages(n);return((r=(o=i.customTranslation)===null||o===void 0?void 0:o[l.customLanguage])===null||r===void 0?void 0:r[a])||i.defaultTranslation[l.predefinedLanguage][a]}static getAvaliableLanguages(a){var n;const o=!((n=i.customLanguages)===null||n===void 0)&&n.includes(a)?a:i.defaultLanguage;return{predefinedLanguage:i.supportedLanguages.includes(a)?a:i.defaultLanguage,customLanguage:o}}static updateTranslations(a){i.customLanguages=Array.from(new Set([...i.supportedLanguages,...Object.keys(a).map(n=>n.toLowerCase())])),i.customTranslation=a}}i.defaultLanguage="en";i.supportedLanguages=["en"];i.defaultTranslation=v;const x=()=>t.h("div",{class:"loader"},t.h("div",null),t.h("div",null),t.h("div",null),t.h("div",null),t.h("div",null),t.h("div",null),t.h("div",null),t.h("div",null),t.h("div",null),t.h("div",null),t.h("div",null),t.h("div",null));class g{constructor(){}static dateToFormatedString(a){const n=a.toLocaleDateString("en-gb"),o=a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1});return`${n}, ${o}`}}class m{constructor(){}static format(a,n){let o=`${n} ${a}`;try{o=new Intl.NumberFormat("en-US",{style:"currency",currency:a}).format(n)}catch(r){}return o}}const w=e=>t.h("div",{class:"data-transaction"},t.h("p",null,e.productType),t.h("p",{class:"text-style text-style-status"},t.h("span",{class:e.status.toLowerCase()},e.status)),t.h("p",{class:"date"},e.transId," | ",g.dateToFormatedString(new Date(e.created))),t.h("p",{class:"text-style"},m.format(e.currency,e.realAmount)," ")),k=e=>t.h("div",{class:"page-size"},t.h("span",null,i.translate("show",e.language)),e.pageSizes.map(a=>t.h("button",{class:e.currentPageSize===a?"active":"",onClick:()=>e.changePageSize(a)},a))),S=({from:e,to:a,applyFilters:n,language:o})=>{let r,l;const h=()=>{e=r.value},c=()=>{a=l.value};return t.h("div",{class:"period"},t.h("div",{class:"period-content"},t.h("div",{class:"date-input"},t.h("vaadin-date-picker",{value:e,ref:s=>r=s,label:i.translate("from",o),onChange:h})),t.h("span",null,t.h("svg",{width:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t.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"}))),t.h("div",{class:"date-input"},t.h("vaadin-date-picker",{value:a,ref:s=>l=s,label:i.translate("to",o),onChange:c})),t.h("button",{class:"filter-btn",onClick:()=>n(e,a)},i.translate("filter",o))))},C=({source:e,language:a})=>{const n=[{name:i.translate("transactionId",a)},{name:i.translate("date",a)},{name:i.translate("amount",a)},{name:i.translate("productType",a)},{name:i.translate("status",a)}];return t.h("table",null,t.h("thead",null,t.h("tr",null,n.map(o=>t.h("th",null,o.name)))),t.h("tbody",null,e.map(o=>t.h("tr",null,t.h("td",null,o.transId),t.h("td",null,g.dateToFormatedString(new Date(o.created))),t.h("td",null,m.format(o.currency,o.realAmount)," "),t.h("td",null,o.productType),t.h("td",null,t.h("span",{class:o.status.toLowerCase()},o.status))))))},T=':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%}}',B=T,f=class{constructor(e){t.registerInstance(this,e),this.pageSizes=[10,25,50],this.pagination=null,this.stylingAppended=!1,this.endpoint=void 0,this.session=void 0,this.language=i.defaultLanguage,this.userId=void 0,this.translationUrl=void 0,this.mobile=!1,this.clientStyling=null,this.clientStylingUrl=null,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()}componentWillLoad(){return d(this,null,function*(){this.translationUrl&&(yield i.loadCustomTranslations(this.translationUrl)),this.loadTransactions()})}componentDidRender(){this.getComponentHeight(),!this.stylingAppended&&this.stylingContainer&&(this.clientStyling&&this.setStyles(this.clientStyling),this.clientStylingUrl&&this.setClientStylingByURL(),this.stylingAppended=!0)}getComponentHeight(){var e;if(this.mobile){let a=this.el.getBoundingClientRect().height-((e=this.el.shadowRoot.querySelector(".table"))===null||e===void 0?void 0:e.getBoundingClientRect().y);this.el.style.setProperty("--heightScrollableContainer",a+"px")}}setHeightTableProperty(){let e=this.getComponentHeight();this.el.style.setProperty("--heightScrollableContainer",e+"px")}changeTransactionsType(e){this.type=e}changePageSize(e){this.pageSize=e}prev(){var e;!((e=this.pagination)===null||e===void 0)&&e.previous&&this.page--}next(){var e;!((e=this.pagination)===null||e===void 0)&&e.next&&this.page++}applyFilters(e,a){this.from=e?new Date(e).toISOString():null,this.to=a?new Date(a).toISOString():null,this.loadTransactions()}showFilter(){this.showMobileFilter=!this.showMobileFilter}render(){var e;const a=t.getAssetPath("../assets/filter.svg"),n=t.getAssetPath("../assets/warning.svg");return t.h(t.Host,{key:"c850ba36433277706247f4b7c0c08b0ae0fb8c76"},this.showLoader?t.h(x,null):"",t.h("div",{key:"20b817b5c9cf14e8af0db2ba417d09e21b6921d7",class:"wrapper",ref:o=>this.stylingContainer=o},t.h("div",{key:"3943f4ab79cb0e72083821b424000f96779e78a5",class:{"types types-mobile":this.mobile,"types types-desktop":!this.mobile}},t.h("button",{key:"d1f3dfc1f4fc7013bd81c92663f578129f63c0e7",class:"transaction-type "+(this.type==="0"?"clicked":""),onClick:()=>this.changeTransactionsType("0")},i.translate("deposit",this.language)),t.h("button",{key:"46989070ef6703fdf7c8c7ac6628e9dce731fec6",class:"transaction-type "+(this.type==="1"?"clicked":""),onClick:()=>this.changeTransactionsType("1")},i.translate("withdrawals",this.language))),this.mobile?"":t.h(k,{language:this.language,pageSizes:this.pageSizes,currentPageSize:this.pageSize,changePageSize:o=>this.changePageSize(o)}),this.mobile?t.h("button",{class:"mobile-filter-button",onClick:()=>this.showFilter()},t.h("img",{src:a,alt:"Filter"}),i.translate("filter",this.language)):"",!this.mobile||this.showMobileFilter&&this.mobile?t.h(S,{language:this.language,applyFilters:(o,r)=>this.applyFilters(o,r)}):"",((e=this.transactions)===null||e===void 0?void 0:e.length)>0?t.h("div",{class:"table"},this.mobile?t.h("div",{class:"mobile-table"},this.transactions.map(o=>t.h(w,Object.assign({},o)))):t.h(C,{source:this.transactions,language:this.language})):t.h("div",{class:"noData"},t.h("img",{src:n,alt:"Warning"}),t.h("span",null,i.translate("noData",this.language))),t.h("div",{key:"50710657788295389a20d59e0092dd033e428268",class:"pagination"},t.h("button",{key:"cd29c880eab413a06666dc12c8df38d3ffdcfe2f",onClick:()=>this.prev()},"<"),t.h("button",{key:"df351ecd4237433a8ab38766669ac48d2548ed6a",onClick:()=>this.next()},">"))))}loadTransactions(){return d(this,null,function*(){this.showLoader=!0;try{const e=`${this.endpoint}/v1/player/${this.userId}/transactions/banking?${this.getParams()}`,a=yield fetch(e,{headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!a.ok){const o=yield a.text();throw new Error(o)}const n=yield a.json();this.pagination=n.pagination,this.transactions=n.transactions}catch(e){console.error(e)}finally{this.showLoader=!1}})}getParams(){var e,a;const n=new Date,o=(this.page*this.pageSize).toString(),r=(e=this.from)!==null&&e!==void 0?e: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=${o}&endDate=${l}&startDate=${r}&type=${this.type}&limit=${this.pageSize}`}setStyles(e){const a=document.createElement("style");a.innerHTML=e,this.stylingContainer.prepend(a)}setClientStylingByURL(){return d(this,null,function*(){try{const e=yield fetch(this.clientStylingUrl);if(!e.ok){const n=yield e.text();throw new Error(n)}const a=yield e.text();this.setStyles(a)}catch(e){console.error(`Failed to load client styles ${this.clientStylingUrl}`,e)}})}static get assetsDirs(){return["../assets"]}get el(){return t.getElement(this)}static get watchers(){return{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],showMobileFilter:["getComponentHeight"]}}};f.style=B;exports.user_transaction_history=f;
|