@everymatrix/player-transaction-history 0.0.365 → 0.0.367
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/README.md +30 -30
- package/dist/player-transaction-history.js.map +1 -1
- package/index.html +21 -21
- package/index.js +1 -1
- package/package.json +2 -2
- package/public/reset.css +47 -47
- package/rollup.config.js +67 -67
- package/src/PlayerTransactionHistory.svelte +130 -130
- package/src/i18n.js +27 -27
- package/src/index.ts +4 -4
- package/src/translations.js +38 -38
- package/stories/PlayerTransactionHistory.stories.js +13 -13
- package/tsconfig.json +6 -6
package/index.html
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
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-transaction-history
|
|
9
|
-
</title>
|
|
10
|
-
<link rel="stylesheet" href="public/reset.css">
|
|
11
|
-
<script src='dist/player-transaction-history.js'></script>
|
|
12
|
-
</head>
|
|
13
|
-
|
|
14
|
-
<body>
|
|
15
|
-
|
|
16
|
-
<div class="webcomponent">
|
|
17
|
-
<player-transaction-history></player-transaction-history>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|
|
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-transaction-history
|
|
9
|
+
</title>
|
|
10
|
+
<link rel="stylesheet" href="public/reset.css">
|
|
11
|
+
<script src='dist/player-transaction-history.js'></script>
|
|
12
|
+
</head>
|
|
13
|
+
|
|
14
|
+
<body>
|
|
15
|
+
|
|
16
|
+
<div class="webcomponent">
|
|
17
|
+
<player-transaction-history></player-transaction-history>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
</body>
|
|
21
|
+
</html>
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import './dist/player-transaction-history.js';
|
|
1
|
+
import './dist/player-transaction-history.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/player-transaction-history",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.367",
|
|
4
4
|
"main": "dist/player-transaction-history",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "2862d37a634bee597aaac02d75aead918718617d"
|
|
40
40
|
}
|
package/public/reset.css
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
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;
|
|
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
48
|
}
|
package/rollup.config.js
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
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-transaction-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
|
+
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-transaction-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,130 +1,130 @@
|
|
|
1
|
-
<svelte:options tag={null} />
|
|
2
|
-
<script lang="ts">
|
|
3
|
-
import { getDevice } from 'rvhelper';
|
|
4
|
-
import { _, addNewMessages, setLocale } from './i18n';
|
|
5
|
-
import { PlayerTransactionHistoryTranslations } from './translations';
|
|
6
|
-
|
|
7
|
-
export let endpoint:string = '';
|
|
8
|
-
export let session:string = '';
|
|
9
|
-
export let playerid:string = '';
|
|
10
|
-
export let lang:string = 'en';
|
|
11
|
-
|
|
12
|
-
let userAgent:string = window.navigator.userAgent;
|
|
13
|
-
let isMobile:boolean = (getDevice(userAgent) === 'PC') ? false : true;
|
|
14
|
-
let isLoading:boolean = true;
|
|
15
|
-
|
|
16
|
-
let iframeUrl:string = '';
|
|
17
|
-
|
|
18
|
-
Object.keys(PlayerTransactionHistoryTranslations).forEach((item:any) => {
|
|
19
|
-
addNewMessages(item, PlayerTransactionHistoryTranslations[item]);
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const toggleScreen = ():void => {
|
|
23
|
-
window.postMessage({type: 'PlayerAccountMenuActive', isMobile}, window.location.href);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const getTransactionHistoryIframe = ():void => {
|
|
28
|
-
let url:URL = new URL(`${endpoint}/player/${playerid}/hostedcashier/customertransactionhistoryurl`);
|
|
29
|
-
|
|
30
|
-
let options = {
|
|
31
|
-
method: "GET",
|
|
32
|
-
headers: {
|
|
33
|
-
'X-SessionId': session,
|
|
34
|
-
accept: 'application/json'
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
fetch(url.href, options)
|
|
39
|
-
.then((res:any) => res.json())
|
|
40
|
-
.then((data:any) => {
|
|
41
|
-
|
|
42
|
-
isLoading = false;
|
|
43
|
-
|
|
44
|
-
iframeUrl = data.CashierUrl;
|
|
45
|
-
|
|
46
|
-
}, (err:any) => {
|
|
47
|
-
console.error(err);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const setActiveLanguage = ():void => {
|
|
52
|
-
setLocale(lang);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
$: lang && setActiveLanguage();
|
|
56
|
-
$: session && playerid && endpoint && getTransactionHistoryIframe();
|
|
57
|
-
</script>
|
|
58
|
-
|
|
59
|
-
<div class="TransactionHistoryWrapper {isMobile ? 'TransactionHistoryWrapperMobile' : ''}" part="TransactionHistoryWrapper {isMobile ? 'TransactionHistoryWrapperMobile' : ''}">
|
|
60
|
-
{#if isMobile}
|
|
61
|
-
<div class="MenuReturnButton" part="MenuReturnButton" on:click={() => toggleScreen()}>
|
|
62
|
-
<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)">
|
|
63
|
-
<g transform="translate(20 158)">
|
|
64
|
-
<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)"/>
|
|
65
|
-
</g></g>
|
|
66
|
-
</svg>
|
|
67
|
-
<h2 class="TransactionHistoryTitleMobile" part="TransactionHistoryTitleMobile">{$_('transactionHistory.title')}</h2>
|
|
68
|
-
</div>
|
|
69
|
-
{/if}
|
|
70
|
-
<h2 class="TransactionHistoryTitle {isMobile ? 'TransactionHistoryTitleNone' : ''}" part="TransactionHistoryTitle {isMobile ? 'TransactionHistoryTitleNone' : ''}">{$_('transactionHistory.title')}</h2>
|
|
71
|
-
{#if isLoading}
|
|
72
|
-
<p>{$_('transactionHistory.loading')}</p>
|
|
73
|
-
{:else}
|
|
74
|
-
<div class="TransactionHistoryIframeWrapper" part="TransactionHistoryIframeWrapper">
|
|
75
|
-
<iframe src={iframeUrl} title="Transaction History Iframe"></iframe>
|
|
76
|
-
</div>
|
|
77
|
-
{/if}
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<style lang="scss">
|
|
82
|
-
|
|
83
|
-
:host {
|
|
84
|
-
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.TransactionHistoryWrapper {
|
|
88
|
-
color: var(--emfe-w-color-contrast, #07072A);
|
|
89
|
-
padding: 50px 50px 30px 50px;
|
|
90
|
-
max-width: 100%;
|
|
91
|
-
|
|
92
|
-
&.TransactionHistoryWrapperMobile {
|
|
93
|
-
padding: 20px 15px;
|
|
94
|
-
max-width: unset;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.MenuReturnButton{
|
|
99
|
-
color: var(--emfe-w-color-primary, #D0046C);
|
|
100
|
-
display: inline-flex;
|
|
101
|
-
align-items: center;
|
|
102
|
-
column-gap: 10px;
|
|
103
|
-
margin-bottom: 10px;
|
|
104
|
-
& svg {
|
|
105
|
-
fill: var(--emfe-w-color-primary, #D0046C);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.TransactionHistoryTitle {
|
|
110
|
-
font-size: 26px;
|
|
111
|
-
color: var(--emfe-w-color-primary, #D0046C);
|
|
112
|
-
font-weight: 400;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.TransactionHistoryTitleMobile {
|
|
116
|
-
font-size: 16px;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.TransactionHistoryTitleNone {
|
|
120
|
-
display: none;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.TransactionHistoryIframeWrapper {
|
|
124
|
-
iframe {
|
|
125
|
-
border: none;
|
|
126
|
-
width: 100%;
|
|
127
|
-
height: 85vh;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
</style>
|
|
1
|
+
<svelte:options tag={null} />
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
import { getDevice } from 'rvhelper';
|
|
4
|
+
import { _, addNewMessages, setLocale } from './i18n';
|
|
5
|
+
import { PlayerTransactionHistoryTranslations } from './translations';
|
|
6
|
+
|
|
7
|
+
export let endpoint:string = '';
|
|
8
|
+
export let session:string = '';
|
|
9
|
+
export let playerid:string = '';
|
|
10
|
+
export let lang:string = 'en';
|
|
11
|
+
|
|
12
|
+
let userAgent:string = window.navigator.userAgent;
|
|
13
|
+
let isMobile:boolean = (getDevice(userAgent) === 'PC') ? false : true;
|
|
14
|
+
let isLoading:boolean = true;
|
|
15
|
+
|
|
16
|
+
let iframeUrl:string = '';
|
|
17
|
+
|
|
18
|
+
Object.keys(PlayerTransactionHistoryTranslations).forEach((item:any) => {
|
|
19
|
+
addNewMessages(item, PlayerTransactionHistoryTranslations[item]);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const toggleScreen = ():void => {
|
|
23
|
+
window.postMessage({type: 'PlayerAccountMenuActive', isMobile}, window.location.href);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
const getTransactionHistoryIframe = ():void => {
|
|
28
|
+
let url:URL = new URL(`${endpoint}/player/${playerid}/hostedcashier/customertransactionhistoryurl`);
|
|
29
|
+
|
|
30
|
+
let options = {
|
|
31
|
+
method: "GET",
|
|
32
|
+
headers: {
|
|
33
|
+
'X-SessionId': session,
|
|
34
|
+
accept: 'application/json'
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
fetch(url.href, options)
|
|
39
|
+
.then((res:any) => res.json())
|
|
40
|
+
.then((data:any) => {
|
|
41
|
+
|
|
42
|
+
isLoading = false;
|
|
43
|
+
|
|
44
|
+
iframeUrl = data.CashierUrl;
|
|
45
|
+
|
|
46
|
+
}, (err:any) => {
|
|
47
|
+
console.error(err);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const setActiveLanguage = ():void => {
|
|
52
|
+
setLocale(lang);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
$: lang && setActiveLanguage();
|
|
56
|
+
$: session && playerid && endpoint && getTransactionHistoryIframe();
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<div class="TransactionHistoryWrapper {isMobile ? 'TransactionHistoryWrapperMobile' : ''}" part="TransactionHistoryWrapper {isMobile ? 'TransactionHistoryWrapperMobile' : ''}">
|
|
60
|
+
{#if isMobile}
|
|
61
|
+
<div class="MenuReturnButton" part="MenuReturnButton" on:click={() => toggleScreen()}>
|
|
62
|
+
<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)">
|
|
63
|
+
<g transform="translate(20 158)">
|
|
64
|
+
<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)"/>
|
|
65
|
+
</g></g>
|
|
66
|
+
</svg>
|
|
67
|
+
<h2 class="TransactionHistoryTitleMobile" part="TransactionHistoryTitleMobile">{$_('transactionHistory.title')}</h2>
|
|
68
|
+
</div>
|
|
69
|
+
{/if}
|
|
70
|
+
<h2 class="TransactionHistoryTitle {isMobile ? 'TransactionHistoryTitleNone' : ''}" part="TransactionHistoryTitle {isMobile ? 'TransactionHistoryTitleNone' : ''}">{$_('transactionHistory.title')}</h2>
|
|
71
|
+
{#if isLoading}
|
|
72
|
+
<p>{$_('transactionHistory.loading')}</p>
|
|
73
|
+
{:else}
|
|
74
|
+
<div class="TransactionHistoryIframeWrapper" part="TransactionHistoryIframeWrapper">
|
|
75
|
+
<iframe src={iframeUrl} title="Transaction History Iframe"></iframe>
|
|
76
|
+
</div>
|
|
77
|
+
{/if}
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
<style lang="scss">
|
|
82
|
+
|
|
83
|
+
:host {
|
|
84
|
+
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.TransactionHistoryWrapper {
|
|
88
|
+
color: var(--emfe-w-color-contrast, #07072A);
|
|
89
|
+
padding: 50px 50px 30px 50px;
|
|
90
|
+
max-width: 100%;
|
|
91
|
+
|
|
92
|
+
&.TransactionHistoryWrapperMobile {
|
|
93
|
+
padding: 20px 15px;
|
|
94
|
+
max-width: unset;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.MenuReturnButton{
|
|
99
|
+
color: var(--emfe-w-color-primary, #D0046C);
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
column-gap: 10px;
|
|
103
|
+
margin-bottom: 10px;
|
|
104
|
+
& svg {
|
|
105
|
+
fill: var(--emfe-w-color-primary, #D0046C);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.TransactionHistoryTitle {
|
|
110
|
+
font-size: 26px;
|
|
111
|
+
color: var(--emfe-w-color-primary, #D0046C);
|
|
112
|
+
font-weight: 400;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.TransactionHistoryTitleMobile {
|
|
116
|
+
font-size: 16px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.TransactionHistoryTitleNone {
|
|
120
|
+
display: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.TransactionHistoryIframeWrapper {
|
|
124
|
+
iframe {
|
|
125
|
+
border: none;
|
|
126
|
+
width: 100%;
|
|
127
|
+
height: 85vh;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
</style>
|
package/src/i18n.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
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 };
|
|
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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PlayerTransactionHistory from './PlayerTransactionHistory.svelte';
|
|
2
|
-
|
|
3
|
-
!customElements.get('player-transaction-history') && customElements.define('player-transaction-history', PlayerTransactionHistory);
|
|
4
|
-
export default PlayerTransactionHistory;
|
|
1
|
+
import PlayerTransactionHistory from './PlayerTransactionHistory.svelte';
|
|
2
|
+
|
|
3
|
+
!customElements.get('player-transaction-history') && customElements.define('player-transaction-history', PlayerTransactionHistory);
|
|
4
|
+
export default PlayerTransactionHistory;
|