@golstats/gsc-timeline-reports 1.0.0

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 (96) hide show
  1. package/README.md +2 -0
  2. package/dist/css/fonts.css +91 -0
  3. package/dist/fonts/BebasNeue-Bold.otf +0 -0
  4. package/dist/fonts/BebasNeue-Bold.ttf +0 -0
  5. package/dist/fonts/BebasNeue-Bold.woff2 +0 -0
  6. package/dist/fonts/BebasNeue-Book.otf +0 -0
  7. package/dist/fonts/BebasNeue-Book.ttf +0 -0
  8. package/dist/fonts/BebasNeue-Book.woff2 +0 -0
  9. package/dist/fonts/BebasNeue-Light.otf +0 -0
  10. package/dist/fonts/BebasNeue-Light.ttf +0 -0
  11. package/dist/fonts/BebasNeue-Light.woff2 +0 -0
  12. package/dist/fonts/BebasNeue-Regular.otf +0 -0
  13. package/dist/fonts/BebasNeue-Regular.ttf +0 -0
  14. package/dist/fonts/BebasNeue-Regular.woff2 +0 -0
  15. package/dist/fonts/BebasNeue-Thin.otf +0 -0
  16. package/dist/fonts/BebasNeue-Thin.ttf +0 -0
  17. package/dist/fonts/BebasNeue-Thin.woff2 +0 -0
  18. package/dist/fonts/Montserrat-Black.otf +0 -0
  19. package/dist/fonts/Montserrat-BlackItalic.otf +0 -0
  20. package/dist/fonts/Montserrat-Bold.otf +0 -0
  21. package/dist/fonts/Montserrat-BoldItalic.otf +0 -0
  22. package/dist/fonts/Montserrat-ExtraBold.otf +0 -0
  23. package/dist/fonts/Montserrat-ExtraBoldItalic.otf +0 -0
  24. package/dist/fonts/Montserrat-ExtraLight.otf +0 -0
  25. package/dist/fonts/Montserrat-ExtraLightItalic.otf +0 -0
  26. package/dist/fonts/Montserrat-Italic.otf +0 -0
  27. package/dist/fonts/Montserrat-Light.otf +0 -0
  28. package/dist/fonts/Montserrat-LightItalic.otf +0 -0
  29. package/dist/fonts/Montserrat-Medium.otf +0 -0
  30. package/dist/fonts/Montserrat-MediumItalic.otf +0 -0
  31. package/dist/fonts/Montserrat-Regular.otf +0 -0
  32. package/dist/fonts/Montserrat-SemiBold.otf +0 -0
  33. package/dist/fonts/Montserrat-SemiBoldItalic.otf +0 -0
  34. package/dist/fonts/Montserrat-Thin.otf +0 -0
  35. package/dist/fonts/Montserrat-ThinItalic.otf +0 -0
  36. package/dist/fonts/Oswald-Bold.ttf +0 -0
  37. package/dist/fonts/Oswald-ExtraLight.ttf +0 -0
  38. package/dist/fonts/Oswald-Light.ttf +0 -0
  39. package/dist/fonts/Oswald-Medium.ttf +0 -0
  40. package/dist/fonts/Oswald-Regular.ttf +0 -0
  41. package/dist/fonts/Oswald-SemiBold.ttf +0 -0
  42. package/dist/fonts/Poppins-Black.otf +0 -0
  43. package/dist/fonts/Poppins-BlackItalic.otf +0 -0
  44. package/dist/fonts/Poppins-Bold.otf +0 -0
  45. package/dist/fonts/Poppins-BoldItalic.otf +0 -0
  46. package/dist/fonts/Poppins-ExtraBold.otf +0 -0
  47. package/dist/fonts/Poppins-ExtraBoldItalic.otf +0 -0
  48. package/dist/fonts/Poppins-ExtraLight.otf +0 -0
  49. package/dist/fonts/Poppins-ExtraLightItalic.otf +0 -0
  50. package/dist/fonts/Poppins-Italic.otf +0 -0
  51. package/dist/fonts/Poppins-Light.otf +0 -0
  52. package/dist/fonts/Poppins-LightItalic.otf +0 -0
  53. package/dist/fonts/Poppins-Medium.otf +0 -0
  54. package/dist/fonts/Poppins-MediumItalic.otf +0 -0
  55. package/dist/fonts/Poppins-Regular.otf +0 -0
  56. package/dist/fonts/Poppins-SemiBold.otf +0 -0
  57. package/dist/fonts/Poppins-SemiBoldItalic.otf +0 -0
  58. package/dist/fonts/Poppins-Thin.otf +0 -0
  59. package/dist/fonts/Poppins-ThinItalic.otf +0 -0
  60. package/dist/gsc-timeline-reports.css +1 -0
  61. package/dist/gsc-timeline-reports.es.js +2513 -0
  62. package/dist/gsc-timeline-reports.umd.js +6 -0
  63. package/dist/images/cancha-horizontal-raw.jpg +0 -0
  64. package/dist/images/cancha-horizontal.jpg +0 -0
  65. package/dist/images/canchaRPH.svg +30 -0
  66. package/dist/images/events/atajada.svg +57 -0
  67. package/dist/images/events/cambio.svg +27 -0
  68. package/dist/images/events/falta.svg +43 -0
  69. package/dist/images/events/favicon.ico +0 -0
  70. package/dist/images/events/fin-del-partido.svg +44 -0
  71. package/dist/images/events/fuera-de-lugar.svg +58 -0
  72. package/dist/images/events/generic.svg +1 -0
  73. package/dist/images/events/gol.svg +49 -0
  74. package/dist/images/events/icn-cambio.svg +6 -0
  75. package/dist/images/events/icn-falta.svg +4 -0
  76. package/dist/images/events/icn-play.svg +3 -0
  77. package/dist/images/events/icn-tarjeta-amarilla.svg +3 -0
  78. package/dist/images/events/icn-tarjeta-roja.svg +3 -0
  79. package/dist/images/events/icn-tiro-a-porteria.svg +36 -0
  80. package/dist/images/events/icn-tiros-de-esquina.svg +18 -0
  81. package/dist/images/events/inicia-el-partido.svg +46 -0
  82. package/dist/images/events/jugada-peligrosa.svg +91 -0
  83. package/dist/images/events/penal-fallado.svg +195 -0
  84. package/dist/images/events/penal-marcado.svg +190 -0
  85. package/dist/images/events/tiempo-agregado.svg +75 -0
  86. package/dist/images/events/tiro-a-porteria.svg +81 -0
  87. package/dist/images/events/tiro-de-esquina.svg +55 -0
  88. package/dist/images/events/var.png +0 -0
  89. package/dist/images/events/var.svg +31 -0
  90. package/package.json +65 -0
  91. package/src/App.vue +60 -0
  92. package/src/components/gsc-timeline-reports.vue +83 -0
  93. package/src/components/gsc-timeline.vue +3133 -0
  94. package/src/index.js +4 -0
  95. package/src/main.js +4 -0
  96. package/src/types.d.ts +45 -0
@@ -0,0 +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>
81
+ </svg>
@@ -0,0 +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>
55
+ </svg>
Binary file
@@ -0,0 +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>
31
+ </svg>
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@golstats/gsc-timeline-reports",
3
+ "version": "1.0.0",
4
+ "main": "dist/gsc-timeline-reports.umd.js",
5
+ "module": "dist/gsc-timeline-reports.es.js",
6
+ "exports": {
7
+ ".": {
8
+ "import": "./dist/gsc-timeline-reports.es.js",
9
+ "require": "./dist/gsc-timeline-reports.umd.js"
10
+ }
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "src"
15
+ ],
16
+ "type": "module",
17
+ "scripts": {
18
+ "dev": "vite",
19
+ "build": "vite build",
20
+ "preview": "vite preview",
21
+ "lint": "eslint . --fix",
22
+ "format": "prettier --write src/",
23
+ "prepublishOnly": "npm run build"
24
+ },
25
+ "keywords": [
26
+ "vue",
27
+ "component",
28
+ "football",
29
+ "soccer",
30
+ "possession",
31
+ "stats",
32
+ "golstats",
33
+ "typescript"
34
+ ],
35
+ "author": "GolStats",
36
+ "license": "MIT",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "https://github.com/golstats/gsc-field-possession.git"
40
+ },
41
+ "bugs": {
42
+ "url": "https://github.com/golstats/gsc-field-possession/issues"
43
+ },
44
+ "homepage": "https://github.com/golstats/gsc-field-possession#readme",
45
+ "peerDependencies": {
46
+ "vue": "^3.0.0"
47
+ },
48
+ "dependencies": {
49
+ "@golstats/gsc-checkbox": "^1.0.13",
50
+ "axios": "^1.10.0",
51
+ "vuex": "^4.1.0"
52
+ },
53
+ "devDependencies": {
54
+ "@eslint/js": "^9.22.0",
55
+ "@vitejs/plugin-vue": "^5.2.3",
56
+ "@vue/eslint-config-prettier": "^10.2.0",
57
+ "eslint": "^9.22.0",
58
+ "eslint-plugin-vue": "~10.0.0",
59
+ "globals": "^16.0.0",
60
+ "prettier": "3.5.3",
61
+ "vite": "^6.2.4",
62
+ "vite-plugin-vue-devtools": "^7.7.2",
63
+ "vue": "^3.5.13"
64
+ }
65
+ }
package/src/App.vue ADDED
@@ -0,0 +1,60 @@
1
+ <script setup>
2
+ import GSCTimelineReports from './components/gsc-timeline-reports.vue'
3
+
4
+ const gameData = {
5
+ gameId: 90209,
6
+ id: 90209,
7
+ seasonId: 1943,
8
+ regularSeasonId: 1933,
9
+ matchday_name: 'Playoffs 6',
10
+ status: 1,
11
+ score: [2, 0],
12
+ game_status: 1,
13
+ dateTimeUTC: '2025-05-26T00:00:00Z',
14
+ homeTeam: {
15
+ logo: 'https://golstatsimages.blob.core.windows.net/teams-80/18.png',
16
+ team_id: 18,
17
+ provisional_logo: 'https://golstatsimages.blob.core.windows.net/teams-provisional/18.png',
18
+ colloquial_name: 'Toluca',
19
+ acronym: 'TOL',
20
+ team_name: 'Toluca',
21
+ },
22
+ awayTeam: {
23
+ logo: 'https://golstatsimages.blob.core.windows.net/teams-80/2.png',
24
+ team_id: 2,
25
+ provisional_logo: 'https://golstatsimages.blob.core.windows.net/teams-provisional/2.png',
26
+ colloquial_name: 'América',
27
+ acronym: 'AME',
28
+ team_name: 'America',
29
+ },
30
+ is_live: 0,
31
+ minutes: {
32
+ home_goals_minutes: ["L. Garcia 65'", "A. Vega 82'"],
33
+ visiting_goals_minutes: [],
34
+ home_yellow_cards_minutes: ["L. Garcia 90'", "A. Vega 90 + 3'"],
35
+ away_yellow_cards_minutes: ["S. Caceres 78'"],
36
+ home_red_cards_minutes: [],
37
+ away_red_cards_minutes: [],
38
+ },
39
+ }
40
+ </script>
41
+
42
+ <template>
43
+ <div style="max-width: 968px; width: 100%">
44
+ <GSCTimelineReports
45
+ :key="true"
46
+ :is-default="true"
47
+ :game-id="gameData.gameId"
48
+ :home-team="gameData.homeTeam.team_id"
49
+ :away-team="gameData.awayTeam.team_id"
50
+ token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Mzg4NjYsIm5hbWUiOiJMaWxsaW5pIiwidXNlcm5hbWUiOiJsaWxsaW5pdGVzdCIsImVtYWlsIjoiIiwicHJvdmlkZXJfaWQiOjEsImxvZ2luX2dvbHN0YXRzIjoxLCJpYXQiOjE3NDkwMTgyODIsImV4cCI6MTc4MDU1NDI4Mn0.bvqTlPHVO6vHtuZu8S5EEdHbgpgiMuwO-DvEENnXvhA"
51
+ />
52
+ </div>
53
+ </template>
54
+ <style>
55
+ body {
56
+ margin: 0;
57
+ padding: 0;
58
+ background-color: #0d1d29;
59
+ }
60
+ </style>
@@ -0,0 +1,83 @@
1
+ <script setup>
2
+ import GSCTime from './gsc-timeline.vue'
3
+ import { ref, onMounted, onBeforeUnmount, watch } from 'vue'
4
+
5
+ // Definición de las props que recibirá este componente
6
+ const props = defineProps({
7
+ timelineWidth: {
8
+ type: Number,
9
+ required: true,
10
+ default: 1010,
11
+ },
12
+ gameId: {
13
+ type: Number,
14
+ required: true,
15
+ },
16
+ homeTeam: {
17
+ type: Number,
18
+ required: true,
19
+ },
20
+ awayTeam: {
21
+ type: Number,
22
+ required: true,
23
+ },
24
+ isDefault: {
25
+ type: Boolean,
26
+ required: false,
27
+ },
28
+ token: {
29
+ type: String,
30
+ required: true,
31
+ },
32
+ })
33
+
34
+ const containerRef = ref(null)
35
+ const timelineWidth = ref(props.timelineWidth)
36
+ const timelineKey = ref(0)
37
+
38
+ function updateTimelineWidth() {
39
+ if (containerRef.value) {
40
+ timelineWidth.value = containerRef.value.offsetWidth - 80
41
+ }
42
+ }
43
+
44
+ // Watch para timelineWidth
45
+ watch(timelineWidth, (newVal, oldVal) => {
46
+ if (newVal !== oldVal) {
47
+ setTimeout(() => {
48
+ timelineKey.value++
49
+ }, 3000)
50
+ }
51
+ })
52
+
53
+ onMounted(() => {
54
+ updateTimelineWidth()
55
+ window.addEventListener('resize', updateTimelineWidth)
56
+ })
57
+
58
+ onBeforeUnmount(() => {
59
+ window.removeEventListener('resize', updateTimelineWidth)
60
+ })
61
+ </script>
62
+
63
+ <template>
64
+ <div class="container-fullwidth" ref="containerRef">
65
+ <GSCTime
66
+ :is-default="isDefault"
67
+ :key="timelineWidth"
68
+ :timeline-width="timelineWidth"
69
+ :game-id="props.gameId"
70
+ :home-team="props.homeTeam"
71
+ :away-team="props.awayTeam"
72
+ :token="props.token"
73
+ />
74
+ </div>
75
+ </template>
76
+ <style>
77
+ .container-fullwidth {
78
+ width: auto;
79
+ display: flex;
80
+ justify-content: center; /* Centra horizontalmente */
81
+ align-items: center; /* Centra verticalmente */
82
+ }
83
+ </style>