@everymatrix/lottery-tipping-page 1.77.11 → 1.77.13
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/dist/cjs/general-multi-select_13.cjs.entry.js +27 -21
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{lottery-tipping-page-2acfd327.js → lottery-tipping-page-ea50679a.js} +4 -4
- package/dist/collection/components/lottery-tipping-page/lottery-tipping-page.css +4 -4
- package/dist/collection/components/lottery-tipping-page/lottery-tipping-page.js +3 -3
- package/dist/esm/general-multi-select_13.entry.js +28 -22
- package/dist/esm/index.js +1 -1
- package/dist/esm/{lottery-tipping-page-1a4c084c.js → lottery-tipping-page-adc72308.js} +4 -4
- package/dist/lottery-tipping-page/general-multi-select_13.entry.js +9 -8
- package/dist/lottery-tipping-page/index.esm.js +1 -1
- package/dist/lottery-tipping-page/{lottery-tipping-page-1a4c084c.js → lottery-tipping-page-adc72308.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export{L as LotteryTippingPage}from"./lottery-tipping-page-
|
|
1
|
+
export{L as LotteryTippingPage}from"./lottery-tipping-page-adc72308.js";import"./index-3be4f76e.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e}from"./index-3be4f76e.js";function i(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function n(t,e){const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function s(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}var o;!function(t){t.BuyTickets="BUY_TICKETS",t.MyTickets="MY_TICKETS"}(o||(o={}));const
|
|
1
|
+
import{r as t,h as e}from"./index-3be4f76e.js";function i(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function n(t,e){const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function s(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}var o;!function(t){t.BuyTickets="BUY_TICKETS",t.MyTickets="MY_TICKETS"}(o||(o={}));const r=["ro","en","fr","ar","hr"],a={en:{buyTickets:"Buy Tickets",myTickets:"My Tickets",logout:"Log out"},ro:{buyTickets:"Cumpără bilete",myTickets:"Biletele mele",logout:"Deconectare"},fr:{buyTickets:"Acheter des billets",myTickets:"Mes billets",logout:"Se déconnecter"},ar:{buyTickets:"شراء التذاكر",myTickets:"تذاكري",logout:"تسجيل الخروج"},hr:{buyTickets:"Kupi ulaznice",myTickets:"Moje ulaznice",logout:"Odjava"}},l=(t,e)=>{const i=e;return a[void 0!==i&&r.includes(i)?i:"en"][t]},c=class{constructor(e){t(this,e),this.handleTabClick=t=>{this.activeTab=t},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.endpointTicket=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.drawId=void 0,this.activeTab=o.BuyTickets}handleClientStylingChange(t,e){t!=e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const n=await i.json();e=n,Object.keys(e).forEach((t=>{for(let i in e[t])a[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}renderTabs(){const t={[o.BuyTickets]:l("buyTickets",this.language),[o.MyTickets]:l("myTickets",this.language)};return e("div",{class:"tab-btns"},Object.values(o).map((i=>e("div",{class:"tab-btn"+(this.activeTab===i?" active":""),onClick:this.handleTabClick.bind(this,i)},t[i]))))}renderContent(){return this.activeTab===o.BuyTickets?e("lottery-tipping-ticket-controller",{endpoint:this.endpoint,endpointTicket:this.endpointTicket,gameId:this.gameId,playerId:this.playerId,sessionId:this.sessionId,drawId:this.drawId,language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStylingUrl,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl}):this.activeTab===o.MyTickets?e("lottery-tipping-ticket-history",{endpoint:this.endpoint,endpointTicket:this.endpointTicket,gameId:this.gameId,playerId:this.playerId,sessionId:this.sessionId,drawId:this.drawId,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"client-styling":this.clientStylingUrl,"translation-url":this.translationUrl}):null}render(){return e("div",{key:"b0048b80e5eb80159834be8cf6309b22e4ce4407",class:"lottery-tipping-page",ref:t=>this.stylingContainer=t},e("div",{key:"f4931434d199d23af6a233b29987532772e96dc5",class:"lottery-tipping-page-header"},e("slot",{key:"0cccb00da9bf3de659757b07870a96045c41f673",name:"backBtn"}),this.renderTabs(),e("slot",{key:"026c5ee7f31a2ed0782dacfb648fed3d994c6af9",name:"logoutBtn"})),e("div",{key:"9cdf7d28159a7173d145b864e3ed4ad8f597dfce",class:"lottery-tipping-content"},this.renderContent()))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};c.style=".lottery-tipping-page {\n container-type: inline-size;\n background: var(--emw--color-background, #fff);\n}\n.lottery-tipping-page-header {\n height: 56px;\n padding: 8px 10px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.lottery-tipping-page-header .tab-btns {\n display: flex;\n align-items: center;\n gap: 40px;\n flex: 1;\n justify-content: center;\n}\n.lottery-tipping-page-header .tab-btn {\n padding: 0 8px;\n line-height: 40px;\n font-size: 16px;\n cursor: pointer;\n font-weight: 600;\n height: 40px;\n border: 2px solid var(--emw--color-primary, #fed275);\n border-radius: 8px;\n color: var(--emw--color-typography, #000);\n transition: all 0.2s linear;\n}\n.lottery-tipping-page-header .tab-btn.active {\n background-color: var(--emw--color-primary, #fed275);\n color: var(--emw--color-typography, #000);\n border: 1px solid var(--emw--color-typography, #000);\n}\n\n@container (min-width: 1200px) {\n .tab-btns {\n gap: 40px;\n }\n}\n@container (max-width: 480px) {\n .tab-btns {\n gap: 24px;\n }\n}";export{c as L,n as a,s as b,i as s}
|