@etsoo/materialui 1.2.60 → 1.2.62
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/lib/pages/ViewPage.d.ts +1 -1
- package/lib/pages/ViewPage.js +1 -1
- package/package.json +11 -11
- package/src/pages/ViewPage.tsx +2 -2
package/lib/pages/ViewPage.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ type ViewPageFieldTypeNarrow<T extends object> = (string & keyof T) | [string &
|
|
|
36
36
|
/**
|
|
37
37
|
* View page field type
|
|
38
38
|
*/
|
|
39
|
-
export type ViewPageFieldType<T extends object> = ViewPageFieldTypeNarrow<T> | ((data: T) => React.ReactNode);
|
|
39
|
+
export type ViewPageFieldType<T extends object> = ViewPageFieldTypeNarrow<T> | ((data: T, refresh: () => Promise<void>) => React.ReactNode);
|
|
40
40
|
/**
|
|
41
41
|
* View page props
|
|
42
42
|
*/
|
package/lib/pages/ViewPage.js
CHANGED
|
@@ -107,7 +107,7 @@ export function ViewPage(props) {
|
|
|
107
107
|
// Get data
|
|
108
108
|
if (typeof field === "function") {
|
|
109
109
|
// Most flexible way, do whatever you want
|
|
110
|
-
return field(data);
|
|
110
|
+
return field(data, refresh);
|
|
111
111
|
}
|
|
112
112
|
const [itemData, itemLabel, gridProps] = getItemField(field, data);
|
|
113
113
|
// Some callback function may return '' instead of undefined
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.62",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -47,21 +47,21 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@dnd-kit/core": "^6.0.8",
|
|
49
49
|
"@dnd-kit/sortable": "^7.0.2",
|
|
50
|
-
"@emotion/css": "^11.11.
|
|
50
|
+
"@emotion/css": "^11.11.2",
|
|
51
51
|
"@emotion/react": "^11.11.1",
|
|
52
52
|
"@emotion/styled": "^11.11.0",
|
|
53
|
-
"@etsoo/appscript": "^1.4.
|
|
53
|
+
"@etsoo/appscript": "^1.4.21",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.25",
|
|
55
|
-
"@etsoo/react": "^1.6.
|
|
56
|
-
"@etsoo/shared": "^1.2.
|
|
55
|
+
"@etsoo/react": "^1.6.94",
|
|
56
|
+
"@etsoo/shared": "^1.2.7",
|
|
57
57
|
"@mui/icons-material": "^5.11.16",
|
|
58
58
|
"@mui/material": "^5.13.5",
|
|
59
|
-
"@mui/x-data-grid": "^6.
|
|
59
|
+
"@mui/x-data-grid": "^6.9.0",
|
|
60
60
|
"@types/pica": "^9.0.1",
|
|
61
61
|
"@types/pulltorefreshjs": "^0.1.5",
|
|
62
|
-
"@types/react": "^18.2.
|
|
62
|
+
"@types/react": "^18.2.13",
|
|
63
63
|
"@types/react-avatar-editor": "^13.0.0",
|
|
64
|
-
"@types/react-dom": "^18.2.
|
|
64
|
+
"@types/react-dom": "^18.2.6",
|
|
65
65
|
"@types/react-input-mask": "^3.0.2",
|
|
66
66
|
"chart.js": "^4.3.0",
|
|
67
67
|
"chartjs-plugin-datalabels": "^2.2.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"react-chartjs-2": "^5.2.0",
|
|
73
73
|
"react-dom": "^18.2.0",
|
|
74
74
|
"react-draggable": "^4.4.5",
|
|
75
|
-
"react-imask": "
|
|
75
|
+
"react-imask": "6.6.3"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@babel/cli": "^7.22.5",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"@testing-library/jest-dom": "^5.16.5",
|
|
86
86
|
"@testing-library/react": "^14.0.0",
|
|
87
87
|
"@types/jest": "^29.5.2",
|
|
88
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
89
|
-
"@typescript-eslint/parser": "^5.
|
|
88
|
+
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
|
89
|
+
"@typescript-eslint/parser": "^5.60.0",
|
|
90
90
|
"jest": "^29.5.0",
|
|
91
91
|
"jest-environment-jsdom": "^29.5.0",
|
|
92
92
|
"typescript": "^5.1.3"
|
package/src/pages/ViewPage.tsx
CHANGED
|
@@ -65,7 +65,7 @@ type ViewPageFieldTypeNarrow<T extends object> =
|
|
|
65
65
|
*/
|
|
66
66
|
export type ViewPageFieldType<T extends object> =
|
|
67
67
|
| ViewPageFieldTypeNarrow<T>
|
|
68
|
-
| ((data: T) => React.ReactNode);
|
|
68
|
+
| ((data: T, refresh: () => Promise<void>) => React.ReactNode);
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* View page props
|
|
@@ -276,7 +276,7 @@ export function ViewPage<T extends DataTypes.StringRecord>(
|
|
|
276
276
|
// Get data
|
|
277
277
|
if (typeof field === "function") {
|
|
278
278
|
// Most flexible way, do whatever you want
|
|
279
|
-
return field(data);
|
|
279
|
+
return field(data, refresh);
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
const [itemData, itemLabel, gridProps] = getItemField(
|