@vixoniccom/footbal-score 1.4.6-dev.8 → 1.5.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.
@@ -3,8 +3,6 @@
3
3
  "footballService": { "id": "f7e3a1b2-c4d5-6789-abcd-ef0123456789" },
4
4
  "league": 1,
5
5
  "debugTimezone" : false,
6
- "timeStart": "10 am",
7
- "timeEnd": "1 am",
8
6
  "matchesYesterday": false,
9
7
  "matchesTomorrow": false,
10
8
  "itemsPerPage": 2
package/build.zip CHANGED
Binary file
@@ -22,20 +22,6 @@ export const dataInputs = [
22
22
  displayOnFalse: 'No',
23
23
  defaultValue: false,
24
24
  }),
25
- new SelectInput({
26
- id: 'timeStart',
27
- label: 'Hora de inicio',
28
- required: true,
29
- items: [...timeSelect],
30
- defaultValue: '6am',
31
- }),
32
- new SelectInput({
33
- id: 'timeEnd',
34
- label: 'Hora Fin',
35
- required: true,
36
- items: [...timeSelect],
37
- defaultValue: '7pm',
38
- }),
39
25
  new Switch({
40
26
  id: 'titleEnabled',
41
27
  label: 'Título App',
@@ -31,217 +31,6 @@
31
31
  "displayOnTrue": "Si",
32
32
  "displayOnFalse": "No"
33
33
  },
34
- {
35
- "id": "timeStart",
36
- "label": "Hora de inicio",
37
- "type": "select-input",
38
- "items": [
39
- {
40
- "label": "12 am",
41
- "value": "12m"
42
- },
43
- {
44
- "label": "1 am",
45
- "value": "1m"
46
- },
47
- {
48
- "label": "2 am",
49
- "value": "2m"
50
- },
51
- {
52
- "label": "3 am",
53
- "value": "3m"
54
- },
55
- {
56
- "label": "4 am",
57
- "value": "4m"
58
- },
59
- {
60
- "label": "5 am",
61
- "value": "5m"
62
- },
63
- {
64
- "label": "6 am",
65
- "value": "6m"
66
- },
67
- {
68
- "label": "7 am",
69
- "value": "7m"
70
- },
71
- {
72
- "label": "8 am",
73
- "value": "8m"
74
- },
75
- {
76
- "label": "9 am",
77
- "value": "9m"
78
- },
79
- {
80
- "label": "10 am",
81
- "value": "10m"
82
- },
83
- {
84
- "label": "11 am",
85
- "value": "11m"
86
- },
87
- {
88
- "label": "12 pm",
89
- "value": "12pm"
90
- },
91
- {
92
- "label": "1 pm",
93
- "value": "1pm"
94
- },
95
- {
96
- "label": "2 pm",
97
- "value": "2pm"
98
- },
99
- {
100
- "label": "3 pm",
101
- "value": "3pm"
102
- },
103
- {
104
- "label": "4 pm",
105
- "value": "4pm"
106
- },
107
- {
108
- "label": "5 pm",
109
- "value": "5pm"
110
- },
111
- {
112
- "label": "6 pm",
113
- "value": "6pm"
114
- },
115
- {
116
- "label": "7 pm",
117
- "value": "7pm"
118
- },
119
- {
120
- "label": "8 pm",
121
- "value": "8pm"
122
- },
123
- {
124
- "label": "9 pm",
125
- "value": "9pm"
126
- },
127
- {
128
- "label": "10 pm",
129
- "value": "10pm"
130
- },
131
- {
132
- "label": "11 pm",
133
- "value": "11pm"
134
- }
135
- ],
136
- "required": true,
137
- "defaultValue": "6am"
138
- },
139
- {
140
- "id": "timeEnd",
141
- "label": "Hora Fin",
142
- "type": "select-input",
143
- "items": [
144
- {
145
- "label": "12 am",
146
- "value": "12m"
147
- },
148
- {
149
- "label": "1 am",
150
- "value": "1m"
151
- },
152
- {
153
- "label": "2 am",
154
- "value": "2m"
155
- },
156
- {
157
- "label": "3 am",
158
- "value": "3m"
159
- },
160
- {
161
- "label": "4 am",
162
- "value": "4m"
163
- },
164
- {
165
- "label": "5 am",
166
- "value": "5m"
167
- },
168
- {
169
- "label": "6 am",
170
- "value": "6m"
171
- },
172
- {
173
- "label": "7 am",
174
- "value": "7m"
175
- },
176
- {
177
- "label": "8 am",
178
- "value": "8m"
179
- },
180
- {
181
- "label": "9 am",
182
- "value": "9m"
183
- },
184
- {
185
- "label": "10 am",
186
- "value": "10m"
187
- },
188
- {
189
- "label": "11 am",
190
- "value": "11m"
191
- },
192
- {
193
- "label": "12 pm",
194
- "value": "12pm"
195
- },
196
- {
197
- "label": "1 pm",
198
- "value": "1pm"
199
- },
200
- {
201
- "label": "2 pm",
202
- "value": "2pm"
203
- },
204
- {
205
- "label": "3 pm",
206
- "value": "3pm"
207
- },
208
- {
209
- "label": "4 pm",
210
- "value": "4pm"
211
- },
212
- {
213
- "label": "5 pm",
214
- "value": "5pm"
215
- },
216
- {
217
- "label": "6 pm",
218
- "value": "6pm"
219
- },
220
- {
221
- "label": "7 pm",
222
- "value": "7pm"
223
- },
224
- {
225
- "label": "8 pm",
226
- "value": "8pm"
227
- },
228
- {
229
- "label": "9 pm",
230
- "value": "9pm"
231
- },
232
- {
233
- "label": "10 pm",
234
- "value": "10pm"
235
- },
236
- {
237
- "label": "11 pm",
238
- "value": "11pm"
239
- }
240
- ],
241
- "required": true,
242
- "defaultValue": "7pm"
243
- },
244
-
245
34
  {
246
35
  "id": "titleEnabled",
247
36
  "label": "Título App",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vixoniccom/footbal-score",
3
3
  "alias": "Resultados Deportivos",
4
- "version": "1.4.6-dev.8",
4
+ "version": "1.5.1",
5
5
  "description": "Muestra resultados en vivo de fútbol.",
6
6
  "main": "main.js",
7
7
  "author": "",
package/src/App.tsx CHANGED
@@ -8,7 +8,7 @@ export type Props = {
8
8
  serviceError?: string
9
9
  }
10
10
 
11
- export const App: React.FunctionComponent<Props> = ({ appData, fixtures }) => {
11
+ export const App: React.FunctionComponent<Props> = ({ appData, fixtures, serviceError }) => {
12
12
  if (!appData) return null
13
13
 
14
14
  const { parameters, downloadsPath } = appData
@@ -76,7 +76,7 @@ export const App: React.FunctionComponent<Props> = ({ appData, fixtures }) => {
76
76
  }}>
77
77
  <FontLoader paths={['nameFormat.font', 'descriptionFormat.font', 'dateDayFormat.font', 'dateMonthFormat.font', 'formatMjs.font']} parameters={parameters} downloadsPath={downloadsPath} />
78
78
  <div style={{ display: 'flex', position: 'relative', flex: '1 1 0%', flexDirection: 'column' }}>
79
- <FormattedText text={msj0 || 'Sin partidos'} format={parameters.formatMjs} />
79
+ <FormattedText text={serviceError || msj0 || 'Sin partidos'} format={parameters.formatMjs} />
80
80
  </div>
81
81
  </div>
82
82
  }
@@ -72,7 +72,7 @@ export const Row: React.FunctionComponent<Props> = ({ item, parameters }) => {
72
72
  justifyContent: 'center'
73
73
  }}>
74
74
  <div style={{ display: 'flex', justifyContent: 'flex-end' }}>
75
- <Time time={moment.parseZone(fixture.date).unix()} parameters={parameters} />
75
+ <Time time={moment.parseZone(fixture.date).unix()} utcOffset={moment.parseZone(fixture.date).utcOffset()} parameters={parameters} />
76
76
  </div>
77
77
  <div style={{ display: 'flex', justifyContent: 'flex-end' }}>
78
78
  <Status status={fixture.status.short} parameters={parameters} />
@@ -1,22 +1,18 @@
1
1
  import moment from 'moment'
2
2
  import React from 'react'
3
3
  import { FormattedText } from '../../'
4
- import { resolvedTimezone } from '../../../helpers/getFixture'
5
4
 
6
5
  interface Props {
7
6
  time: number
7
+ utcOffset: number
8
8
  parameters: VixonicParameters
9
9
  }
10
10
 
11
- const MEXICO_TIMEZONES = ['America/Mexico_City', 'America/Cancun', 'America/Merida', 'America/Monterrey', 'America/Matamoros', 'America/Chihuahua', 'America/Ojinaga', 'America/Mazatlan', 'America/Hermosillo', 'America/Tijuana', 'America/Ensenada']
12
- const offset = MEXICO_TIMEZONES.includes(resolvedTimezone) ? -3600 : 0
13
-
14
- export const Time: React.FunctionComponent<Props> = ({ time, parameters }) => {
15
- const adjusted = time + offset
11
+ export const Time: React.FunctionComponent<Props> = ({ time, utcOffset, parameters }) => {
16
12
  return (
17
13
  <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center' }}>
18
- <FormattedText text={moment.unix(adjusted).format('DD-MM')} format={parameters.timeFormat} />
19
- <FormattedText text={moment.unix(adjusted).format('h:mm a')} format={parameters.timeFormat} />
14
+ <FormattedText text={moment.unix(time).utcOffset(utcOffset).format('DD-MM')} format={parameters.timeFormat} />
15
+ <FormattedText text={moment.unix(time).utcOffset(utcOffset).format('h:mm a')} format={parameters.timeFormat} />
20
16
  </div>
21
17
  )
22
18
  }
@@ -23,5 +23,7 @@ export class FootballLoader {
23
23
  this.onData?.(fixtures)
24
24
  }
25
25
 
26
- stop() {}
26
+ stop() {
27
+ // no-op: data is loaded synchronously from the Vixonic service on each update
28
+ }
27
29
  }
@@ -5,5 +5,5 @@ declare type VixonicData = {
5
5
  }
6
6
 
7
7
  declare type VixonicParameters = Partial<{
8
- footballService: { id: string }, matchesYesterday: boolean, matchesTomorrow: boolean, timeStart: '12m' | '1m' | '2m' | '3m' | '4m' | '5m' | '6m' | '7m' | '8m' | '9m' | '10m' | '11m' | '12pm' | '1pm' | '2pm' | '3pm' | '4pm' | '5pm' | '6pm' | '7pm' | '8pm' | '9pm' | '10pm' | '11pm', timeEnd: '12m' | '1m' | '2m' | '3m' | '4m' | '5m' | '6m' | '7m' | '8m' | '9m' | '10m' | '11m' | '12pm' | '1pm' | '2pm' | '3pm' | '4pm' | '5pm' | '6pm' | '7pm' | '8pm' | '9pm' | '10pm' | '11pm', titleEnabled: boolean, title0: string, titleFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, msj0: string, formatMjs: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, alignVerticalMsj: 'flex-start' | 'center' | 'flex-end', itemsPerPage: number, durationPerPage: number, backgroundImage: {id?: string, filename?: string, extension?: string}, padding: string, columnGap: string, rowGap: string, timeFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthTime: string, statusFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthStatus: string, goalsFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthScore: string, descriptionEnabled: boolean, descriptionFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthDescription: string, imageSize: number, widthImage: string
8
+ footballService: { id: string }, matchesYesterday: boolean, matchesTomorrow: boolean, titleEnabled: boolean, title0: string, titleFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, msj0: string, formatMjs: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, alignVerticalMsj: 'flex-start' | 'center' | 'flex-end', itemsPerPage: number, durationPerPage: number, backgroundImage: {id?: string, filename?: string, extension?: string}, padding: string, columnGap: string, rowGap: string, timeFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthTime: string, statusFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthStatus: string, goalsFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthScore: string, descriptionEnabled: boolean, descriptionFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthDescription: string, imageSize: number, widthImage: string
9
9
  }>
@@ -3,8 +3,6 @@
3
3
  "footballService": { "id": "f7e3a1b2-c4d5-6789-abcd-ef0123456789" },
4
4
  "league": 1,
5
5
  "debugTimezone" : false,
6
- "timeStart": "10 am",
7
- "timeEnd": "1 am",
8
6
  "matchesYesterday": false,
9
7
  "matchesTomorrow": false,
10
8
  "itemsPerPage": 2