@everymatrix/bonus-elevate-powerups-history 0.0.1
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.
- package/dist/bonus-elevate-powerups-history/app-globals-0f993ce5.js +1 -0
- package/dist/bonus-elevate-powerups-history/bonus-elevate-powerups-history-f4ca3b40.js +9 -0
- package/dist/bonus-elevate-powerups-history/bonus-elevate-powerups-history.esm.js +1 -0
- package/dist/bonus-elevate-powerups-history/bonus-elevate-powerups-history_2.entry.js +1 -0
- package/dist/bonus-elevate-powerups-history/index-ee6f3831.js +2 -0
- package/dist/bonus-elevate-powerups-history/index.esm.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/bonus-elevate-powerups-history-efe8778d.js +6036 -0
- package/dist/cjs/bonus-elevate-powerups-history.cjs.js +25 -0
- package/dist/cjs/bonus-elevate-powerups-history_2.cjs.entry.js +210 -0
- package/dist/cjs/index-c9c2e922.js +1290 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/collection/assets/clear-search.svg +9 -0
- package/dist/collection/assets/left-arrow.svg +3 -0
- package/dist/collection/collection-manifest.json +19 -0
- package/dist/collection/components/bonus-elevate-powerups-history/bonus-elevate-powerups-history.css +101 -0
- package/dist/collection/components/bonus-elevate-powerups-history/bonus-elevate-powerups-history.js +330 -0
- package/dist/collection/components/bonus-elevate-powerups-history/index.js +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +48 -0
- package/dist/collection/utils/utils.js +24 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/bonus-elevate-powerups-history-f4ca3b40.js +6034 -0
- package/dist/esm/bonus-elevate-powerups-history.js +20 -0
- package/dist/esm/bonus-elevate-powerups-history_2.entry.js +205 -0
- package/dist/esm/index-ee6f3831.js +1263 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.dev.js +20 -0
- package/dist/stencil.config.js +20 -0
- package/dist/storybook/main.js +43 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-powerups-history/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-powerups-history/.stencil/libs/common/src/types/casino/powerups.d.ts +64 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-powerups-history/.stencil/packages/stencil/bonus-elevate-powerups-history/stencil.config.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-powerups-history/.stencil/packages/stencil/bonus-elevate-powerups-history/stencil.config.dev.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-powerups-history/.stencil/packages/stencil/bonus-elevate-powerups-history/storybook/main.d.ts +3 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-powerups-history/.stencil/packages/stencil/bonus-elevate-powerups-history/storybook/preview.d.ts +70 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-powerups-history/.stencil/tools/plugins/index.d.ts +4 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-powerups-history/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-powerups-history/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-powerups-history/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-powerups-history/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/bonus-elevate-powerups-history/bonus-elevate-powerups-history.d.ts +31 -0
- package/dist/types/components/bonus-elevate-powerups-history/index.d.ts +1 -0
- package/dist/types/components.d.ts +53 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +21 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +27 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const bonusElevatePowerupsHistory = require('./bonus-elevate-powerups-history-efe8778d.js');
|
|
6
|
+
require('./index-c9c2e922.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.BonusElevatePowerupsHistory = bonusElevatePowerupsHistory.BonusElevatePowerupsHistory;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-c9c2e922.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
const defineCustomElements = async (win, options) => {
|
|
9
|
+
if (typeof window === 'undefined') return undefined;
|
|
10
|
+
await appGlobals.globalScripts();
|
|
11
|
+
return index.bootstrapLazy([["bonus-elevate-powerups-history_2.cjs",[[1,"bonus-elevate-powerups-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"endpoint":[513],"session":[513],"pageSize":[514,"page-size"],"translationUrl":[513,"translation-url"],"isLoading":[32],"powerups":[32],"offset":[32],"limit":[32],"total":[32]},[[8,"reloadPageByType","onReloadPageByType"]],{"offset":["loadData"],"limit":["loadData"],"language":["loadData"],"session":["loadData"],"endpoint":["loadData"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}],[0,"bonus-pagination-nav",{"total":[1538],"limit":[1538],"offset":[1538],"tableId":[1537,"table-id"],"language":[1537],"translationUrl":[513,"translation-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"displayPageNumbers":[1540,"display-page-numbers"],"displayRangeOfTotal":[1540,"display-range-of-total"],"navItemAccount":[1538,"nav-item-account"],"endPageIndex":[32],"pagesArray":[32],"currentPage":[32],"showAsEllipsisMid":[32]},[[8,"paginationReset","pageLimitChangedHandler"],[8,"pageLimitChanged","pageLimitChangedHandler"]]]]]], options);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.setNonce = index.setNonce;
|
|
15
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
2
|
+
<rect width="52" height="52" fill="url(#pattern0_1132_30534)"/>
|
|
3
|
+
<defs>
|
|
4
|
+
<pattern id="pattern0_1132_30534" patternContentUnits="objectBoundingBox" width="1" height="1">
|
|
5
|
+
<use xlink:href="#image0_1132_30534" transform="scale(0.01)"/>
|
|
6
|
+
</pattern>
|
|
7
|
+
<image id="image0_1132_30534" width="100" height="100" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAHlElEQVR4nO2daYwURRTH/4tnvPCI9xE1ahQTNZmp6gXRzar4wTtGvPWLUe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byaxHM4jFoSnOcWI877Yknji5Wv6BOFZnht0J7AaDFFrZQ0XowgkOp/RhzbObDQeRlr5EOamne2YGc0elmlnNwv7vuJuDWrRIwi/8WXNKAppnlyShHad674Fz2o+SsBnCFEU2BfVipNLQb9P6bWkt4vGWoTCl3zmkW+cQJFolRgDYd8ROyjDvNrk145v4csvwx15grOOuWAoxKgXNCpXMSq6uoP/J4R3BeGrKHPxVw4ohR++/98nRQc1O3ORiNAMSZPYPC3Ai+EQXgyH8GI4hBfDIbwYDuHFcAgvhkN4MRzCi+EQXgyH8GI4hBcjLzfBDfDaupaDW3g4WcBbhuuieDEcEsWL4Q5hnpOfMzwej8fj8Xg8Ho/H4/GgyPwHN+MBWXHaP7AAAAAASUVORK5CYII="/>
|
|
8
|
+
</defs>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.25592 0.244078C7.58136 0.569515 7.58136 1.09715 7.25592 1.42259L2.84518 5.83333H12.5C12.9602 5.83333 13.3333 6.20643 13.3333 6.66667C13.3333 7.1269 12.9602 7.5 12.5 7.5H2.84518L7.25592 11.9107C7.58136 12.2362 7.58136 12.7638 7.25592 13.0893C6.93049 13.4147 6.40285 13.4147 6.07741 13.0893L0.244078 7.25592C-0.0813592 6.93049 -0.0813592 6.40285 0.244078 6.07741L6.07741 0.244078C6.40285 -0.0813592 6.93049 -0.0813592 7.25592 0.244078Z" fill="white"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
"components/bonus-elevate-powerups-history/bonus-elevate-powerups-history.js"
|
|
4
|
+
],
|
|
5
|
+
"compiler": {
|
|
6
|
+
"name": "@stencil/core",
|
|
7
|
+
"version": "4.19.2",
|
|
8
|
+
"typescriptVersion": "5.4.5"
|
|
9
|
+
},
|
|
10
|
+
"collections": [
|
|
11
|
+
{
|
|
12
|
+
"name": "@everymatrix/bonus-pagination-nav",
|
|
13
|
+
"tags": [
|
|
14
|
+
"bonus-pagination-nav"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"bundles": []
|
|
19
|
+
}
|
package/dist/collection/components/bonus-elevate-powerups-history/bonus-elevate-powerups-history.css
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.PowerUpsContainer {
|
|
6
|
+
font-size: 1em;
|
|
7
|
+
display: flex;
|
|
8
|
+
width: 100%;
|
|
9
|
+
color: var(--emw--color-typography, #FFFFFF);
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
}
|
|
12
|
+
.PowerUpsContainer.Empty {
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
}
|
|
16
|
+
.PowerUpsContainer .EmptyPowerups {
|
|
17
|
+
font-family: Roboto;
|
|
18
|
+
font-weight: 400;
|
|
19
|
+
font-size: 1.2em;
|
|
20
|
+
line-height: 24px;
|
|
21
|
+
text-align: center;
|
|
22
|
+
vertical-align: middle;
|
|
23
|
+
width: max-content;
|
|
24
|
+
margin: auto;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
padding: 50px;
|
|
28
|
+
}
|
|
29
|
+
.PowerUpsContainer .EmptyPowerups .Icon, .PowerUpsContainer .EmptyPowerups .NoPowerTitle {
|
|
30
|
+
text-align: center;
|
|
31
|
+
}
|
|
32
|
+
.PowerUpsContainer .EmptyPowerups .Icon svg, .PowerUpsContainer .EmptyPowerups .NoPowerTitle svg {
|
|
33
|
+
width: 40px;
|
|
34
|
+
}
|
|
35
|
+
.PowerUpsContainer .EmptyPowerups .NoPowerTitle {
|
|
36
|
+
font-size: 1.2em;
|
|
37
|
+
font-weight: bold;
|
|
38
|
+
margin: 10px;
|
|
39
|
+
}
|
|
40
|
+
.PowerUpsContainer .PowerUps {
|
|
41
|
+
width: 100%;
|
|
42
|
+
display: flex;
|
|
43
|
+
gap: 20px;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
padding-inline-start: 0px;
|
|
46
|
+
}
|
|
47
|
+
.PowerUpsContainer .PowerUpItem {
|
|
48
|
+
display: flex;
|
|
49
|
+
justify-content: space-between;
|
|
50
|
+
border: 2px solid var(--Stroke-Green-Light, rgba(188, 252, 177, 0.0509803922));
|
|
51
|
+
opacity: 1;
|
|
52
|
+
border-radius: 12px;
|
|
53
|
+
border-width: 2px;
|
|
54
|
+
padding: 20px;
|
|
55
|
+
gap: 4px;
|
|
56
|
+
text-transform: uppercase;
|
|
57
|
+
}
|
|
58
|
+
.PowerUpsContainer .PowerUpItem .HistoryRight {
|
|
59
|
+
text-align: right;
|
|
60
|
+
}
|
|
61
|
+
.PowerUpsContainer .PowerUpItem .HistoryLeft, .PowerUpsContainer .PowerUpItem .HistoryRight {
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: 8px;
|
|
65
|
+
}
|
|
66
|
+
.PowerUpsContainer .PowerUpItem .DisplayName {
|
|
67
|
+
font-family: Montserrat;
|
|
68
|
+
text-transform: none;
|
|
69
|
+
font-weight: 500;
|
|
70
|
+
font-size: 1.2em;
|
|
71
|
+
line-height: 100%;
|
|
72
|
+
vertical-align: middle;
|
|
73
|
+
}
|
|
74
|
+
.PowerUpsContainer .Pagination {
|
|
75
|
+
display: flex;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
}
|
|
78
|
+
.PowerUpsContainer .Pagination .PageNavigation .PageArrow {
|
|
79
|
+
color: var(--emw--color-typography, #ece7e7);
|
|
80
|
+
}
|
|
81
|
+
.PowerUpsContainer .Pagination .PageNavigation .PageArrow.Disabled {
|
|
82
|
+
opacity: 0.5;
|
|
83
|
+
}
|
|
84
|
+
.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem:hover {
|
|
85
|
+
background-color: transparent;
|
|
86
|
+
}
|
|
87
|
+
.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem {
|
|
88
|
+
width: 22px;
|
|
89
|
+
height: 22px;
|
|
90
|
+
line-height: 22px;
|
|
91
|
+
opacity: 1;
|
|
92
|
+
border-radius: 22px;
|
|
93
|
+
padding: 6px;
|
|
94
|
+
border: 2px solid var(--emw--gradient-color-2, rgba(188, 252, 177, 0.0509803922));
|
|
95
|
+
}
|
|
96
|
+
.PowerUpsContainer .Pagination ul.PaginationArea li.PageItem.Active {
|
|
97
|
+
border-radius: 22px;
|
|
98
|
+
border: 2px solid var(--emw--color-primary, #00B74F);
|
|
99
|
+
color: var(--emw--color-primary, #00B74F);
|
|
100
|
+
background-color: transparent;
|
|
101
|
+
}
|
package/dist/collection/components/bonus-elevate-powerups-history/bonus-elevate-powerups-history.js
ADDED
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
|
|
3
|
+
import { BoostingPeriodMode, MultiplierMode, PowerUpStatus } from "../../../../../../../../libs/common/src/types/casino/powerups";
|
|
4
|
+
import { getTranslations, translate } from "../../utils/locale.utils";
|
|
5
|
+
import ClearSearch from "../../assets/clear-search.svg";
|
|
6
|
+
import moment from "moment";
|
|
7
|
+
import "../../../../../bonus-pagination-nav/dist/types/index";
|
|
8
|
+
import { PowerUpStatusEntry } from "../../utils/utils";
|
|
9
|
+
export class BonusElevatePowerupsHistory {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.historyTableId = 'powerupsHistory';
|
|
12
|
+
this.mbSource = undefined;
|
|
13
|
+
this.clientStyling = undefined;
|
|
14
|
+
this.clientStylingUrl = undefined;
|
|
15
|
+
this.language = 'en';
|
|
16
|
+
this.endpoint = undefined;
|
|
17
|
+
this.session = undefined;
|
|
18
|
+
this.pageSize = 20;
|
|
19
|
+
this.translationUrl = '';
|
|
20
|
+
this.isLoading = true;
|
|
21
|
+
this.powerups = [];
|
|
22
|
+
this.offset = 0;
|
|
23
|
+
this.limit = this.pageSize;
|
|
24
|
+
this.total = undefined;
|
|
25
|
+
}
|
|
26
|
+
onReloadPageByType(e) {
|
|
27
|
+
const { limit, offset, tableId } = e.detail;
|
|
28
|
+
if (tableId !== this.historyTableId) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
this.offset = offset;
|
|
32
|
+
this.limit = limit;
|
|
33
|
+
}
|
|
34
|
+
async loadData() {
|
|
35
|
+
if (!this.endpoint || !this.session) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.isLoading = true;
|
|
39
|
+
if (this.abortController) {
|
|
40
|
+
this.abortController.abort();
|
|
41
|
+
}
|
|
42
|
+
this.abortController = new AbortController();
|
|
43
|
+
try {
|
|
44
|
+
const url = new URL(`${this.endpoint}/v1/elevate/powerups?pagination=offset=${this.offset},limit=${this.limit}`);
|
|
45
|
+
let options = {
|
|
46
|
+
headers: {
|
|
47
|
+
'Content-Type': 'application/json',
|
|
48
|
+
'x-SessionId': this.session
|
|
49
|
+
},
|
|
50
|
+
method: 'GET',
|
|
51
|
+
signal: this.abortController.signal
|
|
52
|
+
};
|
|
53
|
+
url.searchParams.append('language', this.language);
|
|
54
|
+
url.searchParams.append('status', `${PowerUpStatus.CONSUMED},${PowerUpStatus.EXPIRED}`);
|
|
55
|
+
const response = await fetch(url, options);
|
|
56
|
+
if (!response.ok) {
|
|
57
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
58
|
+
}
|
|
59
|
+
const { data, total } = await response.json();
|
|
60
|
+
this.powerups = data;
|
|
61
|
+
this.total = total;
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
if (error.name !== 'AbortError') {
|
|
65
|
+
console.error("Failed to load powerups history:", error);
|
|
66
|
+
window.postMessage({ type: 'peHistoryLoaderError', error });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
if (!this.abortController.signal.aborted) {
|
|
71
|
+
this.isLoading = false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
render() {
|
|
76
|
+
var _a, _b;
|
|
77
|
+
return h("div", { key: 'ab37bc7f00578c9f5e4741dd89681522d5eafbad', class: `PowerUpsContainer ${((_a = this.powerups) === null || _a === void 0 ? void 0 : _a.length) ? 'List' : 'Empty'}`, ref: (el) => (this.stylingContainer = el) }, this.isLoading
|
|
78
|
+
? h("p", null, "Loading...")
|
|
79
|
+
: !((_b = this.powerups) === null || _b === void 0 ? void 0 : _b.length) ?
|
|
80
|
+
h("div", { class: 'EmptyPowerups' }, h("div", { class: 'Icon', innerHTML: ClearSearch }), h("span", { class: 'NoPowerTitle' }, translate('nothingHere', this.language)), h("span", null, translate('noPowerUps', this.language)), h("span", null, translate('gotoShop', this.language)), h("div", null))
|
|
81
|
+
: [h("ul", { class: 'PowerUps' }, this.powerups.map(powerup => {
|
|
82
|
+
var _a, _b, _c;
|
|
83
|
+
return h("li", { class: 'PowerUpItem' }, h("div", { class: 'HistoryLeft' }, h("div", { class: 'DisplayName' }, " ", ((_a = powerup.presentation) === null || _a === void 0 ? void 0 : _a.displayName[this.language]) || ((_b = powerup.presentation) === null || _b === void 0 ? void 0 : _b.displayName['*']) || '-', " "), h("div", { class: 'Details' }, h("span", { class: 'BoostingPeriod' }, h("span", { class: 'Period' }, powerup.boostingPeriod.minutes || powerup.boostingPeriod.numberOfRounds, " "), powerup.boostingPeriod.mode === BoostingPeriodMode.TIME_PERIOD ? translate('min', this.language) : translate('rounds', this.language), " "), h("span", { class: 'Multiplier' }, "| X", powerup.multiplier.coefficient, " "), h("span", { class: 'MultiplierMode' }, "| ", powerup.multiplier.mode === MultiplierMode.XP ? translate('xp', this.language) : translate('coins', this.language), " "))), h("div", { class: 'HistoryRight' }, h("div", null, translate(((_c = PowerUpStatusEntry[powerup.status]) === null || _c === void 0 ? void 0 : _c.label) || powerup.status, this.language)), h("div", null, moment(powerup.startTime).format('YYYY-MM-DD HH:mm:ss'), " ")));
|
|
84
|
+
})), h("div", { class: 'Pagination' }, this.total && this.total > this.limit &&
|
|
85
|
+
h("bonus-pagination-nav", { offset: this.offset, limit: this.limit, secondaryArrowsActive: true, total: this.total }))]);
|
|
86
|
+
}
|
|
87
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
88
|
+
if (newValue != oldValue) {
|
|
89
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
93
|
+
if (newValue != oldValue) {
|
|
94
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
98
|
+
if (newValue != oldValue) {
|
|
99
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
handleNewTranslations() {
|
|
103
|
+
getTranslations(this.translationUrl);
|
|
104
|
+
}
|
|
105
|
+
async componentWillLoad() {
|
|
106
|
+
if (this.translationUrl) {
|
|
107
|
+
await getTranslations(this.translationUrl);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
componentDidLoad() {
|
|
111
|
+
if (this.stylingContainer) {
|
|
112
|
+
if (this.mbSource)
|
|
113
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
114
|
+
if (this.clientStyling)
|
|
115
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
116
|
+
if (this.clientStylingUrl)
|
|
117
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
118
|
+
}
|
|
119
|
+
this.loadData();
|
|
120
|
+
}
|
|
121
|
+
disconnectedCallback() {
|
|
122
|
+
if (this.abortController) {
|
|
123
|
+
this.abortController.abort();
|
|
124
|
+
}
|
|
125
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
126
|
+
}
|
|
127
|
+
static get is() { return "bonus-elevate-powerups-history"; }
|
|
128
|
+
static get encapsulation() { return "shadow"; }
|
|
129
|
+
static get originalStyleUrls() {
|
|
130
|
+
return {
|
|
131
|
+
"$": ["bonus-elevate-powerups-history.scss"]
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
static get styleUrls() {
|
|
135
|
+
return {
|
|
136
|
+
"$": ["bonus-elevate-powerups-history.css"]
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
static get properties() {
|
|
140
|
+
return {
|
|
141
|
+
"mbSource": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"mutable": false,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "string",
|
|
146
|
+
"resolved": "string",
|
|
147
|
+
"references": {}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": false,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": ""
|
|
154
|
+
},
|
|
155
|
+
"attribute": "mb-source",
|
|
156
|
+
"reflect": true
|
|
157
|
+
},
|
|
158
|
+
"clientStyling": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"mutable": false,
|
|
161
|
+
"complexType": {
|
|
162
|
+
"original": "string",
|
|
163
|
+
"resolved": "string",
|
|
164
|
+
"references": {}
|
|
165
|
+
},
|
|
166
|
+
"required": false,
|
|
167
|
+
"optional": false,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": ""
|
|
171
|
+
},
|
|
172
|
+
"attribute": "client-styling",
|
|
173
|
+
"reflect": true
|
|
174
|
+
},
|
|
175
|
+
"clientStylingUrl": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"mutable": false,
|
|
178
|
+
"complexType": {
|
|
179
|
+
"original": "string",
|
|
180
|
+
"resolved": "string",
|
|
181
|
+
"references": {}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": ""
|
|
188
|
+
},
|
|
189
|
+
"attribute": "client-styling-url",
|
|
190
|
+
"reflect": true
|
|
191
|
+
},
|
|
192
|
+
"language": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"mutable": false,
|
|
195
|
+
"complexType": {
|
|
196
|
+
"original": "string",
|
|
197
|
+
"resolved": "string",
|
|
198
|
+
"references": {}
|
|
199
|
+
},
|
|
200
|
+
"required": false,
|
|
201
|
+
"optional": false,
|
|
202
|
+
"docs": {
|
|
203
|
+
"tags": [],
|
|
204
|
+
"text": ""
|
|
205
|
+
},
|
|
206
|
+
"attribute": "language",
|
|
207
|
+
"reflect": true,
|
|
208
|
+
"defaultValue": "'en'"
|
|
209
|
+
},
|
|
210
|
+
"endpoint": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"mutable": false,
|
|
213
|
+
"complexType": {
|
|
214
|
+
"original": "string",
|
|
215
|
+
"resolved": "string",
|
|
216
|
+
"references": {}
|
|
217
|
+
},
|
|
218
|
+
"required": true,
|
|
219
|
+
"optional": false,
|
|
220
|
+
"docs": {
|
|
221
|
+
"tags": [],
|
|
222
|
+
"text": ""
|
|
223
|
+
},
|
|
224
|
+
"attribute": "endpoint",
|
|
225
|
+
"reflect": true
|
|
226
|
+
},
|
|
227
|
+
"session": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"mutable": false,
|
|
230
|
+
"complexType": {
|
|
231
|
+
"original": "string",
|
|
232
|
+
"resolved": "string",
|
|
233
|
+
"references": {}
|
|
234
|
+
},
|
|
235
|
+
"required": true,
|
|
236
|
+
"optional": false,
|
|
237
|
+
"docs": {
|
|
238
|
+
"tags": [],
|
|
239
|
+
"text": ""
|
|
240
|
+
},
|
|
241
|
+
"attribute": "session",
|
|
242
|
+
"reflect": true
|
|
243
|
+
},
|
|
244
|
+
"pageSize": {
|
|
245
|
+
"type": "number",
|
|
246
|
+
"mutable": false,
|
|
247
|
+
"complexType": {
|
|
248
|
+
"original": "number",
|
|
249
|
+
"resolved": "number",
|
|
250
|
+
"references": {}
|
|
251
|
+
},
|
|
252
|
+
"required": false,
|
|
253
|
+
"optional": false,
|
|
254
|
+
"docs": {
|
|
255
|
+
"tags": [],
|
|
256
|
+
"text": ""
|
|
257
|
+
},
|
|
258
|
+
"attribute": "page-size",
|
|
259
|
+
"reflect": true,
|
|
260
|
+
"defaultValue": "20"
|
|
261
|
+
},
|
|
262
|
+
"translationUrl": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"mutable": false,
|
|
265
|
+
"complexType": {
|
|
266
|
+
"original": "string",
|
|
267
|
+
"resolved": "string",
|
|
268
|
+
"references": {}
|
|
269
|
+
},
|
|
270
|
+
"required": false,
|
|
271
|
+
"optional": false,
|
|
272
|
+
"docs": {
|
|
273
|
+
"tags": [],
|
|
274
|
+
"text": ""
|
|
275
|
+
},
|
|
276
|
+
"attribute": "translation-url",
|
|
277
|
+
"reflect": true,
|
|
278
|
+
"defaultValue": "''"
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
static get states() {
|
|
283
|
+
return {
|
|
284
|
+
"isLoading": {},
|
|
285
|
+
"powerups": {},
|
|
286
|
+
"offset": {},
|
|
287
|
+
"limit": {},
|
|
288
|
+
"total": {}
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
static get watchers() {
|
|
292
|
+
return [{
|
|
293
|
+
"propName": "offset",
|
|
294
|
+
"methodName": "loadData"
|
|
295
|
+
}, {
|
|
296
|
+
"propName": "limit",
|
|
297
|
+
"methodName": "loadData"
|
|
298
|
+
}, {
|
|
299
|
+
"propName": "language",
|
|
300
|
+
"methodName": "loadData"
|
|
301
|
+
}, {
|
|
302
|
+
"propName": "session",
|
|
303
|
+
"methodName": "loadData"
|
|
304
|
+
}, {
|
|
305
|
+
"propName": "endpoint",
|
|
306
|
+
"methodName": "loadData"
|
|
307
|
+
}, {
|
|
308
|
+
"propName": "clientStyling",
|
|
309
|
+
"methodName": "handleClientStylingChange"
|
|
310
|
+
}, {
|
|
311
|
+
"propName": "clientStylingUrl",
|
|
312
|
+
"methodName": "handleClientStylingUrlChange"
|
|
313
|
+
}, {
|
|
314
|
+
"propName": "mbSource",
|
|
315
|
+
"methodName": "handleMbSourceChange"
|
|
316
|
+
}, {
|
|
317
|
+
"propName": "translationUrl",
|
|
318
|
+
"methodName": "handleNewTranslations"
|
|
319
|
+
}];
|
|
320
|
+
}
|
|
321
|
+
static get listeners() {
|
|
322
|
+
return [{
|
|
323
|
+
"name": "reloadPageByType",
|
|
324
|
+
"method": "onReloadPageByType",
|
|
325
|
+
"target": "window",
|
|
326
|
+
"capture": false,
|
|
327
|
+
"passive": false
|
|
328
|
+
}];
|
|
329
|
+
}
|
|
330
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BonusElevatePowerupsHistory } from './bonus-elevate-powerups-history';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/bonus-elevate-powerups-history';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
2
|
+
const TRANSLATIONS = {
|
|
3
|
+
en: {
|
|
4
|
+
min: 'MIN',
|
|
5
|
+
rounds: 'Rounds',
|
|
6
|
+
coins: 'Coins',
|
|
7
|
+
xp: 'XP',
|
|
8
|
+
consumed: 'Used',
|
|
9
|
+
expired: 'Expired',
|
|
10
|
+
enabled: 'Enabled',
|
|
11
|
+
active: 'Active',
|
|
12
|
+
nothingHere: 'Nothing here -- yet!',
|
|
13
|
+
noPowerUps: 'No power-ups have been used at the moment.',
|
|
14
|
+
gotoShop: 'Go to shop to check power-ups availability.'
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
export const getTranslations = (url) => {
|
|
18
|
+
return new Promise((resolve) => {
|
|
19
|
+
fetch(url)
|
|
20
|
+
.then((res) => res.json())
|
|
21
|
+
.then((data) => {
|
|
22
|
+
Object.keys(data).forEach((lang) => {
|
|
23
|
+
if (!TRANSLATIONS[lang]) {
|
|
24
|
+
TRANSLATIONS[lang] = {};
|
|
25
|
+
}
|
|
26
|
+
for (let key in data[lang]) {
|
|
27
|
+
TRANSLATIONS[lang][key] = data[lang][key];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
resolve(true);
|
|
31
|
+
})
|
|
32
|
+
.catch((error) => {
|
|
33
|
+
console.error('Failed to load translations:', error);
|
|
34
|
+
resolve(false);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
export const translate = (key, customLang, values) => {
|
|
39
|
+
const lang = customLang;
|
|
40
|
+
let translation = TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key] || key;
|
|
41
|
+
if (values === null || values === void 0 ? void 0 : values.values) {
|
|
42
|
+
for (const [key, value] of Object.entries(values.values)) {
|
|
43
|
+
const regex = new RegExp(`{${key}}`, 'g');
|
|
44
|
+
translation = translation.replace(regex, value);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return translation;
|
|
48
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PowerUpStatus } from "../../../../../../../libs/common/src/types/casino/powerups";
|
|
2
|
+
export function format(first, middle, last) {
|
|
3
|
+
return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
|
|
4
|
+
}
|
|
5
|
+
export const PowerUpStatusEntry = {
|
|
6
|
+
[PowerUpStatus.ACTIVE]: {
|
|
7
|
+
label: 'active',
|
|
8
|
+
},
|
|
9
|
+
[PowerUpStatus.ACTIVATED]: {
|
|
10
|
+
label: 'activated',
|
|
11
|
+
},
|
|
12
|
+
[PowerUpStatus.EXPIRED]: {
|
|
13
|
+
label: 'expired',
|
|
14
|
+
},
|
|
15
|
+
[PowerUpStatus.CONSUMED]: {
|
|
16
|
+
label: 'consumed',
|
|
17
|
+
},
|
|
18
|
+
[PowerUpStatus.DISABLED]: {
|
|
19
|
+
label: 'disabled',
|
|
20
|
+
},
|
|
21
|
+
[PowerUpStatus.ENABLED]: {
|
|
22
|
+
label: 'enabled',
|
|
23
|
+
},
|
|
24
|
+
};
|