@everymatrix/player-active-bonuses 1.0.16 → 1.0.70
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/components/PlayerActiveBonuses-BkqWgTid.js +5227 -0
- package/components/PlayerActiveBonuses-BsIRlBzF.cjs +5 -0
- package/components/PlayerBonusCard-1Tt_JTXU.cjs +10 -0
- package/components/PlayerBonusCard-CnC-nNuL.js +3132 -0
- package/es2015/player-active-bonuses.cjs +1 -0
- package/es2015/player-active-bonuses.js +16 -0
- package/package.json +17 -33
- package/README.md +0 -30
- package/dist/player-active-bonuses.js +0 -2
- package/dist/player-active-bonuses.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/PlayerActiveBonuses.svelte +0 -568
- package/src/i18n.js +0 -27
- package/src/index.ts +0 -4
- package/src/translations.js +0 -86
- package/stories/PlayerActiveBonuses.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-active-bonuses
|
|
9
|
-
</title>
|
|
10
|
-
<link rel="stylesheet" href="public/reset.css">
|
|
11
|
-
<script src='dist/player-active-bonuses.js'></script>
|
|
12
|
-
</head>
|
|
13
|
-
|
|
14
|
-
<body>
|
|
15
|
-
|
|
16
|
-
<div class="webcomponent">
|
|
17
|
-
<player-active-bonuses></player-active-bonuses>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './dist/player-active-bonuses.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-active-bonuses.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,568 +0,0 @@
|
|
|
1
|
-
<svelte:options tag={null} />
|
|
2
|
-
<script lang="ts">
|
|
3
|
-
import { onMount } from 'svelte';
|
|
4
|
-
import { getDevice } from 'rvhelper';
|
|
5
|
-
import { _, addNewMessages, setLocale } from './i18n';
|
|
6
|
-
import { PlayerActiveBonusesTranslations } from './translations';
|
|
7
|
-
|
|
8
|
-
import '@everymatrix/player-bonus-card';
|
|
9
|
-
|
|
10
|
-
export let endpoint:string = '';
|
|
11
|
-
export let session:string = '';
|
|
12
|
-
export let playerid:string = '';
|
|
13
|
-
export let lang:string = 'en';
|
|
14
|
-
export let translationUrl:string = '';
|
|
15
|
-
|
|
16
|
-
let isLoading:boolean = false;
|
|
17
|
-
let userAgent:string = window.navigator.userAgent;
|
|
18
|
-
let isMobile:boolean = (getDevice(userAgent) === 'PC') ? false : true;
|
|
19
|
-
|
|
20
|
-
let invalidBonusField:boolean = true;
|
|
21
|
-
let invalidBonusCode:boolean = false;
|
|
22
|
-
|
|
23
|
-
let bonusCode:string = '';
|
|
24
|
-
let playercurrency:string = '';
|
|
25
|
-
|
|
26
|
-
let filter:string = 'status=active';
|
|
27
|
-
|
|
28
|
-
let bonusesPrevPage:number = 0;
|
|
29
|
-
let bonusesNextPage:number = 0;
|
|
30
|
-
let bonusesLastPage:number = 0;
|
|
31
|
-
let numberOfPages:number = 0;
|
|
32
|
-
let bonusesPerPage:number = 6;
|
|
33
|
-
let currentPage:number = 0;
|
|
34
|
-
let activeBonusesList:Array<Object> = [];
|
|
35
|
-
|
|
36
|
-
let deleteBonusWalletId:string = '';
|
|
37
|
-
|
|
38
|
-
let bonusModal:boolean = false;
|
|
39
|
-
|
|
40
|
-
const setTranslationUrl = ():void => {
|
|
41
|
-
let url:string = translationUrl;
|
|
42
|
-
|
|
43
|
-
fetch(url).then((res:any) => res.json())
|
|
44
|
-
.then((res) => {
|
|
45
|
-
Object.keys(res).forEach((item:any):void => {
|
|
46
|
-
addNewMessages(item, res[item]);
|
|
47
|
-
});
|
|
48
|
-
}).catch((err:any) => {
|
|
49
|
-
console.log(err);
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
Object.keys(PlayerActiveBonusesTranslations).forEach((item:any) => {
|
|
54
|
-
addNewMessages(item, PlayerActiveBonusesTranslations[item]);
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
const messageHandler = (e:any) => {
|
|
58
|
-
if (e.data) {
|
|
59
|
-
switch(e.data.type) {
|
|
60
|
-
case 'DeleteActiveBonus':
|
|
61
|
-
deleteBonusWalletId = e.data.bonuswalletid;
|
|
62
|
-
bonusModal = true;
|
|
63
|
-
break;
|
|
64
|
-
case 'ProfileDetailsData':
|
|
65
|
-
let profileDetails:any = e.data.profileDetails;
|
|
66
|
-
playercurrency = profileDetails.currency;
|
|
67
|
-
break;
|
|
68
|
-
default:
|
|
69
|
-
// Nothing to do here
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
const toggleScreen = () => {
|
|
75
|
-
window.postMessage({type: 'PlayerAccountMenuActive', isMobile}, window.location.href);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const checkBonusCode = () => {
|
|
79
|
-
if (bonusCode) {
|
|
80
|
-
return true;
|
|
81
|
-
} else {
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const validateBonusCode = () => {
|
|
87
|
-
invalidBonusField = !checkBonusCode();
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const getActiveBonuses = (offset) => {
|
|
91
|
-
let options = {
|
|
92
|
-
method: "GET",
|
|
93
|
-
headers: {
|
|
94
|
-
'X-SessionId': session,
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
let url:any = new URL(`${endpoint}/player/${playerid}/bonusWallet`);
|
|
99
|
-
|
|
100
|
-
url.searchParams.append('filter', filter);
|
|
101
|
-
url.searchParams.append('pagination', `offset=${offset},limit=${bonusesPerPage}`);
|
|
102
|
-
|
|
103
|
-
fetch(url, options)
|
|
104
|
-
.then((res:any) => res.json())
|
|
105
|
-
.then((data:any) => {
|
|
106
|
-
|
|
107
|
-
numberOfPages = (Math.ceil(data.total / bonusesPerPage));
|
|
108
|
-
|
|
109
|
-
if((offset - bonusesPerPage) >= 0) {
|
|
110
|
-
bonusesPrevPage = offset - bonusesPerPage;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if((offset + bonusesPerPage) < data.total) {
|
|
114
|
-
bonusesNextPage = offset + bonusesPerPage;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
bonusesLastPage = (numberOfPages - 1) * bonusesPerPage;
|
|
118
|
-
|
|
119
|
-
currentPage = offset / bonusesPerPage;
|
|
120
|
-
|
|
121
|
-
activeBonusesList = data.items;
|
|
122
|
-
|
|
123
|
-
}, (err:any) => {
|
|
124
|
-
console.error(err);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
const claimBonus = () => {
|
|
129
|
-
let url = new URL(`${endpoint}/player/${playerid}/claimbonus`);
|
|
130
|
-
|
|
131
|
-
let optionsClaimBonus = {
|
|
132
|
-
method: "POST",
|
|
133
|
-
headers: {
|
|
134
|
-
'X-SessionId': session,
|
|
135
|
-
'accept': 'application/json'
|
|
136
|
-
},
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
url.searchParams.append('currency', playercurrency);
|
|
140
|
-
url.searchParams.append('bonusCode', bonusCode);
|
|
141
|
-
|
|
142
|
-
fetch(url.href, optionsClaimBonus)
|
|
143
|
-
.then((res:any) => {
|
|
144
|
-
if (res.status == 200) {
|
|
145
|
-
invalidBonusCode = false;
|
|
146
|
-
getActiveBonuses(0);
|
|
147
|
-
window.postMessage({ type: 'WidgetNotification', data: {
|
|
148
|
-
type: 'success',
|
|
149
|
-
message: $_('activeBonuses.successMessage')
|
|
150
|
-
}}, window.location.href);
|
|
151
|
-
|
|
152
|
-
//Analytics event
|
|
153
|
-
if(typeof gtag == 'function'){
|
|
154
|
-
gtag('event', 'ClaimBonus', {
|
|
155
|
-
'context': 'PlayerActiveBonuses',
|
|
156
|
-
'userId' : `${playerid ? playerid : 'Not logged in'}`,
|
|
157
|
-
'bonusCode': `${bonusCode}`
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
} else {
|
|
161
|
-
invalidBonusCode = true;
|
|
162
|
-
window.postMessage({ type: 'WidgetNotification', data: {
|
|
163
|
-
type: 'error',
|
|
164
|
-
message: $_('activeBonuses.errorMessage')
|
|
165
|
-
}}, window.location.href);
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
const closeBonusModal = () => {
|
|
171
|
-
window.postMessage({ type: 'EnableScroll'}, window.location.href);
|
|
172
|
-
bonusModal = false;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
const deleteBonus = () => {
|
|
176
|
-
let optionsDeleteBonus = {
|
|
177
|
-
method: "DELETE",
|
|
178
|
-
headers: {
|
|
179
|
-
'X-SessionId': session,
|
|
180
|
-
'Content-Type': "application/json",
|
|
181
|
-
'Accept': 'application/json',
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
let url:any = new URL(`${endpoint}/player/${playerid}/bonusWallet`);
|
|
186
|
-
url.searchParams.append('bonusWalletID', deleteBonusWalletId);
|
|
187
|
-
|
|
188
|
-
fetch(url, optionsDeleteBonus)
|
|
189
|
-
.then((res:any) => {
|
|
190
|
-
if (res.status == 200) {
|
|
191
|
-
getActiveBonuses(0);
|
|
192
|
-
closeBonusModal();
|
|
193
|
-
} else {
|
|
194
|
-
// Error
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
onMount(() => {
|
|
200
|
-
window.addEventListener('message', messageHandler, false);
|
|
201
|
-
|
|
202
|
-
return () => {
|
|
203
|
-
window.removeEventListener('message', messageHandler);
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
const initialLoad = () => {
|
|
208
|
-
setLocale(lang);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
$: lang && initialLoad();
|
|
212
|
-
$: session && playerid && endpoint && getActiveBonuses(0);
|
|
213
|
-
$: translationUrl && setTranslationUrl();
|
|
214
|
-
</script>
|
|
215
|
-
|
|
216
|
-
{#if isLoading}
|
|
217
|
-
<div class="ModalLoader" part="ModalLoader"></div>
|
|
218
|
-
{:else}
|
|
219
|
-
<div class="ActiveBonusesWrapper {isMobile ? 'ActiveBonusesWrapperMobile' : ''}" part="ActiveBonusesWrapper {isMobile ? 'ActiveBonusesWrapperMobile' : ''}">
|
|
220
|
-
{#if isMobile}
|
|
221
|
-
<div class="MenuReturnButton" part="MenuReturnButton" on:click={() => toggleScreen()}>
|
|
222
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15"><defs><style>.aaa{fill:var(--emfe-w-color-primary, #D0046C);}</style></defs><g transform="translate(-20 -158)">
|
|
223
|
-
<g transform="translate(20 158)">
|
|
224
|
-
<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)"/>
|
|
225
|
-
</g></g>
|
|
226
|
-
</svg>
|
|
227
|
-
<h2 class="ActiveBonusesTitleMobile" part="ActiveBonusesTitleMobile">{$_('activeBonuses.title')}</h2>
|
|
228
|
-
</div>
|
|
229
|
-
{/if}
|
|
230
|
-
<h2 class="ActiveBonusesTitle {isMobile ? 'ActiveBonusesTitleNone' : ''}" part="ActiveBonusesTitle {isMobile ? 'ActiveBonusesTitleNone' : ''}">{$_('activeBonuses.title')}</h2>
|
|
231
|
-
<div class="BonusCodeContainer {isMobile ? 'BonusCodeContainerMobile' : ''}" part="BonusCodeContainer {isMobile ? 'BonusCodeContainerMobile' : ''}">
|
|
232
|
-
<label for="BonusCode">{$_('activeBonuses.bonusCode')}</label>
|
|
233
|
-
<div class="BonusCodeWrapper {isMobile ? 'BonusCodeWrapperMobile' : ''}" part="BonusCodeWrapper {isMobile ? 'BonusCodeWrapperMobile' : ''}">
|
|
234
|
-
<input class="BonusCodeInput {isMobile ? 'BonusCodeInputMobile' : ''}" part="BonusCodeInput {isMobile ? 'BonusCodeInputMobile' : ''}" bind:value={bonusCode} on:keyup={validateBonusCode} type="text" id="BonusCode" />
|
|
235
|
-
<button class="SubmitBonusCode {isMobile ? 'SubmitBonusCodeMobile' : ''}" part="SubmitBonusCode {isMobile ? 'SubmitBonusCodeMobile' : ''}" disabled={invalidBonusField} on:click={claimBonus}>{$_('activeBonuses.getBonus')}</button>
|
|
236
|
-
</div>
|
|
237
|
-
{#if invalidBonusCode}
|
|
238
|
-
<p class="InvalidBonusCodeMessage" part="InvalidBonusCodeMessage">{$_('activeBonuses.invalidBonusCode')}</p>
|
|
239
|
-
{/if}
|
|
240
|
-
</div>
|
|
241
|
-
<div class="ActiveBonusesGrid {isMobile ? 'ActiveBonusesGridMobile' : ''}" part="ActiveBonusesGrid {isMobile ? 'ActiveBonusesGridMobile' : ''}">
|
|
242
|
-
{#if activeBonusesList.length === 0}
|
|
243
|
-
<p>{$_('activeBonuses.noActiveBonuses')}</p>
|
|
244
|
-
{:else}
|
|
245
|
-
{#each activeBonusesList as activeBonus}
|
|
246
|
-
{#if activeBonus.type === 'freeRound'}
|
|
247
|
-
<player-bonus-card
|
|
248
|
-
bonuswalletid={activeBonus.walletId}
|
|
249
|
-
bonusdate={activeBonus.granted}
|
|
250
|
-
bonusstatus={activeBonus.status}
|
|
251
|
-
bonusname={activeBonus.name}
|
|
252
|
-
bonustype={activeBonus.type}
|
|
253
|
-
bonuscurrency={activeBonus.currency}
|
|
254
|
-
{lang}
|
|
255
|
-
></player-bonus-card>
|
|
256
|
-
{:else}
|
|
257
|
-
<player-bonus-card
|
|
258
|
-
bonuswalletid={activeBonus.walletId}
|
|
259
|
-
bonusdate={activeBonus.granted}
|
|
260
|
-
bonusstatus={activeBonus.status}
|
|
261
|
-
bonusname={activeBonus.name}
|
|
262
|
-
bonustype={activeBonus.type}
|
|
263
|
-
bonusamount={activeBonus.grantedAmount}
|
|
264
|
-
bonuswageringamount={activeBonus.totalWR}
|
|
265
|
-
bonusremainingamount={activeBonus.currentAmount}
|
|
266
|
-
bonuscurrency={activeBonus.currency}
|
|
267
|
-
{lang}
|
|
268
|
-
></player-bonus-card>
|
|
269
|
-
{/if}
|
|
270
|
-
{/each}
|
|
271
|
-
{/if}
|
|
272
|
-
</div>
|
|
273
|
-
{#if activeBonusesList.length !== 0}
|
|
274
|
-
<div class="BonusesPaginationWrapper {isMobile ? 'BonusesPaginationWrapperMobile' : ''}" part="BonusesPaginationWrapper {isMobile ? 'BonusesPaginationWrapperMobile' : ''}">
|
|
275
|
-
<span class="BonusesFirst {currentPage === 0 ? 'Inactive' : ''}" part="BonusesFirst {currentPage === 0 ? 'Inactive' : ''}" on:click={() => getActiveBonuses(0)}>|<</span>
|
|
276
|
-
<span class="BonusesPrev {currentPage === 0 ? 'Inactive' : ''}" part="BonusesPrev {currentPage === 0 ? 'Inactive' : ''}" on:click={() => getActiveBonuses(bonusesPrevPage)}><</span>
|
|
277
|
-
{#each Array(numberOfPages) as _, i}
|
|
278
|
-
<span class="BonusesPage {i === currentPage ? 'BonusPageActive' : ''}" part="BonusesPage {i === currentPage ? 'BonusPageActive' : ''}" on:click={() => getActiveBonuses(i*bonusesPerPage)}>{i+1}</span>
|
|
279
|
-
{/each}
|
|
280
|
-
<span class="BonusesNext {currentPage === (numberOfPages - 1) ? 'Inactive' : ''}" part="BonusesNext {currentPage === (numberOfPages - 1) ? 'Inactive' : ''}" on:click={() => getActiveBonuses(bonusesNextPage)}>></span>
|
|
281
|
-
<span class="BonusesLast {currentPage === (numberOfPages - 1) ? 'Inactive' : ''}" part="BonusesLast {currentPage === (numberOfPages - 1) ? 'Inactive' : ''}" on:click={() => getActiveBonuses(bonusesLastPage)}>>|</span>
|
|
282
|
-
</div>
|
|
283
|
-
{/if}
|
|
284
|
-
</div>
|
|
285
|
-
{#if bonusModal}
|
|
286
|
-
<div class="ModalWrapper {isMobile ? 'ModalWrapperMobile' : ''}" part="ModalWrapper {isMobile ? 'ModalWrapperMobile' : ''}">
|
|
287
|
-
<div class="ModalContent" part="ModalContent">
|
|
288
|
-
<div class="ModalBody" part="ModalBody">
|
|
289
|
-
<p class="ModalText" part="ModalText">{$_('activeBonuses.forfeitBonus')}</p>
|
|
290
|
-
<div class="ModalButtons" part="ModalButtons">
|
|
291
|
-
<button class="ModalCancel" part="ModalCancel" on:click={closeBonusModal}>{$_('activeBonuses.forfeitBonusCancel')}</button>
|
|
292
|
-
<button class="ModalConfirm" part="ModalConfirm" on:click={deleteBonus}>{$_('activeBonuses.forfeitBonusConfirm')}</button>
|
|
293
|
-
</div>
|
|
294
|
-
</div>
|
|
295
|
-
</div>
|
|
296
|
-
</div>
|
|
297
|
-
{/if}
|
|
298
|
-
{/if}
|
|
299
|
-
|
|
300
|
-
<style lang="scss">
|
|
301
|
-
|
|
302
|
-
:host {
|
|
303
|
-
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.ActiveBonusesWrapper {
|
|
307
|
-
color: var(--emfe-w-color-contrast, #07072A);
|
|
308
|
-
padding: 50px;
|
|
309
|
-
max-width: 850px;
|
|
310
|
-
|
|
311
|
-
&.ActiveBonusesWrapperMobile {
|
|
312
|
-
padding: 20px 15px;
|
|
313
|
-
max-width: unset;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.MenuReturnButton{
|
|
318
|
-
color: var(--emfe-w-color-primary, #D0046C);
|
|
319
|
-
display: inline-flex;
|
|
320
|
-
align-items: center;
|
|
321
|
-
column-gap: 10px;
|
|
322
|
-
margin-bottom: 30px;
|
|
323
|
-
& svg {
|
|
324
|
-
fill: var(--emfe-w-color-primary, #D0046C);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.ActiveBonusesTitle {
|
|
329
|
-
font-size: 26px;
|
|
330
|
-
color: var(--emfe-w-color-primary, #D0046C);
|
|
331
|
-
font-weight: 400;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.ActiveBonusesTitleMobile {
|
|
335
|
-
font-size: 16px;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
.ActiveBonusesTitleNone {
|
|
339
|
-
display: none;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
.BonusCodeContainer {
|
|
343
|
-
color: var(--emfe-w-color-gray-300, #58586B);
|
|
344
|
-
display: flex;
|
|
345
|
-
flex-direction: column;
|
|
346
|
-
padding-bottom: 30px;
|
|
347
|
-
position: relative;
|
|
348
|
-
width: 70%;
|
|
349
|
-
|
|
350
|
-
label {
|
|
351
|
-
font-size: 14px;
|
|
352
|
-
font-weight: 300;
|
|
353
|
-
padding-bottom: 5px;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
&.BonusCodeContainerMobile {
|
|
357
|
-
width: 100%;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
.BonusCodeWrapper {
|
|
361
|
-
display: flex;
|
|
362
|
-
gap: 10px;
|
|
363
|
-
&.BonusCodeWrapperMobile {
|
|
364
|
-
flex-direction: column;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.BonusCodeInput {
|
|
368
|
-
width: 70%;
|
|
369
|
-
height: 44px;
|
|
370
|
-
border: 1px solid var(--emfe-w-color-gray-100, #E6E6E6);
|
|
371
|
-
border-radius: 5px;
|
|
372
|
-
box-sizing: border-box;
|
|
373
|
-
padding: 5px 15px;
|
|
374
|
-
font-size: 16px;
|
|
375
|
-
line-height: 18px;
|
|
376
|
-
&:focus {
|
|
377
|
-
outline-color: var(--emfe-w-color-primary, #D0046C);
|
|
378
|
-
}
|
|
379
|
-
&.BonusCodeInputMobile {
|
|
380
|
-
width: 100%;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
.SubmitBonusCode {
|
|
385
|
-
background: var(--emfe-w-color-primary, #D0046C);
|
|
386
|
-
border: 1px solid var(--emfe-w-color-primary, #D0046C);
|
|
387
|
-
color: var(--emfe-w-color-white, #FFFFFF);
|
|
388
|
-
cursor: pointer;
|
|
389
|
-
border-radius: 5px;
|
|
390
|
-
width: 30%;
|
|
391
|
-
height: 44px;
|
|
392
|
-
font-size: 15px;
|
|
393
|
-
text-transform: uppercase;
|
|
394
|
-
text-align: center;
|
|
395
|
-
transition-duration: 0.3s;
|
|
396
|
-
box-sizing: border-box;
|
|
397
|
-
padding: 10px;
|
|
398
|
-
&[disabled] {
|
|
399
|
-
opacity: 0.3;
|
|
400
|
-
cursor: not-allowed;
|
|
401
|
-
}
|
|
402
|
-
&.SubmitBonusCodeMobile {
|
|
403
|
-
width: 100%;
|
|
404
|
-
}
|
|
405
|
-
&:active {
|
|
406
|
-
background: var(--emfe-w-color-primary-600, #99034F);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
&.InvalidField {
|
|
412
|
-
input {
|
|
413
|
-
border: 1px solid var(--emfe-w-color-primary, #D0046C);
|
|
414
|
-
background: var(--emfe-w-color-primary-50, #FBECF4);
|
|
415
|
-
color: var(--emfe-w-color-primary, #D0046C);
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
.InvalidBonusCodeMessage {
|
|
420
|
-
color: var(--emfe-w-color-error, #FD2839);
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
.BonusCodeWrapper {
|
|
425
|
-
display: flex;
|
|
426
|
-
gap: 20px;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.SubmitBonusCode {
|
|
430
|
-
background: var(--emfe-w-color-primary, #D0046C);
|
|
431
|
-
border: 1px solid var(--emfe-w-color-primary, #D0046C);
|
|
432
|
-
color: var(--emfe-w-color-white, #FFFFFF);
|
|
433
|
-
cursor: pointer;
|
|
434
|
-
border-radius: 5px;
|
|
435
|
-
width: 30%;
|
|
436
|
-
height: 44px;
|
|
437
|
-
font-size: 15px;
|
|
438
|
-
text-transform: uppercase;
|
|
439
|
-
text-align: center;
|
|
440
|
-
transition-duration: 0.3s;
|
|
441
|
-
box-sizing: border-box;
|
|
442
|
-
padding: 10px;
|
|
443
|
-
&[disabled] {
|
|
444
|
-
opacity: 0.3;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
&:active {
|
|
448
|
-
background: var(--emfe-w-color-primary-600, #99034F);
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
.ActiveBonusesGrid {
|
|
453
|
-
display: grid;
|
|
454
|
-
grid-template-columns: 1fr 1fr;
|
|
455
|
-
gap: 50px;
|
|
456
|
-
|
|
457
|
-
&.ActiveBonusesGridMobile {
|
|
458
|
-
grid-template-columns: 1fr;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
.ModalWrapper {
|
|
463
|
-
position: fixed;
|
|
464
|
-
top: 0;
|
|
465
|
-
right: 0;
|
|
466
|
-
bottom: 0;
|
|
467
|
-
left: 0;
|
|
468
|
-
background-color: rgba(0,0,0,0.7);
|
|
469
|
-
display: flex;
|
|
470
|
-
justify-content: center;
|
|
471
|
-
align-items: center;
|
|
472
|
-
z-index: 100;
|
|
473
|
-
.ModalContent {
|
|
474
|
-
background-color: var(--emfe-w-color-white, #FFFFFF);
|
|
475
|
-
position: relative;
|
|
476
|
-
padding: 30px;
|
|
477
|
-
border-top: 5px solid var(--emfe-w-color-secondary, #FD2839);
|
|
478
|
-
border-radius: 5px;
|
|
479
|
-
}
|
|
480
|
-
.ModalBody {
|
|
481
|
-
background-color: var(--emfe-w-color-gray-50, #F9F8F8);
|
|
482
|
-
padding: 30px;
|
|
483
|
-
text-align: center;
|
|
484
|
-
.ModalText {
|
|
485
|
-
font-size: 22px;
|
|
486
|
-
margin-bottom: 40px;
|
|
487
|
-
}
|
|
488
|
-
.ModalButtons {
|
|
489
|
-
display: flex;
|
|
490
|
-
gap: 36px;
|
|
491
|
-
}
|
|
492
|
-
.ModalCancel, .ModalConfirm {
|
|
493
|
-
background: transparent;
|
|
494
|
-
border: 1px solid var(--emfe-w-color-gray-300, #58586B);
|
|
495
|
-
color: var(--emfe-w-color-gray-300, #58586B);
|
|
496
|
-
cursor: pointer;
|
|
497
|
-
border-radius: 5px;
|
|
498
|
-
width: 200px;
|
|
499
|
-
height: 50px;
|
|
500
|
-
font-size: 16px;
|
|
501
|
-
text-transform: uppercase;
|
|
502
|
-
text-align: center;
|
|
503
|
-
transition-duration: 0.3s;
|
|
504
|
-
box-sizing: border-box;
|
|
505
|
-
padding: 10px;
|
|
506
|
-
}
|
|
507
|
-
.ModalConfirm {
|
|
508
|
-
background: var(--emfe-w-color-primary, #D0046C);
|
|
509
|
-
border: 1px solid var(--emfe-w-color-primary, #D0046C);
|
|
510
|
-
color: var(--emfe-w-color-white, #FFFFFF);
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
.ModalWrapper.ModalWrapperMobile {
|
|
516
|
-
.ModalContent {
|
|
517
|
-
padding: 20px;
|
|
518
|
-
width: 80vw;
|
|
519
|
-
border-top: none;
|
|
520
|
-
}
|
|
521
|
-
.ModalBody {
|
|
522
|
-
padding: 0;
|
|
523
|
-
background: transparent;
|
|
524
|
-
}
|
|
525
|
-
.ModalText {
|
|
526
|
-
font-size: 16px;
|
|
527
|
-
}
|
|
528
|
-
.ModalButtons {
|
|
529
|
-
gap: 10px;
|
|
530
|
-
}
|
|
531
|
-
.ModalCancel, .ModalConfirm {
|
|
532
|
-
height: 40px;
|
|
533
|
-
width: 50%;
|
|
534
|
-
font-size: 14px;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
.BonusesPaginationWrapper {
|
|
539
|
-
margin: 40px 0;
|
|
540
|
-
display: flex;
|
|
541
|
-
justify-content: center;
|
|
542
|
-
&.BonusesPaginationWrapperMobile {
|
|
543
|
-
text-align: center;
|
|
544
|
-
}
|
|
545
|
-
.BonusesFirst, .BonusesPrev, .BonusesNext, .BonusesLast {
|
|
546
|
-
color: var(--emfe-w-color-primary, #D0046C);
|
|
547
|
-
font-size: 16px;
|
|
548
|
-
cursor: pointer;
|
|
549
|
-
padding: 5px 10px;
|
|
550
|
-
font-weight: 700;
|
|
551
|
-
&.Inactive {
|
|
552
|
-
color: var(--emfe-w-color-gray-100, #E6E6E6);
|
|
553
|
-
cursor: default;
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
.BonusesPage {
|
|
557
|
-
margin: 0 5px;
|
|
558
|
-
color: var(--emfe-w-color-gray-300, #58586B);
|
|
559
|
-
font-size: 16px;
|
|
560
|
-
cursor: pointer;
|
|
561
|
-
padding: 5px 10px;
|
|
562
|
-
&.BonusPageActive {
|
|
563
|
-
background-color: var(--emfe-w-color-white, #FFFFFF);
|
|
564
|
-
font-weight: 700;
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
</style>
|