@vixoniccom/menu-daily 0.1.2-dev.1 → 0.2.0-dev.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 (43) hide show
  1. package/.claude/settings.local.json +31 -0
  2. package/.github/workflows/npm-publish.yml +103 -0
  3. package/.github/workflows/sonarqube.yml +30 -0
  4. package/.vscode/settings.json +3 -0
  5. package/CHANGELOG.md +21 -0
  6. package/build/index.html +1 -0
  7. package/build/main.js +2 -0
  8. package/build/main.js.LICENSE.txt +39 -0
  9. package/build/test/downloads/1234.ttf +0 -0
  10. package/build/test/downloads/background.jpg +0 -0
  11. package/build/test/downloads/futura-font.ttf +0 -0
  12. package/build/test/parameters.json +38 -0
  13. package/build/test/services.json +871 -0
  14. package/build.zip +0 -0
  15. package/configuration/appearanceGroup/AppearanceInputs.ts +94 -0
  16. package/configuration/appearanceGroup/index.ts +8 -0
  17. package/configuration/dataGroup/DataInputs.ts +21 -0
  18. package/configuration/dataGroup/index.ts +8 -0
  19. package/configuration/index.ts +7 -0
  20. package/configuration.json +43 -78
  21. package/package.json +13 -12
  22. package/sonar-project.properties +1 -0
  23. package/src/global.d.ts +15 -51
  24. package/src/index.html +33 -33
  25. package/src/logger.ts +2 -2
  26. package/src/main.ts +8 -13
  27. package/src/parameters.d.ts +31 -0
  28. package/src/scenes/App.tsx +25 -38
  29. package/src/scenes/components/FontLoader.tsx +3 -16
  30. package/src/scenes/components/FormattedText.tsx +3 -4
  31. package/src/scenes/components/Grid/Grid.tsx +8 -8
  32. package/src/scenes/components/Grid/GridItem.tsx +1 -0
  33. package/src/scenes/components/Grid/animation.ts +69 -55
  34. package/src/scenes/components/MealContainer/components/OptionItem.tsx +1 -2
  35. package/src/scenes/components/MealContainer/components/Title/index.tsx +17 -20
  36. package/src/scenes/components/MealContainer/components/Title/styles/Framed.tsx +19 -28
  37. package/src/scenes/components/MealContainer/components/Title/styles/Modern.tsx +15 -24
  38. package/src/scenes/components/MealContainer/components/Title/styles/index.tsx +25 -1
  39. package/src/scenes/components/MealContainer/index.tsx +31 -31
  40. package/src/test/parameters.json +7 -5
  41. package/src/test/services.json +871 -0
  42. package/tsconfig.json +9 -17
  43. package/src/dataLoader.ts +0 -169
@@ -9,17 +9,17 @@ type Props = {
9
9
  }
10
10
 
11
11
  export default class MealContainer extends React.Component<Props, any> {
12
- constructor (props: Props) {
13
- super (props)
12
+ constructor(props: Props) {
13
+ super(props)
14
14
  this.state = {}
15
15
  }
16
16
 
17
- render () {
18
- let { data, interval, vixonicData } = this.props
19
- let { parameters } = vixonicData
20
- let rows = parameters.itemGridRows || 1
21
- let pages = Math.ceil(data.options.length / rows)
22
- let cycle = parameters.itemAnimationDuration && parameters.itemAnimationDuration * 1000 || (interval / pages)
17
+ render() {
18
+ const { data, interval, vixonicData } = this.props
19
+ const { parameters } = vixonicData
20
+ const rows = parameters.itemGridRows || 1
21
+ const pages = Math.ceil(data.options.length / rows)
22
+ const cycle = parameters.itemAnimationDuration ? parameters.itemAnimationDuration * 1000 : interval / pages
23
23
  return <div style={{
24
24
  display: 'flex',
25
25
  flexDirection: 'column',
@@ -30,29 +30,29 @@ export default class MealContainer extends React.Component<Props, any> {
30
30
  <Title
31
31
  text={data.type}
32
32
  vixonicData={vixonicData}
33
- getPadding={(padding) => this.setState({padding})} />
34
- { data && data.options &&
35
- <Grid
36
- style={{
37
- flex: 1,
38
- padding: parameters.itemGridMargins || this.state.padding
39
- }}
40
- fontSize='inherit'
41
- id={data.type}
42
- items={data.options.map((option) => (<OptionItem data={option} vixonicData={vixonicData} />))}
43
- animate={true}
44
- animation={{
45
- mode: parameters.animationMode || 'fade',
46
- duration: cycle
47
- }}
48
- layout={{
49
- columns: 1,
50
- rows,
51
- alignment: {
52
- h: 'start',
53
- v: 'center'
54
- }
55
- }} />
33
+ getPadding={(padding) => this.setState({ padding })} />
34
+ {data?.options &&
35
+ <Grid
36
+ style={{
37
+ flex: 1,
38
+ padding: parameters.itemGridMargins || this.state.padding
39
+ }}
40
+ fontSize='inherit'
41
+ id={data.type}
42
+ items={data.options.map((option) => (<OptionItem key={option} data={option} vixonicData={vixonicData} />))}
43
+ animate={true}
44
+ animation={{
45
+ mode: parameters.animationMode || 'fade',
46
+ duration: cycle
47
+ }}
48
+ layout={{
49
+ columns: 1,
50
+ rows,
51
+ alignment: {
52
+ h: 'start',
53
+ v: 'center'
54
+ }
55
+ }} />
56
56
  }
57
57
  </div>
58
58
  }
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "parameters":{
3
- "animationDuration":10,
3
+ "animationDuration":3,
4
4
  "animationMode":"fade",
5
5
  "backgroundImage":{
6
6
  "filename":"background.jpg"
7
7
  },
8
- "containerGridMargins":"110px 30px 30px 30px",
8
+ "containerGridMargins":"110px 50px 30px 40px",
9
9
  "containerGridRows":2,
10
10
  "containerGridRowsGap":5,
11
11
  "itemGridRows":3,
@@ -30,7 +30,9 @@
30
30
  "filename": "bold-font.ttf"
31
31
  }
32
32
  },
33
- "pollingInterval": 300000,
34
- "url":"https://docs.google.com/spreadsheets/d/e/2PACX-1vRNutB0GG-4deRCMFk5R3mGWWHS3ctoVZOjS7ZzK4Z3wFfozYYLet4TYXiArJ-8eeWwqQtgP3StDkkF/pub?output=xlsx"
33
+ "msj0": "Sin menú",
34
+ "menuService": {
35
+ "id": "38c3df7c-fb9e-e5a5-489a-d6e31048c2d3"
36
+ }
35
37
  }
36
- }
38
+ }