@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,315 +1,323 @@
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-rename-white.svg" class="icon-title" alt="icon" />
9
- <span class="modal-title">Renombrar Reporte</span>
10
- </div>
11
- <div class="header-separator"></div>
12
- <div class="modal-body">
13
- <div class="modal-label">Nombre:</div>
14
- <input
15
- class="template-name-input"
16
- type="text"
17
- v-model="newName"
18
- :placeholder="initialName"
19
- maxlength="40"
20
- autocomplete="off"
21
- :disabled="isLoading"
22
- />
23
- <div v-if="errorMessage" class="error-message">
24
- {{ errorMessage }}
25
- </div>
26
- </div>
27
- <div class="header-separator"></div>
28
- <div class="modal-footer">
29
- <button class="cancel-btn" @click="$emit('close')" :disabled="isLoading">Cancelar</button>
30
- <button
31
- class="next-btn"
32
- :disabled="newName.trim().length < 3 || isLoading"
33
- @click="acceptRename"
34
- >
35
- <span v-if="isLoading">Guardando...</span>
36
- <span v-else>Guardar</span>
37
- </button>
38
- </div>
39
- </div>
40
- </div>
41
- </template>
42
-
43
- <script setup>
44
- import { ref, watch } from 'vue'
45
- import axios from 'axios'
46
-
47
- const props = defineProps({
48
- initialName: {
49
- type: String,
50
- required: true,
51
- },
52
- templateType: {
53
- type: String,
54
- required: true,
55
- },
56
- token: {
57
- type: String,
58
- required: true,
59
- },
60
- userId: {
61
- type: [String, Number],
62
- required: true,
63
- },
64
- reportId: {
65
- type: [String, Number],
66
- required: true,
67
- },
68
- })
69
-
70
- const emit = defineEmits(['close', 'rename', 'refresh'])
71
- const newName = ref(props.initialName)
72
- const isLoading = ref(false)
73
- const errorMessage = ref('')
74
-
75
- watch(
76
- () => props.initialName,
77
- (val) => {
78
- newName.value = val
79
- errorMessage.value = ''
80
- },
81
- )
82
-
83
- async function acceptRename() {
84
- console.log('acceptRename')
85
- if (newName.value.trim().length < 3) return
86
- console.log('acceptRename 22')
87
- isLoading.value = true
88
- errorMessage.value = ''
89
-
90
- try {
91
- const axiosInstance = axios.create({ headers: { Authorization: `${props.token}` } })
92
-
93
- await axiosInstance.put(
94
- `https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${props.userId}/reports/${props.reportId}/rename`,
95
- {
96
- name: newName.value.trim(),
97
- },
98
- )
99
-
100
- // Si la petición es exitosa, emitir el evento de rename y refresh
101
- emit('rename', newName.value.trim())
102
- emit('refresh')
103
- emit('close')
104
- } catch (error) {
105
- console.error('Error al renombrar el reporte:', error)
106
-
107
- if (error.response?.status === 409) {
108
- errorMessage.value = 'Ya existe un reporte con el mismo nombre'
109
- } else {
110
- errorMessage.value = 'Error al renombrar el reporte. Inténtalo de nuevo.'
111
- }
112
- } finally {
113
- isLoading.value = false
114
- }
115
- }
116
- </script>
117
-
118
- <style scoped>
119
- .modal-overlay {
120
- position: fixed;
121
- top: 0;
122
- left: 0;
123
- width: 100vw;
124
- height: 100vh;
125
- background: rgba(0, 0, 0, 0.45);
126
- display: flex;
127
- align-items: center;
128
- justify-content: center;
129
- z-index: 4210;
130
- }
131
- .modal-content {
132
- width: 375px;
133
- height: auto;
134
- background: #2e3b46;
135
- border-radius: 10px;
136
- box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.18);
137
- padding: 0;
138
- position: relative;
139
- display: flex;
140
- flex-direction: column;
141
- font-family: 'Poppins-Regular', 'Montserrat', sans-serif;
142
- }
143
- .close-btn {
144
- position: absolute;
145
- top: 16px;
146
- right: 16px;
147
- background: none;
148
- border: none;
149
- cursor: pointer;
150
- z-index: 2;
151
- padding: 0;
152
- display: flex;
153
- align-items: center;
154
- justify-content: center;
155
- }
156
- .close-btn:hover {
157
- opacity: 0.7;
158
- }
159
- .close-btn img {
160
- width: 20px;
161
- height: 20px;
162
- }
163
- .header-separator {
164
- width: 100%;
165
- height: 1px;
166
- border-bottom: dashed 1px #58626b;
167
- margin: 12px 0 0 0;
168
- }
169
- .modal-header {
170
- display: flex;
171
- align-items: center;
172
- gap: 8px;
173
- padding: 20px 24px 0 24px;
174
- }
175
- .icon-title {
176
- width: 16px;
177
- height: 16px;
178
- }
179
- .modal-title {
180
- font-family: Poppins-Medium;
181
- font-size: 14px;
182
- font-weight: 500;
183
- font-stretch: normal;
184
- font-style: normal;
185
- line-height: 1.5;
186
- letter-spacing: normal;
187
- text-align: left;
188
- color: #fff;
189
- }
190
- .modal-body {
191
- flex: 1;
192
- display: flex;
193
- flex-direction: column;
194
- justify-content: center;
195
- padding: 12px 24px 0 24px;
196
- }
197
- .modal-label {
198
- font-family: Poppins-Regular;
199
- font-size: 14px;
200
- font-stretch: normal;
201
- font-style: normal;
202
- line-height: normal;
203
- letter-spacing: -0.3px;
204
- margin-top: 0px;
205
- text-align: left;
206
- color: rgba(255, 255, 255, 0.6);
207
- margin-bottom: 8px;
208
- }
209
- .template-name-input {
210
- width: 327px;
211
- height: 44.5px;
212
- border-radius: 6px;
213
- border: 1px solid #3d4a54;
214
- background: #2e3b46;
215
- color: #fff;
216
- font-family: Poppins-Regular;
217
- font-size: 14px;
218
- font-weight: normal;
219
- font-stretch: normal;
220
- font-style: normal;
221
- line-height: normal;
222
- letter-spacing: 0.1px;
223
- text-align: left;
224
- padding: 0 16px;
225
- margin-bottom: 8px;
226
- outline: none;
227
- box-sizing: border-box;
228
- transition: border 0.2s;
229
- margin-left: auto;
230
- margin-right: auto;
231
- }
232
- .template-name-input::placeholder {
233
- color: #b0bec5;
234
- opacity: 0.5;
235
- }
236
- .template-name-input:focus {
237
- border: 1.5px solid rgba(224, 231, 240, 0.3);
238
- }
239
- .template-name-input:disabled {
240
- opacity: 0.5;
241
- cursor: not-allowed;
242
- }
243
- .error-message {
244
- color: #fcfcfc;
245
- font-size: 12px;
246
- opacity: 0.6;
247
- text-align: center;
248
- margin-top: 0px;
249
- font-family: Poppins-Regular;
250
- }
251
- .modal-footer {
252
- display: flex;
253
- justify-content: center;
254
- align-items: center;
255
- gap: 18px;
256
- margin-top: 13px;
257
- padding: 0 24px 12px 24px;
258
- }
259
- .cancel-btn {
260
- background: none;
261
- border: none;
262
- color: #b0bec5;
263
- font-size: 14.9px;
264
- font-family: Poppins-Medium;
265
- height: 30px;
266
- border-radius: 64px;
267
- display: flex;
268
- align-items: center;
269
- justify-content: center;
270
- cursor: pointer;
271
- padding: 0 18px;
272
- transition: color 0.2s;
273
- text-decoration: underline;
274
- }
275
- .cancel-btn:hover:not(:disabled) {
276
- color: #fff;
277
- }
278
- .cancel-btn:disabled {
279
- opacity: 0.5;
280
- cursor: not-allowed;
281
- }
282
- .next-btn {
283
- width: 107px;
284
- height: 30px;
285
- border-radius: 64px;
286
- -webkit-backdrop-filter: blur(16px);
287
- backdrop-filter: blur(16px);
288
- border: solid 0.8px #cbee6b;
289
- background-color: rgba(255, 255, 255, 0.06);
290
- font-family: Poppins-Medium;
291
- font-size: 14.9px;
292
- font-weight: 500;
293
- font-stretch: normal;
294
- font-style: normal;
295
- line-height: 1.2;
296
- letter-spacing: -0.45px;
297
- text-align: center;
298
- color: #fff;
299
- cursor: pointer;
300
- transition:
301
- background 0.2s,
302
- color 0.2s;
303
- display: flex;
304
- align-items: center;
305
- justify-content: center;
306
- }
307
- .next-btn:disabled {
308
- opacity: 0.5;
309
- cursor: not-allowed;
310
- }
311
- .next-btn:not(:disabled):hover {
312
- background: #cbee6b;
313
- color: #232e39;
314
- }
315
- </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-rename-white.svg" class="icon-title" alt="icon" />
9
+ <span class="modal-title">Renombrar Reporte</span>
10
+ </div>
11
+ <div class="header-separator"></div>
12
+ <div class="modal-body">
13
+ <div class="modal-label">Nombre:</div>
14
+ <input
15
+ class="template-name-input"
16
+ type="text"
17
+ v-model="newName"
18
+ :placeholder="initialName"
19
+ maxlength="40"
20
+ autocomplete="off"
21
+ :disabled="isLoading"
22
+ />
23
+ <div v-if="errorMessage" class="error-message">
24
+ {{ errorMessage }}
25
+ </div>
26
+ </div>
27
+ <div class="header-separator"></div>
28
+ <div class="modal-footer">
29
+ <button class="cancel-btn" @click="$emit('close')" :disabled="isLoading">Cancelar</button>
30
+ <button
31
+ class="next-btn"
32
+ :disabled="newName.trim().length < 3 || isLoading"
33
+ @click="acceptRename"
34
+ >
35
+ <span v-if="isLoading">Guardando...</span>
36
+ <span v-else>Guardar</span>
37
+ </button>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </template>
42
+
43
+ <script setup>
44
+ import { ref, watch, onMounted, onUnmounted } from 'vue'
45
+ import axios from 'axios'
46
+
47
+ const props = defineProps({
48
+ initialName: {
49
+ type: String,
50
+ required: true,
51
+ },
52
+ templateType: {
53
+ type: String,
54
+ required: true,
55
+ },
56
+ token: {
57
+ type: String,
58
+ required: true,
59
+ },
60
+ userId: {
61
+ type: [String, Number],
62
+ required: true,
63
+ },
64
+ reportId: {
65
+ type: [String, Number],
66
+ required: true,
67
+ },
68
+ })
69
+
70
+ const emit = defineEmits(['close', 'rename', 'refresh'])
71
+ const newName = ref(props.initialName)
72
+ const isLoading = ref(false)
73
+ const errorMessage = ref('')
74
+
75
+ watch(
76
+ () => props.initialName,
77
+ (val) => {
78
+ newName.value = val
79
+ errorMessage.value = ''
80
+ },
81
+ )
82
+
83
+ async function acceptRename() {
84
+ console.log('acceptRename')
85
+ if (newName.value.trim().length < 3) return
86
+ console.log('acceptRename 22')
87
+ isLoading.value = true
88
+ errorMessage.value = ''
89
+
90
+ try {
91
+ const axiosInstance = axios.create({ headers: { Authorization: `${props.token}` } })
92
+
93
+ await axiosInstance.put(
94
+ `https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${props.userId}/reports/${props.reportId}/rename`,
95
+ {
96
+ name: newName.value.trim(),
97
+ },
98
+ )
99
+
100
+ // Si la petición es exitosa, emitir el evento de rename y refresh
101
+ emit('rename', newName.value.trim())
102
+ emit('refresh')
103
+ emit('close')
104
+ } catch (error) {
105
+ console.error('Error al renombrar el reporte:', error)
106
+
107
+ if (error.response?.status === 409) {
108
+ errorMessage.value = 'Ya existe un reporte con el mismo nombre'
109
+ } else {
110
+ errorMessage.value = 'Error al renombrar el reporte. Inténtalo de nuevo.'
111
+ }
112
+ } finally {
113
+ isLoading.value = false
114
+ }
115
+ }
116
+
117
+ onMounted(() => {
118
+ document.body.style.overflow = 'hidden'
119
+ })
120
+
121
+ onUnmounted(() => {
122
+ document.body.style.overflow = ''
123
+ })
124
+ </script>
125
+
126
+ <style scoped>
127
+ .modal-overlay {
128
+ position: fixed;
129
+ top: 0;
130
+ left: 0;
131
+ width: 100vw;
132
+ height: 100vh;
133
+ background: rgba(0, 0, 0, 0.45);
134
+ display: flex;
135
+ align-items: center;
136
+ justify-content: center;
137
+ z-index: 4210;
138
+ }
139
+ .modal-content {
140
+ width: 375px;
141
+ height: auto;
142
+ background: #2e3b46;
143
+ border-radius: 10px;
144
+ box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.18);
145
+ padding: 0;
146
+ position: relative;
147
+ display: flex;
148
+ flex-direction: column;
149
+ font-family: 'Poppins-Regular', 'Montserrat', sans-serif;
150
+ }
151
+ .close-btn {
152
+ position: absolute;
153
+ top: 16px;
154
+ right: 16px;
155
+ background: none;
156
+ border: none;
157
+ cursor: pointer;
158
+ z-index: 2;
159
+ padding: 0;
160
+ display: flex;
161
+ align-items: center;
162
+ justify-content: center;
163
+ }
164
+ .close-btn:hover {
165
+ opacity: 0.7;
166
+ }
167
+ .close-btn img {
168
+ width: 20px;
169
+ height: 20px;
170
+ }
171
+ .header-separator {
172
+ width: 100%;
173
+ height: 1px;
174
+ border-bottom: dashed 1px #58626b;
175
+ margin: 12px 0 0 0;
176
+ }
177
+ .modal-header {
178
+ display: flex;
179
+ align-items: center;
180
+ gap: 8px;
181
+ padding: 20px 24px 0 24px;
182
+ }
183
+ .icon-title {
184
+ width: 16px;
185
+ height: 16px;
186
+ }
187
+ .modal-title {
188
+ font-family: Poppins-Medium;
189
+ font-size: 14px;
190
+ font-weight: 500;
191
+ font-stretch: normal;
192
+ font-style: normal;
193
+ line-height: 1.5;
194
+ letter-spacing: normal;
195
+ text-align: left;
196
+ color: #fff;
197
+ }
198
+ .modal-body {
199
+ flex: 1;
200
+ display: flex;
201
+ flex-direction: column;
202
+ justify-content: center;
203
+ padding: 12px 24px 0 24px;
204
+ }
205
+ .modal-label {
206
+ font-family: Poppins-Regular;
207
+ font-size: 14px;
208
+ font-stretch: normal;
209
+ font-style: normal;
210
+ line-height: normal;
211
+ letter-spacing: -0.3px;
212
+ margin-top: 0px;
213
+ text-align: left;
214
+ color: rgba(255, 255, 255, 0.6);
215
+ margin-bottom: 8px;
216
+ }
217
+ .template-name-input {
218
+ width: 327px;
219
+ height: 44.5px;
220
+ border-radius: 6px;
221
+ border: 1px solid #3d4a54;
222
+ background: #2e3b46;
223
+ color: #fff;
224
+ font-family: Poppins-Regular;
225
+ font-size: 14px;
226
+ font-weight: normal;
227
+ font-stretch: normal;
228
+ font-style: normal;
229
+ line-height: normal;
230
+ letter-spacing: 0.1px;
231
+ text-align: left;
232
+ padding: 0 16px;
233
+ margin-bottom: 8px;
234
+ outline: none;
235
+ box-sizing: border-box;
236
+ transition: border 0.2s;
237
+ margin-left: auto;
238
+ margin-right: auto;
239
+ }
240
+ .template-name-input::placeholder {
241
+ color: #b0bec5;
242
+ opacity: 0.5;
243
+ }
244
+ .template-name-input:focus {
245
+ border: 1.5px solid rgba(224, 231, 240, 0.3);
246
+ }
247
+ .template-name-input:disabled {
248
+ opacity: 0.5;
249
+ cursor: not-allowed;
250
+ }
251
+ .error-message {
252
+ color: #fcfcfc;
253
+ font-size: 12px;
254
+ opacity: 0.6;
255
+ text-align: center;
256
+ margin-top: 0px;
257
+ font-family: Poppins-Regular;
258
+ }
259
+ .modal-footer {
260
+ display: flex;
261
+ justify-content: center;
262
+ align-items: center;
263
+ gap: 18px;
264
+ margin-top: 13px;
265
+ padding: 0 24px 12px 24px;
266
+ }
267
+ .cancel-btn {
268
+ background: none;
269
+ border: none;
270
+ color: #b0bec5;
271
+ font-size: 14.9px;
272
+ font-family: Poppins-Medium;
273
+ height: 30px;
274
+ border-radius: 64px;
275
+ display: flex;
276
+ align-items: center;
277
+ justify-content: center;
278
+ cursor: pointer;
279
+ padding: 0 18px;
280
+ transition: color 0.2s;
281
+ text-decoration: underline;
282
+ }
283
+ .cancel-btn:hover:not(:disabled) {
284
+ color: #fff;
285
+ }
286
+ .cancel-btn:disabled {
287
+ opacity: 0.5;
288
+ cursor: not-allowed;
289
+ }
290
+ .next-btn {
291
+ width: 107px;
292
+ height: 30px;
293
+ border-radius: 64px;
294
+ -webkit-backdrop-filter: blur(16px);
295
+ backdrop-filter: blur(16px);
296
+ border: solid 0.8px #cbee6b;
297
+ background-color: rgba(255, 255, 255, 0.06);
298
+ font-family: Poppins-Medium;
299
+ font-size: 14.9px;
300
+ font-weight: 500;
301
+ font-stretch: normal;
302
+ font-style: normal;
303
+ line-height: 1.2;
304
+ letter-spacing: -0.45px;
305
+ text-align: center;
306
+ color: #fff;
307
+ cursor: pointer;
308
+ transition:
309
+ background 0.2s,
310
+ color 0.2s;
311
+ display: flex;
312
+ align-items: center;
313
+ justify-content: center;
314
+ }
315
+ .next-btn:disabled {
316
+ opacity: 0.5;
317
+ cursor: not-allowed;
318
+ }
319
+ .next-btn:not(:disabled):hover {
320
+ background: #cbee6b;
321
+ color: #232e39;
322
+ }
323
+ </style>