@everymatrix/bonus-powerups-ingame-list 0.0.32 → 0.0.34

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 (24) hide show
  1. package/dist/bonus-powerups-ingame-list/active-confirm-modal_3.entry.js +1 -1
  2. package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list-9d11db33.js +3 -0
  3. package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list.esm.js +1 -1
  4. package/dist/bonus-powerups-ingame-list/index.esm.js +1 -1
  5. package/dist/cjs/active-confirm-modal_3.cjs.entry.js +8 -9
  6. package/dist/cjs/{bonus-powerups-ingame-list-db296f5c.js → bonus-powerups-ingame-list-3f8f6d31.js} +37 -12
  7. package/dist/cjs/bonus-powerups-ingame-list.cjs.js +1 -1
  8. package/dist/cjs/index.cjs.js +1 -1
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/collection/components/active-confirm-modal/active-confirm-modal.component.js +6 -6
  11. package/dist/collection/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.js +74 -13
  12. package/dist/collection/components/time-count/time-count.js +4 -5
  13. package/dist/collection/utils/locale.utils.js +2 -0
  14. package/dist/esm/active-confirm-modal_3.entry.js +9 -10
  15. package/dist/esm/{bonus-powerups-ingame-list-01fff0bc.js → bonus-powerups-ingame-list-9d11db33.js} +37 -12
  16. package/dist/esm/bonus-powerups-ingame-list.js +1 -1
  17. package/dist/esm/index.js +1 -1
  18. package/dist/esm/loader.js +1 -1
  19. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/libs/common/src/types/casino/powerups.d.ts +3 -2
  20. package/dist/types/components/active-confirm-modal/active-confirm-modal.component.d.ts +1 -1
  21. package/dist/types/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.d.ts +4 -1
  22. package/dist/types/components.d.ts +6 -2
  23. package/package.json +1 -1
  24. package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list-01fff0bc.js +0 -3
@@ -13,6 +13,7 @@ import moment from "moment";
13
13
  export class BonusPowerupsIngameList {
14
14
  constructor() {
15
15
  this.mbSource = undefined;
16
+ this.gameId = undefined;
16
17
  this.clientStyling = undefined;
17
18
  this.clientStylingUrl = undefined;
18
19
  this.translationUrl = undefined;
@@ -20,6 +21,7 @@ export class BonusPowerupsIngameList {
20
21
  this.endpoint = undefined;
21
22
  this.session = undefined;
22
23
  this.limit = 30;
24
+ this.showFullList = false;
23
25
  this.isLoading = false;
24
26
  this.isActivating = false;
25
27
  this.powerups = [];
@@ -27,9 +29,13 @@ export class BonusPowerupsIngameList {
27
29
  this.isPowering = false;
28
30
  this.showConfirmModal = false;
29
31
  this.currentPowerup = undefined;
32
+ this.validPowerIds = [];
30
33
  this.debouncedReload = debounce(this.reloadPowerups, 100);
31
34
  }
32
- reloadPowerupsHandler() {
35
+ reloadPowerupsHandler(e) {
36
+ var _a, _b;
37
+ this.showFullList = ((_a = e.detail) === null || _a === void 0 ? void 0 : _a.showFullList) || false;
38
+ this.validPowerIds = ((_b = e.detail) === null || _b === void 0 ? void 0 : _b.validPowerIds) || [];
33
39
  this.reloadPowerups();
34
40
  }
35
41
  activePowerupHandler(e) {
@@ -72,6 +78,9 @@ export class BonusPowerupsIngameList {
72
78
  method: 'GET',
73
79
  signal: this.abortController.signal
74
80
  };
81
+ if (!this.showFullList) {
82
+ url.searchParams.append('filter', `gameId=${this.gameId}`);
83
+ }
75
84
  Object.entries(powerUpWithoutGamesSearchConditions).forEach(([key, value]) => {
76
85
  url.searchParams.append(key, value);
77
86
  });
@@ -83,9 +92,14 @@ export class BonusPowerupsIngameList {
83
92
  }
84
93
  const { data, total } = await response.json();
85
94
  this.powerups = [...this.powerups, ...data];
86
- this.total = total;
87
95
  this.isPowering = this.powerups.filter(e => e.status === PowerUpStatus.ACTIVATED).length > 0;
88
- this.powerupsLoadEvent.emit({ powerups: this.powerups, total });
96
+ this.powerups.forEach(powerUp => {
97
+ powerUp.isValidForCurrentGame = !this.isPowering || this.validPowerIds.indexOf(powerUp.powerUpID) > -1;
98
+ });
99
+ this.total = total;
100
+ if (!this.showFullList) {
101
+ this.powerupsLoadEvent.emit({ powerups: this.powerups, total });
102
+ }
89
103
  }
90
104
  catch (error) {
91
105
  if (error.name !== 'AbortError') {
@@ -149,8 +163,11 @@ export class BonusPowerupsIngameList {
149
163
  this.powerups[activedIdx] = Object.assign({}, powerUp);
150
164
  this.powerups = [...this.powerups];
151
165
  this.isPowering = true;
152
- this.reloadPowerups();
153
166
  }
167
+ else {
168
+ console.error(res.errorMessage);
169
+ }
170
+ this.reloadPowerups();
154
171
  }
155
172
  catch (e) {
156
173
  console.error(e);
@@ -161,14 +178,17 @@ export class BonusPowerupsIngameList {
161
178
  }
162
179
  }
163
180
  }
181
+ //Close Current List
164
182
  onClose() {
183
+ this.showFullList = false;
165
184
  this.closePowerupsEvent.emit({ powerups: this.powerups });
166
185
  }
167
- showDetail(id) {
168
- this.showDetailsEvent.emit({ id });
186
+ showDetail(powerup) {
187
+ powerup.isValidForCurrentGame = !this.isPowering && this.validPowerIds.indexOf(powerup.powerUpID) > -1;
188
+ this.showDetailsEvent.emit({ id: powerup.id, powerup });
169
189
  }
170
190
  onActiveBtnClick(powerup) {
171
- if (this.isPowering || this.isActivating) {
191
+ if (this.isPowering || this.isActivating || !powerup.isValidForCurrentGame) {
172
192
  return;
173
193
  }
174
194
  this.currentPowerup = powerup;
@@ -181,18 +201,20 @@ export class BonusPowerupsIngameList {
181
201
  }
182
202
  render() {
183
203
  var _a;
184
- return (h("div", { key: '755e95625116000407991e3349c2f896335515a0', class: 'IngamePowerUpsContainer', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'c0bf175b4af979d505014ef1d92ff6f9c2bf7b3f', class: `TopBar ${this.showConfirmModal ? 'Hidden' : ''}` }, h("span", { key: 'e46b6e4f52170d857bedf55837b60fb471b61e0d', class: 'BarTitle' }, translate('powerups', this.language)), h("div", { key: 'c69769c036192c91410363a14c70648625cabbe8', class: 'IconBtn CircleLinearBorder', onClick: this.onClose.bind(this), innerHTML: CloseSvg })), this.isLoading && this.powerups.length === 0
204
+ return (h("div", { key: 'd0879d4b0b824e936e2844a0ad5ad47fcb5fcf2f', class: 'IngamePowerUpsContainer', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '5d6468c19f4b05ded25e90db61cb388e48b28bd6', class: `TopBar ${this.showConfirmModal ? 'Hidden' : ''}` }, h("span", { key: 'abbf48114af53a3a322ea2d28aa06c075f94ca22', class: 'BarTitle' }, translate('powerups', this.language)), h("div", { key: '03da4df138bf94d8b1867808a5ab2f38c7862eee', class: 'IconBtn CircleLinearBorder', onClick: this.onClose.bind(this), innerHTML: CloseSvg })), this.isLoading && this.powerups.length === 0
185
205
  ? h("smart-loader", null)
186
206
  : h("div", { class: `Cards ${this.showConfirmModal ? 'Hidden' : ''}` }, this.isPowering &&
187
207
  h("div", { class: 'Card PoweringDesc' }, h("div", { class: 'FlexRow' }, h("div", { class: 'Icon', innerHTML: InfoSvg }), h("div", { class: 'Text' }, translate('poweringTooltip', this.language)))), this.powerups.map((powerup, index) => {
188
208
  const isLastItem = index === this.powerups.length - 1;
189
- return (h("div", { class: `Card ${powerup.status === PowerUpStatus.ACTIVATED ? 'Actived' : ''}`, ref: isLastItem ? (el) => (this.lastItemElement = el) : null }, h("div", { class: 'PowerupTitle FlexRow' }, h("div", { class: 'LeftOfRow' }, h("div", { class: 'EnergyIcon', innerHTML: EnergySvg }), h("div", { class: 'Name' }, powerup.powerUpName)), h("div", { class: 'DetailIcon', onClick: this.showDetail.bind(this, powerup.id) }, h("div", { class: 'IconBtn CircleLinearBorder', innerHTML: DetailArrow }))), h("div", { class: `ExpireTime Status CircleLinearBorder` }, powerup.status === PowerUpStatus.ACTIVATED
209
+ return (h("div", { class: `Card ${powerup.status === PowerUpStatus.ACTIVATED ? 'Actived' : ''}`, ref: isLastItem ? (el) => (this.lastItemElement = el) : null }, h("div", { class: 'PowerupTitle FlexRow' }, h("div", { class: 'LeftOfRow' }, h("div", { class: 'EnergyIcon', innerHTML: EnergySvg }), h("div", { class: 'Name' }, powerup.powerUpName)), h("div", { class: 'DetailIcon', onClick: this.showDetail.bind(this, powerup) }, h("div", { class: 'IconBtn CircleLinearBorder', innerHTML: DetailArrow }))), h("div", { class: `ExpireTime Status CircleLinearBorder` }, powerup.status === PowerUpStatus.ACTIVATED
190
210
  ?
191
211
  h("time-count", { "in-progress": true, mode: powerup.boostingPeriod.mode, "left-rounds": (powerup.boostingPeriod.numberOfRounds || 0) - (powerup.usedNumberOfRounds || 0), language: this.language, "expire-time": getActivedExpireTime(powerup) })
192
212
  :
193
- h("time-count", { language: this.language, mode: powerup.boostingPeriod.mode, "expire-time": powerup.expireTime })), h("div", { class: 'MultiplierInfo FlexRow' }, h("div", { class: 'LeftOfRow' }, h("div", { class: 'MultiplierIcon', innerHTML: FireSvg }), h("div", { class: 'MultiplierValue' }, powerup.multiplier.coefficient, "x "), h("div", { class: 'MultiplierMode' }, powerup.multiplier.mode === MultiplierMode.COINS ? translate('coins', this.language) : translate('xp', this.language)), h("div", { class: 'MultiplierIcon', innerHTML: ClockSvg }), h("div", { class: 'MultiplierValue' }, powerup.boostingPeriod[powerup.boostingPeriod.mode === BoostingPeriodMode.NUMBER_OF_ROUNDS ? 'numberOfRounds' : 'minutes']), h("div", { class: 'MultiplierMode' }, powerup.boostingPeriod.mode === BoostingPeriodMode.NUMBER_OF_ROUNDS ? translate('rounds', this.language) : translate('minutes', this.language))), (powerup.status === PowerUpStatus.ACTIVE || powerup.status === PowerUpStatus.ACTIVATING) &&
194
- h("div", { class: `ActiveBtn CircleLinearBorder ${this.isPowering ? 'Disabled' : ''} ${this.isActivating ? 'Activating' : ''}`, onClick: () => this.onActiveBtnClick(powerup) }, h("div", { class: 'content' }, " ", translate('activate', this.language))))));
195
- }), this.isLoading && this.powerups.length > 0 && h("smart-loader", null)), h("active-confirm-modal", { key: '4c94dfcd5865ee4fb41791a4e69b33dfc1dd7be0', "is-open": this.showConfirmModal, "powerup-id": (_a = this.currentPowerup) === null || _a === void 0 ? void 0 : _a.id, language: this.language })));
213
+ h("time-count", { language: this.language, mode: powerup.boostingPeriod.mode, "expire-time": powerup.expireTime })), h("div", { class: 'MultiplierInfo FlexRow' }, h("div", { class: 'LeftOfRow' }, h("div", { class: 'MultiplierIcon', innerHTML: FireSvg }), h("div", { class: 'MultiplierValue' }, powerup.multiplier.coefficient, "x "), h("div", { class: 'MultiplierMode' }, powerup.multiplier.mode === MultiplierMode.COINS ? translate('coins', this.language) : translate('xp', this.language)), h("div", { class: 'MultiplierIcon', innerHTML: ClockSvg }), h("div", { class: 'MultiplierValue' }, powerup.boostingPeriod[powerup.boostingPeriod.mode === BoostingPeriodMode.NUMBER_OF_ROUNDS ? 'numberOfRounds' : 'minutes']), h("div", { class: 'MultiplierMode' }, powerup.boostingPeriod.mode === BoostingPeriodMode.NUMBER_OF_ROUNDS
214
+ ? translate(powerup.boostingPeriod.numberOfRounds > 1 ? 'rounds' : 'round', this.language)
215
+ : translate('minutes', this.language))), (powerup.status === PowerUpStatus.ACTIVE || powerup.status === PowerUpStatus.ACTIVATING) &&
216
+ h("div", { class: `ActiveBtn CircleLinearBorder ${this.isPowering || !powerup.isValidForCurrentGame ? 'Disabled' : ''} ${this.isActivating ? 'Activating' : ''}`, onClick: () => this.onActiveBtnClick(powerup) }, h("div", { class: 'content' }, " ", translate('activate', this.language))))));
217
+ }), this.isLoading && this.powerups.length > 0 && h("smart-loader", null)), h("active-confirm-modal", { key: '3e58eceec850abeeb700e0beed48d9167e1a9485', "is-open": this.showConfirmModal, pid: (_a = this.currentPowerup) === null || _a === void 0 ? void 0 : _a.id, language: this.language })));
196
218
  }
197
219
  handleClientStylingChange(newValue, oldValue) {
198
220
  if (newValue != oldValue) {
@@ -269,6 +291,23 @@ export class BonusPowerupsIngameList {
269
291
  "attribute": "mb-source",
270
292
  "reflect": true
271
293
  },
294
+ "gameId": {
295
+ "type": "string",
296
+ "mutable": false,
297
+ "complexType": {
298
+ "original": "string",
299
+ "resolved": "string",
300
+ "references": {}
301
+ },
302
+ "required": false,
303
+ "optional": false,
304
+ "docs": {
305
+ "tags": [],
306
+ "text": ""
307
+ },
308
+ "attribute": "game-id",
309
+ "reflect": true
310
+ },
272
311
  "clientStyling": {
273
312
  "type": "string",
274
313
  "mutable": false,
@@ -389,6 +428,24 @@ export class BonusPowerupsIngameList {
389
428
  "attribute": "limit",
390
429
  "reflect": true,
391
430
  "defaultValue": "30"
431
+ },
432
+ "showFullList": {
433
+ "type": "boolean",
434
+ "mutable": true,
435
+ "complexType": {
436
+ "original": "boolean",
437
+ "resolved": "boolean",
438
+ "references": {}
439
+ },
440
+ "required": false,
441
+ "optional": false,
442
+ "docs": {
443
+ "tags": [],
444
+ "text": ""
445
+ },
446
+ "attribute": "show-full-list",
447
+ "reflect": true,
448
+ "defaultValue": "false"
392
449
  }
393
450
  };
394
451
  }
@@ -400,7 +457,8 @@ export class BonusPowerupsIngameList {
400
457
  "total": {},
401
458
  "isPowering": {},
402
459
  "showConfirmModal": {},
403
- "currentPowerup": {}
460
+ "currentPowerup": {},
461
+ "validPowerIds": {}
404
462
  };
405
463
  }
406
464
  static get events() {
@@ -464,6 +522,9 @@ export class BonusPowerupsIngameList {
464
522
  }, {
465
523
  "propName": "language",
466
524
  "methodName": "handleConfigChange"
525
+ }, {
526
+ "propName": "showFullList",
527
+ "methodName": "loadData"
467
528
  }, {
468
529
  "propName": "clientStyling",
469
530
  "methodName": "handleClientStylingChange"
@@ -61,7 +61,7 @@ export class TimeCount {
61
61
  this.displayTime = `${Math.floor(duration.asDays())} ${translate('days', this.language)}`;
62
62
  }
63
63
  else if (hours >= 24) {
64
- this.displayTime = '1 day';
64
+ this.displayTime = `1 ${translate('day', this.language)}`;
65
65
  }
66
66
  else {
67
67
  const h = hours;
@@ -73,11 +73,10 @@ export class TimeCount {
73
73
  render() {
74
74
  return [
75
75
  this.inProgress &&
76
- h("div", { key: '28ad398a10a6d917d62178b308660228a8e6909c', class: 'InprogressLabel' }, h("span", { key: 'b1717807c6ab470e9aaa9ae820179aed18821c56', class: 'Icon' }), translate('inProgress', this.language)),
77
- this.isExpireInDay1 &&
78
- h("span", { key: '8113731d28d1ab0df026f61557b1e35f0ea96f53', class: 'Label' }, translate(this.inProgress ? 'endsIn' : 'expiresIn', this.language), " "),
76
+ h("div", { key: '353e5035808ab07ab05947089117cda17cc00865', class: 'InprogressLabel' }, h("span", { key: 'b199da400374669838bcfec1e83952494ffcfdbd', class: 'Icon' }), translate('inProgress', this.language)),
77
+ h("span", { key: 'fad67125de31a5e9f0394afcc693a206b98bbd8b', class: 'Label' }, translate(this.inProgress ? 'endsIn' : 'expiresIn', this.language), " "),
79
78
  this.inProgress && this.mode === BoostingPeriodMode.NUMBER_OF_ROUNDS
80
- ? h("span", { class: 'TimeCountDown' }, this.leftRounds, " ", translate('rounds', this.language))
79
+ ? h("span", { class: 'TimeCountDown' }, this.leftRounds, " ", translate(this.leftRounds > 1 ? 'rounds' : 'round', this.language))
81
80
  : h("span", { class: 'TimeCountDown' }, this.displayTime)
82
81
  ];
83
82
  }
@@ -11,6 +11,8 @@ const TRANSLATIONS = {
11
11
  minutes: 'min',
12
12
  rounds: 'Rounds',
13
13
  days: 'Days',
14
+ round: 'Round',
15
+ day: 'Day',
14
16
  nothingHere: 'Nothing here -- yet!',
15
17
  noPowerUps: 'No power-ups have been used at the moment.',
16
18
  poweringTooltip: 'Power-ups are currently unavailable as you have already activated one power-up. Only one power-up can be active at a time.',
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-e015b33d.js';
2
- import { t as translate, C as CloseSvg, a as BoostingPeriodMode, h as hooks } from './bonus-powerups-ingame-list-01fff0bc.js';
3
- export { B as bonus_powerups_ingame_list } from './bonus-powerups-ingame-list-01fff0bc.js';
2
+ import { t as translate, C as CloseSvg, a as BoostingPeriodMode, h as hooks } from './bonus-powerups-ingame-list-9d11db33.js';
3
+ export { B as bonus_powerups_ingame_list } from './bonus-powerups-ingame-list-9d11db33.js';
4
4
 
5
5
  const activeConfirmModalCss = ".ModalContainer{position:absolute;top:calc(50% - 200px);left:0;width:calc(100% - 120px);margin:40px;max-width:400px;height:260px;text-align:center;padding:20px;display:flex;gap:30px;flex-direction:column;border:1px solid var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0784313725));transition:opacity 200ms ease-in-out;opacity:1;background:var(--emw--ingame-color-black40, rgba(9, 9, 9, 0.5019607843));border-radius:20px;backdrop-filter:blur(22.9411773682px);justify-content:flex-start}.ModalContainer.Hidden{opacity:0 !important}.ModalContainer.Shown .TopBar{justify-content:flex-end;padding:0px}.ModalContainer .Title{font-weight:bold;font-size:1.2rem}.ModalContainer .Btns{display:flex;justify-content:space-evenly}.ModalContainer .PowupBtn{background:linear-gradient(49deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.1019607843)) 33.61%, var(--emw--ingame-color-white50, rgba(255, 255, 255, 0.1019607843)) 89.19%);border:1px solid rgba(70, 69, 69, 0.5);border-radius:10px;padding:5px 15px;color:var(--emw--color-powup-light-green, #00FA5A);font-weight:bold;cursor:pointer}.ModalContainer .PowupBtn.Active{background:var(--emw--color-powup-light-green, #00FA5A);box-shadow:0px 0px 6px 10px var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.1019607843));color:#0A0A17}";
6
6
  const ActiveConfirmModalStyle0 = activeConfirmModalCss;
@@ -9,19 +9,19 @@ const ActiveConfirmModal = class {
9
9
  constructor(hostRef) {
10
10
  registerInstance(this, hostRef);
11
11
  this.activePowerupEvent = createEvent(this, "activePowerupEvent", 7);
12
- this.powerupId = undefined;
12
+ this.pid = undefined;
13
13
  this.language = 'en';
14
14
  this.isOpen = undefined;
15
15
  }
16
16
  activeNow() {
17
- this.closeModal(this.powerupId);
17
+ this.closeModal(this.pid);
18
18
  }
19
19
  closeModal(id) {
20
20
  this.isOpen = false;
21
21
  this.activePowerupEvent.emit({ id });
22
22
  }
23
23
  render() {
24
- return h("div", { key: '68efb916139aa66bb559ece109864e2241f096c5', class: `ModalContainer ${this.isOpen ? 'Shown' : 'Hidden'}` }, h("div", { key: '55f46fa812d04c10cb35807aeaa9dd6701b9b6d9', class: 'TopBar' }, h("div", { key: '7daafa1b57f421052aecc6c64cadc8b4d439646a', class: 'IconBtn CircleLinearBorder', onClick: () => this.closeModal(), innerHTML: CloseSvg })), h("div", { key: 'cbb64eff123333949155bccf6856e674b93f412e', class: 'Title' }, translate('activeTitle', this.language)), h("div", { key: '69b64ab2f9809d0ca222e29d4157f76bd11cb9f4', class: 'ActivePowerupContent' }, translate("activeContent", this.language)), h("div", { key: 'fb2b80ab2ffbf16446de273744094e0e3c38ba69', class: 'Btns' }, h("div", { key: '6f421ad422d76ef2a6a8ec3b8096c32f001ace44', class: 'LaterBtn PowupBtn', onClick: () => this.closeModal() }, " ", translate('later', this.language), " "), h("div", { key: '22ac06fefcc50356616b5c16817833e2973ab3bb', class: 'Active PowupBtn', onClick: () => this.activeNow() }, " ", translate('activateNow', this.language), " ")));
24
+ return h("div", { key: '25543e4f879bca50c5e718b30111c6787126179e', class: `ModalContainer ${this.isOpen ? 'Shown' : 'Hidden'}` }, h("div", { key: 'f12ee04cdeca841d85e96ad9dd9dbd485401849f', class: 'TopBar' }, h("div", { key: '94d650f1068fce10dad3a03d66d12c1c649b4595', class: 'IconBtn CircleLinearBorder', onClick: () => this.closeModal(), innerHTML: CloseSvg })), h("div", { key: '4fc473ba99f996a08885666ea72c838c3bde9a5a', class: 'Title' }, translate('activeTitle', this.language)), h("div", { key: 'bc2c939de2a4caaa0a6042788d2bff0d93e142b9', class: 'ActivePowerupContent' }, translate("activeContent", this.language)), h("div", { key: '5cd6df02b0fe15fbc3c3e95e66c7f4936c21dce3', class: 'Btns' }, h("div", { key: '6e756a744fe6c60ef822b1629e4d586511f6136a', class: 'LaterBtn PowupBtn', onClick: () => this.closeModal() }, " ", translate('later', this.language), " "), h("div", { key: 'daa8c4e16befdd53551fb4760d8b5af4ad66b833', class: 'Active PowupBtn', onClick: () => this.activeNow() }, " ", translate('activateNow', this.language), " ")));
25
25
  }
26
26
  };
27
27
  ActiveConfirmModal.style = ActiveConfirmModalStyle0;
@@ -87,7 +87,7 @@ const TimeCount = class {
87
87
  this.displayTime = `${Math.floor(duration.asDays())} ${translate('days', this.language)}`;
88
88
  }
89
89
  else if (hours >= 24) {
90
- this.displayTime = '1 day';
90
+ this.displayTime = `1 ${translate('day', this.language)}`;
91
91
  }
92
92
  else {
93
93
  const h = hours;
@@ -99,11 +99,10 @@ const TimeCount = class {
99
99
  render() {
100
100
  return [
101
101
  this.inProgress &&
102
- h("div", { key: '28ad398a10a6d917d62178b308660228a8e6909c', class: 'InprogressLabel' }, h("span", { key: 'b1717807c6ab470e9aaa9ae820179aed18821c56', class: 'Icon' }), translate('inProgress', this.language)),
103
- this.isExpireInDay1 &&
104
- h("span", { key: '8113731d28d1ab0df026f61557b1e35f0ea96f53', class: 'Label' }, translate(this.inProgress ? 'endsIn' : 'expiresIn', this.language), " "),
102
+ h("div", { key: '353e5035808ab07ab05947089117cda17cc00865', class: 'InprogressLabel' }, h("span", { key: 'b199da400374669838bcfec1e83952494ffcfdbd', class: 'Icon' }), translate('inProgress', this.language)),
103
+ h("span", { key: 'fad67125de31a5e9f0394afcc693a206b98bbd8b', class: 'Label' }, translate(this.inProgress ? 'endsIn' : 'expiresIn', this.language), " "),
105
104
  this.inProgress && this.mode === BoostingPeriodMode.NUMBER_OF_ROUNDS
106
- ? h("span", { class: 'TimeCountDown' }, this.leftRounds, " ", translate('rounds', this.language))
105
+ ? h("span", { class: 'TimeCountDown' }, this.leftRounds, " ", translate(this.leftRounds > 1 ? 'rounds' : 'round', this.language))
107
106
  : h("span", { class: 'TimeCountDown' }, this.displayTime)
108
107
  ];
109
108
  }
@@ -131,6 +131,8 @@ const TRANSLATIONS = {
131
131
  minutes: 'min',
132
132
  rounds: 'Rounds',
133
133
  days: 'Days',
134
+ round: 'Round',
135
+ day: 'Day',
134
136
  nothingHere: 'Nothing here -- yet!',
135
137
  noPowerUps: 'No power-ups have been used at the moment.',
136
138
  poweringTooltip: 'Power-ups are currently unavailable as you have already activated one power-up. Only one power-up can be active at a time.',
@@ -5940,6 +5942,7 @@ const BonusPowerupsIngameList = class {
5940
5942
  this.powerupsLoadEvent = createEvent(this, "powerupsLoad", 7);
5941
5943
  this.closePowerupsEvent = createEvent(this, "closePowerupsList", 7);
5942
5944
  this.mbSource = undefined;
5945
+ this.gameId = undefined;
5943
5946
  this.clientStyling = undefined;
5944
5947
  this.clientStylingUrl = undefined;
5945
5948
  this.translationUrl = undefined;
@@ -5947,6 +5950,7 @@ const BonusPowerupsIngameList = class {
5947
5950
  this.endpoint = undefined;
5948
5951
  this.session = undefined;
5949
5952
  this.limit = 30;
5953
+ this.showFullList = false;
5950
5954
  this.isLoading = false;
5951
5955
  this.isActivating = false;
5952
5956
  this.powerups = [];
@@ -5954,9 +5958,13 @@ const BonusPowerupsIngameList = class {
5954
5958
  this.isPowering = false;
5955
5959
  this.showConfirmModal = false;
5956
5960
  this.currentPowerup = undefined;
5961
+ this.validPowerIds = [];
5957
5962
  this.debouncedReload = debounce(this.reloadPowerups, 100);
5958
5963
  }
5959
- reloadPowerupsHandler() {
5964
+ reloadPowerupsHandler(e) {
5965
+ var _a, _b;
5966
+ this.showFullList = ((_a = e.detail) === null || _a === void 0 ? void 0 : _a.showFullList) || false;
5967
+ this.validPowerIds = ((_b = e.detail) === null || _b === void 0 ? void 0 : _b.validPowerIds) || [];
5960
5968
  this.reloadPowerups();
5961
5969
  }
5962
5970
  activePowerupHandler(e) {
@@ -5999,6 +6007,9 @@ const BonusPowerupsIngameList = class {
5999
6007
  method: 'GET',
6000
6008
  signal: this.abortController.signal
6001
6009
  };
6010
+ if (!this.showFullList) {
6011
+ url.searchParams.append('filter', `gameId=${this.gameId}`);
6012
+ }
6002
6013
  Object.entries(powerUpWithoutGamesSearchConditions).forEach(([key, value]) => {
6003
6014
  url.searchParams.append(key, value);
6004
6015
  });
@@ -6010,9 +6021,14 @@ const BonusPowerupsIngameList = class {
6010
6021
  }
6011
6022
  const { data, total } = await response.json();
6012
6023
  this.powerups = [...this.powerups, ...data];
6013
- this.total = total;
6014
6024
  this.isPowering = this.powerups.filter(e => e.status === PowerUpStatus.ACTIVATED).length > 0;
6015
- this.powerupsLoadEvent.emit({ powerups: this.powerups, total });
6025
+ this.powerups.forEach(powerUp => {
6026
+ powerUp.isValidForCurrentGame = !this.isPowering || this.validPowerIds.indexOf(powerUp.powerUpID) > -1;
6027
+ });
6028
+ this.total = total;
6029
+ if (!this.showFullList) {
6030
+ this.powerupsLoadEvent.emit({ powerups: this.powerups, total });
6031
+ }
6016
6032
  }
6017
6033
  catch (error) {
6018
6034
  if (error.name !== 'AbortError') {
@@ -6076,8 +6092,11 @@ const BonusPowerupsIngameList = class {
6076
6092
  this.powerups[activedIdx] = Object.assign({}, powerUp);
6077
6093
  this.powerups = [...this.powerups];
6078
6094
  this.isPowering = true;
6079
- this.reloadPowerups();
6080
6095
  }
6096
+ else {
6097
+ console.error(res.errorMessage);
6098
+ }
6099
+ this.reloadPowerups();
6081
6100
  }
6082
6101
  catch (e) {
6083
6102
  console.error(e);
@@ -6088,14 +6107,17 @@ const BonusPowerupsIngameList = class {
6088
6107
  }
6089
6108
  }
6090
6109
  }
6110
+ //Close Current List
6091
6111
  onClose() {
6112
+ this.showFullList = false;
6092
6113
  this.closePowerupsEvent.emit({ powerups: this.powerups });
6093
6114
  }
6094
- showDetail(id) {
6095
- this.showDetailsEvent.emit({ id });
6115
+ showDetail(powerup) {
6116
+ powerup.isValidForCurrentGame = !this.isPowering && this.validPowerIds.indexOf(powerup.powerUpID) > -1;
6117
+ this.showDetailsEvent.emit({ id: powerup.id, powerup });
6096
6118
  }
6097
6119
  onActiveBtnClick(powerup) {
6098
- if (this.isPowering || this.isActivating) {
6120
+ if (this.isPowering || this.isActivating || !powerup.isValidForCurrentGame) {
6099
6121
  return;
6100
6122
  }
6101
6123
  this.currentPowerup = powerup;
@@ -6108,18 +6130,20 @@ const BonusPowerupsIngameList = class {
6108
6130
  }
6109
6131
  render() {
6110
6132
  var _a;
6111
- return (h("div", { key: '755e95625116000407991e3349c2f896335515a0', class: 'IngamePowerUpsContainer', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'c0bf175b4af979d505014ef1d92ff6f9c2bf7b3f', class: `TopBar ${this.showConfirmModal ? 'Hidden' : ''}` }, h("span", { key: 'e46b6e4f52170d857bedf55837b60fb471b61e0d', class: 'BarTitle' }, translate('powerups', this.language)), h("div", { key: 'c69769c036192c91410363a14c70648625cabbe8', class: 'IconBtn CircleLinearBorder', onClick: this.onClose.bind(this), innerHTML: CloseSvg })), this.isLoading && this.powerups.length === 0
6133
+ return (h("div", { key: 'd0879d4b0b824e936e2844a0ad5ad47fcb5fcf2f', class: 'IngamePowerUpsContainer', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '5d6468c19f4b05ded25e90db61cb388e48b28bd6', class: `TopBar ${this.showConfirmModal ? 'Hidden' : ''}` }, h("span", { key: 'abbf48114af53a3a322ea2d28aa06c075f94ca22', class: 'BarTitle' }, translate('powerups', this.language)), h("div", { key: '03da4df138bf94d8b1867808a5ab2f38c7862eee', class: 'IconBtn CircleLinearBorder', onClick: this.onClose.bind(this), innerHTML: CloseSvg })), this.isLoading && this.powerups.length === 0
6112
6134
  ? h("smart-loader", null)
6113
6135
  : h("div", { class: `Cards ${this.showConfirmModal ? 'Hidden' : ''}` }, this.isPowering &&
6114
6136
  h("div", { class: 'Card PoweringDesc' }, h("div", { class: 'FlexRow' }, h("div", { class: 'Icon', innerHTML: InfoSvg }), h("div", { class: 'Text' }, translate('poweringTooltip', this.language)))), this.powerups.map((powerup, index) => {
6115
6137
  const isLastItem = index === this.powerups.length - 1;
6116
- return (h("div", { class: `Card ${powerup.status === PowerUpStatus.ACTIVATED ? 'Actived' : ''}`, ref: isLastItem ? (el) => (this.lastItemElement = el) : null }, h("div", { class: 'PowerupTitle FlexRow' }, h("div", { class: 'LeftOfRow' }, h("div", { class: 'EnergyIcon', innerHTML: EnergySvg }), h("div", { class: 'Name' }, powerup.powerUpName)), h("div", { class: 'DetailIcon', onClick: this.showDetail.bind(this, powerup.id) }, h("div", { class: 'IconBtn CircleLinearBorder', innerHTML: DetailArrow }))), h("div", { class: `ExpireTime Status CircleLinearBorder` }, powerup.status === PowerUpStatus.ACTIVATED
6138
+ return (h("div", { class: `Card ${powerup.status === PowerUpStatus.ACTIVATED ? 'Actived' : ''}`, ref: isLastItem ? (el) => (this.lastItemElement = el) : null }, h("div", { class: 'PowerupTitle FlexRow' }, h("div", { class: 'LeftOfRow' }, h("div", { class: 'EnergyIcon', innerHTML: EnergySvg }), h("div", { class: 'Name' }, powerup.powerUpName)), h("div", { class: 'DetailIcon', onClick: this.showDetail.bind(this, powerup) }, h("div", { class: 'IconBtn CircleLinearBorder', innerHTML: DetailArrow }))), h("div", { class: `ExpireTime Status CircleLinearBorder` }, powerup.status === PowerUpStatus.ACTIVATED
6117
6139
  ?
6118
6140
  h("time-count", { "in-progress": true, mode: powerup.boostingPeriod.mode, "left-rounds": (powerup.boostingPeriod.numberOfRounds || 0) - (powerup.usedNumberOfRounds || 0), language: this.language, "expire-time": getActivedExpireTime(powerup) })
6119
6141
  :
6120
- h("time-count", { language: this.language, mode: powerup.boostingPeriod.mode, "expire-time": powerup.expireTime })), h("div", { class: 'MultiplierInfo FlexRow' }, h("div", { class: 'LeftOfRow' }, h("div", { class: 'MultiplierIcon', innerHTML: FireSvg }), h("div", { class: 'MultiplierValue' }, powerup.multiplier.coefficient, "x "), h("div", { class: 'MultiplierMode' }, powerup.multiplier.mode === MultiplierMode.COINS ? translate('coins', this.language) : translate('xp', this.language)), h("div", { class: 'MultiplierIcon', innerHTML: ClockSvg }), h("div", { class: 'MultiplierValue' }, powerup.boostingPeriod[powerup.boostingPeriod.mode === BoostingPeriodMode.NUMBER_OF_ROUNDS ? 'numberOfRounds' : 'minutes']), h("div", { class: 'MultiplierMode' }, powerup.boostingPeriod.mode === BoostingPeriodMode.NUMBER_OF_ROUNDS ? translate('rounds', this.language) : translate('minutes', this.language))), (powerup.status === PowerUpStatus.ACTIVE || powerup.status === PowerUpStatus.ACTIVATING) &&
6121
- h("div", { class: `ActiveBtn CircleLinearBorder ${this.isPowering ? 'Disabled' : ''} ${this.isActivating ? 'Activating' : ''}`, onClick: () => this.onActiveBtnClick(powerup) }, h("div", { class: 'content' }, " ", translate('activate', this.language))))));
6122
- }), this.isLoading && this.powerups.length > 0 && h("smart-loader", null)), h("active-confirm-modal", { key: '4c94dfcd5865ee4fb41791a4e69b33dfc1dd7be0', "is-open": this.showConfirmModal, "powerup-id": (_a = this.currentPowerup) === null || _a === void 0 ? void 0 : _a.id, language: this.language })));
6142
+ h("time-count", { language: this.language, mode: powerup.boostingPeriod.mode, "expire-time": powerup.expireTime })), h("div", { class: 'MultiplierInfo FlexRow' }, h("div", { class: 'LeftOfRow' }, h("div", { class: 'MultiplierIcon', innerHTML: FireSvg }), h("div", { class: 'MultiplierValue' }, powerup.multiplier.coefficient, "x "), h("div", { class: 'MultiplierMode' }, powerup.multiplier.mode === MultiplierMode.COINS ? translate('coins', this.language) : translate('xp', this.language)), h("div", { class: 'MultiplierIcon', innerHTML: ClockSvg }), h("div", { class: 'MultiplierValue' }, powerup.boostingPeriod[powerup.boostingPeriod.mode === BoostingPeriodMode.NUMBER_OF_ROUNDS ? 'numberOfRounds' : 'minutes']), h("div", { class: 'MultiplierMode' }, powerup.boostingPeriod.mode === BoostingPeriodMode.NUMBER_OF_ROUNDS
6143
+ ? translate(powerup.boostingPeriod.numberOfRounds > 1 ? 'rounds' : 'round', this.language)
6144
+ : translate('minutes', this.language))), (powerup.status === PowerUpStatus.ACTIVE || powerup.status === PowerUpStatus.ACTIVATING) &&
6145
+ h("div", { class: `ActiveBtn CircleLinearBorder ${this.isPowering || !powerup.isValidForCurrentGame ? 'Disabled' : ''} ${this.isActivating ? 'Activating' : ''}`, onClick: () => this.onActiveBtnClick(powerup) }, h("div", { class: 'content' }, " ", translate('activate', this.language))))));
6146
+ }), this.isLoading && this.powerups.length > 0 && h("smart-loader", null)), h("active-confirm-modal", { key: '3e58eceec850abeeb700e0beed48d9167e1a9485', "is-open": this.showConfirmModal, pid: (_a = this.currentPowerup) === null || _a === void 0 ? void 0 : _a.id, language: this.language })));
6123
6147
  }
6124
6148
  handleClientStylingChange(newValue, oldValue) {
6125
6149
  if (newValue != oldValue) {
@@ -6170,6 +6194,7 @@ const BonusPowerupsIngameList = class {
6170
6194
  "endpoint": ["handleConfigChange"],
6171
6195
  "limit": ["handleConfigChange"],
6172
6196
  "language": ["handleConfigChange"],
6197
+ "showFullList": ["loadData"],
6173
6198
  "clientStyling": ["handleClientStylingChange"],
6174
6199
  "clientStylingUrl": ["handleClientStylingUrlChange"],
6175
6200
  "mbSource": ["handleMbSourceChange"],
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["active-confirm-modal_3",[[1,"bonus-powerups-ingame-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"session":[513],"limit":[514],"isLoading":[32],"isActivating":[32],"powerups":[32],"total":[32],"isPowering":[32],"showConfirmModal":[32],"currentPowerup":[32]},[[16,"reloadPowerups","reloadPowerupsHandler"],[16,"activePowerupEvent","activePowerupHandler"],[0,"powerupTimeCountDown","powerupTimeCountDownHandler"]],{"session":["handleConfigChange"],"endpoint":["handleConfigChange"],"limit":["handleConfigChange"],"language":["handleConfigChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}],[0,"active-confirm-modal",{"powerupId":[1538,"powerup-id"],"language":[1537],"isOpen":[1540,"is-open"]}],[0,"time-count",{"expireTime":[513,"expire-time"],"language":[513],"mode":[513],"inProgress":[516,"in-progress"],"leftRounds":[514,"left-rounds"],"displayTime":[32],"isExpireInDay1":[32],"timeLeft":[32]},null,{"timeLeft":["timeLeftChanged"],"expireTime":["startTimeChanged"]}]]]], options);
19
+ return bootstrapLazy([["active-confirm-modal_3",[[1,"bonus-powerups-ingame-list",{"mbSource":[513,"mb-source"],"gameId":[513,"game-id"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"session":[513],"limit":[514],"showFullList":[1540,"show-full-list"],"isLoading":[32],"isActivating":[32],"powerups":[32],"total":[32],"isPowering":[32],"showConfirmModal":[32],"currentPowerup":[32],"validPowerIds":[32]},[[16,"reloadPowerups","reloadPowerupsHandler"],[16,"activePowerupEvent","activePowerupHandler"],[0,"powerupTimeCountDown","powerupTimeCountDownHandler"]],{"session":["handleConfigChange"],"endpoint":["handleConfigChange"],"limit":["handleConfigChange"],"language":["handleConfigChange"],"showFullList":["loadData"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}],[0,"active-confirm-modal",{"pid":[1538],"language":[1537],"isOpen":[1540,"is-open"]}],[0,"time-count",{"expireTime":[513,"expire-time"],"language":[513],"mode":[513],"inProgress":[516,"in-progress"],"leftRounds":[514,"left-rounds"],"displayTime":[32],"isExpireInDay1":[32],"timeLeft":[32]},null,{"timeLeft":["timeLeftChanged"],"expireTime":["startTimeChanged"]}]]]], options);
20
20
  });
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { B as BonusPowerupsIngameList } from './bonus-powerups-ingame-list-01fff0bc.js';
1
+ export { B as BonusPowerupsIngameList } from './bonus-powerups-ingame-list-9d11db33.js';
2
2
  import './index-e015b33d.js';
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["active-confirm-modal_3",[[1,"bonus-powerups-ingame-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"session":[513],"limit":[514],"isLoading":[32],"isActivating":[32],"powerups":[32],"total":[32],"isPowering":[32],"showConfirmModal":[32],"currentPowerup":[32]},[[16,"reloadPowerups","reloadPowerupsHandler"],[16,"activePowerupEvent","activePowerupHandler"],[0,"powerupTimeCountDown","powerupTimeCountDownHandler"]],{"session":["handleConfigChange"],"endpoint":["handleConfigChange"],"limit":["handleConfigChange"],"language":["handleConfigChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}],[0,"active-confirm-modal",{"powerupId":[1538,"powerup-id"],"language":[1537],"isOpen":[1540,"is-open"]}],[0,"time-count",{"expireTime":[513,"expire-time"],"language":[513],"mode":[513],"inProgress":[516,"in-progress"],"leftRounds":[514,"left-rounds"],"displayTime":[32],"isExpireInDay1":[32],"timeLeft":[32]},null,{"timeLeft":["timeLeftChanged"],"expireTime":["startTimeChanged"]}]]]], options);
8
+ return bootstrapLazy([["active-confirm-modal_3",[[1,"bonus-powerups-ingame-list",{"mbSource":[513,"mb-source"],"gameId":[513,"game-id"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"session":[513],"limit":[514],"showFullList":[1540,"show-full-list"],"isLoading":[32],"isActivating":[32],"powerups":[32],"total":[32],"isPowering":[32],"showConfirmModal":[32],"currentPowerup":[32],"validPowerIds":[32]},[[16,"reloadPowerups","reloadPowerupsHandler"],[16,"activePowerupEvent","activePowerupHandler"],[0,"powerupTimeCountDown","powerupTimeCountDownHandler"]],{"session":["handleConfigChange"],"endpoint":["handleConfigChange"],"limit":["handleConfigChange"],"language":["handleConfigChange"],"showFullList":["loadData"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}],[0,"active-confirm-modal",{"pid":[1538],"language":[1537],"isOpen":[1540,"is-open"]}],[0,"time-count",{"expireTime":[513,"expire-time"],"language":[513],"mode":[513],"inProgress":[516,"in-progress"],"leftRounds":[514,"left-rounds"],"displayTime":[32],"isExpireInDay1":[32],"timeLeft":[32]},null,{"timeLeft":["timeLeftChanged"],"expireTime":["startTimeChanged"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -29,7 +29,7 @@ export interface PowerUpTriggerMethod {
29
29
  reward?: {};
30
30
  }
31
31
  export interface PowerUp {
32
- id: string;
32
+ id: number;
33
33
  version: number;
34
34
  domainID: number;
35
35
  status: PowerUpStatus | number;
@@ -44,7 +44,7 @@ export interface PowerUp {
44
44
  modified: string;
45
45
  universalID: string;
46
46
  ins?: string;
47
- powerUpID?: number;
47
+ powerUpID?: string;
48
48
  powerUpName?: string;
49
49
  currentTime?: string;
50
50
  expireTime?: string;
@@ -53,6 +53,7 @@ export interface PowerUp {
53
53
  termsUrl: string;
54
54
  games: PowerUpGames;
55
55
  usedNumberOfRounds?: number;
56
+ isValidForCurrentGame?: boolean;
56
57
  }
57
58
  export type PowerUpGames = {
58
59
  total: number;
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  export declare class ActiveConfirmModal {
3
- powerupId: number;
3
+ pid: number;
4
4
  language: string;
5
5
  isOpen: boolean;
6
6
  activePowerupEvent: EventEmitter;
@@ -2,6 +2,7 @@ import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import { PowerUp } from "../../../../../../libs/common/src/types/casino/powerups";
3
3
  export declare class BonusPowerupsIngameList {
4
4
  mbSource: string;
5
+ gameId: string;
5
6
  clientStyling: string;
6
7
  clientStylingUrl: string;
7
8
  translationUrl: string;
@@ -9,6 +10,7 @@ export declare class BonusPowerupsIngameList {
9
10
  endpoint: string;
10
11
  session: string;
11
12
  limit: number;
13
+ showFullList: boolean;
12
14
  isLoading: boolean;
13
15
  isActivating: boolean;
14
16
  powerups: PowerUp[];
@@ -16,6 +18,7 @@ export declare class BonusPowerupsIngameList {
16
18
  isPowering: boolean;
17
19
  showConfirmModal: boolean;
18
20
  currentPowerup: PowerUp;
21
+ validPowerIds: string[];
19
22
  showDetailsEvent: EventEmitter;
20
23
  powerupsLoadEvent: EventEmitter;
21
24
  closePowerupsEvent: EventEmitter;
@@ -26,7 +29,7 @@ export declare class BonusPowerupsIngameList {
26
29
  private lastItemElement;
27
30
  private debouncedReload;
28
31
  constructor();
29
- reloadPowerupsHandler(): void;
32
+ reloadPowerupsHandler(e: any): void;
30
33
  activePowerupHandler(e: any): void;
31
34
  powerupTimeCountDownHandler(e: any): void;
32
35
  private reloadPowerups;
@@ -9,16 +9,18 @@ export namespace Components {
9
9
  interface ActiveConfirmModal {
10
10
  "isOpen": boolean;
11
11
  "language": string;
12
- "powerupId": number;
12
+ "pid": number;
13
13
  }
14
14
  interface BonusPowerupsIngameList {
15
15
  "clientStyling": string;
16
16
  "clientStylingUrl": string;
17
17
  "endpoint": string;
18
+ "gameId": string;
18
19
  "language": string;
19
20
  "limit": number;
20
21
  "mbSource": string;
21
22
  "session": string;
23
+ "showFullList": boolean;
22
24
  "translationUrl": string;
23
25
  }
24
26
  interface TimeCount {
@@ -106,12 +108,13 @@ declare namespace LocalJSX {
106
108
  "isOpen"?: boolean;
107
109
  "language"?: string;
108
110
  "onActivePowerupEvent"?: (event: ActiveConfirmModalCustomEvent<any>) => void;
109
- "powerupId"?: number;
111
+ "pid": number;
110
112
  }
111
113
  interface BonusPowerupsIngameList {
112
114
  "clientStyling"?: string;
113
115
  "clientStylingUrl"?: string;
114
116
  "endpoint": string;
117
+ "gameId"?: string;
115
118
  "language"?: string;
116
119
  "limit"?: number;
117
120
  "mbSource"?: string;
@@ -119,6 +122,7 @@ declare namespace LocalJSX {
119
122
  "onPowerupsLoad"?: (event: BonusPowerupsIngameListCustomEvent<any>) => void;
120
123
  "onShowPowerupDetails"?: (event: BonusPowerupsIngameListCustomEvent<any>) => void;
121
124
  "session": string;
125
+ "showFullList"?: boolean;
122
126
  "translationUrl"?: string;
123
127
  }
124
128
  interface TimeCount {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/bonus-powerups-ingame-list",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",