@vixoniccom/menu-daily 0.1.1 → 0.1.2-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.
- package/CHANGELOG.md +15 -0
- package/build.zip +0 -0
- package/package.json +10 -10
- package/src/dataLoader.ts +4 -3
- package/src/scenes/components/Grid/Grid.tsx +2 -2
- package/src/scenes/components/Grid/GridItem.tsx +3 -3
- package/src/scenes/components/Grid/animation.ts +2 -3
- package/src/scenes/components/MealContainer/components/Title/index.tsx +2 -2
- package/src/scenes/components/MealContainer/index.tsx +2 -2
- package/src/test/parameters.json +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.2-dev.1](https://bitbucket.org/vixonic_dev/menu-daily/compare/v0.1.2-dev.0...v0.1.2-dev.1) (2025-02-13)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* data setter was reverted ([68ff315](https://bitbucket.org/vixonic_dev/menu-daily/commit/68ff3152251e80c502a35dc63ed40e1b6bff383c))
|
|
11
|
+
|
|
12
|
+
### [0.1.2-dev.0](https://bitbucket.org/vixonic_dev/menu-daily/compare/v0.1.1...v0.1.2-dev.0) (2025-02-13)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* animejs was upgrated to v3.2.2 ([71d15ab](https://bitbucket.org/vixonic_dev/menu-daily/commit/71d15abf17fec775e3783ca8c8b5ed997bf4f6f2))
|
|
18
|
+
* several packages were upgrated ([2e1cac4](https://bitbucket.org/vixonic_dev/menu-daily/commit/2e1cac4a23c55196d7e60411417c6393a234f7a8))
|
|
19
|
+
|
|
5
20
|
### 0.1.1 (2024-05-22)
|
|
6
21
|
|
|
7
22
|
|
package/build.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": {
|
|
11
11
|
"name": ""
|
|
12
12
|
},
|
|
13
|
-
"version": "0.1.1",
|
|
13
|
+
"version": "0.1.2-dev.1",
|
|
14
14
|
"scripts": {
|
|
15
15
|
"prepublish": "vixonic-module-packager --mode build",
|
|
16
16
|
"watch": "vixonic-module-packager --mode watch",
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"prerelease-dev": "standard-version --prerelease dev"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"
|
|
24
|
-
"@types/
|
|
25
|
-
"@types/react
|
|
26
|
-
"@
|
|
27
|
-
"
|
|
23
|
+
"standard-version": "^9.5.0",
|
|
24
|
+
"@types/node": "^14.18.63",
|
|
25
|
+
"@types/react": "^17.0.35",
|
|
26
|
+
"@types/react-dom": "^17.0.11",
|
|
27
|
+
"@vixoniccom/module-packager": "^2.10.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"animejs": "^2.
|
|
30
|
+
"animejs": "^3.2.2",
|
|
31
31
|
"localforage": "^1.5.0",
|
|
32
|
-
"react": "^
|
|
33
|
-
"react-dom": "^
|
|
34
|
-
"xlsx": "^0.
|
|
32
|
+
"react": "^17.0.2",
|
|
33
|
+
"react-dom": "^17.0.2",
|
|
34
|
+
"xlsx": "^0.17.5"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/src/dataLoader.ts
CHANGED
|
@@ -109,7 +109,7 @@ export class DataLoader {
|
|
|
109
109
|
let bstr = arr.join('')
|
|
110
110
|
|
|
111
111
|
/* Call XLSX */
|
|
112
|
-
let workbook = xlsx
|
|
112
|
+
let workbook = xlsx?.read(bstr, { type: 'binary' })
|
|
113
113
|
this._pollingTimer = window.setTimeout(() => { this.load() }, this._pollingInterval)
|
|
114
114
|
|
|
115
115
|
let menuData = this.parseData(workbook)
|
|
@@ -132,6 +132,7 @@ export class DataLoader {
|
|
|
132
132
|
|
|
133
133
|
private parseData (workbook: xlsx.WorkBook): MenuData | undefined {
|
|
134
134
|
try {
|
|
135
|
+
if (!workbook) return undefined
|
|
135
136
|
if (this._mealType) workbook.SheetNames.find((name) => name.toUpperCase() === this._mealType!.toUpperCase())
|
|
136
137
|
let menuData: MenuData = workbook.SheetNames.reduce((menu: MenuData, name) => {
|
|
137
138
|
let newMenu = {...menu}
|
|
@@ -149,10 +150,10 @@ export class DataLoader {
|
|
|
149
150
|
|
|
150
151
|
private parseSheet (sheet: xlsx.WorkSheet): MenuByDate | undefined {
|
|
151
152
|
if (!sheet) return undefined
|
|
152
|
-
let meals: MenuByDate | {} = xlsx
|
|
153
|
+
let meals: MenuByDate | {} = xlsx?.utils.sheet_to_json(sheet, {raw: true}).reduce((menu: MenuByDate, row: any) => {
|
|
153
154
|
let newMenu = {...menu}
|
|
154
155
|
let keys = Object.keys(row)
|
|
155
|
-
let date: {d: number, m: number, y: number} = xlsx
|
|
156
|
+
let date: {d: number, m: number, y: number} = xlsx?.SSF.parse_date_code(row[keys[0]] as any)
|
|
156
157
|
if (date.d && date.m && date.y) {
|
|
157
158
|
newMenu[new Date(date.y,date.m - 1,date.d).getTime()] = keys.slice(1).map((key) => {
|
|
158
159
|
return {
|
|
@@ -31,8 +31,8 @@ export type ContainerDataProps = {
|
|
|
31
31
|
class GridItem extends React.Component<GridItemProps, any> {
|
|
32
32
|
el: any
|
|
33
33
|
|
|
34
|
-
constructor () {
|
|
35
|
-
super()
|
|
34
|
+
constructor (props: GridItemProps) {
|
|
35
|
+
super(props)
|
|
36
36
|
this.state = {}
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -70,7 +70,7 @@ class GridItem extends React.Component<GridItemProps, any> {
|
|
|
70
70
|
return <div style={style}
|
|
71
71
|
ref={(el) => this.el = el}>
|
|
72
72
|
{
|
|
73
|
-
React.cloneElement<any, any>(props.children as
|
|
73
|
+
React.cloneElement<any, any>(props.children as any, props.containerData)
|
|
74
74
|
}
|
|
75
75
|
</div>
|
|
76
76
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const anime: any = require('animejs').default
|
|
2
2
|
|
|
3
3
|
// Predefined animation modes.
|
|
4
4
|
const animationModes: {[mode: string]: any} = {
|
|
@@ -93,11 +93,10 @@ class Animation {
|
|
|
93
93
|
delay: function (_el: any, _i: any, _l: any) {
|
|
94
94
|
return _i * self.stagger
|
|
95
95
|
},
|
|
96
|
-
offset: `+=${offset}`,
|
|
97
96
|
complete: () => {
|
|
98
97
|
finished()
|
|
99
98
|
}
|
|
100
|
-
}, this.mode.out))
|
|
99
|
+
}, this.mode.out), `+=${offset}`)
|
|
101
100
|
animation.play()
|
|
102
101
|
}
|
|
103
102
|
}
|
package/src/test/parameters.json
CHANGED
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"pollingInterval": 300000,
|
|
34
|
-
"url":"
|
|
35
|
-
"url2":"https://docs.google.com/spreadsheets/d/e/2PACX-1vRTuTsKdqpLH2zqKXURYTu_xpc5arXljE0W8KfnPJVy5U_J1HGD30C5YfVrWjUFAz5W9JiTC4VGVBYN/pub?output=xlsx"
|
|
34
|
+
"url":"https://docs.google.com/spreadsheets/d/e/2PACX-1vRNutB0GG-4deRCMFk5R3mGWWHS3ctoVZOjS7ZzK4Z3wFfozYYLet4TYXiArJ-8eeWwqQtgP3StDkkF/pub?output=xlsx"
|
|
36
35
|
}
|
|
37
36
|
}
|