@everymatrix/casino-categories 1.5.3 → 1.5.5

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.
@@ -583,5 +583,5 @@ return e[2]?lr:hr}let i=n(t),o=i(t);return{c(){r=g("div"),o.c(),this.c=e},m(e,n)
583
583
  /*div_binding*/t[16](r)},p(e,[t]){i===(i=n(e))&&o?o.p(e,t):(o.d(1),o=i(e),o&&(o.c(),o.m(r,null)))},i:e,o:e,d(e){e&&f(r),o.d(),
584
584
  /*div_binding*/t[16](null)}}}function pr(e,t,r){let n;var i,o;i=nr,o=e=>r(5,n=e),e.$$.on_destroy.push(l(i,o));let s,{endpoint:a=""}=t,{datasource:h=""}=t,{lang:c="en"}=t,{activecategory:u=""}=t,{excludedflags:f=""}=t,{clientstyling:p=""}=t,{clientstylingurl:g=""}=t,{translationurl:m=""}=t,d=!1;const E=[];let b=[],y=[];Object.keys(or).forEach((e=>{ir(e,or[e])}));const T=e=>{window.postMessage({type:"OpenGameCategory",categoryId:e})},v=()=>{var e;e=c,Xt.set(e)};return e.$$set=e=>{"endpoint"in e&&r(7,a=e.endpoint),"datasource"in e&&r(8,h=e.datasource),"lang"in e&&r(9,c=e.lang),"activecategory"in e&&r(0,u=e.activecategory),"excludedflags"in e&&r(10,f=e.excludedflags),"clientstyling"in e&&r(11,p=e.clientstyling),"clientstylingurl"in e&&r(12,g=e.clientstylingurl),"translationurl"in e&&r(13,m=e.translationurl)},e.$$.update=()=>{/*endpoint, datasource*/384&e.$$.dirty&&a&&h&&(()=>{r(2,d=!0);const e=new URL(`${a}/casino/groups/${h}`);e.searchParams.append("language",c),fetch(e).then((e=>e.json())).then((e=>{r(2,d=!1);const t=f.split(",").map((e=>e.trim()));E.push(...e.items);
585
585
  // remove those items which have a flag matching the excluded flags
586
- const n=E.filter((e=>!t.some((t=>{var r;return(null===(r=e.flags)||void 0===r?void 0:r.indexOf(t))>=0}))));r(3,b=n.filter((e=>!0===e.isTopCategory))),r(4,y=n.filter((e=>!1===e.isTopCategory)))}))})(),/*translationurl*/8192&e.$$.dirty&&m&&fetch(m).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{ir(t,e[t])}))})).catch((e=>{console.log(e)})),/*lang*/512&e.$$.dirty&&c&&v(),/*clientstyling, customStylingContainer*/2050&e.$$.dirty&&p&&s&&(()=>{let e=document.createElement("style");e.innerHTML=p,s.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/4098&e.$$.dirty&&g&&s&&(()=>{let e=new URL(g),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{s.appendChild(t)}),1),setTimeout((()=>{}),500)}))})()},[u,s,d,b,y,n,T,a,h,c,f,p,g,m,e=>T(e.id),e=>T(e.id),function(e){_[e?"unshift":"push"]((()=>{s=e,r(1,s)}))}]}class gr extends U{constructor(e){super(),this.shadowRoot.innerHTML='<style>:host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.CasinoCategories{display:flex;flex-direction:column;gap:1rem;padding:10px 60px}.CategoryTitle{font-weight:500;position:relative;right:30px;margin:10px 0}.Category{border-radius:7px;display:flex;align-items:center;gap:16px;max-width:300px}.Category.Active{box-shadow:15px 15px 30px #e4e2e2}.CategoryTextContainer{display:flex;flex-direction:column;justify-content:center;gap:10px;font-size:15px}.CategoryTextContainer p:first-child{font-weight:600}.CategoryTextContainer p:last-child{color:#828282;font-weight:300}.CategoryImage{border-radius:4px;object-fit:cover;height:64px;width:64px;font-weight:100}.Message{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);font-weight:600}</style>',R(this,{target:this.shadowRoot,props:T(this.attributes),customElement:!0},pr,fr,o,{endpoint:7,datasource:8,lang:9,activecategory:0,excludedflags:10,clientstyling:11,clientstylingurl:12,translationurl:13},null),e&&(e.target&&u(e.target,this,e.anchor),e.props&&(this.$set(e.props),N()))}static get observedAttributes(){return["endpoint","datasource","lang","activecategory","excludedflags","clientstyling","clientstylingurl","translationurl"]}get endpoint(){return this.$$.ctx[7]}set endpoint(e){this.$$set({endpoint:e}),N()}get datasource(){return this.$$.ctx[8]}set datasource(e){this.$$set({datasource:e}),N()}get lang(){return this.$$.ctx[9]}set lang(e){this.$$set({lang:e}),N()}get activecategory(){return this.$$.ctx[0]}set activecategory(e){this.$$set({activecategory:e}),N()}get excludedflags(){return this.$$.ctx[10]}set excludedflags(e){this.$$set({excludedflags:e}),N()}get clientstyling(){return this.$$.ctx[11]}set clientstyling(e){this.$$set({clientstyling:e}),N()}get clientstylingurl(){return this.$$.ctx[12]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),N()}get translationurl(){return this.$$.ctx[13]}set translationurl(e){this.$$set({translationurl:e}),N()}}return!customElements.get("casino-categories")&&customElements.define("casino-categories",gr),gr}));
586
+ const n=E.filter((e=>!t.some((t=>{var r;return(null===(r=e.flags)||void 0===r?void 0:r.indexOf(t))>=0}))));r(3,b=n.filter((e=>!0===e.isTopCategory))),r(4,y=n.filter((e=>!1===e.isTopCategory)))}))})(),/*translationurl*/8192&e.$$.dirty&&m&&fetch(m).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{ir(t,e[t])}))})).catch((e=>{console.log(e)})),/*lang*/512&e.$$.dirty&&c&&v(),/*clientstyling, customStylingContainer*/2050&e.$$.dirty&&p&&s&&(()=>{let e=document.createElement("style");e.innerHTML=p,s.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/4098&e.$$.dirty&&g&&s&&(()=>{let e=new URL(g),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{s.appendChild(t)}),1),setTimeout((()=>{}),500)}))})()},[u,s,d,b,y,n,T,a,h,c,f,p,g,m,e=>T(e.id),e=>T(e.id),function(e){_[e?"unshift":"push"]((()=>{s=e,r(1,s)}))}]}class gr extends U{constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.CasinoCategories{display:flex;flex-direction:column;gap:1rem;padding:10px 60px}.CategoryTitle{font-weight:500;position:relative;right:30px;margin:10px 0}.Category{border-radius:7px;display:flex;align-items:center;gap:16px;max-width:300px}.Category.Active{box-shadow:15px 15px 30px #e4e2e2}.CategoryTextContainer{display:flex;flex-direction:column;justify-content:center;gap:10px;font-size:15px}.CategoryTextContainer p:first-child{font-weight:600}.CategoryTextContainer p:last-child{color:#828282;font-weight:300}.CategoryImage{border-radius:4px;object-fit:cover;height:64px;width:64px;font-weight:100}.Message{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);font-weight:600}</style>",R(this,{target:this.shadowRoot,props:T(this.attributes),customElement:!0},pr,fr,o,{endpoint:7,datasource:8,lang:9,activecategory:0,excludedflags:10,clientstyling:11,clientstylingurl:12,translationurl:13},null),e&&(e.target&&u(e.target,this,e.anchor),e.props&&(this.$set(e.props),N()))}static get observedAttributes(){return["endpoint","datasource","lang","activecategory","excludedflags","clientstyling","clientstylingurl","translationurl"]}get endpoint(){return this.$$.ctx[7]}set endpoint(e){this.$$set({endpoint:e}),N()}get datasource(){return this.$$.ctx[8]}set datasource(e){this.$$set({datasource:e}),N()}get lang(){return this.$$.ctx[9]}set lang(e){this.$$set({lang:e}),N()}get activecategory(){return this.$$.ctx[0]}set activecategory(e){this.$$set({activecategory:e}),N()}get excludedflags(){return this.$$.ctx[10]}set excludedflags(e){this.$$set({excludedflags:e}),N()}get clientstyling(){return this.$$.ctx[11]}set clientstyling(e){this.$$set({clientstyling:e}),N()}get clientstylingurl(){return this.$$.ctx[12]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),N()}get translationurl(){return this.$$.ctx[13]}set translationurl(e){this.$$set({translationurl:e}),N()}}return!customElements.get("casino-categories")&&customElements.define("casino-categories",gr),gr}));
587
587
  //# sourceMappingURL=casino-categories.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-categories",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "main": "dist/casino-categories.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -36,5 +36,5 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "455c9a0d14fef23d3698fbea37042c69e3aeed24"
39
+ "gitHead": "394176b807e2523b04e88d04cbdb5d596577547a"
40
40
  }