muffin-admin 6.0.1 → 6.1.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.
@@ -9,13 +9,14 @@ import TableCell from "@mui/material/TableCell";
9
9
  import TableRow from "@mui/material/TableRow";
10
10
  import Typography from "@mui/material/Typography";
11
11
  import { useTranslate } from "react-admin";
12
+ import { VERSION } from ".";
12
13
  import { HelpLink } from "./common/HelpLink";
13
14
  import { useMuffinAdminOpts } from "./hooks";
14
15
  import { buildAdmin, setupAdmin } from "./utils";
15
16
  export function MuffinDashboard() {
16
17
  const { dashboard, help } = useMuffinAdminOpts();
17
18
  const translate = useTranslate();
18
- return (_jsxs(Stack, { gap: 2, pt: 1, children: [_jsxs(Stack, { direction: "row", flexWrap: "wrap", gap: 1, children: [help && _jsx(HelpLink, { href: help, label: translate("muffin.how_to_use_admin") }), buildAdmin(["dashboard-actions"])] }), _jsxs(Grid, { container: true, spacing: 1, children: [buildAdmin(["dashboard-content"]), _jsx(AdminCards, { src: dashboard })] })] }));
19
+ return (_jsxs(Stack, { gap: 2, pt: 1, children: [_jsxs(Stack, { direction: "row", flexWrap: "wrap", gap: 1, children: [help && _jsx(HelpLink, { href: help, label: translate("muffin.how_to_use_admin") }), buildAdmin(["dashboard-actions"])] }), _jsxs(Grid, { container: true, spacing: 1, children: [buildAdmin(["dashboard-content"]), _jsx(AdminCards, { src: dashboard })] }), VERSION && (_jsxs(Typography, { variant: "body2", color: "textSecondary", align: "center", my: 1, children: ["Muffin Admin v.", VERSION] }))] }));
19
20
  }
20
21
  setupAdmin(["dashboard"], MuffinDashboard);
21
22
  function AdminCards({ src }) {
package/dist/index.d.ts CHANGED
@@ -17,3 +17,4 @@ export * from "./fields";
17
17
  export * from "./hooks";
18
18
  export * from "./types";
19
19
  export declare function initAdmin(prefix?: string, containerId?: string): Promise<void>;
20
+ export declare const VERSION: string;
package/dist/index.js CHANGED
@@ -40,3 +40,4 @@ export function initAdmin() {
40
40
  root.render(_jsx(MuffinAdminContext.Provider, { value: adminOpts, children: _jsx(MuffinAdmin, {}) }));
41
41
  });
42
42
  }
43
+ export const VERSION = process === null || process === void 0 ? void 0 : process.env.MUFFIN_ADMIN_VERSION;