@golstats/gsc-reports 1.0.1 → 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.
Files changed (39) hide show
  1. package/README.md +2 -2
  2. package/dist/{FilterConditions-55d68355-C5NIJbY6-DWa3dxmP-Co0tydjQ.js → FilterConditions-55d68355-C5NIJbY6-BIYJFxA1-ChzU0yno.js} +1 -1
  3. package/dist/{FilterField-59a73e38-DO8nYLqs-CTbXvU0R-DbyfTDxj.js → FilterField-59a73e38-DO8nYLqs-BlMX75HQ-DcD79wEB.js} +1 -1
  4. package/dist/{FilterSubcategories-a9b32cc9-DlkHni1L-CutVIJmz-DF1NB-nW.js → FilterSubcategories-a9b32cc9-DlkHni1L-DbepEYoC-4bY4RGa1.js} +1 -1
  5. package/dist/css/fonts.css +83 -83
  6. package/dist/gsc-reports.css +1 -1
  7. package/dist/gsc-reports.es.js +1 -1
  8. package/dist/gsc-reports.umd.js +70 -70
  9. package/dist/icons/icn-report.svg +10 -10
  10. package/dist/{index-C108f86H.js → index-Cdmd9KsD.js} +12884 -12857
  11. package/package.json +2 -2
  12. package/src/App.vue +5 -0
  13. package/src/components/elementsTemplates/ModalCreateTemplate.vue +9 -2
  14. package/src/components/elementsTemplates/ModalDeleteReport.vue +239 -231
  15. package/src/components/elementsTemplates/ModalDeleteTemplate.vue +242 -234
  16. package/src/components/elementsTemplates/ModalGenerarReporte.vue +18 -5
  17. package/src/components/elementsTemplates/ModalRenameReporte.vue +323 -315
  18. package/src/components/elementsTemplates/ModalRenameTemplate.vue +330 -320
  19. package/src/components/elementsTemplates/ModalSoloEscritorio.vue +83 -83
  20. package/src/components/elementsTemplates/ModalduplicateTemplate.vue +293 -283
  21. package/src/components/elementsTemplates/TooltipReportOptions.vue +85 -85
  22. package/src/components/elementsTemplates/TooltipTemplateOptions.vue +141 -141
  23. package/src/components/filters.vue +935 -935
  24. package/src/components/gsc-reports.vue +7 -1
  25. package/src/components/template-report-maker/CoverPage.vue +636 -636
  26. package/src/components/template-report-maker/CoverSelector.vue +165 -165
  27. package/src/components/template-report-maker/ReportView.vue +66 -66
  28. package/src/components/template-report-maker/TemplateReportPage.vue +398 -398
  29. package/src/components/thumbnails-reports/AnalisisPostMatchType1.vue +741 -741
  30. package/src/components/thumbnails-reports/AnalisisPostMatchType2.vue +743 -743
  31. package/src/components/thumbnails-reports/AnalisisPostMatchType3.vue +463 -463
  32. package/src/components/thumbnails-reports/AnalisisPostMatchType4.vue +462 -462
  33. package/src/components/thumbnails-reports/AnalisisPrematchType1.vue +164 -164
  34. package/src/components/thumbnails-reports/AnalisisPrematchType2.vue +163 -163
  35. package/src/components/thumbnails-reports/AnalisisPrematchType3.vue +173 -173
  36. package/src/components/thumbnails-reports/AnalisisPrematchType4.vue +173 -173
  37. package/src/index.js +4 -4
  38. package/src/types.d.ts +45 -45
  39. package/src/utils/dateUtils.js +52 -52
@@ -1,234 +1,242 @@
1
- <template>
2
- <div class="modal-overlay" @click.self="$emit('close')">
3
- <div class="modal-content">
4
- <button class="close-btn" @click="$emit('close')">
5
- <img src="/icons/icn-close.svg" alt="Cerrar" />
6
- </button>
7
- <div class="modal-header">
8
- <img src="/icons/icn-delete-delete.svg" class="icon-title" alt="icon" />
9
- <span class="modal-title">Eliminar template</span>
10
- </div>
11
- <div class="header-separator"></div>
12
- <div class="modal-body confirm-text">
13
- ¿Estás seguro que deseas eliminar<br />
14
- este template? Si lo haces no habrá manera<br />
15
- de recuperarlo.
16
- </div>
17
- <div class="header-separator"></div>
18
- <div class="modal-footer">
19
- <button class="cancel-btn" @click="$emit('close')">Cancelar</button>
20
- <button class="delete-btn" @click="handleDelete" :disabled="isDeleting">
21
- {{ isDeleting ? 'Eliminando...' : 'Eliminar' }}
22
- </button>
23
- </div>
24
- </div>
25
- </div>
26
- </template>
27
-
28
- <script setup>
29
- import { ref } from 'vue'
30
- import axios from 'axios'
31
-
32
- // Props para recibir el ID del template, user_id y token
33
- const props = defineProps({
34
- templateId: {
35
- type: String,
36
- required: true,
37
- },
38
- userId: {
39
- type: String,
40
- required: true,
41
- },
42
- token: {
43
- type: String,
44
- required: true,
45
- },
46
- })
47
-
48
- // Emits para comunicar con el componente padre
49
- const emit = defineEmits(['close', 'delete', 'templateDeleted'])
50
-
51
- // Estado para controlar el loading
52
- const isDeleting = ref(false)
53
-
54
- // Función para eliminar el template
55
- const handleDelete = async () => {
56
- try {
57
- isDeleting.value = true
58
- const axiosInstance = axios.create({ headers: { Authorization: `${props.token}` } })
59
- const response = await axiosInstance.delete(
60
- `https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${props.userId}/templates/${props.templateId}`,
61
- )
62
-
63
- if (response.status === 200 || response.status === 204) {
64
- // Emitir evento de éxito para refrescar la lista
65
- emit('templateDeleted', props.templateId)
66
- emit('close')
67
- }
68
- } catch (error) {
69
- console.error('Error al eliminar template:', error)
70
- // Aquí podrías mostrar un mensaje de error al usuario
71
- alert('Error al eliminar el template. Por favor, inténtalo de nuevo.')
72
- } finally {
73
- isDeleting.value = false
74
- }
75
- }
76
- </script>
77
-
78
- <style scoped>
79
- .modal-overlay {
80
- position: fixed;
81
- top: 0;
82
- left: 0;
83
- width: 100vw;
84
- height: 100vh;
85
- background: rgba(0, 0, 0, 0.45);
86
- display: flex;
87
- align-items: center;
88
- justify-content: center;
89
- z-index: 3200;
90
- }
91
- .modal-content {
92
- width: 375px;
93
- height: 218px;
94
- background: #2e3b46;
95
- border-radius: 10px;
96
- box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.18);
97
- padding: 0;
98
- position: relative;
99
- display: flex;
100
- flex-direction: column;
101
- font-family: 'Poppins-Regular', 'Montserrat', sans-serif;
102
- }
103
- .close-btn {
104
- position: absolute;
105
- top: 16px;
106
- right: 16px;
107
- background: none;
108
- border: none;
109
- cursor: pointer;
110
- z-index: 2;
111
- padding: 0;
112
- display: flex;
113
- align-items: center;
114
- justify-content: center;
115
- }
116
- .close-btn:hover {
117
- opacity: 0.7;
118
- }
119
- .close-btn img {
120
- width: 20px;
121
- height: 20px;
122
- }
123
- .header-separator {
124
- width: 100%;
125
- height: 1px;
126
- border-bottom: dashed 1px #58626b;
127
- margin: 12px 0 0 0;
128
- }
129
- .modal-header {
130
- display: flex;
131
- align-items: center;
132
- gap: 8px;
133
- padding: 20px 24px 0 24px;
134
- }
135
- .icon-title {
136
- width: 15px;
137
- height: 15px;
138
- }
139
- .modal-title {
140
- font-family: Poppins-Medium;
141
- font-size: 14px;
142
- font-weight: 500;
143
- font-stretch: normal;
144
- font-style: normal;
145
- line-height: 1.5;
146
- letter-spacing: normal;
147
- text-align: left;
148
- color: #fff;
149
- }
150
- .modal-body.confirm-text {
151
- flex: 1;
152
- display: flex;
153
- flex-direction: column;
154
- justify-content: center;
155
- align-items: center;
156
- padding: 4px 24px 0 24px;
157
- opacity: 0.5;
158
- font-family: Poppins-Regular;
159
- font-size: 13px;
160
- font-weight: normal;
161
- font-stretch: normal;
162
- font-style: normal;
163
- line-height: 1.38;
164
- letter-spacing: normal;
165
- text-align: center;
166
- color: #fff;
167
- }
168
- .modal-footer {
169
- display: flex;
170
- justify-content: center;
171
- align-items: center;
172
- gap: 18px;
173
- margin-top: 13px;
174
- padding: 0 24px 12px 24px;
175
- }
176
- .cancel-btn {
177
- background: none;
178
- border: none;
179
- color: #b0bec5;
180
- font-size: 14.9px;
181
- font-family: Poppins-Medium;
182
- height: 30px;
183
- border-radius: 64px;
184
- display: flex;
185
- align-items: center;
186
- justify-content: center;
187
- cursor: pointer;
188
- padding: 0 18px;
189
- transition: color 0.2s;
190
- text-decoration: underline;
191
- }
192
- .cancel-btn:hover {
193
- color: #fff;
194
- }
195
- .delete-btn {
196
- width: 107px;
197
- height: 30px;
198
- border-radius: 64px;
199
- -webkit-backdrop-filter: blur(16px);
200
- backdrop-filter: blur(16px);
201
- border: solid 0.8px #ff6b6b;
202
- background-color: rgba(255, 255, 255, 0.06);
203
- font-family: Poppins-Medium;
204
- font-size: 14.9px;
205
- font-weight: 500;
206
- font-stretch: normal;
207
- font-style: normal;
208
- line-height: 1.2;
209
- letter-spacing: -0.45px;
210
- text-align: center;
211
- color: #ff6b6b;
212
- cursor: pointer;
213
- transition:
214
- background 0.2s,
215
- color 0.2s;
216
- display: flex;
217
- align-items: center;
218
- justify-content: center;
219
- }
220
- .delete-btn:hover {
221
- background: #ff6b6b;
222
- color: #fff;
223
- }
224
-
225
- .delete-btn:disabled {
226
- opacity: 0.5;
227
- cursor: not-allowed;
228
- }
229
-
230
- .delete-btn:disabled:hover {
231
- background-color: rgba(255, 255, 255, 0.06);
232
- color: #ff6b6b;
233
- }
234
- </style>
1
+ <template>
2
+ <div class="modal-overlay">
3
+ <div class="modal-content">
4
+ <button class="close-btn" @click="$emit('close')">
5
+ <img src="/icons/icn-close.svg" alt="Cerrar" />
6
+ </button>
7
+ <div class="modal-header">
8
+ <img src="/icons/icn-delete-delete.svg" class="icon-title" alt="icon" />
9
+ <span class="modal-title">Eliminar template</span>
10
+ </div>
11
+ <div class="header-separator"></div>
12
+ <div class="modal-body confirm-text">
13
+ ¿Estás seguro que deseas eliminar<br />
14
+ este template? Si lo haces no habrá manera<br />
15
+ de recuperarlo.
16
+ </div>
17
+ <div class="header-separator"></div>
18
+ <div class="modal-footer">
19
+ <button class="cancel-btn" @click="$emit('close')">Cancelar</button>
20
+ <button class="delete-btn" @click="handleDelete" :disabled="isDeleting">
21
+ {{ isDeleting ? 'Eliminando...' : 'Eliminar' }}
22
+ </button>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </template>
27
+
28
+ <script setup>
29
+ import { ref, onMounted, onUnmounted } from 'vue'
30
+ import axios from 'axios'
31
+
32
+ // Props para recibir el ID del template, user_id y token
33
+ const props = defineProps({
34
+ templateId: {
35
+ type: String,
36
+ required: true,
37
+ },
38
+ userId: {
39
+ type: String,
40
+ required: true,
41
+ },
42
+ token: {
43
+ type: String,
44
+ required: true,
45
+ },
46
+ })
47
+
48
+ // Emits para comunicar con el componente padre
49
+ const emit = defineEmits(['close', 'delete', 'templateDeleted'])
50
+
51
+ // Estado para controlar el loading
52
+ const isDeleting = ref(false)
53
+
54
+ // Deshabilitar scroll al abrir la modal y restaurar al cerrar
55
+ onMounted(() => {
56
+ document.body.style.overflow = 'hidden'
57
+ })
58
+ onUnmounted(() => {
59
+ document.body.style.overflow = ''
60
+ })
61
+
62
+ // Función para eliminar el template
63
+ const handleDelete = async () => {
64
+ try {
65
+ isDeleting.value = true
66
+ const axiosInstance = axios.create({ headers: { Authorization: `${props.token}` } })
67
+ const response = await axiosInstance.delete(
68
+ `https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${props.userId}/templates/${props.templateId}`,
69
+ )
70
+
71
+ if (response.status === 200 || response.status === 204) {
72
+ // Emitir evento de éxito para refrescar la lista
73
+ emit('templateDeleted', props.templateId)
74
+ emit('close')
75
+ }
76
+ } catch (error) {
77
+ console.error('Error al eliminar template:', error)
78
+ // Aquí podrías mostrar un mensaje de error al usuario
79
+ alert('Error al eliminar el template. Por favor, inténtalo de nuevo.')
80
+ } finally {
81
+ isDeleting.value = false
82
+ }
83
+ }
84
+ </script>
85
+
86
+ <style scoped>
87
+ .modal-overlay {
88
+ position: fixed;
89
+ top: 0;
90
+ left: 0;
91
+ width: 100vw;
92
+ height: 100vh;
93
+ background: rgba(0, 0, 0, 0.45);
94
+ display: flex;
95
+ align-items: center;
96
+ justify-content: center;
97
+ z-index: 3200;
98
+ }
99
+ .modal-content {
100
+ width: 375px;
101
+ height: 218px;
102
+ background: #2e3b46;
103
+ border-radius: 10px;
104
+ box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.18);
105
+ padding: 0;
106
+ position: relative;
107
+ display: flex;
108
+ flex-direction: column;
109
+ font-family: 'Poppins-Regular', 'Montserrat', sans-serif;
110
+ }
111
+ .close-btn {
112
+ position: absolute;
113
+ top: 16px;
114
+ right: 16px;
115
+ background: none;
116
+ border: none;
117
+ cursor: pointer;
118
+ z-index: 2;
119
+ padding: 0;
120
+ display: flex;
121
+ align-items: center;
122
+ justify-content: center;
123
+ }
124
+ .close-btn:hover {
125
+ opacity: 0.7;
126
+ }
127
+ .close-btn img {
128
+ width: 20px;
129
+ height: 20px;
130
+ }
131
+ .header-separator {
132
+ width: 100%;
133
+ height: 1px;
134
+ border-bottom: dashed 1px #58626b;
135
+ margin: 12px 0 0 0;
136
+ }
137
+ .modal-header {
138
+ display: flex;
139
+ align-items: center;
140
+ gap: 8px;
141
+ padding: 20px 24px 0 24px;
142
+ }
143
+ .icon-title {
144
+ width: 15px;
145
+ height: 15px;
146
+ }
147
+ .modal-title {
148
+ font-family: Poppins-Medium;
149
+ font-size: 14px;
150
+ font-weight: 500;
151
+ font-stretch: normal;
152
+ font-style: normal;
153
+ line-height: 1.5;
154
+ letter-spacing: normal;
155
+ text-align: left;
156
+ color: #fff;
157
+ }
158
+ .modal-body.confirm-text {
159
+ flex: 1;
160
+ display: flex;
161
+ flex-direction: column;
162
+ justify-content: center;
163
+ align-items: center;
164
+ padding: 4px 24px 0 24px;
165
+ opacity: 0.5;
166
+ font-family: Poppins-Regular;
167
+ font-size: 13px;
168
+ font-weight: normal;
169
+ font-stretch: normal;
170
+ font-style: normal;
171
+ line-height: 1.38;
172
+ letter-spacing: normal;
173
+ text-align: center;
174
+ color: #fff;
175
+ }
176
+ .modal-footer {
177
+ display: flex;
178
+ justify-content: center;
179
+ align-items: center;
180
+ gap: 18px;
181
+ margin-top: 13px;
182
+ padding: 0 24px 12px 24px;
183
+ }
184
+ .cancel-btn {
185
+ background: none;
186
+ border: none;
187
+ color: #b0bec5;
188
+ font-size: 14.9px;
189
+ font-family: Poppins-Medium;
190
+ height: 30px;
191
+ border-radius: 64px;
192
+ display: flex;
193
+ align-items: center;
194
+ justify-content: center;
195
+ cursor: pointer;
196
+ padding: 0 18px;
197
+ transition: color 0.2s;
198
+ text-decoration: underline;
199
+ }
200
+ .cancel-btn:hover {
201
+ color: #fff;
202
+ }
203
+ .delete-btn {
204
+ width: 107px;
205
+ height: 30px;
206
+ border-radius: 64px;
207
+ -webkit-backdrop-filter: blur(16px);
208
+ backdrop-filter: blur(16px);
209
+ border: solid 0.8px #ff6b6b;
210
+ background-color: rgba(255, 255, 255, 0.06);
211
+ font-family: Poppins-Medium;
212
+ font-size: 14.9px;
213
+ font-weight: 500;
214
+ font-stretch: normal;
215
+ font-style: normal;
216
+ line-height: 1.2;
217
+ letter-spacing: -0.45px;
218
+ text-align: center;
219
+ color: #ff6b6b;
220
+ cursor: pointer;
221
+ transition:
222
+ background 0.2s,
223
+ color 0.2s;
224
+ display: flex;
225
+ align-items: center;
226
+ justify-content: center;
227
+ }
228
+ .delete-btn:hover {
229
+ background: #ff6b6b;
230
+ color: #fff;
231
+ }
232
+
233
+ .delete-btn:disabled {
234
+ opacity: 0.5;
235
+ cursor: not-allowed;
236
+ }
237
+
238
+ .delete-btn:disabled:hover {
239
+ background-color: rgba(255, 255, 255, 0.06);
240
+ color: #ff6b6b;
241
+ }
242
+ </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="modal-overlay" @click.self="$emit('close')">
2
+ <div class="modal-overlay">
3
3
  <div class="modal-content">
4
4
  <button class="close-btn" @click="$emit('close')">
5
5
  <img src="/icons/icn-close.svg" alt="Cerrar" />
@@ -274,7 +274,7 @@
274
274
  </template>
275
275
 
276
276
  <script setup>
277
- import { ref, defineEmits, onMounted } from 'vue'
277
+ import { ref, defineEmits, onMounted, onUnmounted } from 'vue'
278
278
  import axios from 'axios'
279
279
 
280
280
  const props = defineProps({
@@ -658,14 +658,27 @@ function selectPartido(partido) {
658
658
  showDropdownPartidos.value = false
659
659
  }
660
660
 
661
- function closeModal() {
662
- showError409.value = false
663
- emit('close')
661
+ function bloquearScroll() {
662
+ document.body.style.overflow = 'hidden'
663
+ }
664
+ function restaurarScroll() {
665
+ document.body.style.overflow = ''
664
666
  }
665
667
 
666
668
  onMounted(() => {
667
669
  cargarTorneos()
670
+ bloquearScroll()
671
+ })
672
+
673
+ onUnmounted(() => {
674
+ restaurarScroll()
668
675
  })
676
+
677
+ function closeModal() {
678
+ showError409.value = false
679
+ restaurarScroll()
680
+ emit('close')
681
+ }
669
682
  </script>
670
683
 
671
684
  <style scoped>