bananas-commerce-admin 0.1.0
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/README.md +25 -0
- package/dist/cjs/Admin.js +47 -0
- package/dist/cjs/App.js +49 -0
- package/dist/cjs/api.js +225 -0
- package/dist/cjs/components/Branding.js +41 -0
- package/dist/cjs/components/Hamburger.js +40 -0
- package/dist/cjs/components/Link.js +21 -0
- package/dist/cjs/components/Logo.js +25 -0
- package/dist/cjs/components/NavBar.js +101 -0
- package/dist/cjs/components/NavBarItem.js +42 -0
- package/dist/cjs/components/NavBarRoutes.js +47 -0
- package/dist/cjs/components/ProgressBar.js +14 -0
- package/dist/cjs/components/User.js +71 -0
- package/dist/cjs/containers/Content.js +16 -0
- package/dist/cjs/containers/ErrorScreen.js +35 -0
- package/dist/cjs/containers/LoadingScreen.js +84 -0
- package/dist/cjs/containers/PageErrorBoundary.js +43 -0
- package/dist/cjs/containers/PageLoader.js +123 -0
- package/dist/cjs/contexts/ApiContext.js +105 -0
- package/dist/cjs/contexts/I18nContext.js +109 -0
- package/dist/cjs/contexts/RouterContext.js +99 -0
- package/dist/cjs/contexts/UserContext.js +144 -0
- package/dist/cjs/extensions/bananas/components/PasswordChangeForm.js +85 -0
- package/dist/cjs/extensions/bananas/index.js +54 -0
- package/dist/cjs/extensions/bananas/pages/me/list.js +20 -0
- package/dist/cjs/extensions/pos/components/PurchaseRow.js +32 -0
- package/dist/cjs/extensions/pos/components/ReceiptCard.js +86 -0
- package/dist/cjs/extensions/pos/components/ReceiptLine.js +29 -0
- package/dist/cjs/extensions/pos/index.js +22 -0
- package/dist/cjs/extensions/pos/pages/purchase/detail.js +13 -0
- package/dist/cjs/extensions/pos/pages/purchase/list.js +34 -0
- package/dist/cjs/extensions/pos/types/purchase.js +2 -0
- package/dist/cjs/extensions/pos/types/receipt.js +2 -0
- package/dist/cjs/forms/LoginForm.js +63 -0
- package/dist/cjs/hooks/useAsyncError.js +15 -0
- package/dist/cjs/hooks/useLocalStorage.js +47 -0
- package/dist/cjs/index.js +40 -0
- package/dist/cjs/pages/DashboardPage.js +10 -0
- package/dist/cjs/pages/LoginPage.js +31 -0
- package/dist/cjs/router/Router.js +35 -0
- package/dist/cjs/router/routes.js +57 -0
- package/dist/cjs/types/index.js +2 -0
- package/dist/cjs/util/get_cookie.js +10 -0
- package/dist/cjs/util/index.js +62 -0
- package/dist/cjs/util/select_styles.js +38 -0
- package/dist/esm/Admin.js +42 -0
- package/dist/esm/App.js +44 -0
- package/dist/esm/api.js +219 -0
- package/dist/esm/components/Branding.js +36 -0
- package/dist/esm/components/Hamburger.js +35 -0
- package/dist/esm/components/Link.js +16 -0
- package/dist/esm/components/Logo.js +20 -0
- package/dist/esm/components/NavBar.js +73 -0
- package/dist/esm/components/NavBarItem.js +37 -0
- package/dist/esm/components/NavBarRoutes.js +42 -0
- package/dist/esm/components/ProgressBar.js +9 -0
- package/dist/esm/components/User.js +66 -0
- package/dist/esm/containers/Content.js +11 -0
- package/dist/esm/containers/ErrorScreen.js +30 -0
- package/dist/esm/containers/LoadingScreen.js +79 -0
- package/dist/esm/containers/PageErrorBoundary.js +38 -0
- package/dist/esm/containers/PageLoader.js +117 -0
- package/dist/esm/contexts/ApiContext.js +77 -0
- package/dist/esm/contexts/I18nContext.js +77 -0
- package/dist/esm/contexts/RouterContext.js +71 -0
- package/dist/esm/contexts/UserContext.js +113 -0
- package/dist/esm/extensions/bananas/components/PasswordChangeForm.js +80 -0
- package/dist/esm/extensions/bananas/index.js +48 -0
- package/dist/esm/extensions/bananas/pages/me/list.js +15 -0
- package/dist/esm/extensions/pos/components/PurchaseRow.js +25 -0
- package/dist/esm/extensions/pos/components/ReceiptCard.js +56 -0
- package/dist/esm/extensions/pos/components/ReceiptLine.js +22 -0
- package/dist/esm/extensions/pos/index.js +16 -0
- package/dist/esm/extensions/pos/pages/purchase/detail.js +8 -0
- package/dist/esm/extensions/pos/pages/purchase/list.js +29 -0
- package/dist/esm/extensions/pos/types/purchase.js +1 -0
- package/dist/esm/extensions/pos/types/receipt.js +1 -0
- package/dist/esm/forms/LoginForm.js +58 -0
- package/dist/esm/hooks/useAsyncError.js +9 -0
- package/dist/esm/hooks/useLocalStorage.js +41 -0
- package/dist/esm/index.js +14 -0
- package/dist/esm/pages/DashboardPage.js +5 -0
- package/dist/esm/pages/LoginPage.js +26 -0
- package/dist/esm/router/Router.js +28 -0
- package/dist/esm/router/routes.js +49 -0
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/util/get_cookie.js +6 -0
- package/dist/esm/util/index.js +54 -0
- package/dist/esm/util/select_styles.js +34 -0
- package/dist/types/Admin.d.ts +13 -0
- package/dist/types/App.d.ts +13 -0
- package/dist/types/api.d.ts +20 -0
- package/dist/types/components/Branding.d.ts +14 -0
- package/dist/types/components/Hamburger.d.ts +8 -0
- package/dist/types/components/Link.d.ts +9 -0
- package/dist/types/components/Logo.d.ts +7 -0
- package/dist/types/components/NavBar.d.ts +11 -0
- package/dist/types/components/NavBarItem.d.ts +12 -0
- package/dist/types/components/NavBarRoutes.d.ts +7 -0
- package/dist/types/components/ProgressBar.d.ts +7 -0
- package/dist/types/components/User.d.ts +824 -0
- package/dist/types/containers/Content.d.ts +3 -0
- package/dist/types/containers/ErrorScreen.d.ts +7 -0
- package/dist/types/containers/LoadingScreen.d.ts +50 -0
- package/dist/types/containers/PageErrorBoundary.d.ts +16 -0
- package/dist/types/containers/PageLoader.d.ts +13 -0
- package/dist/types/contexts/ApiContext.d.ts +12 -0
- package/dist/types/contexts/I18nContext.d.ts +10 -0
- package/dist/types/contexts/RouterContext.d.ts +24 -0
- package/dist/types/contexts/UserContext.d.ts +20 -0
- package/dist/types/extensions/bananas/components/PasswordChangeForm.d.ts +3 -0
- package/dist/types/extensions/bananas/index.d.ts +2 -0
- package/dist/types/extensions/bananas/pages/me/list.d.ts +6 -0
- package/dist/types/extensions/pos/components/PurchaseRow.d.ts +7 -0
- package/dist/types/extensions/pos/components/ReceiptCard.d.ts +7 -0
- package/dist/types/extensions/pos/components/ReceiptLine.d.ts +7 -0
- package/dist/types/extensions/pos/index.d.ts +2 -0
- package/dist/types/extensions/pos/pages/purchase/detail.d.ts +7 -0
- package/dist/types/extensions/pos/pages/purchase/list.d.ts +9 -0
- package/dist/types/extensions/pos/types/purchase.d.ts +18 -0
- package/dist/types/extensions/pos/types/receipt.d.ts +34 -0
- package/dist/types/forms/LoginForm.d.ts +3 -0
- package/dist/types/hooks/useAsyncError.d.ts +1 -0
- package/dist/types/hooks/useLocalStorage.d.ts +2 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/pages/DashboardPage.d.ts +5 -0
- package/dist/types/pages/LoginPage.d.ts +9 -0
- package/dist/types/router/Router.d.ts +13 -0
- package/dist/types/router/routes.d.ts +20 -0
- package/dist/types/types/index.d.ts +6 -0
- package/dist/types/util/get_cookie.d.ts +1 -0
- package/dist/types/util/index.d.ts +8 -0
- package/dist/types/util/select_styles.d.ts +3 -0
- package/example/Dockerfile +27 -0
- package/example/docker-compose.yml +7 -0
- package/example/index.html +13 -0
- package/example/index.tsx +21 -0
- package/example/package-lock.json +13167 -0
- package/example/package.json +52 -0
- package/example/pages/.gitkeep +0 -0
- package/example/webpack.config.js +67 -0
- package/package.json +52 -0
- package/src/Admin.tsx +94 -0
- package/src/App.tsx +43 -0
- package/src/api.ts +202 -0
- package/src/components/Branding.tsx +79 -0
- package/src/components/Hamburger.tsx +41 -0
- package/src/components/Link.tsx +23 -0
- package/src/components/Logo.tsx +57 -0
- package/src/components/NavBar.tsx +115 -0
- package/src/components/NavBarItem.tsx +73 -0
- package/src/components/NavBarRoutes.tsx +67 -0
- package/src/components/ProgressBar.tsx +30 -0
- package/src/components/User.tsx +97 -0
- package/src/containers/Content.tsx +18 -0
- package/src/containers/ErrorScreen.tsx +64 -0
- package/src/containers/LoadingScreen.tsx +135 -0
- package/src/containers/PageErrorBoundary.tsx +32 -0
- package/src/containers/PageLoader.tsx +64 -0
- package/src/contexts/ApiContext.tsx +55 -0
- package/src/contexts/I18nContext.tsx +55 -0
- package/src/contexts/RouterContext.tsx +127 -0
- package/src/contexts/UserContext.tsx +99 -0
- package/src/extensions/bananas/components/PasswordChangeForm.tsx +138 -0
- package/src/extensions/bananas/index.ts +14 -0
- package/src/extensions/bananas/pages/me/list.tsx +31 -0
- package/src/extensions/pos/components/PurchaseRow.tsx +42 -0
- package/src/extensions/pos/components/ReceiptCard.tsx +101 -0
- package/src/extensions/pos/components/ReceiptLine.tsx +51 -0
- package/src/extensions/pos/index.tsx +20 -0
- package/src/extensions/pos/pages/purchase/detail.tsx +22 -0
- package/src/extensions/pos/pages/purchase/list.tsx +56 -0
- package/src/extensions/pos/types/purchase.ts +20 -0
- package/src/extensions/pos/types/receipt.ts +36 -0
- package/src/forms/LoginForm.tsx +99 -0
- package/src/hooks/useAsyncError.ts +13 -0
- package/src/hooks/useLocalStorage.ts +42 -0
- package/src/index.ts +18 -0
- package/src/pages/DashboardPage.tsx +9 -0
- package/src/pages/LoginPage.tsx +50 -0
- package/src/router/Router.tsx +63 -0
- package/src/router/routes.ts +67 -0
- package/src/types/index.ts +4 -0
- package/src/types/swagger-client.d.ts +1 -0
- package/src/util/get_cookie.ts +6 -0
- package/src/util/index.ts +63 -0
- package/src/util/select_styles.ts +29 -0
- package/tsconfig.json +38 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (_) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import MePage from "./pages/me/list";
|
|
38
|
+
export var bananasRouterExtension = {
|
|
39
|
+
app: "bananas",
|
|
40
|
+
pages: function (route) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
+
return __generator(this, function (_a) {
|
|
42
|
+
if (route.view === "me" && route.action === "list") {
|
|
43
|
+
return [2 /*return*/, MePage];
|
|
44
|
+
}
|
|
45
|
+
throw new Error("Unknown bananas page");
|
|
46
|
+
});
|
|
47
|
+
}); },
|
|
48
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Paper from "@mui/material/Paper";
|
|
2
|
+
import { useTheme } from "@mui/material/styles";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Content from "../../../../containers/Content";
|
|
5
|
+
import PasswordChangeForm from "../../components/PasswordChangeForm";
|
|
6
|
+
var MePage = function (_a) {
|
|
7
|
+
var theme = useTheme();
|
|
8
|
+
return (React.createElement(Content, null,
|
|
9
|
+
React.createElement(Paper, { sx: {
|
|
10
|
+
padding: theme.spacing(3),
|
|
11
|
+
alignSelf: "flex-start",
|
|
12
|
+
}, elevation: 1, square: true },
|
|
13
|
+
React.createElement(PasswordChangeForm, null))));
|
|
14
|
+
};
|
|
15
|
+
export default MePage;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TableCell, TableRow } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { useRouter } from "../../../contexts/RouterContext";
|
|
4
|
+
export var PurchaseRow = function (_a) {
|
|
5
|
+
var purchase = _a.purchase;
|
|
6
|
+
var navigate = useRouter().navigate;
|
|
7
|
+
var onClick = function () {
|
|
8
|
+
navigate("pos.purchase:detail", {
|
|
9
|
+
params: {
|
|
10
|
+
purchase_number: purchase.number,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var purchaseNumber = purchase.number
|
|
15
|
+
? "#".concat(purchase.number.toString().padStart(4, "0"))
|
|
16
|
+
: "-";
|
|
17
|
+
return (React.createElement(TableRow, { onClick: onClick, hover: true },
|
|
18
|
+
React.createElement(TableCell, null, purchaseNumber),
|
|
19
|
+
React.createElement(TableCell, null, purchase.email),
|
|
20
|
+
React.createElement(TableCell, null),
|
|
21
|
+
React.createElement(TableCell, null, "1337 SEK"),
|
|
22
|
+
React.createElement(TableCell, null, "Betald"),
|
|
23
|
+
React.createElement(TableCell, null, new Date(purchase.date_initiated).toLocaleString()),
|
|
24
|
+
React.createElement(TableCell, null, "-")));
|
|
25
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
10
|
+
import Card from "@mui/material/Card";
|
|
11
|
+
import React from "react";
|
|
12
|
+
import CardHeader from "@mui/material/CardHeader";
|
|
13
|
+
import List from "@mui/material/List";
|
|
14
|
+
import { ReceiptLine } from "./ReceiptLine";
|
|
15
|
+
import Divider from "@mui/material/Divider";
|
|
16
|
+
import CardContent from "@mui/material/CardContent";
|
|
17
|
+
import TableContainer from "@mui/material/TableContainer";
|
|
18
|
+
import Table from "@mui/material/Table";
|
|
19
|
+
import TableBody from "@mui/material/TableBody";
|
|
20
|
+
import TableRow from "@mui/material/TableRow";
|
|
21
|
+
import TableCell, { tableCellClasses } from "@mui/material/TableCell";
|
|
22
|
+
import { useTheme } from "@mui/material/styles";
|
|
23
|
+
var ReceiptPriceRow = function (_a) {
|
|
24
|
+
var title = _a.title, price = _a.price;
|
|
25
|
+
return (React.createElement(TableRow, null,
|
|
26
|
+
React.createElement(TableCell, { align: "right", sx: { width: "75%" } },
|
|
27
|
+
React.createElement("strong", null, title)),
|
|
28
|
+
React.createElement(TableCell, { align: "right" }, "".concat(price, " SEK"))));
|
|
29
|
+
};
|
|
30
|
+
export var ReceiptCard = function (_a) {
|
|
31
|
+
var _b;
|
|
32
|
+
var receipt = _a.receipt;
|
|
33
|
+
var theme = useTheme();
|
|
34
|
+
return (React.createElement(Card, { sx: { width: 550 } },
|
|
35
|
+
React.createElement(CardHeader, { title: "Receipt" }),
|
|
36
|
+
React.createElement(CardContent, null,
|
|
37
|
+
React.createElement(Divider, null),
|
|
38
|
+
React.createElement(List, { sx: {
|
|
39
|
+
width: "100%",
|
|
40
|
+
} }, receipt.lines.map(function (line) { return (React.createElement(ReceiptLine, { key: line.reference, line: line })); }).reduce(function (prev, curr, index) { return __spreadArray(__spreadArray([], prev, true), [React.createElement(Divider, { key: index, light: true }), curr], false); }, [])
|
|
41
|
+
.slice(1)),
|
|
42
|
+
React.createElement(Divider, null),
|
|
43
|
+
React.createElement(TableContainer, { sx: {
|
|
44
|
+
paddingTop: theme.spacing(2),
|
|
45
|
+
paddingX: theme.spacing(4),
|
|
46
|
+
} },
|
|
47
|
+
React.createElement(Table, { padding: "none", sx: (_b = {},
|
|
48
|
+
_b["& .".concat(tableCellClasses.root)] = {
|
|
49
|
+
borderBottom: "none",
|
|
50
|
+
},
|
|
51
|
+
_b) },
|
|
52
|
+
React.createElement(TableBody, { sx: { border: "none" } },
|
|
53
|
+
React.createElement(ReceiptPriceRow, { title: "Discount", price: receipt.total_discount_amount }),
|
|
54
|
+
React.createElement(ReceiptPriceRow, { title: "Tax", price: receipt.total_tax_amount }),
|
|
55
|
+
React.createElement(ReceiptPriceRow, { title: "Total", price: receipt.total_amount })))))));
|
|
56
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ListItem from "@mui/material/ListItem";
|
|
3
|
+
import ListItemText from "@mui/material/ListItemText";
|
|
4
|
+
import Typography from "@mui/material/Typography";
|
|
5
|
+
import Tooltip from "@mui/material/Tooltip";
|
|
6
|
+
export var ReceiptLine = function (_a) {
|
|
7
|
+
var line = _a.line;
|
|
8
|
+
return (React.createElement(ListItem, { sx: { display: "flex", flexDirection: "line", alignItems: "baseline" } },
|
|
9
|
+
React.createElement(ListItemText, { sx: { width: "50%" }, primary: line.title, secondary: line.reference }),
|
|
10
|
+
React.createElement(Tooltip, { title: "Quantity" },
|
|
11
|
+
React.createElement(ListItemText, { sx: { width: "20%" }, primary: "".concat(line.quantity, " st") })),
|
|
12
|
+
React.createElement(ListItemText, { disableTypography: true, sx: { width: "30%" }, primary: React.createElement(Tooltip, { title: "Price" },
|
|
13
|
+
React.createElement(Typography, null, "".concat(line.total_amount, " SEK"))), secondary: React.createElement(React.Fragment, null,
|
|
14
|
+
React.createElement(Tooltip, { title: "Tax" },
|
|
15
|
+
React.createElement(Typography, null,
|
|
16
|
+
line.total_tax_amount,
|
|
17
|
+
" SEK")),
|
|
18
|
+
React.createElement(Tooltip, { title: "Discount" },
|
|
19
|
+
React.createElement(Typography, null,
|
|
20
|
+
line.total_discount_amount,
|
|
21
|
+
" SEK"))) })));
|
|
22
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import PurchaseDetailPage from "./pages/purchase/detail";
|
|
2
|
+
import PurchaseListPage from "./pages/purchase/list";
|
|
3
|
+
export var posRouterExtension = {
|
|
4
|
+
app: "pos",
|
|
5
|
+
pages: function (route) {
|
|
6
|
+
if (route.view === "purchase") {
|
|
7
|
+
switch (route.action) {
|
|
8
|
+
case "list":
|
|
9
|
+
return PurchaseListPage;
|
|
10
|
+
case "detail":
|
|
11
|
+
return PurchaseDetailPage;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
throw new Error("Unknown pos page");
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReceiptCard } from "../../components/ReceiptCard";
|
|
3
|
+
import Content from "../../../../containers/Content";
|
|
4
|
+
var PurchaseDetailPage = function (_a) {
|
|
5
|
+
var data = _a.data;
|
|
6
|
+
return (React.createElement(Content, null, data === null || data === void 0 ? void 0 : data.receipts.map(function (receipt, i) { return (React.createElement(ReceiptCard, { key: i, receipt: receipt })); })));
|
|
7
|
+
};
|
|
8
|
+
export default PurchaseDetailPage;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import TableContainer from "@mui/material/TableContainer";
|
|
3
|
+
import Table from "@mui/material/Table";
|
|
4
|
+
import TableHead from "@mui/material/TableHead";
|
|
5
|
+
import TableBody from "@mui/material/TableBody";
|
|
6
|
+
import TableCell from "@mui/material/TableCell";
|
|
7
|
+
import Box from "@mui/material/Box";
|
|
8
|
+
import { PurchaseRow } from "../../components/PurchaseRow";
|
|
9
|
+
import Paper from "@mui/material/Paper";
|
|
10
|
+
import TableRow from "@mui/material/TableRow";
|
|
11
|
+
import Content from "../../../../containers/Content";
|
|
12
|
+
var PurchaseListPage = function (_a) {
|
|
13
|
+
var data = _a.data;
|
|
14
|
+
return (React.createElement(Content, null,
|
|
15
|
+
React.createElement(Box, { sx: { width: "100%" } },
|
|
16
|
+
React.createElement(TableContainer, { component: Paper },
|
|
17
|
+
React.createElement(Table, null,
|
|
18
|
+
React.createElement(TableHead, null,
|
|
19
|
+
React.createElement(TableRow, null,
|
|
20
|
+
React.createElement(TableCell, null, "Purchase#"),
|
|
21
|
+
React.createElement(TableCell, null, "Kund"),
|
|
22
|
+
React.createElement(TableCell, null, "Adress"),
|
|
23
|
+
React.createElement(TableCell, null, "Orderv\u00E4rde"),
|
|
24
|
+
React.createElement(TableCell, null, "Betalstatus"),
|
|
25
|
+
React.createElement(TableCell, null, "Orderdatum"),
|
|
26
|
+
React.createElement(TableCell, null, "Leveransdatum"))),
|
|
27
|
+
React.createElement(TableBody, null, data === null || data === void 0 ? void 0 : data.results.map(function (purchase) { return (React.createElement(PurchaseRow, { key: purchase.number, purchase: purchase })); })))))));
|
|
28
|
+
};
|
|
29
|
+
export default PurchaseListPage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useSnackbar } from "notistack";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Box from "@mui/material/Box";
|
|
4
|
+
import DialogActions from "@mui/material/DialogActions";
|
|
5
|
+
import DialogContent from "@mui/material/DialogContent";
|
|
6
|
+
import Stack from "@mui/material/Stack";
|
|
7
|
+
import { useTheme } from "@mui/material/styles";
|
|
8
|
+
import TextField from "@mui/material/TextField";
|
|
9
|
+
import { useApi } from "../contexts/ApiContext";
|
|
10
|
+
import { useI18n } from "../contexts/I18nContext";
|
|
11
|
+
import { useUser } from "../contexts/UserContext";
|
|
12
|
+
import LoadingButton from "@mui/lab/LoadingButton";
|
|
13
|
+
var LoginForm = function () {
|
|
14
|
+
var theme = useTheme();
|
|
15
|
+
var enqueueSnackbar = useSnackbar().enqueueSnackbar;
|
|
16
|
+
var t = useI18n().t;
|
|
17
|
+
var login = useUser().login;
|
|
18
|
+
var api = useApi();
|
|
19
|
+
var _a = React.useState(""), username = _a[0], setUsername = _a[1];
|
|
20
|
+
var _b = React.useState(""), password = _b[0], setPassword = _b[1];
|
|
21
|
+
var _c = React.useState(false), loading = _c[0], setLoading = _c[1];
|
|
22
|
+
var operation = api.operations["bananas.login:create"];
|
|
23
|
+
var properties = operation.request.body.schema.properties;
|
|
24
|
+
var handleSubmit = function (event) {
|
|
25
|
+
event.preventDefault();
|
|
26
|
+
setLoading(true);
|
|
27
|
+
login(username, password).then(function (user) {
|
|
28
|
+
if (user !== null) {
|
|
29
|
+
enqueueSnackbar("".concat(t("Welcome,"), " ").concat(user.full_name), {
|
|
30
|
+
variant: "success",
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
enqueueSnackbar(t("Unable to log in with provided credentials."), {
|
|
35
|
+
variant: "error",
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}).finally(function () { return setLoading(false); });
|
|
39
|
+
};
|
|
40
|
+
return (React.createElement(Box, { component: "form", onSubmit: handleSubmit },
|
|
41
|
+
React.createElement(DialogContent, null,
|
|
42
|
+
React.createElement(Stack, { spacing: 1 },
|
|
43
|
+
React.createElement(TextField, { autoFocus: true, fullWidth: true, label: properties.username.title, name: "username", type: "text", onChange: function (e) {
|
|
44
|
+
setUsername(e.target.value);
|
|
45
|
+
}, color: "secondary", inputProps: { "aria-label": "Username" } }),
|
|
46
|
+
React.createElement(TextField, { fullWidth: true, label: properties.password.title, name: "password", type: "password", onChange: function (e) {
|
|
47
|
+
setPassword(e.target.value);
|
|
48
|
+
}, color: "secondary", inputProps: { "aria-label": "Password" } }))),
|
|
49
|
+
React.createElement(DialogActions, { sx: {
|
|
50
|
+
borderTop: "1px solid ".concat(theme.palette.divider),
|
|
51
|
+
margin: 0,
|
|
52
|
+
padding: theme.spacing(1),
|
|
53
|
+
} },
|
|
54
|
+
React.createElement(LoadingButton, { sx: {
|
|
55
|
+
margin: "auto",
|
|
56
|
+
}, variant: "contained", type: "submit", color: "secondary", "aria-label": "login", loading: loading }, t("Log in")))));
|
|
57
|
+
};
|
|
58
|
+
export default LoginForm;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export default function useLocalStorage(key, defaultValue) {
|
|
3
|
+
var _a;
|
|
4
|
+
var _b = React.useState((_a = getState(key)) !== null && _a !== void 0 ? _a : defaultValue), state = _b[0], setState = _b[1];
|
|
5
|
+
var _c = React.useState(false), mounted = _c[0], setMounted = _c[1];
|
|
6
|
+
React.useEffect(function () {
|
|
7
|
+
if (mounted)
|
|
8
|
+
return;
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
10
|
+
if (localStorage) {
|
|
11
|
+
var value = getState(key);
|
|
12
|
+
if (value)
|
|
13
|
+
setState(value);
|
|
14
|
+
setMounted(true);
|
|
15
|
+
}
|
|
16
|
+
}, [key, mounted]);
|
|
17
|
+
React.useEffect(function () {
|
|
18
|
+
if (mounted)
|
|
19
|
+
setLocalState(key, state);
|
|
20
|
+
}, [state, key, mounted]);
|
|
21
|
+
return [state, setState];
|
|
22
|
+
}
|
|
23
|
+
function getState(key) {
|
|
24
|
+
return tryJSONParse(localStorage.getItem(buildStorageKey(key)));
|
|
25
|
+
}
|
|
26
|
+
function setLocalState(key, state) {
|
|
27
|
+
localStorage.setItem(buildStorageKey(key), JSON.stringify(state));
|
|
28
|
+
}
|
|
29
|
+
function buildStorageKey(key) {
|
|
30
|
+
return "__useLocalStorage_".concat(key);
|
|
31
|
+
}
|
|
32
|
+
function tryJSONParse(json) {
|
|
33
|
+
if (!json)
|
|
34
|
+
return null;
|
|
35
|
+
try {
|
|
36
|
+
return JSON.parse(json);
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { default as ProgressBar } from "./components/ProgressBar";
|
|
2
|
+
export { default as Content } from "./containers/Content";
|
|
3
|
+
export { default as Logo } from "./components/Logo";
|
|
4
|
+
export { default as Link } from "./components/Link";
|
|
5
|
+
export * from "./contexts/ApiContext";
|
|
6
|
+
export * from "./contexts/I18nContext";
|
|
7
|
+
export * from "./contexts/RouterContext";
|
|
8
|
+
export * from "./contexts/UserContext";
|
|
9
|
+
export * from "./containers/LoadingScreen";
|
|
10
|
+
export { default as Admin } from "./Admin";
|
|
11
|
+
export { default as App } from "./App";
|
|
12
|
+
export * from "./api";
|
|
13
|
+
export * from "./extensions/bananas";
|
|
14
|
+
export * from "./extensions/pos";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Dialog, DialogTitle, Typography } from "@mui/material";
|
|
3
|
+
import { useTheme } from "@mui/material/styles";
|
|
4
|
+
import LoginForm from "../forms/LoginForm";
|
|
5
|
+
import Logo from "../components/Logo";
|
|
6
|
+
var LoginPage = function (_a) {
|
|
7
|
+
var title = _a.title, logo = _a.logo, Form = _a.form;
|
|
8
|
+
var theme = useTheme();
|
|
9
|
+
Form !== null && Form !== void 0 ? Form : (Form = LoginForm);
|
|
10
|
+
return (React.createElement(Dialog, { open: true, sx: { "> * > *": { width: "100%" } } },
|
|
11
|
+
React.createElement(DialogTitle, { sx: {
|
|
12
|
+
borderBottom: "1px solid ".concat(theme.palette.divider),
|
|
13
|
+
margin: 0,
|
|
14
|
+
backgroundColor: theme.palette.primary.main,
|
|
15
|
+
padding: theme.spacing(2),
|
|
16
|
+
textAlign: "center",
|
|
17
|
+
alignItems: "middle",
|
|
18
|
+
justifyContent: "center",
|
|
19
|
+
display: "flex",
|
|
20
|
+
} }, logo ? React.createElement(Logo, { src: logo }) : (React.createElement(Typography, { sx: {
|
|
21
|
+
color: theme.palette.primary.contrastText,
|
|
22
|
+
fontWeight: "bold",
|
|
23
|
+
} }, title))),
|
|
24
|
+
React.createElement(Form, null)));
|
|
25
|
+
};
|
|
26
|
+
export default LoginPage;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import Box from "@mui/material/Box";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Route, Routes } from "react-router-dom";
|
|
4
|
+
import { useRouter } from "../contexts/RouterContext";
|
|
5
|
+
import DashboardPage from "../pages/DashboardPage";
|
|
6
|
+
import PageLoader from "../containers/PageLoader";
|
|
7
|
+
import PageErrorBoundary from "../containers/PageErrorBoundary";
|
|
8
|
+
import ErrorScreen from "../containers/ErrorScreen";
|
|
9
|
+
export var Router = function (_a) {
|
|
10
|
+
var dashboard = _a.dashboard, extensions = _a.extensions, pages = _a.pages;
|
|
11
|
+
extensions !== null && extensions !== void 0 ? extensions : (extensions = Array.isArray(extensions) ? extensions : []);
|
|
12
|
+
var routes = useRouter().routes;
|
|
13
|
+
var Dashboard = dashboard !== null && dashboard !== void 0 ? dashboard : DashboardPage;
|
|
14
|
+
var extensionsMap = new Map(extensions.map(function (_a) {
|
|
15
|
+
var app = _a.app, pages = _a.pages;
|
|
16
|
+
return [app, pages];
|
|
17
|
+
}));
|
|
18
|
+
var pageRoutes = routes.map(function (route) {
|
|
19
|
+
var pageLoader = extensionsMap.get(route.app);
|
|
20
|
+
var Element = function () { return (React.createElement(PageErrorBoundary, { errorPage: ErrorScreen },
|
|
21
|
+
React.createElement(PageLoader, { route: route, page: pageLoader(route) }))); };
|
|
22
|
+
return (React.createElement(Route, { key: route.path, path: route.path, element: React.createElement(Element, null) }));
|
|
23
|
+
});
|
|
24
|
+
return (React.createElement(Box, { component: "main", sx: { flexGrow: 1, p: 3 } },
|
|
25
|
+
React.createElement(Routes, null,
|
|
26
|
+
React.createElement(Route, { index: true, element: React.createElement(Dashboard, null) }),
|
|
27
|
+
pageRoutes)));
|
|
28
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { capitalize, nthIndexOf } from "../util";
|
|
2
|
+
/**
|
|
3
|
+
* Parses an `operationId` returning app, view and action
|
|
4
|
+
*
|
|
5
|
+
* ## Examples
|
|
6
|
+
*
|
|
7
|
+
* `bananas.me:list` -> `{ app: "bananas", view: "me", action: "list" }`
|
|
8
|
+
*
|
|
9
|
+
* `bananas.login:create` -> `{ app: "bananas", view: "login", action: "create" }`
|
|
10
|
+
*
|
|
11
|
+
* `bananas.i18n:list` -> `{ app: "bananas", view: "i18n", action: "list" }`
|
|
12
|
+
*/
|
|
13
|
+
export function parseOperationId(operationId) {
|
|
14
|
+
var match = operationId.match(/^(\w+)\.(\w+):(\w+)$/);
|
|
15
|
+
if (match !== null) {
|
|
16
|
+
return {
|
|
17
|
+
app: match[1],
|
|
18
|
+
view: match[2],
|
|
19
|
+
action: match[3],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
export function isNavigation(tags) {
|
|
25
|
+
return tags.includes("navigation");
|
|
26
|
+
}
|
|
27
|
+
export function getPath(endpoint, method, action) {
|
|
28
|
+
return (method.toLowerCase() === "get"
|
|
29
|
+
? endpoint
|
|
30
|
+
: "".concat(endpoint).concat(action !== null && action !== void 0 ? action : "", "/")).replace(/{([^}]*)}/, ":$1");
|
|
31
|
+
}
|
|
32
|
+
function getBasePath(path) {
|
|
33
|
+
return path.substring(0, (nthIndexOf(path, "/", 2, 1) + 1) || undefined);
|
|
34
|
+
}
|
|
35
|
+
export function getPage(path, action) {
|
|
36
|
+
var basePath = getBasePath(path);
|
|
37
|
+
var relativeBasePath = basePath.slice(1);
|
|
38
|
+
return "".concat(relativeBasePath).concat(action);
|
|
39
|
+
}
|
|
40
|
+
function getAppLabel(tags) {
|
|
41
|
+
var _a;
|
|
42
|
+
return (_a = tags.filter(function (tag) { return tag.startsWith("app:"); })[0]) === null || _a === void 0 ? void 0 : _a.split(":")[1];
|
|
43
|
+
}
|
|
44
|
+
function getView(id) {
|
|
45
|
+
return id.substring(id.indexOf(".") + 1, id.indexOf(":"));
|
|
46
|
+
}
|
|
47
|
+
export function getTitle(view, summary) {
|
|
48
|
+
return (summary !== null && summary !== void 0 ? summary : (view && capitalize(view.replace("_", " "))));
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export function getCookie(name) {
|
|
2
|
+
var prefix = "".concat(name, "=");
|
|
3
|
+
var cookies = document.cookie.split(/\s*;\s*/);
|
|
4
|
+
var match = cookies.find(function (cookie) { return cookie.startsWith(prefix); });
|
|
5
|
+
return match == null ? undefined : match.slice(prefix.length);
|
|
6
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export function ensureTrailingSlash(path) {
|
|
2
|
+
if (path != null && !path.endsWith("/")) {
|
|
3
|
+
return "".concat(path, "/");
|
|
4
|
+
}
|
|
5
|
+
return path;
|
|
6
|
+
}
|
|
7
|
+
export function ensureLeadingHash(hash) {
|
|
8
|
+
if (hash != null && !hash.startsWith("#")) {
|
|
9
|
+
return "#".concat(hash);
|
|
10
|
+
}
|
|
11
|
+
return hash;
|
|
12
|
+
}
|
|
13
|
+
export function absolutePath(path, basename) {
|
|
14
|
+
if (basename === void 0) { basename = "/"; }
|
|
15
|
+
if (!path) {
|
|
16
|
+
return path;
|
|
17
|
+
}
|
|
18
|
+
var pathname = path;
|
|
19
|
+
// Make relative path absolute to basename
|
|
20
|
+
if (!pathname.startsWith("/")) {
|
|
21
|
+
pathname = ensureTrailingSlash(basename) + pathname;
|
|
22
|
+
}
|
|
23
|
+
// Expand path
|
|
24
|
+
if (pathname.indexOf(".") >= 0) {
|
|
25
|
+
var stack = [];
|
|
26
|
+
for (var _i = 0, _a = pathname.split("/"); _i < _a.length; _i++) {
|
|
27
|
+
var part = _a[_i];
|
|
28
|
+
if (part === ".") {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
else if (part === ".." && stack.length > 0) {
|
|
32
|
+
stack.pop();
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
stack.push(part);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
pathname = stack.join("/");
|
|
39
|
+
}
|
|
40
|
+
return ensureTrailingSlash(pathname);
|
|
41
|
+
}
|
|
42
|
+
export function nthIndexOf(str, pattern, n, start) {
|
|
43
|
+
var index = str.indexOf(pattern, start !== null && start !== void 0 ? start : 0);
|
|
44
|
+
if (index >= 0 && n > 1) {
|
|
45
|
+
return nthIndexOf(str, pattern, n - 1, index + 1);
|
|
46
|
+
}
|
|
47
|
+
return index;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Like Python’s `.capitalize()`.
|
|
51
|
+
*/
|
|
52
|
+
export function capitalize(string) {
|
|
53
|
+
return string.slice(0, 1).toUpperCase() + string.slice(1).toLowerCase();
|
|
54
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
10
|
+
export function selectStyles() {
|
|
11
|
+
var sxs = [];
|
|
12
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
13
|
+
sxs[_i] = arguments[_i];
|
|
14
|
+
}
|
|
15
|
+
var final = [];
|
|
16
|
+
for (var _a = 0, sxs_1 = sxs; _a < sxs_1.length; _a++) {
|
|
17
|
+
var sx = sxs_1[_a];
|
|
18
|
+
if (Array.isArray(sx)) {
|
|
19
|
+
if (sx.filter(function (v) { return typeof v === "boolean"; })
|
|
20
|
+
.every(function (v) { return v; })) {
|
|
21
|
+
// If every entry is true
|
|
22
|
+
final.concat(sx.filter(function (v) {
|
|
23
|
+
return typeof v !== "boolean";
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else if (sx !== undefined) {
|
|
28
|
+
final.push(sx);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return Object.assign.apply(Object, __spreadArray([{}], final.reverse(), false));
|
|
32
|
+
}
|
|
33
|
+
// Shorthand for select styles helper
|
|
34
|
+
export var ss = selectStyles;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { RouterProps } from "./router/Router";
|
|
3
|
+
import { LogoType } from "./types";
|
|
4
|
+
export declare type AdminProps = {
|
|
5
|
+
logo?: LogoType;
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
nav: Record<string, React.ReactNode>;
|
|
10
|
+
basename?: string;
|
|
11
|
+
} & RouterProps;
|
|
12
|
+
declare const Admin: React.FC<AdminProps>;
|
|
13
|
+
export default Admin;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Theme } from "@mui/material/styles";
|
|
3
|
+
import { AdminProps } from "./Admin";
|
|
4
|
+
import { ApiClient } from "./api";
|
|
5
|
+
declare type AppProps = {
|
|
6
|
+
api: ApiClient | string | URL | {
|
|
7
|
+
schema: string | URL;
|
|
8
|
+
server?: string | URL;
|
|
9
|
+
};
|
|
10
|
+
theme?: Partial<Theme> | ((outerTheme: Theme) => Theme);
|
|
11
|
+
} & AdminProps;
|
|
12
|
+
declare const App: React.FC<AppProps>;
|
|
13
|
+
export default App;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OpenAPI } from "openapi-types";
|
|
2
|
+
export declare class ApiOperation {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly tags: string[];
|
|
5
|
+
readonly server: string;
|
|
6
|
+
readonly endpoint: string;
|
|
7
|
+
readonly method: string;
|
|
8
|
+
readonly request: OpenAPI.Request;
|
|
9
|
+
readonly summary?: string;
|
|
10
|
+
readonly description?: string;
|
|
11
|
+
constructor(id: string, tags: string[], server: string, endpoint: string, method: string, request: OpenAPI.Request, summary?: string, description?: string);
|
|
12
|
+
call(request?: OpenAPI.Request, init?: RequestInit): Promise<Response>;
|
|
13
|
+
}
|
|
14
|
+
export declare class ApiClient {
|
|
15
|
+
readonly document: OpenAPI.Document;
|
|
16
|
+
readonly operations: Record<string, ApiOperation>;
|
|
17
|
+
static load(source: string | URL, server?: string | URL): Promise<ApiClient>;
|
|
18
|
+
constructor(document: OpenAPI.Document, server?: string | URL);
|
|
19
|
+
isAuthenticated(): Promise<boolean>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SxProps } from "@mui/material";
|
|
3
|
+
import { LogoType } from "../types";
|
|
4
|
+
interface BrandingProps {
|
|
5
|
+
logo?: LogoType;
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
onClick?: React.MouseEventHandler;
|
|
10
|
+
fullWidth?: boolean;
|
|
11
|
+
sx?: SxProps;
|
|
12
|
+
}
|
|
13
|
+
declare const Branding: React.FC<BrandingProps>;
|
|
14
|
+
export default Branding;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IconButtonProps } from "@mui/material/IconButton";
|
|
3
|
+
declare type HamburgerProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onToggle?: React.MouseEventHandler;
|
|
6
|
+
} & IconButtonProps;
|
|
7
|
+
declare const Hamburger: React.FC<HamburgerProps>;
|
|
8
|
+
export default Hamburger;
|