@everymatrix/casino-tournaments-list-controller 0.0.411 → 0.0.413
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/casino-tournaments-list-controller",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.413",
|
|
4
4
|
"main": "dist/casino-tournaments-list-controller.js",
|
|
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": "71de9fe1d6241d0c48edc9cd294c49f263edb504"
|
|
40
40
|
}
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
export let currency:String = '';
|
|
20
20
|
export let lang:String = 'en';
|
|
21
21
|
export let keepbrowsercontext:string = 'false';
|
|
22
|
+
export let clientstyling:string = '';
|
|
23
|
+
export let clientstylingurl:string = '';
|
|
24
|
+
|
|
25
|
+
let customStylingContainer: HTMLElement;
|
|
26
|
+
let displayNone:boolean = false;
|
|
22
27
|
|
|
23
28
|
let isLoading:Boolean = false;
|
|
24
29
|
let currentDate:any = moment(); // current day
|
|
@@ -86,6 +91,30 @@
|
|
|
86
91
|
playerID = userid;
|
|
87
92
|
}
|
|
88
93
|
|
|
94
|
+
const setClientStyling = ():void => {
|
|
95
|
+
let sheet = document.createElement('style');
|
|
96
|
+
sheet.innerHTML = clientstyling;
|
|
97
|
+
customStylingContainer.appendChild(sheet);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const setClientStylingURL = ():void => {
|
|
101
|
+
displayNone = true;
|
|
102
|
+
|
|
103
|
+
let url:URL = new URL(clientstylingurl);
|
|
104
|
+
let cssFile:HTMLElement = document.createElement('style');
|
|
105
|
+
|
|
106
|
+
fetch(url.href)
|
|
107
|
+
.then((res:any) => res.text())
|
|
108
|
+
.then((data:any) => {
|
|
109
|
+
cssFile.innerHTML = data
|
|
110
|
+
|
|
111
|
+
if (customStylingContainer) {
|
|
112
|
+
setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
|
|
113
|
+
setTimeout(() => { displayNone = false; }, 500);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
89
118
|
onMount(() => {
|
|
90
119
|
window.addEventListener('message', messageHandler, true);
|
|
91
120
|
|
|
@@ -94,12 +123,14 @@
|
|
|
94
123
|
}
|
|
95
124
|
});
|
|
96
125
|
|
|
126
|
+
$: customStylingContainer && clientstyling && setClientStyling();
|
|
127
|
+
$: customStylingContainer && clientstylingurl && setClientStylingURL();
|
|
97
128
|
$: session && setSession();
|
|
98
129
|
$: userid && setPlayerID();
|
|
99
130
|
</script>
|
|
100
131
|
|
|
101
132
|
|
|
102
|
-
<div class="TournamentList" part="TournamentList">
|
|
133
|
+
<div bind:this={customStylingContainer} class="TournamentList" part="TournamentList">
|
|
103
134
|
{#if !isLoading}
|
|
104
135
|
{#each tournamentList as tournament, i}
|
|
105
136
|
<casino-tournaments-thumbnail-controller
|