@everymatrix/casino-engagement-suite-bar 1.52.6 → 1.53.10

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.
@@ -5,6 +5,48 @@ import { initialLeaderboardState } from "../../models";
5
5
  import { translate } from "../../utils/locale.utils";
6
6
  export class CasinoEngagementSuiteBar {
7
7
  constructor() {
8
+ /**
9
+ * Highlight Challenge tile
10
+ */
11
+ this.highlightChallenge = false;
12
+ /**
13
+ * Client custom styling via string
14
+ */
15
+ this.clientStyling = '';
16
+ /**
17
+ * Client custom styling via url
18
+ */
19
+ this.clientStylingUrl = '';
20
+ /**
21
+ * Orientation of the widget
22
+ */
23
+ this.orientation = 'Landscape';
24
+ /**
25
+ * User's device type
26
+ */
27
+ this.device = 'Mobile';
28
+ /**
29
+ * Show challenge label
30
+ */
31
+ this.isChallengeLabel = false;
32
+ /**
33
+ * Show forfeited challenge label
34
+ */
35
+ this.isForfeitedChallengeLabel = false;
36
+ /**
37
+ * Show spins forfeited label
38
+ */
39
+ this.isSpinForfeitedLabel = false;
40
+ /**
41
+ * Language of the widget
42
+ */
43
+ this.language = 'en';
44
+ this.jackpots = [];
45
+ // todo: hardcoded (waiting for GLC integration)
46
+ this.remainingLuckywheels = '1';
47
+ this.limitStylingAppends = false;
48
+ this.activeJackpot = '';
49
+ this.leaderboardState = initialLeaderboardState;
8
50
  this.handleTileClick = (ev) => {
9
51
  const application = ev.target.getAttribute('data-app');
10
52
  window.postMessage({ type: `Bar${application}Click` });
@@ -31,23 +73,6 @@ export class CasinoEngagementSuiteBar {
31
73
  console.log('Error ', err);
32
74
  });
33
75
  };
34
- this.activeWidget = undefined;
35
- this.challengePercent = undefined;
36
- this.highlightChallenge = false;
37
- this.clientStyling = '';
38
- this.clientStylingUrl = '';
39
- this.orientation = 'Landscape';
40
- this.device = 'Mobile';
41
- this.isChallengeLabel = false;
42
- this.isForfeitedChallengeLabel = false;
43
- this.isSpinForfeitedLabel = false;
44
- this.language = 'en';
45
- this.jackpots = [];
46
- this.remainingFreeSpins = undefined;
47
- this.leaderboards = undefined;
48
- this.limitStylingAppends = false;
49
- this.activeJackpot = '';
50
- this.leaderboardState = initialLeaderboardState;
51
76
  }
52
77
  handleEvent(e) {
53
78
  const _a = e === null || e === void 0 ? void 0 : e.data, { type } = _a, rest = __rest(_a, ["type"]);
@@ -86,6 +111,9 @@ export class CasinoEngagementSuiteBar {
86
111
  getFreeSpinsTile() {
87
112
  return (h("button", { class: `Tile Reward FreeSpins ${this.activeWidget === 'FreeSpins' ? 'Active' : ''}`, "data-app": "FreeSpins", onClick: this.handleTileClick }, h("div", { class: "RewardIcon" }), h("span", null, this.remainingFreeSpins), h("div", { class: `ForfeitLabel ${this.isSpinForfeitedLabel ? 'ShowForfeitLabel' : ''}` }, h("span", null))));
88
113
  }
114
+ getLuckyWheelTile() {
115
+ return (h("button", { class: `Tile Reward Luckywheel ${this.activeWidget === 'LuckyWheels' ? 'Active' : ''}`, "data-app": "LuckyWheels", onClick: this.handleTileClick }, h("div", { class: "RewardIcon" }), h("span", null, this.remainingLuckywheels)));
116
+ }
89
117
  getJackpotClasses(jackpot) {
90
118
  return {
91
119
  Tile: true,
@@ -111,11 +139,11 @@ export class CasinoEngagementSuiteBar {
111
139
  }
112
140
  getTilesTemplate() {
113
141
  return this.displayTilesInOneRow()
114
- ? h("div", { class: "EngagementSuiteContainer" }, !!this.jackpots.length && this.getJackpotsTemplate(), this.leaderboards && this.getLeaderboardsTile(), this.challengePercent && this.getChallengeTile(), this.remainingFreeSpins && this.getFreeSpinsTile())
115
- : h("div", { class: "EngagementSuiteContainer" }, h("div", { class: "Jackpots" }, !!this.jackpots.length && this.getJackpotsTemplate()), h("div", { class: "Rewards" }, this.leaderboards && this.getLeaderboardsTile(), this.challengePercent && this.getChallengeTile(), this.remainingFreeSpins && this.getFreeSpinsTile()));
142
+ ? h("div", { class: "EngagementSuiteContainer" }, !!this.jackpots.length && this.getJackpotsTemplate(), this.leaderboards && this.getLeaderboardsTile(), this.remainingLuckywheels && this.getLuckyWheelTile(), this.challengePercent && this.getChallengeTile(), this.remainingFreeSpins && this.getFreeSpinsTile())
143
+ : h("div", { class: "EngagementSuiteContainer" }, h("div", { class: "Jackpots" }, !!this.jackpots.length && this.getJackpotsTemplate()), h("div", { class: "Rewards" }, this.leaderboards && this.getLeaderboardsTile(), this.remainingLuckywheels && this.getLuckyWheelTile(), this.challengePercent && this.getChallengeTile(), this.remainingFreeSpins && this.getFreeSpinsTile()));
116
144
  }
117
145
  render() {
118
- return h("div", { key: '17eccdcded345b7e7507e427657566f900199b58', class: `CasinoEngagementSuiteBar ${this.orientation} ${this.device}`, ref: (el) => (this.engagementSuiteBar = el) }, this.getTilesTemplate());
146
+ return h("div", { key: 'd932ee7e636f06b0c50841a4737cb6572c1500aa', class: `CasinoEngagementSuiteBar ${this.orientation} ${this.device}`, ref: (el) => (this.engagementSuiteBar = el) }, this.getTilesTemplate());
119
147
  }
120
148
  static get is() { return "casino-engagement-suite-bar"; }
121
149
  static get encapsulation() { return "shadow"; }
@@ -145,6 +173,8 @@ export class CasinoEngagementSuiteBar {
145
173
  "tags": [],
146
174
  "text": "Highlight active widget"
147
175
  },
176
+ "getter": false,
177
+ "setter": false,
148
178
  "attribute": "active-widget",
149
179
  "reflect": true
150
180
  },
@@ -162,6 +192,8 @@ export class CasinoEngagementSuiteBar {
162
192
  "tags": [],
163
193
  "text": "The Challenge Percent"
164
194
  },
195
+ "getter": false,
196
+ "setter": false,
165
197
  "attribute": "challenge-percent",
166
198
  "reflect": false
167
199
  },
@@ -179,6 +211,8 @@ export class CasinoEngagementSuiteBar {
179
211
  "tags": [],
180
212
  "text": "Highlight Challenge tile"
181
213
  },
214
+ "getter": false,
215
+ "setter": false,
182
216
  "attribute": "highlight-challenge",
183
217
  "reflect": false,
184
218
  "defaultValue": "false"
@@ -197,6 +231,8 @@ export class CasinoEngagementSuiteBar {
197
231
  "tags": [],
198
232
  "text": "Client custom styling via string"
199
233
  },
234
+ "getter": false,
235
+ "setter": false,
200
236
  "attribute": "client-styling",
201
237
  "reflect": true,
202
238
  "defaultValue": "''"
@@ -215,6 +251,8 @@ export class CasinoEngagementSuiteBar {
215
251
  "tags": [],
216
252
  "text": "Client custom styling via url"
217
253
  },
254
+ "getter": false,
255
+ "setter": false,
218
256
  "attribute": "client-styling-url",
219
257
  "reflect": true,
220
258
  "defaultValue": "''"
@@ -233,6 +271,8 @@ export class CasinoEngagementSuiteBar {
233
271
  "tags": [],
234
272
  "text": "Orientation of the widget"
235
273
  },
274
+ "getter": false,
275
+ "setter": false,
236
276
  "attribute": "orientation",
237
277
  "reflect": false,
238
278
  "defaultValue": "'Landscape' as 'Landscape' | 'Portrait'"
@@ -251,6 +291,8 @@ export class CasinoEngagementSuiteBar {
251
291
  "tags": [],
252
292
  "text": "User's device type"
253
293
  },
294
+ "getter": false,
295
+ "setter": false,
254
296
  "attribute": "device",
255
297
  "reflect": false,
256
298
  "defaultValue": "'Mobile' as 'Mobile' | 'Tablet' | 'Desktop'"
@@ -269,6 +311,8 @@ export class CasinoEngagementSuiteBar {
269
311
  "tags": [],
270
312
  "text": "Show challenge label"
271
313
  },
314
+ "getter": false,
315
+ "setter": false,
272
316
  "attribute": "is-challenge-label",
273
317
  "reflect": false,
274
318
  "defaultValue": "false"
@@ -287,6 +331,8 @@ export class CasinoEngagementSuiteBar {
287
331
  "tags": [],
288
332
  "text": "Show forfeited challenge label"
289
333
  },
334
+ "getter": false,
335
+ "setter": false,
290
336
  "attribute": "is-forfeited-challenge-label",
291
337
  "reflect": false,
292
338
  "defaultValue": "false"
@@ -305,6 +351,8 @@ export class CasinoEngagementSuiteBar {
305
351
  "tags": [],
306
352
  "text": "Show spins forfeited label"
307
353
  },
354
+ "getter": false,
355
+ "setter": false,
308
356
  "attribute": "is-spin-forfeited-label",
309
357
  "reflect": false,
310
358
  "defaultValue": "false"
@@ -323,6 +371,8 @@ export class CasinoEngagementSuiteBar {
323
371
  "tags": [],
324
372
  "text": "Language of the widget"
325
373
  },
374
+ "getter": false,
375
+ "setter": false,
326
376
  "attribute": "language",
327
377
  "reflect": false,
328
378
  "defaultValue": "'en'"
@@ -347,6 +397,8 @@ export class CasinoEngagementSuiteBar {
347
397
  "tags": [],
348
398
  "text": ""
349
399
  },
400
+ "getter": false,
401
+ "setter": false,
350
402
  "defaultValue": "[] as Array<Jackpot>"
351
403
  },
352
404
  "remainingFreeSpins": {
@@ -363,9 +415,31 @@ export class CasinoEngagementSuiteBar {
363
415
  "tags": [],
364
416
  "text": ""
365
417
  },
418
+ "getter": false,
419
+ "setter": false,
366
420
  "attribute": "remaining-free-spins",
367
421
  "reflect": false
368
422
  },
423
+ "remainingLuckywheels": {
424
+ "type": "string",
425
+ "mutable": false,
426
+ "complexType": {
427
+ "original": "string",
428
+ "resolved": "string",
429
+ "references": {}
430
+ },
431
+ "required": false,
432
+ "optional": false,
433
+ "docs": {
434
+ "tags": [],
435
+ "text": ""
436
+ },
437
+ "getter": false,
438
+ "setter": false,
439
+ "attribute": "remaining-luckywheels",
440
+ "reflect": false,
441
+ "defaultValue": "'1'"
442
+ },
369
443
  "leaderboards": {
370
444
  "type": "unknown",
371
445
  "mutable": false,
@@ -389,7 +463,9 @@ export class CasinoEngagementSuiteBar {
389
463
  "docs": {
390
464
  "tags": [],
391
465
  "text": ""
392
- }
466
+ },
467
+ "getter": false,
468
+ "setter": false
393
469
  }
394
470
  };
395
471
  }
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-fa9a5454.js';
1
+ import { r as registerInstance, h } from './index-fd88d82e.js';
2
2
 
3
3
  /******************************************************************************
4
4
  Copyright (c) Microsoft Corporation.
@@ -62,6 +62,48 @@ const CasinoEngagementSuiteBarStyle0 = casinoEngagementSuiteBarCss;
62
62
  const CasinoEngagementSuiteBar = class {
63
63
  constructor(hostRef) {
64
64
  registerInstance(this, hostRef);
65
+ /**
66
+ * Highlight Challenge tile
67
+ */
68
+ this.highlightChallenge = false;
69
+ /**
70
+ * Client custom styling via string
71
+ */
72
+ this.clientStyling = '';
73
+ /**
74
+ * Client custom styling via url
75
+ */
76
+ this.clientStylingUrl = '';
77
+ /**
78
+ * Orientation of the widget
79
+ */
80
+ this.orientation = 'Landscape';
81
+ /**
82
+ * User's device type
83
+ */
84
+ this.device = 'Mobile';
85
+ /**
86
+ * Show challenge label
87
+ */
88
+ this.isChallengeLabel = false;
89
+ /**
90
+ * Show forfeited challenge label
91
+ */
92
+ this.isForfeitedChallengeLabel = false;
93
+ /**
94
+ * Show spins forfeited label
95
+ */
96
+ this.isSpinForfeitedLabel = false;
97
+ /**
98
+ * Language of the widget
99
+ */
100
+ this.language = 'en';
101
+ this.jackpots = [];
102
+ // todo: hardcoded (waiting for GLC integration)
103
+ this.remainingLuckywheels = '1';
104
+ this.limitStylingAppends = false;
105
+ this.activeJackpot = '';
106
+ this.leaderboardState = initialLeaderboardState;
65
107
  this.handleTileClick = (ev) => {
66
108
  const application = ev.target.getAttribute('data-app');
67
109
  window.postMessage({ type: `Bar${application}Click` });
@@ -88,23 +130,6 @@ const CasinoEngagementSuiteBar = class {
88
130
  console.log('Error ', err);
89
131
  });
90
132
  };
91
- this.activeWidget = undefined;
92
- this.challengePercent = undefined;
93
- this.highlightChallenge = false;
94
- this.clientStyling = '';
95
- this.clientStylingUrl = '';
96
- this.orientation = 'Landscape';
97
- this.device = 'Mobile';
98
- this.isChallengeLabel = false;
99
- this.isForfeitedChallengeLabel = false;
100
- this.isSpinForfeitedLabel = false;
101
- this.language = 'en';
102
- this.jackpots = [];
103
- this.remainingFreeSpins = undefined;
104
- this.leaderboards = undefined;
105
- this.limitStylingAppends = false;
106
- this.activeJackpot = '';
107
- this.leaderboardState = initialLeaderboardState;
108
133
  }
109
134
  handleEvent(e) {
110
135
  const _a = e === null || e === void 0 ? void 0 : e.data, { type } = _a, rest = __rest(_a, ["type"]);
@@ -142,6 +167,9 @@ const CasinoEngagementSuiteBar = class {
142
167
  getFreeSpinsTile() {
143
168
  return (h("button", { class: `Tile Reward FreeSpins ${this.activeWidget === 'FreeSpins' ? 'Active' : ''}`, "data-app": "FreeSpins", onClick: this.handleTileClick }, h("div", { class: "RewardIcon" }), h("span", null, this.remainingFreeSpins), h("div", { class: `ForfeitLabel ${this.isSpinForfeitedLabel ? 'ShowForfeitLabel' : ''}` }, h("span", null))));
144
169
  }
170
+ getLuckyWheelTile() {
171
+ return (h("button", { class: `Tile Reward Luckywheel ${this.activeWidget === 'LuckyWheels' ? 'Active' : ''}`, "data-app": "LuckyWheels", onClick: this.handleTileClick }, h("div", { class: "RewardIcon" }), h("span", null, this.remainingLuckywheels)));
172
+ }
145
173
  getJackpotClasses(jackpot) {
146
174
  return {
147
175
  Tile: true,
@@ -167,11 +195,11 @@ const CasinoEngagementSuiteBar = class {
167
195
  }
168
196
  getTilesTemplate() {
169
197
  return this.displayTilesInOneRow()
170
- ? h("div", { class: "EngagementSuiteContainer" }, !!this.jackpots.length && this.getJackpotsTemplate(), this.leaderboards && this.getLeaderboardsTile(), this.challengePercent && this.getChallengeTile(), this.remainingFreeSpins && this.getFreeSpinsTile())
171
- : h("div", { class: "EngagementSuiteContainer" }, h("div", { class: "Jackpots" }, !!this.jackpots.length && this.getJackpotsTemplate()), h("div", { class: "Rewards" }, this.leaderboards && this.getLeaderboardsTile(), this.challengePercent && this.getChallengeTile(), this.remainingFreeSpins && this.getFreeSpinsTile()));
198
+ ? h("div", { class: "EngagementSuiteContainer" }, !!this.jackpots.length && this.getJackpotsTemplate(), this.leaderboards && this.getLeaderboardsTile(), this.remainingLuckywheels && this.getLuckyWheelTile(), this.challengePercent && this.getChallengeTile(), this.remainingFreeSpins && this.getFreeSpinsTile())
199
+ : h("div", { class: "EngagementSuiteContainer" }, h("div", { class: "Jackpots" }, !!this.jackpots.length && this.getJackpotsTemplate()), h("div", { class: "Rewards" }, this.leaderboards && this.getLeaderboardsTile(), this.remainingLuckywheels && this.getLuckyWheelTile(), this.challengePercent && this.getChallengeTile(), this.remainingFreeSpins && this.getFreeSpinsTile()));
172
200
  }
173
201
  render() {
174
- return h("div", { key: '17eccdcded345b7e7507e427657566f900199b58', class: `CasinoEngagementSuiteBar ${this.orientation} ${this.device}`, ref: (el) => (this.engagementSuiteBar = el) }, this.getTilesTemplate());
202
+ return h("div", { key: 'd932ee7e636f06b0c50841a4737cb6572c1500aa', class: `CasinoEngagementSuiteBar ${this.orientation} ${this.device}`, ref: (el) => (this.engagementSuiteBar = el) }, this.getTilesTemplate());
175
203
  }
176
204
  };
177
205
  CasinoEngagementSuiteBar.style = CasinoEngagementSuiteBarStyle0;
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-fa9a5454.js';
2
- export { s as setNonce } from './index-fa9a5454.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-fd88d82e.js';
2
+ export { s as setNonce } from './index-fd88d82e.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  var patchBrowser = () => {
9
9
  const importMeta = import.meta.url;
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["casino-engagement-suite-bar",[[1,"casino-engagement-suite-bar",{"activeWidget":[1537,"active-widget"],"challengePercent":[1,"challenge-percent"],"highlightChallenge":[4,"highlight-challenge"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"orientation":[1],"device":[1],"isChallengeLabel":[4,"is-challenge-label"],"isForfeitedChallengeLabel":[4,"is-forfeited-challenge-label"],"isSpinForfeitedLabel":[1028,"is-spin-forfeited-label"],"language":[1],"jackpots":[16],"remainingFreeSpins":[1,"remaining-free-spins"],"leaderboards":[16],"limitStylingAppends":[32],"activeJackpot":[32],"leaderboardState":[32]},[[8,"message","handleEvent"]]]]]], options);
19
+ return bootstrapLazy([["casino-engagement-suite-bar",[[1,"casino-engagement-suite-bar",{"activeWidget":[1537,"active-widget"],"challengePercent":[1,"challenge-percent"],"highlightChallenge":[4,"highlight-challenge"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"orientation":[1],"device":[1],"isChallengeLabel":[4,"is-challenge-label"],"isForfeitedChallengeLabel":[4,"is-forfeited-challenge-label"],"isSpinForfeitedLabel":[1028,"is-spin-forfeited-label"],"language":[1],"jackpots":[16],"remainingFreeSpins":[1,"remaining-free-spins"],"remainingLuckywheels":[1,"remaining-luckywheels"],"leaderboards":[16],"limitStylingAppends":[32],"activeJackpot":[32],"leaderboardState":[32]},[[8,"message","handleEvent"]]]]]], options);
20
20
  });