@everymatrix/casino-challenges-list 0.1.2 → 1.77.3
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-challenges-list/casino-challenges-list-d8eefa92.js +1 -0
- package/dist/casino-challenges-list/casino-challenges-list.esm.js +1 -1
- package/dist/casino-challenges-list/casino-challenges-list_2.entry.js +1 -0
- package/dist/casino-challenges-list/index-e9d014fd.js +2 -0
- package/dist/casino-challenges-list/index.esm.js +1 -1
- package/dist/cjs/{casino-challenges-list-46cdc97e.js → casino-challenges-list-4da62aa7.js} +2 -4
- package/dist/cjs/casino-challenges-list.cjs.js +2 -2
- package/dist/cjs/casino-challenges-list_2.cjs.entry.js +184 -0
- package/dist/cjs/{index-2a526238.js → index-75e73570.js} +6 -37
- package/dist/cjs/index.cjs.js +3 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +0 -6
- package/dist/collection/components/casino-challenges-list/casino-challenges-list.js +1 -1
- package/dist/esm/{casino-challenges-list-f8cb576c.js → casino-challenges-list-d8eefa92.js} +3 -2
- package/dist/esm/casino-challenges-list.js +3 -3
- package/dist/esm/casino-challenges-list_2.entry.js +179 -0
- package/dist/esm/{index-72daee0c.js → index-e9d014fd.js} +6 -37
- package/dist/esm/index.js +3 -2
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/casino-challenges-list/casino-challenges-list.d.ts +1 -1
- package/package.json +1 -1
- package/dist/casino-challenges-list/casino-challenge-card_3.entry.js +0 -1
- package/dist/casino-challenges-list/casino-challenges-list-f8cb576c.js +0 -1
- package/dist/casino-challenges-list/index-72daee0c.js +0 -2
- package/dist/cjs/casino-challenge-card_3.cjs.entry.js +0 -408
- package/dist/esm/casino-challenge-card_3.entry.js +0 -403
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-2a526238.js');
|
|
6
|
-
const casinoChallengesList = require('./casino-challenges-list-46cdc97e.js');
|
|
7
|
-
|
|
8
|
-
const DEFAULT_LANGUAGE = 'en';
|
|
9
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
10
|
-
const TRANSLATIONS = {
|
|
11
|
-
en: {
|
|
12
|
-
totalLevels: 'Total levels:',
|
|
13
|
-
level1: 'Level 1:',
|
|
14
|
-
get: 'Get:',
|
|
15
|
-
endsIn: 'Ends In',
|
|
16
|
-
expired: 'Expired',
|
|
17
|
-
viewDetails: 'View details',
|
|
18
|
-
placeBetsOf: 'Place bets of',
|
|
19
|
-
place: 'Place',
|
|
20
|
-
bet: 'bet',
|
|
21
|
-
bets: 'bets'
|
|
22
|
-
},
|
|
23
|
-
ro: {
|
|
24
|
-
totalLevels: 'Niveluri totale:',
|
|
25
|
-
level1: 'Nivel 1:',
|
|
26
|
-
get: 'Obține:',
|
|
27
|
-
endsIn: 'Se termină în',
|
|
28
|
-
expired: 'Expirat',
|
|
29
|
-
viewDetails: 'Vezi detalii',
|
|
30
|
-
placeBetsOf: 'Plasează pariuri de',
|
|
31
|
-
place: 'Plasare',
|
|
32
|
-
bet: 'pariu',
|
|
33
|
-
bets: 'pariuri'
|
|
34
|
-
},
|
|
35
|
-
fr: {
|
|
36
|
-
totalLevels: 'Niveaux totaux :',
|
|
37
|
-
level1: 'Niveau 1 :',
|
|
38
|
-
get: 'Obtenir :',
|
|
39
|
-
endsIn: 'Se termine dans',
|
|
40
|
-
expired: 'Expiré',
|
|
41
|
-
viewDetails: 'Voir les détails',
|
|
42
|
-
placeBetsOf: 'Placez des paris de',
|
|
43
|
-
place: 'Placer',
|
|
44
|
-
bet: 'pari',
|
|
45
|
-
bets: 'paris'
|
|
46
|
-
},
|
|
47
|
-
ar: {
|
|
48
|
-
totalLevels: 'إجمالي المستويات:',
|
|
49
|
-
level1: 'المستوى 1:',
|
|
50
|
-
get: 'احصل على:',
|
|
51
|
-
endsIn: 'ينتهي في',
|
|
52
|
-
expired: 'منتهي الصلاحية',
|
|
53
|
-
viewDetails: 'عرض التفاصيل',
|
|
54
|
-
placeBetsOf: 'قم بوضع رهانات بقيمة',
|
|
55
|
-
place: 'ضع',
|
|
56
|
-
bet: 'رهان',
|
|
57
|
-
bets: 'رهانات'
|
|
58
|
-
},
|
|
59
|
-
hr: {
|
|
60
|
-
totalLevels: 'Ukupno razina:',
|
|
61
|
-
level1: 'Razina 1:',
|
|
62
|
-
get: 'Dobiti:',
|
|
63
|
-
endsIn: 'Završava za',
|
|
64
|
-
expired: 'Isteklo',
|
|
65
|
-
viewDetails: 'Pogledaj detalje',
|
|
66
|
-
placeBetsOf: 'Postavite oklade od',
|
|
67
|
-
place: 'Postavi',
|
|
68
|
-
bet: 'kladnja',
|
|
69
|
-
bets: 'kladnje'
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
const translate = (key, customLang) => {
|
|
73
|
-
const lang = customLang;
|
|
74
|
-
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
75
|
-
};
|
|
76
|
-
const getTranslations = (data) => {
|
|
77
|
-
Object.keys(data).forEach((item) => {
|
|
78
|
-
for (let key in data[item]) {
|
|
79
|
-
TRANSLATIONS[item][key] = data[item][key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
const resolveTranslationUrl = async (translationUrl) => {
|
|
84
|
-
if (translationUrl) {
|
|
85
|
-
try {
|
|
86
|
-
const response = await fetch(translationUrl);
|
|
87
|
-
if (!response.ok) {
|
|
88
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
|
89
|
-
}
|
|
90
|
-
const translations = await response.json();
|
|
91
|
-
getTranslations(translations);
|
|
92
|
-
}
|
|
93
|
-
catch (error) {
|
|
94
|
-
console.error('Failed to fetch or parse translations from URL:', error);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
function getTimeLeft(endTime) {
|
|
100
|
-
const now = new Date();
|
|
101
|
-
const end = new Date(endTime);
|
|
102
|
-
let diff = end.getTime() - now.getTime();
|
|
103
|
-
if (diff <= 0) {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
|
|
107
|
-
diff -= days * (1000 * 60 * 60 * 24);
|
|
108
|
-
const hours = Math.floor(diff / (1000 * 60 * 60));
|
|
109
|
-
diff -= hours * (1000 * 60 * 60);
|
|
110
|
-
const minutes = Math.floor(diff / (1000 * 60));
|
|
111
|
-
diff -= minutes * (1000 * 60);
|
|
112
|
-
const seconds = Math.floor(diff / 1000);
|
|
113
|
-
const pad = (n) => n.toString().padStart(2, '0');
|
|
114
|
-
return `${pad(days)} : ${pad(hours)} : ${pad(minutes)} : ${pad(seconds)}`;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const casinoChallengeCardCss = ".card {\n width: 308px;\n border-radius: 16px;\n border: 2px solid var(--emw--button-border-color, rgba(221, 255, 207, 0.1019607843));\n background-color: var(--emw--color-background, #141515);\n box-sizing: border-box;\n position: relative;\n}\n@container challenge-list (max-width: 576px) {\n .card {\n width: 100%;\n }\n}\n.card:hover {\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n cursor: pointer;\n}\n.card__image {\n width: 100%;\n height: 200px;\n border-radius: 16px 16px 0 0;\n}\n@container challenge-list (max-width: 576px) {\n .card__image {\n height: 224px;\n }\n}\n.card__title {\n color: var(--emw--color-white, #FFFFFF);\n font-size: var(--emw--font-size-medium, 16px);\n margin: 0 0 10px;\n}\n.card__content {\n padding: 20px;\n}\n.card__button {\n margin-top: 20px;\n width: 100%;\n height: 34px;\n background: transparent;\n text-transform: uppercase;\n border-radius: var(--emw--button-border-radius, 99px);\n border: 2px solid var(--emw--button-border-color, #727672);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-secondary, #e9931e);\n}\n.card__button:hover {\n border-color: var(--emw--color-secondary, #e9931e);\n cursor: pointer;\n}\n.card__badge {\n position: absolute;\n background: white;\n top: 6px;\n right: 6px;\n border-radius: 30px;\n padding: 2px 12px;\n line-height: 22px;\n font-weight: var(--emw--font-weight-medium, 500);\n font-size: var(--emw--font-size-x-small, 12px);\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\n backdrop-filter: blur(20px);\n}\n.card__badge span {\n font-weight: var(--emw--font-weight-bold, 700);\n}\n\n.info-item {\n line-height: 24px;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-primary, #1dbf51);\n}\n@container challenge-list (min-width: 576px) {\n .info-item {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n }\n}\n.info-item__label {\n font-weight: var(--emw--font-weight-medium, 500);\n margin-right: 3px;\n color: var(--emw--color-gray-150, #C8D6CE);\n}\n.info-item__tooltip {\n position: absolute;\n line-height: 22px;\n padding: 8px 12px;\n border-radius: 8px;\n opacity: 1;\n z-index: 200;\n white-space: nowrap;\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n color: var(--emw--color-white, #FFFFFF);\n background-color: var(--emw--color-background-secondary, #1B1C2B);\n}\n.info-item__tooltip::before {\n content: \"\";\n position: absolute;\n top: -5px;\n left: 50%;\n transform: translateX(-50%);\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid var(--emw--color-background-secondary, #1B1C2B);\n width: 0;\n height: 0;\n z-index: 201;\n}";
|
|
118
|
-
const CasinoChallengeCardStyle0 = casinoChallengeCardCss;
|
|
119
|
-
|
|
120
|
-
const CasinoChallengeCard = class {
|
|
121
|
-
constructor(hostRef) {
|
|
122
|
-
index.registerInstance(this, hostRef);
|
|
123
|
-
this.defaultLanguage = 'en';
|
|
124
|
-
this.onMouseEnterHandler = (index, el) => {
|
|
125
|
-
if (el.scrollWidth > el.clientWidth) {
|
|
126
|
-
this.tooltipIndex = index;
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
this.onMouseLeaveHandler = () => {
|
|
130
|
-
this.tooltipIndex = null;
|
|
131
|
-
};
|
|
132
|
-
this.mbSource = undefined;
|
|
133
|
-
this.clientStyling = undefined;
|
|
134
|
-
this.clientStylingUrl = undefined;
|
|
135
|
-
this.translationUrl = '';
|
|
136
|
-
this.language = 'en';
|
|
137
|
-
this.challenge = undefined;
|
|
138
|
-
this.tooltipIndex = null;
|
|
139
|
-
this.timeLeft = undefined;
|
|
140
|
-
}
|
|
141
|
-
get infoItems() {
|
|
142
|
-
const level1 = this.challenge.ChallengeLevels[0];
|
|
143
|
-
const target = level1.Target;
|
|
144
|
-
const targetValue = target.TargetType === 0
|
|
145
|
-
? `${translate('placeBetsOf', this.language)} ${target.Turnover}`
|
|
146
|
-
: target.TargetType === 1
|
|
147
|
-
? `${translate('place', this.language)} ${target.Turnover} ${translate('bet', this.language)}`
|
|
148
|
-
: `${translate('place', this.language)} ${target.BetCount} ${translate('bets', this.language)}`;
|
|
149
|
-
const rewardValue = level1.Rewards.map((r) => r.RewardDescription).join(' + ');
|
|
150
|
-
return [
|
|
151
|
-
{
|
|
152
|
-
lable: translate('totalLevels', this.language),
|
|
153
|
-
value: this.challenge.ChallengeLevels.length
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
lable: translate('level1', this.language),
|
|
157
|
-
value: targetValue
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
lable: translate('get', this.language),
|
|
161
|
-
value: rewardValue
|
|
162
|
-
}
|
|
163
|
-
];
|
|
164
|
-
}
|
|
165
|
-
handleClientStylingChange(newValue, oldValue) {
|
|
166
|
-
if (newValue != oldValue) {
|
|
167
|
-
casinoChallengesList.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
handleClientStylingUrlChange(newValue, oldValue) {
|
|
171
|
-
if (newValue != oldValue) {
|
|
172
|
-
casinoChallengesList.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
handleMbSourceChange(newValue, oldValue) {
|
|
176
|
-
if (newValue != oldValue) {
|
|
177
|
-
casinoChallengesList.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
connectedCallback() {
|
|
181
|
-
this.timerId = setInterval(() => {
|
|
182
|
-
this.updateTime();
|
|
183
|
-
}, 1000);
|
|
184
|
-
}
|
|
185
|
-
componentWillLoad() {
|
|
186
|
-
if (this.translationUrl) {
|
|
187
|
-
resolveTranslationUrl(this.translationUrl);
|
|
188
|
-
}
|
|
189
|
-
this.updateTime();
|
|
190
|
-
}
|
|
191
|
-
componentDidLoad() {
|
|
192
|
-
if (this.stylingContainer) {
|
|
193
|
-
if (this.mbSource)
|
|
194
|
-
casinoChallengesList.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
195
|
-
if (this.clientStyling)
|
|
196
|
-
casinoChallengesList.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
197
|
-
if (this.clientStylingUrl)
|
|
198
|
-
casinoChallengesList.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
disconnectedCallback() {
|
|
202
|
-
if (this.stylingSubscription) {
|
|
203
|
-
this.stylingSubscription.unsubscribe();
|
|
204
|
-
}
|
|
205
|
-
clearInterval(this.timerId);
|
|
206
|
-
}
|
|
207
|
-
updateTime() {
|
|
208
|
-
var _a;
|
|
209
|
-
this.timeLeft = getTimeLeft((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengeEndTime);
|
|
210
|
-
}
|
|
211
|
-
renderInfoItem(item, index$1) {
|
|
212
|
-
return (index.h("div", { class: "info-item", onMouseEnter: (e) => this.onMouseEnterHandler(index$1, e.currentTarget), onMouseLeave: this.onMouseLeaveHandler }, index.h("span", { class: "info-item__label" }, item.lable), item.value, this.tooltipIndex === index$1 && index.h("div", { class: "info-item__tooltip" }, item.value)));
|
|
213
|
-
}
|
|
214
|
-
renderCardBadge() {
|
|
215
|
-
return (index.h("div", { class: "card__badge" }, this.timeLeft
|
|
216
|
-
? [translate('endsIn', this.language), ' - ', index.h("span", null, this.timeLeft)]
|
|
217
|
-
: translate('expired', this.language)));
|
|
218
|
-
}
|
|
219
|
-
render() {
|
|
220
|
-
return (index.h("div", { key: 'ddbd3e0d20b4d75ed70120798c45d7c03715b7df', ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '3ca0c4b6ad25b4f60077b894bf73c9686f67a677', class: "card" }, index.h("img", { key: '1712546c27e75e04bde5832c521038bfd418e57f', class: "card__image", src: this.challenge.ChallengePresentations[this.language].Url ||
|
|
221
|
-
this.challenge.ChallengePresentations[this.defaultLanguage].Url }), this.renderCardBadge(), index.h("div", { key: '238041db616391c2594bef46778649b8b6282097', class: "card__content" }, index.h("h1", { key: 'd377b99c7758460df8b1a6e8e39059959347430f', class: "card__title" }, this.challenge.ChallengePresentations[this.language].PresentationName ||
|
|
222
|
-
this.challenge.ChallengePresentations[this.defaultLanguage].PresentationName), this.infoItems.map((x, index) => this.renderInfoItem(x, index)), index.h("button", { key: 'b53707ce7881cbf16321e3d3728a0e769af6589a', class: "card__button" }, translate('viewDetails', this.language))))));
|
|
223
|
-
}
|
|
224
|
-
static get watchers() { return {
|
|
225
|
-
"clientStyling": ["handleClientStylingChange"],
|
|
226
|
-
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
227
|
-
"mbSource": ["handleMbSourceChange"]
|
|
228
|
-
}; }
|
|
229
|
-
};
|
|
230
|
-
CasinoChallengeCard.style = CasinoChallengeCardStyle0;
|
|
231
|
-
|
|
232
|
-
const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
|
|
233
|
-
const UiSkeletonStyle0 = uiSkeletonCss;
|
|
234
|
-
|
|
235
|
-
const UiSkeleton = class {
|
|
236
|
-
constructor(hostRef) {
|
|
237
|
-
index.registerInstance(this, hostRef);
|
|
238
|
-
this.stylingValue = {
|
|
239
|
-
width: this.handleStylingProps(this.width),
|
|
240
|
-
height: this.handleStylingProps(this.height),
|
|
241
|
-
borderRadius: this.handleStylingProps(this.borderRadius),
|
|
242
|
-
marginBottom: this.handleStylingProps(this.marginBottom),
|
|
243
|
-
marginTop: this.handleStylingProps(this.marginTop),
|
|
244
|
-
marginLeft: this.handleStylingProps(this.marginLeft),
|
|
245
|
-
marginRight: this.handleStylingProps(this.marginRight),
|
|
246
|
-
size: this.handleStylingProps(this.size)
|
|
247
|
-
};
|
|
248
|
-
this.structure = undefined;
|
|
249
|
-
this.width = 'unset';
|
|
250
|
-
this.height = 'unset';
|
|
251
|
-
this.borderRadius = 'unset';
|
|
252
|
-
this.marginBottom = 'unset';
|
|
253
|
-
this.marginTop = 'unset';
|
|
254
|
-
this.marginLeft = 'unset';
|
|
255
|
-
this.marginRight = 'unset';
|
|
256
|
-
this.animation = true;
|
|
257
|
-
this.rows = 0;
|
|
258
|
-
this.size = '100%';
|
|
259
|
-
}
|
|
260
|
-
handleStructureChange(newValue, oldValue) {
|
|
261
|
-
if (oldValue !== newValue) {
|
|
262
|
-
this.handleStructure(newValue);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
handleStylingProps(value) {
|
|
266
|
-
switch (typeof value) {
|
|
267
|
-
case 'number':
|
|
268
|
-
return value === 0 ? 0 : `${value}px`;
|
|
269
|
-
case 'undefined':
|
|
270
|
-
return 'unset';
|
|
271
|
-
case 'string':
|
|
272
|
-
if (['auto', 'unset', 'none', 'inherit', 'initial'].includes(value) ||
|
|
273
|
-
value.endsWith('px') ||
|
|
274
|
-
value.endsWith('%')) {
|
|
275
|
-
return value;
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
return 'unset';
|
|
279
|
-
}
|
|
280
|
-
default:
|
|
281
|
-
return 'unset';
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
handleStructure(structure) {
|
|
285
|
-
switch (structure) {
|
|
286
|
-
case 'logo':
|
|
287
|
-
return this.renderLogo();
|
|
288
|
-
case 'image':
|
|
289
|
-
return this.renderImage();
|
|
290
|
-
case 'title':
|
|
291
|
-
return this.renderTitle();
|
|
292
|
-
case 'text':
|
|
293
|
-
return this.renderText();
|
|
294
|
-
case 'rectangle':
|
|
295
|
-
return this.renderRectangle();
|
|
296
|
-
case 'circle':
|
|
297
|
-
return this.renderCircle();
|
|
298
|
-
default:
|
|
299
|
-
return null;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
renderLogo() {
|
|
303
|
-
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Logo ' + (this.animation ? 'Skeleton' : '') })));
|
|
304
|
-
}
|
|
305
|
-
renderImage() {
|
|
306
|
-
return index.h("div", { class: 'Image ' + (this.animation ? 'Skeleton' : '') });
|
|
307
|
-
}
|
|
308
|
-
renderTitle() {
|
|
309
|
-
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Title ' + (this.animation ? 'Skeleton' : '') })));
|
|
310
|
-
}
|
|
311
|
-
renderText() {
|
|
312
|
-
return (index.h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index$1) => (index.h("div", { key: index$1, class: 'Text ' + (this.animation ? 'Skeleton' : '') })))));
|
|
313
|
-
}
|
|
314
|
-
renderRectangle() {
|
|
315
|
-
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Rectangle ' + (this.animation ? 'Skeleton' : '') })));
|
|
316
|
-
}
|
|
317
|
-
renderCircle() {
|
|
318
|
-
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Circle ' + (this.animation ? 'Skeleton' : '') })));
|
|
319
|
-
}
|
|
320
|
-
render() {
|
|
321
|
-
let styleBlock = '';
|
|
322
|
-
switch (this.structure) {
|
|
323
|
-
case 'logo':
|
|
324
|
-
styleBlock = `
|
|
325
|
-
:host {
|
|
326
|
-
--emw-skeleton-logo-width: ${this.stylingValue.width};
|
|
327
|
-
--emw-skeleton-logo-height: ${this.stylingValue.height};
|
|
328
|
-
--emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
|
|
329
|
-
--emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
|
|
330
|
-
--emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
|
|
331
|
-
--emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
|
|
332
|
-
--emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
|
|
333
|
-
}
|
|
334
|
-
`;
|
|
335
|
-
break;
|
|
336
|
-
case 'image':
|
|
337
|
-
styleBlock = `
|
|
338
|
-
:host {
|
|
339
|
-
--emw-skeleton-image-width: ${this.stylingValue.width};
|
|
340
|
-
--emw-skeleton-image-height: ${this.stylingValue.height};
|
|
341
|
-
--emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
|
|
342
|
-
--emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
|
|
343
|
-
--emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
|
|
344
|
-
--emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
|
|
345
|
-
--emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
|
|
346
|
-
}
|
|
347
|
-
`;
|
|
348
|
-
break;
|
|
349
|
-
case 'title':
|
|
350
|
-
styleBlock = `
|
|
351
|
-
:host {
|
|
352
|
-
--emw-skeleton-title-width: ${this.stylingValue.width};
|
|
353
|
-
--emw-skeleton-title-height: ${this.stylingValue.height};
|
|
354
|
-
--emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
|
|
355
|
-
--emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
|
|
356
|
-
--emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
|
|
357
|
-
--emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
|
|
358
|
-
--emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
|
|
359
|
-
}
|
|
360
|
-
`;
|
|
361
|
-
break;
|
|
362
|
-
case 'text':
|
|
363
|
-
styleBlock = `
|
|
364
|
-
:host {
|
|
365
|
-
--emw-skeleton-text-width: ${this.stylingValue.width};
|
|
366
|
-
--emw-skeleton-text-height: ${this.stylingValue.height};
|
|
367
|
-
--emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
|
|
368
|
-
--emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
|
|
369
|
-
--emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
|
|
370
|
-
--emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
|
|
371
|
-
--emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
|
|
372
|
-
}
|
|
373
|
-
`;
|
|
374
|
-
break;
|
|
375
|
-
case 'rectangle':
|
|
376
|
-
styleBlock = `
|
|
377
|
-
:host {
|
|
378
|
-
--emw-skeleton-rectangle-width: ${this.stylingValue.width};
|
|
379
|
-
--emw-skeleton-rectangle-height: ${this.stylingValue.height};
|
|
380
|
-
--emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
|
|
381
|
-
--emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
|
|
382
|
-
--emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
|
|
383
|
-
--emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
|
|
384
|
-
--emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
|
|
385
|
-
}
|
|
386
|
-
`;
|
|
387
|
-
break;
|
|
388
|
-
case 'circle':
|
|
389
|
-
styleBlock = `
|
|
390
|
-
:host {
|
|
391
|
-
--emw-skeleton-circle-size: ${this.stylingValue.size};
|
|
392
|
-
}
|
|
393
|
-
`;
|
|
394
|
-
break;
|
|
395
|
-
default:
|
|
396
|
-
styleBlock = '';
|
|
397
|
-
}
|
|
398
|
-
return (index.h(index.Host, { key: 'e6b885bfd985ce7663d990756fe9101e25eb97f0' }, index.h("style", { key: '06ae24c7bb74f4dacfc12ae58085333f9dc89da5' }, styleBlock), this.handleStructure(this.structure)));
|
|
399
|
-
}
|
|
400
|
-
static get watchers() { return {
|
|
401
|
-
"structure": ["handleStructureChange"]
|
|
402
|
-
}; }
|
|
403
|
-
};
|
|
404
|
-
UiSkeleton.style = UiSkeletonStyle0;
|
|
405
|
-
|
|
406
|
-
exports.casino_challenges_list = casinoChallengesList.CasinoChallengeList;
|
|
407
|
-
exports.casino_challenge_card = CasinoChallengeCard;
|
|
408
|
-
exports.ui_skeleton = UiSkeleton;
|