@everymatrix/cashier-methods-list 1.22.2 → 1.22.3

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.
@@ -590,5 +590,5 @@ e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"}
590
590
  function Hr(e){let t,r,i,o,s,a,l,v,T,H,_,B,A,L,S,P,w,N,M,C,O,I,R,U,G,D,$,x=/*payMeth*/(e[31].Label||/*payMeth*/e[31].Name)+"",k=/*$_*/e[3]("generalMin")+"",F=/*payMeth*/e[31].DisplayCurrency.MinAmountLimit+"",j=/*payMeth*/e[31].DisplayCurrency.Name+"",V=/*$_*/e[3]("generalMax")+"",X=/*payMeth*/e[31].DisplayCurrency.MaxAmountLimit+"",K=/*payMeth*/e[31].DisplayCurrency.Name+"";function z(){/*click_handler*/
591
591
  return e[15](/*payMeth*/e[31])}return{c(){t=p("div"),r=p("div"),i=p("img"),a=g(),l=p("div"),v=p("span"),T=m(x),H=g(),_=p("div"),B=p("span"),A=m(k),L=g(),S=m(F),P=g(),w=m(j),N=g(),M=p("span"),C=m(V),O=g(),I=m(X),R=g(),U=m(K),G=g(),h(i.src,o=/*payMeth*/e[31].LogoUrl)||b(i,"src",o),b(i,"alt",s=/*payMeth*/e[31].Label),b(r,"class","MethodLogo"),b(l,"class","MethodTitle"),b(B,"class","Limits"),b(M,"class","Limits"),b(_,"class","MethodLimits"),b(t,"class","SelectorWrapper"),y(t,"checked",/*selectedPaymentMethod*/e[0]===/*payMeth*/e[31].Name)},m(e,n){u(e,t,n),c(t,r),c(r,i),c(t,a),c(t,l),c(l,v),c(v,T),c(t,H),c(t,_),c(_,B),c(B,A),c(B,L),c(B,S),c(B,P),c(B,w),c(_,N),c(_,M),c(M,C),c(M,O),c(M,I),c(M,R),c(M,U),c(t,G),D||($=[d(t,"click",z),d(t,"keyup",Ar)],D=!0)},p(r,n){e=r,/*paymentMethodsToShow*/4&n[0]&&!h(i.src,o=/*payMeth*/e[31].LogoUrl)&&b(i,"src",o),/*paymentMethodsToShow*/4&n[0]&&s!==(s=/*payMeth*/e[31].Label)&&b(i,"alt",s),/*paymentMethodsToShow*/4&n[0]&&x!==(x=/*payMeth*/(e[31].Label||/*payMeth*/e[31].Name)+"")&&E(T,x),/*$_*/8&n[0]&&k!==(k=/*$_*/e[3]("generalMin")+"")&&E(A,k),/*paymentMethodsToShow*/4&n[0]&&F!==(F=/*payMeth*/e[31].DisplayCurrency.MinAmountLimit+"")&&E(S,F),/*paymentMethodsToShow*/4&n[0]&&j!==(j=/*payMeth*/e[31].DisplayCurrency.Name+"")&&E(w,j),/*$_*/8&n[0]&&V!==(V=/*$_*/e[3]("generalMax")+"")&&E(C,V),/*paymentMethodsToShow*/4&n[0]&&X!==(X=/*payMeth*/e[31].DisplayCurrency.MaxAmountLimit+"")&&E(I,X),/*paymentMethodsToShow*/4&n[0]&&K!==(K=/*payMeth*/e[31].DisplayCurrency.Name+"")&&E(U,K),/*selectedPaymentMethod, paymentMethodsToShow*/5&n[0]&&y(t,"checked",/*selectedPaymentMethod*/e[0]===/*payMeth*/e[31].Name)},d(e){e&&f(t),D=!1,n($)}}}
592
592
  // (136:2) {#if methodsButtonToogleText}
593
- function _r(e){let t,r,n,i;return{c(){t=p("div"),r=m(/*methodsButtonToogleText*/e[1]),b(t,"class","ShowAllButton")},m(o,s){u(o,t,s),c(t,r),n||(i=d(t,"click",/*click_handler_1*/e[16]),n=!0)},p(e,t){/*methodsButtonToogleText*/2&t[0]&&E(r,/*methodsButtonToogleText*/e[1])},d(e){e&&f(t),n=!1,i()}}}function Br(t){let r,n,i,o=/*paymentMethodsToShow*/t[2],s=[];for(let e=0;e<o.length;e+=1)s[e]=Hr(Tr(t,o,e));let a=/*methodsButtonToogleText*/t[1]&&_r(t);return{c(){r=p("div"),n=p("div");for(let e=0;e<s.length;e+=1)s[e].c();i=g(),a&&a.c(),this.c=e,b(n,"class","CashierMethodList")},m(e,t){u(e,r,t),c(r,n);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(n,null);c(r,i),a&&a.m(r,null)},p(e,t){if(/*selectedPaymentMethod, paymentMethodsToShow, selectPayMeth, $_*/29&t[0]){let r;for(o=/*paymentMethodsToShow*/e[2],r=0;r<o.length;r+=1){const i=Tr(e,o,r);s[r]?s[r].p(i,t):(s[r]=Hr(i),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}/*methodsButtonToogleText*/e[1]?a?a.p(e,t):(a=_r(e),a.c(),a.m(r,null)):a&&(a.d(1),a=null)},i:e,o:e,d(e){e&&f(r),function(e,t){for(let r=0;r<e.length;r+=1)e[r]&&e[r].d(t)}(s,e),a&&a.d()}}}const Ar=()=>{};function Lr(e,t,r){let n;var i,o;i=Er,o=e=>r(3,n=e),e.$$.on_destroy.push(l(i,o));let s,{lang:a="en"}=t,{endpoint:h}=t,{session:c}=t,{customerid:u}=t,{currency:f}=t,{numberofmethodsshown:p}=t,{translationurl:m=""}=t,{clientstyling:g=""}=t,{clientstylingurl:d=""}=t,b=[],E="",y=[];H();Object.keys(vr).forEach((e=>{yr(e,vr[e])}));const v=()=>{var e;e=a,Qt.set(e)},T=e=>{r(0,s=e.Name),dispatchEvent(new CustomEvent("selectPayMeth",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))},_=()=>{y==b?A():B()},B=()=>{r(2,y=b),r(1,E=n("showLess"))},A=()=>{r(2,y=b.slice(0,+p)),s&&!y.find((e=>e.Name===s))&&y.splice(0,0,b.find((e=>e.Name===s))),r(1,E=n("showAll"))};return e.$$set=e=>{"lang"in e&&r(6,a=e.lang),"endpoint"in e&&r(7,h=e.endpoint),"session"in e&&r(8,c=e.session),"customerid"in e&&r(9,u=e.customerid),"currency"in e&&r(10,f=e.currency),"numberofmethodsshown"in e&&r(11,p=e.numberofmethodsshown),"translationurl"in e&&r(12,m=e.translationurl),"clientstyling"in e&&r(13,g=e.clientstyling),"clientstylingurl"in e&&r(14,d=e.clientstylingurl)},e.$$.update=()=>{/*endpoint, session, customerid*/896&e.$$.dirty[0]&&h&&c&&u&&(()=>{const e=new URL(`${h}/v1/player/${u}/payment/GetPaymentMetadata`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json"),t.append("X-Payment-Session-Token",`${c}`);const i={method:"POST",headers:t,body:JSON.stringify({Currency:f})};fetch(e,i).then((e=>e.json())).then((e=>{b=e.PaymentMethods.PaymentMethods.map((e=>Object.assign(Object.assign({},e),{LogoUrl:e.Logos&&e.Logos[0].LogoUrl?`https:${e.Logos[0].LogoUrl}`:""}))),r(1,E=p&&+p>0&&b.length>+p?n("showAll"):""),r(2,y=E?b.slice(0,+p):b)}))})(),/*lang*/64&e.$$.dirty[0]&&a&&v(),/*translationurl*/4096&e.$$.dirty[0]&&m&&(()=>{if(m)fetch(m).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{yr(t,e[t])}))})).catch((e=>{console.log(e)}))})(),e.$$.dirty[0],e.$$.dirty[0]},[s,E,y,n,T,_,a,h,c,u,f,p,m,g,d,e=>T(e),()=>_()]}class Sr extends D{constructor(e){super();const t=document.createElement("style");t.textContent='*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CashierMethodList{display:flex;flex-direction:column;background:var(--emw--color-background, #FFF);box-shadow:0 0 4px rgba(0, 0, 0, 0.1);width:100%;border-radius:var(--emw--border-radius-large, 6px)}.CashierMethodList .SelectorWrapper{display:flex;flex-direction:row;align-items:center;justify-content:left;cursor:pointer;position:relative;height:52px;box-sizing:border-box;border-bottom:1px solid var(--emw--color-gray-100, #E8E9EB);padding:0 12px}.CashierMethodList .SelectorWrapper:first-child{border-radius:var(--emw--border-radius-large, 6px) var(--emw--border-radius-large, 6px) 0 0}.CashierMethodList .SelectorWrapper:last-child{border-radius:0 0 var(--emw--border-radius-large, 6px) var(--emw--border-radius-large, 6px)}.CashierMethodList .SelectorWrapper.checked{background:var(--emw--color-background-secondary, #F9F9F9)}.CashierMethodList .MethodLogo{margin-right:7px;width:56px;height:32px;background:var(--emw--color-background, #FFF);border:1px solid var(--emw--color-gray-100, #E8E9EB);border-radius:var(--emw--border-radius-large, 6px);overflow:hidden}.CashierMethodList .MethodLogo img{width:inherit;height:inherit}.CashierMethodList .MethodTitle{color:var(--emw--color-black, #111);font-size:var(--emw--font-size-small, 14px);word-break:break-all;font-feature-settings:"numr" on}.CashierMethodList .MethodLimits{display:flex;flex-direction:column;align-items:flex-end;margin-left:auto}.CashierMethodList .MethodLimits .Limits{max-width:100%;white-space:nowrap;font-size:var(--emw--font-size-2x-small, 11px);line-height:var(--emw--size-small, 14px);color:var(--emw--color-gray-300, #666);font-weight:var(--emw--font-weight-normal, 400);font-style:normal}.ShowAllButton{cursor:pointer;color:var(--emw--color-primary, #292929);text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);line-height:normal;text-transform:uppercase;border:1px solid var(--emw--color-gray-100, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin:12px auto;height:36px;display:flex;align-items:center;justify-content:center;width:80%}',this.shadowRoot.appendChild(t),G(this,{target:this.shadowRoot,props:v(this.attributes),customElement:!0},Lr,Br,o,{lang:6,endpoint:7,session:8,customerid:9,currency:10,numberofmethodsshown:11,translationurl:12,clientstyling:13,clientstylingurl:14},null,[-1,-1]),e&&(e.target&&u(e.target,this,e.anchor),e.props&&(this.$set(e.props),C()))}static get observedAttributes(){return["lang","endpoint","session","customerid","currency","numberofmethodsshown","translationurl","clientstyling","clientstylingurl"]}get lang(){return this.$$.ctx[6]}set lang(e){this.$$set({lang:e}),C()}get endpoint(){return this.$$.ctx[7]}set endpoint(e){this.$$set({endpoint:e}),C()}get session(){return this.$$.ctx[8]}set session(e){this.$$set({session:e}),C()}get customerid(){return this.$$.ctx[9]}set customerid(e){this.$$set({customerid:e}),C()}get currency(){return this.$$.ctx[10]}set currency(e){this.$$set({currency:e}),C()}get numberofmethodsshown(){return this.$$.ctx[11]}set numberofmethodsshown(e){this.$$set({numberofmethodsshown:e}),C()}get translationurl(){return this.$$.ctx[12]}set translationurl(e){this.$$set({translationurl:e}),C()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(e){this.$$set({clientstyling:e}),C()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),C()}}return!customElements.get("cashier-methods-list")&&customElements.define("cashier-methods-list",Sr),Sr}));
593
+ function _r(e){let t,r,n,i;return{c(){t=p("div"),r=m(/*methodsButtonToogleText*/e[1]),b(t,"class","ShowAllButton")},m(o,s){u(o,t,s),c(t,r),n||(i=d(t,"click",/*click_handler_1*/e[16]),n=!0)},p(e,t){/*methodsButtonToogleText*/2&t[0]&&E(r,/*methodsButtonToogleText*/e[1])},d(e){e&&f(t),n=!1,i()}}}function Br(t){let r,n,i,o=/*paymentMethodsToShow*/t[2],s=[];for(let e=0;e<o.length;e+=1)s[e]=Hr(Tr(t,o,e));let a=/*methodsButtonToogleText*/t[1]&&_r(t);return{c(){r=p("div"),n=p("div");for(let e=0;e<s.length;e+=1)s[e].c();i=g(),a&&a.c(),this.c=e,b(n,"class","CashierMethodList")},m(e,t){u(e,r,t),c(r,n);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(n,null);c(r,i),a&&a.m(r,null)},p(e,t){if(/*selectedPaymentMethod, paymentMethodsToShow, selectPayMeth, $_*/29&t[0]){let r;for(o=/*paymentMethodsToShow*/e[2],r=0;r<o.length;r+=1){const i=Tr(e,o,r);s[r]?s[r].p(i,t):(s[r]=Hr(i),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}/*methodsButtonToogleText*/e[1]?a?a.p(e,t):(a=_r(e),a.c(),a.m(r,null)):a&&(a.d(1),a=null)},i:e,o:e,d(e){e&&f(r),function(e,t){for(let r=0;r<e.length;r+=1)e[r]&&e[r].d(t)}(s,e),a&&a.d()}}}const Ar=()=>{};function Lr(e,t,r){let n;var i,o;i=Er,o=e=>r(3,n=e),e.$$.on_destroy.push(l(i,o));let s,{lang:a="en"}=t,{endpoint:h}=t,{session:c}=t,{customerid:u}=t,{currency:f}=t,{numberofmethodsshown:p}=t,{translationurl:m=""}=t,{clientstyling:g=""}=t,{clientstylingurl:d=""}=t,b=[],E="",y=[];H();Object.keys(vr).forEach((e=>{yr(e,vr[e])}));const v=()=>{var e;e=a,Qt.set(e)},T=e=>{r(0,s=e.Name),dispatchEvent(new CustomEvent("selectPayMeth",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))},_=()=>{y==b?A():B()},B=()=>{r(2,y=b),r(1,E=n("showLess"))},A=()=>{r(2,y=b.slice(0,+p)),s&&!y.find((e=>e.Name===s))&&y.splice(0,0,b.find((e=>e.Name===s))),r(1,E=n("showAll"))};return e.$$set=e=>{"lang"in e&&r(6,a=e.lang),"endpoint"in e&&r(7,h=e.endpoint),"session"in e&&r(8,c=e.session),"customerid"in e&&r(9,u=e.customerid),"currency"in e&&r(10,f=e.currency),"numberofmethodsshown"in e&&r(11,p=e.numberofmethodsshown),"translationurl"in e&&r(12,m=e.translationurl),"clientstyling"in e&&r(13,g=e.clientstyling),"clientstylingurl"in e&&r(14,d=e.clientstylingurl)},e.$$.update=()=>{/*endpoint, session, customerid*/896&e.$$.dirty[0]&&h&&c&&u&&(()=>{const e=new URL(`${h}/v1/player/${u}/payment/GetPaymentMetadata`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json");const i={method:"POST",headers:t,body:JSON.stringify({XPaymentSessionToken:c,Currency:f})};fetch(e,i).then((e=>e.json())).then((e=>{b=e.PaymentMethods.PaymentMethods.map((e=>Object.assign(Object.assign({},e),{LogoUrl:e.Logos&&e.Logos[0].LogoUrl?`https:${e.Logos[0].LogoUrl}`:""}))),r(1,E=p&&+p>0&&b.length>+p?n("showAll"):""),r(2,y=E?b.slice(0,+p):b)}))})(),/*lang*/64&e.$$.dirty[0]&&a&&v(),/*translationurl*/4096&e.$$.dirty[0]&&m&&(()=>{if(m)fetch(m).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{yr(t,e[t])}))})).catch((e=>{console.log(e)}))})(),e.$$.dirty[0],e.$$.dirty[0]},[s,E,y,n,T,_,a,h,c,u,f,p,m,g,d,e=>T(e),()=>_()]}class Sr extends D{constructor(e){super();const t=document.createElement("style");t.textContent='*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CashierMethodList{display:flex;flex-direction:column;background:var(--emw--color-background, #FFF);box-shadow:0 0 4px rgba(0, 0, 0, 0.1);width:100%;border-radius:var(--emw--border-radius-large, 6px)}.CashierMethodList .SelectorWrapper{display:flex;flex-direction:row;align-items:center;justify-content:left;cursor:pointer;position:relative;height:52px;box-sizing:border-box;border-bottom:1px solid var(--emw--color-gray-100, #E8E9EB);padding:0 12px}.CashierMethodList .SelectorWrapper:first-child{border-radius:var(--emw--border-radius-large, 6px) var(--emw--border-radius-large, 6px) 0 0}.CashierMethodList .SelectorWrapper:last-child{border-radius:0 0 var(--emw--border-radius-large, 6px) var(--emw--border-radius-large, 6px)}.CashierMethodList .SelectorWrapper.checked{background:var(--emw--color-background-secondary, #F9F9F9)}.CashierMethodList .MethodLogo{margin-right:7px;width:56px;height:32px;background:var(--emw--color-background, #FFF);border:1px solid var(--emw--color-gray-100, #E8E9EB);border-radius:var(--emw--border-radius-large, 6px);overflow:hidden}.CashierMethodList .MethodLogo img{width:inherit;height:inherit}.CashierMethodList .MethodTitle{color:var(--emw--color-black, #111);font-size:var(--emw--font-size-small, 14px);word-break:break-all;font-feature-settings:"numr" on}.CashierMethodList .MethodLimits{display:flex;flex-direction:column;align-items:flex-end;margin-left:auto}.CashierMethodList .MethodLimits .Limits{max-width:100%;white-space:nowrap;font-size:var(--emw--font-size-2x-small, 11px);line-height:var(--emw--size-small, 14px);color:var(--emw--color-gray-300, #666);font-weight:var(--emw--font-weight-normal, 400);font-style:normal}.ShowAllButton{cursor:pointer;color:var(--emw--color-primary, #292929);text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);line-height:normal;text-transform:uppercase;border:1px solid var(--emw--color-gray-100, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin:12px auto;height:36px;display:flex;align-items:center;justify-content:center;width:80%}',this.shadowRoot.appendChild(t),G(this,{target:this.shadowRoot,props:v(this.attributes),customElement:!0},Lr,Br,o,{lang:6,endpoint:7,session:8,customerid:9,currency:10,numberofmethodsshown:11,translationurl:12,clientstyling:13,clientstylingurl:14},null,[-1,-1]),e&&(e.target&&u(e.target,this,e.anchor),e.props&&(this.$set(e.props),C()))}static get observedAttributes(){return["lang","endpoint","session","customerid","currency","numberofmethodsshown","translationurl","clientstyling","clientstylingurl"]}get lang(){return this.$$.ctx[6]}set lang(e){this.$$set({lang:e}),C()}get endpoint(){return this.$$.ctx[7]}set endpoint(e){this.$$set({endpoint:e}),C()}get session(){return this.$$.ctx[8]}set session(e){this.$$set({session:e}),C()}get customerid(){return this.$$.ctx[9]}set customerid(e){this.$$set({customerid:e}),C()}get currency(){return this.$$.ctx[10]}set currency(e){this.$$set({currency:e}),C()}get numberofmethodsshown(){return this.$$.ctx[11]}set numberofmethodsshown(e){this.$$set({numberofmethodsshown:e}),C()}get translationurl(){return this.$$.ctx[12]}set translationurl(e){this.$$set({translationurl:e}),C()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(e){this.$$set({clientstyling:e}),C()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),C()}}return!customElements.get("cashier-methods-list")&&customElements.define("cashier-methods-list",Sr),Sr}));
594
594
  //# sourceMappingURL=cashier-methods-list.js.map