@everymatrix/bonus-elevate-shop-item 1.94.51 → 1.94.53

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 (22) hide show
  1. package/dist/bonus-elevate-shop-item/bonus-elevate-shop-assets-slider_5.entry.js +1 -0
  2. package/dist/bonus-elevate-shop-item/bonus-elevate-shop-item.esm.js +1 -1
  3. package/dist/cjs/bonus-elevate-shop-assets-slider_5.cjs.entry.js +918 -0
  4. package/dist/cjs/bonus-elevate-shop-item.cjs.js +1 -1
  5. package/dist/cjs/index-ad2fddb6.js +2 -2
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +12 -0
  8. package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-assets-slider.js +5 -5
  9. package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-item.css +92 -1
  10. package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-item.js +85 -4
  11. package/dist/collection/utils/locale.utils.js +1 -0
  12. package/dist/esm/bonus-elevate-shop-assets-slider_5.entry.js +910 -0
  13. package/dist/esm/bonus-elevate-shop-item.js +1 -1
  14. package/dist/esm/index-fca048d8.js +2 -2
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/libs/common/src/types/casino/tournaments.d.ts +111 -0
  17. package/dist/types/components/bonus-elevate-shop-item/bonus-elevate-shop-item.d.ts +11 -0
  18. package/dist/types/models/bonus-elevate-shop-item.d.ts +1 -0
  19. package/package.json +1 -1
  20. package/dist/bonus-elevate-shop-item/bonus-elevate-shop-assets-slider_3.entry.js +0 -1
  21. package/dist/cjs/bonus-elevate-shop-assets-slider_3.cjs.entry.js +0 -600
  22. package/dist/esm/bonus-elevate-shop-assets-slider_3.entry.js +0 -594
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["bonus-elevate-shop-assets-slider_3.cjs",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"mbSource":["handleMbSourceChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
22
+ return index.bootstrapLazy([["bonus-elevate-shop-assets-slider_5.cjs",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32],"powerUpGames":[32],"isLoadingGames":[32]}],[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"mbSource":["handleMbSourceChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -71,10 +71,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
71
71
  }
72
72
  switch(bundleId) {
73
73
 
74
- case 'bonus-elevate-shop-assets-slider_3.cjs':
74
+ case 'bonus-elevate-shop-assets-slider_5.cjs':
75
75
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
76
76
  /* webpackMode: "lazy" */
77
- './bonus-elevate-shop-assets-slider_3.cjs.entry.js')); }).then(processMod, consoleError);
77
+ './bonus-elevate-shop-assets-slider_5.cjs.entry.js')); }).then(processMod, consoleError);
78
78
  }
79
79
  }
80
80
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["bonus-elevate-shop-assets-slider_3.cjs",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"mbSource":["handleMbSourceChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
11
+ return index.bootstrapLazy([["bonus-elevate-shop-assets-slider_5.cjs",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32],"powerUpGames":[32],"isLoadingGames":[32]}],[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"mbSource":["handleMbSourceChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -14,6 +14,18 @@
14
14
  "tags": [
15
15
  "general-styling-wrapper"
16
16
  ]
17
+ },
18
+ {
19
+ "name": "@everymatrix/ui-image",
20
+ "tags": [
21
+ "ui-image"
22
+ ]
23
+ },
24
+ {
25
+ "name": "@everymatrix/ui-skeleton",
26
+ "tags": [
27
+ "ui-skeleton"
28
+ ]
17
29
  }
18
30
  ],
19
31
  "bundles": []
@@ -115,11 +115,11 @@ export class BonusElevateShopAssetsSlider {
115
115
  const itemStyle = {
116
116
  width: `${this.itemElementWidth / this.itemsPerPage}px`
117
117
  };
118
- return h("div", { key: '3740bd5b367f4e24f0b4391dc7f25c63ccb12958', class: "SliderWrapper" }, h("div", { key: '6aac842f54de59cea8b2f2655e8408a8778702d4', class: 'MainContent ' }, this.showSliderArrows &&
119
- h("div", { key: '94de38b6a631824bbe15964d70377639af769917', class: `SliderNavButton LeftArrow ${this.activeIndex === 0 ? 'DisabledArrow ' : ''} ${this.sliderItems.length === 1 ? 'HiddenArrow ' : ''}`, onClick: () => this.move(-1) }, h("svg", { key: '382d3d0c54932b359b2be4b9ed8c3db3c6da49ec', fill: "none", stroke: "var(--emw--color-secondary, #FD2839)", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '9b4d592aa650ddff2fbd8625a8b0a5d1b604c723', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M15 19l-7-7 7-7" }))), h("div", { key: 'b3ec493624a11931eb48e44eb620373b2613d0a8', class: 'ItemsWrapper', ref: (el) => this.sliderItemsElement = el }, h("div", { key: '724e11f1b3899c0f4bb179fff9b60f40c363e7f1', class: 'Items AssetsItems', style: styles }, this.sliderItems.map((assetUrl) => h("img", { class: `img${this.itemsPerPage}`, alt: 'Gift Thumbnails', style: itemStyle, src: assetUrl })))), this.showSliderArrows &&
120
- h("div", { key: '2791a14781f73619c122401a97a9833e33787282', class: `SliderNavButton RightArrow ${this.sliderItems.length === 1 ? 'HiddenArrow ' : ''}
121
- ${(this.activeIndex === (this.sliderItems.length - 1) || this.itemsPerPage == this.sliderItems.length) ? 'DisabledArrow' : ''}`, onClick: () => this.move(1) }, h("svg", { key: '3810b14f2a0fc436601186335a01b7af90aabab5', fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '18178c52a74cf77c856f65b6f377a350fc672db8', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M9 5l7 7-7 7" })))), this.showSliderDots && this.sliderItems.length > 1 &&
122
- h("div", { key: '83964fb11e6728adb065958ebfbf17902e301b2e', class: "DotsWrapper" }, h("ul", { key: 'cafab68d463e25a0847306314c64041bc3f107f7', class: "Dots" }, this.renderDots())));
118
+ return h("div", { key: '740222cee57f5759854860f015dd900c1cb66f80', class: "SliderWrapper" }, h("div", { key: '6d8971425bc1fc42bc4e64331b0c5f21d4ed1c40', class: 'MainContent ' }, this.showSliderArrows &&
119
+ h("div", { key: '1db77bb5cd7dfb6d5e06a4f42a33ff435f9eb224', class: `SliderNavButton LeftArrow ${this.activeIndex === 0 ? 'DisabledArrow ' : ''} ${this.sliderItems.length === 1 ? 'HiddenArrow ' : ''}`, onClick: () => this.move(-1) }, h("svg", { key: 'e406abe6d9d44ab3809322d2f0699ea3ee372b0f', fill: "none", stroke: "var(--emw--color-secondary, #FD2839)", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'a8ee39ea455a06058466e03755582fbd07391514', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M15 19l-7-7 7-7" }))), h("div", { key: 'a2681048af708d96aa6886db7b6b94639a650a26', class: 'ItemsWrapper', ref: (el) => this.sliderItemsElement = el }, h("div", { key: 'be1c762012144756bda71a46302dfe0954bc6add', class: 'Items AssetsItems', style: styles }, this.sliderItems.map((assetUrl) => h("img", { class: `img${this.itemsPerPage}`, alt: 'Gift Thumbnails', style: itemStyle, src: assetUrl })))), this.showSliderArrows &&
120
+ h("div", { key: '927367a3bbc674cc953eccc3359639381423d0a4', class: `SliderNavButton RightArrow ${this.sliderItems.length === 1 ? 'HiddenArrow ' : ''}
121
+ ${(this.activeIndex === (this.sliderItems.length - 1) || this.itemsPerPage == this.sliderItems.length) ? 'DisabledArrow' : ''}`, onClick: () => this.move(1) }, h("svg", { key: 'd84e6e3011f8609f1ded47098bb28333f352f430', fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'f05768932ee5e8fb74b6b1016612320d0e4ed737', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M9 5l7 7-7 7" })))), this.showSliderDots && this.sliderItems.length > 1 &&
122
+ h("div", { key: 'a08098a90c717ccceda93cd741cb65521a83df9b', class: "DotsWrapper" }, h("ul", { key: '8c873c229c603b4aca57e277f74cdf3d2192c01b', class: "Dots" }, this.renderDots())));
123
123
  }
124
124
  static get is() { return "bonus-elevate-shop-assets-slider"; }
125
125
  static get properties() {
@@ -1,11 +1,11 @@
1
1
  :host {
2
2
  display: block;
3
+ --game-amount-per-line: 6;
3
4
  }
4
5
 
5
6
  .ElevateDetails {
6
7
  display: flex;
7
8
  flex-direction: row;
8
- flex-wrap: wrap;
9
9
  padding: 10px;
10
10
  width: calc(100% - 20px);
11
11
  /*Slider styles*/
@@ -61,6 +61,9 @@
61
61
  .ElevateDetails .ShopItemDetail {
62
62
  flex-grow: 1;
63
63
  min-width: 300px;
64
+ display: flex;
65
+ flex-direction: column;
66
+ justify-content: space-between;
64
67
  }
65
68
  .ElevateDetails .GiftPoints .Points {
66
69
  font-size: 21px;
@@ -184,4 +187,92 @@
184
187
  opacity: 0.2;
185
188
  stroke: var(--emw--color-secondary, #FD2839);
186
189
  pointer-events: none;
190
+ }
191
+
192
+ .GamesContent {
193
+ margin: 20px;
194
+ padding: 15px;
195
+ min-height: 500px;
196
+ flex: 1;
197
+ gap: 12px;
198
+ display: flex;
199
+ flex-direction: column;
200
+ border-radius: 8px;
201
+ border: 2px solid var(--emw--color-powup-light-green-0D, rgba(188, 252, 177, 0.0509803922));
202
+ }
203
+ .GamesContent .GamesTitle {
204
+ display: flex;
205
+ flex-direction: row;
206
+ }
207
+ .GamesContent .GamesTitle .Title2 {
208
+ text-transform: capitalize;
209
+ }
210
+ .GamesContent .GamesTitle .GamesAmount {
211
+ opacity: 0.8;
212
+ }
213
+ .GamesContent .GameTitleTip {
214
+ color: var(--emw--color-powup-gray-green, #C8D6CE);
215
+ font-size: 0.8rem;
216
+ }
217
+ .GamesContent .GamesList {
218
+ display: flex;
219
+ justify-content: center;
220
+ width: 100%;
221
+ max-height: 300px;
222
+ flex: 1;
223
+ overflow-y: auto;
224
+ scrollbar-width: thin;
225
+ scrollbar-color: var(--emw--background-gray-color, gray) transparent;
226
+ }
227
+ .GamesContent .GamesList::-webkit-scrollbar-track {
228
+ background-color: transparent;
229
+ border-radius: 5px;
230
+ }
231
+ .GamesContent .GamesList .Games {
232
+ width: 100%;
233
+ padding: 0;
234
+ display: flex;
235
+ align-items: flex-start;
236
+ justify-content: flex-start;
237
+ flex-wrap: wrap;
238
+ gap: calc(30px / (var(--game-amount-per-line) - 1));
239
+ }
240
+ .GamesContent .GamesList .Games .Game {
241
+ width: calc((100% - 30px) / var(--game-amount-per-line));
242
+ cursor: pointer;
243
+ position: relative;
244
+ }
245
+ .GamesContent .GamesList .Games .Game .GameMask {
246
+ transition: opacity;
247
+ transition-duration: 0.2s;
248
+ opacity: 0;
249
+ position: absolute;
250
+ width: 70%;
251
+ height: 100%;
252
+ }
253
+ .GamesContent .GamesList .Games .Game:hover .mask-filter {
254
+ opacity: 1;
255
+ }
256
+ .GamesContent .GamesList .Games .Game:hover img {
257
+ opacity: 0.4;
258
+ filter: blur(1.5px);
259
+ }
260
+ .GamesContent .GamesList .Games .Game:hover .GameMask {
261
+ opacity: 1;
262
+ mix-blend-mode: screen;
263
+ background-color: var(--emw--color-powup-green, #24B24E);
264
+ display: flex;
265
+ justify-content: center;
266
+ align-items: center;
267
+ position: absolute;
268
+ width: 100%;
269
+ left: 0;
270
+ height: 100%;
271
+ top: 0;
272
+ border-radius: 8px;
273
+ }
274
+ .GamesContent .GamesList .Games .Game:hover .GameMask .PlayBtn {
275
+ border: 2px solid var(--emw--color-powup-gray, #f0f0f0);
276
+ padding: 5px 3px;
277
+ border-radius: 3px;
187
278
  }
@@ -2,10 +2,15 @@ import { Fragment, h, Host } from "@stencil/core";
2
2
  import "../../../../../general-styling-wrapper/dist/types/index";
3
3
  import { getTranslations, translate } from "../../utils/locale.utils";
4
4
  import { getDevicePlatform } from "../../utils/utils";
5
+ import "../../../../../ui-image/dist/types/index";
5
6
  export class BonusElevateShopItem {
6
7
  constructor() {
7
8
  this.bindedHandler = this.handleMessage.bind(this);
8
9
  this.deviceType = getDevicePlatform();
10
+ this.powerUpGameSearchConditions = {
11
+ expand: "games",
12
+ fields: "powerUpID,games(id,gameId,slug,name,thumbnail)"
13
+ };
9
14
  this.endpoint = undefined;
10
15
  this.language = 'en';
11
16
  this.itemId = undefined;
@@ -20,6 +25,8 @@ export class BonusElevateShopItem {
20
25
  this.isGiftNotFound = false;
21
26
  this.redeemErrorMsg = '';
22
27
  this.isRedeeming = false;
28
+ this.powerUpGames = undefined;
29
+ this.isLoadingGames = false;
23
30
  }
24
31
  redeemGiftConfirm() {
25
32
  if (this.isRedeeming || this.elevateGift.available != 'true') {
@@ -86,6 +93,9 @@ export class BonusElevateShopItem {
86
93
  let filteredGifts = data.data;
87
94
  if (filteredGifts && filteredGifts.length == 1) {
88
95
  this.elevateGift = filteredGifts[0];
96
+ if (this.elevateGift.type === 'powerUp' && this.elevateGift.powerUpID) {
97
+ this.loadMoreGames();
98
+ }
89
99
  this.isGiftNotFound = false;
90
100
  }
91
101
  else {
@@ -95,8 +105,67 @@ export class BonusElevateShopItem {
95
105
  });
96
106
  });
97
107
  }
108
+ async loadMoreGames() {
109
+ var _a, _b, _c, _d, _e;
110
+ if (this.isLoadingGames || (((_a = this.powerUpGames) === null || _a === void 0 ? void 0 : _a.total) > 0 && ((_b = this.powerUpGames) === null || _b === void 0 ? void 0 : _b.items.length) >= ((_c = this.powerUpGames) === null || _c === void 0 ? void 0 : _c.total))) {
111
+ return;
112
+ }
113
+ this.isLoadingGames = true;
114
+ try {
115
+ const url = new URL(`${this.endpoint}/v1/elevate/powerups/available?pagination=games(limit=20,offset=${((_d = this.powerUpGames) === null || _d === void 0 ? void 0 : _d.items.length) || 0})`);
116
+ const options = {
117
+ headers: { 'x-SessionId': this.session },
118
+ };
119
+ url.searchParams.append('filter', `id=${this.elevateGift.powerUpID}`);
120
+ Object.entries(this.powerUpGameSearchConditions).forEach(([key, value]) => {
121
+ url.searchParams.append(key, value);
122
+ });
123
+ const response = await fetch(url.toString(), options);
124
+ if (!response.ok) {
125
+ throw new Error(`HTTP error! status: ${response.status}`);
126
+ }
127
+ const { data } = await response.json();
128
+ const fetchedPowerUp = data === null || data === void 0 ? void 0 : data[0];
129
+ if ((_e = fetchedPowerUp === null || fetchedPowerUp === void 0 ? void 0 : fetchedPowerUp.games) === null || _e === void 0 ? void 0 : _e.items) {
130
+ if (!this.powerUpGames) {
131
+ this.powerUpGames = fetchedPowerUp.games;
132
+ }
133
+ else {
134
+ this.powerUpGames.items = [...this.powerUpGames.items, ...fetchedPowerUp.games.items];
135
+ }
136
+ this.powerUpGames = Object.assign({}, this.powerUpGames);
137
+ }
138
+ }
139
+ catch (error) {
140
+ console.error('Failed to load more games:', error);
141
+ }
142
+ finally {
143
+ this.isLoadingGames = false;
144
+ }
145
+ }
146
+ initializeGamesObserver() {
147
+ if (this.loadMoreGamesObserver) {
148
+ this.loadMoreGamesObserver.disconnect();
149
+ }
150
+ this.loadMoreGamesObserver = new IntersectionObserver((entries) => {
151
+ entries.forEach((entry) => {
152
+ if (entry.isIntersecting) {
153
+ this.loadMoreGames();
154
+ }
155
+ });
156
+ });
157
+ if (this.lastGameElement) {
158
+ this.loadMoreGamesObserver.observe(this.lastGameElement);
159
+ }
160
+ }
161
+ onGameClick(game) {
162
+ window.postMessage({ type: 'EngagementSuiteGameRedirect', data: { Slug: game.slug } });
163
+ }
98
164
  disconnectedCallback() {
99
165
  window.removeEventListener('message', this.bindedHandler, false);
166
+ if (this.loadMoreGamesObserver) {
167
+ this.loadMoreGamesObserver.disconnect();
168
+ }
100
169
  }
101
170
  componentDidLoad() {
102
171
  window.addEventListener('message', this.bindedHandler, false);
@@ -112,11 +181,21 @@ export class BonusElevateShopItem {
112
181
  await this.loadElevateGift();
113
182
  }
114
183
  }
184
+ componentDidUpdate() {
185
+ var _a, _b;
186
+ if (((_a = this.powerUpGames) === null || _a === void 0 ? void 0 : _a.items.length) < ((_b = this.powerUpGames) === null || _b === void 0 ? void 0 : _b.total)) {
187
+ this.initializeGamesObserver();
188
+ }
189
+ }
115
190
  render() {
116
- return (h(Host, { key: '059f0eb449e36b30ce271306a9faf85b79197f36' }, h("general-styling-wrapper", { key: '4b857c7d532d288c660fc9b9cfc28c17ba80c400', clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, mbSource: this.mbSource }), h("div", { key: 'b400e365431afc6af40c11010b708a72525d4af6', class: 'ElevateDetails' }, this.isGiftNotFound && (h(Fragment, { key: '93a532a9d25137fe02aca600c98237f08dbc5347' }, h("div", { key: 'b423b7b20c4e6829ecd5cf53ab860b909ac639d5', class: "Row ThumbnailRow" }, h("div", { key: 'eaafe445f831699a1f4a22bc951a68e211bc1eb1', class: "BackButton", onClick: () => {
191
+ var _a, _b, _c;
192
+ return (h(Host, { key: '02194284778bc18ed94c17ee0c4a682da0c9935e' }, h("general-styling-wrapper", { key: '3109c90669d039df0aa7caf8dac48ca7576b1db2', clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, mbSource: this.mbSource }), h("div", { key: 'aa8fa9853ff3f0c50cf055f622640f187138531b', class: 'ElevateDetails' }, this.isGiftNotFound && (h(Fragment, { key: '1ff8d0e249663ea5f2ee0de06d406f962f973493' }, h("div", { key: '5575275bd24e74a530ffd2b8b17045f7b0daed7c', class: "Row ThumbnailRow" }, h("div", { key: '501b117a2c493750deb056ecf8f8614351c0fac2', class: "BackButton", onClick: () => {
117
193
  this.onBackClicked();
118
- } }, h("span", { key: '70105de7173a933b921bd4a78c62c4d6e5cf847e', class: "BackArrow", innerHTML: "<" }), h("span", { key: 'd695e223a899ae130355d5ee083a622b7cf131dd', class: "BackTxt" }, " ", translate('back', this.language), " "))), h("div", { key: 'f9624e689b03b06c0937f81821ff4e00c0911851', class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && h(Fragment, { key: '5c104bba7cd29706418cffa9ffdd20d13714bf2a' }, h("div", { key: 'c100262b2d4547e1a81108426fa07e6a66e8f560', class: "ThumbnailRow" }, h("div", { key: 'bf573c9685c7afe71239faced77bfaef4fab2a37', class: 'Row' }, h("div", { key: '10ff56e0df5eca9792428fc5279a79d79f619c56', class: "BackButton", onClick: () => { this.onBackClicked(); } }, h("span", { key: '899bbe9f1288b49743d51f4afec8b9237052b7f1', class: "BackArrow", innerHTML: "<" }), h("span", { key: 'f4dd1b849114f4fd9743b6726394aacf444a6e7b', class: "BackTxt" }, " ", translate('back', this.language), " ")), h("bonus-elevate-shop-assets-slider", { key: 'b11de8226e28e3038e70615093e07dd7ae896730', class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), h("div", { key: '4084bea351593009e0a3a9dd3e3cb70b9d1a864c', class: 'Col Details' }, h("h3", { key: '2346e29ead91d6ace97f99fa768c46db704d1ab9', class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), h("div", { key: '835a0b059b2c0399cdb442a8376b0ef8ddf1c9e2', class: "GiftPoints" }, h("span", { key: '73afb596b3b493736e67c3b62207b2dc7dbc27d9', class: "Points" }, this.elevateGift.points, " "), h("span", { key: '7a484d65195a5e6e32b079ca31410eefd239a240', class: " PointsLabel" }, translate('coins', this.language))))), h("div", { key: 'f318deaf612752dc61b49e57b5751755800291ea', class: 'ShopItemDetail Details' }, h("div", { key: '2a7b77649b74baad93816eabf8413d0b45930f83', class: "GiftPresentation" }, h("p", { key: '3ce1a1a6adb36127b3526e005a3ac49349349bfd' }, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), h("div", { key: 'e8f61acba748c582288e2053f61c7efc754bb8f9', class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled deactive' : ' active '}
119
- ${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeemGift', this.language)), h("span", { key: '8cfe770fbbe29d1aebab26826146590cc1ecd177', class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " "))))));
194
+ } }, h("span", { key: '556a1ece3c4b8398277ad996ed58d0d84db0f7b4', class: "BackArrow", innerHTML: "<" }), h("span", { key: '43f9a46fe32710cc7d05e953475088f049999791', class: "BackTxt" }, " ", translate('back', this.language), " "))), h("div", { key: 'ba220234e040ed863b3bbc1960b54ced43fe4303', class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && h(Fragment, { key: 'e1f7f2dfd7d80da3fafdc5edd8d8686522509893' }, h("div", { key: '4a8f3ee47e7ef7bd87eafa5ebdd3346b523f13fd', class: "ThumbnailRow" }, h("div", { key: 'd8dcab9b4b3d4963cd4ef7904caca9e1df3a6e88', class: 'Row' }, h("div", { key: '6368dc35f95a2202cc38c5dc05bdf6f6d83fce55', class: "BackButton", onClick: () => { this.onBackClicked(); } }, h("span", { key: '64f67312085b9216b42cb61a9ee7ea780058856d', class: "BackArrow", innerHTML: "<" }), h("span", { key: '4e5d8bdec62fe9e32cb839e3904113449e4d4c0c', class: "BackTxt" }, " ", translate('back', this.language), " ")), h("bonus-elevate-shop-assets-slider", { key: '0b9e8164653ec6a7c8b9d1d260ed44ca641f0726', class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), h("div", { key: 'd911392a0ce5afac58cdf26046d80cfdaf7c1793', class: 'Col Details' }, h("h3", { key: '273ff2eb682767a5429dc99642b1c166921cb1dc', class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), h("div", { key: '459bcb83df4dc907bb7cc9757a86c88b39ca4905', class: "GiftPoints" }, h("span", { key: '3648c21ea2133c6a3050f2417449ab046e51c04b', class: "Points" }, this.elevateGift.points, " "), h("span", { key: '8b6665da119f9dd777644592cc2815fc77dffda1', class: " PointsLabel" }, translate('coins', this.language))))), h("div", { key: '6e9a28dd26368897ddfd76032ce1e3882a886a5b', class: 'ShopItemDetail Details' }, h("div", { key: 'd2844066fe51e4b3d43689406879e1306d494f0a', class: "GiftPresentation" }, h("p", { key: '12f8bce3abf0df34657392e95aa8ddfb42d4c088' }, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), h("div", { key: '2b0cc39b8e53336355f1f5d0576a59bfd9859abf', class: 'BottomDetail' }, h("div", { key: '0eabb8f4ecb8236d78665110c835a0cf2689e864', class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled deactive' : ' active '}
195
+ ${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeemGift', this.language)), h("span", { key: '9773077b08f77bc2940519070053aee362f34e2a', class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " "))))), ((_a = this.elevateGift) === null || _a === void 0 ? void 0 : _a.type) === 'powerUp' && this.powerUpGames && h("div", { key: 'ec880bb1c11a7fb485f4d7e80dce6e250f2b4e19', class: 'GamesContent' }, h("div", { key: 'a6dc572f4f5b6732ed6d29fad4c76fbf0415ca68', class: 'GamesTitle' }, h("span", { key: '2904186a96290683dbbcd06cfca99f48c616f6f1', class: 'Title2' }, " ", translate('games', this.language)), h("span", { key: '9c7f5fa7f0441721bc32aab10b07c3f7f2de91c4', class: 'GamesAmount' }, " ( ", ((_b = this.powerUpGames) === null || _b === void 0 ? void 0 : _b.total) || 0, " ) ")), h("div", { key: '4f465d62df13e07bf2d946416ed70cdd52591cbb', class: 'GamesList' }, h("div", { key: 'd23fc7b21125dd6467ad56cbd7d2ce03a579d689', class: 'Games' }, (_c = this.powerUpGames) === null || _c === void 0 ? void 0 : _c.items.map((g, index) => {
196
+ const isLastItem = index === this.powerUpGames.items.length - 1;
197
+ return h("div", { class: 'Game', ref: isLastItem ? (el) => (this.lastGameElement = el) : null }, h("ui-image", { src: g.thumbnail }), h("div", { class: 'GameMask', onClick: this.onGameClick.bind(this, g) }, h("span", { class: 'PlayBtn' }, "Start Now!")));
198
+ })), this.isLoadingGames && h("p", { key: '89e860b88abc15beda61b9989e5a82a9f445aadd' }, "Loading more games...")))));
120
199
  }
121
200
  static get is() { return "bonus-elevate-shop-item"; }
122
201
  static get encapsulation() { return "shadow"; }
@@ -335,7 +414,9 @@ export class BonusElevateShopItem {
335
414
  return {
336
415
  "isGiftNotFound": {},
337
416
  "redeemErrorMsg": {},
338
- "isRedeeming": {}
417
+ "isRedeeming": {},
418
+ "powerUpGames": {},
419
+ "isLoadingGames": {}
339
420
  };
340
421
  }
341
422
  static get events() {
@@ -8,6 +8,7 @@ export const TRANSLATIONS = {
8
8
  error4003: 'Invalid Session',
9
9
  redeemFailed: 'Failed to redeem',
10
10
  back: 'Back',
11
+ games: 'Games'
11
12
  },
12
13
  tr: {
13
14
  coins: 'Coin',