@everymatrix/casino-tournament-slider 1.29.8 → 1.30.0
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/casino-tournament-slider/casino-tournament-slider.esm.js +1 -1
- package/dist/casino-tournament-slider/p-ae2b53a4.entry.js +1 -0
- package/dist/casino-tournament-slider/p-c900508c.js +1 -0
- package/dist/cjs/casino-tournament-slider.cjs.entry.js +143 -0
- package/dist/cjs/casino-tournament-slider.cjs.js +2 -2
- package/dist/cjs/{index-f60eba31.js → index-dc5ac27a.js} +1 -26
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -8
- package/dist/components/casino-tournament-slider.js +2 -7
- package/dist/esm/casino-tournament-slider.entry.js +139 -0
- package/dist/esm/casino-tournament-slider.js +2 -2
- package/dist/esm/{index-c48feefa.js → index-cc11c895.js} +1 -26
- package/dist/esm/loader.js +2 -2
- package/package.json +1 -1
- package/dist/casino-tournament-slider/p-039bfb6a.entry.js +0 -1
- package/dist/casino-tournament-slider/p-7bade785.js +0 -1
- package/dist/cjs/casino-tournament-slider_2.cjs.entry.js +0 -369
- package/dist/components/general-slider.js +0 -6
- package/dist/components/general-slider2.js +0 -257
- package/dist/esm/casino-tournament-slider_2.entry.js +0 -364
- /package/dist/types/Users/{adrian.pripon/Documents/Work → sebastian.strulea/Documents/work}/widgets-stencil/packages/casino-tournament-slider/.stencil/packages/casino-tournament-slider/stencil.config.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-
|
|
1
|
+
import{p as e,b as t}from"./p-c900508c.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((e=>t([["p-ae2b53a4",[[1,"casino-tournament-slider",{useEvent:[1,"use-event"],endpoint:[1],tournamentId:[1,"tournament-id"],session:[1],language:[1],gamesLimit:[2,"games-limit"],offset:[2],slideNumber:[2,"slide-number"],slideShow:[2,"slide-show"],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],showTitle:[4,"show-title"],limitStylingAppends:[32],games:[32],hover:[32],hoverIndex:[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,g as i}from"./p-c900508c.js";import"@everymatrix/general-slider";const s={en:{playNow:"Play now",sliderTitle:"Participanting games"},"zh-hk":{playNow:"现在播放"},fr:{playNow:"Joue maintenant"},ro:{playNow:"Joaca acum"},hu:{playNow:"Játsszon most"},tr:{playNow:"Şimdi oyna"},el:{playNow:"Παίξε τώρα"},es:{playNow:"Jugar Ya"},pt:{playNow:"Jogue agora"},hr:{playNow:"IGRAJ SADA"}},o=(t,e)=>{var i,o;return(null===(i=s[e])||void 0===i?void 0:i[t])||(null===(o=s.en)||void 0===o?void 0:o[t])},n=class{constructor(e){t(this,e),this.gamesLimit=30,this.offset=0,this.slideNumber=3,this.slideShow=3,this.clientStyling="",this.clientStylingUrl="",this.showTitle=!1,this.limitStylingAppends=!1,this.enter=t=>{this.hover=!0,this.hoverIndex=t},this.leave=()=>{this.hover=!1,this.hoverIndex=-1},this.gameClicked=t=>{window.postMessage({type:"TournamentGameAction",gameId:t.id,name:t.name},window.location.href)}}todoCompletedHandler(t){if(t.detail&&this.useEvent){if(!t.detail.games)return;this.games=t.detail.games.items}}getTournamentInfo(){let t=new URL(this.endpoint+`/v1/tournaments/${this.tournamentId}`),e=new Headers;t.searchParams.append("expand","games"),t.searchParams.append("language",this.language),t.searchParams.append("pagination",`games(limit=${this.gamesLimit},offset=${this.offset})`),t.searchParams.append("fields","games(id,name,thumbnail)"),this.session&&e.append("X-SessionId",this.session),fetch(t.href,{method:"GET",headers:e}).then((t=>t.json())).then((t=>{this.games=t.item.games.items}))}componentWillLoad(){!this.useEvent&&this.endpoint&&this.tournamentId&&this.getTournamentInfo()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}setClientStyling(){const t=new CSSStyleSheet;t.replace(this.clientStyling),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,t]}setClientStylingURL(){let t=new URL(this.clientStylingUrl);fetch(t.href).then((t=>t.text())).then((t=>{const e=new CSSStyleSheet;e.replace(t),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,e]}))}render(){return e("div",{class:"TournamentSliderWrap"},e("div",{class:"TournamentSlider"},this.showTitle&&this.games&&e("div",{class:"SliderTitle"},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"25",viewBox:"0 0 21 25",fill:"none"},e("path",{d:"M6.1774 22.1728C6.36493 22.2725 6.56274 22.0566 6.44793 21.8779C5.82475 20.908 5.23463 19.2759 6.17483 17.174C7.74273 13.6689 8.6968 11.8535 8.6968 11.8535C8.6968 11.8535 9.20426 13.9721 10.5799 15.8558C11.9038 17.6687 12.6285 19.9488 11.4602 21.8482C11.3506 22.0265 11.5439 22.2368 11.7302 22.1415C13.1763 21.4017 14.7983 19.9179 14.9813 16.965C15.0488 16.0627 14.9476 14.7995 14.4416 13.2054C13.791 11.185 12.9911 10.2423 12.5283 9.83741C12.3899 9.71629 12.1746 9.82363 12.1859 10.0072C12.3208 12.1872 11.5007 12.7404 11.0339 11.4937C10.8474 10.9957 10.7387 10.1344 10.7387 9.08558C10.7387 7.3394 10.2321 5.54188 9.1152 4.0812C8.82475 3.70134 8.4849 3.3464 8.09498 3.04372C7.95382 2.93411 7.74919 3.04428 7.76212 3.22252C7.84788 4.40628 7.77018 7.79884 4.79383 11.8519C2.09515 15.6115 3.14088 18.4989 3.51195 19.281C4.2214 20.7791 5.21098 21.6589 6.1774 22.1728Z",fill:"white"})),e("span",{class:"Title"},o("sliderTitle",this.language))),e("div",{class:"Items"},this.games&&e("general-slider",{"slide-number":this.slideNumber,"slide-show":this.slideShow},this.games&&this.games.map(((t,i)=>e("li",{class:"Item",onMouseEnter:()=>this.enter(i),onMouseLeave:()=>this.leave()},e("span",{class:"PlayNowButton "+(this.hoverIndex==i?"ItemHover":""),onClick:()=>{this.gameClicked(t)}},o("playNow",this.language)),e("img",{class:"Img",src:t.thumbnail,alt:t.name,title:t.name}))))))))}get host(){return i(this)}};n.style=":host{display:block}.Item{color:white;display:flex;justify-content:center;align-items:center;font-weight:bold;font-size:10rem;user-select:none;overflow:hidden}.Item .Img{width:100%;height:100%}.PlayNowButton{position:absolute;background:var(--emfe-w-color-green, #48952a);display:block;box-sizing:border-box;padding:0.8rem 0.5rem;color:var(--emfe-w-color-white, #FFFFFF);text-transform:uppercase;text-align:center;font-weight:600;font-size:0.7rem;cursor:pointer;transition:opacity 0.4s linear;opacity:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ItemHover{opacity:1}.Items .Item:first-child{margin-left:0}.Items .Item:last-child{margin-right:0}.SliderTitle{display:flex;align-items:center;padding:6px 0;gap:11px}.Title{color:#fff;font-size:14px;font-weight:600}";export{n as casino_tournament_slider}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},r={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},i=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=f(e,n),i=a(t,s),c=h(n);r.ael(o,l,i,c),(t.o=t.o||[]).push((()=>r.rel(o,l,i,c)))}))},a=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){I(e)}},f=(e,t)=>8&t?s:e,h=e=>0!=(2&e),$=new WeakMap,d=e=>"sc-"+e.h,p={},m=e=>"object"==(e=typeof e)||"function"===e,y=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!m(l))&&(l+=""),s&&o?r[r.length-1].$+=l:r.push(s?w(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=w(e,null);return c.p=t,r.length>0&&(c.m=r),c},w=(e,t)=>({t:0,g:e,$:t,v:null,m:null,p:null}),b={},g=(e,t,n,l,o,i)=>{if(n!==l){let c=G(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,s=S(n),o=S(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if(c||"o"!==t[0]||"n"!==t[1]){const s=m(l);if((c||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||o)&&!s&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):G(s,u)?u.slice(2):u[2]+t.slice(3),n&&r.rel(e,t,n,!1),l&&r.ael(e,t,l,!1)}},v=/\s/,S=e=>e?e.split(v):[],j=(e,t,n,l)=>{const s=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.p||p,r=t.p||p;for(l in o)l in r||g(s,l,o[l],void 0,n,t.t);for(l in r)g(s,l,o[l],r[l],n,t.t)},O=(t,l,s)=>{let r,i,c=l.m[s],u=0;if(null!==c.$)r=c.v=o.createTextNode(c.$);else{if(n||(n="svg"===c.g),r=c.v=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.g),n&&"foreignObject"===c.g&&(n=!1),j(null,c,n),null!=e&&r["s-si"]!==e&&r.classList.add(r["s-si"]=e),c.m)for(u=0;u<c.m.length;++u)i=O(t,c,u),i&&r.appendChild(i);"svg"===c.g?n=!1:"foreignObject"===r.tagName&&(n=!0)}return r},M=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=O(null,l,o),i&&(s[o].v=i,c.insertBefore(i,n)))},k=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.v.remove()},C=(e,t)=>e.g===t.g,x=(e,t)=>{const l=t.v=e.v,s=e.m,o=t.m,r=t.g,i=t.$;null===i?(n="svg"===r||"foreignObject"!==r&&n,j(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],h=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==h?h=l[--a]:C(c,f)?(x(c,f),c=t[++o],f=l[++r]):C(u,h)?(x(u,h),u=t[--i],h=l[--a]):C(c,h)?(x(c,h),e.insertBefore(c.v,u.v.nextSibling),c=t[++o],h=l[--a]):C(u,f)?(x(u,f),e.insertBefore(u.v,c.v),u=t[--i],f=l[++r]):(s=O(t&&t[r],n,r),f=l[++r],s&&c.v.parentNode.insertBefore(s,c.v));o>i?M(e,null==l[a+1]?null:l[a+1].v,n,l,r,a):r>a&&k(t,o,i)})(l,s,t,o):null!==o?(null!==e.$&&(l.textContent=""),M(l,null,t,o,0,o.length-1)):null!==s&&k(s,0,s.length-1),n&&"svg"===r&&(n=!1)):e.$!==i&&(l.data=i)},P=e=>_(e).S,E=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},L=(e,t)=>{if(e.t|=16,!(4&e.t))return E(e,e.O),le((()=>N(e,t)));e.t|=512},N=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>F(n,e,t))),e.u=null),l=F(n,"componentWillLoad")),U(l,(()=>R(e,n,t)))},R=async(e,t,n)=>{const l=e.S,s=l["s-rc"];n&&(e=>{const t=e.M,n=e.S,l=t.t,s=((e,t)=>{let n=d(t),l=Q.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=$.get(e=e.head||e);s||$.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);T(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>W(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},T=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.S,o=n.k||w(null,null),r=(e=>e&&e.g===b)(l)?l:y(null,null,l);t=s.tagName,r.g=null,r.t|=4,n.k=r,r.v=o.v=s.shadowRoot||s,e=s["s-sc"],x(o,r)})(n,l)}catch(e){I(e,n.S)}return null},W=e=>{const t=e.S,n=e.O;F(e.i,"componentDidRender"),64&e.t||(e.t|=64,q(t),e.C(t),n||A()),e.j&&(e.j(),e.j=void 0),512&e.t&&ne((()=>L(e,!1))),e.t&=-517},A=()=>{q(o.documentElement),ne((()=>(e=>{const t=r.ce("appload",{detail:{namespace:"casino-tournament-slider"}});return e.dispatchEvent(t),t})(s)))},F=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){I(e)}},U=(e,t)=>e&&e.then?e.then(t):t(),q=e=>e.classList.add("hydrated"),D=(e,t,n)=>{if(t.P){const l=Object.entries(t.P),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>_(this).L.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=_(e),o=s.L.get(t),r=s.t,i=s.i;n=((e,t)=>null==e||m(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.P[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.L.set(t,n),i&&2==(18&r)&&L(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;s.attributeChangedCallback=function(e,n,l){r.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},H=(e,t={})=>{const n=[],l=t.exclude||[],i=s.customElements,a=o.head,f=a.querySelector("meta[charset]"),h=o.createElement("style"),$=[];let p,m=!0;Object.assign(r,t),r.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],h:t[1],P:t[2],N:t[3]};s.P=t[2],s.N=t[3];const o=s.h,a=class extends HTMLElement{constructor(e){super(e),B(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){p&&(clearTimeout(p),p=null),m?$.push(this):r.jmp((()=>(e=>{if(0==(1&r.t)){const t=_(e),n=t.M,l=()=>{};if(1&t.t)u(e,t,n.N);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){E(t,t.O=n);break}}n.P&&Object.entries(n.P).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=K(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(D(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){I(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=d(n);if(!Q.has(t)){const l=()=>{};((e,t,n)=>{let l=Q.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,Q.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.O,r=()=>L(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){r.jmp((()=>(()=>{if(0==(1&r.t)){const e=_(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return _(this).R}};s.T=e[0],l.includes(o)||i.get(o)||(n.push(o),i.define(o,D(a,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),a.insertBefore(h,f?f.nextSibling:a.firstChild),m=!1,$.length?$.map((e=>e.connectedCallback())):r.jmp((()=>p=setTimeout(A,30)))},V=new WeakMap,_=e=>V.get(e),z=(e,t)=>V.set(t.i=e,t),B=(e,t)=>{const n={t:0,S:e,M:t,L:new Map};return n.R=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],u(e,n,t.N),V.set(e,n)},G=(e,t)=>t in e,I=(e,t)=>(0,console.error)(e,t),J=new Map,K=e=>{const t=e.h.replace(/-/g,"_"),n=e.T,l=J.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(J.set(n,e),e[t])),I)},Q=new Map,X=[],Y=[],Z=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&r.t?ne(te):r.raf(te))},ee=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){I(e)}e.length=0},te=()=>{ee(X),ee(Y),(l=X.length>0)&&r.raf(te)},ne=e=>i().then(e),le=Z(Y,!0);export{H as b,P as g,y as h,i as p,z as r}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-dc5ac27a.js');
|
|
6
|
+
require('@everymatrix/general-slider');
|
|
7
|
+
|
|
8
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
9
|
+
const TRANSLATIONS = {
|
|
10
|
+
en: {
|
|
11
|
+
playNow: 'Play now',
|
|
12
|
+
sliderTitle: 'Participanting games'
|
|
13
|
+
},
|
|
14
|
+
'zh-hk': {
|
|
15
|
+
playNow: '现在播放',
|
|
16
|
+
},
|
|
17
|
+
fr: {
|
|
18
|
+
playNow: 'Joue maintenant',
|
|
19
|
+
},
|
|
20
|
+
ro: {
|
|
21
|
+
playNow: 'Joaca acum',
|
|
22
|
+
},
|
|
23
|
+
hu: {
|
|
24
|
+
playNow: 'Játsszon most',
|
|
25
|
+
},
|
|
26
|
+
tr: {
|
|
27
|
+
playNow: 'Şimdi oyna',
|
|
28
|
+
},
|
|
29
|
+
el: {
|
|
30
|
+
playNow: 'Παίξε τώρα',
|
|
31
|
+
},
|
|
32
|
+
es: {
|
|
33
|
+
playNow: 'Jugar Ya',
|
|
34
|
+
},
|
|
35
|
+
pt: {
|
|
36
|
+
playNow: 'Jogue agora',
|
|
37
|
+
},
|
|
38
|
+
hr: {
|
|
39
|
+
playNow: 'IGRAJ SADA',
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const translate = (key, customLang) => {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
const lang = customLang;
|
|
45
|
+
return ((_a = TRANSLATIONS[lang]) === null || _a === void 0 ? void 0 : _a[key]) || ((_b = TRANSLATIONS[DEFAULT_LANGUAGE]) === null || _b === void 0 ? void 0 : _b[key]);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const casinoTournamentSliderCss = ":host{display:block}.Item{color:white;display:flex;justify-content:center;align-items:center;font-weight:bold;font-size:10rem;user-select:none;overflow:hidden}.Item .Img{width:100%;height:100%}.PlayNowButton{position:absolute;background:var(--emfe-w-color-green, #48952a);display:block;box-sizing:border-box;padding:0.8rem 0.5rem;color:var(--emfe-w-color-white, #FFFFFF);text-transform:uppercase;text-align:center;font-weight:600;font-size:0.7rem;cursor:pointer;transition:opacity 0.4s linear;opacity:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ItemHover{opacity:1}.Items .Item:first-child{margin-left:0}.Items .Item:last-child{margin-right:0}.SliderTitle{display:flex;align-items:center;padding:6px 0;gap:11px}.Title{color:#fff;font-size:14px;font-weight:600}";
|
|
49
|
+
|
|
50
|
+
const CasinoTournamentSlider = class {
|
|
51
|
+
constructor(hostRef) {
|
|
52
|
+
index.registerInstance(this, hostRef);
|
|
53
|
+
this.gamesLimit = 30;
|
|
54
|
+
this.offset = 0;
|
|
55
|
+
this.slideNumber = 3;
|
|
56
|
+
this.slideShow = 3;
|
|
57
|
+
this.clientStyling = '';
|
|
58
|
+
this.clientStylingUrl = '';
|
|
59
|
+
this.showTitle = false;
|
|
60
|
+
this.limitStylingAppends = false;
|
|
61
|
+
this.enter = (index) => {
|
|
62
|
+
this.hover = true;
|
|
63
|
+
this.hoverIndex = index;
|
|
64
|
+
};
|
|
65
|
+
this.leave = () => {
|
|
66
|
+
this.hover = false;
|
|
67
|
+
this.hoverIndex = -1;
|
|
68
|
+
};
|
|
69
|
+
this.gameClicked = (item) => {
|
|
70
|
+
window.postMessage({ type: 'TournamentGameAction', gameId: item.id, name: item.name }, window.location.href);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
todoCompletedHandler(event) {
|
|
74
|
+
if (event.detail && this.useEvent) {
|
|
75
|
+
if (!event.detail.games)
|
|
76
|
+
return;
|
|
77
|
+
this.games = event.detail.games.items;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
getTournamentInfo() {
|
|
81
|
+
let url = new URL(this.endpoint + `/v1/tournaments/${this.tournamentId}`);
|
|
82
|
+
let reqHeaders = new Headers();
|
|
83
|
+
url.searchParams.append('expand', 'games');
|
|
84
|
+
url.searchParams.append('language', this.language);
|
|
85
|
+
url.searchParams.append('pagination', `games(limit=${this.gamesLimit},offset=${this.offset})`);
|
|
86
|
+
url.searchParams.append('fields', 'games(id,name,thumbnail)');
|
|
87
|
+
if (this.session) {
|
|
88
|
+
reqHeaders.append('X-SessionId', this.session);
|
|
89
|
+
}
|
|
90
|
+
let requestOptions = {
|
|
91
|
+
method: 'GET',
|
|
92
|
+
headers: reqHeaders,
|
|
93
|
+
};
|
|
94
|
+
fetch(url.href, requestOptions).then((res) => res.json())
|
|
95
|
+
.then((res) => {
|
|
96
|
+
this.games = res.item.games.items;
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
componentWillLoad() {
|
|
100
|
+
if (!this.useEvent && this.endpoint && this.tournamentId) {
|
|
101
|
+
this.getTournamentInfo();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
componentDidRender() {
|
|
105
|
+
if (!this.limitStylingAppends && this.host) {
|
|
106
|
+
if (this.clientStyling)
|
|
107
|
+
this.setClientStyling();
|
|
108
|
+
if (this.clientStylingUrl)
|
|
109
|
+
this.setClientStylingURL();
|
|
110
|
+
this.limitStylingAppends = true;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
setClientStyling() {
|
|
114
|
+
const sheet = new CSSStyleSheet();
|
|
115
|
+
// @ts-ignore
|
|
116
|
+
sheet.replace(this.clientStyling);
|
|
117
|
+
// @ts-ignore
|
|
118
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
119
|
+
}
|
|
120
|
+
setClientStylingURL() {
|
|
121
|
+
let url = new URL(this.clientStylingUrl);
|
|
122
|
+
fetch(url.href)
|
|
123
|
+
.then((res) => res.text())
|
|
124
|
+
.then((data) => {
|
|
125
|
+
const sheet = new CSSStyleSheet();
|
|
126
|
+
// @ts-ignore
|
|
127
|
+
sheet.replace(data);
|
|
128
|
+
// @ts-ignore
|
|
129
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
render() {
|
|
133
|
+
return index.h("div", { class: "TournamentSliderWrap" }, index.h("div", { class: "TournamentSlider" }, this.showTitle && this.games &&
|
|
134
|
+
index.h("div", { class: "SliderTitle" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "21", height: "25", viewBox: "0 0 21 25", fill: "none" }, index.h("path", { d: "M6.1774 22.1728C6.36493 22.2725 6.56274 22.0566 6.44793 21.8779C5.82475 20.908 5.23463 19.2759 6.17483 17.174C7.74273 13.6689 8.6968 11.8535 8.6968 11.8535C8.6968 11.8535 9.20426 13.9721 10.5799 15.8558C11.9038 17.6687 12.6285 19.9488 11.4602 21.8482C11.3506 22.0265 11.5439 22.2368 11.7302 22.1415C13.1763 21.4017 14.7983 19.9179 14.9813 16.965C15.0488 16.0627 14.9476 14.7995 14.4416 13.2054C13.791 11.185 12.9911 10.2423 12.5283 9.83741C12.3899 9.71629 12.1746 9.82363 12.1859 10.0072C12.3208 12.1872 11.5007 12.7404 11.0339 11.4937C10.8474 10.9957 10.7387 10.1344 10.7387 9.08558C10.7387 7.3394 10.2321 5.54188 9.1152 4.0812C8.82475 3.70134 8.4849 3.3464 8.09498 3.04372C7.95382 2.93411 7.74919 3.04428 7.76212 3.22252C7.84788 4.40628 7.77018 7.79884 4.79383 11.8519C2.09515 15.6115 3.14088 18.4989 3.51195 19.281C4.2214 20.7791 5.21098 21.6589 6.1774 22.1728Z", fill: "white" })), index.h("span", { class: "Title" }, translate('sliderTitle', this.language))), index.h("div", { class: "Items" }, this.games &&
|
|
135
|
+
index.h("general-slider", { "slide-number": this.slideNumber, "slide-show": this.slideShow }, this.games && this.games.map((game, i) => {
|
|
136
|
+
return index.h("li", { class: "Item", onMouseEnter: () => this.enter(i), onMouseLeave: () => this.leave() }, index.h("span", { class: `PlayNowButton ${this.hoverIndex == i ? 'ItemHover' : ''}`, onClick: () => { this.gameClicked(game); } }, translate('playNow', this.language)), index.h("img", { class: "Img", src: game.thumbnail, alt: game.name, title: game.name }));
|
|
137
|
+
})))));
|
|
138
|
+
}
|
|
139
|
+
get host() { return index.getElement(this); }
|
|
140
|
+
};
|
|
141
|
+
CasinoTournamentSlider.style = casinoTournamentSliderCss;
|
|
142
|
+
|
|
143
|
+
exports.casino_tournament_slider = CasinoTournamentSlider;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-dc5ac27a.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["casino-tournament-
|
|
18
|
+
return index.bootstrapLazy([["casino-tournament-slider.cjs",[[1,"casino-tournament-slider",{"useEvent":[1,"use-event"],"endpoint":[1],"tournamentId":[1,"tournament-id"],"session":[1],"language":[1],"gamesLimit":[2,"games-limit"],"offset":[2],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"showTitle":[4,"show-title"],"limitStylingAppends":[32],"games":[32],"hover":[32],"hoverIndex":[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]]]]], options);
|
|
19
19
|
});
|
|
@@ -273,12 +273,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
273
273
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
274
274
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
275
275
|
}
|
|
276
|
-
else if (memberName === 'ref') {
|
|
277
|
-
// minifier will clean this up
|
|
278
|
-
if (newValue) {
|
|
279
|
-
newValue(elm);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
276
|
else if ((!isProp ) &&
|
|
283
277
|
memberName[0] === 'o' &&
|
|
284
278
|
memberName[1] === 'n') {
|
|
@@ -452,7 +446,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
452
446
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
453
447
|
if ((vnode = vnodes[startIdx])) {
|
|
454
448
|
elm = vnode.$elm$;
|
|
455
|
-
callNodeRefs(vnode);
|
|
456
449
|
// remove the vnode's element from the dom
|
|
457
450
|
elm.remove();
|
|
458
451
|
}
|
|
@@ -546,9 +539,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
546
539
|
}
|
|
547
540
|
// element node
|
|
548
541
|
{
|
|
549
|
-
|
|
550
|
-
;
|
|
551
|
-
else {
|
|
542
|
+
{
|
|
552
543
|
// either this is the first render of an element OR it's an update
|
|
553
544
|
// AND we already know it's possible it could have changed
|
|
554
545
|
// this updates the element's css classes, attrs, props, listeners, etc.
|
|
@@ -582,12 +573,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
582
573
|
elm.data = text;
|
|
583
574
|
}
|
|
584
575
|
};
|
|
585
|
-
const callNodeRefs = (vNode) => {
|
|
586
|
-
{
|
|
587
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
588
|
-
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
589
|
-
}
|
|
590
|
-
};
|
|
591
576
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
592
577
|
const hostElm = hostRef.$hostElement$;
|
|
593
578
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -730,9 +715,6 @@ const postUpdateComponent = (hostRef) => {
|
|
|
730
715
|
// DOM WRITE!
|
|
731
716
|
addHydratedFlag(elm);
|
|
732
717
|
}
|
|
733
|
-
{
|
|
734
|
-
safeCall(instance, 'componentDidLoad');
|
|
735
|
-
}
|
|
736
718
|
endPostUpdate();
|
|
737
719
|
{
|
|
738
720
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -742,9 +724,6 @@ const postUpdateComponent = (hostRef) => {
|
|
|
742
724
|
}
|
|
743
725
|
}
|
|
744
726
|
else {
|
|
745
|
-
{
|
|
746
|
-
safeCall(instance, 'componentDidUpdate');
|
|
747
|
-
}
|
|
748
727
|
endPostUpdate();
|
|
749
728
|
}
|
|
750
729
|
// load events fire from bottom to top
|
|
@@ -1068,16 +1047,12 @@ const connectedCallback = (elm) => {
|
|
|
1068
1047
|
const disconnectedCallback = (elm) => {
|
|
1069
1048
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1070
1049
|
const hostRef = getHostRef(elm);
|
|
1071
|
-
const instance = hostRef.$lazyInstance$ ;
|
|
1072
1050
|
{
|
|
1073
1051
|
if (hostRef.$rmListeners$) {
|
|
1074
1052
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1075
1053
|
hostRef.$rmListeners$ = undefined;
|
|
1076
1054
|
}
|
|
1077
1055
|
}
|
|
1078
|
-
{
|
|
1079
|
-
safeCall(instance, 'disconnectedCallback');
|
|
1080
|
-
}
|
|
1081
1056
|
}
|
|
1082
1057
|
};
|
|
1083
1058
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-dc5ac27a.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["casino-tournament-
|
|
17
|
+
return index.bootstrapLazy([["casino-tournament-slider.cjs",[[1,"casino-tournament-slider",{"useEvent":[1,"use-event"],"endpoint":[1],"tournamentId":[1,"tournament-id"],"session":[1],"language":[1],"gamesLimit":[2,"games-limit"],"offset":[2],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"showTitle":[4,"show-title"],"limitStylingAppends":[32],"games":[32],"hover":[32],"hoverIndex":[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import
|
|
2
|
+
import '@everymatrix/general-slider';
|
|
3
3
|
|
|
4
4
|
const DEFAULT_LANGUAGE = 'en';
|
|
5
5
|
const TRANSLATIONS = {
|
|
@@ -158,18 +158,13 @@ function defineCustomElement$1() {
|
|
|
158
158
|
if (typeof customElements === "undefined") {
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
|
-
const components = ["casino-tournament-slider"
|
|
161
|
+
const components = ["casino-tournament-slider"];
|
|
162
162
|
components.forEach(tagName => { switch (tagName) {
|
|
163
163
|
case "casino-tournament-slider":
|
|
164
164
|
if (!customElements.get(tagName)) {
|
|
165
165
|
customElements.define(tagName, CasinoTournamentSlider$1);
|
|
166
166
|
}
|
|
167
167
|
break;
|
|
168
|
-
case "general-slider":
|
|
169
|
-
if (!customElements.get(tagName)) {
|
|
170
|
-
defineCustomElement$2();
|
|
171
|
-
}
|
|
172
|
-
break;
|
|
173
168
|
} });
|
|
174
169
|
}
|
|
175
170
|
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-cc11c895.js';
|
|
2
|
+
import '@everymatrix/general-slider';
|
|
3
|
+
|
|
4
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
5
|
+
const TRANSLATIONS = {
|
|
6
|
+
en: {
|
|
7
|
+
playNow: 'Play now',
|
|
8
|
+
sliderTitle: 'Participanting games'
|
|
9
|
+
},
|
|
10
|
+
'zh-hk': {
|
|
11
|
+
playNow: '现在播放',
|
|
12
|
+
},
|
|
13
|
+
fr: {
|
|
14
|
+
playNow: 'Joue maintenant',
|
|
15
|
+
},
|
|
16
|
+
ro: {
|
|
17
|
+
playNow: 'Joaca acum',
|
|
18
|
+
},
|
|
19
|
+
hu: {
|
|
20
|
+
playNow: 'Játsszon most',
|
|
21
|
+
},
|
|
22
|
+
tr: {
|
|
23
|
+
playNow: 'Şimdi oyna',
|
|
24
|
+
},
|
|
25
|
+
el: {
|
|
26
|
+
playNow: 'Παίξε τώρα',
|
|
27
|
+
},
|
|
28
|
+
es: {
|
|
29
|
+
playNow: 'Jugar Ya',
|
|
30
|
+
},
|
|
31
|
+
pt: {
|
|
32
|
+
playNow: 'Jogue agora',
|
|
33
|
+
},
|
|
34
|
+
hr: {
|
|
35
|
+
playNow: 'IGRAJ SADA',
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const translate = (key, customLang) => {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
const lang = customLang;
|
|
41
|
+
return ((_a = TRANSLATIONS[lang]) === null || _a === void 0 ? void 0 : _a[key]) || ((_b = TRANSLATIONS[DEFAULT_LANGUAGE]) === null || _b === void 0 ? void 0 : _b[key]);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const casinoTournamentSliderCss = ":host{display:block}.Item{color:white;display:flex;justify-content:center;align-items:center;font-weight:bold;font-size:10rem;user-select:none;overflow:hidden}.Item .Img{width:100%;height:100%}.PlayNowButton{position:absolute;background:var(--emfe-w-color-green, #48952a);display:block;box-sizing:border-box;padding:0.8rem 0.5rem;color:var(--emfe-w-color-white, #FFFFFF);text-transform:uppercase;text-align:center;font-weight:600;font-size:0.7rem;cursor:pointer;transition:opacity 0.4s linear;opacity:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ItemHover{opacity:1}.Items .Item:first-child{margin-left:0}.Items .Item:last-child{margin-right:0}.SliderTitle{display:flex;align-items:center;padding:6px 0;gap:11px}.Title{color:#fff;font-size:14px;font-weight:600}";
|
|
45
|
+
|
|
46
|
+
const CasinoTournamentSlider = class {
|
|
47
|
+
constructor(hostRef) {
|
|
48
|
+
registerInstance(this, hostRef);
|
|
49
|
+
this.gamesLimit = 30;
|
|
50
|
+
this.offset = 0;
|
|
51
|
+
this.slideNumber = 3;
|
|
52
|
+
this.slideShow = 3;
|
|
53
|
+
this.clientStyling = '';
|
|
54
|
+
this.clientStylingUrl = '';
|
|
55
|
+
this.showTitle = false;
|
|
56
|
+
this.limitStylingAppends = false;
|
|
57
|
+
this.enter = (index) => {
|
|
58
|
+
this.hover = true;
|
|
59
|
+
this.hoverIndex = index;
|
|
60
|
+
};
|
|
61
|
+
this.leave = () => {
|
|
62
|
+
this.hover = false;
|
|
63
|
+
this.hoverIndex = -1;
|
|
64
|
+
};
|
|
65
|
+
this.gameClicked = (item) => {
|
|
66
|
+
window.postMessage({ type: 'TournamentGameAction', gameId: item.id, name: item.name }, window.location.href);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
todoCompletedHandler(event) {
|
|
70
|
+
if (event.detail && this.useEvent) {
|
|
71
|
+
if (!event.detail.games)
|
|
72
|
+
return;
|
|
73
|
+
this.games = event.detail.games.items;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
getTournamentInfo() {
|
|
77
|
+
let url = new URL(this.endpoint + `/v1/tournaments/${this.tournamentId}`);
|
|
78
|
+
let reqHeaders = new Headers();
|
|
79
|
+
url.searchParams.append('expand', 'games');
|
|
80
|
+
url.searchParams.append('language', this.language);
|
|
81
|
+
url.searchParams.append('pagination', `games(limit=${this.gamesLimit},offset=${this.offset})`);
|
|
82
|
+
url.searchParams.append('fields', 'games(id,name,thumbnail)');
|
|
83
|
+
if (this.session) {
|
|
84
|
+
reqHeaders.append('X-SessionId', this.session);
|
|
85
|
+
}
|
|
86
|
+
let requestOptions = {
|
|
87
|
+
method: 'GET',
|
|
88
|
+
headers: reqHeaders,
|
|
89
|
+
};
|
|
90
|
+
fetch(url.href, requestOptions).then((res) => res.json())
|
|
91
|
+
.then((res) => {
|
|
92
|
+
this.games = res.item.games.items;
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
componentWillLoad() {
|
|
96
|
+
if (!this.useEvent && this.endpoint && this.tournamentId) {
|
|
97
|
+
this.getTournamentInfo();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
componentDidRender() {
|
|
101
|
+
if (!this.limitStylingAppends && this.host) {
|
|
102
|
+
if (this.clientStyling)
|
|
103
|
+
this.setClientStyling();
|
|
104
|
+
if (this.clientStylingUrl)
|
|
105
|
+
this.setClientStylingURL();
|
|
106
|
+
this.limitStylingAppends = true;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
setClientStyling() {
|
|
110
|
+
const sheet = new CSSStyleSheet();
|
|
111
|
+
// @ts-ignore
|
|
112
|
+
sheet.replace(this.clientStyling);
|
|
113
|
+
// @ts-ignore
|
|
114
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
115
|
+
}
|
|
116
|
+
setClientStylingURL() {
|
|
117
|
+
let url = new URL(this.clientStylingUrl);
|
|
118
|
+
fetch(url.href)
|
|
119
|
+
.then((res) => res.text())
|
|
120
|
+
.then((data) => {
|
|
121
|
+
const sheet = new CSSStyleSheet();
|
|
122
|
+
// @ts-ignore
|
|
123
|
+
sheet.replace(data);
|
|
124
|
+
// @ts-ignore
|
|
125
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
render() {
|
|
129
|
+
return h("div", { class: "TournamentSliderWrap" }, h("div", { class: "TournamentSlider" }, this.showTitle && this.games &&
|
|
130
|
+
h("div", { class: "SliderTitle" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "21", height: "25", viewBox: "0 0 21 25", fill: "none" }, h("path", { d: "M6.1774 22.1728C6.36493 22.2725 6.56274 22.0566 6.44793 21.8779C5.82475 20.908 5.23463 19.2759 6.17483 17.174C7.74273 13.6689 8.6968 11.8535 8.6968 11.8535C8.6968 11.8535 9.20426 13.9721 10.5799 15.8558C11.9038 17.6687 12.6285 19.9488 11.4602 21.8482C11.3506 22.0265 11.5439 22.2368 11.7302 22.1415C13.1763 21.4017 14.7983 19.9179 14.9813 16.965C15.0488 16.0627 14.9476 14.7995 14.4416 13.2054C13.791 11.185 12.9911 10.2423 12.5283 9.83741C12.3899 9.71629 12.1746 9.82363 12.1859 10.0072C12.3208 12.1872 11.5007 12.7404 11.0339 11.4937C10.8474 10.9957 10.7387 10.1344 10.7387 9.08558C10.7387 7.3394 10.2321 5.54188 9.1152 4.0812C8.82475 3.70134 8.4849 3.3464 8.09498 3.04372C7.95382 2.93411 7.74919 3.04428 7.76212 3.22252C7.84788 4.40628 7.77018 7.79884 4.79383 11.8519C2.09515 15.6115 3.14088 18.4989 3.51195 19.281C4.2214 20.7791 5.21098 21.6589 6.1774 22.1728Z", fill: "white" })), h("span", { class: "Title" }, translate('sliderTitle', this.language))), h("div", { class: "Items" }, this.games &&
|
|
131
|
+
h("general-slider", { "slide-number": this.slideNumber, "slide-show": this.slideShow }, this.games && this.games.map((game, i) => {
|
|
132
|
+
return h("li", { class: "Item", onMouseEnter: () => this.enter(i), onMouseLeave: () => this.leave() }, h("span", { class: `PlayNowButton ${this.hoverIndex == i ? 'ItemHover' : ''}`, onClick: () => { this.gameClicked(game); } }, translate('playNow', this.language)), h("img", { class: "Img", src: game.thumbnail, alt: game.name, title: game.name }));
|
|
133
|
+
})))));
|
|
134
|
+
}
|
|
135
|
+
get host() { return getElement(this); }
|
|
136
|
+
};
|
|
137
|
+
CasinoTournamentSlider.style = casinoTournamentSliderCss;
|
|
138
|
+
|
|
139
|
+
export { CasinoTournamentSlider as casino_tournament_slider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-cc11c895.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["casino-tournament-
|
|
16
|
+
return bootstrapLazy([["casino-tournament-slider",[[1,"casino-tournament-slider",{"useEvent":[1,"use-event"],"endpoint":[1],"tournamentId":[1,"tournament-id"],"session":[1],"language":[1],"gamesLimit":[2,"games-limit"],"offset":[2],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"showTitle":[4,"show-title"],"limitStylingAppends":[32],"games":[32],"hover":[32],"hoverIndex":[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]]]]], options);
|
|
17
17
|
});
|
|
@@ -251,12 +251,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
251
251
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
252
252
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
253
253
|
}
|
|
254
|
-
else if (memberName === 'ref') {
|
|
255
|
-
// minifier will clean this up
|
|
256
|
-
if (newValue) {
|
|
257
|
-
newValue(elm);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
254
|
else if ((!isProp ) &&
|
|
261
255
|
memberName[0] === 'o' &&
|
|
262
256
|
memberName[1] === 'n') {
|
|
@@ -430,7 +424,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
430
424
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
431
425
|
if ((vnode = vnodes[startIdx])) {
|
|
432
426
|
elm = vnode.$elm$;
|
|
433
|
-
callNodeRefs(vnode);
|
|
434
427
|
// remove the vnode's element from the dom
|
|
435
428
|
elm.remove();
|
|
436
429
|
}
|
|
@@ -524,9 +517,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
524
517
|
}
|
|
525
518
|
// element node
|
|
526
519
|
{
|
|
527
|
-
|
|
528
|
-
;
|
|
529
|
-
else {
|
|
520
|
+
{
|
|
530
521
|
// either this is the first render of an element OR it's an update
|
|
531
522
|
// AND we already know it's possible it could have changed
|
|
532
523
|
// this updates the element's css classes, attrs, props, listeners, etc.
|
|
@@ -560,12 +551,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
560
551
|
elm.data = text;
|
|
561
552
|
}
|
|
562
553
|
};
|
|
563
|
-
const callNodeRefs = (vNode) => {
|
|
564
|
-
{
|
|
565
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
566
|
-
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
567
|
-
}
|
|
568
|
-
};
|
|
569
554
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
570
555
|
const hostElm = hostRef.$hostElement$;
|
|
571
556
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -708,9 +693,6 @@ const postUpdateComponent = (hostRef) => {
|
|
|
708
693
|
// DOM WRITE!
|
|
709
694
|
addHydratedFlag(elm);
|
|
710
695
|
}
|
|
711
|
-
{
|
|
712
|
-
safeCall(instance, 'componentDidLoad');
|
|
713
|
-
}
|
|
714
696
|
endPostUpdate();
|
|
715
697
|
{
|
|
716
698
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -720,9 +702,6 @@ const postUpdateComponent = (hostRef) => {
|
|
|
720
702
|
}
|
|
721
703
|
}
|
|
722
704
|
else {
|
|
723
|
-
{
|
|
724
|
-
safeCall(instance, 'componentDidUpdate');
|
|
725
|
-
}
|
|
726
705
|
endPostUpdate();
|
|
727
706
|
}
|
|
728
707
|
// load events fire from bottom to top
|
|
@@ -1046,16 +1025,12 @@ const connectedCallback = (elm) => {
|
|
|
1046
1025
|
const disconnectedCallback = (elm) => {
|
|
1047
1026
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1048
1027
|
const hostRef = getHostRef(elm);
|
|
1049
|
-
const instance = hostRef.$lazyInstance$ ;
|
|
1050
1028
|
{
|
|
1051
1029
|
if (hostRef.$rmListeners$) {
|
|
1052
1030
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1053
1031
|
hostRef.$rmListeners$ = undefined;
|
|
1054
1032
|
}
|
|
1055
1033
|
}
|
|
1056
|
-
{
|
|
1057
|
-
safeCall(instance, 'disconnectedCallback');
|
|
1058
|
-
}
|
|
1059
1034
|
}
|
|
1060
1035
|
};
|
|
1061
1036
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-cc11c895.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["casino-tournament-
|
|
13
|
+
return bootstrapLazy([["casino-tournament-slider",[[1,"casino-tournament-slider",{"useEvent":[1,"use-event"],"endpoint":[1],"tournamentId":[1,"tournament-id"],"session":[1],"language":[1],"gamesLimit":[2,"games-limit"],"offset":[2],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"showTitle":[4,"show-title"],"limitStylingAppends":[32],"games":[32],"hover":[32],"hoverIndex":[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,g as s}from"./p-7bade785.js";const e={en:{playNow:"Play now",sliderTitle:"Participanting games"},"zh-hk":{playNow:"现在播放"},fr:{playNow:"Joue maintenant"},ro:{playNow:"Joaca acum"},hu:{playNow:"Játsszon most"},tr:{playNow:"Şimdi oyna"},el:{playNow:"Παίξε τώρα"},es:{playNow:"Jugar Ya"},pt:{playNow:"Jogue agora"},hr:{playNow:"IGRAJ SADA"}},h=(t,i)=>{var s,h;return(null===(s=e[i])||void 0===s?void 0:s[t])||(null===(h=e.en)||void 0===h?void 0:h[t])},o=class{constructor(i){t(this,i),this.gamesLimit=30,this.offset=0,this.slideNumber=3,this.slideShow=3,this.clientStyling="",this.clientStylingUrl="",this.showTitle=!1,this.limitStylingAppends=!1,this.enter=t=>{this.hover=!0,this.hoverIndex=t},this.leave=()=>{this.hover=!1,this.hoverIndex=-1},this.gameClicked=t=>{window.postMessage({type:"TournamentGameAction",gameId:t.id,name:t.name},window.location.href)}}todoCompletedHandler(t){if(t.detail&&this.useEvent){if(!t.detail.games)return;this.games=t.detail.games.items}}getTournamentInfo(){let t=new URL(this.endpoint+`/v1/tournaments/${this.tournamentId}`),i=new Headers;t.searchParams.append("expand","games"),t.searchParams.append("language",this.language),t.searchParams.append("pagination",`games(limit=${this.gamesLimit},offset=${this.offset})`),t.searchParams.append("fields","games(id,name,thumbnail)"),this.session&&i.append("X-SessionId",this.session),fetch(t.href,{method:"GET",headers:i}).then((t=>t.json())).then((t=>{this.games=t.item.games.items}))}componentWillLoad(){!this.useEvent&&this.endpoint&&this.tournamentId&&this.getTournamentInfo()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}setClientStyling(){const t=new CSSStyleSheet;t.replace(this.clientStyling),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,t]}setClientStylingURL(){let t=new URL(this.clientStylingUrl);fetch(t.href).then((t=>t.text())).then((t=>{const i=new CSSStyleSheet;i.replace(t),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,i]}))}render(){return i("div",{class:"TournamentSliderWrap"},i("div",{class:"TournamentSlider"},this.showTitle&&this.games&&i("div",{class:"SliderTitle"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"25",viewBox:"0 0 21 25",fill:"none"},i("path",{d:"M6.1774 22.1728C6.36493 22.2725 6.56274 22.0566 6.44793 21.8779C5.82475 20.908 5.23463 19.2759 6.17483 17.174C7.74273 13.6689 8.6968 11.8535 8.6968 11.8535C8.6968 11.8535 9.20426 13.9721 10.5799 15.8558C11.9038 17.6687 12.6285 19.9488 11.4602 21.8482C11.3506 22.0265 11.5439 22.2368 11.7302 22.1415C13.1763 21.4017 14.7983 19.9179 14.9813 16.965C15.0488 16.0627 14.9476 14.7995 14.4416 13.2054C13.791 11.185 12.9911 10.2423 12.5283 9.83741C12.3899 9.71629 12.1746 9.82363 12.1859 10.0072C12.3208 12.1872 11.5007 12.7404 11.0339 11.4937C10.8474 10.9957 10.7387 10.1344 10.7387 9.08558C10.7387 7.3394 10.2321 5.54188 9.1152 4.0812C8.82475 3.70134 8.4849 3.3464 8.09498 3.04372C7.95382 2.93411 7.74919 3.04428 7.76212 3.22252C7.84788 4.40628 7.77018 7.79884 4.79383 11.8519C2.09515 15.6115 3.14088 18.4989 3.51195 19.281C4.2214 20.7791 5.21098 21.6589 6.1774 22.1728Z",fill:"white"})),i("span",{class:"Title"},h("sliderTitle",this.language))),i("div",{class:"Items"},this.games&&i("general-slider",{"slide-number":this.slideNumber,"slide-show":this.slideShow},this.games&&this.games.map(((t,s)=>i("li",{class:"Item",onMouseEnter:()=>this.enter(s),onMouseLeave:()=>this.leave()},i("span",{class:"PlayNowButton "+(this.hoverIndex==s?"ItemHover":""),onClick:()=>{this.gameClicked(t)}},h("playNow",this.language)),i("img",{class:"Img",src:t.thumbnail,alt:t.name,title:t.name}))))))))}get host(){return s(this)}};o.style=":host{display:block}.Item{color:white;display:flex;justify-content:center;align-items:center;font-weight:bold;font-size:10rem;user-select:none;overflow:hidden}.Item .Img{width:100%;height:100%}.PlayNowButton{position:absolute;background:var(--emfe-w-color-green, #48952a);display:block;box-sizing:border-box;padding:0.8rem 0.5rem;color:var(--emfe-w-color-white, #FFFFFF);text-transform:uppercase;text-align:center;font-weight:600;font-size:0.7rem;cursor:pointer;transition:opacity 0.4s linear;opacity:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ItemHover{opacity:1}.Items .Item:first-child{margin-left:0}.Items .Item:last-child{margin-right:0}.SliderTitle{display:flex;align-items:center;padding:6px 0;gap:11px}.Title{color:#fff;font-size:14px;font-weight:600}";const l=class{constructor(i){t(this,i),this.slideNumber=3,this.slideShow=3,this.showArrow=!0,this.showButton=!1,this.autoSlide=!1,this.loopTime=1,this.autoItemHeight=!1,this.clientStyling="",this.clientStylingUrl="",this.currentSlideNumber=0,this.slidesCount=0,this.limitStylingAppends=!1,this.slides=null,this.slideWidth=0,this.currentPage=0,this.controls={Prev:null,Next:null},this.xDown=null,this.yDown=null}slide(t){let i=0;i=t?this.currentSlideNumber+this.slideNumber:this.currentSlideNumber-this.slideNumber,i<0||i>=this.slidesCount||(this.currentSlideNumber=i,this.currentPage=this.currentSlideNumber/this.slideNumber,this.updateListStyle())}slideTo(t){this.currentSlideNumber=t*this.slideNumber,this.currentPage=t,this.updateListStyle()}updateControls(){this.switchControl("Prev",0!==this.currentSlideNumber),this.switchControl("Next",this.currentSlideNumber!==this.slidesCount-this.slideShow)}switchControl(t,i){this.controls[t]&&(this.controls[t].disabled=!i)}componentWillLoad(){this.slideNumber||(this.slideNumber=1),this.slideShow||(this.slideShow=1)}componentDidLoad(){this.slides=this.slotEl.assignedElements(),this.slidesCount=this.slides.length;for(let t in this.controls)this.controls[t]=this.el.shadowRoot.querySelector(".Button"+t);this.autoSlide&&this.setSlideAutoInterval(),!this.limitStylingAppends&&this.el.shadowRoot&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}componentDidRender(){this.slides&&(this.slideWidth=this.slides[0].offsetWidth),this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.updateListStyle(),!this.limitStylingAppends&&this.el.shadowRoot&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}updateListStyle(){this.autoItemHeight&&null!==this.slides&&this.slides.forEach(((t,i)=>{i>=this.currentPage*this.slideNumber&&i<(this.currentPage+1)*this.slideNumber?t.classList.remove("hide"):t.classList.add("hide")}))}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove)}handleTouchStart(t){const i=this.getTouches(t)[0];this.xDown=i.clientX,this.yDown=i.clientY,clearInterval(this.sliderInterval)}getTouches(t){return t.touches||t.originalEvent.touches}handleTouchMove(t){if(!this.xDown||!this.yDown)return;let i=this.xDown-t.touches[0].clientX,s=this.yDown-t.touches[0].clientY;Math.abs(i)>Math.abs(s)&&this.slide(i>0),this.xDown=null,this.yDown=null,this.autoSlide&&this.setSlideAutoInterval()}setSlideAutoInterval(){0!=this.loopTime&&(clearInterval(this.sliderInterval),this.sliderInterval=setInterval((()=>{this.slideTo(this.currentPage+1<this.slidesCount/this.slideNumber?this.currentPage+1:0)}),1e3*Number(this.loopTime)))}componentDidUpdate(){this.sliderEl.style.transform=`translateX(${this.currentSlideNumber*this.slideWidth*-1}px)`,this.updateControls()}switchLoopStatus(t){this.autoSlide&&this.loopTime>0&&(t?clearInterval(this.sliderInterval):this.setSlideAutoInterval())}setClientStyling(){const t=new CSSStyleSheet;t.replace(this.clientStyling),this.el.shadowRoot.adoptedStyleSheets=[...this.el.shadowRoot.adoptedStyleSheets,t]}setClientStylingURL(){let t=new URL(this.clientStylingUrl);fetch(t.href).then((t=>t.text())).then((t=>{const i=new CSSStyleSheet;i.replace(t),this.el.shadowRoot.adoptedStyleSheets=[...this.el.shadowRoot.adoptedStyleSheets,i]}))}render(){return i("div",{class:"GeneralSlider"},i("div",{class:"Slider"},this.showArrow&&i("div",null,i("button",{type:"button",class:"Button ButtonNext",onClick:this.slide.bind(this,!0),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)},">"),i("button",{type:"button",class:"Button ButtonPrev",onClick:this.slide.bind(this,!1),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)},"<")),i("ul",{class:`SliderList Col-${this.slideShow}`,part:"SliderList",onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1),ref:t=>this.sliderEl=t},i("slot",{ref:t=>this.slotEl=t}))),this.showButton&&this.slidesCount>0&&i("div",{class:"PageButtons",part:"PageButtons"},[...Array(this.slidesCount/this.slideNumber)].map(((t,s)=>i("div",{class:"PageButton "+(this.currentPage==s?"active":""),title:`page${s}`,onClick:this.slideTo.bind(this,s),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)}," ")))))}get el(){return s(this)}};l.style=":host{display:block}.GeneralSlider{position:relative}.Slider{position:relative;width:100%;margin:0 auto;overflow:hidden}.SliderList{display:flex;margin:0;padding:0;list-style:none;transition:transform 0.5s ease-in-out}::slotted(li){flex:1 0 auto;width:100%;margin:auto}::slotted(li.hide){visibility:hidden;height:0;transition-delay:500ms}.Col-2 ::slotted(li){flex:2 0 auto;width:50%}.Col-3 ::slotted(li){flex:3 0 auto;width:33.3333333333%}.Col-4 ::slotted(li){flex:4 0 auto;width:25%}.Col-5 ::slotted(li){flex:5 0 auto;width:20%}.Col-6 ::slotted(li){flex:6 0 auto;width:16.6666666667%}.Col-7 ::slotted(li){flex:7 0 auto;width:14.2857142857%}.Col-8 ::slotted(li){flex:8 0 auto;width:12.5%}.Col-9 ::slotted(li){flex:9 0 auto;width:11.1111111111%}.Col-10 ::slotted(li){flex:10 0 auto;width:10%}.Col-11 ::slotted(li){flex:11 0 auto;width:9.0909090909%}.Col-12 ::slotted(li){flex:12 0 auto;width:8.3333333333%}.Button{position:absolute;z-index:1;top:calc(50% - 32px);padding:20px;font-size:20px;line-height:20px;opacity:0.5;border:none;background:var(--emfe-w-color-contrast, #07072A);color:var(--emfe-w-color-white, #FFFFFF);cursor:pointer}.Button:hover{opacity:1;transition:opacity 0.5s ease-in-out}.Button[disabled],.Button[disabled]:hover{color:var(--emfe-w-color-gray-150, #828282);opacity:0.25}.Button.ButtonNext{right:0}.PageButtons{display:flex;gap:4px;margin-top:8px}.PageButton{width:15px;height:4px;border-radius:4px;background-color:var(--emfe-w-tournament-color-primary, #0072ed);opacity:0.2;cursor:pointer;float:right}.PageButton.active{width:45px;opacity:1}";export{o as casino_tournament_slider,l as general_slider}
|