@golstats/gsc-top-player 1.0.14 → 1.0.16

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": "@golstats/gsc-top-player",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "main": "dist/gsc-top-player.umd.js",
5
5
  "module": "dist/gsc-top-player.es.js",
6
6
  "exports": {
package/src/App.vue CHANGED
@@ -48,8 +48,9 @@ const gameData = {
48
48
  :gamed="gameData.id"
49
49
  :game="gameData"
50
50
  :season="gameData.seasonId"
51
- :team-view="2"
51
+ :team-view="1"
52
52
  :use-dummy-data="true"
53
+ :show-position="true"
53
54
  />
54
55
  <!-- Ejemplo con datos reales (useDummyData: false) -->
55
56
  <!--
@@ -2,10 +2,10 @@
2
2
  <div>
3
3
  <div v-if="type == 0" :class="$style.headerTopsGamesReports">
4
4
  <div :class="$style.playerRowReports" id="player-row">
5
- <div :class="$style.headerTopGameReports">
5
+ <div :class="$style.headerTopGameReportsAuto">
6
6
  <div :class="$style.playerPhotoGamesReports" id="container-player-photp">
7
- <div :class="$style.tablePositionWrapperGamesReports">
8
- <b :class="$style.tablePositionGamesReports">{{ data.top }}</b>
7
+ <div :class="$style.tablePositionWrapperGamesReports">
8
+ <b :class="$style.tablePositionGamesReports"><template v-if="showPosition">{{ data.top }}</template></b>
9
9
  <div
10
10
  :class="$style.teamIconOverlay"
11
11
  :style="{ backgroundImage: `url(${data.logo})` }"
@@ -93,8 +93,8 @@
93
93
  <div :class="$style.containerHeaderReports" id="header-container">
94
94
  <div :class="$style.headerTopTeamReports">
95
95
  <div :class="$style.teamPhotoReports" id="container-team">
96
- <div :class="$style.positionWrapperReports">
97
- <b :class="$style.positionReports">{{ data.top }}</b>
96
+ <div :class="$style.positionWrapperReports">
97
+ <b :class="$style.positionReports"><template v-if="showPosition">{{ data.top }}</template></b>
98
98
  </div>
99
99
  <div :class="$style.teamLogoReports">
100
100
  <img :class="$style.imgNecaxaIconReports" alt="" :src="data.logo" />
@@ -313,6 +313,10 @@ export default {
313
313
  type: String,
314
314
  default: '12px',
315
315
  },
316
+ showPosition: {
317
+ type: Boolean,
318
+ default: true,
319
+ },
316
320
  },
317
321
  data: () => ({
318
322
  expand: false,
@@ -577,7 +581,7 @@ body {
577
581
  height: inherit;
578
582
  }
579
583
 
580
- .headerTopGameReports {
584
+ .headerTopGameReportsAuto {
581
585
  align-self: stretch;
582
586
  border-radius: var(--br-5xs-reports) var(--br-5xs-reports) 0px 0px;
583
587
  background-color: v-bind(backgroundColorHeader);
@@ -728,7 +732,7 @@ body {
728
732
  display: none;
729
733
  }
730
734
 
731
- .headerTopGameReports {
735
+ .headerTopGameReportsAuto {
732
736
  gap: var(--gap-0-reports);
733
737
  align-items: center;
734
738
  justify-content: flex-end;
@@ -830,7 +834,7 @@ body {
830
834
  gap: 9px;
831
835
  }
832
836
 
833
- .headerTopGameReports {
837
+ .headerTopGameReportsAuto {
834
838
  height: 80px;
835
839
  gap: var(--gap-0-reports);
836
840
  align-items: center;
@@ -879,7 +883,7 @@ body {
879
883
  }
880
884
 
881
885
  @container header-tops (max-width: 300px) {
882
- .headerTopGameReports {
886
+ .headerTopGameReportsAuto {
883
887
  position: relative;
884
888
  height: 88px;
885
889
  align-items: flex-end;
@@ -9,7 +9,7 @@
9
9
  <div v-if="type == 0" :class="rowwPlayerClass" id="container-row-player">
10
10
  <!-- jugador -->
11
11
  <div :class="containerLeftClass" id="container-left">
12
- <div :class="positionContainerClass">
12
+ <div v-if="showPosition" :class="positionContainerClass">
13
13
  <div :class="numberPositionClass">{{ data.position }}</div>
14
14
  </div>
15
15
  <div :class="playerContainerClass">
@@ -59,7 +59,7 @@
59
59
  >
60
60
  <!-- equipo -->
61
61
  <div :class="containerLeftType1Class" id="container-left">
62
- <div :class="positionContainertype1Class">
62
+ <div v-if="showPosition" :class="positionContainertype1Class">
63
63
  <div :class="numberPositionType1Class">{{ data.position }}</div>
64
64
  </div>
65
65
  <div :class="playerContainerType1Class">
@@ -97,7 +97,7 @@
97
97
  <div v-if="type == 2" :class="rowwPlayerClass" id="container-row-player">
98
98
  <!-- scouting -->
99
99
  <div :class="containerLeftClass" id="container-left">
100
- <div :class="positionContainerClass">
100
+ <div v-if="showPosition" :class="positionContainerClass">
101
101
  <div :class="numberPositionClass">{{ data.position }}</div>
102
102
  </div>
103
103
  <div :class="playerContainerClass">
@@ -517,15 +517,15 @@ export default {
517
517
  rowwPlayerClass() {
518
518
  const width = this.elementSize.width
519
519
  if (width <= 300) {
520
- return this.$style.rowwPlayer300Games
520
+ return this.$style.rowwPlayer300GamesReports
521
521
  } else if (width <= 420) {
522
- return this.$style.rowwPlayer420Games
522
+ return this.$style.rowwPlayer420GamesReports
523
523
  } else if (width <= 460) {
524
- return this.$style.rowwPlayer460Games
524
+ return this.$style.rowwPlayer460GamesReports
525
525
  } else if (width <= 960) {
526
- return this.$style.rowwPlayer960Games
526
+ return this.$style.rowwPlayer960GamesReports
527
527
  } else {
528
- return this.$style.rowwPlayerGames
528
+ return this.$style.rowwPlayerGamesReports
529
529
  }
530
530
  },
531
531
  },
@@ -580,6 +580,7 @@ export default {
580
580
  buttonfontFamily: { type: String, default: 'Poppins-Regular' },
581
581
  buttonBorderColor: { type: String, default: '#55636e' },
582
582
  buttonFontSize: { type: String, default: '10px' },
583
+ showPosition: { type: Boolean, default: true },
583
584
  },
584
585
  data: () => ({
585
586
  expand: false,
@@ -665,7 +666,7 @@ export default {
665
666
  justify-content: flex-start;
666
667
  gap: var(--gap-xsrow);
667
668
  }
668
- .rowwPlayerGames {
669
+ .rowwPlayerGamesReports {
669
670
  align-self: stretch;
670
671
  display: flex;
671
672
  height: v-bind(height) !important;
@@ -681,7 +682,7 @@ export default {
681
682
  font-family: v-bind(fontFamily);
682
683
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
683
684
  }
684
- .rowwPlayer300Games {
685
+ .rowwPlayer300GamesReports {
685
686
  align-self: stretch;
686
687
  display: flex;
687
688
  height: 45px !important;
@@ -697,7 +698,7 @@ export default {
697
698
  padding: 0 8px;
698
699
  box-sizing: border-box;
699
700
  }
700
- .rowwPlayer960Games {
701
+ .rowwPlayer960GamesReports {
701
702
  align-self: stretch;
702
703
  display: flex;
703
704
  height: v-bind(height) !important;
@@ -712,7 +713,7 @@ export default {
712
713
  font-family: v-bind(fontFamily);
713
714
  gap: var(--gap-0row);
714
715
  }
715
- .rowwPlayer420Games {
716
+ .rowwPlayer420GamesReports {
716
717
  align-self: stretch;
717
718
  display: flex;
718
719
  height: 59px !important;
@@ -728,7 +729,7 @@ export default {
728
729
  padding: 0 13px;
729
730
  box-sizing: border-box;
730
731
  }
731
- .rowwPlayer460Games {
732
+ .rowwPlayer460GamesReports {
732
733
  align-self: stretch;
733
734
  display: flex;
734
735
  height: 59px !important;
@@ -9,7 +9,7 @@
9
9
  </div>
10
10
  <div class="row-table-carrousel">
11
11
  <template v-for="(player, index) in topData[0]" :key="index">
12
- <template v-if="player.top == 1">
12
+ <template v-if="player.top == 1 && showPosition">
13
13
  <GSCLeaders
14
14
  @mediadata="emitEventMedia($event, category, categoryName)"
15
15
  :type="typeTable"
@@ -19,6 +19,7 @@
19
19
  :team-widget="teamWidget"
20
20
  :can-play-videos="canPlayVideos"
21
21
  :is-expanded="playerexpand == player.id && expand"
22
+ :show-position="showPosition"
22
23
  ref="GSCLeaders"
23
24
  :data="
24
25
  typeTable == 0
@@ -70,6 +71,7 @@
70
71
  :type-view="type"
71
72
  :arrow="arrow"
72
73
  :is-expanded="playerexpand == player.id && expand"
74
+ :show-position="showPosition"
73
75
  @mediadata="emitEventMedia($event, category, categoryName)"
74
76
  :data="
75
77
  typeTable == 0
@@ -195,6 +197,7 @@
195
197
  :type-view="type"
196
198
  :can-play-videos="canPlayVideos"
197
199
  :is-expanded="playerexpand == player.id && expand"
200
+ :show-position="showPosition"
198
201
  @mediadata="emitEventMediaFullTable($event, category, categoryName)"
199
202
  :data="
200
203
  typeTable == 0
@@ -387,6 +390,10 @@ export default {
387
390
  type: Array,
388
391
  default: null,
389
392
  },
393
+ showPosition: {
394
+ type: Boolean,
395
+ default: true,
396
+ },
390
397
  },
391
398
  setup() {
392
399
  const myDivRef = ref('myDivRef')
@@ -1108,7 +1115,6 @@ export default {
1108
1115
  this.playerexpand = expandobject.id
1109
1116
  },
1110
1117
  async getCategoryStats(season) {
1111
- console.log('llego aqui; ', season)
1112
1118
  this.mapPlayers = new Map()
1113
1119
  try {
1114
1120
  if (!season) return
@@ -1127,9 +1133,6 @@ export default {
1127
1133
  })
1128
1134
  this.isloading = true
1129
1135
  let data = {}
1130
- console.log('this.typeData:::: ', this.typeData)
1131
-
1132
- console.log('this.game, ', this.game)
1133
1136
  if (this.typeData === 0) {
1134
1137
  data = await axiosInstance.get(this.url + '/' + this.gameId + '/' + this.category)
1135
1138
  } else {
@@ -24,6 +24,7 @@
24
24
  :num-rows="numRows"
25
25
  :key="updateTables"
26
26
  :dummy-data="dummyData"
27
+ :show-position="showPosition"
27
28
  />
28
29
  </div>
29
30
  </template>
@@ -168,6 +169,10 @@ export default {
168
169
  type: Array,
169
170
  default: null,
170
171
  },
172
+ showPosition: {
173
+ type: Boolean,
174
+ default: true,
175
+ },
171
176
  },
172
177
  watch: {
173
178
  async seasonActive() {
@@ -12,6 +12,7 @@
12
12
  :category-view="categoryView"
13
13
  :num-rows="numRows"
14
14
  :dummy-data="dummyData"
15
+ :show-position="showPosition"
15
16
  />
16
17
  </div>
17
18
  </template>
@@ -66,6 +67,10 @@ const props = defineProps({
66
67
  type: Boolean,
67
68
  default: true,
68
69
  },
70
+ showPosition: {
71
+ type: Boolean,
72
+ default: true,
73
+ },
69
74
  })
70
75
 
71
76
  // Si useDummyData es true, usa datos dummy, si es false busca datos reales