@golstats/gsc-reports 1.0.0 → 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-xW04mYhu-DRN4eEO4.js → FilterConditions-55d68355-C5NIJbY6-BIYJFxA1-ChzU0yno.js} +4 -4
  3. package/dist/{FilterField-59a73e38-DO8nYLqs-Da7H_Fvj-ZuLwDGOM.js → FilterField-59a73e38-DO8nYLqs-BlMX75HQ-DcD79wEB.js} +3 -3
  4. package/dist/{FilterSubcategories-a9b32cc9-DlkHni1L-BXid_sIn-BvoU3OqZ.js → FilterSubcategories-a9b32cc9-DlkHni1L-DbepEYoC-4bY4RGa1.js} +10 -10
  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 +292 -283
  9. package/dist/icons/icn-report.svg +10 -10
  10. package/dist/{index-B1R4W2EC.js → index-Cdmd9KsD.js} +100076 -88052
  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,283 +1,293 @@
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-duplicate-white.svg" class="icon-title" alt="icon" />
9
- <span class="modal-title">Duplicar 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="duplicateName"
18
- :placeholder="initialName"
19
- maxlength="40"
20
- autocomplete="off"
21
- />
22
- </div>
23
- <div class="header-separator"></div>
24
- <div class="modal-footer">
25
- <button class="cancel-btn" @click="$emit('close')">Cancelar</button>
26
- <button
27
- class="next-btn"
28
- :disabled="duplicateName.trim().length < 3 || isLoading"
29
- @click="acceptDuplicate"
30
- >
31
- {{ isLoading ? 'Duplicando...' : 'Aceptar' }}
32
- </button>
33
- </div>
34
- </div>
35
- </div>
36
- </template>
37
-
38
- <script setup>
39
- import { ref, watch } from 'vue'
40
- import axios from 'axios'
41
-
42
- const props = defineProps({
43
- initialName: {
44
- type: String,
45
- required: true,
46
- },
47
- token: {
48
- type: String,
49
- required: true,
50
- },
51
- templateId: {
52
- type: String,
53
- required: true,
54
- },
55
- })
56
-
57
- const emit = defineEmits(['close', 'duplicate', 'template-duplicated'])
58
- const duplicateName = ref(props.initialName + ' copy')
59
- const isLoading = ref(false)
60
-
61
- watch(
62
- () => props.initialName,
63
- (val) => {
64
- duplicateName.value = val + ' copy'
65
- },
66
- )
67
-
68
- async function acceptDuplicate() {
69
- if (duplicateName.value.trim().length >= 3 && !isLoading.value) {
70
- isLoading.value = true
71
-
72
- try {
73
- const response = await axios.post(
74
- `https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/${props.templateId}/duplicate`,
75
- { name: duplicateName.value.trim() }, // Enviar el nombre en el payload
76
- {
77
- headers: {
78
- Authorization: `${props.token}`,
79
- 'Content-Type': 'application/json',
80
- },
81
- },
82
- )
83
-
84
- // Emitir el evento específico de duplicación exitosa
85
- emit('template-duplicated', {
86
- originalTemplateId: props.templateId,
87
- newTemplateName: duplicateName.value.trim(),
88
- responseData: response.data,
89
- })
90
- emit('close')
91
- } catch (error) {
92
- console.error('Error al duplicar template:', error)
93
- // Aquí podrías mostrar un mensaje de error al usuario
94
- alert('Error al duplicar el template. Por favor, intenta de nuevo.')
95
- } finally {
96
- isLoading.value = false
97
- }
98
- }
99
- }
100
- </script>
101
-
102
- <style scoped>
103
- .modal-overlay {
104
- position: fixed;
105
- top: 0;
106
- left: 0;
107
- width: 100vw;
108
- height: 100vh;
109
- background: rgba(0, 0, 0, 0.45);
110
- display: flex;
111
- align-items: center;
112
- justify-content: center;
113
- z-index: 3200;
114
- }
115
- .modal-content {
116
- width: 375px;
117
- height: 220px;
118
- background: #2e3b46;
119
- border-radius: 10px;
120
- box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.18);
121
- padding: 0;
122
- position: relative;
123
- display: flex;
124
- flex-direction: column;
125
- font-family: 'Poppins-Regular', 'Montserrat', sans-serif;
126
- }
127
- .close-btn {
128
- position: absolute;
129
- top: 16px;
130
- right: 16px;
131
- background: none;
132
- border: none;
133
- cursor: pointer;
134
- z-index: 2;
135
- padding: 0;
136
- display: flex;
137
- align-items: center;
138
- justify-content: center;
139
- }
140
- .close-btn:hover {
141
- opacity: 0.7;
142
- }
143
- .close-btn img {
144
- width: 20px;
145
- height: 20px;
146
- }
147
- .header-separator {
148
- width: 100%;
149
- height: 1px;
150
- border-bottom: dashed 1px #58626b;
151
- margin: 12px 0 0 0;
152
- }
153
- .modal-header {
154
- display: flex;
155
- align-items: center;
156
- gap: 8px;
157
- padding: 20px 24px 0 24px;
158
- }
159
- .icon-title {
160
- width: 16px;
161
- height: 16px;
162
- }
163
- .modal-title {
164
- font-family: Poppins-Medium;
165
- font-size: 14px;
166
- font-weight: 500;
167
- font-stretch: normal;
168
- font-style: normal;
169
- line-height: 1.5;
170
- letter-spacing: normal;
171
- text-align: left;
172
- color: #fff;
173
- }
174
- .modal-body {
175
- flex: 1;
176
- display: flex;
177
- flex-direction: column;
178
- justify-content: center;
179
- padding: 12px 24px 0 24px;
180
- }
181
- .modal-label {
182
- font-family: Poppins-Regular;
183
- font-size: 14px;
184
- font-stretch: normal;
185
- font-style: normal;
186
- line-height: normal;
187
- letter-spacing: -0.3px;
188
- margin-top: 0px;
189
- text-align: left;
190
- color: rgba(255, 255, 255, 0.6);
191
- margin-bottom: 8px;
192
- }
193
- .template-name-input {
194
- width: 327px;
195
- height: 44.5px;
196
- border-radius: 6px;
197
- border: 1px solid #3d4a54;
198
- background: #2e3b46;
199
- color: #fff;
200
- font-family: Poppins-Regular;
201
- font-size: 14px;
202
- font-weight: normal;
203
- font-stretch: normal;
204
- font-style: normal;
205
- line-height: normal;
206
- letter-spacing: 0.1px;
207
- text-align: left;
208
- padding: 0 16px;
209
- margin-bottom: 8px;
210
- outline: none;
211
- box-sizing: border-box;
212
- transition: border 0.2s;
213
- margin-left: auto;
214
- margin-right: auto;
215
- }
216
- .template-name-input::placeholder {
217
- color: #b0bec5;
218
- opacity: 0.5;
219
- }
220
- .template-name-input:focus {
221
- border: 1.5px solid rgba(224, 231, 240, 0.3);
222
- }
223
- .modal-footer {
224
- display: flex;
225
- justify-content: center;
226
- align-items: center;
227
- gap: 18px;
228
- margin-top: 13px;
229
- padding: 0 24px 12px 24px;
230
- }
231
- .cancel-btn {
232
- background: none;
233
- border: none;
234
- color: #b0bec5;
235
- font-size: 14.9px;
236
- font-family: Poppins-Medium;
237
- height: 30px;
238
- border-radius: 64px;
239
- display: flex;
240
- align-items: center;
241
- justify-content: center;
242
- cursor: pointer;
243
- padding: 0 18px;
244
- transition: color 0.2s;
245
- text-decoration: underline;
246
- }
247
- .cancel-btn:hover {
248
- color: #fff;
249
- }
250
- .next-btn {
251
- width: 107px;
252
- height: 30px;
253
- border-radius: 64px;
254
- -webkit-backdrop-filter: blur(16px);
255
- backdrop-filter: blur(16px);
256
- border: solid 0.8px #cbee6b;
257
- background-color: rgba(255, 255, 255, 0.06);
258
- font-family: Poppins-Medium;
259
- font-size: 14.9px;
260
- font-weight: 500;
261
- font-stretch: normal;
262
- font-style: normal;
263
- line-height: 1.2;
264
- letter-spacing: -0.45px;
265
- text-align: center;
266
- color: #fff;
267
- cursor: pointer;
268
- transition:
269
- background 0.2s,
270
- color 0.2s;
271
- display: flex;
272
- align-items: center;
273
- justify-content: center;
274
- }
275
- .next-btn:disabled {
276
- opacity: 0.5;
277
- cursor: not-allowed;
278
- }
279
- .next-btn:not(:disabled):hover {
280
- background: #cbee6b;
281
- color: #232e39;
282
- }
283
- </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-duplicate-white.svg" class="icon-title" alt="icon" />
9
+ <span class="modal-title">Duplicar 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="duplicateName"
18
+ :placeholder="initialName"
19
+ maxlength="40"
20
+ autocomplete="off"
21
+ />
22
+ </div>
23
+ <div class="header-separator"></div>
24
+ <div class="modal-footer">
25
+ <button class="cancel-btn" @click="$emit('close')">Cancelar</button>
26
+ <button
27
+ class="next-btn"
28
+ :disabled="duplicateName.trim().length < 3 || isLoading"
29
+ @click="acceptDuplicate"
30
+ >
31
+ {{ isLoading ? 'Duplicando...' : 'Aceptar' }}
32
+ </button>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </template>
37
+
38
+ <script setup>
39
+ import { ref, watch, onMounted, onUnmounted } from 'vue'
40
+ import axios from 'axios'
41
+
42
+ const props = defineProps({
43
+ initialName: {
44
+ type: String,
45
+ required: true,
46
+ },
47
+ token: {
48
+ type: String,
49
+ required: true,
50
+ },
51
+ templateId: {
52
+ type: String,
53
+ required: true,
54
+ },
55
+ })
56
+
57
+ const emit = defineEmits(['close', 'duplicate', 'template-duplicated'])
58
+ const duplicateName = ref(props.initialName + ' copy')
59
+ const isLoading = ref(false)
60
+
61
+ watch(
62
+ () => props.initialName,
63
+ (val) => {
64
+ duplicateName.value = val + ' copy'
65
+ },
66
+ )
67
+
68
+ onMounted(() => {
69
+ // Desactivar el scroll de la página al abrir el modal
70
+ document.body.style.overflow = 'hidden'
71
+ })
72
+
73
+ onUnmounted(() => {
74
+ // Restaurar el scroll de la página al cerrar el modal
75
+ document.body.style.overflow = ''
76
+ })
77
+
78
+ async function acceptDuplicate() {
79
+ if (duplicateName.value.trim().length >= 3 && !isLoading.value) {
80
+ isLoading.value = true
81
+
82
+ try {
83
+ const response = await axios.post(
84
+ `https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/${props.templateId}/duplicate`,
85
+ { name: duplicateName.value.trim() }, // Enviar el nombre en el payload
86
+ {
87
+ headers: {
88
+ Authorization: `${props.token}`,
89
+ 'Content-Type': 'application/json',
90
+ },
91
+ },
92
+ )
93
+
94
+ // Emitir el evento específico de duplicación exitosa
95
+ emit('template-duplicated', {
96
+ originalTemplateId: props.templateId,
97
+ newTemplateName: duplicateName.value.trim(),
98
+ responseData: response.data,
99
+ })
100
+ emit('close')
101
+ } catch (error) {
102
+ console.error('Error al duplicar template:', error)
103
+ // Aquí podrías mostrar un mensaje de error al usuario
104
+ alert('Error al duplicar el template. Por favor, intenta de nuevo.')
105
+ } finally {
106
+ isLoading.value = false
107
+ }
108
+ }
109
+ }
110
+ </script>
111
+
112
+ <style scoped>
113
+ .modal-overlay {
114
+ position: fixed;
115
+ top: 0;
116
+ left: 0;
117
+ width: 100vw;
118
+ height: 100vh;
119
+ background: rgba(0, 0, 0, 0.45);
120
+ display: flex;
121
+ align-items: center;
122
+ justify-content: center;
123
+ z-index: 3200;
124
+ }
125
+ .modal-content {
126
+ width: 375px;
127
+ height: 220px;
128
+ background: #2e3b46;
129
+ border-radius: 10px;
130
+ box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.18);
131
+ padding: 0;
132
+ position: relative;
133
+ display: flex;
134
+ flex-direction: column;
135
+ font-family: 'Poppins-Regular', 'Montserrat', sans-serif;
136
+ }
137
+ .close-btn {
138
+ position: absolute;
139
+ top: 16px;
140
+ right: 16px;
141
+ background: none;
142
+ border: none;
143
+ cursor: pointer;
144
+ z-index: 2;
145
+ padding: 0;
146
+ display: flex;
147
+ align-items: center;
148
+ justify-content: center;
149
+ }
150
+ .close-btn:hover {
151
+ opacity: 0.7;
152
+ }
153
+ .close-btn img {
154
+ width: 20px;
155
+ height: 20px;
156
+ }
157
+ .header-separator {
158
+ width: 100%;
159
+ height: 1px;
160
+ border-bottom: dashed 1px #58626b;
161
+ margin: 12px 0 0 0;
162
+ }
163
+ .modal-header {
164
+ display: flex;
165
+ align-items: center;
166
+ gap: 8px;
167
+ padding: 20px 24px 0 24px;
168
+ }
169
+ .icon-title {
170
+ width: 16px;
171
+ height: 16px;
172
+ }
173
+ .modal-title {
174
+ font-family: Poppins-Medium;
175
+ font-size: 14px;
176
+ font-weight: 500;
177
+ font-stretch: normal;
178
+ font-style: normal;
179
+ line-height: 1.5;
180
+ letter-spacing: normal;
181
+ text-align: left;
182
+ color: #fff;
183
+ }
184
+ .modal-body {
185
+ flex: 1;
186
+ display: flex;
187
+ flex-direction: column;
188
+ justify-content: center;
189
+ padding: 12px 24px 0 24px;
190
+ }
191
+ .modal-label {
192
+ font-family: Poppins-Regular;
193
+ font-size: 14px;
194
+ font-stretch: normal;
195
+ font-style: normal;
196
+ line-height: normal;
197
+ letter-spacing: -0.3px;
198
+ margin-top: 0px;
199
+ text-align: left;
200
+ color: rgba(255, 255, 255, 0.6);
201
+ margin-bottom: 8px;
202
+ }
203
+ .template-name-input {
204
+ width: 327px;
205
+ height: 44.5px;
206
+ border-radius: 6px;
207
+ border: 1px solid #3d4a54;
208
+ background: #2e3b46;
209
+ color: #fff;
210
+ font-family: Poppins-Regular;
211
+ font-size: 14px;
212
+ font-weight: normal;
213
+ font-stretch: normal;
214
+ font-style: normal;
215
+ line-height: normal;
216
+ letter-spacing: 0.1px;
217
+ text-align: left;
218
+ padding: 0 16px;
219
+ margin-bottom: 8px;
220
+ outline: none;
221
+ box-sizing: border-box;
222
+ transition: border 0.2s;
223
+ margin-left: auto;
224
+ margin-right: auto;
225
+ }
226
+ .template-name-input::placeholder {
227
+ color: #b0bec5;
228
+ opacity: 0.5;
229
+ }
230
+ .template-name-input:focus {
231
+ border: 1.5px solid rgba(224, 231, 240, 0.3);
232
+ }
233
+ .modal-footer {
234
+ display: flex;
235
+ justify-content: center;
236
+ align-items: center;
237
+ gap: 18px;
238
+ margin-top: 13px;
239
+ padding: 0 24px 12px 24px;
240
+ }
241
+ .cancel-btn {
242
+ background: none;
243
+ border: none;
244
+ color: #b0bec5;
245
+ font-size: 14.9px;
246
+ font-family: Poppins-Medium;
247
+ height: 30px;
248
+ border-radius: 64px;
249
+ display: flex;
250
+ align-items: center;
251
+ justify-content: center;
252
+ cursor: pointer;
253
+ padding: 0 18px;
254
+ transition: color 0.2s;
255
+ text-decoration: underline;
256
+ }
257
+ .cancel-btn:hover {
258
+ color: #fff;
259
+ }
260
+ .next-btn {
261
+ width: 107px;
262
+ height: 30px;
263
+ border-radius: 64px;
264
+ -webkit-backdrop-filter: blur(16px);
265
+ backdrop-filter: blur(16px);
266
+ border: solid 0.8px #cbee6b;
267
+ background-color: rgba(255, 255, 255, 0.06);
268
+ font-family: Poppins-Medium;
269
+ font-size: 14.9px;
270
+ font-weight: 500;
271
+ font-stretch: normal;
272
+ font-style: normal;
273
+ line-height: 1.2;
274
+ letter-spacing: -0.45px;
275
+ text-align: center;
276
+ color: #fff;
277
+ cursor: pointer;
278
+ transition:
279
+ background 0.2s,
280
+ color 0.2s;
281
+ display: flex;
282
+ align-items: center;
283
+ justify-content: center;
284
+ }
285
+ .next-btn:disabled {
286
+ opacity: 0.5;
287
+ cursor: not-allowed;
288
+ }
289
+ .next-btn:not(:disabled):hover {
290
+ background: #cbee6b;
291
+ color: #232e39;
292
+ }
293
+ </style>