@everymatrix/casino-tournament-duration 1.43.4 → 1.45.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.
Files changed (48) hide show
  1. package/dist/casino-tournament-duration/casino-tournament-duration.esm.js +1 -1
  2. package/dist/casino-tournament-duration/p-57ef1124.js +2 -0
  3. package/dist/casino-tournament-duration/p-b0ea5595.entry.js +1 -0
  4. package/dist/casino-tournament-duration/p-e1255160.js +1 -0
  5. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  6. package/dist/cjs/casino-tournament-duration.cjs.entry.js +205 -201
  7. package/dist/cjs/casino-tournament-duration.cjs.js +17 -11
  8. package/dist/cjs/index-5302010b.js +1201 -0
  9. package/dist/cjs/loader.cjs.js +7 -13
  10. package/dist/collection/collection-manifest.json +3 -3
  11. package/dist/collection/components/casino-tournament-duration/casino-tournament-duration.js +263 -268
  12. package/dist/collection/components/casino-tournament-duration/index.js +1 -0
  13. package/dist/collection/utils/locale.utils.js +88 -88
  14. package/dist/collection/utils/utils.js +1 -1
  15. package/dist/esm/app-globals-0f993ce5.js +3 -0
  16. package/dist/esm/casino-tournament-duration.entry.js +205 -201
  17. package/dist/esm/casino-tournament-duration.js +14 -11
  18. package/dist/esm/index-2af9ace7.js +1174 -0
  19. package/dist/esm/loader.js +7 -13
  20. package/dist/stencil.config.dev.js +17 -0
  21. package/dist/stencil.config.js +14 -19
  22. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-tournament-duration/.stencil/packages/stencil/casino-tournament-duration/stencil.config.d.ts +2 -0
  23. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-tournament-duration/.stencil/packages/stencil/casino-tournament-duration/stencil.config.dev.d.ts +2 -0
  24. package/dist/types/components/casino-tournament-duration/casino-tournament-duration.d.ts +45 -45
  25. package/dist/types/components/casino-tournament-duration/index.d.ts +1 -0
  26. package/dist/types/stencil-public-runtime.d.ts +142 -33
  27. package/loader/cdn.js +1 -3
  28. package/loader/index.cjs.js +1 -3
  29. package/loader/index.d.ts +13 -1
  30. package/loader/index.es2017.js +1 -3
  31. package/loader/index.js +1 -3
  32. package/loader/package.json +1 -0
  33. package/package.json +8 -1
  34. package/dist/casino-tournament-duration/p-183a9160.entry.js +0 -1
  35. package/dist/casino-tournament-duration/p-5f4837aa.js +0 -1
  36. package/dist/cjs/index-764d2bff.js +0 -1170
  37. package/dist/components/casino-tournament-duration.d.ts +0 -11
  38. package/dist/components/casino-tournament-duration.js +0 -257
  39. package/dist/components/index.d.ts +0 -26
  40. package/dist/components/index.js +0 -1
  41. package/dist/esm/index-4075dde6.js +0 -1144
  42. package/dist/esm/polyfills/core-js.js +0 -11
  43. package/dist/esm/polyfills/css-shim.js +0 -1
  44. package/dist/esm/polyfills/dom.js +0 -79
  45. package/dist/esm/polyfills/es5-html-element.js +0 -1
  46. package/dist/esm/polyfills/index.js +0 -34
  47. package/dist/esm/polyfills/system.js +0 -6
  48. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-tournament-duration/.stencil/packages/casino-tournament-duration/stencil.config.d.ts +0 -2
@@ -1,95 +1,95 @@
1
1
  const DEFAULT_LANGUAGE = 'en';
2
2
  const TRANSLATIONS = {
3
- en: {
4
- finished: 'Finished',
5
- starting: 'Starting in ',
6
- left: 'left',
7
- minutes: 'minutes',
8
- hours: 'hours',
9
- days: 'days',
10
- },
11
- hr: {
12
- finished: 'Gotovo',
13
- starting: 'Počinje u ',
14
- left: 'lijevo',
15
- minutes: 'minute',
16
- hours: 'sati',
17
- days: 'dani',
18
- },
19
- 'zh-hk': {
20
- finished: '完成的',
21
- starting: '開始於',
22
- left: '剩下',
23
- minutes: '分鐘',
24
- hours: '小時',
25
- days: '天',
26
- },
27
- fr: {
28
- finished: 'Fini',
29
- starting: 'Début dans ',
30
- left: 'restant',
31
- minutes: 'minutes',
32
- hours: 'heures',
33
- days: 'jours',
34
- },
35
- ro: {
36
- finished: 'Finalizat',
37
- starting: 'Începe în',
38
- left: 'rămase',
39
- minutes: 'minute',
40
- hours: 'ore',
41
- days: 'zile',
42
- },
43
- tr: {
44
- finished: 'Sona ermiş',
45
- starting: 'Başlamasına ',
46
- left: 'kaldı',
47
- minutes: 'dakika',
48
- hours: 'saat',
49
- days: 'gün',
50
- },
51
- el: {
52
- finished: 'Ολοκληρωμένα',
53
- starting: 'Αρχίζει σε ',
54
- left: 'απομένουν',
55
- minutes: 'λεπτά',
56
- hours: 'ώρες',
57
- days: 'ημέρες',
58
- },
59
- es: {
60
- finished: 'Finalizado',
61
- starting: 'Iniciando en ',
62
- left: 'izquierda',
63
- minutes: 'minutos',
64
- hours: 'horas',
65
- days: 'días',
66
- },
67
- hu: {
68
- finished: 'Befejezve',
69
- starting: 'Kezdésig',
70
- left: 'bal',
71
- minutes: 'perc',
72
- hours: 'óra',
73
- days: 'nap',
74
- },
75
- pt: {
76
- finished: 'Finalizado',
77
- starting: 'Começando em',
78
- left: 'Abandonou',
79
- minutes: 'Minutos',
80
- hours: 'Horas',
81
- days: 'Dias',
82
- }
3
+ en: {
4
+ finished: 'Finished',
5
+ starting: 'Starting in ',
6
+ left: 'left',
7
+ minutes: 'minutes',
8
+ hours: 'hours',
9
+ days: 'days',
10
+ },
11
+ hr: {
12
+ finished: 'Gotovo',
13
+ starting: 'Počinje u ',
14
+ left: 'lijevo',
15
+ minutes: 'minute',
16
+ hours: 'sati',
17
+ days: 'dani',
18
+ },
19
+ 'zh-hk': {
20
+ finished: '完成的',
21
+ starting: '開始於',
22
+ left: '剩下',
23
+ minutes: '分鐘',
24
+ hours: '小時',
25
+ days: '天',
26
+ },
27
+ fr: {
28
+ finished: 'Fini',
29
+ starting: 'Début dans ',
30
+ left: 'restant',
31
+ minutes: 'minutes',
32
+ hours: 'heures',
33
+ days: 'jours',
34
+ },
35
+ ro: {
36
+ finished: 'Finalizat',
37
+ starting: 'Începe în',
38
+ left: 'rămase',
39
+ minutes: 'minute',
40
+ hours: 'ore',
41
+ days: 'zile',
42
+ },
43
+ tr: {
44
+ finished: 'Sona ermiş',
45
+ starting: 'Başlamasına ',
46
+ left: 'kaldı',
47
+ minutes: 'dakika',
48
+ hours: 'saat',
49
+ days: 'gün',
50
+ },
51
+ el: {
52
+ finished: 'Ολοκληρωμένα',
53
+ starting: 'Αρχίζει σε ',
54
+ left: 'απομένουν',
55
+ minutes: 'λεπτά',
56
+ hours: 'ώρες',
57
+ days: 'ημέρες',
58
+ },
59
+ es: {
60
+ finished: 'Finalizado',
61
+ starting: 'Iniciando en ',
62
+ left: 'izquierda',
63
+ minutes: 'minutos',
64
+ hours: 'horas',
65
+ days: 'días',
66
+ },
67
+ hu: {
68
+ finished: 'Befejezve',
69
+ starting: 'Kezdésig',
70
+ left: 'bal',
71
+ minutes: 'perc',
72
+ hours: 'óra',
73
+ days: 'nap',
74
+ },
75
+ pt: {
76
+ finished: 'Finalizado',
77
+ starting: 'Começando em',
78
+ left: 'Abandonou',
79
+ minutes: 'Minutos',
80
+ hours: 'Horas',
81
+ days: 'Dias',
82
+ }
83
83
  };
84
84
  export const translate = (key, customLang) => {
85
- var _a, _b;
86
- const lang = customLang;
87
- return ((_a = TRANSLATIONS[lang]) === null || _a === void 0 ? void 0 : _a[key]) || ((_b = TRANSLATIONS[DEFAULT_LANGUAGE]) === null || _b === void 0 ? void 0 : _b[key]);
85
+ var _a, _b;
86
+ const lang = customLang;
87
+ return ((_a = TRANSLATIONS[lang]) === null || _a === void 0 ? void 0 : _a[key]) || ((_b = TRANSLATIONS[DEFAULT_LANGUAGE]) === null || _b === void 0 ? void 0 : _b[key]);
88
88
  };
89
89
  export const getTranslations = (data) => {
90
- Object.keys(data).forEach((item) => {
91
- for (let key in data[item]) {
92
- TRANSLATIONS[item][key] = data[item][key];
93
- }
94
- });
90
+ Object.keys(data).forEach((item) => {
91
+ for (let key in data[item]) {
92
+ TRANSLATIONS[item][key] = data[item][key];
93
+ }
94
+ });
95
95
  };
@@ -1,3 +1,3 @@
1
1
  export function format(first, middle, last) {
2
- return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
2
+ return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
3
3
  }
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };
@@ -1,226 +1,230 @@
1
- import { r as registerInstance, h, g as getElement } from './index-4075dde6.js';
1
+ import { r as registerInstance, h, g as getElement } from './index-2af9ace7.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const TRANSLATIONS = {
5
- en: {
6
- finished: 'Finished',
7
- starting: 'Starting in ',
8
- left: 'left',
9
- minutes: 'minutes',
10
- hours: 'hours',
11
- days: 'days',
12
- },
13
- hr: {
14
- finished: 'Gotovo',
15
- starting: 'Počinje u ',
16
- left: 'lijevo',
17
- minutes: 'minute',
18
- hours: 'sati',
19
- days: 'dani',
20
- },
21
- 'zh-hk': {
22
- finished: '完成的',
23
- starting: '開始於',
24
- left: '剩下',
25
- minutes: '分鐘',
26
- hours: '小時',
27
- days: '天',
28
- },
29
- fr: {
30
- finished: 'Fini',
31
- starting: 'Début dans ',
32
- left: 'restant',
33
- minutes: 'minutes',
34
- hours: 'heures',
35
- days: 'jours',
36
- },
37
- ro: {
38
- finished: 'Finalizat',
39
- starting: 'Începe în',
40
- left: 'rămase',
41
- minutes: 'minute',
42
- hours: 'ore',
43
- days: 'zile',
44
- },
45
- tr: {
46
- finished: 'Sona ermiş',
47
- starting: 'Başlamasına ',
48
- left: 'kaldı',
49
- minutes: 'dakika',
50
- hours: 'saat',
51
- days: 'gün',
52
- },
53
- el: {
54
- finished: 'Ολοκληρωμένα',
55
- starting: 'Αρχίζει σε ',
56
- left: 'απομένουν',
57
- minutes: 'λεπτά',
58
- hours: 'ώρες',
59
- days: 'ημέρες',
60
- },
61
- es: {
62
- finished: 'Finalizado',
63
- starting: 'Iniciando en ',
64
- left: 'izquierda',
65
- minutes: 'minutos',
66
- hours: 'horas',
67
- days: 'días',
68
- },
69
- hu: {
70
- finished: 'Befejezve',
71
- starting: 'Kezdésig',
72
- left: 'bal',
73
- minutes: 'perc',
74
- hours: 'óra',
75
- days: 'nap',
76
- },
77
- pt: {
78
- finished: 'Finalizado',
79
- starting: 'Começando em',
80
- left: 'Abandonou',
81
- minutes: 'Minutos',
82
- hours: 'Horas',
83
- days: 'Dias',
84
- }
5
+ en: {
6
+ finished: 'Finished',
7
+ starting: 'Starting in ',
8
+ left: 'left',
9
+ minutes: 'minutes',
10
+ hours: 'hours',
11
+ days: 'days',
12
+ },
13
+ hr: {
14
+ finished: 'Gotovo',
15
+ starting: 'Počinje u ',
16
+ left: 'lijevo',
17
+ minutes: 'minute',
18
+ hours: 'sati',
19
+ days: 'dani',
20
+ },
21
+ 'zh-hk': {
22
+ finished: '完成的',
23
+ starting: '開始於',
24
+ left: '剩下',
25
+ minutes: '分鐘',
26
+ hours: '小時',
27
+ days: '天',
28
+ },
29
+ fr: {
30
+ finished: 'Fini',
31
+ starting: 'Début dans ',
32
+ left: 'restant',
33
+ minutes: 'minutes',
34
+ hours: 'heures',
35
+ days: 'jours',
36
+ },
37
+ ro: {
38
+ finished: 'Finalizat',
39
+ starting: 'Începe în',
40
+ left: 'rămase',
41
+ minutes: 'minute',
42
+ hours: 'ore',
43
+ days: 'zile',
44
+ },
45
+ tr: {
46
+ finished: 'Sona ermiş',
47
+ starting: 'Başlamasına ',
48
+ left: 'kaldı',
49
+ minutes: 'dakika',
50
+ hours: 'saat',
51
+ days: 'gün',
52
+ },
53
+ el: {
54
+ finished: 'Ολοκληρωμένα',
55
+ starting: 'Αρχίζει σε ',
56
+ left: 'απομένουν',
57
+ minutes: 'λεπτά',
58
+ hours: 'ώρες',
59
+ days: 'ημέρες',
60
+ },
61
+ es: {
62
+ finished: 'Finalizado',
63
+ starting: 'Iniciando en ',
64
+ left: 'izquierda',
65
+ minutes: 'minutos',
66
+ hours: 'horas',
67
+ days: 'días',
68
+ },
69
+ hu: {
70
+ finished: 'Befejezve',
71
+ starting: 'Kezdésig',
72
+ left: 'bal',
73
+ minutes: 'perc',
74
+ hours: 'óra',
75
+ days: 'nap',
76
+ },
77
+ pt: {
78
+ finished: 'Finalizado',
79
+ starting: 'Começando em',
80
+ left: 'Abandonou',
81
+ minutes: 'Minutos',
82
+ hours: 'Horas',
83
+ days: 'Dias',
84
+ }
85
85
  };
86
86
  const translate = (key, customLang) => {
87
- var _a, _b;
88
- const lang = customLang;
89
- return ((_a = TRANSLATIONS[lang]) === null || _a === void 0 ? void 0 : _a[key]) || ((_b = TRANSLATIONS[DEFAULT_LANGUAGE]) === null || _b === void 0 ? void 0 : _b[key]);
87
+ var _a, _b;
88
+ const lang = customLang;
89
+ return ((_a = TRANSLATIONS[lang]) === null || _a === void 0 ? void 0 : _a[key]) || ((_b = TRANSLATIONS[DEFAULT_LANGUAGE]) === null || _b === void 0 ? void 0 : _b[key]);
90
90
  };
91
91
  const getTranslations = (data) => {
92
- Object.keys(data).forEach((item) => {
93
- for (let key in data[item]) {
94
- TRANSLATIONS[item][key] = data[item][key];
95
- }
96
- });
92
+ Object.keys(data).forEach((item) => {
93
+ for (let key in data[item]) {
94
+ TRANSLATIONS[item][key] = data[item][key];
95
+ }
96
+ });
97
97
  };
98
98
 
99
99
  const casinoTournamentDurationCss = ":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)}";
100
+ const CasinoTournamentDurationStyle0 = casinoTournamentDurationCss;
100
101
 
101
102
  const CasinoTournamentDuration = class {
102
- constructor(hostRef) {
103
- registerInstance(this, hostRef);
104
- /**
105
- * Client custom styling via inline styles
106
- */
107
- this.clientStyling = '';
108
- /**
109
- * Client custom styling via url
110
- */
111
- this.clientStylingUrl = '';
112
- this.limitStylingAppends = false;
113
- }
114
- watchLanguage(newValue, oldValue) {
115
- if (newValue && newValue != oldValue) {
116
- this.getDuration();
103
+ constructor(hostRef) {
104
+ registerInstance(this, hostRef);
105
+ this.startTime = undefined;
106
+ this.endTime = undefined;
107
+ this.status = undefined;
108
+ this.language = undefined;
109
+ this.clientStyling = '';
110
+ this.clientStylingUrl = '';
111
+ this.translationData = undefined;
112
+ this.tournamentUntilStartDays = undefined;
113
+ this.tournamentLeftDays = undefined;
114
+ this.showRemain = undefined;
115
+ this.limitStylingAppends = false;
116
+ this.durationInterval = undefined;
117
117
  }
118
- }
119
- getDateTimeDiff(dateString1, dateString2) {
120
- return ((new Date(dateString2)).getTime() - (new Date(dateString1)).getTime()) / (1000 * 60);
121
- }
122
- getDuration() {
123
- const dateNow = new Date();
124
- this.tournamentLeftDays = this.getDateTimeDiff(dateNow, this.endTime);
125
- this.tournamentUntilStartDays = this.getDateTimeDiff(dateNow, this.startTime);
126
- this.showRemain = this.getTextByDiff(this.tournamentLeftDays);
127
- }
128
- formatDate(date) {
129
- const dateOptions = { month: 'long' };
130
- let currentDate = new Date(date);
131
- let currentMonth = new Intl.DateTimeFormat(this.language, dateOptions).format(currentDate);
132
- let currentDay = currentDate.getDate();
133
- return `${currentDay} ${currentMonth}, ${currentDate.toLocaleString('en-GB', { hour: 'numeric', minute: 'numeric' })}, ${currentDate.getUTCFullYear()}`;
134
- }
135
- getTextByDiff(diff) {
136
- const renderText = (amount, type) => amount + ' ' + translate(type, this.language);
137
- const renderTimeColumn = (column) => {
138
- const columnInt = Math.floor(column);
139
- if (columnInt < 10) {
140
- return `0${columnInt}`;
141
- }
142
- else {
143
- return `${columnInt}`;
144
- }
145
- };
146
- if (diff < 1440) {
147
- const hours = diff / 60;
148
- const minutes = diff % 60;
149
- const seconds = (minutes - Math.floor(minutes)) * 60;
150
- return [hours, minutes, seconds].map(c => renderTimeColumn(c)).join(':');
118
+ watchLanguage(newValue, oldValue) {
119
+ if (newValue && newValue != oldValue) {
120
+ this.getDuration();
121
+ }
151
122
  }
152
- return renderText(Math.ceil(diff / (60 * 24)), 'days');
153
- }
154
- getProgress() {
155
- if (this.tournamentLeftDays <= 0)
156
- return 100;
157
- const tournamentDuration = this.getDateTimeDiff(this.startTime, this.endTime);
158
- const step = 100 / tournamentDuration;
159
- const width = Math.floor((tournamentDuration - this.tournamentLeftDays) * step);
160
- return width;
161
- }
162
- componentWillLoad() {
163
- if (this.translationData) {
164
- getTranslations(JSON.parse(this.translationData));
123
+ getDateTimeDiff(dateString1, dateString2) {
124
+ return ((new Date(dateString2)).getTime() - (new Date(dateString1)).getTime()) / (1000 * 60);
125
+ }
126
+ getDuration() {
127
+ const dateNow = new Date();
128
+ this.tournamentLeftDays = this.getDateTimeDiff(dateNow, this.endTime);
129
+ this.tournamentUntilStartDays = this.getDateTimeDiff(dateNow, this.startTime);
130
+ this.showRemain = this.getTextByDiff(this.tournamentLeftDays);
131
+ }
132
+ formatDate(date) {
133
+ const dateOptions = { month: 'long' };
134
+ let currentDate = new Date(date);
135
+ let currentMonth = new Intl.DateTimeFormat(this.language, dateOptions).format(currentDate);
136
+ let currentDay = currentDate.getDate();
137
+ return `${currentDay} ${currentMonth}, ${currentDate.toLocaleString('en-GB', { hour: 'numeric', minute: 'numeric' })}, ${currentDate.getUTCFullYear()}`;
138
+ }
139
+ getTextByDiff(diff) {
140
+ const renderText = (amount, type) => amount + ' ' + translate(type, this.language);
141
+ const renderTimeColumn = (column) => {
142
+ const columnInt = Math.floor(column);
143
+ if (columnInt < 10) {
144
+ return `0${columnInt}`;
145
+ }
146
+ else {
147
+ return `${columnInt}`;
148
+ }
149
+ };
150
+ if (diff < 1440) {
151
+ const hours = diff / 60;
152
+ const minutes = diff % 60;
153
+ const seconds = (minutes - Math.floor(minutes)) * 60;
154
+ return [hours, minutes, seconds].map(c => renderTimeColumn(c)).join(':');
155
+ }
156
+ return renderText(Math.ceil(diff / (60 * 24)), 'days');
165
157
  }
166
- if (this.startTime && this.endTime) {
167
- this.getDuration();
168
- this.getTextByDiff(this.tournamentLeftDays);
158
+ getProgress() {
159
+ if (this.tournamentLeftDays <= 0)
160
+ return 100;
161
+ const tournamentDuration = this.getDateTimeDiff(this.startTime, this.endTime);
162
+ const step = 100 / tournamentDuration;
163
+ const width = Math.floor((tournamentDuration - this.tournamentLeftDays) * step);
164
+ return width;
169
165
  }
170
- if (this.tournamentLeftDays < 1440 && this.tournamentLeftDays > 0) {
171
- this.durationInterval = window.setInterval(() => {
166
+ componentWillLoad() {
167
+ if (this.translationData) {
168
+ getTranslations(JSON.parse(this.translationData));
169
+ }
172
170
  if (this.startTime && this.endTime) {
173
- this.getDuration();
171
+ this.getDuration();
172
+ this.getTextByDiff(this.tournamentLeftDays);
173
+ }
174
+ if (this.tournamentLeftDays < 1440 && this.tournamentLeftDays > 0) {
175
+ this.durationInterval = window.setInterval(() => {
176
+ if (this.startTime && this.endTime) {
177
+ this.getDuration();
178
+ }
179
+ }, 1000);
180
+ }
181
+ else {
182
+ clearInterval(this.durationInterval);
183
+ }
184
+ }
185
+ componentDidRender() {
186
+ if (!this.limitStylingAppends && this.host) {
187
+ if (this.clientStyling)
188
+ this.setClientStyling();
189
+ if (this.clientStylingUrl)
190
+ this.setClientStylingURL();
191
+ this.limitStylingAppends = true;
174
192
  }
175
- }, 1000);
176
193
  }
177
- else {
178
- clearInterval(this.durationInterval);
194
+ setClientStyling() {
195
+ const sheet = new CSSStyleSheet();
196
+ // @ts-ignore
197
+ sheet.replace(this.clientStyling);
198
+ // @ts-ignore
199
+ this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
179
200
  }
180
- }
181
- componentDidRender() {
182
- if (!this.limitStylingAppends && this.host) {
183
- if (this.clientStyling)
184
- this.setClientStyling();
185
- if (this.clientStylingUrl)
186
- this.setClientStylingURL();
187
- this.limitStylingAppends = true;
201
+ setClientStylingURL() {
202
+ let url = new URL(this.clientStylingUrl);
203
+ fetch(url.href)
204
+ .then((res) => res.text())
205
+ .then((data) => {
206
+ const sheet = new CSSStyleSheet();
207
+ // @ts-ignore
208
+ sheet.replace(data);
209
+ // @ts-ignore
210
+ this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
211
+ });
188
212
  }
189
- }
190
- setClientStyling() {
191
- const sheet = new CSSStyleSheet();
192
- // @ts-ignore
193
- sheet.replace(this.clientStyling);
194
- // @ts-ignore
195
- this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
196
- }
197
- setClientStylingURL() {
198
- let url = new URL(this.clientStylingUrl);
199
- fetch(url.href)
200
- .then((res) => res.text())
201
- .then((data) => {
202
- const sheet = new CSSStyleSheet();
203
- // @ts-ignore
204
- sheet.replace(data);
205
- // @ts-ignore
206
- this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
207
- });
208
- }
209
- render() {
210
- if (this.startTime && this.endTime) {
211
- return h("div", { class: "TournamentDurationWrap" }, h("div", { class: "TournamentDuration" }, h("div", { class: "TournamentDates" }, h("div", { class: "StartDate", part: "StartDate" }, this.formatDate(this.startTime)), h("div", { class: "EndDate", part: "EndDate" }, this.formatDate(this.endTime))), h("div", { class: "ProgressBarWrapper" }, h("div", { class: "ProgressBar", part: "ProgressBar" }, this.status == 'Finished' || this.status == 'Closing' || this.status == 'Closed' ?
212
- h("div", null, h("div", { class: "ProgressBarFillEnd", part: "ProgressBarFillEnd" }), h("div", { class: "Finished", part: "Finished" }, translate('finished', this.language))) :
213
- this.tournamentUntilStartDays > 0 ?
214
- h("div", null, h("div", { class: "ProgressBarFillStarting", part: "ProgressBarFillStarting" }), h("div", { class: "Remaining", part: "Remaining" }, translate('starting', this.language), " ", this.getTextByDiff(this.tournamentUntilStartDays))) :
215
- h("div", null, h("div", { class: "ProgressBarFill", part: "ProgressBarFill", style: { width: `${this.getProgress()}%` } }), this.tournamentLeftDays > 0 &&
216
- h("div", { class: "Remaining", part: "Remaining" }, this.showRemain, " ", translate('left', this.language)))))));
213
+ render() {
214
+ if (this.startTime && this.endTime) {
215
+ return h("div", { key: 'd0051545a243161e89e126fd26b9ea9d2e09f8ab', class: "TournamentDurationWrap" }, h("div", { key: 'b585f0137268f0185dfd15e563a0075bfe617d5b', class: "TournamentDuration" }, h("div", { key: '9cc3670780d9f8c40b77ac978cdadb0e0afdcacb', class: "TournamentDates" }, h("div", { key: '85e4f3b1de4f36efd8d13b090f8f9013976d8685', class: "StartDate", part: "StartDate" }, this.formatDate(this.startTime)), h("div", { key: '688a84ce16a4d26359637b80837a9c5f50fc24c3', class: "EndDate", part: "EndDate" }, this.formatDate(this.endTime))), h("div", { key: '149c0431ac2d8f9b5058a2a269b50e01d23ed26f', class: "ProgressBarWrapper" }, h("div", { key: '85523f37f511f9184260f8575ec08e914f535858', class: "ProgressBar", part: "ProgressBar" }, this.status == 'Finished' || this.status == 'Closing' || this.status == 'Closed' ?
216
+ h("div", null, h("div", { class: "ProgressBarFillEnd", part: "ProgressBarFillEnd" }), h("div", { class: "Finished", part: "Finished" }, translate('finished', this.language))) :
217
+ this.tournamentUntilStartDays > 0 ?
218
+ h("div", null, h("div", { class: "ProgressBarFillStarting", part: "ProgressBarFillStarting" }), h("div", { class: "Remaining", part: "Remaining" }, translate('starting', this.language), " ", this.getTextByDiff(this.tournamentUntilStartDays))) :
219
+ h("div", null, h("div", { class: "ProgressBarFill", part: "ProgressBarFill", style: { width: `${this.getProgress()}%` } }), this.tournamentLeftDays > 0 &&
220
+ h("div", { class: "Remaining", part: "Remaining" }, this.showRemain, " ", translate('left', this.language)))))));
221
+ }
217
222
  }
218
- }
219
- get host() { return getElement(this); }
220
- static get watchers() { return {
221
- "language": ["watchLanguage"]
222
- }; }
223
+ get host() { return getElement(this); }
224
+ static get watchers() { return {
225
+ "language": ["watchLanguage"]
226
+ }; }
223
227
  };
224
- CasinoTournamentDuration.style = casinoTournamentDurationCss;
228
+ CasinoTournamentDuration.style = CasinoTournamentDurationStyle0;
225
229
 
226
230
  export { CasinoTournamentDuration as casino_tournament_duration };