@everymatrix/cashier-methods-list 1.28.3 → 1.28.4
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.
|
@@ -603,5 +603,5 @@ function Hr(e){let t,r,n,i=/*paymentMethodsToShow*/e[3],o=[];for(let t=0;t<i.len
|
|
|
603
603
|
function _r(e){let t,r,i,o,s,a,l,v,T,H,_,B,L,A,w,S,P,M,N,C,O,I,R,U,G,D,$,x=/*payMeth*/(e[36].Label||/*payMeth*/e[36].Name)+"",k=/*$_*/e[5]("generalMin")+"",F=/*formatter*/e[6].format(/*payMeth*/e[36].DisplayCurrency.MinAmountLimit)+"",j=/*payMeth*/e[36].DisplayCurrency.Name+"",V=/*$_*/e[5]("generalMax")+"",X=/*formatter*/e[6].format(/*payMeth*/e[36].DisplayCurrency.MaxAmountLimit)+"",K=/*payMeth*/e[36].DisplayCurrency.Name+"";function z(){/*click_handler*/
|
|
604
604
|
return e[19](/*payMeth*/e[36])}return{c(){t=p("div"),r=p("div"),i=p("img"),a=d(),l=p("div"),v=p("span"),T=m(x),H=d(),_=p("div"),B=p("span"),L=m(k),A=d(),w=m(F),S=d(),P=m(j),M=d(),N=p("span"),C=m(V),O=d(),I=m(X),R=d(),U=m(K),G=d(),h(i.src,o=/*payMeth*/e[36].LogoUrl)||b(i,"src",o),b(i,"alt",s=/*payMeth*/e[36].Label),b(r,"class","MethodLogo"),b(l,"class","MethodTitle"),b(B,"class","Limits"),b(N,"class","Limits"),b(_,"class","MethodLimits"),b(t,"class","SelectorWrapper"),y(t,"checked",/*selectedPaymentMethod*/e[1]===/*payMeth*/e[36].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,L),c(B,A),c(B,w),c(B,S),c(B,P),c(_,M),c(_,N),c(N,C),c(N,O),c(N,I),c(N,R),c(N,U),c(t,G),D||($=[g(t,"click",z),g(t,"keyup",Ar)],D=!0)},p(r,n){e=r,/*paymentMethodsToShow*/8&n[0]&&!h(i.src,o=/*payMeth*/e[36].LogoUrl)&&b(i,"src",o),/*paymentMethodsToShow*/8&n[0]&&s!==(s=/*payMeth*/e[36].Label)&&b(i,"alt",s),/*paymentMethodsToShow*/8&n[0]&&x!==(x=/*payMeth*/(e[36].Label||/*payMeth*/e[36].Name)+"")&&E(T,x),/*$_*/32&n[0]&&k!==(k=/*$_*/e[5]("generalMin")+"")&&E(L,k),/*paymentMethodsToShow*/8&n[0]&&F!==(F=/*formatter*/e[6].format(/*payMeth*/e[36].DisplayCurrency.MinAmountLimit)+"")&&E(w,F),/*paymentMethodsToShow*/8&n[0]&&j!==(j=/*payMeth*/e[36].DisplayCurrency.Name+"")&&E(P,j),/*$_*/32&n[0]&&V!==(V=/*$_*/e[5]("generalMax")+"")&&E(C,V),/*paymentMethodsToShow*/8&n[0]&&X!==(X=/*formatter*/e[6].format(/*payMeth*/e[36].DisplayCurrency.MaxAmountLimit)+"")&&E(I,X),/*paymentMethodsToShow*/8&n[0]&&K!==(K=/*payMeth*/e[36].DisplayCurrency.Name+"")&&E(U,K),/*selectedPaymentMethod, paymentMethodsToShow*/10&n[0]&&y(t,"checked",/*selectedPaymentMethod*/e[1]===/*payMeth*/e[36].Name)},d(e){e&&f(t),D=!1,n($)}}}
|
|
605
605
|
// (147:2) {#if methodsButtonToggleText}
|
|
606
|
-
function Br(e){let t,r,n,i;return{c(){t=p("div"),r=m(/*methodsButtonToggleText*/e[2]),b(t,"class","ShowAllButton")},m(o,s){u(o,t,s),c(t,r),n||(i=g(t,"click",/*click_handler_1*/e[20]),n=!0)},p(e,t){/*methodsButtonToggleText*/4&t[0]&&E(r,/*methodsButtonToggleText*/e[2])},d(e){e&&f(t),n=!1,i()}}}function Lr(t){let r,n=/*showMerchantList*/t[4]&&Hr(t);return{c(){n&&n.c(),r=m(""),this.c=e},m(e,t){n&&n.m(e,t),u(e,r,t)},p(e,t){/*showMerchantList*/e[4]?n?n.p(e,t):(n=Hr(e),n.c(),n.m(r.parentNode,r)):n&&(n.d(1),n=null)},i:e,o:e,d(e){n&&n.d(e),e&&f(r)}}}const Ar=()=>{};function wr(e,t,r){let n;var i,o;i=yr,o=e=>r(5,n=e),e.$$.on_destroy.push(l(i,o));let s,a,{lang:h="en"}=t,{local:c="en-US"}=t,{endpoint:u}=t,{session:f}=t,{customerid:p}=t,{currency:m}=t,{numberofmethodsshown:d}=t,{translationurl:g=""}=t,{clientstyling:b=""}=t,{clientstylingurl:E=""}=t,y=[],v="",T=[],B=!0,A=new Intl.NumberFormat(c,{minimumFractionDigits:2});_(),Object.keys(vr).forEach((e=>{!function(e,t){Nt(e,t)}(e,vr[e])}));const w=()=>{var e;e=h,qt.set(e)},S=e=>{r(1,a=e.Name),dispatchEvent(new CustomEvent("selectPayMeth",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))},P=()=>{T==y?N():M()},M=()=>{r(3,T=y),r(2,v=n("showLess"))},N=()=>{r(3,T=y.slice(0,+d)),a&&!T.find((e=>e.Name===a))&&T.splice(0,0,y.find((e=>e.Name===a))),r(2,v=n("showAll"))},C=()=>{r(4,B=!0)},O=e=>{r(4,B=!e.detail.hideMethodsList)};var I;I=()=>(window.addEventListener("backToMethodList",C,!1),window.addEventListener("hideMethodsList",O,!1),()=>{window.removeEventListener("backToMethodList",C),window.removeEventListener("paymentMethodLoaded",O)}),H().$$.on_mount.push(I);return e.$$set=e=>{"lang"in e&&r(9,h=e.lang),"local"in e&&r(10,c=e.local),"endpoint"in e&&r(11,u=e.endpoint),"session"in e&&r(12,f=e.session),"customerid"in e&&r(13,p=e.customerid),"currency"in e&&r(14,m=e.currency),"numberofmethodsshown"in e&&r(15,d=e.numberofmethodsshown),"translationurl"in e&&r(16,g=e.translationurl),"clientstyling"in e&&r(17,b=e.clientstyling),"clientstylingurl"in e&&r(18,E=e.clientstylingurl)},e.$$.update=()=>{/*endpoint, session, customerid*/14336&e.$$.dirty[0]&&u&&f&&p&&(()=>{const e=new URL(`${u}/v1/player/${p}/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:f,Currency:m})};fetch(e,i).then((e=>e.json())).then((e=>{y=e.PaymentMethods.PaymentMethods.map((e=>Object.assign(Object.assign({},e),{LogoUrl:e.Logos&&e.Logos.length&&e.Logos[0].LogoUrl?`https:${e.Logos[0].LogoUrl}`:""}))),r(2,v=d&&+d>0&&y.length>+d?n("showAll"):""),r(3,T=v?y.slice(0,+d):y)}))})(),/*lang*/512&e.$$.dirty[0]&&h&&w(),/*clientstyling, customStylingContainer*/131073&e.$$.dirty[0]&&b&&s&&(()=>{let e=document.createElement("style");e.innerHTML=b,s.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/262145&e.$$.dirty[0]&&E&&s&&(()=>{let e=new URL(E),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{s.appendChild(t)}),1),setTimeout((()=>{}),500)}))})()},[s,a,v,T,B,n,A,S,P,h,c,u,f,p,m,d,g,b,E,e=>S(e),()=>P(),function(e){L[e?"unshift":"push"]((()=>{s=e,r(0,s)}))}]}class Sr extends ${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, #
|
|
606
|
+
function Br(e){let t,r,n,i;return{c(){t=p("div"),r=m(/*methodsButtonToggleText*/e[2]),b(t,"class","ShowAllButton")},m(o,s){u(o,t,s),c(t,r),n||(i=g(t,"click",/*click_handler_1*/e[20]),n=!0)},p(e,t){/*methodsButtonToggleText*/4&t[0]&&E(r,/*methodsButtonToggleText*/e[2])},d(e){e&&f(t),n=!1,i()}}}function Lr(t){let r,n=/*showMerchantList*/t[4]&&Hr(t);return{c(){n&&n.c(),r=m(""),this.c=e},m(e,t){n&&n.m(e,t),u(e,r,t)},p(e,t){/*showMerchantList*/e[4]?n?n.p(e,t):(n=Hr(e),n.c(),n.m(r.parentNode,r)):n&&(n.d(1),n=null)},i:e,o:e,d(e){n&&n.d(e),e&&f(r)}}}const Ar=()=>{};function wr(e,t,r){let n;var i,o;i=yr,o=e=>r(5,n=e),e.$$.on_destroy.push(l(i,o));let s,a,{lang:h="en"}=t,{local:c="en-US"}=t,{endpoint:u}=t,{session:f}=t,{customerid:p}=t,{currency:m}=t,{numberofmethodsshown:d}=t,{translationurl:g=""}=t,{clientstyling:b=""}=t,{clientstylingurl:E=""}=t,y=[],v="",T=[],B=!0,A=new Intl.NumberFormat(c,{minimumFractionDigits:2});_(),Object.keys(vr).forEach((e=>{!function(e,t){Nt(e,t)}(e,vr[e])}));const w=()=>{var e;e=h,qt.set(e)},S=e=>{r(1,a=e.Name),dispatchEvent(new CustomEvent("selectPayMeth",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))},P=()=>{T==y?N():M()},M=()=>{r(3,T=y),r(2,v=n("showLess"))},N=()=>{r(3,T=y.slice(0,+d)),a&&!T.find((e=>e.Name===a))&&T.splice(0,0,y.find((e=>e.Name===a))),r(2,v=n("showAll"))},C=()=>{r(4,B=!0)},O=e=>{r(4,B=!e.detail.hideMethodsList)};var I;I=()=>(window.addEventListener("backToMethodList",C,!1),window.addEventListener("hideMethodsList",O,!1),()=>{window.removeEventListener("backToMethodList",C),window.removeEventListener("paymentMethodLoaded",O)}),H().$$.on_mount.push(I);return e.$$set=e=>{"lang"in e&&r(9,h=e.lang),"local"in e&&r(10,c=e.local),"endpoint"in e&&r(11,u=e.endpoint),"session"in e&&r(12,f=e.session),"customerid"in e&&r(13,p=e.customerid),"currency"in e&&r(14,m=e.currency),"numberofmethodsshown"in e&&r(15,d=e.numberofmethodsshown),"translationurl"in e&&r(16,g=e.translationurl),"clientstyling"in e&&r(17,b=e.clientstyling),"clientstylingurl"in e&&r(18,E=e.clientstylingurl)},e.$$.update=()=>{/*endpoint, session, customerid*/14336&e.$$.dirty[0]&&u&&f&&p&&(()=>{const e=new URL(`${u}/v1/player/${p}/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:f,Currency:m})};fetch(e,i).then((e=>e.json())).then((e=>{y=e.PaymentMethods.PaymentMethods.map((e=>Object.assign(Object.assign({},e),{LogoUrl:e.Logos&&e.Logos.length&&e.Logos[0].LogoUrl?`https:${e.Logos[0].LogoUrl}`:""}))),r(2,v=d&&+d>0&&y.length>+d?n("showAll"):""),r(3,T=v?y.slice(0,+d):y)}))})(),/*lang*/512&e.$$.dirty[0]&&h&&w(),/*clientstyling, customStylingContainer*/131073&e.$$.dirty[0]&&b&&s&&(()=>{let e=document.createElement("style");e.innerHTML=b,s.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/262145&e.$$.dirty[0]&&E&&s&&(()=>{let e=new URL(E),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{s.appendChild(t)}),1),setTimeout((()=>{}),500)}))})()},[s,a,v,T,B,n,A,S,P,h,c,u,f,p,m,d,g,b,E,e=>S(e),()=>P(),function(e){L[e?"unshift":"push"]((()=>{s=e,r(0,s)}))}]}class Sr extends ${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 var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));width:100%;border-radius:var(--mmw--border-radius-medium-plus, 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(--mmw--color-grey-105, #E8E9EB);padding:0 var(--emw--spacing-small, 12px)}.CashierMethodList .SelectorWrapper:first-child{border-radius:var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px) 0 0}.CashierMethodList .SelectorWrapper:last-child{border-radius:0 0 var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px)}.CashierMethodList .SelectorWrapper.checked{background:var(--emw--color-background-secondary, #F9F8F8)}.CashierMethodList .MethodLogo{margin-right:var(--mmw--spacing-x-small-minus, 7px);width:56px;height:32px;background:var(--emw--color-background, #FFF);border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--mmw--border-radius-medium-plus, 6px);overflow:hidden}.CashierMethodList .MethodLogo img{width:inherit;height:inherit}.CashierMethodList .MethodTitle{color:var(--mmw--color-grey-10, #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-plus, 11px);line-height:var(--emw--size-small, 14px);color:var(--mmw--color-grey-290, #666);font-weight:var(--emw--font-weight-normal, 400);font-style:normal}.ShowAllButton{cursor:pointer;color:var(--mmw--color-grey-290, #666);text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);background:var(--emw--color-gray-50, #F7F8FA);line-height:normal;border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin:var(--emw--spacing-small, 12px) auto;height:36px;display:flex;align-items:center;justify-content:center;width:80%}.ShowAllButton:hover{background:var(--emw--color-background, #fff)}',this.shadowRoot.appendChild(t),D(this,{target:this.shadowRoot,props:v(this.attributes),customElement:!0},wr,Lr,o,{lang:9,local:10,endpoint:11,session:12,customerid:13,currency:14,numberofmethodsshown:15,translationurl:16,clientstyling:17,clientstylingurl:18},null,[-1,-1]),e&&(e.target&&u(e.target,this,e.anchor),e.props&&(this.$set(e.props),O()))}static get observedAttributes(){return["lang","local","endpoint","session","customerid","currency","numberofmethodsshown","translationurl","clientstyling","clientstylingurl"]}get lang(){return this.$$.ctx[9]}set lang(e){this.$$set({lang:e}),O()}get local(){return this.$$.ctx[10]}set local(e){this.$$set({local:e}),O()}get endpoint(){return this.$$.ctx[11]}set endpoint(e){this.$$set({endpoint:e}),O()}get session(){return this.$$.ctx[12]}set session(e){this.$$set({session:e}),O()}get customerid(){return this.$$.ctx[13]}set customerid(e){this.$$set({customerid:e}),O()}get currency(){return this.$$.ctx[14]}set currency(e){this.$$set({currency:e}),O()}get numberofmethodsshown(){return this.$$.ctx[15]}set numberofmethodsshown(e){this.$$set({numberofmethodsshown:e}),O()}get translationurl(){return this.$$.ctx[16]}set translationurl(e){this.$$set({translationurl:e}),O()}get clientstyling(){return this.$$.ctx[17]}set clientstyling(e){this.$$set({clientstyling:e}),O()}get clientstylingurl(){return this.$$.ctx[18]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),O()}}return!customElements.get("cashier-methods-list")&&customElements.define("cashier-methods-list",Sr),Sr}));
|
|
607
607
|
//# sourceMappingURL=cashier-methods-list.js.map
|