@golstats/gsc-timeline-reports 1.0.16 → 1.1.1

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 (34) hide show
  1. package/README.md +2 -2
  2. package/dist/css/fonts.css +91 -91
  3. package/dist/gsc-timeline-reports.css +1 -1
  4. package/dist/gsc-timeline-reports.es.js +466 -421
  5. package/dist/gsc-timeline-reports.umd.js +5 -5
  6. package/dist/images/canchaRPH.svg +30 -30
  7. package/dist/images/events/atajada.svg +56 -56
  8. package/dist/images/events/cambio.svg +26 -26
  9. package/dist/images/events/falta.svg +42 -42
  10. package/dist/images/events/fin-del-partido.svg +43 -43
  11. package/dist/images/events/fuera-de-lugar.svg +57 -57
  12. package/dist/images/events/gol.svg +48 -48
  13. package/dist/images/events/icn-cambio.svg +6 -6
  14. package/dist/images/events/icn-falta.svg +4 -4
  15. package/dist/images/events/icn-play.svg +3 -3
  16. package/dist/images/events/icn-tarjeta-amarilla.svg +3 -3
  17. package/dist/images/events/icn-tarjeta-roja.svg +3 -3
  18. package/dist/images/events/icn-tiro-a-porteria.svg +36 -36
  19. package/dist/images/events/icn-tiros-de-esquina.svg +18 -18
  20. package/dist/images/events/inicia-el-partido.svg +45 -45
  21. package/dist/images/events/jugada-peligrosa.svg +90 -90
  22. package/dist/images/events/penal-fallado.svg +194 -194
  23. package/dist/images/events/penal-marcado.svg +189 -189
  24. package/dist/images/events/tiempo-agregado.svg +74 -74
  25. package/dist/images/events/tiro-a-porteria.svg +80 -80
  26. package/dist/images/events/tiro-de-esquina.svg +54 -54
  27. package/dist/images/events/var.svg +30 -30
  28. package/package.json +5 -2
  29. package/src/App.vue +9 -0
  30. package/src/components/gsc-timeline-reports.vue +10 -0
  31. package/src/components/gsc-timeline.vue +23 -3
  32. package/src/types.d.ts +45 -45
  33. package/src/utils/apiUrl.js +27 -0
  34. package/src/utils/imageUrl.js +30 -0
@@ -1,81 +1,81 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 104.32 74.73">
3
- <defs>
4
- <style>
5
- .cls-1 {
6
- fill: none;
7
- }
8
-
9
- .cls-2 {
10
- clip-path: url(#clippath);
11
- }
12
-
13
- .cls-3 {
14
- fill: #fff;
15
- }
16
-
17
- .cls-4 {
18
- fill: #172531;
19
- }
20
-
21
- .cls-5 {
22
- clip-path: url(#clippath-1);
23
- }
24
-
25
- .cls-6 {
26
- opacity: .5;
27
- }
28
- </style>
29
- <clipPath id="clippath">
30
- <circle class="cls-1" cx="24" cy="26.43" r="24"/>
31
- </clipPath>
32
- <clipPath id="clippath-1">
33
- <rect class="cls-1" x=".82" width="91.96" height="59.78"/>
34
- </clipPath>
35
- </defs>
36
- <g id="Layer_1-2" data-name="Layer 1">
37
- <g>
38
- <g id="Oval">
39
- <circle class="cls-4" cx="24" cy="26.43" r="24"/>
40
- </g>
41
- <g class="cls-2">
42
- <g class="cls-5">
43
- <g>
44
- <g class="cls-6">
45
- <rect class="cls-3" x="24.71" y="16.99" width=".5" height="55.25"/>
46
- <rect class="cls-3" x="30.31" y="16.99" width=".5" height="55.25"/>
47
- <rect class="cls-3" x="35.91" y="16.99" width=".5" height="55.25"/>
48
- <rect class="cls-3" x="41.51" y="16.99" width=".5" height="55.25"/>
49
- <rect class="cls-3" x="49.69" y="18.68" width=".34" height="56.04"/>
50
- <rect class="cls-3" x="16.09" y="24.57" width="88.23" height=".5"/>
51
- <rect class="cls-3" x="16.09" y="30.09" width="88.23" height=".5"/>
52
- <rect class="cls-3" x="16.09" y="35.61" width="88.23" height=".5"/>
53
- <rect class="cls-3" x="16.09" y="41.14" width="88.23" height=".5"/>
54
- <rect class="cls-3" x="16.09" y="46.66" width="88.23" height=".5"/>
55
- </g>
56
- <polygon class="cls-3" points="16.49 49.82 14.99 49.82 14.99 16.69 48.05 16.69 48.05 18.19 16.49 18.19 16.49 49.82"/>
57
- </g>
58
- </g>
59
- </g>
60
- <g>
61
- <ellipse class="cls-4" cx="30.36" cy="32.03" rx="9.59" ry="9.61"/>
62
- <g>
63
- <path class="cls-3" d="M26.8,37.49c-.12,0-.24-.04-.33-.13-.21-.18-.22-.5-.04-.71l1.38-1.54c.18-.2,.5-.22,.71-.04,.21,.18,.22,.5,.04,.71l-1.38,1.54c-.1,.11-.24,.17-.37,.17Z"/>
64
- <g>
65
- <path class="cls-3" d="M30.39,40.63c-4.74,0-8.6-3.86-8.6-8.6s3.86-8.6,8.6-8.6,8.6,3.86,8.6,8.6-3.86,8.6-8.6,8.6Zm0-16.2c-4.19,0-7.6,3.41-7.6,7.6s3.41,7.6,7.6,7.6,7.6-3.41,7.6-7.6-3.41-7.6-7.6-7.6Z"/>
66
- <path class="cls-3" d="M32.63,35.95h-4.45c-.22,0-.41-.14-.48-.35l-1.38-4.25c-.07-.21,0-.43,.18-.56l3.6-2.62c.18-.13,.41-.13,.59,0l3.6,2.62c.17,.13,.25,.35,.18,.56l-1.38,4.25c-.07,.21-.26,.35-.48,.35Zm-4.09-1h3.72l1.15-3.56-3.01-2.2-3.01,2.2,1.15,3.56Z"/>
67
- <path class="cls-3" d="M30.41,26.37c-.07,0-.13-.01-.2-.04l-3.07-1.31c-.25-.11-.37-.4-.26-.66,.11-.25,.4-.37,.66-.26l2.87,1.23,2.87-1.23c.25-.11,.55,0,.66,.26,.11,.25,0,.55-.26,.66l-3.07,1.31c-.06,.03-.13,.04-.2,.04Z"/>
68
- <path class="cls-3" d="M22.39,33.14c-.12,0-.23-.04-.33-.12-.21-.18-.23-.5-.05-.71l2.05-2.36-.28-3.12c-.02-.27,.18-.52,.45-.54,.28-.02,.52,.18,.54,.45l.29,3.33c.01,.14-.03,.27-.12,.37l-2.19,2.52c-.1,.11-.24,.17-.38,.17Z"/>
69
- <path class="cls-3" d="M28.52,40.36c-.17,0-.34-.09-.43-.24l-1.61-2.69-3.04-.7c-.27-.06-.44-.33-.38-.6,.06-.27,.33-.44,.6-.38l3.25,.75c.13,.03,.25,.11,.32,.23l1.71,2.87c.14,.24,.06,.54-.17,.69-.08,.05-.17,.07-.26,.07Z"/>
70
- <path class="cls-3" d="M32.29,40.36c-.09,0-.18-.02-.26-.07-.24-.14-.31-.45-.17-.69l1.71-2.87c.07-.12,.18-.2,.32-.23l3.25-.75c.27-.06,.54,.11,.6,.38,.06,.27-.11,.54-.38,.6l-3.04,.7-1.6,2.69c-.09,.16-.26,.24-.43,.24Z"/>
71
- <path class="cls-3" d="M38.43,33.14c-.14,0-.28-.06-.38-.17l-2.19-2.52c-.09-.1-.13-.24-.12-.37l.29-3.33c.02-.27,.27-.48,.54-.45,.28,.02,.48,.27,.45,.54l-.28,3.12,2.05,2.36c.18,.21,.16,.52-.05,.71-.09,.08-.21,.12-.33,.12Z"/>
72
- <path class="cls-3" d="M30.4,29.08c-.28,0-.5-.22-.5-.5v-2.71c0-.28,.22-.5,.5-.5s.5,.22,.5,.5v2.71c0,.28-.22,.5-.5,.5Z"/>
73
- <path class="cls-3" d="M34.02,31.81c-.18,0-.35-.1-.44-.26-.13-.24-.04-.55,.2-.68l2.22-1.19c.24-.13,.55-.04,.68,.2,.13,.24,.04,.55-.2,.68l-2.22,1.19c-.08,.04-.16,.06-.24,.06Z"/>
74
- <path class="cls-3" d="M34.01,37.49c-.14,0-.27-.06-.37-.17l-1.38-1.53c-.18-.21-.17-.52,.04-.71,.2-.18,.52-.17,.71,.04l1.38,1.53c.18,.21,.17,.52-.04,.71-.1,.09-.21,.13-.33,.13Z"/>
75
- <path class="cls-3" d="M26.81,31.71c-.07,0-.15-.02-.22-.05l-2.23-1.09c-.25-.12-.35-.42-.23-.67,.12-.25,.42-.35,.67-.23l2.23,1.09c.25,.12,.35,.42,.23,.67-.09,.18-.26,.28-.45,.28Z"/>
76
- </g>
77
- </g>
78
- </g>
79
- </g>
80
- </g>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 104.32 74.73">
3
+ <defs>
4
+ <style>
5
+ .cls-1 {
6
+ fill: none;
7
+ }
8
+
9
+ .cls-2 {
10
+ clip-path: url(#clippath);
11
+ }
12
+
13
+ .cls-3 {
14
+ fill: #fff;
15
+ }
16
+
17
+ .cls-4 {
18
+ fill: #172531;
19
+ }
20
+
21
+ .cls-5 {
22
+ clip-path: url(#clippath-1);
23
+ }
24
+
25
+ .cls-6 {
26
+ opacity: .5;
27
+ }
28
+ </style>
29
+ <clipPath id="clippath">
30
+ <circle class="cls-1" cx="24" cy="26.43" r="24"/>
31
+ </clipPath>
32
+ <clipPath id="clippath-1">
33
+ <rect class="cls-1" x=".82" width="91.96" height="59.78"/>
34
+ </clipPath>
35
+ </defs>
36
+ <g id="Layer_1-2" data-name="Layer 1">
37
+ <g>
38
+ <g id="Oval">
39
+ <circle class="cls-4" cx="24" cy="26.43" r="24"/>
40
+ </g>
41
+ <g class="cls-2">
42
+ <g class="cls-5">
43
+ <g>
44
+ <g class="cls-6">
45
+ <rect class="cls-3" x="24.71" y="16.99" width=".5" height="55.25"/>
46
+ <rect class="cls-3" x="30.31" y="16.99" width=".5" height="55.25"/>
47
+ <rect class="cls-3" x="35.91" y="16.99" width=".5" height="55.25"/>
48
+ <rect class="cls-3" x="41.51" y="16.99" width=".5" height="55.25"/>
49
+ <rect class="cls-3" x="49.69" y="18.68" width=".34" height="56.04"/>
50
+ <rect class="cls-3" x="16.09" y="24.57" width="88.23" height=".5"/>
51
+ <rect class="cls-3" x="16.09" y="30.09" width="88.23" height=".5"/>
52
+ <rect class="cls-3" x="16.09" y="35.61" width="88.23" height=".5"/>
53
+ <rect class="cls-3" x="16.09" y="41.14" width="88.23" height=".5"/>
54
+ <rect class="cls-3" x="16.09" y="46.66" width="88.23" height=".5"/>
55
+ </g>
56
+ <polygon class="cls-3" points="16.49 49.82 14.99 49.82 14.99 16.69 48.05 16.69 48.05 18.19 16.49 18.19 16.49 49.82"/>
57
+ </g>
58
+ </g>
59
+ </g>
60
+ <g>
61
+ <ellipse class="cls-4" cx="30.36" cy="32.03" rx="9.59" ry="9.61"/>
62
+ <g>
63
+ <path class="cls-3" d="M26.8,37.49c-.12,0-.24-.04-.33-.13-.21-.18-.22-.5-.04-.71l1.38-1.54c.18-.2,.5-.22,.71-.04,.21,.18,.22,.5,.04,.71l-1.38,1.54c-.1,.11-.24,.17-.37,.17Z"/>
64
+ <g>
65
+ <path class="cls-3" d="M30.39,40.63c-4.74,0-8.6-3.86-8.6-8.6s3.86-8.6,8.6-8.6,8.6,3.86,8.6,8.6-3.86,8.6-8.6,8.6Zm0-16.2c-4.19,0-7.6,3.41-7.6,7.6s3.41,7.6,7.6,7.6,7.6-3.41,7.6-7.6-3.41-7.6-7.6-7.6Z"/>
66
+ <path class="cls-3" d="M32.63,35.95h-4.45c-.22,0-.41-.14-.48-.35l-1.38-4.25c-.07-.21,0-.43,.18-.56l3.6-2.62c.18-.13,.41-.13,.59,0l3.6,2.62c.17,.13,.25,.35,.18,.56l-1.38,4.25c-.07,.21-.26,.35-.48,.35Zm-4.09-1h3.72l1.15-3.56-3.01-2.2-3.01,2.2,1.15,3.56Z"/>
67
+ <path class="cls-3" d="M30.41,26.37c-.07,0-.13-.01-.2-.04l-3.07-1.31c-.25-.11-.37-.4-.26-.66,.11-.25,.4-.37,.66-.26l2.87,1.23,2.87-1.23c.25-.11,.55,0,.66,.26,.11,.25,0,.55-.26,.66l-3.07,1.31c-.06,.03-.13,.04-.2,.04Z"/>
68
+ <path class="cls-3" d="M22.39,33.14c-.12,0-.23-.04-.33-.12-.21-.18-.23-.5-.05-.71l2.05-2.36-.28-3.12c-.02-.27,.18-.52,.45-.54,.28-.02,.52,.18,.54,.45l.29,3.33c.01,.14-.03,.27-.12,.37l-2.19,2.52c-.1,.11-.24,.17-.38,.17Z"/>
69
+ <path class="cls-3" d="M28.52,40.36c-.17,0-.34-.09-.43-.24l-1.61-2.69-3.04-.7c-.27-.06-.44-.33-.38-.6,.06-.27,.33-.44,.6-.38l3.25,.75c.13,.03,.25,.11,.32,.23l1.71,2.87c.14,.24,.06,.54-.17,.69-.08,.05-.17,.07-.26,.07Z"/>
70
+ <path class="cls-3" d="M32.29,40.36c-.09,0-.18-.02-.26-.07-.24-.14-.31-.45-.17-.69l1.71-2.87c.07-.12,.18-.2,.32-.23l3.25-.75c.27-.06,.54,.11,.6,.38,.06,.27-.11,.54-.38,.6l-3.04,.7-1.6,2.69c-.09,.16-.26,.24-.43,.24Z"/>
71
+ <path class="cls-3" d="M38.43,33.14c-.14,0-.28-.06-.38-.17l-2.19-2.52c-.09-.1-.13-.24-.12-.37l.29-3.33c.02-.27,.27-.48,.54-.45,.28,.02,.48,.27,.45,.54l-.28,3.12,2.05,2.36c.18,.21,.16,.52-.05,.71-.09,.08-.21,.12-.33,.12Z"/>
72
+ <path class="cls-3" d="M30.4,29.08c-.28,0-.5-.22-.5-.5v-2.71c0-.28,.22-.5,.5-.5s.5,.22,.5,.5v2.71c0,.28-.22,.5-.5,.5Z"/>
73
+ <path class="cls-3" d="M34.02,31.81c-.18,0-.35-.1-.44-.26-.13-.24-.04-.55,.2-.68l2.22-1.19c.24-.13,.55-.04,.68,.2,.13,.24,.04,.55-.2,.68l-2.22,1.19c-.08,.04-.16,.06-.24,.06Z"/>
74
+ <path class="cls-3" d="M34.01,37.49c-.14,0-.27-.06-.37-.17l-1.38-1.53c-.18-.21-.17-.52,.04-.71,.2-.18,.52-.17,.71,.04l1.38,1.53c.18,.21,.17,.52-.04,.71-.1,.09-.21,.13-.33,.13Z"/>
75
+ <path class="cls-3" d="M26.81,31.71c-.07,0-.15-.02-.22-.05l-2.23-1.09c-.25-.12-.35-.42-.23-.67,.12-.25,.42-.35,.67-.23l2.23,1.09c.25,.12,.35,.42,.23,.67-.09,.18-.26,.28-.45,.28Z"/>
76
+ </g>
77
+ </g>
78
+ </g>
79
+ </g>
80
+ </g>
81
81
  </svg>
@@ -1,55 +1,55 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 49.77 48">
3
- <defs>
4
- <style>
5
- .cls-1 {
6
- fill: none;
7
- }
8
-
9
- .cls-2 {
10
- clip-path: url(#clippath);
11
- }
12
-
13
- .cls-3 {
14
- fill: #fff;
15
- }
16
-
17
- .cls-4 {
18
- fill: #172531;
19
- }
20
- </style>
21
- <clipPath id="clippath">
22
- <circle class="cls-1" cx="24.88" cy="24" r="24"/>
23
- </clipPath>
24
- </defs>
25
- <g id="Layer_1-2" data-name="Layer 1">
26
- <g>
27
- <g id="Oval">
28
- <circle class="cls-4" cx="24.88" cy="24" r="24"/>
29
- </g>
30
- <g class="cls-2">
31
- <g>
32
- <path class="cls-3" d="M44.49,32.01c-4.96-1.58-11.51-2.45-18.44-2.45s-13.37,.86-18.31,2.41l-.3-.95c5.04-1.58,11.65-2.46,18.61-2.46s13.69,.89,18.75,2.5l-.3,.95Z"/>
33
- <polygon class="cls-3" points="25.92 39.5 0 29.52 .36 28.59 25.91 38.42 49.4 29.09 49.77 30.02 25.92 39.5"/>
34
- <ellipse class="cls-4" cx="24.88" cy="19.15" rx="12.35" ry="12.38"/>
35
- <g>
36
- <path class="cls-3" d="M20.64,25.55c-.12,0-.24-.04-.33-.13-.21-.18-.22-.5-.04-.71l1.64-1.83c.18-.21,.5-.22,.71-.04,.21,.18,.22,.5,.04,.71l-1.64,1.83c-.1,.11-.24,.17-.37,.17Z"/>
37
- <g>
38
- <path class="cls-3" d="M24.91,29.28c-5.59,0-10.13-4.54-10.13-10.13s4.54-10.13,10.13-10.13,10.13,4.54,10.13,10.13-4.54,10.13-10.13,10.13Zm0-19.25c-5.03,0-9.13,4.09-9.13,9.13s4.1,9.13,9.13,9.13,9.13-4.09,9.13-9.13-4.1-9.13-9.13-9.13Z"/>
39
- <path class="cls-3" d="M27.57,23.72h-5.29c-.22,0-.41-.14-.48-.35l-1.64-5.05c-.07-.21,0-.43,.18-.56l4.28-3.12c.18-.13,.41-.13,.59,0l4.28,3.12c.17,.13,.25,.35,.18,.56l-1.63,5.05c-.07,.21-.26,.35-.48,.35Zm-4.93-1h4.56l1.41-4.36-3.69-2.69-3.69,2.69,1.41,4.36Z"/>
40
- <path class="cls-3" d="M24.93,12.33c-.07,0-.13-.01-.2-.04l-3.65-1.56c-.25-.11-.37-.4-.26-.66s.4-.37,.66-.26l3.45,1.47,3.45-1.47c.25-.11,.55,0,.66,.26,.11,.25,0,.55-.26,.66l-3.65,1.56c-.06,.03-.13,.04-.2,.04Z"/>
41
- <path class="cls-3" d="M15.4,20.38c-.12,0-.23-.04-.33-.12-.21-.18-.23-.5-.05-.71l2.47-2.84-.33-3.75c-.02-.27,.18-.52,.45-.54,.28-.02,.52,.18,.54,.45l.35,3.96c.01,.14-.03,.27-.12,.37l-2.6,3c-.1,.11-.24,.17-.38,.17Z"/>
42
- <path class="cls-3" d="M22.69,28.96c-.17,0-.34-.09-.43-.24l-1.93-3.23-3.66-.84c-.27-.06-.44-.33-.38-.6s.33-.44,.6-.38l3.86,.89c.13,.03,.25,.11,.32,.23l2.04,3.41c.14,.24,.06,.54-.17,.69-.08,.05-.17,.07-.26,.07Z"/>
43
- <path class="cls-3" d="M27.17,28.96c-.09,0-.18-.02-.26-.07-.24-.14-.31-.45-.17-.69l2.04-3.41c.07-.12,.18-.2,.32-.23l3.86-.89c.27-.06,.54,.11,.6,.38s-.11,.54-.38,.6l-3.65,.84-1.93,3.23c-.09,.16-.26,.24-.43,.24Z"/>
44
- <path class="cls-3" d="M34.47,20.38c-.14,0-.28-.06-.38-.17l-2.61-3c-.09-.1-.13-.24-.12-.37l.35-3.96c.02-.28,.28-.48,.54-.45,.28,.02,.48,.27,.45,.54l-.33,3.75,2.47,2.84c.18,.21,.16,.52-.05,.71-.09,.08-.21,.12-.33,.12Z"/>
45
- <path class="cls-3" d="M24.92,15.55c-.28,0-.5-.22-.5-.5v-3.22c0-.28,.22-.5,.5-.5s.5,.22,.5,.5v3.22c0,.28-.22,.5-.5,.5Z"/>
46
- <path class="cls-3" d="M29.22,18.8c-.18,0-.35-.1-.44-.26-.13-.24-.04-.55,.2-.68l2.64-1.42c.24-.13,.55-.04,.68,.2,.13,.24,.04,.55-.2,.68l-2.64,1.42c-.08,.04-.16,.06-.24,.06Z"/>
47
- <path class="cls-3" d="M29.21,25.55c-.14,0-.27-.06-.37-.17l-1.63-1.82c-.18-.21-.17-.52,.04-.71,.2-.18,.52-.17,.71,.04l1.63,1.82c.18,.21,.17,.52-.04,.71-.1,.09-.21,.13-.33,.13Z"/>
48
- <path class="cls-3" d="M20.65,18.67c-.07,0-.15-.02-.22-.05l-2.65-1.29c-.25-.12-.35-.42-.23-.67,.12-.25,.42-.35,.67-.23l2.65,1.29c.25,.12,.35,.42,.23,.67-.09,.18-.26,.28-.45,.28Z"/>
49
- </g>
50
- </g>
51
- </g>
52
- </g>
53
- </g>
54
- </g>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 49.77 48">
3
+ <defs>
4
+ <style>
5
+ .cls-1 {
6
+ fill: none;
7
+ }
8
+
9
+ .cls-2 {
10
+ clip-path: url(#clippath);
11
+ }
12
+
13
+ .cls-3 {
14
+ fill: #fff;
15
+ }
16
+
17
+ .cls-4 {
18
+ fill: #172531;
19
+ }
20
+ </style>
21
+ <clipPath id="clippath">
22
+ <circle class="cls-1" cx="24.88" cy="24" r="24"/>
23
+ </clipPath>
24
+ </defs>
25
+ <g id="Layer_1-2" data-name="Layer 1">
26
+ <g>
27
+ <g id="Oval">
28
+ <circle class="cls-4" cx="24.88" cy="24" r="24"/>
29
+ </g>
30
+ <g class="cls-2">
31
+ <g>
32
+ <path class="cls-3" d="M44.49,32.01c-4.96-1.58-11.51-2.45-18.44-2.45s-13.37,.86-18.31,2.41l-.3-.95c5.04-1.58,11.65-2.46,18.61-2.46s13.69,.89,18.75,2.5l-.3,.95Z"/>
33
+ <polygon class="cls-3" points="25.92 39.5 0 29.52 .36 28.59 25.91 38.42 49.4 29.09 49.77 30.02 25.92 39.5"/>
34
+ <ellipse class="cls-4" cx="24.88" cy="19.15" rx="12.35" ry="12.38"/>
35
+ <g>
36
+ <path class="cls-3" d="M20.64,25.55c-.12,0-.24-.04-.33-.13-.21-.18-.22-.5-.04-.71l1.64-1.83c.18-.21,.5-.22,.71-.04,.21,.18,.22,.5,.04,.71l-1.64,1.83c-.1,.11-.24,.17-.37,.17Z"/>
37
+ <g>
38
+ <path class="cls-3" d="M24.91,29.28c-5.59,0-10.13-4.54-10.13-10.13s4.54-10.13,10.13-10.13,10.13,4.54,10.13,10.13-4.54,10.13-10.13,10.13Zm0-19.25c-5.03,0-9.13,4.09-9.13,9.13s4.1,9.13,9.13,9.13,9.13-4.09,9.13-9.13-4.1-9.13-9.13-9.13Z"/>
39
+ <path class="cls-3" d="M27.57,23.72h-5.29c-.22,0-.41-.14-.48-.35l-1.64-5.05c-.07-.21,0-.43,.18-.56l4.28-3.12c.18-.13,.41-.13,.59,0l4.28,3.12c.17,.13,.25,.35,.18,.56l-1.63,5.05c-.07,.21-.26,.35-.48,.35Zm-4.93-1h4.56l1.41-4.36-3.69-2.69-3.69,2.69,1.41,4.36Z"/>
40
+ <path class="cls-3" d="M24.93,12.33c-.07,0-.13-.01-.2-.04l-3.65-1.56c-.25-.11-.37-.4-.26-.66s.4-.37,.66-.26l3.45,1.47,3.45-1.47c.25-.11,.55,0,.66,.26,.11,.25,0,.55-.26,.66l-3.65,1.56c-.06,.03-.13,.04-.2,.04Z"/>
41
+ <path class="cls-3" d="M15.4,20.38c-.12,0-.23-.04-.33-.12-.21-.18-.23-.5-.05-.71l2.47-2.84-.33-3.75c-.02-.27,.18-.52,.45-.54,.28-.02,.52,.18,.54,.45l.35,3.96c.01,.14-.03,.27-.12,.37l-2.6,3c-.1,.11-.24,.17-.38,.17Z"/>
42
+ <path class="cls-3" d="M22.69,28.96c-.17,0-.34-.09-.43-.24l-1.93-3.23-3.66-.84c-.27-.06-.44-.33-.38-.6s.33-.44,.6-.38l3.86,.89c.13,.03,.25,.11,.32,.23l2.04,3.41c.14,.24,.06,.54-.17,.69-.08,.05-.17,.07-.26,.07Z"/>
43
+ <path class="cls-3" d="M27.17,28.96c-.09,0-.18-.02-.26-.07-.24-.14-.31-.45-.17-.69l2.04-3.41c.07-.12,.18-.2,.32-.23l3.86-.89c.27-.06,.54,.11,.6,.38s-.11,.54-.38,.6l-3.65,.84-1.93,3.23c-.09,.16-.26,.24-.43,.24Z"/>
44
+ <path class="cls-3" d="M34.47,20.38c-.14,0-.28-.06-.38-.17l-2.61-3c-.09-.1-.13-.24-.12-.37l.35-3.96c.02-.28,.28-.48,.54-.45,.28,.02,.48,.27,.45,.54l-.33,3.75,2.47,2.84c.18,.21,.16,.52-.05,.71-.09,.08-.21,.12-.33,.12Z"/>
45
+ <path class="cls-3" d="M24.92,15.55c-.28,0-.5-.22-.5-.5v-3.22c0-.28,.22-.5,.5-.5s.5,.22,.5,.5v3.22c0,.28-.22,.5-.5,.5Z"/>
46
+ <path class="cls-3" d="M29.22,18.8c-.18,0-.35-.1-.44-.26-.13-.24-.04-.55,.2-.68l2.64-1.42c.24-.13,.55-.04,.68,.2,.13,.24,.04,.55-.2,.68l-2.64,1.42c-.08,.04-.16,.06-.24,.06Z"/>
47
+ <path class="cls-3" d="M29.21,25.55c-.14,0-.27-.06-.37-.17l-1.63-1.82c-.18-.21-.17-.52,.04-.71,.2-.18,.52-.17,.71,.04l1.63,1.82c.18,.21,.17,.52-.04,.71-.1,.09-.21,.13-.33,.13Z"/>
48
+ <path class="cls-3" d="M20.65,18.67c-.07,0-.15-.02-.22-.05l-2.65-1.29c-.25-.12-.35-.42-.23-.67,.12-.25,.42-.35,.67-.23l2.65,1.29c.25,.12,.35,.42,.23,.67-.09,.18-.26,.28-.45,.28Z"/>
49
+ </g>
50
+ </g>
51
+ </g>
52
+ </g>
53
+ </g>
54
+ </g>
55
55
  </svg>
@@ -1,31 +1,31 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
3
- <defs>
4
- <style>
5
- .cls-1 {
6
- fill: #fff;
7
- }
8
-
9
- .cls-2 {
10
- fill: #172531;
11
- }
12
- </style>
13
- </defs>
14
- <g id="Layer_1-2" data-name="Layer 1">
15
- <g>
16
- <g id="Oval">
17
- <circle class="cls-2" cx="24" cy="24" r="24"/>
18
- </g>
19
- <g id="Group-19">
20
- <g id="Path-16">
21
- <path class="cls-1" d="M32.85,36.6H15.15c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h17.69c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z"/>
22
- </g>
23
- </g>
24
- <g id="Rectangle">
25
- <g id="path-1">
26
- <path class="cls-1" d="M38.02,32.62H9.98V13.43h28.04v19.19Zm-26.54-1.5h25.04V14.93H11.48V31.12Z"/>
27
- </g>
28
- </g>
29
- </g>
30
- </g>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
3
+ <defs>
4
+ <style>
5
+ .cls-1 {
6
+ fill: #fff;
7
+ }
8
+
9
+ .cls-2 {
10
+ fill: #172531;
11
+ }
12
+ </style>
13
+ </defs>
14
+ <g id="Layer_1-2" data-name="Layer 1">
15
+ <g>
16
+ <g id="Oval">
17
+ <circle class="cls-2" cx="24" cy="24" r="24"/>
18
+ </g>
19
+ <g id="Group-19">
20
+ <g id="Path-16">
21
+ <path class="cls-1" d="M32.85,36.6H15.15c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h17.69c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z"/>
22
+ </g>
23
+ </g>
24
+ <g id="Rectangle">
25
+ <g id="path-1">
26
+ <path class="cls-1" d="M38.02,32.62H9.98V13.43h28.04v19.19Zm-26.54-1.5h25.04V14.93H11.48V31.12Z"/>
27
+ </g>
28
+ </g>
29
+ </g>
30
+ </g>
31
31
  </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golstats/gsc-timeline-reports",
3
- "version": "1.0.16",
3
+ "version": "1.1.1",
4
4
  "main": "dist/gsc-timeline-reports.umd.js",
5
5
  "module": "dist/gsc-timeline-reports.es.js",
6
6
  "exports": {
@@ -20,7 +20,9 @@
20
20
  "preview": "vite preview",
21
21
  "lint": "eslint . --fix",
22
22
  "format": "prettier --write src/",
23
- "prepublishOnly": "npm run build"
23
+ "prepublishOnly": "npm run build",
24
+ "test": "playwright test",
25
+ "test:ui": "playwright test --ui"
24
26
  },
25
27
  "keywords": [
26
28
  "vue",
@@ -52,6 +54,7 @@
52
54
  },
53
55
  "devDependencies": {
54
56
  "@eslint/js": "^9.22.0",
57
+ "@playwright/test": "^1.59.1",
55
58
  "@vitejs/plugin-vue": "^5.2.3",
56
59
  "@vue/eslint-config-prettier": "^10.2.0",
57
60
  "eslint": "^9.22.0",
package/src/App.vue CHANGED
@@ -1,6 +1,13 @@
1
1
  <script setup>
2
2
  import GSCTimelineReports from './components/gsc-timeline-reports.vue'
3
3
 
4
+ // Allow tests to control provider and isDevApis via URL query params:
5
+ // ?provider=3&isDevApis=true
6
+ // Falls back to the hardcoded defaults when params are absent.
7
+ const _params = new URLSearchParams(window.location.search)
8
+ const testProvider = _params.has('provider') ? Number(_params.get('provider')) : 1
9
+ const testIsDevApis = _params.get('isDevApis') === 'true'
10
+
4
11
  const gameData = {
5
12
  gameId: 90209,
6
13
  id: 90209,
@@ -48,6 +55,8 @@ const gameData = {
48
55
  :home-team="gameData.homeTeam.team_id"
49
56
  :away-team="gameData.awayTeam.team_id"
50
57
  :goals="false"
58
+ :provider="testProvider"
59
+ :is-dev-apis="testIsDevApis"
51
60
  :yellow-cards="true"
52
61
  :red-cards="true"
53
62
  :substitutions="true"
@@ -41,6 +41,14 @@ const props = defineProps({
41
41
  default:
42
42
  'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE',
43
43
  },
44
+ provider: {
45
+ type: Number,
46
+ default: 1,
47
+ },
48
+ isDevApis: {
49
+ type: Boolean,
50
+ default: false,
51
+ },
44
52
  })
45
53
 
46
54
  const containerRef = ref(null)
@@ -107,6 +115,8 @@ onBeforeUnmount(() => {
107
115
  :yellow-cards="props.yellowCards"
108
116
  :red-cards="props.redCards"
109
117
  :substitutions="props.substitutions"
118
+ :provider="props.provider"
119
+ :is-dev-apis="props.isDevApis"
110
120
  />
111
121
  </div>
112
122
  </template>
@@ -1,6 +1,8 @@
1
1
  <script setup>
2
2
  import { ref, onBeforeUnmount, watch, onMounted, nextTick } from 'vue'
3
3
  import axios from 'axios'
4
+ import { getApiUrl } from '../utils/apiUrl.js'
5
+ import { getImageUrl } from '../utils/imageUrl.js'
4
6
 
5
7
  // Estado para el rango de minutos seleccionados
6
8
  const minStart = ref(0) // Minuto inicial del rango
@@ -65,6 +67,14 @@ const props = defineProps({
65
67
  type: String,
66
68
  required: true,
67
69
  },
70
+ provider: {
71
+ type: Number,
72
+ default: 1,
73
+ },
74
+ isDevApis: {
75
+ type: Boolean,
76
+ default: false,
77
+ },
68
78
  })
69
79
 
70
80
  // Crear instancia de axios con la configuración del token
@@ -426,7 +436,11 @@ async function fetchGameData() {
426
436
  props.token,
427
437
  )
428
438
  const response = await axiosInstance.get(
429
- `https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/${props.gameId}`,
439
+ getApiUrl(
440
+ `https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/${props.gameId}`,
441
+ props.provider,
442
+ props.isDevApis,
443
+ ),
430
444
  )
431
445
 
432
446
  // Procesar los datos y crear el array de eventos
@@ -1810,7 +1824,10 @@ function incrementMinStart() {
1810
1824
  :src="
1811
1825
  props.isDefault
1812
1826
  ? 'https://golstatsimages.blob.core.windows.net/todoelfut/lineups/escudo1.png'
1813
- : `https://golstatsimages.blob.core.windows.net/teams-80/${props.homeTeam}.png`
1827
+ : getImageUrl(
1828
+ `https://golstatsimages.blob.core.windows.net/teams-80/${props.homeTeam}.png`,
1829
+ props.provider,
1830
+ )
1814
1831
  "
1815
1832
  alt="Equipo local"
1816
1833
  />
@@ -1820,7 +1837,10 @@ function incrementMinStart() {
1820
1837
  :src="
1821
1838
  props.isDefault
1822
1839
  ? 'https://golstatsimages.blob.core.windows.net/todoelfut/lineups/escudo2.png'
1823
- : `https://golstatsimages.blob.core.windows.net/teams-80/${props.awayTeam}.png`
1840
+ : getImageUrl(
1841
+ `https://golstatsimages.blob.core.windows.net/teams-80/${props.awayTeam}.png`,
1842
+ props.provider,
1843
+ )
1824
1844
  "
1825
1845
  alt="Equipo visitante"
1826
1846
  />
package/src/types.d.ts CHANGED
@@ -1,45 +1,45 @@
1
- export interface Team {
2
- logo: string
3
- team_id: number
4
- provisional_logo: string
5
- colloquial_name: string
6
- acronym: string
7
- team_name: string
8
- }
9
-
10
- export interface GameMinutes {
11
- home_goals_minutes: number[]
12
- visiting_goals_minutes: number[]
13
- home_yellow_cards_minutes: number[]
14
- away_yellow_cards_minutes: number[]
15
- home_red_cards_minutes: number[]
16
- away_red_cards_minutes: number[]
17
- }
18
-
19
- export interface Game {
20
- gameId: number
21
- id: number
22
- seasonId: number
23
- regularSeasonId: number
24
- matchday_name: string
25
- status: number
26
- score: number[]
27
- game_status: number
28
- dateTimeUTC: string
29
- homeTeam: Team
30
- awayTeam: Team
31
- is_live: number
32
- minutes: GameMinutes
33
- }
34
-
35
- export interface TeamSelected {
36
- teamId: number
37
- }
38
-
39
- export interface FieldPosesionProps {
40
- game: Game
41
- widthSection: number
42
- teamSelected: TeamSelected
43
- areInactiveVisible?: boolean
44
- showTitle?: boolean
45
- }
1
+ export interface Team {
2
+ logo: string
3
+ team_id: number
4
+ provisional_logo: string
5
+ colloquial_name: string
6
+ acronym: string
7
+ team_name: string
8
+ }
9
+
10
+ export interface GameMinutes {
11
+ home_goals_minutes: number[]
12
+ visiting_goals_minutes: number[]
13
+ home_yellow_cards_minutes: number[]
14
+ away_yellow_cards_minutes: number[]
15
+ home_red_cards_minutes: number[]
16
+ away_red_cards_minutes: number[]
17
+ }
18
+
19
+ export interface Game {
20
+ gameId: number
21
+ id: number
22
+ seasonId: number
23
+ regularSeasonId: number
24
+ matchday_name: string
25
+ status: number
26
+ score: number[]
27
+ game_status: number
28
+ dateTimeUTC: string
29
+ homeTeam: Team
30
+ awayTeam: Team
31
+ is_live: number
32
+ minutes: GameMinutes
33
+ }
34
+
35
+ export interface TeamSelected {
36
+ teamId: number
37
+ }
38
+
39
+ export interface FieldPosesionProps {
40
+ game: Game
41
+ widthSection: number
42
+ teamSelected: TeamSelected
43
+ areInactiveVisible?: boolean
44
+ showTitle?: boolean
45
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Transforms an API URL based on the active provider.
3
+ *
4
+ * @param {string} originalUrl - Full original URL (with domain and path)
5
+ * @param {number|null} provider - Provider ID (1, 0, null => no change; >=2 => transform)
6
+ * @param {boolean} isDevApis - If true uses dev-apis domain; if false uses apis
7
+ * @returns {string} Final URL to use in the request
8
+ */
9
+ export function getApiUrl(originalUrl, provider, isDevApis) {
10
+ const numProvider = Number(provider)
11
+
12
+ // Rule A: neutral provider -> return unchanged
13
+ if (!numProvider || numProvider <= 1 || isNaN(numProvider)) {
14
+ return originalUrl
15
+ }
16
+
17
+ // Rules B / C: provider >= 2 -> transform domain and clean path
18
+ const base = isDevApis
19
+ ? `https://dev-apis.golstats.com/${numProvider}/`
20
+ : `https://apis.golstats.com/${numProvider}/`
21
+
22
+ const url = new URL(originalUrl)
23
+ const segments = url.pathname.split('/').filter((s) => s !== '' && s !== 'prod' && s !== 'qa')
24
+ const cleanPath = segments.join('/')
25
+
26
+ return base + cleanPath
27
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Inserta el proveedor activo en una URL de imágenes de GolStats
3
+ * (dominio `golstatsimages.blob.core.windows.net`, escudos `teams-*`, etc.).
4
+ *
5
+ * Regla A: provider es 1, 0 o null/undefined → URL sin cambios.
6
+ * Regla B: provider >= 2 → se inserta `/<provider>` después del contenedor.
7
+ *
8
+ * https://host/teams-80/16906.png → https://host/teams-80/2/16906.png
9
+ *
10
+ * El proveedor no puede ir justo después del host: Azure exige que el primer
11
+ * segmento sea un nombre de contenedor válido (mínimo 3 caracteres) y responde
12
+ * 400 ante `/2/teams-80/16906.png`.
13
+ *
14
+ * @param {string} originalUrl URL original (con el id ya interpolado)
15
+ * @param {number|null} provider ID del proveedor
16
+ * @returns {string} URL final
17
+ */
18
+ export function getImageUrl(originalUrl, provider) {
19
+ if (!provider || provider <= 1) {
20
+ return originalUrl
21
+ }
22
+ const parsed = new URL(originalUrl)
23
+ const segments = parsed.pathname.split('/').filter((s) => s !== '')
24
+ if (segments.length === 0) {
25
+ return originalUrl
26
+ }
27
+ const [container, ...rest] = segments
28
+ const path = [container, provider, ...rest].join('/')
29
+ return `${parsed.origin}/${path}${parsed.search}`
30
+ }