@everymatrix/casino-engagement-suite-jackpot-details 1.0.69

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 (51) hide show
  1. package/dist/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.esm.js +1 -0
  2. package/dist/casino-engagement-suite-jackpot-details/index.esm.js +0 -0
  3. package/dist/casino-engagement-suite-jackpot-details/p-88902287.entry.js +1 -0
  4. package/dist/casino-engagement-suite-jackpot-details/p-98211c8b.entry.js +1 -0
  5. package/dist/casino-engagement-suite-jackpot-details/p-c7ee604a.js +2 -0
  6. package/dist/casino-engagement-suite-jackpot-details/p-e1255160.js +1 -0
  7. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  8. package/dist/cjs/casino-engagement-suite-jackpot-details.cjs.entry.js +390 -0
  9. package/dist/cjs/casino-engagement-suite-jackpot-details.cjs.js +25 -0
  10. package/dist/cjs/casino-engagement-suite-progress-bar.cjs.entry.js +71 -0
  11. package/dist/cjs/index-d83151b6.js +1331 -0
  12. package/dist/cjs/index.cjs.js +2 -0
  13. package/dist/cjs/loader.cjs.js +15 -0
  14. package/dist/collection/collection-manifest.json +19 -0
  15. package/dist/collection/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.css +374 -0
  16. package/dist/collection/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.js +472 -0
  17. package/dist/collection/components/casino-engagement-suite-jackpot-details/index.js +1 -0
  18. package/dist/collection/index.js +1 -0
  19. package/dist/collection/models/index.js +1 -0
  20. package/dist/collection/utils/index.js +5 -0
  21. package/dist/collection/utils/locale.utils.js +22 -0
  22. package/dist/collection/utils/utils.js +3 -0
  23. package/dist/esm/app-globals-0f993ce5.js +3 -0
  24. package/dist/esm/casino-engagement-suite-jackpot-details.entry.js +386 -0
  25. package/dist/esm/casino-engagement-suite-jackpot-details.js +20 -0
  26. package/dist/esm/casino-engagement-suite-progress-bar.entry.js +67 -0
  27. package/dist/esm/index-0237d1e2.js +1303 -0
  28. package/dist/esm/index.js +1 -0
  29. package/dist/esm/loader.js +11 -0
  30. package/dist/index.cjs.js +1 -0
  31. package/dist/index.js +1 -0
  32. package/dist/stencil.config.dev.js +17 -0
  33. package/dist/stencil.config.js +17 -0
  34. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/casino-engagement-suite-jackpot-details/.stencil/packages/stencil/casino-engagement-suite-jackpot-details/stencil.config.d.ts +2 -0
  35. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/casino-engagement-suite-jackpot-details/.stencil/packages/stencil/casino-engagement-suite-jackpot-details/stencil.config.dev.d.ts +2 -0
  36. package/dist/types/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.d.ts +92 -0
  37. package/dist/types/components/casino-engagement-suite-jackpot-details/index.d.ts +1 -0
  38. package/dist/types/components.d.ts +113 -0
  39. package/dist/types/index.d.ts +1 -0
  40. package/dist/types/models/index.d.ts +48 -0
  41. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  42. package/dist/types/utils/index.d.ts +1 -0
  43. package/dist/types/utils/locale.utils.d.ts +1 -0
  44. package/dist/types/utils/utils.d.ts +1 -0
  45. package/loader/cdn.js +1 -0
  46. package/loader/index.cjs.js +1 -0
  47. package/loader/index.d.ts +24 -0
  48. package/loader/index.es2017.js +1 -0
  49. package/loader/index.js +2 -0
  50. package/loader/package.json +11 -0
  51. package/package.json +29 -0
@@ -0,0 +1,472 @@
1
+ import { h } from "@stencil/core";
2
+ import { isBefore } from "date-fns";
3
+ import { translate } from "../../utils/locale.utils";
4
+ import "../../../../../casino-engagement-suite-progress-bar/dist/types/index";
5
+ import { formatBalance } from "../../utils";
6
+ export class CasinoEngagementSuiteJackpotDetails {
7
+ constructor() {
8
+ this.maxVisibleGames = 0;
9
+ this.handleTabChange = (e) => {
10
+ this.activeTab = +(e.target.getAttribute('data-index'));
11
+ this.visibleGames = [];
12
+ this.maxVisibleGames = 0;
13
+ };
14
+ this.handleLoadMore = () => {
15
+ this.visibleGames = this.jackpot.GamesInfo.slice(0, this.visibleGames.length + this.maxVisibleGames);
16
+ };
17
+ this.toggleShowDetails = () => {
18
+ this.showDetails = !this.showDetails;
19
+ };
20
+ this.toggleTooltip = () => {
21
+ this.showTooltip = !this.showTooltip;
22
+ };
23
+ this.setClientStyling = () => {
24
+ let sheet = document.createElement('style');
25
+ sheet.innerHTML = this.clientStyling;
26
+ this.host.prepend(sheet);
27
+ };
28
+ this.setClientStylingURL = () => {
29
+ let url = new URL(this.clientStylingUrl);
30
+ let cssFile = document.createElement('style');
31
+ fetch(url.href)
32
+ .then((res) => res.text())
33
+ .then((data) => {
34
+ cssFile.innerHTML = data;
35
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
36
+ })
37
+ .catch((err) => {
38
+ console.log('Error ', err);
39
+ });
40
+ };
41
+ this.handleCloseClick = () => {
42
+ this.close.emit();
43
+ };
44
+ this.handleBackClick = () => {
45
+ this.back.emit();
46
+ };
47
+ this.onGameClick = (ev) => {
48
+ const slug = ev.currentTarget.getAttribute('data-slug');
49
+ if (slug) {
50
+ window.postMessage({
51
+ type: 'EngagementSuiteGameRedirect',
52
+ data: {
53
+ Slug: slug
54
+ }
55
+ });
56
+ }
57
+ };
58
+ this.clientStyling = '';
59
+ this.clientStylingUrl = '';
60
+ this.jackpot = undefined;
61
+ this.jackpotChangeStatusRequest = undefined;
62
+ this.language = 'en';
63
+ this.gameSlug = '';
64
+ this.device = 'Mobile';
65
+ this.limitStylingAppends = false;
66
+ this.timer = '';
67
+ this.disabledStatus = '';
68
+ this.activeTab = 1;
69
+ this.visibleGames = [];
70
+ this.enabled = false;
71
+ this.balance = undefined;
72
+ this.winBalance = undefined;
73
+ this.showDetails = false;
74
+ this.jackpotEndTime = '';
75
+ this.showTooltip = false;
76
+ }
77
+ handleEvent(e) {
78
+ const { type, data } = e === null || e === void 0 ? void 0 : e.data;
79
+ switch (type) {
80
+ case 'UpdateJackpotStatus': {
81
+ const data = e.data.data;
82
+ if (this.jackpot.JackpotId === data.JackpotId) {
83
+ this.updateJackpotStatus(e.data.data);
84
+ }
85
+ break;
86
+ }
87
+ case 'JoinJackpotResult': {
88
+ const res = data;
89
+ if (res.Success && this.jackpot.JackpotId in res.JackpotIds) {
90
+ this.enabled = this.jackpot.Enabled = res.JackpotIds[this.jackpot.JackpotId];
91
+ }
92
+ break;
93
+ }
94
+ }
95
+ }
96
+ handleJackpotUpdate() {
97
+ this.balance = this.jackpot.Balance;
98
+ this.winBalance = this.jackpot.WinBalance;
99
+ }
100
+ handleResize() {
101
+ this.activeTab === 2 && this.setVisibleGames();
102
+ this.showTooltip = false;
103
+ }
104
+ componentWillLoad() {
105
+ this.enabled = this.jackpot.Enabled;
106
+ this.balance = this.jackpot.Balance;
107
+ this.winBalance = this.jackpot.WinBalance;
108
+ this.jackpotEndTime = this.jackpot.JackpotEndTime;
109
+ this.disabledStatus = this.jackpot.Reason || '';
110
+ this.startCountdown();
111
+ }
112
+ componentDidRender() {
113
+ if (!this.limitStylingAppends && this.host) {
114
+ if (this.clientStyling)
115
+ this.setClientStyling();
116
+ if (this.clientStylingUrl)
117
+ this.setClientStylingURL();
118
+ this.limitStylingAppends = true;
119
+ }
120
+ if (this.activeTab === 2 && !this.maxVisibleGames) {
121
+ this.setVisibleGames();
122
+ }
123
+ }
124
+ disconnectedCallback() {
125
+ this.clearInterval();
126
+ }
127
+ clearInterval() {
128
+ if (this.interval) {
129
+ clearInterval(this.interval);
130
+ this.interval = null;
131
+ }
132
+ }
133
+ setVisibleGames() {
134
+ const gap = this.device === 'Mobile' ? 10 : 12;
135
+ const gamesPerRow = this.device === 'Mobile' ? 4 : 5;
136
+ const availableWidth = this.gamesListWrapperEl.offsetWidth - (gap * (gamesPerRow - 1));
137
+ const gameElWidth = availableWidth / gamesPerRow;
138
+ const gameElHeight = (gameElWidth / 74 * 40) + gap;
139
+ this.maxVisibleGames = Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight / gameElHeight) * gamesPerRow, gamesPerRow);
140
+ this.visibleGames = this.jackpot.GamesInfo.slice(0, this.maxVisibleGames);
141
+ }
142
+ updateJackpotStatus(event) {
143
+ if (event.IsClosed) {
144
+ this.clearInterval();
145
+ this.disabledStatus = event.Reason;
146
+ this.activeTab = 1;
147
+ }
148
+ else {
149
+ this.disabledStatus = '';
150
+ this.jackpotEndTime = event.JackpotEndTime;
151
+ this.startCountdown();
152
+ }
153
+ }
154
+ getTopNavigationTemplate() {
155
+ return (h("div", { class: "JackpotDetailsNavigation" }, h("button", { class: "JackpotIconButton", onClick: this.handleBackClick }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/back.svg", alt: "back" })), h("div", { class: "JackpotPopupName" }, translate('jackpots', this.language)), h("button", { class: "JackpotIconButton", onClick: this.handleCloseClick }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "close" }))));
156
+ }
157
+ getJackpotBalance() {
158
+ return formatBalance(this.balance, this.jackpot.Currency);
159
+ }
160
+ getJoinButtonClasses() {
161
+ return {
162
+ PopupButton: true,
163
+ Active: this.enabled,
164
+ Loading: this.jackpot.Pending
165
+ };
166
+ }
167
+ getJackpotDetailsHeaderTemplate() {
168
+ const joinButtonDisabled = isBefore(new Date(this.jackpot.JackpotEndTime), new Date()) || !!this.disabledStatus;
169
+ return (h("div", { class: "JackpotDetailsHeader" }, h("div", null, h("div", { class: "JackpotType" }, this.jackpot.Type), h("div", { class: "JackpotBalance" }, this.getJackpotBalance())), h("div", { class: "JackpotDetailsHeaderSecondCol" }, h("button", { disabled: joinButtonDisabled, onClick: this.jackpotChangeStatusRequest, class: this.getJoinButtonClasses(), "data-id": this.jackpot.JackpotId }, this.enabled
170
+ ? translate('unjoin', this.language)
171
+ : translate('join', this.language)), !!this.winBalance && h("div", { class: "JackpotIsWon" }, translate('jackpotIsWon', this.language)))));
172
+ }
173
+ getTabsTemplate() {
174
+ return h("div", { class: "JackpotDetailsTabs" }, h("div", { "data-index": "1", onClick: this.handleTabChange, class: `JackpotDetailsTab ${this.activeTab === 1 ? 'Active' : ''}` }, translate('info', this.language)), h("div", { "data-index": "2", onClick: this.handleTabChange, class: `JackpotDetailsTab ${this.activeTab === 2 ? 'Active' : ''}` }, translate('games', this.language)));
175
+ }
176
+ getTabsContentTemplate() {
177
+ return this.activeTab === 1
178
+ ? this.getJackpotInfoTemplate()
179
+ : this.getGamesTemplate();
180
+ }
181
+ getJackpotDetailsTemplate() {
182
+ return h("div", null, h("div", { class: "JackpotDetailsButton", onClick: this.toggleShowDetails }, h("div", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), h("span", null, translate('jackpotDetails', this.language))), this.showDetails && h("div", { class: "JackpotDetailsContent" }, this.jackpot.Description && h("p", { class: "JackpotDescription" }, this.jackpot.Description), this.jackpot.JackpotRulesUrl && h("a", { class: "TermsAndConditions", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl))));
183
+ }
184
+ getBetLimitsRange() {
185
+ var _a, _b, _c, _d;
186
+ if (this.jackpot.BetLimits) {
187
+ const playerCurrency = this.jackpot.Currency;
188
+ const betCurrencies = Object.keys(this.jackpot.BetLimits);
189
+ const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
190
+ const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
191
+ const showMinBet = this.jackpot.BetLimits && !!((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
192
+ const showMaxBet = this.jackpot.BetLimits && !!((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
193
+ const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
194
+ const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
195
+ return h("div", null, showMinBet && h("div", { class: "JackpotInfoItem" }, translate('minBet', this.language), ":\u00A0", h("span", null, formattedMinBet)), showMaxBet && h("div", { class: "JackpotInfoItem" }, translate('maxBet', this.language), ":\u00A0", h("span", null, formattedMaxBet)));
196
+ }
197
+ }
198
+ getJackpotInfoTemplate() {
199
+ const showDetails = !!(this.jackpot.Description || this.jackpot.JackpotRulesUrl);
200
+ return h("div", { class: "JackpotInfoTabContent" }, showDetails && this.getJackpotDetailsTemplate(), h("div", { class: "JackpotInfo" }, h("div", { class: "JackpotInfoItem" }, translate('betContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.ContributionPercent, "%")), h("div", { class: "JackpotInfoItem" }, translate('type', this.language), ":\u00A0", h("span", null, this.jackpot.JackpotTypePresentation)), h("div", { class: "JackpotInfoItem" }, translate('winningProbability', this.language), ":\u00A0", h("span", null, "1:", this.jackpot.Probability)), h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.OperatorContributionPercent, "%"), h("button", { class: "JackpotContributionTooltipButton", onClick: this.toggleTooltip })), this.getBetLimitsRange()));
201
+ }
202
+ getGamesTemplate() {
203
+ const list = this.visibleGames.map((game) => {
204
+ return h("div", { onClick: this.onGameClick, class: `JackpotGamesListItem ${game.GameSlug === this.gameSlug ? 'Disabled' : ''}`, key: game.CasinoGameId, "data-slug": game.GameSlug, style: { background: `center / cover url(${game.GameIcon}) no-repeat` }, title: game.GameName });
205
+ });
206
+ return [
207
+ h("div", { class: "JackpotGamesListWrapper", ref: el => this.gamesListWrapperEl = el }, h("div", { class: "JackpotGamesList" }, list)),
208
+ this.visibleGames.length < this.jackpot.GamesInfo.length
209
+ ? h("button", { class: "PopupButton Active JackpotGamesButton", onClick: this.handleLoadMore }, translate('loadMore', this.language))
210
+ : ''
211
+ ];
212
+ }
213
+ getJackpotCountdown() {
214
+ const timerMessage = translate(this.disabledStatus, this.language) || this.timer;
215
+ return (h("div", { class: `JackpotCountdown ${this.disabledStatus ? 'Suspended' : ''}` }, timerMessage));
216
+ }
217
+ startCountdown() {
218
+ this.updateTimer();
219
+ this.interval = setInterval(() => {
220
+ this.updateTimer();
221
+ }, 1000);
222
+ }
223
+ updateTimer() {
224
+ const expirationTime = new Date(this.jackpotEndTime).getTime();
225
+ const now = new Date().getTime();
226
+ const distance = expirationTime - now;
227
+ if (distance < 1) {
228
+ this.clearInterval();
229
+ return;
230
+ }
231
+ const { days, hours, minutes, seconds } = {
232
+ days: String(Math.floor(distance / (1000 * 60 * 60 * 24))).padStart(2, '0'),
233
+ hours: String(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
234
+ minutes: String(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
235
+ seconds: String(Math.floor((distance % (1000 * 60)) / 1000)).padStart(2, '0')
236
+ };
237
+ this.timer = days === '00'
238
+ ? `${hours}h:${minutes}m:${seconds}s`
239
+ : `${days}d:${hours}h:${minutes}m`;
240
+ }
241
+ getPopupClasses() {
242
+ return {
243
+ JackpotDetailsPopup: true,
244
+ Disabled: !!this.disabledStatus || isBefore(new Date(this.jackpot.JackpotEndTime), new Date()),
245
+ [this.device]: true,
246
+ [this.jackpot.Type.charAt(0).toUpperCase() + this.jackpot.Type.slice(1)]: true
247
+ };
248
+ }
249
+ getTooltipTemplate() {
250
+ return (h("div", { class: "JackpotsTooltipBackdrop" }, h("div", { class: "JackpotsTooltip" }, h("button", { class: "JackpotsIconButton", onClick: this.toggleTooltip }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close tooltip" })), translate('contributionTooltip', this.language))));
251
+ }
252
+ render() {
253
+ return h("div", { key: '1588370db82c0c7d4118fce75e60cb2e1204c9f3', class: this.getPopupClasses() }, this.getTopNavigationTemplate(), h("div", { key: '320b03501c86164369fc715590cfbbfa6dc8bf3e', class: "JackpotDetailsPopupContent" }, this.getJackpotDetailsHeaderTemplate(), this.getJackpotCountdown(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.showTooltip && this.getTooltipTemplate()));
254
+ }
255
+ static get is() { return "casino-engagement-suite-jackpot-details"; }
256
+ static get encapsulation() { return "shadow"; }
257
+ static get originalStyleUrls() {
258
+ return {
259
+ "$": ["casino-engagement-suite-jackpot-details.scss"]
260
+ };
261
+ }
262
+ static get styleUrls() {
263
+ return {
264
+ "$": ["casino-engagement-suite-jackpot-details.css"]
265
+ };
266
+ }
267
+ static get properties() {
268
+ return {
269
+ "clientStyling": {
270
+ "type": "string",
271
+ "mutable": false,
272
+ "complexType": {
273
+ "original": "string",
274
+ "resolved": "string",
275
+ "references": {}
276
+ },
277
+ "required": false,
278
+ "optional": false,
279
+ "docs": {
280
+ "tags": [],
281
+ "text": "Client custom styling via string"
282
+ },
283
+ "attribute": "client-styling",
284
+ "reflect": true,
285
+ "defaultValue": "''"
286
+ },
287
+ "clientStylingUrl": {
288
+ "type": "string",
289
+ "mutable": false,
290
+ "complexType": {
291
+ "original": "string",
292
+ "resolved": "string",
293
+ "references": {}
294
+ },
295
+ "required": false,
296
+ "optional": false,
297
+ "docs": {
298
+ "tags": [],
299
+ "text": "Client custom styling via url"
300
+ },
301
+ "attribute": "client-styling-url",
302
+ "reflect": true,
303
+ "defaultValue": "''"
304
+ },
305
+ "jackpot": {
306
+ "type": "unknown",
307
+ "mutable": false,
308
+ "complexType": {
309
+ "original": "Jackpot",
310
+ "resolved": "Jackpot",
311
+ "references": {
312
+ "Jackpot": {
313
+ "location": "import",
314
+ "path": "../../models",
315
+ "id": "../../../../packages/stencil/casino-engagement-suite-jackpot-details/src/models/index.ts::Jackpot"
316
+ }
317
+ }
318
+ },
319
+ "required": false,
320
+ "optional": false,
321
+ "docs": {
322
+ "tags": [],
323
+ "text": "Selected jackpot"
324
+ }
325
+ },
326
+ "jackpotChangeStatusRequest": {
327
+ "type": "unknown",
328
+ "mutable": true,
329
+ "complexType": {
330
+ "original": "(event: MouseEvent) => void",
331
+ "resolved": "(event: MouseEvent) => void",
332
+ "references": {
333
+ "MouseEvent": {
334
+ "location": "global",
335
+ "id": "global::MouseEvent"
336
+ }
337
+ }
338
+ },
339
+ "required": false,
340
+ "optional": false,
341
+ "docs": {
342
+ "tags": [],
343
+ "text": "Change jackpot status"
344
+ }
345
+ },
346
+ "language": {
347
+ "type": "string",
348
+ "mutable": false,
349
+ "complexType": {
350
+ "original": "string",
351
+ "resolved": "string",
352
+ "references": {}
353
+ },
354
+ "required": false,
355
+ "optional": false,
356
+ "docs": {
357
+ "tags": [],
358
+ "text": "Language of the widget"
359
+ },
360
+ "attribute": "language",
361
+ "reflect": false,
362
+ "defaultValue": "'en'"
363
+ },
364
+ "gameSlug": {
365
+ "type": "string",
366
+ "mutable": false,
367
+ "complexType": {
368
+ "original": "string",
369
+ "resolved": "string",
370
+ "references": {}
371
+ },
372
+ "required": false,
373
+ "optional": false,
374
+ "docs": {
375
+ "tags": [],
376
+ "text": "Current game slug"
377
+ },
378
+ "attribute": "game-slug",
379
+ "reflect": false,
380
+ "defaultValue": "''"
381
+ },
382
+ "device": {
383
+ "type": "string",
384
+ "mutable": false,
385
+ "complexType": {
386
+ "original": "\"Mobile\" | \"Tablet\" | \"Desktop\"",
387
+ "resolved": "\"Desktop\" | \"Mobile\" | \"Tablet\"",
388
+ "references": {}
389
+ },
390
+ "required": false,
391
+ "optional": false,
392
+ "docs": {
393
+ "tags": [],
394
+ "text": "User's device type"
395
+ },
396
+ "attribute": "device",
397
+ "reflect": false,
398
+ "defaultValue": "'Mobile' as 'Mobile' | 'Tablet' | 'Desktop'"
399
+ }
400
+ };
401
+ }
402
+ static get states() {
403
+ return {
404
+ "limitStylingAppends": {},
405
+ "timer": {},
406
+ "disabledStatus": {},
407
+ "activeTab": {},
408
+ "visibleGames": {},
409
+ "enabled": {},
410
+ "balance": {},
411
+ "winBalance": {},
412
+ "showDetails": {},
413
+ "jackpotEndTime": {},
414
+ "showTooltip": {}
415
+ };
416
+ }
417
+ static get events() {
418
+ return [{
419
+ "method": "close",
420
+ "name": "close",
421
+ "bubbles": true,
422
+ "cancelable": true,
423
+ "composed": true,
424
+ "docs": {
425
+ "tags": [],
426
+ "text": ""
427
+ },
428
+ "complexType": {
429
+ "original": "void",
430
+ "resolved": "void",
431
+ "references": {}
432
+ }
433
+ }, {
434
+ "method": "back",
435
+ "name": "back",
436
+ "bubbles": true,
437
+ "cancelable": true,
438
+ "composed": true,
439
+ "docs": {
440
+ "tags": [],
441
+ "text": ""
442
+ },
443
+ "complexType": {
444
+ "original": "void",
445
+ "resolved": "void",
446
+ "references": {}
447
+ }
448
+ }];
449
+ }
450
+ static get elementRef() { return "host"; }
451
+ static get watchers() {
452
+ return [{
453
+ "propName": "jackpot",
454
+ "methodName": "handleJackpotUpdate"
455
+ }];
456
+ }
457
+ static get listeners() {
458
+ return [{
459
+ "name": "message",
460
+ "method": "handleEvent",
461
+ "target": "window",
462
+ "capture": false,
463
+ "passive": false
464
+ }, {
465
+ "name": "resize",
466
+ "method": "handleResize",
467
+ "target": "window",
468
+ "capture": false,
469
+ "passive": true
470
+ }];
471
+ }
472
+ }
@@ -0,0 +1 @@
1
+ export { CasinoEngagementSuiteJackpotDetails } from './casino-engagement-suite-jackpot-details';
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export function formatBalance(amount, currency, maxAmount = 99999999) {
2
+ amount = Math.min(amount, maxAmount);
3
+ return `${currency} ${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
4
+ .format(amount)}`;
5
+ }
@@ -0,0 +1,22 @@
1
+ const DEFAULT_LANGUAGE = 'en';
2
+ const SUPPORTED_LANGUAGES = ['en'];
3
+ const TRANSLATIONS = {
4
+ en: {
5
+ jackpots: 'Jackpots',
6
+ join: 'Join',
7
+ unjoin: 'Unjoin',
8
+ info: 'Info',
9
+ games: 'Games',
10
+ operatorContribution: 'Operator Contribution',
11
+ type: 'Type',
12
+ winningProbability: 'Winning Probability',
13
+ tc: 'Terms & Conditions',
14
+ jackpotIsWon: 'Jackpot’s won!',
15
+ loadMore: 'Load More',
16
+ jackpotDetails: 'Jackpot Details',
17
+ }
18
+ };
19
+ export const translate = (key, customLang) => {
20
+ const lang = customLang;
21
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
22
+ };
@@ -0,0 +1,3 @@
1
+ export function format(first, middle, last) {
2
+ return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
3
+ }
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };