@everymatrix/bonus-powerups-ingame-list 0.0.25 → 0.0.26

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 (37) hide show
  1. package/dist/bonus-powerups-ingame-list/active-confirm-modal_3.entry.js +1 -0
  2. package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list-01fff0bc.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-e015b33d.js +2 -0
  5. package/dist/bonus-powerups-ingame-list/index.esm.js +1 -1
  6. package/dist/cjs/active-confirm-modal_3.cjs.entry.js +121 -0
  7. package/dist/cjs/{bonus-powerups-ingame-list-c9172936.js → bonus-powerups-ingame-list-db296f5c.js} +100 -28
  8. package/dist/cjs/bonus-powerups-ingame-list.cjs.js +2 -2
  9. package/dist/cjs/{index-f60c43c6.js → index-1c45277e.js} +9 -3
  10. package/dist/cjs/index.cjs.js +2 -2
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/collection/collection-manifest.json +1 -0
  13. package/dist/collection/components/active-confirm-modal/active-confirm-modal.component.js +105 -0
  14. package/dist/collection/components/active-confirm-modal/active-confirm-modal.css +50 -0
  15. package/dist/collection/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.css +45 -4
  16. package/dist/collection/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.js +89 -23
  17. package/dist/collection/components/time-count/time-count.js +73 -5
  18. package/dist/collection/utils/locale.utils.js +9 -3
  19. package/dist/collection/utils/utils.js +10 -2
  20. package/dist/esm/active-confirm-modal_3.entry.js +116 -0
  21. package/dist/esm/{bonus-powerups-ingame-list-a8638981.js → bonus-powerups-ingame-list-01fff0bc.js} +98 -27
  22. package/dist/esm/bonus-powerups-ingame-list.js +3 -3
  23. package/dist/esm/{index-20f17dc8.js → index-e015b33d.js} +9 -3
  24. package/dist/esm/index.js +2 -2
  25. package/dist/esm/loader.js +3 -3
  26. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/libs/common/src/types/casino/powerups.d.ts +1 -0
  27. package/dist/types/components/active-confirm-modal/active-confirm-modal.component.d.ts +10 -0
  28. package/dist/types/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.d.ts +13 -0
  29. package/dist/types/components/time-count/time-count.d.ts +3 -0
  30. package/dist/types/components.d.ts +41 -0
  31. package/dist/types/utils/utils.d.ts +1 -0
  32. package/package.json +1 -1
  33. package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list-a8638981.js +0 -3
  34. package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list_2.entry.js +0 -1
  35. package/dist/bonus-powerups-ingame-list/index-20f17dc8.js +0 -2
  36. package/dist/cjs/bonus-powerups-ingame-list_2.cjs.entry.js +0 -82
  37. package/dist/esm/bonus-powerups-ingame-list_2.entry.js +0 -78
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-20f17dc8.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-e015b33d.js';
2
2
 
3
3
  const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
4
4
 
@@ -124,14 +124,20 @@ const TRANSLATIONS = {
124
124
  powerups: 'Power-ups',
125
125
  activate: 'Activate',
126
126
  expiresIn: 'Expires in - ',
127
- xp: 'Points',
127
+ inProgress: 'In Progress',
128
+ endsIn: 'Ends in - ',
129
+ xp: 'XP',
128
130
  coins: 'Coins',
129
131
  minutes: 'min',
130
- rounds: 'rounds',
132
+ rounds: 'Rounds',
131
133
  days: 'Days',
132
134
  nothingHere: 'Nothing here -- yet!',
133
135
  noPowerUps: 'No power-ups have been used at the moment.',
134
- poweringTooltip: 'Power-ups are currently unavailable as you have already activated one power-up. Only one power-up can be active at a time.'
136
+ poweringTooltip: 'Power-ups are currently unavailable as you have already activated one power-up. Only one power-up can be active at a time.',
137
+ later: 'Later',
138
+ activateNow: 'Activate Now',
139
+ activeTitle: 'Activate power-up?',
140
+ activeContent: 'In case of activation the countdown starts immediately.\n Are you sure you want to activate?'
135
141
  }
136
142
  };
137
143
  const getTranslations = (url) => {
@@ -5861,7 +5867,7 @@ hooks.HTML5_FMT = {
5861
5867
  };
5862
5868
 
5863
5869
  const powerUpWithoutGamesSearchConditions = {
5864
- fields: "id,powerUpID,displayName,termsUrl,description,status,multiplier,boostingPeriod,currentTime,expireTime,activatedAt",
5870
+ fields: "id,powerUpID,displayName,termsUrl,description,status,multiplier,boostingPeriod,usedNumberOfRounds,currentTime,expireTime,activatedAt",
5865
5871
  status: `${PowerUpStatus.ACTIVE},${PowerUpStatus.ACTIVATED}`
5866
5872
  };
5867
5873
  const getActivedExpireTime = (powerUp) => {
@@ -5870,6 +5876,14 @@ const getActivedExpireTime = (powerUp) => {
5870
5876
  }
5871
5877
  return hooks(powerUp.activatedAt).add(powerUp.boostingPeriod.minutes, 'minute').format('YYYY-MM-DDTHH:mm:ssZ');
5872
5878
  };
5879
+ function debounce(func, wait) {
5880
+ let timeout;
5881
+ return function (...args) {
5882
+ const context = this;
5883
+ clearTimeout(timeout);
5884
+ timeout = setTimeout(() => func.apply(context, args), wait);
5885
+ };
5886
+ }
5873
5887
 
5874
5888
  const CloseSvg = `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
5875
5889
  <path d="M1.75 12.2505L12.25 1.75049" stroke="white" stroke-width="0.952264" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
@@ -5916,7 +5930,7 @@ const InfoSvg = `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xml
5916
5930
  </svg>
5917
5931
  `;
5918
5932
 
5919
- const bonusPowerupsIngameListCss = "@charset \"UTF-8\";.FlexRow{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;gap:5px}.IngamePowerUpsContainer{display:block;height:100%;padding:var(--emw--ingame-power-container-padding, 8px);}.IngamePowerUpsContainer .IconBtn{width:26px;height:26px}.IngamePowerUpsContainer .CircleLinearBorder{position:relative;border-radius:20px;background:none;overflow:hidden;border:1.5px solid transparent;display:flex;align-items:center;justify-content:center;cursor:pointer}.IngamePowerUpsContainer .CircleLinearBorder svg{border-radius:20px;padding:4.5px;background:var(--emw--ingame-color-powerup-bg, rgba(9, 9, 9, 0.8980392157));z-index:1}.IngamePowerUpsContainer .CircleLinearBorder::before{content:\"\";position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;z-index:0;border-radius:21.5px;background:linear-gradient(0deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0666666667)), var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0666666667))), linear-gradient(35.22deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0)), var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.5490196078)) 89.19%)}.IngamePowerUpsContainer .TopBar{display:flex;justify-content:space-between;align-items:center;padding:15px}.IngamePowerUpsContainer .TopBar .BarTitle{width:calc(100% - 20px);font-weight:600;font-size:1.2rem;text-align:center;vertical-align:middle}.IngamePowerUpsContainer .Cards{width:100%;height:calc(100% - 70px);gap:16px;opacity:1;padding:1px;overflow:auto;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.IngamePowerUpsContainer .Cards .Card{background-color:var(--emw--ingame-color-powerup-bg, rgba(27, 27, 27, 0.8901960784));border:1px solid var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.1019607843));height:99px;gap:12px;opacity:1;border-radius:18px;border-width:1px;padding:14px;align-items:center}.IngamePowerUpsContainer .Cards .Card.PoweringDesc{align-items:flex-start;height:auto;transition:all 0.3s ease-in-out}.IngamePowerUpsContainer .Cards .Card .LeftOfRow{display:flex;flex-direction:row;gap:10px}.IngamePowerUpsContainer .Cards .Card .PowerupTitle,.IngamePowerUpsContainer .Cards .Card .ExpireTime,.IngamePowerUpsContainer .Cards .Card .MultiplierInfo{display:flex;flex-direction:row;align-items:center}.IngamePowerUpsContainer .Cards .Card .PowerupTitle{font-weight:bold}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo{align-items:flex-end;height:37.6px}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo .MultiplierIcon{height:12px}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo .LeftOfRow{color:var(--emw--ingame-color-white60, rgba(255, 255, 255, 0.4980392157));font-size:0.8rem;gap:3px;align-items:center}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo .LeftOfRow .MultiplierMode{margin-right:15px}.IngamePowerUpsContainer .Cards .Card .Status{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:6px;font-size:0.8rem;width:max-content;height:25px;backdrop-filter:blur(4.6px);flex:none;order:1;flex-grow:0;border:0px solid;opacity:1;padding:1px}.IngamePowerUpsContainer .Cards .Card .Status::before{background:linear-gradient(97.6deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.2)) 11.03%, var(--emw--ingame-color-white00, rgba(255, 255, 255, 0)) 95.17%), linear-gradient(0deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.2)), var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.2)))}.IngamePowerUpsContainer .Cards .Card .Status time-count{background-color:var(--emw--ingame-color-black-middle, #020308);width:calc(100% - 4px);height:calc(100% - 4px);border-radius:20px;text-align:center;align-items:center;display:flex;justify-content:center;padding:2.2px;z-index:1;min-width:172px}.IngamePowerUpsContainer .Cards .Card .ActiveButton.Activating{background-color:var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.3019607843));color:var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.3019607843))}.IngamePowerUpsContainer .Cards .Card time-count .Label{margin-right:5px}.IngamePowerUpsContainer .Cards .Card time-count .TimeCountDown{letter-spacing:1.5px;font-weight:bold}.IngamePowerUpsContainer .ActiveBtn{color:var(--emw--ingame-color-black, #090909);position:relative;background:none;overflow:hidden;min-width:88px;height:36px;font-weight:bold;gap:10px;border-radius:20px;animation-duration:0ms}.IngamePowerUpsContainer .ActiveBtn.Disabled .content{background-color:var(--emw--ingame-color-white20, rgba(255, 255, 255, 0.2));color:var(--emw--ingame-color-white20, rgba(255, 255, 255, 0.2))}.IngamePowerUpsContainer .ActiveBtn.Disabled:hover,.IngamePowerUpsContainer .ActiveBtn.Disabled:before{box-shadow:none;background:none}.IngamePowerUpsContainer .ActiveBtn:hover{box-shadow:0px 0px 3px 5px var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.1019607843))}.IngamePowerUpsContainer .ActiveBtn::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;z-index:1;border-radius:18px;background:linear-gradient(218deg, var(--emw--ingame-color-white60, rgba(255, 255, 255, 0.568627451)), var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.3019607843))), linear-gradient(93deg, var(--emw--ingame-color-white60, rgba(255, 255, 255, 0.6588235294)) 33.61%, var(--emw--ingame-color-white60, rgba(255, 255, 255, 0.5411764706)) 89.19%)}.IngamePowerUpsContainer .ActiveBtn .content{line-height:1.6;background:var(--emw--ingame-color-powerup-brightgreen, #00FA5A);border-radius:18px;padding:1px;height:calc(100% - 4px);width:calc(100% - 4px);text-align:center;align-items:center;display:flex;justify-content:center;z-index:1}";
5933
+ const bonusPowerupsIngameListCss = "@charset \"UTF-8\";.FlexRow{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;gap:5px}.IngamePowerUpsContainer{display:block;transition:opacity 200ms ease-in-out;height:100%;padding:var(--emw--ingame-power-container-padding, 8px);}.IngamePowerUpsContainer .IconBtn{width:26px;height:26px}.IngamePowerUpsContainer .Hidden{opacity:0 !important;display:none}.IngamePowerUpsContainer .CircleLinearBorder{position:relative;border-radius:20px;background:none;overflow:hidden;border:1.5px solid transparent;display:flex;align-items:center;justify-content:center;cursor:pointer}.IngamePowerUpsContainer .CircleLinearBorder svg{border-radius:20px;padding:4.5px;background:var(--emw--ingame-color-powerup-bg, rgba(9, 9, 9, 0.8980392157));z-index:1}.IngamePowerUpsContainer .CircleLinearBorder::before{content:\"\";position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;z-index:0;border-radius:21.5px;background:linear-gradient(0deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0666666667)), var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0666666667))), linear-gradient(35.22deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0)), var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.5490196078)) 89.19%)}.IngamePowerUpsContainer .TopBar{opacity:1;transition:all 0.5s ease-in-out;display:flex;justify-content:space-between;align-items:center;padding:15px}.IngamePowerUpsContainer .TopBar .BarTitle{width:calc(100% - 20px);font-weight:600;font-size:1.2rem;text-align:center;vertical-align:middle}.IngamePowerUpsContainer .Cards{opacity:1;transition:all 0.5s ease-in-out;width:100%;height:calc(100% - 70px);gap:16px;opacity:1;padding:1px;overflow:auto;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.IngamePowerUpsContainer .Cards .Card{background-color:var(--emw--ingame-color-powerup-bg, rgba(27, 27, 27, 0.8901960784));border:1px solid var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.1019607843));height:99px;gap:12px;opacity:1;border-radius:18px;border-width:1px;padding:14px;align-items:center}.IngamePowerUpsContainer .Cards .Card.PoweringDesc{align-items:flex-start;height:auto;transition:all 0.3s ease-in-out}.IngamePowerUpsContainer .Cards .Card .LeftOfRow{display:flex;flex-direction:row;gap:10px}.IngamePowerUpsContainer .Cards .Card .PowerupTitle,.IngamePowerUpsContainer .Cards .Card .ExpireTime,.IngamePowerUpsContainer .Cards .Card .MultiplierInfo{display:flex;flex-direction:row;align-items:center}.IngamePowerUpsContainer .Cards .Card .PowerupTitle{font-weight:bold}.IngamePowerUpsContainer .Cards .Card .PowerupTitle .LeftOfRow{width:calc(100% - 40px)}.IngamePowerUpsContainer .Cards .Card .PowerupTitle .Name{width:calc(100% - 40px);text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo{align-items:flex-end;height:37.6px}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo .MultiplierIcon{height:12px}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo .LeftOfRow{color:var(--emw--ingame-color-white60, rgba(255, 255, 255, 0.4980392157));font-size:0.8rem;gap:3px;align-items:center}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo .LeftOfRow .MultiplierMode{margin-right:15px}.IngamePowerUpsContainer .Cards .Card .Status{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:6px;font-size:0.8rem;width:max-content;height:25px;backdrop-filter:blur(4.6px);flex-grow:0;border:0px solid;opacity:1;padding:1px}.IngamePowerUpsContainer .Cards .Card .Status::before{background:linear-gradient(97.6deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.2)) 11.03%, var(--emw--ingame-color-white00, rgba(255, 255, 255, 0)) 95.17%), linear-gradient(0deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.2)), var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.2)))}.IngamePowerUpsContainer .Cards .Card .Status .InprogressLabel{width:fit-content;min-width:100px}.IngamePowerUpsContainer .Cards .Card .Status time-count{min-width:172px}.IngamePowerUpsContainer .Cards .Card .Status time-count{background-color:var(--emw--ingame-color-black-middle, #020308);width:calc(100% - 4px);height:calc(100% - 4px);border-radius:20px;text-align:center;align-items:center;display:flex;justify-content:center;padding:2.2px;z-index:1;padding-right:10px}.IngamePowerUpsContainer .Cards .Card .ActiveButton.Activating{background-color:var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.3019607843));color:var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.3019607843))}.IngamePowerUpsContainer .Cards .Card time-count .Label{margin-right:5px}.IngamePowerUpsContainer .Cards .Card time-count .InprogressLabel{text-align:left;width:fit-content;padding:0 5px;border-radius:18px;border:1px solid rgba(175, 165, 165, 0.5098039216);line-height:21px;margin-right:10px}.IngamePowerUpsContainer .Cards .Card time-count .InprogressLabel .Icon{height:5px;width:5px;background-color:var(--New-Indicator-Yellow, #FFB801);border-radius:3px;display:inline-block;margin-right:5px}.IngamePowerUpsContainer .Cards .Card time-count .TimeCountDown{letter-spacing:1.5px;font-weight:bold;text-transform:capitalize}.IngamePowerUpsContainer .ActiveBtn{color:var(--emw--ingame-color-black, #090909);position:relative;background:none;overflow:hidden;min-width:88px;height:36px;font-weight:bold;gap:10px;border-radius:20px;animation-duration:0ms}.IngamePowerUpsContainer .ActiveBtn.Disabled .content{background-color:var(--emw--ingame-color-white20, rgba(255, 255, 255, 0.2));color:var(--emw--ingame-color-white20, rgba(255, 255, 255, 0.2))}.IngamePowerUpsContainer .ActiveBtn.Disabled:hover,.IngamePowerUpsContainer .ActiveBtn.Disabled:before{box-shadow:none;background:none}.IngamePowerUpsContainer .ActiveBtn:hover{box-shadow:0px 0px 3px 5px var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.1019607843))}.IngamePowerUpsContainer .ActiveBtn::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;z-index:1;border-radius:18px;background:linear-gradient(to top right, var(--emw--ingame-color-powerup-brightgreen, #00FA5A), var(--emw--ingame-color-powerup-brightblue, rgba(50, 237, 221, 0.8901960784)))}.IngamePowerUpsContainer .ActiveBtn .content{line-height:1.6;background:var(--emw--ingame-color-powerup-brightgreen, #00FA5A);border-radius:18px;padding:1px;height:calc(100% - 4px);width:calc(100% - 4px);text-align:center;align-items:center;display:flex;justify-content:center;z-index:1}";
5920
5934
  const BonusPowerupsIngameListStyle0 = bonusPowerupsIngameListCss;
5921
5935
 
5922
5936
  const BonusPowerupsIngameList = class {
@@ -5932,23 +5946,41 @@ const BonusPowerupsIngameList = class {
5932
5946
  this.language = 'en';
5933
5947
  this.endpoint = undefined;
5934
5948
  this.session = undefined;
5935
- this.limit = 10;
5936
- this.isLoading = true;
5949
+ this.limit = 30;
5950
+ this.isLoading = false;
5937
5951
  this.isActivating = false;
5938
5952
  this.powerups = [];
5953
+ this.total = 0;
5939
5954
  this.isPowering = false;
5955
+ this.showConfirmModal = false;
5956
+ this.currentPowerup = undefined;
5957
+ this.debouncedReload = debounce(this.reloadPowerups, 100);
5940
5958
  }
5941
5959
  reloadPowerupsHandler() {
5942
- this.loadData();
5960
+ this.reloadPowerups();
5961
+ }
5962
+ activePowerupHandler(e) {
5963
+ if (e.detail.id === this.currentPowerup.id) {
5964
+ this.activePowerUp(this.currentPowerup);
5965
+ }
5966
+ this.showConfirmModal = false;
5943
5967
  }
5944
5968
  powerupTimeCountDownHandler(e) {
5945
5969
  if (e.detail.timeLeft <= 0) {
5946
- this.loadData();
5970
+ this.reloadPowerups();
5947
5971
  return;
5948
5972
  }
5949
5973
  }
5974
+ reloadPowerups() {
5975
+ this.powerups = [];
5976
+ this.total = 0;
5977
+ this.loadData();
5978
+ }
5979
+ handleConfigChange() {
5980
+ this.debouncedReload();
5981
+ }
5950
5982
  async loadData() {
5951
- if (!this.endpoint || !this.session) {
5983
+ if (this.isLoading || (this.total > 0 && this.powerups.length >= this.total)) {
5952
5984
  return;
5953
5985
  }
5954
5986
  this.isLoading = true;
@@ -5957,7 +5989,8 @@ const BonusPowerupsIngameList = class {
5957
5989
  }
5958
5990
  this.abortController = new AbortController();
5959
5991
  try {
5960
- const url = new URL(`${this.endpoint}/v1/elevate/powerups?pagination=offset=0,limit=${this.limit}`);
5992
+ const offset = this.powerups.length;
5993
+ const url = new URL(`${this.endpoint}/v1/elevate/powerups?pagination=offset=${offset},limit=${this.limit}`);
5961
5994
  const options = {
5962
5995
  headers: {
5963
5996
  'Content-Type': 'application/json',
@@ -5975,10 +6008,11 @@ const BonusPowerupsIngameList = class {
5975
6008
  window.postMessage({ type: 'errorWhenLoadPowerups', status: response.status });
5976
6009
  throw new Error(`HTTP error! status: ${response.status}`);
5977
6010
  }
5978
- const { data } = await response.json();
5979
- this.powerups = data;
6011
+ const { data, total } = await response.json();
6012
+ this.powerups = [...this.powerups, ...data];
6013
+ this.total = total;
5980
6014
  this.isPowering = this.powerups.filter(e => e.status === PowerUpStatus.ACTIVATED).length > 0;
5981
- this.powerupsLoadEvent.emit({ powerups: this.powerups });
6015
+ this.powerupsLoadEvent.emit({ powerups: this.powerups, total });
5982
6016
  }
5983
6017
  catch (error) {
5984
6018
  if (error.name !== 'AbortError') {
@@ -5991,6 +6025,21 @@ const BonusPowerupsIngameList = class {
5991
6025
  }
5992
6026
  }
5993
6027
  }
6028
+ initializeObserver() {
6029
+ if (this.loadMoreObserver) {
6030
+ this.loadMoreObserver.disconnect();
6031
+ }
6032
+ this.loadMoreObserver = new IntersectionObserver((entries) => {
6033
+ entries.forEach((entry) => {
6034
+ if (entry.isIntersecting) {
6035
+ this.loadData().catch(console.error);
6036
+ }
6037
+ });
6038
+ });
6039
+ if (this.lastItemElement) {
6040
+ this.loadMoreObserver.observe(this.lastItemElement);
6041
+ }
6042
+ }
5994
6043
  async activePowerUp(powerUp) {
5995
6044
  if (!this.endpoint || !this.session || this.isActivating || this.isPowering) {
5996
6045
  return;
@@ -6027,6 +6076,7 @@ const BonusPowerupsIngameList = class {
6027
6076
  this.powerups[activedIdx] = Object.assign({}, powerUp);
6028
6077
  this.powerups = [...this.powerups];
6029
6078
  this.isPowering = true;
6079
+ this.reloadPowerups();
6030
6080
  }
6031
6081
  }
6032
6082
  catch (e) {
@@ -6044,14 +6094,32 @@ const BonusPowerupsIngameList = class {
6044
6094
  showDetail(id) {
6045
6095
  this.showDetailsEvent.emit({ id });
6046
6096
  }
6097
+ onActiveBtnClick(powerup) {
6098
+ if (this.isPowering || this.isActivating) {
6099
+ return;
6100
+ }
6101
+ this.currentPowerup = powerup;
6102
+ this.showConfirmModal = true;
6103
+ }
6104
+ componentDidUpdate() {
6105
+ if (this.powerups.length < this.total) {
6106
+ this.initializeObserver();
6107
+ }
6108
+ }
6047
6109
  render() {
6048
- return (h("div", { key: 'eedb6e5b3bfca30d017bb077e4bf41001f1e07d7', class: 'IngamePowerUpsContainer', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'bfd1a61b883761d084057f4d2fee8473198b6cea', class: 'TopBar' }, h("span", { key: 'a3a0b4a6d4249d331cf9d4dc36ef07253d820758', class: 'BarTitle' }, translate('powerups', this.language)), h("div", { key: '0be0d805aaaaa5982e8243c227d3f49d4371fb33', class: 'IconBtn CircleLinearBorder', onClick: this.onClose.bind(this), innerHTML: CloseSvg })), this.isLoading
6110
+ 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
6049
6112
  ? h("smart-loader", null)
6050
- : h("div", { class: 'Cards' }, this.isPowering &&
6051
- 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 => h("div", { class: 'Card' }, 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
6052
- ? h("time-count", { language: this.language, "expire-time": getActivedExpireTime(powerup) })
6053
- : h("time-count", { language: this.language, "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) &&
6054
- h("div", { class: `ActiveBtn CircleLinearBorder ${this.isPowering ? 'Disabled' : ''} ${this.isActivating ? 'Activating' : ''}`, onClick: this.activePowerUp.bind(this, powerup) }, h("div", { class: 'content' }, " ", translate('activate', this.language)))))))));
6113
+ : h("div", { class: `Cards ${this.showConfirmModal ? 'Hidden' : ''}` }, this.isPowering &&
6114
+ 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
+ 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
6117
+ ?
6118
+ 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
+ :
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 })));
6055
6123
  }
6056
6124
  handleClientStylingChange(newValue, oldValue) {
6057
6125
  if (newValue != oldValue) {
@@ -6075,7 +6143,7 @@ const BonusPowerupsIngameList = class {
6075
6143
  if (this.translationUrl) {
6076
6144
  await getTranslations(this.translationUrl);
6077
6145
  }
6078
- this.loadData();
6146
+ this.handleConfigChange();
6079
6147
  }
6080
6148
  componentDidLoad() {
6081
6149
  if (this.stylingContainer) {
@@ -6091,14 +6159,17 @@ const BonusPowerupsIngameList = class {
6091
6159
  if (this.abortController) {
6092
6160
  this.abortController.abort();
6093
6161
  }
6162
+ if (this.loadMoreObserver) {
6163
+ this.loadMoreObserver.disconnect();
6164
+ }
6094
6165
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
6095
6166
  }
6096
6167
  static get assetsDirs() { return ["../assets"]; }
6097
6168
  static get watchers() { return {
6098
- "session": ["loadData"],
6099
- "endpoint": ["loadData"],
6100
- "limit": ["loadData"],
6101
- "language": ["loadData"],
6169
+ "session": ["handleConfigChange"],
6170
+ "endpoint": ["handleConfigChange"],
6171
+ "limit": ["handleConfigChange"],
6172
+ "language": ["handleConfigChange"],
6102
6173
  "clientStyling": ["handleClientStylingChange"],
6103
6174
  "clientStylingUrl": ["handleClientStylingUrlChange"],
6104
6175
  "mbSource": ["handleMbSourceChange"],
@@ -6107,4 +6178,4 @@ const BonusPowerupsIngameList = class {
6107
6178
  };
6108
6179
  BonusPowerupsIngameList.style = BonusPowerupsIngameListStyle0;
6109
6180
 
6110
- export { BonusPowerupsIngameList as B, hooks as h, translate as t };
6181
+ export { BonusPowerupsIngameList as B, CloseSvg as C, BoostingPeriodMode as a, hooks as h, translate as t };
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-20f17dc8.js';
2
- export { s as setNonce } from './index-20f17dc8.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-e015b33d.js';
2
+ export { s as setNonce } from './index-e015b33d.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["bonus-powerups-ingame-list_2",[[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],"isPowering":[32]},[[16,"reloadPowerups","reloadPowerupsHandler"],[0,"powerupTimeCountDown","powerupTimeCountDownHandler"]],{"session":["loadData"],"endpoint":["loadData"],"limit":["loadData"],"language":["loadData"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}],[0,"time-count",{"expireTime":[1,"expire-time"],"language":[1],"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"],"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);
20
20
  });
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'bonus-powerups-ingame-list';
2
- const BUILD = /* bonus-powerups-ingame-list */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* bonus-powerups-ingame-list */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -49,10 +49,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
49
49
  }
50
50
  switch(bundleId) {
51
51
 
52
- case 'bonus-powerups-ingame-list_2':
52
+ case 'active-confirm-modal_3':
53
53
  return import(
54
54
  /* webpackMode: "lazy" */
55
- './bonus-powerups-ingame-list_2.entry.js').then(processMod, consoleError);
55
+ './active-confirm-modal_3.entry.js').then(processMod, consoleError);
56
56
  }
57
57
  }
58
58
  return import(
@@ -289,6 +289,9 @@ var Host = {};
289
289
  var isHost = (node) => node && node.$tag$ === Host;
290
290
  var parsePropertyValue = (propValue, propType) => {
291
291
  if (propValue != null && !isComplexType(propValue)) {
292
+ if (propType & 4 /* Boolean */) {
293
+ return propValue === "false" ? false : propValue === "" || !!propValue;
294
+ }
292
295
  if (propType & 2 /* Number */) {
293
296
  return parseFloat(propValue);
294
297
  }
@@ -822,6 +825,9 @@ var postUpdateComponent = (hostRef) => {
822
825
  }
823
826
  }
824
827
  } else {
828
+ {
829
+ safeCall(instance, "componentDidUpdate");
830
+ }
825
831
  endPostUpdate();
826
832
  }
827
833
  {
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { B as BonusPowerupsIngameList } from './bonus-powerups-ingame-list-a8638981.js';
2
- import './index-20f17dc8.js';
1
+ export { B as BonusPowerupsIngameList } from './bonus-powerups-ingame-list-01fff0bc.js';
2
+ import './index-e015b33d.js';
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-20f17dc8.js';
2
- export { s as setNonce } from './index-20f17dc8.js';
1
+ import { b as bootstrapLazy } from './index-e015b33d.js';
2
+ export { s as setNonce } from './index-e015b33d.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["bonus-powerups-ingame-list_2",[[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],"isPowering":[32]},[[16,"reloadPowerups","reloadPowerupsHandler"],[0,"powerupTimeCountDown","powerupTimeCountDownHandler"]],{"session":["loadData"],"endpoint":["loadData"],"limit":["loadData"],"language":["loadData"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}],[0,"time-count",{"expireTime":[1,"expire-time"],"language":[1],"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"],"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);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -52,6 +52,7 @@ export interface PowerUp {
52
52
  casino?: any;
53
53
  termsUrl: string;
54
54
  games: PowerUpGames;
55
+ usedNumberOfRounds?: number;
55
56
  }
56
57
  export type PowerUpGames = {
57
58
  total: number;
@@ -0,0 +1,10 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ export declare class ActiveConfirmModal {
3
+ powerupId: number;
4
+ language: string;
5
+ isOpen: boolean;
6
+ activePowerupEvent: EventEmitter;
7
+ activeNow(): void;
8
+ closeModal(id?: number): void;
9
+ render(): any;
10
+ }
@@ -12,19 +12,32 @@ export declare class BonusPowerupsIngameList {
12
12
  isLoading: boolean;
13
13
  isActivating: boolean;
14
14
  powerups: PowerUp[];
15
+ total: number;
15
16
  isPowering: boolean;
17
+ showConfirmModal: boolean;
18
+ currentPowerup: PowerUp;
16
19
  showDetailsEvent: EventEmitter;
17
20
  powerupsLoadEvent: EventEmitter;
18
21
  closePowerupsEvent: EventEmitter;
19
22
  private stylingContainer;
20
23
  private stylingSubscription;
21
24
  private abortController;
25
+ private loadMoreObserver;
26
+ private lastItemElement;
27
+ private debouncedReload;
28
+ constructor();
22
29
  reloadPowerupsHandler(): void;
30
+ activePowerupHandler(e: any): void;
23
31
  powerupTimeCountDownHandler(e: any): void;
32
+ private reloadPowerups;
33
+ private handleConfigChange;
24
34
  private loadData;
35
+ private initializeObserver;
25
36
  private activePowerUp;
26
37
  private onClose;
27
38
  private showDetail;
39
+ private onActiveBtnClick;
40
+ componentDidUpdate(): void;
28
41
  render(): any;
29
42
  handleClientStylingChange(newValue: any, oldValue: any): void;
30
43
  handleClientStylingUrlChange(newValue: any, oldValue: any): void;
@@ -2,6 +2,9 @@ import { EventEmitter } from '../../stencil-public-runtime';
2
2
  export declare class TimeCount {
3
3
  expireTime: string;
4
4
  language: string;
5
+ mode: string;
6
+ inProgress: boolean;
7
+ leftRounds: number;
5
8
  displayTime: string;
6
9
  isExpireInDay1: boolean;
7
10
  timeLeft: number;
@@ -6,6 +6,11 @@
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  export namespace Components {
9
+ interface ActiveConfirmModal {
10
+ "isOpen": boolean;
11
+ "language": string;
12
+ "powerupId": number;
13
+ }
9
14
  interface BonusPowerupsIngameList {
10
15
  "clientStyling": string;
11
16
  "clientStylingUrl": string;
@@ -18,9 +23,16 @@ export namespace Components {
18
23
  }
19
24
  interface TimeCount {
20
25
  "expireTime": string;
26
+ "inProgress": boolean;
21
27
  "language": string;
28
+ "leftRounds": number;
29
+ "mode": string;
22
30
  }
23
31
  }
32
+ export interface ActiveConfirmModalCustomEvent<T> extends CustomEvent<T> {
33
+ detail: T;
34
+ target: HTMLActiveConfirmModalElement;
35
+ }
24
36
  export interface BonusPowerupsIngameListCustomEvent<T> extends CustomEvent<T> {
25
37
  detail: T;
26
38
  target: HTMLBonusPowerupsIngameListElement;
@@ -30,6 +42,23 @@ export interface TimeCountCustomEvent<T> extends CustomEvent<T> {
30
42
  target: HTMLTimeCountElement;
31
43
  }
32
44
  declare global {
45
+ interface HTMLActiveConfirmModalElementEventMap {
46
+ "activePowerupEvent": any;
47
+ }
48
+ interface HTMLActiveConfirmModalElement extends Components.ActiveConfirmModal, HTMLStencilElement {
49
+ addEventListener<K extends keyof HTMLActiveConfirmModalElementEventMap>(type: K, listener: (this: HTMLActiveConfirmModalElement, ev: ActiveConfirmModalCustomEvent<HTMLActiveConfirmModalElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
50
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
51
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
52
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
53
+ removeEventListener<K extends keyof HTMLActiveConfirmModalElementEventMap>(type: K, listener: (this: HTMLActiveConfirmModalElement, ev: ActiveConfirmModalCustomEvent<HTMLActiveConfirmModalElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
54
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
55
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
56
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
57
+ }
58
+ var HTMLActiveConfirmModalElement: {
59
+ prototype: HTMLActiveConfirmModalElement;
60
+ new (): HTMLActiveConfirmModalElement;
61
+ };
33
62
  interface HTMLBonusPowerupsIngameListElementEventMap {
34
63
  "showPowerupDetails": any;
35
64
  "powerupsLoad": any;
@@ -67,11 +96,18 @@ declare global {
67
96
  new (): HTMLTimeCountElement;
68
97
  };
69
98
  interface HTMLElementTagNameMap {
99
+ "active-confirm-modal": HTMLActiveConfirmModalElement;
70
100
  "bonus-powerups-ingame-list": HTMLBonusPowerupsIngameListElement;
71
101
  "time-count": HTMLTimeCountElement;
72
102
  }
73
103
  }
74
104
  declare namespace LocalJSX {
105
+ interface ActiveConfirmModal {
106
+ "isOpen"?: boolean;
107
+ "language"?: string;
108
+ "onActivePowerupEvent"?: (event: ActiveConfirmModalCustomEvent<any>) => void;
109
+ "powerupId"?: number;
110
+ }
75
111
  interface BonusPowerupsIngameList {
76
112
  "clientStyling"?: string;
77
113
  "clientStylingUrl"?: string;
@@ -87,10 +123,14 @@ declare namespace LocalJSX {
87
123
  }
88
124
  interface TimeCount {
89
125
  "expireTime"?: string;
126
+ "inProgress"?: boolean;
90
127
  "language"?: string;
128
+ "leftRounds"?: number;
129
+ "mode"?: string;
91
130
  "onPowerupTimeCountDown"?: (event: TimeCountCustomEvent<any>) => void;
92
131
  }
93
132
  interface IntrinsicElements {
133
+ "active-confirm-modal": ActiveConfirmModal;
94
134
  "bonus-powerups-ingame-list": BonusPowerupsIngameList;
95
135
  "time-count": TimeCount;
96
136
  }
@@ -99,6 +139,7 @@ export { LocalJSX as JSX };
99
139
  declare module "@stencil/core" {
100
140
  export namespace JSX {
101
141
  interface IntrinsicElements {
142
+ "active-confirm-modal": LocalJSX.ActiveConfirmModal & JSXBase.HTMLAttributes<HTMLActiveConfirmModalElement>;
102
143
  "bonus-powerups-ingame-list": LocalJSX.BonusPowerupsIngameList & JSXBase.HTMLAttributes<HTMLBonusPowerupsIngameListElement>;
103
144
  "time-count": LocalJSX.TimeCount & JSXBase.HTMLAttributes<HTMLTimeCountElement>;
104
145
  }
@@ -12,3 +12,4 @@ export declare const powerUpGameSearchConditions: {
12
12
  fields: string;
13
13
  };
14
14
  export declare const getActivedExpireTime: (powerUp: any) => any;
15
+ export declare function debounce(func: Function, wait: number): (...args: any[]) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/bonus-powerups-ingame-list",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",