@everymatrix/player-bonus-history 1.44.0 → 1.45.0
Sign up to get free protection for your applications and to get access to all the features.
- package/components/PlayerBonusCard-D5BnmRTU.cjs +14 -0
- package/components/PlayerBonusCard-hxEnNMzA.js +7387 -0
- package/components/PlayerBonusHistory-BjWjgpCk.js +16161 -0
- package/components/PlayerBonusHistory-DytJv970.cjs +3693 -0
- package/es2015/player-bonus-history.cjs +1 -0
- package/es2015/player-bonus-history.js +16 -0
- package/package.json +17 -32
- package/CHANGELOG.md +0 -9
- package/README.md +0 -30
- package/dist/player-bonus-history.js +0 -2219
- package/dist/player-bonus-history.js.map +0 -1
- package/index.html +0 -21
- package/index.js +0 -1
- package/public/favicon.png +0 -0
- package/public/reset.css +0 -48
- package/rollup.config.js +0 -67
- package/src/PlayerBonusHistory.svelte +0 -430
- package/src/i18n.js +0 -27
- package/src/index.ts +0 -22
- package/src/translations.js +0 -72
- package/stories/PlayerBonusHistory.stories.js +0 -13
- package/tsconfig.json +0 -6
package/index.html
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<meta charset='utf-8'>
|
5
|
-
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
6
|
-
|
7
|
-
<title>
|
8
|
-
player-bonus-history
|
9
|
-
</title>
|
10
|
-
<link rel="stylesheet" href="public/reset.css">
|
11
|
-
<script src='dist/player-bonus-history.js'></script>
|
12
|
-
</head>
|
13
|
-
|
14
|
-
<body>
|
15
|
-
|
16
|
-
<div class="webcomponent">
|
17
|
-
<player-bonus-history></player-bonus-history>
|
18
|
-
</div>
|
19
|
-
|
20
|
-
</body>
|
21
|
-
</html>
|
package/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
import './dist/player-bonus-history.js';
|
package/public/favicon.png
DELETED
Binary file
|
package/public/reset.css
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
/* http://meyerweb.com/eric/tools/css/reset/
|
2
|
-
v2.0 | 20110126
|
3
|
-
License: none (public domain)
|
4
|
-
*/
|
5
|
-
|
6
|
-
html, body, div, span, applet, object, iframe,
|
7
|
-
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
8
|
-
a, abbr, acronym, address, big, cite, code,
|
9
|
-
del, dfn, em, img, ins, kbd, q, s, samp,
|
10
|
-
small, strike, strong, sub, sup, tt, var,
|
11
|
-
b, u, i, center,
|
12
|
-
dl, dt, dd, ol, ul, li,
|
13
|
-
fieldset, form, label, legend,
|
14
|
-
table, caption, tbody, tfoot, thead, tr, th, td,
|
15
|
-
article, aside, canvas, details, embed,
|
16
|
-
figure, figcaption, footer, header, hgroup,
|
17
|
-
menu, nav, output, ruby, section, summary,
|
18
|
-
time, mark, audio, video {
|
19
|
-
margin: 0;
|
20
|
-
padding: 0;
|
21
|
-
border: 0;
|
22
|
-
font-size: 100%;
|
23
|
-
font: inherit;
|
24
|
-
vertical-align: baseline;
|
25
|
-
}
|
26
|
-
/* HTML5 display-role reset for older browsers */
|
27
|
-
article, aside, details, figcaption, figure,
|
28
|
-
footer, header, hgroup, menu, nav, section {
|
29
|
-
display: block;
|
30
|
-
}
|
31
|
-
body {
|
32
|
-
line-height: 1;
|
33
|
-
}
|
34
|
-
ol, ul {
|
35
|
-
list-style: none;
|
36
|
-
}
|
37
|
-
blockquote, q {
|
38
|
-
quotes: none;
|
39
|
-
}
|
40
|
-
blockquote:before, blockquote:after,
|
41
|
-
q:before, q:after {
|
42
|
-
content: '';
|
43
|
-
content: none;
|
44
|
-
}
|
45
|
-
table {
|
46
|
-
border-collapse: collapse;
|
47
|
-
border-spacing: 0;
|
48
|
-
}
|
package/rollup.config.js
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
import svelte from 'rollup-plugin-svelte';
|
2
|
-
import commonjs from '@rollup/plugin-commonjs';
|
3
|
-
import resolve from '@rollup/plugin-node-resolve';
|
4
|
-
import serve from 'rollup-plugin-dev-server';
|
5
|
-
import livereload from 'rollup-plugin-livereload';
|
6
|
-
import { terser } from 'rollup-plugin-terser';
|
7
|
-
import sveltePreprocess from 'svelte-preprocess';
|
8
|
-
import typescript from '@rollup/plugin-typescript';
|
9
|
-
import uglify from 'rollup-plugin-uglify';
|
10
|
-
import image from '@rollup/plugin-image';
|
11
|
-
|
12
|
-
const production = process.env.NODE_ENV == 'production';
|
13
|
-
const dev = process.env.NODE_ENV == 'development';
|
14
|
-
|
15
|
-
export default {
|
16
|
-
input: 'src/index.ts',
|
17
|
-
output: {
|
18
|
-
sourcemap: true,
|
19
|
-
format: 'umd',
|
20
|
-
name: 'app',
|
21
|
-
file: 'dist/player-bonus-history.js',
|
22
|
-
},
|
23
|
-
plugins: [
|
24
|
-
svelte({
|
25
|
-
preprocess: sveltePreprocess(),
|
26
|
-
compilerOptions: {
|
27
|
-
// @TODO check generate and hydratable
|
28
|
-
// generate: 'ssr',
|
29
|
-
// hydratable: true,
|
30
|
-
// enable run-time checks when not in production
|
31
|
-
customElement: true,
|
32
|
-
dev: !production
|
33
|
-
}
|
34
|
-
}),
|
35
|
-
image(),
|
36
|
-
commonjs(),
|
37
|
-
resolve({
|
38
|
-
browser: true,
|
39
|
-
dedupe: ['svelte']
|
40
|
-
}),
|
41
|
-
dev && serve({
|
42
|
-
open: true,
|
43
|
-
verbose: true,
|
44
|
-
allowCrossOrigin: true,
|
45
|
-
historyApiFallback: false,
|
46
|
-
host: 'localhost',
|
47
|
-
port: 5050,
|
48
|
-
}),
|
49
|
-
dev && livereload({ watch: ['', 'dist'] }),
|
50
|
-
typescript({
|
51
|
-
sourceMap: !production,
|
52
|
-
inlineSources: !production,
|
53
|
-
}),
|
54
|
-
// If we're building for production (npm run build
|
55
|
-
// instead of npm run dev), minify
|
56
|
-
production &&
|
57
|
-
terser({
|
58
|
-
output: {
|
59
|
-
comments: "all"
|
60
|
-
},
|
61
|
-
}),
|
62
|
-
production && uglify.uglify()
|
63
|
-
],
|
64
|
-
watch: {
|
65
|
-
clearScreen: false
|
66
|
-
}
|
67
|
-
};
|
@@ -1,430 +0,0 @@
|
|
1
|
-
<svelte:options tag={null} />
|
2
|
-
<script lang="ts">
|
3
|
-
import { onMount } from 'svelte';
|
4
|
-
import { getDevice } from 'rvhelper';
|
5
|
-
import moment from 'moment';
|
6
|
-
|
7
|
-
import '@everymatrix/player-bonus-card';
|
8
|
-
import '@vaadin/date-picker/vaadin-date-picker.js';
|
9
|
-
import { _, addNewMessages, setLocale } from './i18n';
|
10
|
-
import { TRANSLATIONS } from './translations';
|
11
|
-
|
12
|
-
export let endpoint:string = '';
|
13
|
-
export let session:string = '';
|
14
|
-
export let playerid:string = '';
|
15
|
-
export let lang:string = 'en';
|
16
|
-
export let clientstyling:string = '';
|
17
|
-
export let clientstylingurl:string = '';
|
18
|
-
export let translationurl:string = '';
|
19
|
-
// both bonushistorystatus and bonushistorytype need to be set on the widget
|
20
|
-
// before the other attributes used to call getBonuses() in order for these filters to work
|
21
|
-
export let bonushistorystatus:string = '';
|
22
|
-
export let bonushistorytype:string = '';
|
23
|
-
|
24
|
-
let customStylingContainer:HTMLElement;
|
25
|
-
let isLoading:boolean = false;
|
26
|
-
let userAgent:string = window.navigator.userAgent;
|
27
|
-
let isMobile:boolean = (getDevice(userAgent) === 'PC') ? false : true;
|
28
|
-
let startCalendar:HTMLElement;
|
29
|
-
let endCalendar:HTMLElement;
|
30
|
-
let maxDate:string;
|
31
|
-
let lastMonth:string;
|
32
|
-
|
33
|
-
maxDate = moment(new Date()).format('YYYY-MM-DD');
|
34
|
-
lastMonth = moment(new Date()).subtract(3, 'months').format('YYYY-MM-DD')
|
35
|
-
|
36
|
-
let bonusCalendarStartDate:string = lastMonth;
|
37
|
-
let bonusCalendarEndDate:string = maxDate;
|
38
|
-
|
39
|
-
let bonusesPrevPage:number = 0;
|
40
|
-
let bonusesNextPage:number = 0;
|
41
|
-
let bonusesLastPage:number = 0;
|
42
|
-
let numberOfPages:number = 0;
|
43
|
-
let bonusesPerPage:number = 6;
|
44
|
-
let currentPage:number = 0;
|
45
|
-
let bonusesList:Array<Object> = [];
|
46
|
-
|
47
|
-
const setTranslationUrl = ():void => {
|
48
|
-
let url:string = translationurl;
|
49
|
-
|
50
|
-
fetch(url).then((res:any) => res.json())
|
51
|
-
.then((res) => {
|
52
|
-
Object.keys(res).forEach((item:any):void => {
|
53
|
-
addNewMessages(item, res[item]);
|
54
|
-
});
|
55
|
-
}).catch((err:any) => {
|
56
|
-
console.log(err);
|
57
|
-
});
|
58
|
-
}
|
59
|
-
|
60
|
-
Object.keys(TRANSLATIONS).forEach((item:any) => {
|
61
|
-
addNewMessages(item, TRANSLATIONS[item]);
|
62
|
-
});
|
63
|
-
|
64
|
-
const toggleScreen = ():void => {
|
65
|
-
window.postMessage({type: 'PlayerAccountMenuActive', isMobile}, window.location.href);
|
66
|
-
}
|
67
|
-
|
68
|
-
const getBonuses = (offset:number, status, type):void => {
|
69
|
-
let url:URL = new URL(`${endpoint}/v1/player/${playerid}/bonusWallet`);
|
70
|
-
|
71
|
-
let startDate:string = moment(bonusCalendarStartDate).startOf('day').utc().format('YYYY-MM-DDTHH:mm:ss.SSS[Z]');
|
72
|
-
let endDate:string = moment(bonusCalendarEndDate).endOf('day').utc().format('YYYY-MM-DDTHH:mm:ss.SSS[Z]');
|
73
|
-
|
74
|
-
let filter:string = '', statuses:string = '', types:string = '';
|
75
|
-
|
76
|
-
if (status) {
|
77
|
-
let bonusStatusArray:Array<string> = status.split(',');
|
78
|
-
let modifiedStatuses = bonusStatusArray.map(status => `status=${status}`);
|
79
|
-
statuses = modifiedStatuses.join(',');
|
80
|
-
filter = filter + statuses + ',';
|
81
|
-
}
|
82
|
-
|
83
|
-
if (type) {
|
84
|
-
let bonusTypesArray:Array<string> = type.split(',');
|
85
|
-
let modifiedTypes = bonusTypesArray.map(type => `type=${type}`);
|
86
|
-
types = modifiedTypes.join(',');
|
87
|
-
filter = filter + types + ',';
|
88
|
-
}
|
89
|
-
filter = filter + `granted=[${startDate}~${endDate}]`;
|
90
|
-
|
91
|
-
url.searchParams.append('filter', filter);
|
92
|
-
url.searchParams.append('pagination', `offset=${offset},limit=${bonusesPerPage}`);
|
93
|
-
|
94
|
-
let options = {
|
95
|
-
method: "GET",
|
96
|
-
headers: {
|
97
|
-
'X-SessionId': session,
|
98
|
-
}
|
99
|
-
};
|
100
|
-
|
101
|
-
fetch(url.href, options)
|
102
|
-
.then((res:any) => res.json())
|
103
|
-
.then((data:any) => {
|
104
|
-
numberOfPages = (Math.ceil(data.total/bonusesPerPage));
|
105
|
-
|
106
|
-
if ((offset - bonusesPerPage) >= 0) {
|
107
|
-
bonusesPrevPage = offset - bonusesPerPage;
|
108
|
-
}
|
109
|
-
|
110
|
-
if ((offset + bonusesPerPage) < data.total) {
|
111
|
-
bonusesNextPage = offset + bonusesPerPage;
|
112
|
-
}
|
113
|
-
|
114
|
-
bonusesLastPage = (numberOfPages - 1) * bonusesPerPage;
|
115
|
-
currentPage = offset / bonusesPerPage;
|
116
|
-
|
117
|
-
bonusesList = data.items;
|
118
|
-
}, (err:any) => {
|
119
|
-
console.error(err);
|
120
|
-
});
|
121
|
-
|
122
|
-
window.postMessage({ type: 'ScrollToTop'}, window.location.href);
|
123
|
-
}
|
124
|
-
|
125
|
-
const startCalendarHandler = (e:any):void => {
|
126
|
-
bonusCalendarStartDate = e.target.value;
|
127
|
-
}
|
128
|
-
|
129
|
-
const endCalendarHandler = (e:any):void => {
|
130
|
-
bonusCalendarEndDate = e.target.value;
|
131
|
-
}
|
132
|
-
|
133
|
-
const setCalendarEventListener = ():void => {
|
134
|
-
startCalendar.addEventListener('change', startCalendarHandler, false);
|
135
|
-
endCalendar.addEventListener('change', endCalendarHandler, false);
|
136
|
-
}
|
137
|
-
|
138
|
-
onMount(() => {
|
139
|
-
return () => {
|
140
|
-
startCalendar.removeEventListener('change', startCalendarHandler);
|
141
|
-
endCalendar.removeEventListener('change', endCalendarHandler);
|
142
|
-
}
|
143
|
-
});
|
144
|
-
|
145
|
-
const initialLoad = () => {
|
146
|
-
setLocale(lang);
|
147
|
-
}
|
148
|
-
|
149
|
-
const setClientStyling = ():void => {
|
150
|
-
let sheet:HTMLElement = document.createElement('style');
|
151
|
-
sheet.innerHTML = clientstyling;
|
152
|
-
customStylingContainer.appendChild(sheet);
|
153
|
-
}
|
154
|
-
|
155
|
-
const setClientStylingURL = ():void => {
|
156
|
-
let url:URL = new URL(clientstylingurl);
|
157
|
-
let cssFile:HTMLElement = document.createElement('style');
|
158
|
-
|
159
|
-
fetch(url.href)
|
160
|
-
.then((res:any) => res.text())
|
161
|
-
.then((data:any) => {
|
162
|
-
cssFile.innerHTML = data
|
163
|
-
|
164
|
-
setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
|
165
|
-
});
|
166
|
-
}
|
167
|
-
|
168
|
-
$: lang && initialLoad();
|
169
|
-
$: startCalendar && endCalendar && setCalendarEventListener();
|
170
|
-
$: if (session && playerid && endpoint) {
|
171
|
-
getBonuses(0, bonushistorystatus, bonushistorytype)
|
172
|
-
}
|
173
|
-
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
174
|
-
$: clientstyling && customStylingContainer && setClientStyling();
|
175
|
-
$: translationurl && setTranslationUrl();
|
176
|
-
</script>
|
177
|
-
|
178
|
-
<div bind:this={customStylingContainer}>
|
179
|
-
{#if isLoading}
|
180
|
-
<div class="ModalLoader"></div>
|
181
|
-
{:else}
|
182
|
-
<div class="BonusesWrapper {isMobile ? 'BonusesWrapperMobile' : ''}">
|
183
|
-
{#if isMobile}
|
184
|
-
<div class="MenuReturnButton" on:click={() => toggleScreen()}>
|
185
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15"><defs><style>.aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}</style></defs><g transform="translate(-20 -158)">
|
186
|
-
<g transform="translate(20 158)">
|
187
|
-
<path class="aaa" d="M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z" transform="translate(15 15) rotate(180)"/>
|
188
|
-
</g></g>
|
189
|
-
</svg>
|
190
|
-
<h2 class="BonusesTitleMobile">{$_('titleBonusesHistory')}</h2>
|
191
|
-
</div>
|
192
|
-
{/if}
|
193
|
-
<h2 class="BonusesTitle {isMobile ? 'BonusesTitleNone' : ''}" part="BonusesTitle {isMobile ? 'BonusesTitleNone' : ''}">{$_('titleBonusesHistory')}</h2>
|
194
|
-
|
195
|
-
<div class="BonusCalendarWrapper {isMobile ? 'BonusCalendarWrapperMobile' : ''}">
|
196
|
-
<div class="BonusesCalendarContainer {isMobile ? 'BonusesCalendarContainerMobile' : ''}">
|
197
|
-
<div class="BonusesCalendarStartDate {isMobile ? 'BonusesCalendarMobile' : ''}">
|
198
|
-
<label for="BonusCalendarStartDate">{$_('dateFrom')}</label>
|
199
|
-
<vaadin-date-picker bind:this={startCalendar} max={maxDate} value={lastMonth} placeholder="From" class="VaadinDatePicker"></vaadin-date-picker>
|
200
|
-
</div>
|
201
|
-
<div class="BonusesCalendarEndDate {isMobile ? 'BonusesCalendarMobile' : ''}">
|
202
|
-
<label for="BonusesCalendarEndDate">{$_('dateTo')}</label>
|
203
|
-
<vaadin-date-picker bind:this={endCalendar} max={maxDate} value={maxDate} placeholder="To" class="VaadinDatePicker"></vaadin-date-picker>
|
204
|
-
</div>
|
205
|
-
</div>
|
206
|
-
<button class="BonusesCalendarFilter {isMobile ? 'BonusesCalendarFilterMobile' : ''}" on:click={() => getBonuses(0, bonushistorystatus, bonushistorytype)}>{$_('dateFilter')}</button>
|
207
|
-
</div>
|
208
|
-
<div class="BonusesGrid {isMobile ? 'BonusesGridMobile' : ''}">
|
209
|
-
{#if bonusesList.length === 0}
|
210
|
-
<p>{$_('noBonusHistory')}</p>
|
211
|
-
{:else}
|
212
|
-
{#each bonusesList as bonus}
|
213
|
-
{#if bonus.type === 'freeRound'}
|
214
|
-
<player-bonus-card
|
215
|
-
bonuswalletid={bonus.walletId}
|
216
|
-
bonusdate={bonus.granted}
|
217
|
-
bonusstatus={bonus.status}
|
218
|
-
bonusname={bonus.name}
|
219
|
-
bonustype={bonus.type}
|
220
|
-
bonuscurrency={bonus.currency}
|
221
|
-
{lang}
|
222
|
-
{clientstyling}
|
223
|
-
{clientstylingurl}
|
224
|
-
{translationurl}
|
225
|
-
></player-bonus-card>
|
226
|
-
{:else}
|
227
|
-
<player-bonus-card
|
228
|
-
bonuswalletid={bonus.walletId}
|
229
|
-
bonusdate={bonus.granted}
|
230
|
-
bonusstatus={bonus.status}
|
231
|
-
bonusname={bonus.name}
|
232
|
-
bonustype={bonus.type}
|
233
|
-
bonusamount={bonus.extension.grantedPlayerCurrencyAmount}
|
234
|
-
bonuswageringamount={`${bonus.fulfilledWR} / ${bonus.originalWageringRequirement}`}
|
235
|
-
bonusremainingamount={bonus.currentAmount}
|
236
|
-
bonuscurrency={bonus.currency}
|
237
|
-
{lang}
|
238
|
-
{clientstyling}
|
239
|
-
{clientstylingurl}
|
240
|
-
{translationurl}
|
241
|
-
></player-bonus-card>
|
242
|
-
{/if}
|
243
|
-
{/each}
|
244
|
-
{/if}
|
245
|
-
</div>
|
246
|
-
{#if bonusesList.length !== 0}
|
247
|
-
<div class="BonusesPaginationWrapper {isMobile ? 'BonusesPaginationWrapperMobile' : ''}">
|
248
|
-
<span class="BonusesFirst {currentPage === 0 ? 'Inactive' : ''}" on:click={() => getBonuses(0, bonushistorystatus, bonushistorytype)}>|<</span>
|
249
|
-
<span class="BonusesPrev {currentPage === 0 ? 'Inactive' : ''}" on:click={() => getBonuses(bonusesPrevPage, bonushistorystatus, bonushistorytype)}><</span>
|
250
|
-
{#each Array(numberOfPages) as _, i}
|
251
|
-
<span class="BonusesPage {i === currentPage ? 'BonusPageActive' : ''}" on:click={() => getBonuses(i*bonusesPerPage, bonushistorystatus, bonushistorytype)}>{i+1}</span>
|
252
|
-
{/each}
|
253
|
-
<span class="BonusesNext {currentPage === (numberOfPages - 1) ? 'Inactive' : ''}" on:click={() => getBonuses(bonusesNextPage, bonushistorystatus, bonushistorytype)}>></span>
|
254
|
-
<span class="BonusesLast {currentPage === (numberOfPages - 1) ? 'Inactive' : ''}" on:click={() => getBonuses(bonusesLastPage, bonushistorystatus, bonushistorytype)}>>|</span>
|
255
|
-
</div>
|
256
|
-
{/if}
|
257
|
-
</div>
|
258
|
-
{/if}
|
259
|
-
</div>
|
260
|
-
|
261
|
-
<style lang="scss">
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
.BonusesWrapper {
|
266
|
-
background-color: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));
|
267
|
-
border-radius: var(--emw--border-radius-large, 20px);
|
268
|
-
color: var(--emw--color-typography-cotrast, #444444);
|
269
|
-
padding: 50px;
|
270
|
-
max-width: 850px;
|
271
|
-
|
272
|
-
&.BonusesWrapperMobile {
|
273
|
-
padding: 20px 15px;
|
274
|
-
max-width: unset;
|
275
|
-
}
|
276
|
-
}
|
277
|
-
|
278
|
-
.MenuReturnButton{
|
279
|
-
color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));
|
280
|
-
display: inline-flex;
|
281
|
-
align-items: center;
|
282
|
-
column-gap: 10px;
|
283
|
-
margin-bottom: 10px;
|
284
|
-
& svg {
|
285
|
-
fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));
|
286
|
-
}
|
287
|
-
}
|
288
|
-
|
289
|
-
.BonusesTitle {
|
290
|
-
font-size: var(--emw--font-size-x-large, 26px);
|
291
|
-
color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));
|
292
|
-
font-weight: var(--emw--font-weigh-normal, 400);
|
293
|
-
}
|
294
|
-
|
295
|
-
.BonusesTitleMobile {
|
296
|
-
font-size: var(--emw--size-standard, 16px);
|
297
|
-
}
|
298
|
-
|
299
|
-
.BonusesTitleNone {
|
300
|
-
display: none;
|
301
|
-
}
|
302
|
-
|
303
|
-
.BonusCalendarWrapper {
|
304
|
-
display: flex;
|
305
|
-
gap: 15px;
|
306
|
-
padding-bottom: 30px;
|
307
|
-
align-items: center;
|
308
|
-
&.BonusCalendarWrapperMobile {
|
309
|
-
flex-direction: column;
|
310
|
-
gap: 10px;
|
311
|
-
padding-bottom: 15px;
|
312
|
-
}
|
313
|
-
}
|
314
|
-
|
315
|
-
.BonusesCalendarContainer {
|
316
|
-
display: flex;
|
317
|
-
gap: 20px;
|
318
|
-
&.BonusesCalendarContainerMobile {
|
319
|
-
flex-direction: row;
|
320
|
-
gap: 0;
|
321
|
-
justify-content: space-between;
|
322
|
-
padding-bottom: 0;
|
323
|
-
width: 100%;
|
324
|
-
}
|
325
|
-
}
|
326
|
-
|
327
|
-
.BonusesCalendarStartDate,
|
328
|
-
.BonusesCalendarEndDate {
|
329
|
-
color: var(--emw--color-gray-300, #58586B);
|
330
|
-
display: flex;
|
331
|
-
position: relative;
|
332
|
-
align-items: center;
|
333
|
-
gap: 10px;
|
334
|
-
&.BonusesCalendarMobile {
|
335
|
-
flex-direction: column;
|
336
|
-
align-items: flex-start;
|
337
|
-
gap: 5px;
|
338
|
-
width: 48%;
|
339
|
-
.VaadinDatePicker {
|
340
|
-
width: 100%;
|
341
|
-
border-radius: var(--emw--border-radius-large, 20px);
|
342
|
-
}
|
343
|
-
}
|
344
|
-
|
345
|
-
label {
|
346
|
-
font-size: var(--emw--font-size-small, 14px);
|
347
|
-
font-weight: 300;
|
348
|
-
}
|
349
|
-
|
350
|
-
input {
|
351
|
-
width: 100%;
|
352
|
-
height: 44px;
|
353
|
-
border: 1px solid var(--emw--color-gray-100, #E6E6E6);
|
354
|
-
border-radius: var(--emw--border-radius-small, 5px);
|
355
|
-
box-sizing: border-box;
|
356
|
-
padding: 5px 15px;
|
357
|
-
font-size: var(--emw--size-standard, 16px);
|
358
|
-
line-height: 18px;
|
359
|
-
outline-color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));
|
360
|
-
}
|
361
|
-
}
|
362
|
-
|
363
|
-
.BonusesCalendarFilter {
|
364
|
-
background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));
|
365
|
-
border: 2px solid var(--emw--button-border-color, #0E5924);
|
366
|
-
color: var(--emw--button-text-color, #FFFFFF);
|
367
|
-
border-radius: var(--emw--button-border-radius, 50px);
|
368
|
-
cursor: pointer;
|
369
|
-
width: 120px;
|
370
|
-
height: 40px;
|
371
|
-
font-size: var(--emw--font-size-medium, 15px);
|
372
|
-
text-transform: uppercase;
|
373
|
-
text-align: center;
|
374
|
-
transition-duration: 0.3s;
|
375
|
-
box-sizing: border-box;
|
376
|
-
padding: 10px;
|
377
|
-
outline: none;
|
378
|
-
&.BonusesCalendarFilterMobile {
|
379
|
-
width: 100%;
|
380
|
-
height: 44px;
|
381
|
-
}
|
382
|
-
|
383
|
-
&:active {
|
384
|
-
background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));
|
385
|
-
}
|
386
|
-
}
|
387
|
-
|
388
|
-
.BonusesGrid {
|
389
|
-
display: grid;
|
390
|
-
grid-template-columns: 1fr 1fr;
|
391
|
-
gap: 50px;
|
392
|
-
border-radius: var(--emw--border-radius-large, 20px);
|
393
|
-
|
394
|
-
&.BonusesGridMobile {
|
395
|
-
grid-template-columns: 1fr;
|
396
|
-
gap: 20px;
|
397
|
-
}
|
398
|
-
}
|
399
|
-
|
400
|
-
.BonusesPaginationWrapper {
|
401
|
-
margin: 40px 0;
|
402
|
-
display: flex;
|
403
|
-
justify-content: center;
|
404
|
-
&.BonusesPaginationWrapperMobile {
|
405
|
-
text-align: center;
|
406
|
-
}
|
407
|
-
.BonusesFirst, .BonusesPrev, .BonusesNext, .BonusesLast {
|
408
|
-
color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));
|
409
|
-
font-size: var(--emw--size-standard, 16px);
|
410
|
-
cursor: pointer;
|
411
|
-
padding: 5px 10px;
|
412
|
-
font-weight: var(--emw--font-weight-bold, 700);
|
413
|
-
&.Inactive {
|
414
|
-
color: var(--emw--color-gray-100, #E6E6E6);
|
415
|
-
cursor: default;
|
416
|
-
}
|
417
|
-
}
|
418
|
-
.BonusesPage {
|
419
|
-
margin: 0 5px;
|
420
|
-
color: var(--emw--color-typography-cotrast, #444444);
|
421
|
-
font-size: var(--emw--size-standard, 16px);
|
422
|
-
cursor: pointer;
|
423
|
-
padding: 5px 10px;
|
424
|
-
&.BonusPageActive {
|
425
|
-
background-color: var(--emw--color-white, #FFFFFF);
|
426
|
-
font-weight: var(--emw--font-weight-bold, 700);
|
427
|
-
}
|
428
|
-
}
|
429
|
-
}
|
430
|
-
</style>
|
package/src/i18n.js
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
dictionary,
|
3
|
-
locale,
|
4
|
-
addMessages,
|
5
|
-
_
|
6
|
-
} from 'svelte-i18n';
|
7
|
-
|
8
|
-
function setupI18n({ withLocale: _locale, translations }) {
|
9
|
-
locale.subscribe((data) => {
|
10
|
-
if (data == null) {
|
11
|
-
dictionary.set(translations);
|
12
|
-
locale.set(_locale);
|
13
|
-
}
|
14
|
-
}); // maybe we will need this to make sure that the i18n is set up only once
|
15
|
-
/*dictionary.set(translations);
|
16
|
-
locale.set(_locale);*/
|
17
|
-
}
|
18
|
-
|
19
|
-
function addNewMessages(lang, dict) {
|
20
|
-
addMessages(lang, dict);
|
21
|
-
}
|
22
|
-
|
23
|
-
function setLocale(_locale) {
|
24
|
-
locale.set(_locale);
|
25
|
-
}
|
26
|
-
|
27
|
-
export { _, setupI18n, addNewMessages, setLocale };
|
package/src/index.ts
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
import PlayerBonusHistory from './PlayerBonusHistory.svelte';
|
2
|
-
|
3
|
-
function safeDecorator(fn) {
|
4
|
-
// eslint-disable-next-line func-names
|
5
|
-
return function(...args) {
|
6
|
-
try {
|
7
|
-
return fn.apply(this, args);
|
8
|
-
} catch (error) {
|
9
|
-
if (
|
10
|
-
error instanceof DOMException &&
|
11
|
-
error.message.includes('has already been used with this registry') || error.message.includes('Cannot define multiple custom elements with the same tag name')
|
12
|
-
) {
|
13
|
-
return false;
|
14
|
-
}
|
15
|
-
throw error;
|
16
|
-
}
|
17
|
-
};
|
18
|
-
}
|
19
|
-
|
20
|
-
customElements.define = safeDecorator(customElements.define);
|
21
|
-
!customElements.get('player-bonus-history') && customElements.define('player-bonus-history', PlayerBonusHistory);
|
22
|
-
export default PlayerBonusHistory;
|
package/src/translations.js
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
export const TRANSLATIONS = {
|
2
|
-
"en": {
|
3
|
-
"titleBonusesHistory": "Bonus History",
|
4
|
-
"dateFrom": "From:",
|
5
|
-
"dateTo": "To:",
|
6
|
-
"dateFilter": "Filter",
|
7
|
-
"noBonusHistory": "You have no bonuses for the selected period."
|
8
|
-
},
|
9
|
-
"zh-hk": {
|
10
|
-
"titleBonusesHistory": "獎金歷史",
|
11
|
-
"dateFrom": "從:",
|
12
|
-
"dateTo": "至:",
|
13
|
-
"dateFilter": "篩選",
|
14
|
-
"noBonusHistory": "您目前沒有獎金歷史。"
|
15
|
-
},
|
16
|
-
"fr": {
|
17
|
-
"titleBonusesHistory": "Historique du bonus",
|
18
|
-
"dateFrom": "De:",
|
19
|
-
"dateTo": "A:",
|
20
|
-
"dateFilter": "Filtre",
|
21
|
-
"noBonusHistory": "Vous n'avez pas d'historique de bonus pour le moment."
|
22
|
-
},
|
23
|
-
"ro": {
|
24
|
-
"titleBonusesHistory": "Istoric bonusuri",
|
25
|
-
"dateFrom": "De la",
|
26
|
-
"dateTo": "La",
|
27
|
-
"dateFilter": "Filtru",
|
28
|
-
"noBonusHistory": "Nu ai bonusuri pentru perioada selectata."
|
29
|
-
},
|
30
|
-
"es": {
|
31
|
-
"titleBonusesHistory": "Historial de Bonos",
|
32
|
-
"dateFrom": "Desde:",
|
33
|
-
"dateTo": "A:",
|
34
|
-
"dateFilter": "Filtro",
|
35
|
-
"noBonusHistory": "No tiene Bonos para el periodo seleccionado."
|
36
|
-
},
|
37
|
-
"pt": {
|
38
|
-
"titleBonusesHistory": "Histórico de bônus",
|
39
|
-
"dateFrom": "A partir de:",
|
40
|
-
"dateTo": "Para:",
|
41
|
-
"dateFilter": "Filtro:",
|
42
|
-
"noBonusHistory": "Você não tem histórico de bônus no momento."
|
43
|
-
},
|
44
|
-
"hr": {
|
45
|
-
"titleBonusesHistory": "Povijest bonusa",
|
46
|
-
"dateFrom": "Od:",
|
47
|
-
"dateTo": "Do:",
|
48
|
-
"dateFilter": "Filter",
|
49
|
-
"noBonusHistory": "Nemate bonusa u povijesti."
|
50
|
-
},
|
51
|
-
"pt-br": {
|
52
|
-
"titleBonusesHistory": "Histórico de bônus",
|
53
|
-
"dateFrom": "De:",
|
54
|
-
"dateTo": "PARA:",
|
55
|
-
"dateFilter": "Filtro",
|
56
|
-
"noBonusHistory": "Não há bônus para o período selecionado"
|
57
|
-
},
|
58
|
-
"es-mx": {
|
59
|
-
"titleBonusesHistory": "Historial de bonos",
|
60
|
-
"dateFrom": "De:",
|
61
|
-
"dateTo": "A:",
|
62
|
-
"dateFilter": "Filtro",
|
63
|
-
"noBonusHistory": "No tiene bonus para el periodo seleccionado"
|
64
|
-
},
|
65
|
-
"tr": {
|
66
|
-
"titleBonusesHistory": "Bonus Geçmişi",
|
67
|
-
"dateFrom": "İtibaren:",
|
68
|
-
"dateTo": "İle:",
|
69
|
-
"dateFilter": "Filtre",
|
70
|
-
"noBonusHistory": "Seçilen dönem için bonusunuz yok."
|
71
|
-
}
|
72
|
-
}
|