@etsoo/toolpad 1.0.45 → 1.0.48
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/build/cjs/Account/AccountPreview.js +1 -1
- package/build/cjs/DashboardLayout/TitleBar.js +1 -1
- package/build/cjs/shared/components.js +1 -1
- package/build/cjs/utils/events.js +1 -3
- package/build/mjs/Account/AccountPreview.js +1 -1
- package/build/mjs/DashboardLayout/TitleBar.js +1 -1
- package/build/mjs/shared/components.js +1 -1
- package/build/mjs/utils/events.js +1 -3
- package/package.json +17 -17
- package/src/Account/AccountPreview.tsx +3 -4
- package/src/DashboardLayout/TitleBar.tsx +1 -1
- package/src/shared/components.tsx +1 -1
- package/tsconfig.cjs.json +2 -1
- package/tsconfig.json +3 -2
|
@@ -89,7 +89,7 @@ function AccountPreview(props) {
|
|
|
89
89
|
width: variant === "expanded" ? 48 : 32
|
|
90
90
|
}, ...slotProps?.avatar, children: session.user?.image ? null : formatNameInitials(session.user) }));
|
|
91
91
|
if (variant === "expanded") {
|
|
92
|
-
return ((0, jsx_runtime_1.jsxs)(Stack_1.default, { direction: "row",
|
|
92
|
+
return ((0, jsx_runtime_1.jsxs)(Stack_1.default, { direction: "row", spacing: 2, sx: { padding: 2, justifyContent: "flex-start" }, children: [avatarContent, (0, jsx_runtime_1.jsxs)(Stack_1.default, { direction: "column", sx: { justifyContent: "space-evenly" }, children: [(0, jsx_runtime_1.jsx)(Typography_1.default, { variant: "body2", noWrap: true, sx: { fontWeight: "bolder" }, children: session.user?.name }), (0, jsx_runtime_1.jsx)(Typography_1.default, { variant: "caption", noWrap: true, children: session.user?.email })] }), handleClick &&
|
|
93
93
|
(slots?.moreIconButton ? ((0, jsx_runtime_1.jsx)(slots.moreIconButton, {})) : ((0, jsx_runtime_1.jsx)(IconButton_1.default, { size: "small", onClick: handleClick, ...slotProps?.moreIconButton, sx: { alignSelf: "flex-start", ...slotProps?.moreIconButton?.sx }, children: (0, jsx_runtime_1.jsx)(MoreVert_1.default, { fontSize: "small" }) })))] }));
|
|
94
94
|
}
|
|
95
95
|
return ((0, jsx_runtime_1.jsx)(Tooltip_1.default, { title: session.user.name ?? "Account", children: slots?.avatarIconButton ? ((0, jsx_runtime_1.jsx)(slots.avatarIconButton, {})) : ((0, jsx_runtime_1.jsx)(IconButton_1.default, { onClick: handleClick, "aria-label": localeText.accountIconButtonAriaLabel, size: "small", "aria-controls": open ? "account-menu" : undefined, "aria-haspopup": "true", "aria-expanded": open ? "true" : undefined, ...slotProps?.avatarIconButton, children: avatarContent })) }));
|
|
@@ -51,7 +51,7 @@ function TitleBar() {
|
|
|
51
51
|
return [title, false];
|
|
52
52
|
}, [title]);
|
|
53
53
|
if (hasLink) {
|
|
54
|
-
return ((0, jsx_runtime_1.jsx)(Link_1.Link, { href: "/", style: { color: "inherit", textDecoration: "none" }, children: (0, jsx_runtime_1.jsxs)(Stack_1.default, { direction: "row", alignItems: "center", children: [branding?.logo && (0, jsx_runtime_1.jsx)(LogoContainer, { children: branding.logo }), titleUI] }) }));
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)(Link_1.Link, { href: "/", style: { color: "inherit", textDecoration: "none" }, children: (0, jsx_runtime_1.jsxs)(Stack_1.default, { direction: "row", sx: { alignItems: "center" }, children: [branding?.logo && (0, jsx_runtime_1.jsx)(LogoContainer, { children: branding.logo }), titleUI] }) }));
|
|
55
55
|
}
|
|
56
56
|
else {
|
|
57
57
|
return titleUI;
|
|
@@ -25,7 +25,7 @@ function ErrorOverlay({ error }) {
|
|
|
25
25
|
flexDirection: "row",
|
|
26
26
|
gap: 1,
|
|
27
27
|
alignItems: "center"
|
|
28
|
-
}, children: [(0, jsx_runtime_1.jsx)(Error_1.default, { color: "error" }), " Error"] }), (0, jsx_runtime_1.jsx)(Typography_1.default, {
|
|
28
|
+
}, children: [(0, jsx_runtime_1.jsx)(Error_1.default, { color: "error" }), " Error"] }), (0, jsx_runtime_1.jsx)(Typography_1.default, { align: "center", children: error?.message ?? "Unknown error" })] }));
|
|
29
29
|
}
|
|
30
30
|
function LoadingOverlay() {
|
|
31
31
|
return ((0, jsx_runtime_1.jsx)(OverlayRoot, { children: (0, jsx_runtime_1.jsx)(CircularProgress_1.default, {}) }));
|
|
@@ -50,7 +50,7 @@ function AccountPreview(props) {
|
|
|
50
50
|
width: variant === "expanded" ? 48 : 32
|
|
51
51
|
}, ...slotProps?.avatar, children: session.user?.image ? null : formatNameInitials(session.user) }));
|
|
52
52
|
if (variant === "expanded") {
|
|
53
|
-
return (_jsxs(Stack, { direction: "row",
|
|
53
|
+
return (_jsxs(Stack, { direction: "row", spacing: 2, sx: { padding: 2, justifyContent: "flex-start" }, children: [avatarContent, _jsxs(Stack, { direction: "column", sx: { justifyContent: "space-evenly" }, children: [_jsx(Typography, { variant: "body2", noWrap: true, sx: { fontWeight: "bolder" }, children: session.user?.name }), _jsx(Typography, { variant: "caption", noWrap: true, children: session.user?.email })] }), handleClick &&
|
|
54
54
|
(slots?.moreIconButton ? (_jsx(slots.moreIconButton, {})) : (_jsx(IconButton, { size: "small", onClick: handleClick, ...slotProps?.moreIconButton, sx: { alignSelf: "flex-start", ...slotProps?.moreIconButton?.sx }, children: _jsx(MoreVertIcon, { fontSize: "small" }) })))] }));
|
|
55
55
|
}
|
|
56
56
|
return (_jsx(Tooltip, { title: session.user.name ?? "Account", children: slots?.avatarIconButton ? (_jsx(slots.avatarIconButton, {})) : (_jsx(IconButton, { onClick: handleClick, "aria-label": localeText.accountIconButtonAriaLabel, size: "small", "aria-controls": open ? "account-menu" : undefined, "aria-haspopup": "true", "aria-expanded": open ? "true" : undefined, ...slotProps?.avatarIconButton, children: avatarContent })) }));
|
|
@@ -45,7 +45,7 @@ export function TitleBar() {
|
|
|
45
45
|
return [title, false];
|
|
46
46
|
}, [title]);
|
|
47
47
|
if (hasLink) {
|
|
48
|
-
return (_jsx(Link, { href: "/", style: { color: "inherit", textDecoration: "none" }, children: _jsxs(Stack, { direction: "row", alignItems: "center", children: [branding?.logo && _jsx(LogoContainer, { children: branding.logo }), titleUI] }) }));
|
|
48
|
+
return (_jsx(Link, { href: "/", style: { color: "inherit", textDecoration: "none" }, children: _jsxs(Stack, { direction: "row", sx: { alignItems: "center" }, children: [branding?.logo && _jsx(LogoContainer, { children: branding.logo }), titleUI] }) }));
|
|
49
49
|
}
|
|
50
50
|
else {
|
|
51
51
|
return titleUI;
|
|
@@ -18,7 +18,7 @@ export function ErrorOverlay({ error }) {
|
|
|
18
18
|
flexDirection: "row",
|
|
19
19
|
gap: 1,
|
|
20
20
|
alignItems: "center"
|
|
21
|
-
}, children: [_jsx(ErrorIcon, { color: "error" }), " Error"] }), _jsx(Typography, {
|
|
21
|
+
}, children: [_jsx(ErrorIcon, { color: "error" }), " Error"] }), _jsx(Typography, { align: "center", children: error?.message ?? "Unknown error" })] }));
|
|
22
22
|
}
|
|
23
23
|
export function LoadingOverlay() {
|
|
24
24
|
return (_jsx(OverlayRoot, { children: _jsx(CircularProgress, {}) }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/toolpad",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"author": "ETSOO",
|
|
5
5
|
"description": "Dashboard framework extention based on Toolpad Core",
|
|
6
6
|
"main": "build/cjs/index.js",
|
|
@@ -47,35 +47,35 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@emotion/react": "^11.14.0",
|
|
49
49
|
"@emotion/styled": "^11.14.1",
|
|
50
|
-
"@mui/icons-material": "
|
|
51
|
-
"@mui/material": "
|
|
52
|
-
"@mui/utils": "
|
|
50
|
+
"@mui/icons-material": "9.0.0",
|
|
51
|
+
"@mui/material": "9.0.0",
|
|
52
|
+
"@mui/utils": "9.0.0",
|
|
53
53
|
"invariant": "2.2.4",
|
|
54
54
|
"path-to-regexp": "^6.3.0",
|
|
55
|
-
"react": "^19.2.
|
|
56
|
-
"react-dom": "^19.2.
|
|
55
|
+
"react": "^19.2.5",
|
|
56
|
+
"react-dom": "^19.2.5"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@babel/core": "^7.29.0",
|
|
60
60
|
"@babel/plugin-transform-runtime": "^7.29.0",
|
|
61
|
-
"@babel/preset-env": "^7.29.
|
|
62
|
-
"@babel/runtime-corejs3": "^7.29.
|
|
61
|
+
"@babel/preset-env": "^7.29.2",
|
|
62
|
+
"@babel/runtime-corejs3": "^7.29.2",
|
|
63
63
|
"@testing-library/jest-dom": "^6.9.1",
|
|
64
64
|
"@testing-library/react": "^16.3.2",
|
|
65
65
|
"@testing-library/user-event": "^14.6.1",
|
|
66
66
|
"@types/invariant": "2.2.37",
|
|
67
|
-
"@types/node": "^25.
|
|
67
|
+
"@types/node": "^25.6.0",
|
|
68
68
|
"@types/react": "19.2.14",
|
|
69
69
|
"@types/react-dom": "19.2.3",
|
|
70
|
-
"@vitejs/plugin-react": "
|
|
71
|
-
"@vitest/browser": "4.
|
|
72
|
-
"@vitest/browser-playwright": "^4.
|
|
73
|
-
"jsdom": "^
|
|
74
|
-
"next": "^16.
|
|
70
|
+
"@vitejs/plugin-react": "6.0.1",
|
|
71
|
+
"@vitest/browser": "4.1.4",
|
|
72
|
+
"@vitest/browser-playwright": "^4.1.4",
|
|
73
|
+
"jsdom": "^29.0.2",
|
|
74
|
+
"next": "^16.2.3",
|
|
75
75
|
"next-router-mock": "^1.0.5",
|
|
76
|
-
"playwright": "^1.
|
|
77
|
-
"react-router-dom": "^7.
|
|
78
|
-
"vitest": "4.
|
|
76
|
+
"playwright": "^1.59.1",
|
|
77
|
+
"react-router-dom": "^7.14.0",
|
|
78
|
+
"vitest": "4.1.4"
|
|
79
79
|
},
|
|
80
80
|
"peerDependenciesMeta": {
|
|
81
81
|
"next": {
|
|
@@ -120,13 +120,12 @@ function AccountPreview(props: AccountPreviewProps) {
|
|
|
120
120
|
return (
|
|
121
121
|
<Stack
|
|
122
122
|
direction="row"
|
|
123
|
-
justifyContent="flex-start"
|
|
124
123
|
spacing={2}
|
|
125
|
-
|
|
124
|
+
sx={{ padding: 2, justifyContent: "flex-start" }}
|
|
126
125
|
>
|
|
127
126
|
{avatarContent}
|
|
128
|
-
<Stack direction="column" justifyContent
|
|
129
|
-
<Typography variant="body2" fontWeight
|
|
127
|
+
<Stack direction="column" sx={{ justifyContent: "space-evenly" }}>
|
|
128
|
+
<Typography variant="body2" noWrap sx={{ fontWeight: "bolder" }}>
|
|
130
129
|
{session.user?.name}
|
|
131
130
|
</Typography>
|
|
132
131
|
<Typography variant="caption" noWrap>
|
|
@@ -59,7 +59,7 @@ export function TitleBar() {
|
|
|
59
59
|
if (hasLink) {
|
|
60
60
|
return (
|
|
61
61
|
<Link href="/" style={{ color: "inherit", textDecoration: "none" }}>
|
|
62
|
-
<Stack direction="row" alignItems
|
|
62
|
+
<Stack direction="row" sx={{ alignItems: "center" }}>
|
|
63
63
|
{branding?.logo && <LogoContainer>{branding.logo}</LogoContainer>}
|
|
64
64
|
{titleUI}
|
|
65
65
|
</Stack>
|
|
@@ -31,7 +31,7 @@ export function ErrorOverlay({ error }: ErrorOverlayProps) {
|
|
|
31
31
|
>
|
|
32
32
|
<ErrorIcon color="error" /> Error
|
|
33
33
|
</Typography>
|
|
34
|
-
<Typography
|
|
34
|
+
<Typography align="center">
|
|
35
35
|
{(error as any)?.message ?? "Unknown error"}
|
|
36
36
|
</Typography>
|
|
37
37
|
</OverlayRoot>
|
package/tsconfig.cjs.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
-
"target": "
|
|
4
|
+
"target": "ES2022",
|
|
5
5
|
"allowJs": false,
|
|
6
6
|
"module": "NodeNext",
|
|
7
7
|
"moduleResolution": "NodeNext",
|
|
8
8
|
"resolveJsonModule": true,
|
|
9
9
|
"isolatedModules": true,
|
|
10
|
+
"rootDir": "./src",
|
|
10
11
|
"outDir": "./build/cjs",
|
|
11
12
|
"noEmit": false,
|
|
12
13
|
"declaration": true,
|
package/tsconfig.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
-
"target": "
|
|
5
|
-
"module": "
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"module": "ESNext",
|
|
6
6
|
"moduleResolution": "bundler",
|
|
7
7
|
"isolatedModules": true,
|
|
8
|
+
"rootDir": "./src",
|
|
8
9
|
"outDir": "./build/mjs",
|
|
9
10
|
"noEmit": false,
|
|
10
11
|
"declaration": true,
|