@golstats/gsc-top-player 1.0.2 → 1.0.5
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-C5NIJbY6.js → FilterConditions-55d68355-D7c85b60.js} +1 -1
- package/dist/{FilterField-59a73e38-DO8nYLqs.js → FilterField-59a73e38-DmiT50dq.js} +1 -1
- package/dist/{FilterSubcategories-a9b32cc9-DlkHni1L.js → FilterSubcategories-a9b32cc9-kojMDEWU.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 +9 -9
- package/dist/{index-DfxUh38Q.js → index-COswdySK.js} +678 -679
- package/package.json +1 -1
- package/src/App.vue +124 -4
- package/src/components/comparative/gsc-top.vue +23 -37
- package/src/components/comparative/gsc-tops-full.vue +2 -2
- package/src/components/gsc-top-player.vue +5 -0
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,20 +1,140 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import GscTopPlayer from './components/gsc-top-player.vue'
|
|
3
|
-
|
|
3
|
+
import { categoriesDefault } from './components/comparative/categories.js'
|
|
4
4
|
// import { dummyTopPlayers } from './components/comparative/dummy-top-players.js'
|
|
5
5
|
|
|
6
6
|
// Selecciona una categoría real o la dummy manualmente para pruebas
|
|
7
|
-
const selectedCategories = [{ id: 0, name: 'Categoria' }]
|
|
8
|
-
|
|
7
|
+
//const selectedCategories = [{ id: 0, name: 'Categoria' }]
|
|
8
|
+
const selectedCategories = categoriesDefault.filter((cat) => cat.id === 2)
|
|
9
|
+
|
|
10
|
+
const gameData = {
|
|
11
|
+
gameId: 90209,
|
|
12
|
+
id: 90209,
|
|
13
|
+
seasonId: 1943,
|
|
14
|
+
regularSeasonId: 1933,
|
|
15
|
+
matchday_name: 'Playoffs 6',
|
|
16
|
+
status: 1,
|
|
17
|
+
score: [2, 0],
|
|
18
|
+
game_status: 1,
|
|
19
|
+
dateTimeUTC: '2025-05-26T00:00:00Z',
|
|
20
|
+
homeTeam: {
|
|
21
|
+
logo: 'https://golstatsimages.blob.core.windows.net/teams-80/18.png',
|
|
22
|
+
team_id: 18,
|
|
23
|
+
provisional_logo: 'https://golstatsimages.blob.core.windows.net/teams-provisional/18.png',
|
|
24
|
+
colloquial_name: 'Toluca',
|
|
25
|
+
acronym: 'TOL',
|
|
26
|
+
team_name: 'Toluca',
|
|
27
|
+
},
|
|
28
|
+
awayTeam: {
|
|
29
|
+
logo: 'https://golstatsimages.blob.core.windows.net/teams-80/2.png',
|
|
30
|
+
team_id: 2,
|
|
31
|
+
provisional_logo: 'https://golstatsimages.blob.core.windows.net/teams-provisional/2.png',
|
|
32
|
+
colloquial_name: 'América',
|
|
33
|
+
acronym: 'AME',
|
|
34
|
+
team_name: 'America',
|
|
35
|
+
},
|
|
36
|
+
is_live: 0,
|
|
37
|
+
minutes: {
|
|
38
|
+
home_goals_minutes: ["L. Garcia 65'", "A. Vega 82'"],
|
|
39
|
+
visiting_goals_minutes: [],
|
|
40
|
+
home_yellow_cards_minutes: ["L. Garcia 90'", "A. Vega 90 + 3'"],
|
|
41
|
+
away_yellow_cards_minutes: ["S. Caceres 78'"],
|
|
42
|
+
home_red_cards_minutes: [],
|
|
43
|
+
away_red_cards_minutes: [],
|
|
44
|
+
},
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const gameData2 = {
|
|
48
|
+
season_id: 2010,
|
|
49
|
+
game_id: 90328,
|
|
50
|
+
matchday_id: 4,
|
|
51
|
+
matchday_name: 'Matchday 4',
|
|
52
|
+
matchday_abbreviation: 'M4',
|
|
53
|
+
home_team: 16,
|
|
54
|
+
visiting_team: 10,
|
|
55
|
+
date: '2025-08-08',
|
|
56
|
+
schedule: '21:00:00',
|
|
57
|
+
date_time_utc: '2025-08-09T02:00:00Z',
|
|
58
|
+
game_status: 4,
|
|
59
|
+
score: [0, 0],
|
|
60
|
+
is_live: 0,
|
|
61
|
+
penalties_score_home_team: 0,
|
|
62
|
+
penalties_score_visiting_team: 0,
|
|
63
|
+
referee_id: 0,
|
|
64
|
+
referee_name: 'Sin designar',
|
|
65
|
+
home_games_played: 2,
|
|
66
|
+
away_games_played: 3,
|
|
67
|
+
has_video: 0,
|
|
68
|
+
tv_stations: [],
|
|
69
|
+
home_team_name: 'Tigres de la UANL',
|
|
70
|
+
visiting_team_name: 'Puebla FC',
|
|
71
|
+
home_team_acronym: 'TIG',
|
|
72
|
+
visiting_team_acronym: 'PUE',
|
|
73
|
+
live_stats: 0,
|
|
74
|
+
has_tracking: 0,
|
|
75
|
+
video_types: [],
|
|
76
|
+
home_team_probability: 69,
|
|
77
|
+
visiting_team_probability: 8,
|
|
78
|
+
draw_probability: 23,
|
|
79
|
+
home_team_xg: 1.9749,
|
|
80
|
+
home_team_goals: 1,
|
|
81
|
+
visiting_team_xg: 6.331,
|
|
82
|
+
visiting_team_goals: 4,
|
|
83
|
+
minutes: {
|
|
84
|
+
home_goals_minutes: [],
|
|
85
|
+
visiting_goals_minutes: [],
|
|
86
|
+
home_yellow_cards_minutes: [],
|
|
87
|
+
away_yellow_cards_minutes: [],
|
|
88
|
+
home_red_cards_minutes: [],
|
|
89
|
+
away_red_cards_minutes: [],
|
|
90
|
+
},
|
|
91
|
+
report_minutes: {
|
|
92
|
+
home_goals_minutes: [],
|
|
93
|
+
visiting_goals_minutes: [],
|
|
94
|
+
home_yellow_cards_minutes: [],
|
|
95
|
+
away_yellow_cards_minutes: [],
|
|
96
|
+
home_red_cards_minutes: [],
|
|
97
|
+
away_red_cards_minutes: [],
|
|
98
|
+
},
|
|
99
|
+
alt_minutes: {
|
|
100
|
+
home_goals_minutes: [],
|
|
101
|
+
visiting_goals_minutes: [],
|
|
102
|
+
home_yellow_cards_minutes: [],
|
|
103
|
+
away_yellow_cards_minutes: [],
|
|
104
|
+
home_red_cards_minutes: [],
|
|
105
|
+
away_red_cards_minutes: [],
|
|
106
|
+
},
|
|
107
|
+
time_active: {
|
|
108
|
+
home_te: '00:00',
|
|
109
|
+
visiting_te: '00:00',
|
|
110
|
+
home_ti: '00:00',
|
|
111
|
+
visiting_ti: '00:00',
|
|
112
|
+
total_te: '00:00',
|
|
113
|
+
total_ti: '00:00',
|
|
114
|
+
others: '00:00',
|
|
115
|
+
home_ta_average: '30:50',
|
|
116
|
+
visiting_ta_average: '31:10',
|
|
117
|
+
referee_ta_average: '-',
|
|
118
|
+
xta: '62:00',
|
|
119
|
+
},
|
|
120
|
+
is_edition_available: 1,
|
|
121
|
+
}
|
|
9
122
|
</script>
|
|
10
123
|
|
|
11
124
|
<template>
|
|
12
125
|
<div id="app">
|
|
13
|
-
|
|
126
|
+
<!--<GscTopPlayer
|
|
14
127
|
:category-view="selectedCategories"
|
|
15
128
|
:gamed="90209"
|
|
16
129
|
:season="1909"
|
|
17
130
|
:team-view="2"
|
|
131
|
+
/>-->
|
|
132
|
+
<GscTopPlayer
|
|
133
|
+
:category-view="selectedCategories"
|
|
134
|
+
:gamed="gameData.id"
|
|
135
|
+
:game="gameData"
|
|
136
|
+
:season="gameData.seasonId"
|
|
137
|
+
:team-view="2"
|
|
18
138
|
/>
|
|
19
139
|
</div>
|
|
20
140
|
</template>
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
<div ref="myDivRef">
|
|
4
4
|
<template v-if="type == 0">
|
|
5
5
|
<template v-if="topData.length > 0">
|
|
6
|
+
<!-- Título de la categoría con línea verde -->
|
|
7
|
+
<div class="btnViewFullList">
|
|
8
|
+
<div class="text">{{ categoryName }}</div>
|
|
9
|
+
</div>
|
|
6
10
|
<div class="row-table-carrousel">
|
|
7
11
|
<template v-for="(player, index) in topData[0]" :key="index">
|
|
8
12
|
<template v-if="player.top == 1">
|
|
@@ -319,7 +323,7 @@ export default {
|
|
|
319
323
|
},
|
|
320
324
|
typeData: {
|
|
321
325
|
type: Number,
|
|
322
|
-
default:
|
|
326
|
+
default: 0,
|
|
323
327
|
},
|
|
324
328
|
gameId: {
|
|
325
329
|
type: Number,
|
|
@@ -1090,6 +1094,7 @@ export default {
|
|
|
1090
1094
|
this.playerexpand = expandobject.id
|
|
1091
1095
|
},
|
|
1092
1096
|
async getCategoryStats(season) {
|
|
1097
|
+
console.log('llego aqui; ', season)
|
|
1093
1098
|
this.mapPlayers = new Map()
|
|
1094
1099
|
try {
|
|
1095
1100
|
if (!season) return
|
|
@@ -1108,43 +1113,23 @@ export default {
|
|
|
1108
1113
|
})
|
|
1109
1114
|
this.isloading = true
|
|
1110
1115
|
let data = {}
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
} else {
|
|
1117
|
-
data = await axiosInstance.get(this.url + '/' + this.gameId + '/' + this.category)
|
|
1118
|
-
}
|
|
1116
|
+
console.log('this.typeData:::: ', this.typeData)
|
|
1117
|
+
|
|
1118
|
+
console.log('this.game, ', this.game)
|
|
1119
|
+
if (this.game.game_status === 1) {
|
|
1120
|
+
data = await axiosInstance.get(this.url + '/' + this.gameId + '/' + this.category)
|
|
1119
1121
|
} else {
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
if (this.isWidget && this.teamWidget != 0) {
|
|
1132
|
-
data = await axiosInstance.get(
|
|
1133
|
-
this.urlPrematch + seasonGet + '/' + this.category + '?t=' + this.teamWidget,
|
|
1134
|
-
)
|
|
1135
|
-
} else {
|
|
1136
|
-
data = await axiosInstance.get(
|
|
1137
|
-
this.urlPrematch +
|
|
1138
|
-
seasonGet +
|
|
1139
|
-
'/' +
|
|
1140
|
-
this.category +
|
|
1141
|
-
'?t=' +
|
|
1142
|
-
this.game.homeTeam.team_id +
|
|
1143
|
-
'&t=' +
|
|
1144
|
-
this.game.awayTeam.team_id,
|
|
1145
|
-
)
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1122
|
+
console.log('LLEGO ES 2 PRWMATCH')
|
|
1123
|
+
data = await axiosInstance.get(
|
|
1124
|
+
this.urlPrematch +
|
|
1125
|
+
seasonGet +
|
|
1126
|
+
'/' +
|
|
1127
|
+
this.category +
|
|
1128
|
+
'?t=' +
|
|
1129
|
+
this.game.home_team +
|
|
1130
|
+
'&t=' +
|
|
1131
|
+
this.game.visiting_team,
|
|
1132
|
+
)
|
|
1148
1133
|
}
|
|
1149
1134
|
if (data && data.data && data.data.data && data.data.data.length > 0) {
|
|
1150
1135
|
catPlays = data.data.data.map((play) => {
|
|
@@ -1451,6 +1436,7 @@ export default {
|
|
|
1451
1436
|
height: 33px;
|
|
1452
1437
|
display: flex;
|
|
1453
1438
|
align-items: flex-end;
|
|
1439
|
+
color: white;
|
|
1454
1440
|
}
|
|
1455
1441
|
|
|
1456
1442
|
.hidden {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
border-radius="12px"
|
|
15
15
|
:game-id="gameId"
|
|
16
16
|
:game="game"
|
|
17
|
-
:typeData="
|
|
17
|
+
:typeData="0"
|
|
18
18
|
:category="category.id"
|
|
19
19
|
:type-table="typeTable"
|
|
20
20
|
:categoryName="category.name"
|
|
@@ -100,7 +100,7 @@ export default {
|
|
|
100
100
|
},
|
|
101
101
|
typeData: {
|
|
102
102
|
type: Number,
|
|
103
|
-
default:
|
|
103
|
+
default: 0,
|
|
104
104
|
},
|
|
105
105
|
canPlayVideos: {
|
|
106
106
|
type: Boolean,
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
:arrow="arrow"
|
|
7
7
|
:type-data="type"
|
|
8
8
|
:game-id="gamed"
|
|
9
|
+
:game="game"
|
|
9
10
|
:season-active="season"
|
|
10
11
|
:teamselect="teamView"
|
|
11
12
|
:category-view="categoryView"
|
|
@@ -41,6 +42,10 @@ const props = defineProps({
|
|
|
41
42
|
type: Number,
|
|
42
43
|
default: 1,
|
|
43
44
|
},
|
|
45
|
+
game: {
|
|
46
|
+
type: Object,
|
|
47
|
+
default: () => ({}),
|
|
48
|
+
},
|
|
44
49
|
gamed: {
|
|
45
50
|
type: Number,
|
|
46
51
|
default: 90209,
|