@everymatrix/player-transaction-history 0.0.233 → 0.0.237
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/player-transaction-history",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.237",
|
|
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": "2e75c5dd54e711bed0fc8b8282d8aa284725cfcf"
|
|
40
40
|
}
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
import { _, addNewMessages, setLocale } from './i18n';
|
|
5
5
|
import { PlayerTransactionHistoryTranslations } from './translations';
|
|
6
6
|
|
|
7
|
-
export let endpoint:
|
|
8
|
-
export let session:
|
|
9
|
-
export let playerid:
|
|
7
|
+
export let endpoint:string = '';
|
|
8
|
+
export let session:string = '';
|
|
9
|
+
export let playerid:string = '';
|
|
10
10
|
export let lang:string = 'en';
|
|
11
11
|
|
|
12
12
|
let userAgent:string = window.navigator.userAgent;
|
|
13
|
-
let isMobile = (getDevice(userAgent) === 'PC') ? false : true;
|
|
13
|
+
let isMobile:boolean = (getDevice(userAgent) === 'PC') ? false : true;
|
|
14
14
|
let isLoading:boolean = true;
|
|
15
15
|
|
|
16
16
|
let iframeUrl:string = '';
|
|
@@ -19,24 +19,23 @@
|
|
|
19
19
|
addNewMessages(item, PlayerTransactionHistoryTranslations[item]);
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
const toggleScreen = () => {
|
|
22
|
+
const toggleScreen = ():void => {
|
|
23
23
|
window.postMessage({ type: 'ReturnToMenu' }, window.location.href);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
const getTransactionHistoryIframe = () => {
|
|
28
|
-
let url = new URL(`${endpoint}/player/${playerid}/hostedcashier/customertransactionhistoryurl`);
|
|
27
|
+
const getTransactionHistoryIframe = ():void => {
|
|
28
|
+
let url:URL = new URL(`${endpoint}/player/${playerid}/hostedcashier/customertransactionhistoryurl`);
|
|
29
29
|
|
|
30
30
|
let options = {
|
|
31
31
|
method: "GET",
|
|
32
32
|
headers: {
|
|
33
|
-
'playerId': playerid,
|
|
34
33
|
'X-SessionId': session,
|
|
35
|
-
|
|
34
|
+
accept: 'application/json'
|
|
36
35
|
},
|
|
37
36
|
};
|
|
38
37
|
|
|
39
|
-
fetch(url, options)
|
|
38
|
+
fetch(url.href, options)
|
|
40
39
|
.then((res:any) => res.json())
|
|
41
40
|
.then((data:any) => {
|
|
42
41
|
|
|
@@ -49,11 +48,11 @@
|
|
|
49
48
|
});
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
const
|
|
51
|
+
const setActiveLanguage = ():void => {
|
|
53
52
|
setLocale(lang);
|
|
54
53
|
}
|
|
55
54
|
|
|
56
|
-
$: lang &&
|
|
55
|
+
$: lang && setActiveLanguage();
|
|
57
56
|
$: session && playerid && endpoint && getTransactionHistoryIframe();
|
|
58
57
|
</script>
|
|
59
58
|
|