@everymatrix/casino-tournament-duration 1.25.0 → 1.26.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.esm.js +1 -1
- package/dist/casino-tournament-duration/p-45164f4e.entry.js +1 -0
- package/dist/cjs/casino-tournament-duration.cjs.entry.js +9 -1
- package/dist/collection/utils/locale.utils.js +9 -1
- package/dist/components/casino-tournament-duration.js +9 -1
- package/dist/esm/casino-tournament-duration.entry.js +9 -1
- package/package.json +1 -1
- package/dist/casino-tournament-duration/p-29bd34e3.entry.js +0 -1
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-stencil/packages/casino-tournament-duration/.stencil/packages/casino-tournament-duration/stencil.config.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,b as n}from"./p-efeaf265.js";(()=>{const n=import.meta.url,e={};return""!==n&&(e.resourcesUrl=new URL(".",n).href),t(e)})().then((t=>n([["p-
|
|
1
|
+
import{p as t,b as n}from"./p-efeaf265.js";(()=>{const n=import.meta.url,e={};return""!==n&&(e.resourcesUrl=new URL(".",n).href),t(e)})().then((t=>n([["p-45164f4e",[[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"],tournamentUntilStartDays:[32],tournamentLeftDays:[32],showRemain:[32],limitStylingAppends:[32],stylingContainer:[32],durationInterval:[32]}]]]],t)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i}from"./p-efeaf265.js";const s=["ro","en","hr","zh-hk","fr","hu","tr","el","es","pt"],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"}},r=(t,i)=>{const r=i;return e[void 0!==r&&s.includes(r)?r:"en"][t]},n=class{constructor(i){t(this,i),this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1}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 Math.ceil(t/1440)+" "+r("days")}getProgress(){if(this.tournamentLeftDays<=0)return 100;const t=this.getDateTimeDiff(this.startTime,this.endTime);return Math.floor(100/t*(t-this.tournamentLeftDays))}componentWillLoad(){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.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}setClientStyling(){let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}setClientStylingURL(){let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrl,this.stylingContainer.prepend(t)}),1)}render(){if(this.startTime&&this.endTime)return i("div",{ref:t=>this.stylingContainer=t},i("div",{class:"TournamentDuration"},i("div",{class:"TournamentDates"},i("div",{class:"StartDate",part:"StartDate"},this.formatDate(this.startTime)),i("div",{class:"EndDate",part:"EndDate"},this.formatDate(this.endTime))),i("div",{class:"ProgressBarWrapper"},i("div",{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"},r("finished",this.language))):this.tournamentUntilStartDays>0?i("div",null,i("div",{class:"ProgressBarFillStarting",part:"ProgressBarFillStarting"}),i("div",{class:"Remaining",part:"Remaining"},r("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," ",r("left",this.language)))))))}};n.style=":host{display:block}.TournamentDates{display:flex;justify-content:space-between}.StartDate{font-size:10px;font-weight:700;color:var(--emfe-w-color-gray-300, #58586B)}.EndDate{font-size:10px;font-weight:700;align-content:flex-end;color:var(--emfe-w-color-gray-300, #58586B)}.ProgressBar{margin:5px 0;height:8px;background:var(--emfe-w-color-white, #FFFFFF)}.ProgressBarInactive{margin:5px 20px 10px 20px;height:8px;background:var(--emfe-w-color-gray-100, #E6E6E6)}.ProgressBarFill{background-color:var(--emfe-w-color-green, #48952a);height:8px}.ProgressBarFillEnd{background-color:var(--emfe-w-color-green, #48952a);height:8px}.ProgressBarFillStarting{background-color:var(--emfe-w-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(--emfe-w-color-green, #48952a)}";export{n as casino_tournament_duration}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-8e0377fe.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt'];
|
|
8
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'hr', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt'];
|
|
9
9
|
const TRANSLATIONS = {
|
|
10
10
|
en: {
|
|
11
11
|
finished: 'Finished',
|
|
@@ -15,6 +15,14 @@ const TRANSLATIONS = {
|
|
|
15
15
|
hours: 'hours',
|
|
16
16
|
days: 'days',
|
|
17
17
|
},
|
|
18
|
+
hr: {
|
|
19
|
+
finished: 'Gotovo',
|
|
20
|
+
starting: 'Počinje u ',
|
|
21
|
+
left: 'lijevo',
|
|
22
|
+
minutes: 'minute',
|
|
23
|
+
hours: 'sati',
|
|
24
|
+
days: 'dani',
|
|
25
|
+
},
|
|
18
26
|
'zh-hk': {
|
|
19
27
|
finished: '完成的',
|
|
20
28
|
starting: '開始於',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const DEFAULT_LANGUAGE = 'en';
|
|
2
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt'];
|
|
2
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'hr', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt'];
|
|
3
3
|
const TRANSLATIONS = {
|
|
4
4
|
en: {
|
|
5
5
|
finished: 'Finished',
|
|
@@ -9,6 +9,14 @@ const TRANSLATIONS = {
|
|
|
9
9
|
hours: 'hours',
|
|
10
10
|
days: 'days',
|
|
11
11
|
},
|
|
12
|
+
hr: {
|
|
13
|
+
finished: 'Gotovo',
|
|
14
|
+
starting: 'Počinje u ',
|
|
15
|
+
left: 'lijevo',
|
|
16
|
+
minutes: 'minute',
|
|
17
|
+
hours: 'sati',
|
|
18
|
+
days: 'dani',
|
|
19
|
+
},
|
|
12
20
|
'zh-hk': {
|
|
13
21
|
finished: '完成的',
|
|
14
22
|
starting: '開始於',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt'];
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'hr', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt'];
|
|
5
5
|
const TRANSLATIONS = {
|
|
6
6
|
en: {
|
|
7
7
|
finished: 'Finished',
|
|
@@ -11,6 +11,14 @@ const TRANSLATIONS = {
|
|
|
11
11
|
hours: 'hours',
|
|
12
12
|
days: 'days',
|
|
13
13
|
},
|
|
14
|
+
hr: {
|
|
15
|
+
finished: 'Gotovo',
|
|
16
|
+
starting: 'Počinje u ',
|
|
17
|
+
left: 'lijevo',
|
|
18
|
+
minutes: 'minute',
|
|
19
|
+
hours: 'sati',
|
|
20
|
+
days: 'dani',
|
|
21
|
+
},
|
|
14
22
|
'zh-hk': {
|
|
15
23
|
finished: '完成的',
|
|
16
24
|
starting: '開始於',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-a10d1dd0.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt'];
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'hr', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt'];
|
|
5
5
|
const TRANSLATIONS = {
|
|
6
6
|
en: {
|
|
7
7
|
finished: 'Finished',
|
|
@@ -11,6 +11,14 @@ const TRANSLATIONS = {
|
|
|
11
11
|
hours: 'hours',
|
|
12
12
|
days: 'days',
|
|
13
13
|
},
|
|
14
|
+
hr: {
|
|
15
|
+
finished: 'Gotovo',
|
|
16
|
+
starting: 'Počinje u ',
|
|
17
|
+
left: 'lijevo',
|
|
18
|
+
minutes: 'minute',
|
|
19
|
+
hours: 'sati',
|
|
20
|
+
days: 'dani',
|
|
21
|
+
},
|
|
14
22
|
'zh-hk': {
|
|
15
23
|
finished: '完成的',
|
|
16
24
|
starting: '開始於',
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s}from"./p-efeaf265.js";const i=["ro","en","zh-hk","fr","hu","tr","el","es","pt"],e={en:{finished:"Finished",starting:"Starting in ",left:"left",minutes:"minutes",hours:"hours",days:"days"},"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"}},r=(t,s)=>{const r=s;return e[void 0!==r&&i.includes(r)?r:"en"][t]},n=class{constructor(s){t(this,s),this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1}getDateTimeDiff(t,s){return(new Date(s).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 s=new Date(t),i=new Intl.DateTimeFormat(this.language,{month:"long"}).format(s);return`${s.getDate()} ${i}, ${s.toLocaleString("en-GB",{hour:"numeric",minute:"numeric"})}, ${s.getUTCFullYear()}`}getTextByDiff(t){if(t<1440){const s=t%60;return[t/60,s,60*(s-Math.floor(s))].map((t=>(t=>{const s=Math.floor(t);return s<10?`0${s}`:`${s}`})(t))).join(":")}return Math.ceil(t/1440)+" "+r("days")}getProgress(){if(this.tournamentLeftDays<=0)return 100;const t=this.getDateTimeDiff(this.startTime,this.endTime);return Math.floor(100/t*(t-this.tournamentLeftDays))}componentWillLoad(){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.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}setClientStyling(){let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}setClientStylingURL(){let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrl,this.stylingContainer.prepend(t)}),1)}render(){if(this.startTime&&this.endTime)return s("div",{ref:t=>this.stylingContainer=t},s("div",{class:"TournamentDuration"},s("div",{class:"TournamentDates"},s("div",{class:"StartDate",part:"StartDate"},this.formatDate(this.startTime)),s("div",{class:"EndDate",part:"EndDate"},this.formatDate(this.endTime))),s("div",{class:"ProgressBarWrapper"},s("div",{class:"ProgressBar",part:"ProgressBar"},"Finished"==this.status||"Closing"==this.status||"Closed"==this.status?s("div",null,s("div",{class:"ProgressBarFillEnd",part:"ProgressBarFillEnd"}),s("div",{class:"Finished",part:"Finished"},r("finished",this.language))):this.tournamentUntilStartDays>0?s("div",null,s("div",{class:"ProgressBarFillStarting",part:"ProgressBarFillStarting"}),s("div",{class:"Remaining",part:"Remaining"},r("starting",this.language)," ",this.getTextByDiff(this.tournamentUntilStartDays))):s("div",null,s("div",{class:"ProgressBarFill",part:"ProgressBarFill",style:{width:`${this.getProgress()}%`}}),this.tournamentLeftDays>0&&s("div",{class:"Remaining",part:"Remaining"},this.showRemain," ",r("left",this.language)))))))}};n.style=":host{display:block}.TournamentDates{display:flex;justify-content:space-between}.StartDate{font-size:10px;font-weight:700;color:var(--emfe-w-color-gray-300, #58586B)}.EndDate{font-size:10px;font-weight:700;align-content:flex-end;color:var(--emfe-w-color-gray-300, #58586B)}.ProgressBar{margin:5px 0;height:8px;background:var(--emfe-w-color-white, #FFFFFF)}.ProgressBarInactive{margin:5px 20px 10px 20px;height:8px;background:var(--emfe-w-color-gray-100, #E6E6E6)}.ProgressBarFill{background-color:var(--emfe-w-color-green, #48952a);height:8px}.ProgressBarFillEnd{background-color:var(--emfe-w-color-green, #48952a);height:8px}.ProgressBarFillStarting{background-color:var(--emfe-w-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(--emfe-w-color-green, #48952a)}";export{n as casino_tournament_duration}
|