@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,320 +1,330 @@
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 Template</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,
62
- required: true,
63
- },
64
- templateId: {
65
- type: String,
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
-
88
- isLoading.value = true
89
- errorMessage.value = ''
90
-
91
- try {
92
- await axios.put(
93
- `https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${props.userId}/templates/${props.templateId}/general`,
94
- {
95
- name: newName.value.trim(),
96
- },
97
- {
98
- headers: {
99
- Authorization: `${props.token}`,
100
- 'Content-Type': 'application/json',
101
- },
102
- },
103
- )
104
-
105
- // Si la petición es exitosa, emitir el evento de rename y refresh
106
- emit('rename', newName.value.trim())
107
- emit('refresh')
108
- emit('close')
109
- } catch (error) {
110
- console.error('Error al renombrar el template:', error)
111
-
112
- if (error.response?.status === 409) {
113
- errorMessage.value = 'Ya existe un template con el mismo nombre'
114
- } else {
115
- errorMessage.value = 'Error al renombrar el template. Inténtalo de nuevo.'
116
- }
117
- } finally {
118
- isLoading.value = false
119
- }
120
- }
121
- </script>
122
-
123
- <style scoped>
124
- .modal-overlay {
125
- position: fixed;
126
- top: 0;
127
- left: 0;
128
- width: 100vw;
129
- height: 100vh;
130
- background: rgba(0, 0, 0, 0.45);
131
- display: flex;
132
- align-items: center;
133
- justify-content: center;
134
- z-index: 3200;
135
- }
136
- .modal-content {
137
- width: 375px;
138
- height: auto;
139
- background: #2e3b46;
140
- border-radius: 10px;
141
- box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.18);
142
- padding: 0;
143
- position: relative;
144
- display: flex;
145
- flex-direction: column;
146
- font-family: 'Poppins-Regular', 'Montserrat', sans-serif;
147
- }
148
- .close-btn {
149
- position: absolute;
150
- top: 16px;
151
- right: 16px;
152
- background: none;
153
- border: none;
154
- cursor: pointer;
155
- z-index: 2;
156
- padding: 0;
157
- display: flex;
158
- align-items: center;
159
- justify-content: center;
160
- }
161
- .close-btn:hover {
162
- opacity: 0.7;
163
- }
164
- .close-btn img {
165
- width: 20px;
166
- height: 20px;
167
- }
168
- .header-separator {
169
- width: 100%;
170
- height: 1px;
171
- border-bottom: dashed 1px #58626b;
172
- margin: 12px 0 0 0;
173
- }
174
- .modal-header {
175
- display: flex;
176
- align-items: center;
177
- gap: 8px;
178
- padding: 20px 24px 0 24px;
179
- }
180
- .icon-title {
181
- width: 16px;
182
- height: 16px;
183
- }
184
- .modal-title {
185
- font-family: Poppins-Medium;
186
- font-size: 14px;
187
- font-weight: 500;
188
- font-stretch: normal;
189
- font-style: normal;
190
- line-height: 1.5;
191
- letter-spacing: normal;
192
- text-align: left;
193
- color: #fff;
194
- }
195
- .modal-body {
196
- flex: 1;
197
- display: flex;
198
- flex-direction: column;
199
- justify-content: center;
200
- padding: 12px 24px 0 24px;
201
- }
202
- .modal-label {
203
- font-family: Poppins-Regular;
204
- font-size: 14px;
205
- font-stretch: normal;
206
- font-style: normal;
207
- line-height: normal;
208
- letter-spacing: -0.3px;
209
- margin-top: 0px;
210
- text-align: left;
211
- color: rgba(255, 255, 255, 0.6);
212
- margin-bottom: 8px;
213
- }
214
- .template-name-input {
215
- width: 327px;
216
- height: 44.5px;
217
- border-radius: 6px;
218
- border: 1px solid #3d4a54;
219
- background: #2e3b46;
220
- color: #fff;
221
- font-family: Poppins-Regular;
222
- font-size: 14px;
223
- font-weight: normal;
224
- font-stretch: normal;
225
- font-style: normal;
226
- line-height: normal;
227
- letter-spacing: 0.1px;
228
- text-align: left;
229
- padding: 0 16px;
230
- margin-bottom: 8px;
231
- outline: none;
232
- box-sizing: border-box;
233
- transition: border 0.2s;
234
- margin-left: auto;
235
- margin-right: auto;
236
- }
237
- .template-name-input::placeholder {
238
- color: #b0bec5;
239
- opacity: 0.5;
240
- }
241
- .template-name-input:focus {
242
- border: 1.5px solid rgba(224, 231, 240, 0.3);
243
- }
244
- .template-name-input:disabled {
245
- opacity: 0.5;
246
- cursor: not-allowed;
247
- }
248
- .error-message {
249
- color: #fcfcfc;
250
- font-size: 12px;
251
- opacity: 0.6;
252
- text-align: center;
253
- margin-top: 0px;
254
- font-family: Poppins-Regular;
255
- }
256
- .modal-footer {
257
- display: flex;
258
- justify-content: center;
259
- align-items: center;
260
- gap: 18px;
261
- margin-top: 13px;
262
- padding: 0 24px 12px 24px;
263
- }
264
- .cancel-btn {
265
- background: none;
266
- border: none;
267
- color: #b0bec5;
268
- font-size: 14.9px;
269
- font-family: Poppins-Medium;
270
- height: 30px;
271
- border-radius: 64px;
272
- display: flex;
273
- align-items: center;
274
- justify-content: center;
275
- cursor: pointer;
276
- padding: 0 18px;
277
- transition: color 0.2s;
278
- text-decoration: underline;
279
- }
280
- .cancel-btn:hover:not(:disabled) {
281
- color: #fff;
282
- }
283
- .cancel-btn:disabled {
284
- opacity: 0.5;
285
- cursor: not-allowed;
286
- }
287
- .next-btn {
288
- width: 107px;
289
- height: 30px;
290
- border-radius: 64px;
291
- -webkit-backdrop-filter: blur(16px);
292
- backdrop-filter: blur(16px);
293
- border: solid 0.8px #cbee6b;
294
- background-color: rgba(255, 255, 255, 0.06);
295
- font-family: Poppins-Medium;
296
- font-size: 14.9px;
297
- font-weight: 500;
298
- font-stretch: normal;
299
- font-style: normal;
300
- line-height: 1.2;
301
- letter-spacing: -0.45px;
302
- text-align: center;
303
- color: #fff;
304
- cursor: pointer;
305
- transition:
306
- background 0.2s,
307
- color 0.2s;
308
- display: flex;
309
- align-items: center;
310
- justify-content: center;
311
- }
312
- .next-btn:disabled {
313
- opacity: 0.5;
314
- cursor: not-allowed;
315
- }
316
- .next-btn:not(:disabled):hover {
317
- background: #cbee6b;
318
- color: #232e39;
319
- }
320
- </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 Template</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,
62
+ required: true,
63
+ },
64
+ templateId: {
65
+ type: String,
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
+ onMounted(() => {
84
+ // Bloquear el scroll del body cuando la modal está abierta
85
+ document.body.style.overflow = 'hidden'
86
+ })
87
+
88
+ onUnmounted(() => {
89
+ // Restaurar el scroll del body cuando la modal se cierra
90
+ document.body.style.overflow = ''
91
+ })
92
+
93
+ async function acceptRename() {
94
+ console.log('acceptRename')
95
+ if (newName.value.trim().length < 3) return
96
+ console.log('acceptRename 22')
97
+
98
+ isLoading.value = true
99
+ errorMessage.value = ''
100
+
101
+ try {
102
+ await axios.put(
103
+ `https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${props.userId}/templates/${props.templateId}/general`,
104
+ {
105
+ name: newName.value.trim(),
106
+ },
107
+ {
108
+ headers: {
109
+ Authorization: `${props.token}`,
110
+ 'Content-Type': 'application/json',
111
+ },
112
+ },
113
+ )
114
+
115
+ // Si la petición es exitosa, emitir el evento de rename y refresh
116
+ emit('rename', newName.value.trim())
117
+ emit('refresh')
118
+ emit('close')
119
+ } catch (error) {
120
+ console.error('Error al renombrar el template:', error)
121
+
122
+ if (error.response?.status === 409) {
123
+ errorMessage.value = 'Ya existe un template con el mismo nombre'
124
+ } else {
125
+ errorMessage.value = 'Error al renombrar el template. Inténtalo de nuevo.'
126
+ }
127
+ } finally {
128
+ isLoading.value = false
129
+ }
130
+ }
131
+ </script>
132
+
133
+ <style scoped>
134
+ .modal-overlay {
135
+ position: fixed;
136
+ top: 0;
137
+ left: 0;
138
+ width: 100vw;
139
+ height: 100vh;
140
+ background: rgba(0, 0, 0, 0.45);
141
+ display: flex;
142
+ align-items: center;
143
+ justify-content: center;
144
+ z-index: 3200;
145
+ }
146
+ .modal-content {
147
+ width: 375px;
148
+ height: auto;
149
+ background: #2e3b46;
150
+ border-radius: 10px;
151
+ box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.18);
152
+ padding: 0;
153
+ position: relative;
154
+ display: flex;
155
+ flex-direction: column;
156
+ font-family: 'Poppins-Regular', 'Montserrat', sans-serif;
157
+ }
158
+ .close-btn {
159
+ position: absolute;
160
+ top: 16px;
161
+ right: 16px;
162
+ background: none;
163
+ border: none;
164
+ cursor: pointer;
165
+ z-index: 2;
166
+ padding: 0;
167
+ display: flex;
168
+ align-items: center;
169
+ justify-content: center;
170
+ }
171
+ .close-btn:hover {
172
+ opacity: 0.7;
173
+ }
174
+ .close-btn img {
175
+ width: 20px;
176
+ height: 20px;
177
+ }
178
+ .header-separator {
179
+ width: 100%;
180
+ height: 1px;
181
+ border-bottom: dashed 1px #58626b;
182
+ margin: 12px 0 0 0;
183
+ }
184
+ .modal-header {
185
+ display: flex;
186
+ align-items: center;
187
+ gap: 8px;
188
+ padding: 20px 24px 0 24px;
189
+ }
190
+ .icon-title {
191
+ width: 16px;
192
+ height: 16px;
193
+ }
194
+ .modal-title {
195
+ font-family: Poppins-Medium;
196
+ font-size: 14px;
197
+ font-weight: 500;
198
+ font-stretch: normal;
199
+ font-style: normal;
200
+ line-height: 1.5;
201
+ letter-spacing: normal;
202
+ text-align: left;
203
+ color: #fff;
204
+ }
205
+ .modal-body {
206
+ flex: 1;
207
+ display: flex;
208
+ flex-direction: column;
209
+ justify-content: center;
210
+ padding: 12px 24px 0 24px;
211
+ }
212
+ .modal-label {
213
+ font-family: Poppins-Regular;
214
+ font-size: 14px;
215
+ font-stretch: normal;
216
+ font-style: normal;
217
+ line-height: normal;
218
+ letter-spacing: -0.3px;
219
+ margin-top: 0px;
220
+ text-align: left;
221
+ color: rgba(255, 255, 255, 0.6);
222
+ margin-bottom: 8px;
223
+ }
224
+ .template-name-input {
225
+ width: 327px;
226
+ height: 44.5px;
227
+ border-radius: 6px;
228
+ border: 1px solid #3d4a54;
229
+ background: #2e3b46;
230
+ color: #fff;
231
+ font-family: Poppins-Regular;
232
+ font-size: 14px;
233
+ font-weight: normal;
234
+ font-stretch: normal;
235
+ font-style: normal;
236
+ line-height: normal;
237
+ letter-spacing: 0.1px;
238
+ text-align: left;
239
+ padding: 0 16px;
240
+ margin-bottom: 8px;
241
+ outline: none;
242
+ box-sizing: border-box;
243
+ transition: border 0.2s;
244
+ margin-left: auto;
245
+ margin-right: auto;
246
+ }
247
+ .template-name-input::placeholder {
248
+ color: #b0bec5;
249
+ opacity: 0.5;
250
+ }
251
+ .template-name-input:focus {
252
+ border: 1.5px solid rgba(224, 231, 240, 0.3);
253
+ }
254
+ .template-name-input:disabled {
255
+ opacity: 0.5;
256
+ cursor: not-allowed;
257
+ }
258
+ .error-message {
259
+ color: #fcfcfc;
260
+ font-size: 12px;
261
+ opacity: 0.6;
262
+ text-align: center;
263
+ margin-top: 0px;
264
+ font-family: Poppins-Regular;
265
+ }
266
+ .modal-footer {
267
+ display: flex;
268
+ justify-content: center;
269
+ align-items: center;
270
+ gap: 18px;
271
+ margin-top: 13px;
272
+ padding: 0 24px 12px 24px;
273
+ }
274
+ .cancel-btn {
275
+ background: none;
276
+ border: none;
277
+ color: #b0bec5;
278
+ font-size: 14.9px;
279
+ font-family: Poppins-Medium;
280
+ height: 30px;
281
+ border-radius: 64px;
282
+ display: flex;
283
+ align-items: center;
284
+ justify-content: center;
285
+ cursor: pointer;
286
+ padding: 0 18px;
287
+ transition: color 0.2s;
288
+ text-decoration: underline;
289
+ }
290
+ .cancel-btn:hover:not(:disabled) {
291
+ color: #fff;
292
+ }
293
+ .cancel-btn:disabled {
294
+ opacity: 0.5;
295
+ cursor: not-allowed;
296
+ }
297
+ .next-btn {
298
+ width: 107px;
299
+ height: 30px;
300
+ border-radius: 64px;
301
+ -webkit-backdrop-filter: blur(16px);
302
+ backdrop-filter: blur(16px);
303
+ border: solid 0.8px #cbee6b;
304
+ background-color: rgba(255, 255, 255, 0.06);
305
+ font-family: Poppins-Medium;
306
+ font-size: 14.9px;
307
+ font-weight: 500;
308
+ font-stretch: normal;
309
+ font-style: normal;
310
+ line-height: 1.2;
311
+ letter-spacing: -0.45px;
312
+ text-align: center;
313
+ color: #fff;
314
+ cursor: pointer;
315
+ transition:
316
+ background 0.2s,
317
+ color 0.2s;
318
+ display: flex;
319
+ align-items: center;
320
+ justify-content: center;
321
+ }
322
+ .next-btn:disabled {
323
+ opacity: 0.5;
324
+ cursor: not-allowed;
325
+ }
326
+ .next-btn:not(:disabled):hover {
327
+ background: #cbee6b;
328
+ color: #232e39;
329
+ }
330
+ </style>