@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.
- package/.github/workflows/sonarqube.yml +30 -0
- package/CHANGELOG.md +18 -0
- package/build/index.html +1 -0
- package/build/main.js +2 -0
- package/build/main.js.LICENSE.txt +59 -0
- package/build/test/downloads/4a9bcc4e-f398-4317-9f0f-afa8bcef1a4f.png +0 -0
- package/build/test/downloads/7953953c-7029-4730-ae4d-cff4abd5288f.ttf +0 -0
- package/build/test/downloads/Roboto-Bold.ttf +0 -0
- package/build/test/downloads/Spring in May.ttf +0 -0
- package/build/test/downloads/c705a739-312e-4334-9231-e73a05e9d382.ttf +0 -0
- package/build/test/downloads/cumples.png +0 -0
- package/build/test/downloads/d1093778-f3c9-42c8-9b07-9f8736390aeb/Foto prueba.jpg +0 -0
- package/build/test/downloads/d1093778-f3c9-42c8-9b07-9f8736390aeb/foto1.jpg +0 -0
- package/build/test/downloads/d1093778-f3c9-42c8-9b07-9f8736390aeb.zip +0 -0
- package/build/test/downloads/fondopasto.jpg +0 -0
- package/build/test/parameters.json +9 -0
- package/build.zip +0 -0
- package/configuration/appearanceGroup/appearanceInputs.ts +24 -0
- package/configuration/appearanceGroup/index.ts +8 -0
- package/configuration/dataGroup/dataInputs.ts +101 -0
- package/configuration/dataGroup/index.ts +8 -0
- package/configuration/index.ts +8 -0
- package/configuration/styleGroup/index.ts +8 -0
- package/configuration/styleGroup/styleInputs.ts +56 -0
- package/configuration/utils.ts +31 -0
- package/configuration.json +139 -132
- package/package.json +11 -17
- package/sonar-project.properties +1 -0
- package/src/App.tsx +39 -53
- package/src/components/FontLoader/index.tsx +7 -7
- package/src/components/FormattedText/index.tsx +34 -34
- package/src/components/Table/components/Results.tsx +10 -11
- package/src/components/Table/components/Row.tsx +34 -73
- package/src/components/Table/components/Status.tsx +8 -10
- package/src/components/Table/components/Time.tsx +7 -8
- package/src/components/Table/index.tsx +5 -16
- package/src/helpers/getFixture.ts +10 -7
- package/src/helpers/translateTeams.ts +48 -93
- package/src/index.html +12 -9
- package/src/parameters.d.ts +102 -103
- package/src/style.css +446 -434
- package/src/test/parameters.json +4 -2
- package/tsconfig.json +8 -18
- /package/src/{main.tsx → main.ts} +0 -0
|
@@ -1,96 +1,51 @@
|
|
|
1
1
|
export const translateTeams = (team: string) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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>
|
package/src/parameters.d.ts
CHANGED
|
@@ -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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
47
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
}
|