@vixoniccom/footbal-score 1.3.0 → 1.4.0-dev.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 (44) hide show
  1. package/.github/workflows/sonarqube.yml +30 -0
  2. package/CHANGELOG.md +18 -0
  3. package/build/index.html +1 -0
  4. package/build/main.js +2 -0
  5. package/build/main.js.LICENSE.txt +59 -0
  6. package/build/test/downloads/4a9bcc4e-f398-4317-9f0f-afa8bcef1a4f.png +0 -0
  7. package/build/test/downloads/7953953c-7029-4730-ae4d-cff4abd5288f.ttf +0 -0
  8. package/build/test/downloads/Roboto-Bold.ttf +0 -0
  9. package/build/test/downloads/Spring in May.ttf +0 -0
  10. package/build/test/downloads/c705a739-312e-4334-9231-e73a05e9d382.ttf +0 -0
  11. package/build/test/downloads/cumples.png +0 -0
  12. package/build/test/downloads/d1093778-f3c9-42c8-9b07-9f8736390aeb/Foto prueba.jpg +0 -0
  13. package/build/test/downloads/d1093778-f3c9-42c8-9b07-9f8736390aeb/foto1.jpg +0 -0
  14. package/build/test/downloads/d1093778-f3c9-42c8-9b07-9f8736390aeb.zip +0 -0
  15. package/build/test/downloads/fondopasto.jpg +0 -0
  16. package/build/test/parameters.json +9 -0
  17. package/build.zip +0 -0
  18. package/configuration/appearanceGroup/appearanceInputs.ts +24 -0
  19. package/configuration/appearanceGroup/index.ts +8 -0
  20. package/configuration/dataGroup/dataInputs.ts +101 -0
  21. package/configuration/dataGroup/index.ts +8 -0
  22. package/configuration/index.ts +8 -0
  23. package/configuration/styleGroup/index.ts +8 -0
  24. package/configuration/styleGroup/styleInputs.ts +56 -0
  25. package/configuration/utils.ts +31 -0
  26. package/configuration.json +139 -132
  27. package/package.json +11 -17
  28. package/sonar-project.properties +1 -0
  29. package/src/App.tsx +39 -53
  30. package/src/components/FontLoader/index.tsx +7 -7
  31. package/src/components/FormattedText/index.tsx +34 -34
  32. package/src/components/Table/components/Results.tsx +10 -11
  33. package/src/components/Table/components/Row.tsx +34 -73
  34. package/src/components/Table/components/Status.tsx +8 -10
  35. package/src/components/Table/components/Time.tsx +7 -8
  36. package/src/components/Table/index.tsx +5 -16
  37. package/src/helpers/getFixture.ts +10 -7
  38. package/src/helpers/translateTeams.ts +48 -93
  39. package/src/index.html +12 -9
  40. package/src/parameters.d.ts +102 -103
  41. package/src/style.css +446 -434
  42. package/src/test/parameters.json +4 -2
  43. package/tsconfig.json +8 -18
  44. /package/src/{main.tsx → main.ts} +0 -0
@@ -1,96 +1,51 @@
1
1
  export const translateTeams = (team: string) => {
2
- switch (team) {
3
- case 'England':
4
- return 'Inglaterra'
5
- case 'Spain':
6
- return 'España'
7
- case 'Italy':
8
- return 'Italia'
9
- case 'Germany':
10
- return 'Alemania'
11
- case 'France':
12
- return 'Francia'
13
- case 'Portugal':
14
- return 'Portugal'
15
- case 'Netherlands':
16
- return 'Holanda'
17
- case 'Belgium':
18
- return 'Bélgica'
19
- case 'Russia':
20
- return 'Rusia'
21
- case 'Turkey':
22
- return 'Turquía'
23
- case 'Ukraine':
24
- return 'Ucrania'
25
- case 'Czech Republic':
26
- return 'República Checa'
27
- case 'Sweden':
28
- return 'Suecia'
29
- case 'Poland':
30
- return 'Polonia'
31
- case 'Austria':
32
- return 'Austria'
33
- case 'Switzerland':
34
- return 'Suiza'
35
- case 'Denmark':
36
- return 'Dinamarca'
37
- case 'Hungary':
38
- return 'Hungría'
39
- case 'Romania':
40
- return 'Rumanía'
41
- case 'Croatia':
42
- return 'Croacia'
43
- case 'Scotland':
44
- return 'Escocia'
45
- case 'Wales':
46
- return 'Gales'
47
- case 'Northern Ireland':
48
- return 'Irlanda del Norte'
49
- case 'Slovakia':
50
- return 'Eslovaquia'
51
- case 'Norway':
52
- return 'Noruega'
53
- case 'Finland':
54
- return 'Finlandia'
55
- case 'Bulgaria':
56
- return 'Bulgaria'
57
- case 'North Macedonia':
58
- return 'Macedonia del Norte'
59
- case 'Iceland':
60
- return 'Islandia'
61
- case 'Iran':
62
- return 'Irán'
63
- case 'United States':
64
- return 'Estados Unidos'
65
- case 'Mexico':
66
- return 'México'
67
- case 'Tunisia':
68
- return 'Túnez'
69
- case 'Japan':
70
- return 'Japón'
71
- case 'Argentina':
72
- return 'Argentina'
73
- case 'Canada':
74
- return 'Canadá'
75
- case 'Morocco':
76
- return 'Marruecos'
77
- case 'Brazil':
78
- return 'Brasil'
79
- case 'Cameroon':
80
- return 'Camerún'
81
- case 'Ghana':
82
- return 'Ghana'
83
- case 'South Korea':
84
- return 'Corea del Sur'
85
- case 'Saudi Arabia':
86
- return 'Arabia Saudita'
87
- case 'Dominican Republic':
88
- return 'República Dominicana'
89
- case 'Guadeloupe':
90
- return 'Guadalupe'
91
- case 'Suriname':
92
- return 'Surinam'
93
- default:
94
- return team
2
+ const translations: Record<string, string> = {
3
+ England: 'Inglaterra',
4
+ Spain: 'España',
5
+ Italy: 'Italia',
6
+ Germany: 'Alemania',
7
+ France: 'Francia',
8
+ Portugal: 'Portugal',
9
+ Netherlands: 'Holanda',
10
+ Belgium: 'Bélgica',
11
+ Russia: 'Rusia',
12
+ Turkey: 'Turquía',
13
+ Ukraine: 'Ucrania',
14
+ 'Czech Republic': 'República Checa',
15
+ Sweden: 'Suecia',
16
+ Poland: 'Polonia',
17
+ Austria: 'Austria',
18
+ Switzerland: 'Suiza',
19
+ Denmark: 'Dinamarca',
20
+ Hungary: 'Hungría',
21
+ Romania: 'Rumanía',
22
+ Croatia: 'Croacia',
23
+ Scotland: 'Escocia',
24
+ Wales: 'Gales',
25
+ 'Northern Ireland': 'Irlanda del Norte',
26
+ Slovakia: 'Eslovaquia',
27
+ Norway: 'Noruega',
28
+ Finland: 'Finlandia',
29
+ Bulgaria: 'Bulgaria',
30
+ 'North Macedonia': 'Macedonia del Norte',
31
+ Iceland: 'Islandia',
32
+ Iran: 'Irán',
33
+ 'United States': 'Estados Unidos',
34
+ Mexico: 'México',
35
+ Tunisia: 'Túnez',
36
+ Japan: 'Japón',
37
+ Argentina: 'Argentina',
38
+ Canada: 'Canadá',
39
+ Morocco: 'Marruecos',
40
+ Brazil: 'Brasil',
41
+ Cameroon: 'Camerún',
42
+ Ghana: 'Ghana',
43
+ 'South Korea': 'Corea del Sur',
44
+ 'Saudi Arabia': 'Arabia Saudita',
45
+ 'Dominican Republic': 'República Dominicana',
46
+ Guadeloupe: 'Guadalupe',
47
+ Suriname: 'Surinam',
95
48
  }
49
+
50
+ return translations[team] || team
96
51
  }
package/src/index.html CHANGED
@@ -1,11 +1,14 @@
1
1
  <!DOCTYPE html>
2
- <html style="position: absolute; height:100%; width: 100%; overflow: hidden;">
3
- <head>
4
- <title></title>
5
- <meta charset="utf-8">
6
- </head>
7
- <body style="margin:0; overflow: hidden;">
8
- <div id="root" style="position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden;">
9
- </div>
10
- </body>
2
+ <html
3
+ lang="en"
4
+ style="position: absolute; height: 100%; width: 100%; overflow: hidden">
5
+ <head>
6
+ <title></title>
7
+ <meta charset="utf-8" />
8
+ </head>
9
+ <body style="margin: 0; overflow: hidden">
10
+ <div
11
+ id="root"
12
+ style="position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden"></div>
13
+ </body>
11
14
  </html>
@@ -1,116 +1,115 @@
1
-
2
-
3
1
  declare type VixonicData = {
4
- parameters: VixonicParameters,
5
- services?: { [key: string]: { data?: any, updatedAt?: number } }
6
2
  downloadsPath: string
3
+ services: { [key: string]: { data?: any; updatedAt?: number } }
4
+ parameters: VixonicParameters
7
5
  }
8
6
 
9
7
  declare type VixonicParameters = Partial<{
10
- abbreviatedMonths: boolean
11
- animationMode: string
12
- animationOrder: boolean
13
- animationSpeed: number
14
- animationTime: string
15
- animationStagger: number
16
- apiDomain: string
17
- backgroundImage: GeneralData
18
- containerColumns: string
19
- containerRows: string
20
- containerRowsGap: string
21
- containerColumnsGap: string
22
- dataMode: string
23
- dateAlignment: keyof typeof alignment
24
- dateDayFormat: DateFormat
25
- timeFormat: DateFormat
26
- goalsFormat: DateFormat
27
- updateTime: number
28
- dateEnabled: boolean
29
- title0: string
8
+ league: '1' | '9' | '4' | '22' | '15' | '265' | '128'
9
+ matchesYesterday: boolean
10
+ matchesTomorrow: boolean
11
+ timeStart:
12
+ | '12m'
13
+ | '1m'
14
+ | '2m'
15
+ | '3m'
16
+ | '4m'
17
+ | '5m'
18
+ | '6m'
19
+ | '7m'
20
+ | '8m'
21
+ | '9m'
22
+ | '10m'
23
+ | '11m'
24
+ | '12pm'
25
+ | '1pm'
26
+ | '2pm'
27
+ | '3pm'
28
+ | '4pm'
29
+ | '5pm'
30
+ | '6pm'
31
+ | '7pm'
32
+ | '8pm'
33
+ | '9pm'
34
+ | '10pm'
35
+ | '11pm'
36
+ timeEnd:
37
+ | '12m'
38
+ | '1m'
39
+ | '2m'
40
+ | '3m'
41
+ | '4m'
42
+ | '5m'
43
+ | '6m'
44
+ | '7m'
45
+ | '8m'
46
+ | '9m'
47
+ | '10m'
48
+ | '11m'
49
+ | '12pm'
50
+ | '1pm'
51
+ | '2pm'
52
+ | '3pm'
53
+ | '4pm'
54
+ | '5pm'
55
+ | '6pm'
56
+ | '7pm'
57
+ | '8pm'
58
+ | '9pm'
59
+ | '10pm'
60
+ | '11pm'
61
+ updateTime: 300000 | 600000 | 1800000 | 3600000 | 21600000 | 43200000 | 86400000
30
62
  titleEnabled: boolean
31
- titleFormat: DateFormat
32
- dateMonthFormat: DateFormat
33
- datePosition: number
34
- datePrimaryColor: string
35
- dateStyle: keyof typeof styles
36
- descriptionEnabled: boolean
37
- descriptionFormat: DateFormat
38
- excludePast: boolean
39
- imageAlignment: keyof typeof alignment
40
- imageEnabled: boolean
41
- imagePosition: number
42
- imageStyle: keyof typeof borderStyles,
43
- imageSize: number
44
- itemMargins: string
63
+ title0: string
64
+ titleFormat: {
65
+ fontSize?: number
66
+ fontColor?: string
67
+ alignment?: { horizontal?: 'left' | 'right' | 'center' }
68
+ font?: { filename: string; id: string; __isAsset: true }
69
+ }
45
70
  msj0: string
46
- nameFormat: DateFormat
47
- orientation: string
71
+ formatMjs: {
72
+ fontSize?: number
73
+ fontColor?: string
74
+ alignment?: { horizontal?: 'left' | 'right' | 'center' }
75
+ font?: { filename: string; id: string; __isAsset: true }
76
+ }
77
+ alignVerticalMsj: 'flex-start' | 'center' | 'flex-end'
78
+ itemsPerPage: number
79
+ durationPerPage: number
80
+ backgroundImage: { id?: string; filename?: string; extension?: string }
48
81
  padding: string
49
- photosMode: string
50
- photosZip: GeneralData
51
- template: string
52
- textAlignment: keyof typeof alignment
53
- textPosition: number
54
- updateTime: number
55
- urlBaseApi: string
56
- imageMargin: string
57
- textMargin: string
58
- dateMargin: string
59
- separator: boolean
60
- separatorWidth: number
61
- separatorColor: string
62
- nameMaxChar: number
63
- descriptionMaxChar: number
64
- statusFormat: DateFormat
65
- widthDescription: string
66
- widthImage: string
67
- widthScore: string
68
82
  columnGap: string
69
83
  rowGap: string
84
+ timeFormat: {
85
+ fontSize?: number
86
+ fontColor?: string
87
+ alignment?: { horizontal?: 'left' | 'right' | 'center' }
88
+ font?: { filename: string; id: string; __isAsset: true }
89
+ }
70
90
  widthTime: string
91
+ statusFormat: {
92
+ fontSize?: number
93
+ fontColor?: string
94
+ alignment?: { horizontal?: 'left' | 'right' | 'center' }
95
+ font?: { filename: string; id: string; __isAsset: true }
96
+ }
71
97
  widthStatus: string
72
- timeStart: string
73
- timeEnd: string
74
- formatMjs: DateFormat
75
- alignVerticalMsj: string
76
- league: string
77
- matchesTomorrow: boolean
78
- matchesYesterday: boolean
79
- itemsPerPage: number
80
- durationPerPage: number
98
+ goalsFormat: {
99
+ fontSize?: number
100
+ fontColor?: string
101
+ alignment?: { horizontal?: 'left' | 'right' | 'center' }
102
+ font?: { filename: string; id: string; __isAsset: true }
103
+ }
104
+ widthScore: string
105
+ descriptionEnabled: boolean
106
+ descriptionFormat: {
107
+ fontSize?: number
108
+ fontColor?: string
109
+ alignment?: { horizontal?: 'left' | 'right' | 'center' }
110
+ font?: { filename: string; id: string; __isAsset: true }
111
+ }
112
+ widthDescription: string
113
+ imageSize: number
114
+ widthImage: string
81
115
  }>
82
-
83
- type GeneralData = {
84
- filename?: string
85
- id?: string
86
- extension?: string
87
- _isAsset: boolean
88
- }
89
-
90
- type DateFormat = {
91
- alignment?: { horizontal?: 'left' | 'right' | 'center' }
92
- font?: GeneralData
93
- fontColor?: string
94
- fontSize?: number
95
- }
96
-
97
- const alignment = {
98
- start: 'flex-start',
99
- center: 'center',
100
- end: 'flex-end'
101
- }
102
-
103
-
104
- const borderStyles = {
105
- normal: '0',
106
- rounded: '10',
107
- circle: '100'
108
- }
109
-
110
- const styles = {
111
- text: 'text',
112
- calendarFlat: 'calendarFlat',
113
- calendarText: 'calendarText',
114
- circle: 'circle',
115
- outlines: 'outlines'
116
- }