@everymatrix/casino-tournament-duration 1.66.1 → 1.67.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-duration/casino-tournament-duration.entry.js +1 -0
- package/dist/casino-tournament-duration/casino-tournament-duration.esm.js +1 -1
- package/dist/stencil.config.js +1 -0
- package/package.json +1 -1
- package/dist/casino-tournament-duration/p-b217bc2d.entry.js +0 -1
- /package/dist/casino-tournament-duration/{p-e1255160.js → app-globals-0f993ce5.js} +0 -0
- /package/dist/casino-tournament-duration/{p-22c89147.js → index-ab94677e.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,g as s}from"./index-ab94677e.js";const e={en:{finished:"Finished",starting:"Starting in ",left:"left",minutes:"minutes",hours:"hours",days:"days"},hr:{finished:"Gotovo",starting:"Počinje u ",left:"lijevo",minutes:"minute",hours:"sati",days:"dani"},"zh-hk":{finished:"完成的",starting:"開始於",left:"剩下",minutes:"分鐘",hours:"小時",days:"天"},fr:{finished:"Fini",starting:"Début dans ",left:"restant",minutes:"minutes",hours:"heures",days:"jours"},ro:{finished:"Finalizat",starting:"Începe în",left:"rămase",minutes:"minute",hours:"ore",days:"zile"},tr:{finished:"Sona ermiş",starting:"Başlamasına ",left:"kaldı",minutes:"dakika",hours:"saat",days:"gün"},el:{finished:"Ολοκληρωμένα",starting:"Αρχίζει σε ",left:"απομένουν",minutes:"λεπτά",hours:"ώρες",days:"ημέρες"},es:{finished:"Finalizado",starting:"Iniciando en ",left:"izquierda",minutes:"minutos",hours:"horas",days:"días"},hu:{finished:"Befejezve",starting:"Kezdésig",left:"bal",minutes:"perc",hours:"óra",days:"nap"},pt:{finished:"Finalizado",starting:"Começando em",left:"Abandonou",minutes:"Minutos",hours:"Horas",days:"Dias"}},a=(t,i)=>{var s,a;return(null===(s=e[i])||void 0===s?void 0:s[t])||(null===(a=e.en)||void 0===a?void 0:a[t])},r=class{constructor(i){t(this,i),this.startTime=void 0,this.endTime=void 0,this.status=void 0,this.language=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationData=void 0,this.tournamentUntilStartDays=void 0,this.tournamentLeftDays=void 0,this.showRemain=void 0,this.limitStylingAppends=!1,this.durationInterval=void 0}watchLanguage(t,i){t&&t!=i&&this.getDuration()}getDateTimeDiff(t,i){return(new Date(i).getTime()-new Date(t).getTime())/6e4}getDuration(){const t=new Date;this.tournamentLeftDays=this.getDateTimeDiff(t,this.endTime),this.tournamentUntilStartDays=this.getDateTimeDiff(t,this.startTime),this.showRemain=this.getTextByDiff(this.tournamentLeftDays)}formatDate(t){let i=new Date(t),s=new Intl.DateTimeFormat(this.language,{month:"long"}).format(i);return`${i.getDate()} ${s}, ${i.toLocaleString("en-GB",{hour:"numeric",minute:"numeric"})}, ${i.getUTCFullYear()}`}getTextByDiff(t){if(t<1440){const i=t%60;return[t/60,i,60*(i-Math.floor(i))].map((t=>(t=>{const i=Math.floor(t);return i<10?`0${i}`:`${i}`})(t))).join(":")}return(t=>t+" "+a("days",this.language))(Math.ceil(t/1440))}getProgress(){if(this.tournamentLeftDays<=0)return 100;const t=this.getDateTimeDiff(this.startTime,this.endTime);return Math.floor(100/t*(t-this.tournamentLeftDays))}componentWillLoad(){var t;this.translationData&&(t=JSON.parse(this.translationData),Object.keys(t).forEach((i=>{for(let s in t[i])e[i][s]=t[i][s]}))),this.startTime&&this.endTime&&(this.getDuration(),this.getTextByDiff(this.tournamentLeftDays)),this.tournamentLeftDays<1440&&this.tournamentLeftDays>0?this.durationInterval=window.setInterval((()=>{this.startTime&&this.endTime&&this.getDuration()}),1e3):clearInterval(this.durationInterval)}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(){if(this.startTime&&this.endTime)return i("div",{key:"d0051545a243161e89e126fd26b9ea9d2e09f8ab",class:"TournamentDurationWrap"},i("div",{key:"b585f0137268f0185dfd15e563a0075bfe617d5b",class:"TournamentDuration"},i("div",{key:"9cc3670780d9f8c40b77ac978cdadb0e0afdcacb",class:"TournamentDates"},i("div",{key:"85e4f3b1de4f36efd8d13b090f8f9013976d8685",class:"StartDate",part:"StartDate"},this.formatDate(this.startTime)),i("div",{key:"688a84ce16a4d26359637b80837a9c5f50fc24c3",class:"EndDate",part:"EndDate"},this.formatDate(this.endTime))),i("div",{key:"149c0431ac2d8f9b5058a2a269b50e01d23ed26f",class:"ProgressBarWrapper"},i("div",{key:"85523f37f511f9184260f8575ec08e914f535858",class:"ProgressBar",part:"ProgressBar"},"Finished"==this.status||"Closing"==this.status||"Closed"==this.status?i("div",null,i("div",{class:"ProgressBarFillEnd",part:"ProgressBarFillEnd"}),i("div",{class:"Finished",part:"Finished"},a("finished",this.language))):this.tournamentUntilStartDays>0?i("div",null,i("div",{class:"ProgressBarFillStarting",part:"ProgressBarFillStarting"}),i("div",{class:"Remaining",part:"Remaining"},a("starting",this.language)," ",this.getTextByDiff(this.tournamentUntilStartDays))):i("div",null,i("div",{class:"ProgressBarFill",part:"ProgressBarFill",style:{width:`${this.getProgress()}%`}}),this.tournamentLeftDays>0&&i("div",{class:"Remaining",part:"Remaining"},this.showRemain," ",a("left",this.language)))))))}get host(){return s(this)}static get watchers(){return{language:["watchLanguage"]}}};r.style=":host{display:block}.TournamentDates{display:flex;justify-content:space-between}.StartDate{font-size:10px;font-weight:700;color:var(--emw--color-gray-300, #58586B)}.EndDate{font-size:10px;font-weight:700;align-content:flex-end;color:var(--emw--color-gray-300, #58586B)}.ProgressBar{margin:5px 0;height:8px;background:var(--emw--color-white, #FFFFFF)}.ProgressBarInactive{margin:5px 20px 10px 20px;height:8px;background:var(--emw--color-gray-100, #E6E6E6)}.ProgressBarFill{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillEnd{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillStarting{background-color:var(--emw--color-gray-300, #58586B);height:8px}.Remaining,.Finished{font-size:10px;font-weight:700;padding-top:6px;text-align:right;text-transform:uppercase}.Finished{color:var(--emw--color-green, #48952a)}";export{r as casino_tournament_duration}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,b as a}from"./
|
|
1
|
+
import{p as t,b as a}from"./index-ab94677e.js";export{s as setNonce}from"./index-ab94677e.js";import{g as n}from"./app-globals-0f993ce5.js";(()=>{const a=import.meta.url,n={};return""!==a&&(n.resourcesUrl=new URL(".",a).href),t(n)})().then((async t=>(await n(),a([["casino-tournament-duration",[[1,"casino-tournament-duration",{startTime:[1,"start-time"],endTime:[1,"end-time"],status:[1],language:[1],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationData:[520,"translation-data"],tournamentUntilStartDays:[32],tournamentLeftDays:[32],showRemain:[32],limitStylingAppends:[32],durationInterval:[32]},null,{language:["watchLanguage"]}]]]],t))));
|
package/dist/stencil.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,g as s}from"./p-22c89147.js";const e={en:{finished:"Finished",starting:"Starting in ",left:"left",minutes:"minutes",hours:"hours",days:"days"},hr:{finished:"Gotovo",starting:"Počinje u ",left:"lijevo",minutes:"minute",hours:"sati",days:"dani"},"zh-hk":{finished:"完成的",starting:"開始於",left:"剩下",minutes:"分鐘",hours:"小時",days:"天"},fr:{finished:"Fini",starting:"Début dans ",left:"restant",minutes:"minutes",hours:"heures",days:"jours"},ro:{finished:"Finalizat",starting:"Începe în",left:"rămase",minutes:"minute",hours:"ore",days:"zile"},tr:{finished:"Sona ermiş",starting:"Başlamasına ",left:"kaldı",minutes:"dakika",hours:"saat",days:"gün"},el:{finished:"Ολοκληρωμένα",starting:"Αρχίζει σε ",left:"απομένουν",minutes:"λεπτά",hours:"ώρες",days:"ημέρες"},es:{finished:"Finalizado",starting:"Iniciando en ",left:"izquierda",minutes:"minutos",hours:"horas",days:"días"},hu:{finished:"Befejezve",starting:"Kezdésig",left:"bal",minutes:"perc",hours:"óra",days:"nap"},pt:{finished:"Finalizado",starting:"Começando em",left:"Abandonou",minutes:"Minutos",hours:"Horas",days:"Dias"}},a=(t,i)=>{var s,a;return(null===(s=e[i])||void 0===s?void 0:s[t])||(null===(a=e.en)||void 0===a?void 0:a[t])},r=class{constructor(i){t(this,i),this.startTime=void 0,this.endTime=void 0,this.status=void 0,this.language=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationData=void 0,this.tournamentUntilStartDays=void 0,this.tournamentLeftDays=void 0,this.showRemain=void 0,this.limitStylingAppends=!1,this.durationInterval=void 0}watchLanguage(t,i){t&&t!=i&&this.getDuration()}getDateTimeDiff(t,i){return(new Date(i).getTime()-new Date(t).getTime())/6e4}getDuration(){const t=new Date;this.tournamentLeftDays=this.getDateTimeDiff(t,this.endTime),this.tournamentUntilStartDays=this.getDateTimeDiff(t,this.startTime),this.showRemain=this.getTextByDiff(this.tournamentLeftDays)}formatDate(t){let i=new Date(t),s=new Intl.DateTimeFormat(this.language,{month:"long"}).format(i);return`${i.getDate()} ${s}, ${i.toLocaleString("en-GB",{hour:"numeric",minute:"numeric"})}, ${i.getUTCFullYear()}`}getTextByDiff(t){if(t<1440){const i=t%60;return[t/60,i,60*(i-Math.floor(i))].map((t=>(t=>{const i=Math.floor(t);return i<10?`0${i}`:`${i}`})(t))).join(":")}return(t=>t+" "+a("days",this.language))(Math.ceil(t/1440))}getProgress(){if(this.tournamentLeftDays<=0)return 100;const t=this.getDateTimeDiff(this.startTime,this.endTime);return Math.floor(100/t*(t-this.tournamentLeftDays))}componentWillLoad(){var t;this.translationData&&(t=JSON.parse(this.translationData),Object.keys(t).forEach((i=>{for(let s in t[i])e[i][s]=t[i][s]}))),this.startTime&&this.endTime&&(this.getDuration(),this.getTextByDiff(this.tournamentLeftDays)),this.tournamentLeftDays<1440&&this.tournamentLeftDays>0?this.durationInterval=window.setInterval((()=>{this.startTime&&this.endTime&&this.getDuration()}),1e3):clearInterval(this.durationInterval)}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(){if(this.startTime&&this.endTime)return i("div",{key:"d0051545a243161e89e126fd26b9ea9d2e09f8ab",class:"TournamentDurationWrap"},i("div",{key:"b585f0137268f0185dfd15e563a0075bfe617d5b",class:"TournamentDuration"},i("div",{key:"9cc3670780d9f8c40b77ac978cdadb0e0afdcacb",class:"TournamentDates"},i("div",{key:"85e4f3b1de4f36efd8d13b090f8f9013976d8685",class:"StartDate",part:"StartDate"},this.formatDate(this.startTime)),i("div",{key:"688a84ce16a4d26359637b80837a9c5f50fc24c3",class:"EndDate",part:"EndDate"},this.formatDate(this.endTime))),i("div",{key:"149c0431ac2d8f9b5058a2a269b50e01d23ed26f",class:"ProgressBarWrapper"},i("div",{key:"85523f37f511f9184260f8575ec08e914f535858",class:"ProgressBar",part:"ProgressBar"},"Finished"==this.status||"Closing"==this.status||"Closed"==this.status?i("div",null,i("div",{class:"ProgressBarFillEnd",part:"ProgressBarFillEnd"}),i("div",{class:"Finished",part:"Finished"},a("finished",this.language))):this.tournamentUntilStartDays>0?i("div",null,i("div",{class:"ProgressBarFillStarting",part:"ProgressBarFillStarting"}),i("div",{class:"Remaining",part:"Remaining"},a("starting",this.language)," ",this.getTextByDiff(this.tournamentUntilStartDays))):i("div",null,i("div",{class:"ProgressBarFill",part:"ProgressBarFill",style:{width:`${this.getProgress()}%`}}),this.tournamentLeftDays>0&&i("div",{class:"Remaining",part:"Remaining"},this.showRemain," ",a("left",this.language)))))))}get host(){return s(this)}static get watchers(){return{language:["watchLanguage"]}}};r.style=":host{display:block}.TournamentDates{display:flex;justify-content:space-between}.StartDate{font-size:10px;font-weight:700;color:var(--emw--color-gray-300, #58586B)}.EndDate{font-size:10px;font-weight:700;align-content:flex-end;color:var(--emw--color-gray-300, #58586B)}.ProgressBar{margin:5px 0;height:8px;background:var(--emw--color-white, #FFFFFF)}.ProgressBarInactive{margin:5px 20px 10px 20px;height:8px;background:var(--emw--color-gray-100, #E6E6E6)}.ProgressBarFill{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillEnd{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillStarting{background-color:var(--emw--color-gray-300, #58586B);height:8px}.Remaining,.Finished{font-size:10px;font-weight:700;padding-top:6px;text-align:right;text-transform:uppercase}.Finished{color:var(--emw--color-green, #48952a)}";export{r as casino_tournament_duration}
|
|
File without changes
|
|
File without changes
|