@everymatrix/lottery-tipping-page 1.87.26 → 1.87.27
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_14.cjs.entry.js +26 -26
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{lottery-tipping-page-b3e59c9c.js → lottery-tipping-page-ea2c1c3e.js} +70 -11
- package/dist/esm/general-multi-select_14.entry.js +27 -27
- package/dist/esm/index.js +1 -1
- package/dist/esm/{lottery-tipping-page-6edb8c22.js → lottery-tipping-page-af6b6291.js} +70 -11
- package/dist/lottery-tipping-page/general-multi-select_14.entry.js +2 -2
- package/dist/lottery-tipping-page/index.esm.js +1 -1
- package/dist/lottery-tipping-page/lottery-tipping-page-af6b6291.js +1 -0
- package/package.json +1 -1
- package/dist/lottery-tipping-page/lottery-tipping-page-6edb8c22.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export{L as LotteryTippingPage}from"./lottery-tipping-page-
|
|
1
|
+
export{L as LotteryTippingPage}from"./lottery-tipping-page-af6b6291.js";import"./index-3be4f76e.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e}from"./index-3be4f76e.js";const n="__WIDGET_GLOBAL_STYLE_CACHE__";function i(t,e){if(t){const n=document.createElement("style");n.innerHTML=e,t.appendChild(n)}}function s(t,e){if(!t||!e)return;const n=new URL(e);fetch(n.href).then((t=>t.text())).then((e=>{const n=document.createElement("style");n.innerHTML=e,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function o(t,e,i,s=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!s)return i=function(t,e){const n=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(n.innerHTML=e,t.appendChild(n))}))}(t,e),i;window[n]||(window[n]={}),i=function(t,e){return window.emMessageBus.subscribe(e,(i=>{if(!t)return;const s=t.getRootNode(),o=window[n];let r=o[e]?.sheet;r?o[e].refCount=o[e].refCount+1:(r=new CSSStyleSheet,r.replaceSync(i),o[e]={sheet:r,refCount:1});const a=s.adoptedStyleSheets||[];a.includes(r)||(s.adoptedStyleSheets=[...a,r])}))}(t,e);const o=i.unsubscribe.bind(i);return i.unsubscribe=()=>{if(window[n][e]){const t=window[n][e];t.refCount>1?t.refCount=t.refCount-1:delete window[n][e]}o()},i}var r;!function(t){t.BuyTickets="BUY_TICKETS",t.MyTickets="MY_TICKETS"}(r||(r={}));const a=["ro","en","fr","ar","hr"],l={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"}},c=(t,e)=>{const n=e;return l[void 0!==n&&a.includes(n)?n:"en"][t]},h=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.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.drawId=void 0,this.logoUrl=void 0,this.activeTab=r.BuyTickets}handleClientStylingChange(t,e){t!=e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const i=await n.json();e=i,Object.keys(e).forEach((t=>{for(let n in e[t])l[t][n]=e[t][n]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}renderTabs(){const t={[r.BuyTickets]:c("buyTickets",this.language),[r.MyTickets]:c("myTickets",this.language)};return e("div",{class:"tab-btns"},Object.values(r).map((n=>e("div",{class:"tab-btn"+(this.activeTab===n?" active":""),onClick:this.handleTabClick.bind(this,n)},t[n]))))}renderContent(){return this.activeTab===r.BuyTickets?e("lottery-tipping-ticket-controller",{endpoint:this.endpoint,gameId:this.gameId,playerId:this.playerId,sessionId:this.sessionId,drawId:this.drawId,language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl,"logo-url":this.logoUrl}):this.activeTab===r.MyTickets?e("lottery-tipping-ticket-history",{endpoint:this.endpoint,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.clientStyling,"translation-url":this.translationUrl}):null}render(){return e("div",{key:"410b13d8772d8a22ea4a2795230b5ea17975b3c3",class:"lottery-tipping-page",ref:t=>this.stylingContainer=t},e("div",{key:"f468ef27a6a720aa92fe6eda9729e9faf682c110",class:"lottery-tipping-page-header"},e("slot",{key:"d0485663265b73a313f9749ec0a4be14162c0203",name:"backBtn"}),this.renderTabs(),e("div",{key:"3fb36223d652e0702884102173f43920c9d684b1",class:"lottery-tipping-page-header-operation"},e("slot",{key:"d7d4b03c828c1b1a0f26eba9594093c8352bafbb",name:"themeBtn"}),e("slot",{key:"2a59bcae7c9e360bc4d6b35a441340f32f8d4f77",name:"logoutBtn"}))),e("div",{key:"f290300abafc8c31d23651fe7a9195a1f9e09e05",class:"lottery-tipping-content"},this.renderContent()))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};h.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-operation {\n display: flex;\n gap: 14px;\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{h as L,s as a,o as b,i as s}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
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){if(!t||!e)return;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 a;!function(t){t.BuyTickets="BUY_TICKETS",t.MyTickets="MY_TICKETS"}(a||(a={}));const o=["ro","en","fr","ar","hr"],r={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 r[void 0!==i&&o.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.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.drawId=void 0,this.logoUrl=void 0,this.activeTab=a.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])r[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={[a.BuyTickets]:l("buyTickets",this.language),[a.MyTickets]:l("myTickets",this.language)};return e("div",{class:"tab-btns"},Object.values(a).map((i=>e("div",{class:"tab-btn"+(this.activeTab===i?" active":""),onClick:this.handleTabClick.bind(this,i)},t[i]))))}renderContent(){return this.activeTab===a.BuyTickets?e("lottery-tipping-ticket-controller",{endpoint:this.endpoint,gameId:this.gameId,playerId:this.playerId,sessionId:this.sessionId,drawId:this.drawId,language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl,"logo-url":this.logoUrl}):this.activeTab===a.MyTickets?e("lottery-tipping-ticket-history",{endpoint:this.endpoint,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.clientStyling,"translation-url":this.translationUrl}):null}render(){return e("div",{key:"410b13d8772d8a22ea4a2795230b5ea17975b3c3",class:"lottery-tipping-page",ref:t=>this.stylingContainer=t},e("div",{key:"f468ef27a6a720aa92fe6eda9729e9faf682c110",class:"lottery-tipping-page-header"},e("slot",{key:"d0485663265b73a313f9749ec0a4be14162c0203",name:"backBtn"}),this.renderTabs(),e("div",{key:"3fb36223d652e0702884102173f43920c9d684b1",class:"lottery-tipping-page-header-operation"},e("slot",{key:"d7d4b03c828c1b1a0f26eba9594093c8352bafbb",name:"themeBtn"}),e("slot",{key:"2a59bcae7c9e360bc4d6b35a441340f32f8d4f77",name:"logoutBtn"}))),e("div",{key:"f290300abafc8c31d23651fe7a9195a1f9e09e05",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-operation {\n display: flex;\n gap: 14px;\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}
|