@golstats/gsc-top-player 1.0.0 → 1.0.2
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/dist/{FilterConditions-55d68355-Dpbg-_AB.js → FilterConditions-55d68355-C5NIJbY6.js} +1 -1
- package/dist/{FilterField-59a73e38-j9kmr0oF.js → FilterField-59a73e38-DO8nYLqs.js} +1 -1
- package/dist/{FilterSubcategories-a9b32cc9-DwhgmIwf.js → FilterSubcategories-a9b32cc9-DlkHni1L.js} +1 -1
- package/dist/gsc-top-player.css +1 -1
- package/dist/gsc-top-player.es.js +1 -1
- package/dist/gsc-top-player.umd.js +11 -15
- package/dist/images/events/logo-fusionado.svg +38 -0
- package/dist/{index-oO1T2oQg.js → index-DfxUh38Q.js} +4115 -5038
- package/dist/logo-team@2x.png +0 -0
- package/dist/player-shadow-02@2x.png +0 -0
- package/dist/player-shadow@2x.png +0 -0
- package/dist/styles.css +906 -921
- package/package.json +1 -1
- package/src/App.vue +7 -12
- package/src/components/comparative/dummy-top-players.js +122 -0
- package/src/components/comparative/gsc-button.vue +8 -19
- package/src/components/comparative/gsc-header-tops.vue +1 -4
- package/src/components/comparative/gsc-row.vue +1624 -1810
- package/src/components/comparative/gsc-top.vue +162 -166
- package/src/components/comparative/gsc-tops-full.vue +11 -1
- package/src/components/gsc-top-player.vue +16 -2
|
@@ -3,161 +3,156 @@
|
|
|
3
3
|
<div ref="myDivRef">
|
|
4
4
|
<template v-if="type == 0">
|
|
5
5
|
<template v-if="topData.length > 0">
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
? {
|
|
29
|
-
top: '01',
|
|
30
|
-
photo: player.img,
|
|
31
|
-
logo:
|
|
32
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
6
|
+
<div class="row-table-carrousel">
|
|
7
|
+
<template v-for="(player, index) in topData[0]" :key="index">
|
|
8
|
+
<template v-if="player.top == 1">
|
|
9
|
+
<GSCLeaders
|
|
10
|
+
@mediadata="emitEventMedia($event, category, categoryName)"
|
|
11
|
+
:type="typeTable"
|
|
12
|
+
:type-data="typeData"
|
|
13
|
+
:game="game"
|
|
14
|
+
:arrow="arrow"
|
|
15
|
+
:team-widget="teamWidget"
|
|
16
|
+
:can-play-videos="canPlayVideos"
|
|
17
|
+
:is-expanded="playerexpand == player.id && expand"
|
|
18
|
+
ref="GSCLeaders"
|
|
19
|
+
:data="
|
|
20
|
+
typeTable == 0
|
|
21
|
+
? {
|
|
22
|
+
top: '01',
|
|
23
|
+
photo: player.img,
|
|
24
|
+
logo:
|
|
25
|
+
player.img && player.img.includes('player-shadow')
|
|
26
|
+
? 'https://golstatsimages.blob.core.windows.net/images-library/logo-team@2x.png'
|
|
27
|
+
: 'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
33
28
|
player.teamid +
|
|
34
29
|
'.png',
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
30
|
+
name: player.name,
|
|
31
|
+
player_short: player.name_short,
|
|
32
|
+
player_id: player.id,
|
|
33
|
+
categoryId: category,
|
|
34
|
+
total: player.total,
|
|
35
|
+
}
|
|
36
|
+
: {
|
|
37
|
+
top: '01',
|
|
38
|
+
logo: player.img,
|
|
39
|
+
total: player.total,
|
|
40
|
+
name_team: player.name,
|
|
41
|
+
player_id: player.id,
|
|
42
|
+
}
|
|
43
|
+
"
|
|
44
|
+
:category-name="categoryName"
|
|
45
|
+
:buttonMaxWidth="
|
|
46
|
+
typeTable != 0
|
|
47
|
+
? elementSize.width > 360
|
|
48
|
+
? '210px'
|
|
49
|
+
: '130px'
|
|
50
|
+
: elementSize.width > 360
|
|
51
|
+
? '180px'
|
|
52
|
+
: '110px'
|
|
53
|
+
"
|
|
54
|
+
buttonFontSize="12px"
|
|
55
|
+
iconSize="11px"
|
|
56
|
+
@expand="clickexpand"
|
|
57
|
+
@more="morestats"
|
|
58
|
+
/>
|
|
59
|
+
</template>
|
|
60
|
+
<template v-else>
|
|
61
|
+
<GSCRowTable
|
|
62
|
+
:type-data="typeData"
|
|
63
|
+
:team-widget="teamWidget"
|
|
64
|
+
:game="game"
|
|
65
|
+
:type="typeTable"
|
|
66
|
+
:type-view="type"
|
|
67
|
+
:arrow="arrow"
|
|
68
|
+
:is-expanded="playerexpand == player.id && expand"
|
|
69
|
+
@mediadata="emitEventMedia($event, category, categoryName)"
|
|
70
|
+
:data="
|
|
71
|
+
typeTable == 0
|
|
72
|
+
? {
|
|
73
|
+
position: player.top,
|
|
74
|
+
player_name: player.name,
|
|
75
|
+
player_short: player.name_short,
|
|
76
|
+
player_photo: player.img,
|
|
77
|
+
total: player.total,
|
|
78
|
+
id: player.id,
|
|
79
|
+
player_age: player.age,
|
|
80
|
+
team_abrev: player.team,
|
|
81
|
+
team_logo:
|
|
82
|
+
player.img && player.img.includes('player-shadow')
|
|
83
|
+
? 'https://golstatsimages.blob.core.windows.net/images-library/logo-team@2x.png'
|
|
84
|
+
: 'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
88
85
|
player.teamid +
|
|
89
86
|
'.png',
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
</template>
|
|
158
|
-
</div>
|
|
87
|
+
player_position: player.position,
|
|
88
|
+
player_country_flag:
|
|
89
|
+
'https://golstatsimages.blob.core.windows.net/flags/' +
|
|
90
|
+
player.country +
|
|
91
|
+
'.jpg',
|
|
92
|
+
player_games: player.minutes,
|
|
93
|
+
player_min: player.games,
|
|
94
|
+
league_name:
|
|
95
|
+
' Liga MX ',
|
|
96
|
+
}
|
|
97
|
+
: {
|
|
98
|
+
position: player.top,
|
|
99
|
+
team_logo: player.img,
|
|
100
|
+
team_abrev: player.name,
|
|
101
|
+
frequency: player.frecuency,
|
|
102
|
+
promthistournament: player.game_avg,
|
|
103
|
+
promlasttournament: player.game_avg_last_season,
|
|
104
|
+
teams_games: '-',
|
|
105
|
+
category: category,
|
|
106
|
+
total: player.total,
|
|
107
|
+
id: player.id,
|
|
108
|
+
}
|
|
109
|
+
"
|
|
110
|
+
height="71px"
|
|
111
|
+
:can-play-videos="canPlayVideos"
|
|
112
|
+
:background="index % 2 === 0 ? backgroundEven : backgroundOdd"
|
|
113
|
+
@expand="clickexpand"
|
|
114
|
+
/>
|
|
115
|
+
</template>
|
|
116
|
+
<template v-if="expand && playerexpand == player.id">
|
|
117
|
+
<GSCExpandedInfo
|
|
118
|
+
:type="typeTable"
|
|
119
|
+
:is-live="game.is_live"
|
|
120
|
+
:view-effectiveness="player.positionId === 1 ? false : true"
|
|
121
|
+
:data="
|
|
122
|
+
typeTable == 0
|
|
123
|
+
? {
|
|
124
|
+
teams: player.teamname,
|
|
125
|
+
age: player.age,
|
|
126
|
+
dataofbirth: player.date,
|
|
127
|
+
nationality: player.nationality,
|
|
128
|
+
countryFlag: player.player_country_flag,
|
|
129
|
+
position: player.position,
|
|
130
|
+
games: player.games,
|
|
131
|
+
min: player.minutes,
|
|
132
|
+
goals: player.total,
|
|
133
|
+
effectiveness: player.effectiveness,
|
|
134
|
+
category: categoryName,
|
|
135
|
+
id: player.id,
|
|
136
|
+
}
|
|
137
|
+
: {
|
|
138
|
+
position: player.positiontable,
|
|
139
|
+
goals: player.goals,
|
|
140
|
+
goals_received: player.goalsrecived,
|
|
141
|
+
games_played: player.games_played,
|
|
142
|
+
category: categoryName,
|
|
143
|
+
effectiveness: player.effectiveness,
|
|
144
|
+
xg: player.xg,
|
|
145
|
+
total: player.total,
|
|
146
|
+
attendance: '-',
|
|
147
|
+
id: player.id,
|
|
148
|
+
}
|
|
149
|
+
"
|
|
150
|
+
@viewprofile="viewprofile($event, player.teamid)"
|
|
151
|
+
:background="index % 2 === 0 ? backgroundEven : backgroundOdd"
|
|
152
|
+
/>
|
|
153
|
+
</template>
|
|
159
154
|
</template>
|
|
160
|
-
</
|
|
155
|
+
</div>
|
|
161
156
|
</template>
|
|
162
157
|
<template v-else>
|
|
163
158
|
<div class="container-no-search-result">
|
|
@@ -186,7 +181,7 @@
|
|
|
186
181
|
<template v-else>
|
|
187
182
|
<GSCTableHeader background="#183143" :type="typeTable" />
|
|
188
183
|
<template v-for="(page, index2) in topData" :key="index2">
|
|
189
|
-
<template v-for="(player, index) in page" :key="index">
|
|
184
|
+
<template v-for="(player, index) in page.slice(0, numRows)" :key="index">
|
|
190
185
|
<GSCRowTable
|
|
191
186
|
:type-data="typeData"
|
|
192
187
|
:team-widget="teamWidget"
|
|
@@ -295,14 +290,11 @@ import GSCLeaders from './gsc-header-tops.vue'
|
|
|
295
290
|
import GSCRowTable from './gsc-row.vue'
|
|
296
291
|
import GSCTableHeader from './gsc-head-titles.vue'
|
|
297
292
|
import GSCExpandedInfo from './gsc-expanded-info-player.vue'
|
|
298
|
-
import { GSCCarousel } from '@golstats/gsc-carousel'
|
|
299
|
-
import '@@/@golstats/gsc-carousel/dist/style.css'
|
|
300
293
|
|
|
301
294
|
import nationalitiesCatalog from '@/components/comparative/nationalities-catalog.js'
|
|
302
295
|
|
|
303
296
|
export default {
|
|
304
297
|
components: {
|
|
305
|
-
GSCCarousel,
|
|
306
298
|
GSCLeaders,
|
|
307
299
|
GSCRowTable,
|
|
308
300
|
GSCTableHeader,
|
|
@@ -387,6 +379,10 @@ export default {
|
|
|
387
379
|
backgroundOdd: { type: String, default: '#172531' },
|
|
388
380
|
backgroundEven: { type: String, default: '#0d1d29' },
|
|
389
381
|
numRows: { type: Number, default: 5 },
|
|
382
|
+
dummyData: {
|
|
383
|
+
type: Array,
|
|
384
|
+
default: null,
|
|
385
|
+
},
|
|
390
386
|
},
|
|
391
387
|
setup() {
|
|
392
388
|
const myDivRef = ref('myDivRef')
|
|
@@ -449,6 +445,10 @@ export default {
|
|
|
449
445
|
},
|
|
450
446
|
computed: {
|
|
451
447
|
topData() {
|
|
448
|
+
// Si hay dummyData, úsala directamente
|
|
449
|
+
if (this.dummyData && this.category === 0) {
|
|
450
|
+
return [this.dummyData]
|
|
451
|
+
}
|
|
452
452
|
this.changeStateLoading(true)
|
|
453
453
|
if (Object.entries(this.statsData).length > 0 && this.formatFilterStats.length > 0) {
|
|
454
454
|
var topTeam = {}
|
|
@@ -945,13 +945,11 @@ export default {
|
|
|
945
945
|
teamId = topLeaderId
|
|
946
946
|
} else {
|
|
947
947
|
playerIds = [topLeaderId]
|
|
948
|
-
categoryIds = categoryIds.filter((id) => !id.toString().includes('_r'))
|
|
949
948
|
}
|
|
950
949
|
} else if (this.isTeam) {
|
|
951
950
|
teamId = data.id
|
|
952
951
|
} else {
|
|
953
952
|
playerIds = [data.id]
|
|
954
|
-
categoryIds = categoryIds.filter((id) => !id.toString().includes('_r'))
|
|
955
953
|
}
|
|
956
954
|
const jsonConfig = {
|
|
957
955
|
auxwidget:
|
|
@@ -1010,7 +1008,6 @@ export default {
|
|
|
1010
1008
|
teamId = data.id
|
|
1011
1009
|
} else {
|
|
1012
1010
|
playerIds = [data.id]
|
|
1013
|
-
categoryIds = categoryIds.filter((id) => !id.toString().includes('_r'))
|
|
1014
1011
|
}
|
|
1015
1012
|
|
|
1016
1013
|
const jsonConfig = {
|
|
@@ -1346,13 +1343,8 @@ export default {
|
|
|
1346
1343
|
}
|
|
1347
1344
|
},
|
|
1348
1345
|
formatArrayPaginate(arrayData) {
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
return Array.from({ length: num }, (_, index) => {
|
|
1352
|
-
const start = index * this.numRows
|
|
1353
|
-
const end = start + this.numRows
|
|
1354
|
-
return arrayData.slice(start, end)
|
|
1355
|
-
})
|
|
1346
|
+
// Solo mostrar la primera página
|
|
1347
|
+
return [arrayData.slice(0, this.numRows)]
|
|
1356
1348
|
},
|
|
1357
1349
|
createIntervalTops() {
|
|
1358
1350
|
this.intervalIdtops = setInterval(async () => {
|
|
@@ -1466,23 +1458,27 @@ export default {
|
|
|
1466
1458
|
}
|
|
1467
1459
|
.gsc-top {
|
|
1468
1460
|
width: 100%;
|
|
1461
|
+
max-width: 100%;
|
|
1469
1462
|
position: relative;
|
|
1470
1463
|
height: auto;
|
|
1471
1464
|
min-height: 460px;
|
|
1472
|
-
margin: 0
|
|
1465
|
+
margin: 0;
|
|
1473
1466
|
padding-bottom: 30px;
|
|
1474
1467
|
border-radius: v-bind(borderRadius);
|
|
1475
1468
|
border-style: solid;
|
|
1476
1469
|
border-width: v-bind(borderWidth);
|
|
1477
1470
|
border-color: v-bind(borderColor);
|
|
1471
|
+
box-sizing: border-box;
|
|
1478
1472
|
}
|
|
1479
1473
|
|
|
1480
1474
|
.gsc-top-full {
|
|
1481
1475
|
width: 100%;
|
|
1476
|
+
max-width: 100%;
|
|
1482
1477
|
height: auto;
|
|
1483
|
-
margin: 0
|
|
1478
|
+
margin: 0;
|
|
1484
1479
|
background: rgb(13, 29, 41);
|
|
1485
1480
|
margin-top: 20px;
|
|
1481
|
+
box-sizing: border-box;
|
|
1486
1482
|
}
|
|
1487
1483
|
|
|
1488
1484
|
.row-table-carrousel {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div ref="myDivRefTopsFull">
|
|
2
|
+
<div ref="myDivRefTopsFull" style="width: 100%; max-width: 100%; box-sizing: border-box">
|
|
3
3
|
<template v-for="(category, index) in categoryView" :key="index">
|
|
4
4
|
<div :class="toniKroosWrapperClass">
|
|
5
5
|
<GSCTopCategory
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
:season-selected="seasonSelected"
|
|
22
22
|
:season="seasonActive"
|
|
23
23
|
:filter-team="teamselect"
|
|
24
|
+
:num-rows="numRows"
|
|
24
25
|
:key="updateTables"
|
|
26
|
+
:dummy-data="category.id === 0 ? dummyData : null"
|
|
25
27
|
/>
|
|
26
28
|
</div>
|
|
27
29
|
</template>
|
|
@@ -158,6 +160,14 @@ export default {
|
|
|
158
160
|
type: String,
|
|
159
161
|
default: '',
|
|
160
162
|
},
|
|
163
|
+
numRows: {
|
|
164
|
+
type: Number,
|
|
165
|
+
default: 5,
|
|
166
|
+
},
|
|
167
|
+
dummyData: {
|
|
168
|
+
type: Array,
|
|
169
|
+
default: null,
|
|
170
|
+
},
|
|
161
171
|
},
|
|
162
172
|
watch: {
|
|
163
173
|
async seasonActive() {
|
|
@@ -9,15 +9,18 @@
|
|
|
9
9
|
:season-active="season"
|
|
10
10
|
:teamselect="teamView"
|
|
11
11
|
:category-view="categoryView"
|
|
12
|
+
:num-rows="numRows"
|
|
13
|
+
:dummy-data="dummyData"
|
|
12
14
|
/>
|
|
13
15
|
</div>
|
|
14
16
|
</template>
|
|
15
17
|
|
|
16
18
|
<script setup>
|
|
17
19
|
import GSCTopFull from '@/components/comparative/gsc-tops-full.vue'
|
|
20
|
+
import { dummyTopPlayers } from './comparative/dummy-top-players.js'
|
|
18
21
|
|
|
19
22
|
// Definir todas las props
|
|
20
|
-
defineProps({
|
|
23
|
+
const props = defineProps({
|
|
21
24
|
categoryView: {
|
|
22
25
|
type: Array,
|
|
23
26
|
default: () => [],
|
|
@@ -50,12 +53,23 @@ defineProps({
|
|
|
50
53
|
type: Number,
|
|
51
54
|
default: 0,
|
|
52
55
|
},
|
|
56
|
+
numRows: {
|
|
57
|
+
type: Number,
|
|
58
|
+
default: 5,
|
|
59
|
+
},
|
|
53
60
|
})
|
|
61
|
+
|
|
62
|
+
// Si la categoría seleccionada es id=0, usa la info dummy
|
|
63
|
+
const dummyData =
|
|
64
|
+
props.categoryView.length === 1 && props.categoryView[0].id === 0 ? dummyTopPlayers : null
|
|
54
65
|
</script>
|
|
55
66
|
|
|
56
67
|
<style scoped>
|
|
57
68
|
.gsc-top-player {
|
|
58
|
-
|
|
69
|
+
width: 100%;
|
|
70
|
+
max-width: 100%;
|
|
71
|
+
display: block;
|
|
72
|
+
box-sizing: border-box;
|
|
59
73
|
}
|
|
60
74
|
|
|
61
75
|
h1 {
|