@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golstats/gsc-reports",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "main": "dist/gsc-reports.umd.js",
5
5
  "module": "dist/gsc-reports.es.js",
6
6
  "exports": {
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@golstats/gsc-checkbox": "^1.0.13",
50
- "@golstats/gsc-template-report-maker": "^1.0.11",
50
+ "@golstats/gsc-template-report-maker": "^1.0.12",
51
51
  "@golstats/gsc-volumetric-field": "^1.0.1",
52
52
  "axios": "^1.10.0",
53
53
  "gridstack": "^12.1.1",
package/src/App.vue CHANGED
@@ -1,5 +1,9 @@
1
1
  <script setup>
2
2
  import GSCReports from './components/gsc-reports.vue'
3
+
4
+ function handleToHome() {
5
+ console.log('Evento toHome recibido en App.vue')
6
+ }
3
7
  </script>
4
8
 
5
9
  <template>
@@ -8,6 +12,7 @@ import GSCReports from './components/gsc-reports.vue'
8
12
  :team="1"
9
13
  :user-id="24254"
10
14
  token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MjQyNTQsIm5hbWUiOiJHb2xTdGF0cyIsInVzZXJuYW1lIjoiZ29sdGVzdGluZyIsImVtYWlsIjoiIiwicHJvdmlkZXJfaWQiOjEsImxvZ2luX2dvbHN0YXRzIjoxLCJpYXQiOjE3NTIwNDY4NTQsImV4cCI6MTc4MzU4Mjg1NH0.cs9r3OnlIh-H0G0yxjKFFYiJoA70PAbvehjcVe4y7jE"
15
+ @toHome="handleToHome"
11
16
  />
12
17
  </div>
13
18
  </template>
@@ -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" />
@@ -58,7 +58,7 @@
58
58
  </template>
59
59
 
60
60
  <script setup>
61
- import { ref } from 'vue'
61
+ import { ref, onMounted, onUnmounted } from 'vue'
62
62
  import axios from 'axios'
63
63
  // Definir props
64
64
  const props = defineProps({
@@ -121,6 +121,13 @@ const saveTemplate = async () => {
121
121
  isLoading.value = false
122
122
  }
123
123
  }
124
+
125
+ onMounted(() => {
126
+ document.body.style.overflow = 'hidden'
127
+ })
128
+ onUnmounted(() => {
129
+ document.body.style.overflow = ''
130
+ })
124
131
  </script>
125
132
 
126
133
  <style scoped>
@@ -1,231 +1,239 @@
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 reporte</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 reporte? 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')" :disabled="isDeleting">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 reporte, user_id y token
33
- const props = defineProps({
34
- reportId: {
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', 'reportDeleted'])
50
-
51
- // Estado para controlar el loading
52
- const isDeleting = ref(false)
53
-
54
- // Función para eliminar el reporte
55
- const handleDelete = async () => {
56
- try {
57
- isDeleting.value = true
58
-
59
- const axiosInstance = axios.create({
60
- headers: { Authorization: `${props.token}` },
61
- })
62
-
63
- const response = await axiosInstance.delete(
64
- `https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${props.userId}/reports/${props.reportId}`,
65
- )
66
-
67
- console.log('Reporte eliminado exitosamente:', response.data)
68
-
69
- // Emitir evento de eliminación exitosa
70
- emit('reportDeleted', props.reportId)
71
-
72
- // Cerrar el modal
73
- emit('close')
74
- } catch (error) {
75
- console.error('Error al eliminar el reporte:', error)
76
-
77
- // Aquí podrías mostrar un mensaje de error al usuario
78
- alert('Error al eliminar el reporte. Por favor, intenta de nuevo.')
79
- } finally {
80
- isDeleting.value = false
81
- }
82
- }
83
- </script>
84
-
85
- <style scoped>
86
- .modal-overlay {
87
- position: fixed;
88
- top: 0;
89
- left: 0;
90
- width: 100vw;
91
- height: 100vh;
92
- background: rgba(0, 0, 0, 0.45);
93
- display: flex;
94
- align-items: center;
95
- justify-content: center;
96
- z-index: 3200;
97
- }
98
- .modal-content {
99
- width: 375px;
100
- height: 218px;
101
- background: #2e3b46;
102
- border-radius: 10px;
103
- box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.18);
104
- padding: 0;
105
- position: relative;
106
- display: flex;
107
- flex-direction: column;
108
- font-family: 'Poppins-Regular', 'Montserrat', sans-serif;
109
- }
110
- .close-btn {
111
- position: absolute;
112
- top: 16px;
113
- right: 16px;
114
- background: none;
115
- border: none;
116
- cursor: pointer;
117
- z-index: 2;
118
- padding: 0;
119
- display: flex;
120
- align-items: center;
121
- justify-content: center;
122
- }
123
- .close-btn:hover {
124
- opacity: 0.7;
125
- }
126
- .close-btn img {
127
- width: 20px;
128
- height: 20px;
129
- }
130
- .header-separator {
131
- width: 100%;
132
- height: 1px;
133
- border-bottom: dashed 1px #58626b;
134
- margin: 12px 0 0 0;
135
- }
136
- .modal-header {
137
- display: flex;
138
- align-items: center;
139
- gap: 8px;
140
- padding: 20px 24px 0 24px;
141
- }
142
- .icon-title {
143
- width: 15px;
144
- height: 15px;
145
- }
146
- .modal-title {
147
- font-family: Poppins-Medium;
148
- font-size: 14px;
149
- font-weight: 500;
150
- font-stretch: normal;
151
- font-style: normal;
152
- line-height: 1.5;
153
- letter-spacing: normal;
154
- text-align: left;
155
- color: #fff;
156
- }
157
- .modal-body.confirm-text {
158
- flex: 1;
159
- display: flex;
160
- flex-direction: column;
161
- justify-content: center;
162
- align-items: center;
163
- padding: 4px 24px 0 24px;
164
- opacity: 0.5;
165
- font-family: Poppins-Regular;
166
- font-size: 13px;
167
- font-weight: normal;
168
- font-stretch: normal;
169
- font-style: normal;
170
- line-height: 1.38;
171
- letter-spacing: normal;
172
- text-align: center;
173
- color: #fff;
174
- }
175
- .modal-footer {
176
- display: flex;
177
- justify-content: center;
178
- align-items: center;
179
- gap: 18px;
180
- margin-top: 13px;
181
- padding: 0 24px 12px 24px;
182
- }
183
- .cancel-btn {
184
- background: none;
185
- border: none;
186
- color: #b0bec5;
187
- font-size: 14.9px;
188
- font-family: Poppins-Medium;
189
- height: 30px;
190
- border-radius: 64px;
191
- display: flex;
192
- align-items: center;
193
- justify-content: center;
194
- cursor: pointer;
195
- padding: 0 18px;
196
- transition: color 0.2s;
197
- text-decoration: underline;
198
- }
199
- .cancel-btn:hover {
200
- color: #fff;
201
- }
202
- .delete-btn {
203
- width: 107px;
204
- height: 30px;
205
- border-radius: 64px;
206
- -webkit-backdrop-filter: blur(16px);
207
- backdrop-filter: blur(16px);
208
- border: solid 0.8px #ff6b6b;
209
- background-color: rgba(255, 255, 255, 0.06);
210
- font-family: Poppins-Medium;
211
- font-size: 14.9px;
212
- font-weight: 500;
213
- font-stretch: normal;
214
- font-style: normal;
215
- line-height: 1.2;
216
- letter-spacing: -0.45px;
217
- text-align: center;
218
- color: #ff6b6b;
219
- cursor: pointer;
220
- transition:
221
- background 0.2s,
222
- color 0.2s;
223
- display: flex;
224
- align-items: center;
225
- justify-content: center;
226
- }
227
- .delete-btn:hover {
228
- background: #ff6b6b;
229
- color: #fff;
230
- }
231
- </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 reporte</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 reporte? 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')" :disabled="isDeleting">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 reporte, user_id y token
33
+ const props = defineProps({
34
+ reportId: {
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', 'reportDeleted'])
50
+
51
+ // Estado para controlar el loading
52
+ const isDeleting = ref(false)
53
+
54
+ // Función para eliminar el reporte
55
+ const handleDelete = async () => {
56
+ try {
57
+ isDeleting.value = true
58
+
59
+ const axiosInstance = axios.create({
60
+ headers: { Authorization: `${props.token}` },
61
+ })
62
+
63
+ const response = await axiosInstance.delete(
64
+ `https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${props.userId}/reports/${props.reportId}`,
65
+ )
66
+
67
+ console.log('Reporte eliminado exitosamente:', response.data)
68
+
69
+ // Emitir evento de eliminación exitosa
70
+ emit('reportDeleted', props.reportId)
71
+
72
+ // Cerrar el modal
73
+ emit('close')
74
+ } catch (error) {
75
+ console.error('Error al eliminar el reporte:', error)
76
+
77
+ // Aquí podrías mostrar un mensaje de error al usuario
78
+ alert('Error al eliminar el reporte. Por favor, intenta de nuevo.')
79
+ } finally {
80
+ isDeleting.value = false
81
+ }
82
+ }
83
+
84
+ onMounted(() => {
85
+ document.body.style.overflow = 'hidden'
86
+ })
87
+
88
+ onUnmounted(() => {
89
+ document.body.style.overflow = ''
90
+ })
91
+ </script>
92
+
93
+ <style scoped>
94
+ .modal-overlay {
95
+ position: fixed;
96
+ top: 0;
97
+ left: 0;
98
+ width: 100vw;
99
+ height: 100vh;
100
+ background: rgba(0, 0, 0, 0.45);
101
+ display: flex;
102
+ align-items: center;
103
+ justify-content: center;
104
+ z-index: 3200;
105
+ }
106
+ .modal-content {
107
+ width: 375px;
108
+ height: 218px;
109
+ background: #2e3b46;
110
+ border-radius: 10px;
111
+ box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.18);
112
+ padding: 0;
113
+ position: relative;
114
+ display: flex;
115
+ flex-direction: column;
116
+ font-family: 'Poppins-Regular', 'Montserrat', sans-serif;
117
+ }
118
+ .close-btn {
119
+ position: absolute;
120
+ top: 16px;
121
+ right: 16px;
122
+ background: none;
123
+ border: none;
124
+ cursor: pointer;
125
+ z-index: 2;
126
+ padding: 0;
127
+ display: flex;
128
+ align-items: center;
129
+ justify-content: center;
130
+ }
131
+ .close-btn:hover {
132
+ opacity: 0.7;
133
+ }
134
+ .close-btn img {
135
+ width: 20px;
136
+ height: 20px;
137
+ }
138
+ .header-separator {
139
+ width: 100%;
140
+ height: 1px;
141
+ border-bottom: dashed 1px #58626b;
142
+ margin: 12px 0 0 0;
143
+ }
144
+ .modal-header {
145
+ display: flex;
146
+ align-items: center;
147
+ gap: 8px;
148
+ padding: 20px 24px 0 24px;
149
+ }
150
+ .icon-title {
151
+ width: 15px;
152
+ height: 15px;
153
+ }
154
+ .modal-title {
155
+ font-family: Poppins-Medium;
156
+ font-size: 14px;
157
+ font-weight: 500;
158
+ font-stretch: normal;
159
+ font-style: normal;
160
+ line-height: 1.5;
161
+ letter-spacing: normal;
162
+ text-align: left;
163
+ color: #fff;
164
+ }
165
+ .modal-body.confirm-text {
166
+ flex: 1;
167
+ display: flex;
168
+ flex-direction: column;
169
+ justify-content: center;
170
+ align-items: center;
171
+ padding: 4px 24px 0 24px;
172
+ opacity: 0.5;
173
+ font-family: Poppins-Regular;
174
+ font-size: 13px;
175
+ font-weight: normal;
176
+ font-stretch: normal;
177
+ font-style: normal;
178
+ line-height: 1.38;
179
+ letter-spacing: normal;
180
+ text-align: center;
181
+ color: #fff;
182
+ }
183
+ .modal-footer {
184
+ display: flex;
185
+ justify-content: center;
186
+ align-items: center;
187
+ gap: 18px;
188
+ margin-top: 13px;
189
+ padding: 0 24px 12px 24px;
190
+ }
191
+ .cancel-btn {
192
+ background: none;
193
+ border: none;
194
+ color: #b0bec5;
195
+ font-size: 14.9px;
196
+ font-family: Poppins-Medium;
197
+ height: 30px;
198
+ border-radius: 64px;
199
+ display: flex;
200
+ align-items: center;
201
+ justify-content: center;
202
+ cursor: pointer;
203
+ padding: 0 18px;
204
+ transition: color 0.2s;
205
+ text-decoration: underline;
206
+ }
207
+ .cancel-btn:hover {
208
+ color: #fff;
209
+ }
210
+ .delete-btn {
211
+ width: 107px;
212
+ height: 30px;
213
+ border-radius: 64px;
214
+ -webkit-backdrop-filter: blur(16px);
215
+ backdrop-filter: blur(16px);
216
+ border: solid 0.8px #ff6b6b;
217
+ background-color: rgba(255, 255, 255, 0.06);
218
+ font-family: Poppins-Medium;
219
+ font-size: 14.9px;
220
+ font-weight: 500;
221
+ font-stretch: normal;
222
+ font-style: normal;
223
+ line-height: 1.2;
224
+ letter-spacing: -0.45px;
225
+ text-align: center;
226
+ color: #ff6b6b;
227
+ cursor: pointer;
228
+ transition:
229
+ background 0.2s,
230
+ color 0.2s;
231
+ display: flex;
232
+ align-items: center;
233
+ justify-content: center;
234
+ }
235
+ .delete-btn:hover {
236
+ background: #ff6b6b;
237
+ color: #fff;
238
+ }
239
+ </style>