@everymatrix/casino-tournament-list 1.20.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.
- package/dist/casino-tournament-list/casino-tournament-list.esm.js +1 -0
- package/dist/casino-tournament-list/index.esm.js +0 -0
- package/dist/casino-tournament-list/p-1368789d.js +1 -0
- package/dist/casino-tournament-list/p-908908a6.entry.js +15 -0
- package/dist/cjs/casino-tournament-banner_6.cjs.entry.js +8911 -0
- package/dist/cjs/casino-tournament-list.cjs.js +19 -0
- package/dist/cjs/index-c1b4bd7d.js +1284 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/collection/collection-manifest.json +43 -0
- package/dist/collection/components/casino-tournament-list/casino-tournament-list.css +97 -0
- package/dist/collection/components/casino-tournament-list/casino-tournament-list.js +578 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +104 -0
- package/dist/collection/utils/utils.js +20 -0
- package/dist/components/casino-tournament-banner.js +6 -0
- package/dist/components/casino-tournament-banner2.js +598 -0
- package/dist/components/casino-tournament-buttons.js +6 -0
- package/dist/components/casino-tournament-buttons2.js +534 -0
- package/dist/components/casino-tournament-duration.js +6 -0
- package/dist/components/casino-tournament-duration2.js +220 -0
- package/dist/components/casino-tournament-info.js +6 -0
- package/dist/components/casino-tournament-info2.js +502 -0
- package/dist/components/casino-tournament-list.d.ts +11 -0
- package/dist/components/casino-tournament-list.js +1493 -0
- package/dist/components/casino-tournament-prizes.js +6 -0
- package/dist/components/casino-tournament-prizes2.js +190 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +1 -0
- package/dist/components/moment.js +5677 -0
- package/dist/esm/casino-tournament-banner_6.entry.js +8902 -0
- package/dist/esm/casino-tournament-list.js +17 -0
- package/dist/esm/index-b57e0a6b.js +1258 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.js +22 -0
- package/dist/types/Users/sebastian.strulea/Documents/work/widgets-stencil/packages/casino-tournament-list/.stencil/packages/casino-tournament-list/stencil.config.d.ts +2 -0
- package/dist/types/components/casino-tournament-list/casino-tournament-list.d.ts +101 -0
- package/dist/types/components.d.ts +181 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/utils/locale.utils.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +19 -0
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { h as hooks } from './moment.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './casino-tournament-buttons2.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './casino-tournament-duration2.js';
|
|
5
|
+
import { d as defineCustomElement$1 } from './casino-tournament-prizes2.js';
|
|
6
|
+
|
|
7
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt'];
|
|
9
|
+
const TRANSLATIONS = {
|
|
10
|
+
en: {
|
|
11
|
+
enrolled: 'Enrolled',
|
|
12
|
+
details: 'Details',
|
|
13
|
+
scoreCriteria: 'Score Criteria',
|
|
14
|
+
minbet: 'min bet count',
|
|
15
|
+
seegames: 'You can see the games',
|
|
16
|
+
here: 'here',
|
|
17
|
+
scheduled: 'Scheduled',
|
|
18
|
+
ongoing: 'Ongoing',
|
|
19
|
+
finished: 'Finished',
|
|
20
|
+
startingAt: 'Starting at:',
|
|
21
|
+
startedAt: 'Started at:',
|
|
22
|
+
startingAtWithTime: `Starts `,
|
|
23
|
+
startedAtWithTime: `Started `,
|
|
24
|
+
mostRounds: 'Most Rounds',
|
|
25
|
+
betCount: 'Number of Bets',
|
|
26
|
+
maxWinStakeRatio: 'Max Win per Stake',
|
|
27
|
+
winStakeRatio: 'Total Win per Stake',
|
|
28
|
+
January: 'January',
|
|
29
|
+
February: 'February',
|
|
30
|
+
March: 'March',
|
|
31
|
+
April: 'April',
|
|
32
|
+
May: 'May',
|
|
33
|
+
June: 'June',
|
|
34
|
+
July: 'July',
|
|
35
|
+
August: 'August',
|
|
36
|
+
September: 'September',
|
|
37
|
+
October: 'October',
|
|
38
|
+
November: 'November',
|
|
39
|
+
December: 'December'
|
|
40
|
+
},
|
|
41
|
+
'zh-hk': {
|
|
42
|
+
enrolled: '已註冊',
|
|
43
|
+
details: '細節',
|
|
44
|
+
scoreCriteria: '評分標準',
|
|
45
|
+
minbet: '最小投注數:',
|
|
46
|
+
seegames: '你可以看比賽',
|
|
47
|
+
here: '這裡',
|
|
48
|
+
scheduled: '預定的',
|
|
49
|
+
ongoing: '進行中',
|
|
50
|
+
finished: '完成的',
|
|
51
|
+
startingAt: '開始於',
|
|
52
|
+
startedAt: '大多數回合',
|
|
53
|
+
mostRounds: '投注數',
|
|
54
|
+
betCount: '投注计数',
|
|
55
|
+
maxWinStakeRatio: '最大勝率',
|
|
56
|
+
winStakeRatio: '勝率',
|
|
57
|
+
January: '一月',
|
|
58
|
+
February: '二月',
|
|
59
|
+
March: '行进',
|
|
60
|
+
April: '四月',
|
|
61
|
+
May: '可能',
|
|
62
|
+
June: '六月',
|
|
63
|
+
July: '七月',
|
|
64
|
+
August: '八月',
|
|
65
|
+
September: '九月',
|
|
66
|
+
October: '十月',
|
|
67
|
+
November: '十一月',
|
|
68
|
+
December: '十二月'
|
|
69
|
+
},
|
|
70
|
+
fr: {
|
|
71
|
+
enrolled: 'Inscrits',
|
|
72
|
+
details: 'Détails',
|
|
73
|
+
scoreCriteria: 'Critères de notation',
|
|
74
|
+
minbet: 'nombre de paris minimum',
|
|
75
|
+
seegames: 'Vous pouvez voir les jeux',
|
|
76
|
+
here: 'ici',
|
|
77
|
+
scheduled: 'Programmé',
|
|
78
|
+
ongoing: 'En cours',
|
|
79
|
+
finished: 'Fini',
|
|
80
|
+
startingAt: 'À partir de:',
|
|
81
|
+
startedAt: 'Commencé à:',
|
|
82
|
+
mostRounds: 'Le plus grand nombre de tours',
|
|
83
|
+
betCount: 'Nombre de paris',
|
|
84
|
+
maxWinStakeRatio: 'Indice maximum du gain d\'une mise',
|
|
85
|
+
winStakeRatio: 'Indice du gain d\'une mise',
|
|
86
|
+
January: 'January',
|
|
87
|
+
February: 'February',
|
|
88
|
+
March: 'March',
|
|
89
|
+
April: 'April',
|
|
90
|
+
May: 'May',
|
|
91
|
+
June: 'June',
|
|
92
|
+
July: 'July',
|
|
93
|
+
August: 'August',
|
|
94
|
+
September: 'September',
|
|
95
|
+
October: 'October',
|
|
96
|
+
November: 'November',
|
|
97
|
+
December: 'December'
|
|
98
|
+
},
|
|
99
|
+
ro: {
|
|
100
|
+
enrolled: 'Înscris',
|
|
101
|
+
details: 'Detalii',
|
|
102
|
+
scoreCriteria: 'Criterii de punctaj',
|
|
103
|
+
minbet: 'număr minim de pariuri',
|
|
104
|
+
seegames: 'Vezi jocurile',
|
|
105
|
+
here: 'aici',
|
|
106
|
+
scheduled: 'Programat',
|
|
107
|
+
ongoing: 'În desfășurare',
|
|
108
|
+
finished: 'Finalizat',
|
|
109
|
+
startingAt: 'Începând de la',
|
|
110
|
+
startedAt: 'A inceput la:',
|
|
111
|
+
mostRounds: 'Cele mai multe runde',
|
|
112
|
+
betCount: 'Număr de pariuri',
|
|
113
|
+
maxWinStakeRatio: 'Pondere maximă a mizei din câștig',
|
|
114
|
+
winStakeRatio: 'Câștig Total per Miză',
|
|
115
|
+
January: 'Ianuarie',
|
|
116
|
+
February: 'Februarie',
|
|
117
|
+
March: 'Martie',
|
|
118
|
+
April: 'Aprilie',
|
|
119
|
+
May: 'Mai',
|
|
120
|
+
June: 'Iunie',
|
|
121
|
+
July: 'Iulie',
|
|
122
|
+
August: 'August',
|
|
123
|
+
September: 'Septembrie',
|
|
124
|
+
October: 'Octombrie',
|
|
125
|
+
November: 'Noiembrie',
|
|
126
|
+
December: 'Decembrie'
|
|
127
|
+
},
|
|
128
|
+
tr: {
|
|
129
|
+
enrolled: 'Katıldın',
|
|
130
|
+
details: 'Detaylar',
|
|
131
|
+
scoreCriteria: 'Skor kriteri',
|
|
132
|
+
minbet: 'en düşük bahis sayısı',
|
|
133
|
+
seegames: 'Turnuvadaki oyunları görmek için',
|
|
134
|
+
here: 'tıklayın',
|
|
135
|
+
scheduled: 'Planlanmış',
|
|
136
|
+
ongoing: 'Devam Eden',
|
|
137
|
+
finished: 'Sona Ermiş',
|
|
138
|
+
startingAt: 'Başlangıç saati:',
|
|
139
|
+
startedAt: 'Başlangıç saati:',
|
|
140
|
+
mostRounds: 'ÇoğuRounds',
|
|
141
|
+
betCount: 'Oynanan Tur Sayısı',
|
|
142
|
+
maxWinStakeRatio: 'Maksimum Kazanç / Bahis Oranı',
|
|
143
|
+
winStakeRatio: 'Kazanç / Bahis Oranı',
|
|
144
|
+
January: 'Ocak',
|
|
145
|
+
February: 'Şubat',
|
|
146
|
+
March: 'Mart',
|
|
147
|
+
April: 'Nisan',
|
|
148
|
+
May: 'Mayıs',
|
|
149
|
+
June: 'Haziran',
|
|
150
|
+
July: 'Temmuz',
|
|
151
|
+
August: 'Ağustos',
|
|
152
|
+
September: 'Eylül',
|
|
153
|
+
October: 'Ekim',
|
|
154
|
+
November: 'Kasım',
|
|
155
|
+
December: 'Aralık'
|
|
156
|
+
},
|
|
157
|
+
el: {
|
|
158
|
+
enrolled: 'Εγγεγραμμένος',
|
|
159
|
+
details: 'Λεπτομέρειες',
|
|
160
|
+
scoreCriteria: 'Κριτήρια Σκορ',
|
|
161
|
+
minbet: 'Ελάχιστος αριθμός πονταρισμάτων',
|
|
162
|
+
seegames: 'Μπορείς να δεις τα παιχνίδια',
|
|
163
|
+
here: 'εδώ',
|
|
164
|
+
all: 'Όλα',
|
|
165
|
+
scheduled: 'Προγραμματισμένα',
|
|
166
|
+
ongoing: 'Τρέχοντα',
|
|
167
|
+
finished: 'Ολοκληρωμένα',
|
|
168
|
+
startingAt: 'Αρχίζει στις:',
|
|
169
|
+
startedAt: 'Άρχισε στις:',
|
|
170
|
+
startingAtWithTime: `Αρχίζει στις `,
|
|
171
|
+
startedAtWithTime: `Άρχισε στις `,
|
|
172
|
+
mostRounds: 'Οι περισσότεροι γύροι',
|
|
173
|
+
betCount: 'Οι περισσότεροι γύροι',
|
|
174
|
+
maxWinStakeRatio: 'Μεγαλύτερο Κέρδος άνα Ποντάρισμα',
|
|
175
|
+
winStakeRatio: 'Συνολική Αναλογία Κερδών άνα Ποντάρισμα',
|
|
176
|
+
January: 'Ιανουαρίου',
|
|
177
|
+
February: 'Φεβρουαρίου',
|
|
178
|
+
March: 'Μαρτίου',
|
|
179
|
+
April: 'Απριλίου',
|
|
180
|
+
May: 'Μαΐου',
|
|
181
|
+
June: 'Ιουνίου',
|
|
182
|
+
July: 'Ιουλίου',
|
|
183
|
+
August: 'Αυγούστου',
|
|
184
|
+
September: 'Σεπτεμβρίου',
|
|
185
|
+
October: 'Οκτωβρίου',
|
|
186
|
+
November: 'Νοεμβρίου',
|
|
187
|
+
December: 'Δεκεμβρίου'
|
|
188
|
+
},
|
|
189
|
+
es: {
|
|
190
|
+
enrolled: 'Inscrito',
|
|
191
|
+
details: 'Detalles',
|
|
192
|
+
scoreCriteria: 'Criterios de puntuación',
|
|
193
|
+
minbet: 'la apuesta mínima cuenta',
|
|
194
|
+
seegames: 'Puedes ver los juegos',
|
|
195
|
+
here: 'aquí',
|
|
196
|
+
scheduled: 'Programado',
|
|
197
|
+
ongoing: 'En marcha',
|
|
198
|
+
finished: 'Terminado',
|
|
199
|
+
startingAt: 'Desde',
|
|
200
|
+
startedAt: 'Empezó el:',
|
|
201
|
+
mostRounds: 'LaMayoríaDeLasRondas',
|
|
202
|
+
betCount: 'Recuento De Apuestas',
|
|
203
|
+
maxWinStakeRatio: 'Ratio De Ganancia Máxima',
|
|
204
|
+
winStakeRatio: 'Ratio De Ganancia',
|
|
205
|
+
January: 'de enero',
|
|
206
|
+
February: 'de febrero',
|
|
207
|
+
March: 'de marzo',
|
|
208
|
+
April: 'de abril',
|
|
209
|
+
May: 'de mayo',
|
|
210
|
+
June: 'de junio',
|
|
211
|
+
July: 'de julio',
|
|
212
|
+
August: 'de agosto',
|
|
213
|
+
September: 'de septiembre',
|
|
214
|
+
October: 'de octubre',
|
|
215
|
+
November: 'de noviembre',
|
|
216
|
+
December: 'de diciembre'
|
|
217
|
+
},
|
|
218
|
+
pt: {
|
|
219
|
+
enrolled: 'Inscrito',
|
|
220
|
+
details: 'Detalhes',
|
|
221
|
+
scoreCriteria: 'Critérios de pontuação',
|
|
222
|
+
minbet: 'Contagens de aposta mínima',
|
|
223
|
+
seegames: 'Você pode ver os jogos',
|
|
224
|
+
here: 'Aqui',
|
|
225
|
+
scheduled: 'Agendado',
|
|
226
|
+
ongoing: 'Em progresso',
|
|
227
|
+
finished: 'Finalizado',
|
|
228
|
+
startingAt: 'Começando às:',
|
|
229
|
+
startedAt: 'Começou às:',
|
|
230
|
+
mostRounds: 'Mais rodadas',
|
|
231
|
+
betCount: 'Contagem de Apostas',
|
|
232
|
+
maxWinStakeRatio: 'Rácio máximo de vitórias',
|
|
233
|
+
winStakeRatio: 'Rácio de Vitórias',
|
|
234
|
+
January: 'January',
|
|
235
|
+
February: 'February',
|
|
236
|
+
March: 'March',
|
|
237
|
+
April: 'April',
|
|
238
|
+
May: 'May',
|
|
239
|
+
June: 'June',
|
|
240
|
+
July: 'July',
|
|
241
|
+
August: 'August',
|
|
242
|
+
September: 'September',
|
|
243
|
+
October: 'October',
|
|
244
|
+
November: 'November',
|
|
245
|
+
December: 'December'
|
|
246
|
+
},
|
|
247
|
+
hu: {
|
|
248
|
+
enrolled: 'Feliratkozott',
|
|
249
|
+
details: 'Adatok',
|
|
250
|
+
scoreCriteria: 'Pontozási kritériumok',
|
|
251
|
+
minbet: 'Minimális tét',
|
|
252
|
+
seegames: 'Játékok megnézése',
|
|
253
|
+
here: 'itt',
|
|
254
|
+
scheduled: 'Ütemezés',
|
|
255
|
+
ongoing: 'Folyamatban lévő',
|
|
256
|
+
finished: 'Befejezett',
|
|
257
|
+
startingAt: 'Kezdődik',
|
|
258
|
+
startedAt: 'Started at:',
|
|
259
|
+
mostRounds: 'Legtöbb kör',
|
|
260
|
+
betCount: 'Számított tét',
|
|
261
|
+
maxWinStakeRatio: 'Maximális nyeremény tétenként',
|
|
262
|
+
winStakeRatio: 'Összes nyeremény tétenként',
|
|
263
|
+
January: 'January',
|
|
264
|
+
February: 'February',
|
|
265
|
+
March: 'March',
|
|
266
|
+
April: 'April',
|
|
267
|
+
May: 'May',
|
|
268
|
+
June: 'June',
|
|
269
|
+
July: 'July',
|
|
270
|
+
August: 'August',
|
|
271
|
+
September: 'September',
|
|
272
|
+
October: 'October',
|
|
273
|
+
November: 'November',
|
|
274
|
+
December: 'December'
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
const translate = (key, customLang) => {
|
|
278
|
+
const lang = customLang;
|
|
279
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
const casinoTournamentInfoCss = ":host{display:block}.TournamentInfo{background:var(--emfe-w-tournament-color-bg, #153a5c);color:var(--emfe-w-color-white, #FFFFFF);padding:20px;text-align:center;display:flex;gap:20px;display:flex;flex-direction:column}.TournamentInfo.Left{text-align:left}.TournamentInfo.Left .InfoButtons{justify-content:left}.TournamentInfo.Right{text-align:right}.TournamentInfo.Right .InfoButtons{justify-content:right}.Title{margin:0;font-size:18px}.Score{color:var(--emfe-w-color-white, #FFFFFF)}.GameLink{text-decoration:underline;text-transform:uppercase;color:var(--emfe-w-color-white, #FFFFFF)}.InfoButtons{display:flex;justify-content:center}.DetailsButton{border:0;border-radius:2px;background-color:var(--emfe-w-tournament-color-primary, #0072ed);padding:8px 16px;font-size:14px;font-weight:600;color:var(--emfe-w-color-white, #FFFFFF);cursor:pointer}p{font-size:12px;margin-top:0}casino-tournament-duration::part(StartDate){color:var(--emfe-w-color-white, #FFFFFF)}casino-tournament-duration::part(EndDate){color:var(--emfe-w-color-white, #FFFFFF)}";
|
|
283
|
+
|
|
284
|
+
const CasinoTournamentInfo = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
285
|
+
constructor() {
|
|
286
|
+
super();
|
|
287
|
+
this.__registerHost();
|
|
288
|
+
this.__attachShadow();
|
|
289
|
+
/**
|
|
290
|
+
* Terms and conditions url
|
|
291
|
+
*/
|
|
292
|
+
this.termsUrl = '#';
|
|
293
|
+
/**
|
|
294
|
+
* If see games link keep context
|
|
295
|
+
*/
|
|
296
|
+
this.keepContext = false;
|
|
297
|
+
/**
|
|
298
|
+
* Tournament prizes display as group
|
|
299
|
+
*/
|
|
300
|
+
this.useGroup = false;
|
|
301
|
+
/**
|
|
302
|
+
* Tournament info text align
|
|
303
|
+
*/
|
|
304
|
+
this.align = 'center';
|
|
305
|
+
/**
|
|
306
|
+
* Show tournament dates
|
|
307
|
+
*/
|
|
308
|
+
this.showDates = false;
|
|
309
|
+
/**
|
|
310
|
+
* Show tournament prizes
|
|
311
|
+
*/
|
|
312
|
+
this.showPrizes = false;
|
|
313
|
+
/**
|
|
314
|
+
* Show detail, join, login , register button
|
|
315
|
+
*/
|
|
316
|
+
this.showButton = false;
|
|
317
|
+
/**
|
|
318
|
+
* Short start time on tag
|
|
319
|
+
*/
|
|
320
|
+
this.shortStart = false;
|
|
321
|
+
/**
|
|
322
|
+
* Show see games here link
|
|
323
|
+
*/
|
|
324
|
+
this.seeGames = false;
|
|
325
|
+
/**
|
|
326
|
+
* Use event to load data
|
|
327
|
+
*/
|
|
328
|
+
this.useEvent = false;
|
|
329
|
+
/**
|
|
330
|
+
* Short start time format
|
|
331
|
+
*/
|
|
332
|
+
this.shortStartFormat = 'DD MMM YYYY';
|
|
333
|
+
/**
|
|
334
|
+
* Client custom styling via inline styles
|
|
335
|
+
*/
|
|
336
|
+
this.clientStyling = '';
|
|
337
|
+
/**
|
|
338
|
+
* Client custom styling via url
|
|
339
|
+
*/
|
|
340
|
+
this.clientStylingUrl = '';
|
|
341
|
+
/**
|
|
342
|
+
* Player enrolled
|
|
343
|
+
*/
|
|
344
|
+
this.enrolled = false;
|
|
345
|
+
/**
|
|
346
|
+
* Show read more button
|
|
347
|
+
*/
|
|
348
|
+
this.showReadMore = false;
|
|
349
|
+
this.limitStylingAppends = false;
|
|
350
|
+
this.formatDate = () => {
|
|
351
|
+
const dateOptions = { month: 'long' };
|
|
352
|
+
const startTime = this.tournamentInfo.startTime;
|
|
353
|
+
const state = this.tournamentInfo.state;
|
|
354
|
+
let currentDate = new Date(startTime);
|
|
355
|
+
const setTranslation = () => {
|
|
356
|
+
return (state === 'Running' || state == 'Closing' || state == 'Closed') ?
|
|
357
|
+
translate('startedAt', this.language) :
|
|
358
|
+
translate('startingAt', this.language);
|
|
359
|
+
};
|
|
360
|
+
if (this.shortStart) {
|
|
361
|
+
let startTimeAsString = hooks(currentDate).format(this.shortStartFormat);
|
|
362
|
+
this.startDate = (state === 'Running' || state == 'Closing' || state == 'Closed') ?
|
|
363
|
+
translate('startedAtWithTime', this.language) + startTimeAsString :
|
|
364
|
+
translate('startingAtWithTime', this.language) + startTimeAsString;
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
let currentMonthKey = new Intl.DateTimeFormat('en', dateOptions).format(currentDate);
|
|
368
|
+
let currentDay = currentDate.getDate();
|
|
369
|
+
let currentHour = currentDate.toLocaleString('en-GB', { hour: 'numeric', minute: 'numeric', hour12: false });
|
|
370
|
+
this.startDate =
|
|
371
|
+
`${currentDay}` + ' ' +
|
|
372
|
+
translate(`${currentMonthKey}`, this.language) + ', ' +
|
|
373
|
+
setTranslation() +
|
|
374
|
+
` ${currentHour}`;
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
this.setClientStyling = () => {
|
|
378
|
+
let sheet = document.createElement('style');
|
|
379
|
+
sheet.innerHTML = this.clientStyling;
|
|
380
|
+
this.stylingContainer.prepend(sheet);
|
|
381
|
+
};
|
|
382
|
+
this.setClientStylingURL = () => {
|
|
383
|
+
let cssFile = document.createElement('style');
|
|
384
|
+
setTimeout(() => {
|
|
385
|
+
cssFile.innerHTML = this.clientStylingUrl;
|
|
386
|
+
this.stylingContainer.prepend(cssFile);
|
|
387
|
+
}, 1);
|
|
388
|
+
};
|
|
389
|
+
this.detailsAction = (tournamentId) => {
|
|
390
|
+
window.postMessage({ type: 'TournamentDetailsClicked', tournamentId }, window.location.href);
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
infoCompletedHandler(event) {
|
|
394
|
+
if (event.detail && this.useEvent) {
|
|
395
|
+
if (this.tournamentId && this.tournamentId != event.detail.id)
|
|
396
|
+
return;
|
|
397
|
+
this.tournamentInfo = event.detail;
|
|
398
|
+
if (this.tournamentInfo.startTime) {
|
|
399
|
+
this.formatDate();
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
componentWillLoad() {
|
|
404
|
+
if (!this.useEvent) {
|
|
405
|
+
this.tournamentInfo = {
|
|
406
|
+
nameOrTitle: this.nameOrTitle,
|
|
407
|
+
scoreCriteria: this.scoreCriteria,
|
|
408
|
+
termsUrl: this.termsUrl,
|
|
409
|
+
startTime: this.startTime,
|
|
410
|
+
endTime: this.endTime,
|
|
411
|
+
prizes: this.prizes,
|
|
412
|
+
minBetCount: this.minBetCount
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
componentDidRender() {
|
|
417
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
418
|
+
if (this.clientStyling)
|
|
419
|
+
this.setClientStyling();
|
|
420
|
+
if (this.clientStylingUrl)
|
|
421
|
+
this.setClientStylingURL();
|
|
422
|
+
this.limitStylingAppends = true;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
tournamentGamesClicked(id) {
|
|
426
|
+
window.postMessage({ type: 'tournamentGamesClicked', id }, window.location.href);
|
|
427
|
+
}
|
|
428
|
+
render() {
|
|
429
|
+
if (this.tournamentInfo) {
|
|
430
|
+
return h("div", { ref: el => this.stylingContainer = el }, h("div", { class: `TournamentInfo ${this.align}`, part: "TournamentInfo" }, h("h1", { class: "Title" }, this.tournamentInfo.nameOrTitle), h("div", { class: "Details" }, h("p", { class: "Score" }, translate('scoreCriteria', this.language), ":", this.tournamentInfo.scoreCriteria, " (", translate('minbet', this.language), ":", this.tournamentInfo.minBetCount, ")"), this.showDates && h("p", { class: "Dates" }, this.startDate), this.seeGames && h("p", { class: "SeeGames" }, translate('seegames', this.language), ":", h("a", { class: "GameLink", href: this.tournamentInfo.termsUrl || '#', target: this.keepContext == true ? '_self' : '_blank', onClick: () => this.tournamentGamesClicked(this.tournamentId) }, " ", translate('here', this.language))), this.showButton &&
|
|
431
|
+
h("div", { class: "InfoButtons" }, h("casino-tournament-buttons", { enrolled: this.enrolled, session: this.session, endpoint: this.endpoint, language: this.language, "tournament-id": this.tournamentId, "login-event": this.loginEvent, "login-url": this.loginUrl, "register-event": this.registerEvent, "register-url": this.registerUrl, currency: this.currency, "bonus-code": this.bonusCode, "show-read-more": this.showReadMore }))), this.showPrizes && h("casino-tournament-prizes", { "raw-prizes": JSON.stringify(this.tournamentInfo.prizes), "use-event": "false", "use-group": this.useGroup, language: this.language }), h("casino-tournament-duration", { exportparts: "Remaining,ProgressBar,ProgressBarFill,ProgressBarFillStarting,ProgressBarFillEnd,StartDate,EndDate", "start-time": this.tournamentInfo.startTime, "end-time": this.tournamentInfo.endTime, language: this.language })));
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
static get style() { return casinoTournamentInfoCss; }
|
|
435
|
+
}, [1, "casino-tournament-info", {
|
|
436
|
+
"endpoint": [1],
|
|
437
|
+
"nameOrTitle": [1, "name-or-title"],
|
|
438
|
+
"scoreCriteria": [1, "score-criteria"],
|
|
439
|
+
"tournamentId": [1, "tournament-id"],
|
|
440
|
+
"session": [1],
|
|
441
|
+
"userId": [1, "user-id"],
|
|
442
|
+
"language": [1],
|
|
443
|
+
"termsUrl": [1, "terms-url"],
|
|
444
|
+
"keepContext": [4, "keep-context"],
|
|
445
|
+
"useGroup": [4, "use-group"],
|
|
446
|
+
"align": [1],
|
|
447
|
+
"showDates": [4, "show-dates"],
|
|
448
|
+
"showPrizes": [4, "show-prizes"],
|
|
449
|
+
"showButton": [4, "show-button"],
|
|
450
|
+
"shortStart": [4, "short-start"],
|
|
451
|
+
"seeGames": [4, "see-games"],
|
|
452
|
+
"useEvent": [4, "use-event"],
|
|
453
|
+
"startTime": [1, "start-time"],
|
|
454
|
+
"endTime": [1, "end-time"],
|
|
455
|
+
"minBetCount": [2, "min-bet-count"],
|
|
456
|
+
"prizes": [8],
|
|
457
|
+
"shortStartFormat": [1, "short-start-format"],
|
|
458
|
+
"clientStyling": [1, "client-styling"],
|
|
459
|
+
"clientStylingUrl": [1, "client-styling-url"],
|
|
460
|
+
"enrolled": [4],
|
|
461
|
+
"loginEvent": [1, "login-event"],
|
|
462
|
+
"loginUrl": [1, "login-url"],
|
|
463
|
+
"registerEvent": [1, "register-event"],
|
|
464
|
+
"registerUrl": [1, "register-url"],
|
|
465
|
+
"currency": [1],
|
|
466
|
+
"bonusCode": [1, "bonus-code"],
|
|
467
|
+
"showReadMore": [4, "show-read-more"],
|
|
468
|
+
"limitStylingAppends": [32],
|
|
469
|
+
"stylingContainer": [32],
|
|
470
|
+
"startDate": [32],
|
|
471
|
+
"tournamentInfo": [32]
|
|
472
|
+
}, [[8, "getTournamentInfoCompleted", "infoCompletedHandler"]]]);
|
|
473
|
+
function defineCustomElement() {
|
|
474
|
+
if (typeof customElements === "undefined") {
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
const components = ["casino-tournament-info", "casino-tournament-buttons", "casino-tournament-duration", "casino-tournament-prizes"];
|
|
478
|
+
components.forEach(tagName => { switch (tagName) {
|
|
479
|
+
case "casino-tournament-info":
|
|
480
|
+
if (!customElements.get(tagName)) {
|
|
481
|
+
customElements.define(tagName, CasinoTournamentInfo);
|
|
482
|
+
}
|
|
483
|
+
break;
|
|
484
|
+
case "casino-tournament-buttons":
|
|
485
|
+
if (!customElements.get(tagName)) {
|
|
486
|
+
defineCustomElement$3();
|
|
487
|
+
}
|
|
488
|
+
break;
|
|
489
|
+
case "casino-tournament-duration":
|
|
490
|
+
if (!customElements.get(tagName)) {
|
|
491
|
+
defineCustomElement$2();
|
|
492
|
+
}
|
|
493
|
+
break;
|
|
494
|
+
case "casino-tournament-prizes":
|
|
495
|
+
if (!customElements.get(tagName)) {
|
|
496
|
+
defineCustomElement$1();
|
|
497
|
+
}
|
|
498
|
+
break;
|
|
499
|
+
} });
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export { CasinoTournamentInfo as C, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface CasinoTournamentList extends Components.CasinoTournamentList, HTMLElement {}
|
|
4
|
+
export const CasinoTournamentList: {
|
|
5
|
+
prototype: CasinoTournamentList;
|
|
6
|
+
new (): CasinoTournamentList;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|