muffin-admin 3.9.0 → 3.10.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/dist/MuffinDashboard.js +6 -2
- package/dist/MuffinResourceList.js +1 -1
- package/dist/i18n/en.d.ts +1 -0
- package/dist/i18n/en.js +1 -0
- package/dist/i18n/ru.d.ts +1 -0
- package/dist/i18n/ru.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/MuffinDashboard.tsx +17 -4
- package/src/MuffinResourceList.tsx +1 -1
- package/src/i18n/en.ts +1 -0
- package/src/i18n/ru.ts +1 -0
- package/src/types.ts +7 -6
package/dist/MuffinDashboard.js
CHANGED
|
@@ -2,16 +2,20 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import Card from "@mui/material/Card";
|
|
3
3
|
import CardContent from "@mui/material/CardContent";
|
|
4
4
|
import Grid from "@mui/material/Grid";
|
|
5
|
+
import Stack from "@mui/material/Stack";
|
|
5
6
|
import Table from "@mui/material/Table";
|
|
6
7
|
import TableBody from "@mui/material/TableBody";
|
|
7
8
|
import TableCell from "@mui/material/TableCell";
|
|
8
9
|
import TableRow from "@mui/material/TableRow";
|
|
9
10
|
import Typography from "@mui/material/Typography";
|
|
11
|
+
import { useTranslate } from "react-admin";
|
|
12
|
+
import { HelpLink } from "./common/HelpLink";
|
|
10
13
|
import { useMuffinAdminOpts } from "./hooks";
|
|
11
14
|
import { setupAdmin } from "./utils";
|
|
12
15
|
export function MuffinDashboard() {
|
|
13
|
-
const { dashboard } = useMuffinAdminOpts();
|
|
14
|
-
|
|
16
|
+
const { dashboard, help } = useMuffinAdminOpts();
|
|
17
|
+
const translate = useTranslate();
|
|
18
|
+
return (_jsxs(Stack, { gap: 2, children: [help && (_jsx(Card, { children: _jsx(CardContent, { children: _jsx(HelpLink, { size: "large", href: help, label: translate("muffin.how_to_use_admin") }) }) })), _jsx(Grid, { container: true, spacing: 1, children: _jsx(AdminCards, { src: dashboard }) })] }));
|
|
15
19
|
}
|
|
16
20
|
setupAdmin(["dashboard"], MuffinDashboard);
|
|
17
21
|
function AdminCards({ src }) {
|
|
@@ -35,7 +35,7 @@ setupAdmin(["list-grid-buttons"], MuffinListGridButtons);
|
|
|
35
35
|
function MuffinListToolbar() {
|
|
36
36
|
const { actions: baseActions = [], help, list: { create }, } = useMuffinResourceOpts();
|
|
37
37
|
const actions = baseActions.filter((a) => a.view.includes("list"));
|
|
38
|
-
return (_jsxs(TopToolbar, { children: [
|
|
38
|
+
return (_jsxs(TopToolbar, { children: [help && _jsx(HelpLink, { href: help }), _jsx(SelectColumnsButton, {}), _jsx(FilterButton, {}), actions.length ? actions.map((props) => _jsx(ActionButton, Object.assign({}, props), props.id)) : null, create && _jsx(CreateButton, {}), _jsx(ExportButton, {})] }));
|
|
39
39
|
}
|
|
40
40
|
setupAdmin(["list-toolbar"], MuffinListToolbar);
|
|
41
41
|
function MuffinListBulkActions() {
|
package/dist/i18n/en.d.ts
CHANGED
package/dist/i18n/en.js
CHANGED
package/dist/i18n/ru.d.ts
CHANGED