@everymatrix/casino-tournaments-table 0.0.192 → 0.0.196
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-table",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.196",
|
|
4
4
|
"main": "dist/casino-tournaments-table.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": "9809bd993cd1842fb5832ca5b3269eb33d0be029"
|
|
40
40
|
}
|
|
@@ -23,6 +23,12 @@
|
|
|
23
23
|
addNewMessages(item, TournamentsTableTranslations[item]);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
+
const findTableRowDataByRank =(position: Number, data)=>{
|
|
27
|
+
let rowData = data.find((row)=>{
|
|
28
|
+
return row.Position == position;
|
|
29
|
+
})
|
|
30
|
+
return rowData;
|
|
31
|
+
}
|
|
26
32
|
const messageHandler = (e:any) => {
|
|
27
33
|
if (e.data && e.data.type === 'CasinoTableData') {
|
|
28
34
|
data = e.data.tableData;
|
|
@@ -38,6 +44,21 @@
|
|
|
38
44
|
firstRowData = e.data.tableData;
|
|
39
45
|
}
|
|
40
46
|
}
|
|
47
|
+
// CasinoTableDataUpdate
|
|
48
|
+
if(e.data && e.data.type==='CasinoTableDataUpdate' && e.data.tableData){
|
|
49
|
+
let tableUpdateData = e.data.tableData;
|
|
50
|
+
//check data type before foreach
|
|
51
|
+
if( !(data instanceof Array)){
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
data.forEach(function (row, idx){
|
|
55
|
+
let updateRowByPosition = findTableRowDataByRank(row.Position, tableUpdateData);
|
|
56
|
+
if(!updateRowByPosition){
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
data[idx] = updateRowByPosition;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
41
62
|
}
|
|
42
63
|
|
|
43
64
|
const sortBy = (column:any) => {
|
|
@@ -277,6 +298,10 @@
|
|
|
277
298
|
{/if}
|
|
278
299
|
|
|
279
300
|
<style lang="scss">
|
|
301
|
+
:host {
|
|
302
|
+
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
303
|
+
}
|
|
304
|
+
|
|
280
305
|
*,
|
|
281
306
|
*::before,
|
|
282
307
|
*::after {
|
|
@@ -286,7 +311,6 @@
|
|
|
286
311
|
text-decoration: none;
|
|
287
312
|
outline: none;
|
|
288
313
|
box-sizing: border-box;
|
|
289
|
-
font-family: "Helvetica Neue", "Helvetica", sans-serif;
|
|
290
314
|
}
|
|
291
315
|
|
|
292
316
|
.LeaderboardContainer {
|
|
@@ -414,7 +438,6 @@
|
|
|
414
438
|
button {
|
|
415
439
|
font-weight: bold;
|
|
416
440
|
font-size: inherit;
|
|
417
|
-
font-family: inherit;
|
|
418
441
|
text-transform: capitalize;
|
|
419
442
|
background-color: transparent;
|
|
420
443
|
border: none;
|