wcz-test 4.7.0 → 4.8.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/dist/index.d.ts +4 -11
- package/dist/index.js +265 -269
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1038,21 +1038,11 @@ var TypographyWithIcon = ({ startIcon, endIcon, children, sx, gutterBottom, ...p
|
|
|
1038
1038
|
] });
|
|
1039
1039
|
};
|
|
1040
1040
|
|
|
1041
|
-
// src/components/core/
|
|
1042
|
-
import { Box
|
|
1043
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1044
|
-
var PageHeader = ({ title, action, sx }) => {
|
|
1045
|
-
return /* @__PURE__ */ jsxs2(Stack2, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { py: 2, ...sx }, children: [
|
|
1046
|
-
/* @__PURE__ */ jsx2(Typography2, { variant: "h4", fontWeight: 600, children: title }),
|
|
1047
|
-
action && /* @__PURE__ */ jsx2(Box, { children: action })
|
|
1048
|
-
] });
|
|
1049
|
-
};
|
|
1050
|
-
|
|
1051
|
-
// src/components/core/TableContainer.tsx
|
|
1052
|
-
import { Box as Box2 } from "@mui/material";
|
|
1041
|
+
// src/components/core/Fullscreen.tsx
|
|
1042
|
+
import { Box } from "@mui/material";
|
|
1053
1043
|
import { useEffect, useRef, useState } from "react";
|
|
1054
|
-
import { jsx as
|
|
1055
|
-
var
|
|
1044
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
1045
|
+
var Fullscreen = ({ children, sx, ...props }) => {
|
|
1056
1046
|
const reference = useRef(null);
|
|
1057
1047
|
const [height, setHeight] = useState();
|
|
1058
1048
|
useEffect(() => {
|
|
@@ -1075,8 +1065,8 @@ var TableContainer = ({ children, sx, ...props }) => {
|
|
|
1075
1065
|
ro.disconnect();
|
|
1076
1066
|
};
|
|
1077
1067
|
}, []);
|
|
1078
|
-
return /* @__PURE__ */
|
|
1079
|
-
|
|
1068
|
+
return /* @__PURE__ */ jsx2(
|
|
1069
|
+
Box,
|
|
1080
1070
|
{
|
|
1081
1071
|
ref: reference,
|
|
1082
1072
|
sx: {
|
|
@@ -1084,43 +1074,26 @@ var TableContainer = ({ children, sx, ...props }) => {
|
|
|
1084
1074
|
flexDirection: "column",
|
|
1085
1075
|
minHeight: 0,
|
|
1086
1076
|
width: "100%",
|
|
1077
|
+
overflow: "auto",
|
|
1087
1078
|
...sx
|
|
1088
1079
|
},
|
|
1089
1080
|
height,
|
|
1090
1081
|
...props,
|
|
1091
|
-
children: /* @__PURE__ */
|
|
1082
|
+
children: /* @__PURE__ */ jsx2(Box, { sx: {
|
|
1092
1083
|
flex: 1,
|
|
1093
1084
|
minHeight: 0,
|
|
1094
|
-
height: "100%"
|
|
1095
|
-
|
|
1096
|
-
"& .MuiInputBase-root": {
|
|
1097
|
-
height: "100%"
|
|
1098
|
-
}
|
|
1099
|
-
},
|
|
1100
|
-
"& .MuiDataGrid-columnHeaderTitle": {
|
|
1101
|
-
fontWeight: 600
|
|
1102
|
-
},
|
|
1103
|
-
"& .Mui-error": {
|
|
1104
|
-
backgroundColor: theme.palette.error.main,
|
|
1105
|
-
color: theme.palette.error.contrastText
|
|
1106
|
-
},
|
|
1107
|
-
"& .MuiDataGrid-booleanCell[data-value='true']": {
|
|
1108
|
-
color: `${theme.palette.success.main} !important`
|
|
1109
|
-
},
|
|
1110
|
-
"& .MuiDataGrid-booleanCell[data-value='false']": {
|
|
1111
|
-
color: `${theme.palette.error.main} !important`
|
|
1112
|
-
}
|
|
1113
|
-
}), children })
|
|
1085
|
+
height: "100%"
|
|
1086
|
+
}, children })
|
|
1114
1087
|
}
|
|
1115
1088
|
);
|
|
1116
1089
|
};
|
|
1117
1090
|
|
|
1118
1091
|
// src/components/file/Dropzone.tsx
|
|
1119
1092
|
import CloudUpload from "@mui/icons-material/CloudUpload";
|
|
1120
|
-
import { Paper, Typography as
|
|
1093
|
+
import { Paper, Typography as Typography2, useTheme } from "@mui/material";
|
|
1121
1094
|
import { useDropzone } from "react-dropzone";
|
|
1122
1095
|
import { useTranslation } from "react-i18next";
|
|
1123
|
-
import { jsx as
|
|
1096
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1124
1097
|
var baseStyle = {
|
|
1125
1098
|
flex: 1,
|
|
1126
1099
|
display: "flex",
|
|
@@ -1144,10 +1117,10 @@ var Dropzone = ({ sx, ...props }) => {
|
|
|
1144
1117
|
...isDragAccept ? { borderColor: theme.palette.success.main } : {},
|
|
1145
1118
|
...isDragReject ? { borderColor: theme.palette.error.main } : {}
|
|
1146
1119
|
};
|
|
1147
|
-
return /* @__PURE__ */
|
|
1148
|
-
/* @__PURE__ */
|
|
1149
|
-
/* @__PURE__ */
|
|
1150
|
-
/* @__PURE__ */
|
|
1120
|
+
return /* @__PURE__ */ jsxs2(Paper, { variant: "outlined", ...getRootProps({ style }), sx, children: [
|
|
1121
|
+
/* @__PURE__ */ jsx3("input", { ...getInputProps(), style: { display: "none" } }),
|
|
1122
|
+
/* @__PURE__ */ jsx3(CloudUpload, {}),
|
|
1123
|
+
/* @__PURE__ */ jsx3(Typography2, { children: t2("Layout.File.DragSomeFilesHereOrClickToSelectThem") })
|
|
1151
1124
|
] });
|
|
1152
1125
|
};
|
|
1153
1126
|
|
|
@@ -1156,7 +1129,7 @@ import { useState as useState5 } from "react";
|
|
|
1156
1129
|
|
|
1157
1130
|
// src/components/file/fileViewer/FileViewerGrid.tsx
|
|
1158
1131
|
import MoreVert from "@mui/icons-material/MoreVert";
|
|
1159
|
-
import { Box as
|
|
1132
|
+
import { Box as Box2, IconButton, ImageListItem, ImageListItemBar, Stack as Stack3, Tooltip } from "@mui/material";
|
|
1160
1133
|
import { grey } from "@mui/material/colors";
|
|
1161
1134
|
import { Fragment, useEffect as useEffect2, useState as useState3 } from "react";
|
|
1162
1135
|
|
|
@@ -1187,23 +1160,23 @@ import { createContext as createContext2 } from "react";
|
|
|
1187
1160
|
var DialogsContext = createContext2({});
|
|
1188
1161
|
|
|
1189
1162
|
// src/hooks/DialogsHooks.tsx
|
|
1190
|
-
import { jsx as
|
|
1163
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1191
1164
|
function AlertDialog({ open, payload, onClose }) {
|
|
1192
1165
|
const { t: t2 } = useTranslation2();
|
|
1193
|
-
return /* @__PURE__ */
|
|
1194
|
-
/* @__PURE__ */
|
|
1195
|
-
/* @__PURE__ */
|
|
1196
|
-
/* @__PURE__ */
|
|
1166
|
+
return /* @__PURE__ */ jsxs3(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(), disableRestoreFocus: true, children: [
|
|
1167
|
+
/* @__PURE__ */ jsx4(DialogTitle, { children: payload.title ?? t2("Layout.Dialog.Alert") }),
|
|
1168
|
+
/* @__PURE__ */ jsx4(DialogContent, { children: payload.message }),
|
|
1169
|
+
/* @__PURE__ */ jsx4(DialogActions, { children: /* @__PURE__ */ jsx4(Button, { onClick: () => onClose(), autoFocus: true, children: t2("Layout.Dialog.Confirm") }) })
|
|
1197
1170
|
] });
|
|
1198
1171
|
}
|
|
1199
1172
|
function ConfirmDialog({ open, payload, onClose }) {
|
|
1200
1173
|
const { t: t2 } = useTranslation2();
|
|
1201
|
-
return /* @__PURE__ */
|
|
1202
|
-
/* @__PURE__ */
|
|
1203
|
-
/* @__PURE__ */
|
|
1204
|
-
/* @__PURE__ */
|
|
1205
|
-
/* @__PURE__ */
|
|
1206
|
-
/* @__PURE__ */
|
|
1174
|
+
return /* @__PURE__ */ jsxs3(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(false), disableRestoreFocus: true, children: [
|
|
1175
|
+
/* @__PURE__ */ jsx4(DialogTitle, { children: payload.title ?? t2("Layout.Dialog.Confirm") }),
|
|
1176
|
+
/* @__PURE__ */ jsx4(DialogContent, { children: payload.message }),
|
|
1177
|
+
/* @__PURE__ */ jsxs3(DialogActions, { children: [
|
|
1178
|
+
/* @__PURE__ */ jsx4(Button, { onClick: () => onClose(false), children: payload.cancelText ?? t2("Layout.Dialog.Cancel") }),
|
|
1179
|
+
/* @__PURE__ */ jsx4(Button, { onClick: () => onClose(true), autoFocus: true, children: t2("Layout.Dialog.Confirm") })
|
|
1207
1180
|
] })
|
|
1208
1181
|
] });
|
|
1209
1182
|
}
|
|
@@ -1226,15 +1199,15 @@ import { Upload as TusUpload } from "tus-js-client";
|
|
|
1226
1199
|
import { uuidv7 } from "uuidv7";
|
|
1227
1200
|
|
|
1228
1201
|
// src/components/core/AppTitle.tsx
|
|
1229
|
-
import { Chip, Stack as
|
|
1202
|
+
import { Chip, Stack as Stack2, Typography as Typography3 } from "@mui/material";
|
|
1230
1203
|
import { useRouterState } from "@tanstack/react-router";
|
|
1231
|
-
import { jsx as
|
|
1204
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1232
1205
|
var AppTitle = () => {
|
|
1233
1206
|
const title = useAppTitle();
|
|
1234
|
-
return /* @__PURE__ */
|
|
1235
|
-
/* @__PURE__ */
|
|
1236
|
-
/* @__PURE__ */
|
|
1237
|
-
import.meta.env.DEV && /* @__PURE__ */
|
|
1207
|
+
return /* @__PURE__ */ jsxs4(Stack2, { direction: "row", alignItems: "center", spacing: 2, flexGrow: 1, children: [
|
|
1208
|
+
/* @__PURE__ */ jsx5("img", { src: "/favicon-32x32.png", alt: "app-logo", loading: "lazy" }),
|
|
1209
|
+
/* @__PURE__ */ jsx5(Typography3, { variant: "h6", children: title }),
|
|
1210
|
+
import.meta.env.DEV && /* @__PURE__ */ jsx5(Chip, { size: "small", label: "TEST", color: "info" })
|
|
1238
1211
|
] });
|
|
1239
1212
|
};
|
|
1240
1213
|
var useAppTitle = () => {
|
|
@@ -1446,7 +1419,7 @@ var useUploadFile = ({ subId, onSuccess, onError }) => {
|
|
|
1446
1419
|
};
|
|
1447
1420
|
|
|
1448
1421
|
// src/components/file/fileViewer/common/ActionsMenu.tsx
|
|
1449
|
-
import { jsx as
|
|
1422
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1450
1423
|
var ActionsMenu = ({ meta, menu, setMenu }) => {
|
|
1451
1424
|
const { t: t2 } = useTranslation3();
|
|
1452
1425
|
const { fileMetas, onDelete, actions } = useFile();
|
|
@@ -1470,7 +1443,7 @@ var ActionsMenu = ({ meta, menu, setMenu }) => {
|
|
|
1470
1443
|
onDelete({ remainingFileMetas, deletedFileMeta: meta });
|
|
1471
1444
|
}
|
|
1472
1445
|
};
|
|
1473
|
-
return /* @__PURE__ */
|
|
1446
|
+
return /* @__PURE__ */ jsx6(
|
|
1474
1447
|
Menu,
|
|
1475
1448
|
{
|
|
1476
1449
|
open: menu !== null,
|
|
@@ -1478,14 +1451,14 @@ var ActionsMenu = ({ meta, menu, setMenu }) => {
|
|
|
1478
1451
|
anchorReference: "anchorPosition",
|
|
1479
1452
|
variant: "menu",
|
|
1480
1453
|
anchorPosition: menu === null ? void 0 : { top: menu.mouseY, left: menu.mouseX },
|
|
1481
|
-
children: /* @__PURE__ */
|
|
1482
|
-
actions?.download !== false && /* @__PURE__ */
|
|
1483
|
-
/* @__PURE__ */
|
|
1484
|
-
/* @__PURE__ */
|
|
1454
|
+
children: /* @__PURE__ */ jsxs5(List, { disablePadding: true, children: [
|
|
1455
|
+
actions?.download !== false && /* @__PURE__ */ jsxs5(ListItemButton, { onClick: handleOnDownload, disabled: isDownloading, children: [
|
|
1456
|
+
/* @__PURE__ */ jsx6(ListItemIcon, { children: /* @__PURE__ */ jsx6(FileDownload, {}) }),
|
|
1457
|
+
/* @__PURE__ */ jsx6(ListItemText, { children: t2("Layout.File.Download") })
|
|
1485
1458
|
] }),
|
|
1486
|
-
actions?.delete !== false && /* @__PURE__ */
|
|
1487
|
-
/* @__PURE__ */
|
|
1488
|
-
/* @__PURE__ */
|
|
1459
|
+
actions?.delete !== false && /* @__PURE__ */ jsxs5(ListItemButton, { onClick: handleOnDelete, disabled: isDeleting, children: [
|
|
1460
|
+
/* @__PURE__ */ jsx6(ListItemIcon, { children: /* @__PURE__ */ jsx6(Delete, {}) }),
|
|
1461
|
+
/* @__PURE__ */ jsx6(ListItemText, { children: t2("Layout.File.Delete") })
|
|
1489
1462
|
] })
|
|
1490
1463
|
] })
|
|
1491
1464
|
}
|
|
@@ -1493,11 +1466,11 @@ var ActionsMenu = ({ meta, menu, setMenu }) => {
|
|
|
1493
1466
|
};
|
|
1494
1467
|
|
|
1495
1468
|
// src/components/file/fileViewer/FileViewerGrid.tsx
|
|
1496
|
-
import { jsx as
|
|
1469
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1497
1470
|
var IMAGE_SIZE = 150;
|
|
1498
1471
|
var FileViewerGrid = ({ sx, size, itemBar }) => {
|
|
1499
1472
|
const { fileMetas } = useFile();
|
|
1500
|
-
return /* @__PURE__ */
|
|
1473
|
+
return /* @__PURE__ */ jsx7(Stack3, { direction: "row", spacing: 1, sx: { overflow: "auto", ...sx }, children: fileMetas.map((fileMeta) => /* @__PURE__ */ jsx7(
|
|
1501
1474
|
GridFileViewerItem,
|
|
1502
1475
|
{
|
|
1503
1476
|
meta: fileMeta,
|
|
@@ -1539,10 +1512,10 @@ var GridFileViewerItem = ({ meta, size, itemBar }) => {
|
|
|
1539
1512
|
}
|
|
1540
1513
|
}
|
|
1541
1514
|
};
|
|
1542
|
-
return /* @__PURE__ */
|
|
1543
|
-
/* @__PURE__ */
|
|
1544
|
-
/* @__PURE__ */
|
|
1545
|
-
|
|
1515
|
+
return /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
1516
|
+
/* @__PURE__ */ jsxs6(ImageListItem, { sx: { width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }, onMouseEnter: handleOnMouseEnter, onMouseLeave: handleOnMouseLeave, children: [
|
|
1517
|
+
/* @__PURE__ */ jsx7(
|
|
1518
|
+
Box2,
|
|
1546
1519
|
{
|
|
1547
1520
|
component: "img",
|
|
1548
1521
|
src: source,
|
|
@@ -1552,15 +1525,15 @@ var GridFileViewerItem = ({ meta, size, itemBar }) => {
|
|
|
1552
1525
|
sx: { cursor: "pointer", objectFit: "contain", width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }
|
|
1553
1526
|
}
|
|
1554
1527
|
),
|
|
1555
|
-
itemBar !== "hidden" && showItemBar && /* @__PURE__ */
|
|
1528
|
+
itemBar !== "hidden" && showItemBar && /* @__PURE__ */ jsx7(
|
|
1556
1529
|
ImageListItemBar,
|
|
1557
1530
|
{
|
|
1558
|
-
title: /* @__PURE__ */
|
|
1559
|
-
actionIcon: (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */
|
|
1531
|
+
title: /* @__PURE__ */ jsx7(Tooltip, { title: meta.fileName, children: /* @__PURE__ */ jsx7(Box2, { children: meta.fileName }) }),
|
|
1532
|
+
actionIcon: (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx7(IconButton, { sx: { color: grey[100] }, onClick: openMenu, children: /* @__PURE__ */ jsx7(MoreVert, {}) })
|
|
1560
1533
|
}
|
|
1561
1534
|
)
|
|
1562
1535
|
] }),
|
|
1563
|
-
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */
|
|
1536
|
+
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx7(ActionsMenu, { meta, menu, setMenu })
|
|
1564
1537
|
] });
|
|
1565
1538
|
};
|
|
1566
1539
|
|
|
@@ -1571,11 +1544,11 @@ import MoreVert2 from "@mui/icons-material/MoreVert";
|
|
|
1571
1544
|
import SmartDisplay from "@mui/icons-material/SmartDisplay";
|
|
1572
1545
|
import { IconButton as IconButton2, List as List2, ListItemButton as ListItemButton2, ListItemIcon as ListItemIcon2, ListItemText as ListItemText2 } from "@mui/material";
|
|
1573
1546
|
import { Fragment as Fragment2, useState as useState4 } from "react";
|
|
1574
|
-
import { jsx as
|
|
1547
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1575
1548
|
var FileViewerList = ({ sx }) => {
|
|
1576
1549
|
const { fileMetas } = useFile();
|
|
1577
|
-
return /* @__PURE__ */
|
|
1578
|
-
(fileMeta) => /* @__PURE__ */
|
|
1550
|
+
return /* @__PURE__ */ jsx8(List2, { dense: true, sx, children: fileMetas.map(
|
|
1551
|
+
(fileMeta) => /* @__PURE__ */ jsx8(
|
|
1579
1552
|
ListFileViewerItem,
|
|
1580
1553
|
{
|
|
1581
1554
|
meta: fileMeta
|
|
@@ -1612,31 +1585,31 @@ var ListFileViewerItem = ({ meta }) => {
|
|
|
1612
1585
|
const icon = () => {
|
|
1613
1586
|
switch (meta.mediaType) {
|
|
1614
1587
|
case "image": {
|
|
1615
|
-
return /* @__PURE__ */
|
|
1588
|
+
return /* @__PURE__ */ jsx8(Image, {});
|
|
1616
1589
|
}
|
|
1617
1590
|
case "video": {
|
|
1618
|
-
return /* @__PURE__ */
|
|
1591
|
+
return /* @__PURE__ */ jsx8(SmartDisplay, {});
|
|
1619
1592
|
}
|
|
1620
1593
|
default: {
|
|
1621
|
-
return /* @__PURE__ */
|
|
1594
|
+
return /* @__PURE__ */ jsx8(AttachFile, {});
|
|
1622
1595
|
}
|
|
1623
1596
|
}
|
|
1624
1597
|
};
|
|
1625
|
-
return /* @__PURE__ */
|
|
1626
|
-
/* @__PURE__ */
|
|
1627
|
-
/* @__PURE__ */
|
|
1628
|
-
/* @__PURE__ */
|
|
1629
|
-
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */
|
|
1598
|
+
return /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
1599
|
+
/* @__PURE__ */ jsxs7(ListItemButton2, { onClick, children: [
|
|
1600
|
+
/* @__PURE__ */ jsx8(ListItemIcon2, { children: icon() }),
|
|
1601
|
+
/* @__PURE__ */ jsx8(ListItemText2, { primary: `${meta.fileName}.${meta.fileExtension}` }),
|
|
1602
|
+
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx8(IconButton2, { edge: "end", onClick: openMenu, children: /* @__PURE__ */ jsx8(MoreVert2, {}) })
|
|
1630
1603
|
] }, meta.id),
|
|
1631
|
-
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */
|
|
1604
|
+
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx8(ActionsMenu, { meta, menu, setMenu })
|
|
1632
1605
|
] });
|
|
1633
1606
|
};
|
|
1634
1607
|
|
|
1635
1608
|
// src/components/file/fileViewer/ImageViewer.tsx
|
|
1636
1609
|
import Close from "@mui/icons-material/Close";
|
|
1637
|
-
import { Box as
|
|
1610
|
+
import { Box as Box3, Dialog as Dialog2, Fab } from "@mui/material";
|
|
1638
1611
|
import { useEffect as useEffect3 } from "react";
|
|
1639
|
-
import { jsx as
|
|
1612
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1640
1613
|
var ImageViewer = ({ metaId }) => {
|
|
1641
1614
|
const { fileMetas, setImageId } = useFile();
|
|
1642
1615
|
const meta = fileMetas.find((m) => m.id === metaId);
|
|
@@ -1679,28 +1652,28 @@ var ImageViewer = ({ metaId }) => {
|
|
|
1679
1652
|
};
|
|
1680
1653
|
const onClose = () => setImageId("");
|
|
1681
1654
|
if (!metaId) return null;
|
|
1682
|
-
return /* @__PURE__ */
|
|
1683
|
-
/* @__PURE__ */
|
|
1684
|
-
/* @__PURE__ */
|
|
1655
|
+
return /* @__PURE__ */ jsxs8(Dialog2, { open: true, onClose, maxWidth: "xl", children: [
|
|
1656
|
+
/* @__PURE__ */ jsx9(Box3, { component: "img", src: source, alt: metaId, sx: { maxWidth: "100vw", maxHeight: { xs: "calc(100vh - 56px)", sm: "calc(100vh - 64px)" } } }),
|
|
1657
|
+
/* @__PURE__ */ jsx9(Fab, { size: "medium", onClick: onClose, sx: { position: "fixed", top: 8, right: 8 }, children: /* @__PURE__ */ jsx9(Close, {}) })
|
|
1685
1658
|
] });
|
|
1686
1659
|
};
|
|
1687
1660
|
|
|
1688
1661
|
// src/components/file/FileViewer.tsx
|
|
1689
|
-
import { jsx as
|
|
1662
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1690
1663
|
var FileViewer = ({ subId, onDelete, actions, children }) => {
|
|
1691
1664
|
const { data: fileMetas = [] } = useGetFileMetas(subId, { enabled: !!subId });
|
|
1692
1665
|
const [imageId, setImageId] = useState5("");
|
|
1693
1666
|
const components = { Grid: FileViewerGrid, List: FileViewerList };
|
|
1694
1667
|
if (fileMetas.length === 0) return null;
|
|
1695
|
-
return /* @__PURE__ */
|
|
1668
|
+
return /* @__PURE__ */ jsxs9(FileContext.Provider, { value: { fileMetas, onDelete, actions, setImageId }, children: [
|
|
1696
1669
|
children(components),
|
|
1697
|
-
/* @__PURE__ */
|
|
1670
|
+
/* @__PURE__ */ jsx10(ImageViewer, { metaId: imageId })
|
|
1698
1671
|
] });
|
|
1699
1672
|
};
|
|
1700
1673
|
|
|
1701
1674
|
// src/components/data-grid/ChipInputCell.tsx
|
|
1702
|
-
import { Chip as Chip2, Stack as
|
|
1703
|
-
import { jsx as
|
|
1675
|
+
import { Chip as Chip2, Stack as Stack4 } from "@mui/material";
|
|
1676
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1704
1677
|
var isArray = (value) => Array.isArray(value);
|
|
1705
1678
|
var ChipInputCell = ({ params, slotProps, getLabel }) => {
|
|
1706
1679
|
if (!params.value) return null;
|
|
@@ -1709,120 +1682,120 @@ var ChipInputCell = ({ params, slotProps, getLabel }) => {
|
|
|
1709
1682
|
return value;
|
|
1710
1683
|
};
|
|
1711
1684
|
if (isArray(params.value))
|
|
1712
|
-
return /* @__PURE__ */
|
|
1713
|
-
(value, index) => /* @__PURE__ */
|
|
1685
|
+
return /* @__PURE__ */ jsx11(Stack4, { direction: "row", alignItems: "center", gap: 1, sx: { overflowX: "auto", height: "100%", width: params.colDef.computedWidth }, children: params.value.map(
|
|
1686
|
+
(value, index) => /* @__PURE__ */ jsx11(Chip2, { label: getLabelValue(value), ...slotProps }, `${index + 1}-chip-input-cell`)
|
|
1714
1687
|
) });
|
|
1715
|
-
return /* @__PURE__ */
|
|
1688
|
+
return /* @__PURE__ */ jsx11(Chip2, { label: getLabelValue(params.value), ...slotProps });
|
|
1716
1689
|
};
|
|
1717
1690
|
|
|
1718
1691
|
// src/components/data-grid/EditableColumnHeader.tsx
|
|
1719
1692
|
import Edit from "@mui/icons-material/Edit";
|
|
1720
|
-
import { jsx as
|
|
1693
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1721
1694
|
var EditableColumnHeader = ({ colDef }) => {
|
|
1722
|
-
return /* @__PURE__ */
|
|
1695
|
+
return /* @__PURE__ */ jsx12(TypographyWithIcon, { endIcon: /* @__PURE__ */ jsx12(Edit, { color: "disabled", fontSize: "small" }), variant: "body2", className: "MuiDataGrid-columnHeaderTitle", children: colDef.headerName });
|
|
1723
1696
|
};
|
|
1724
1697
|
|
|
1725
1698
|
// src/components/router/RouterButton.tsx
|
|
1726
1699
|
import { Button as Button2 } from "@mui/material";
|
|
1727
1700
|
import { createLink } from "@tanstack/react-router";
|
|
1728
1701
|
import React3 from "react";
|
|
1729
|
-
import { jsx as
|
|
1702
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1730
1703
|
var Component = React3.forwardRef(function ButtonComponent(props, reference) {
|
|
1731
|
-
return /* @__PURE__ */
|
|
1704
|
+
return /* @__PURE__ */ jsx13(Button2, { ref: reference, component: "a", ...props });
|
|
1732
1705
|
});
|
|
1733
1706
|
var CreatedComponent = createLink(Component);
|
|
1734
1707
|
var RouterButton = (props) => {
|
|
1735
|
-
return /* @__PURE__ */
|
|
1708
|
+
return /* @__PURE__ */ jsx13(CreatedComponent, { ...props });
|
|
1736
1709
|
};
|
|
1737
1710
|
|
|
1738
1711
|
// src/components/router/RouterGridActionsCellItem.tsx
|
|
1739
1712
|
import { GridActionsCellItem } from "@mui/x-data-grid-premium";
|
|
1740
1713
|
import { createLink as createLink2 } from "@tanstack/react-router";
|
|
1741
1714
|
import React4 from "react";
|
|
1742
|
-
import { jsx as
|
|
1715
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1743
1716
|
var Component2 = React4.forwardRef(
|
|
1744
1717
|
function GridActionsCellItemComponent(props, reference) {
|
|
1745
|
-
return /* @__PURE__ */
|
|
1718
|
+
return /* @__PURE__ */ jsx14(GridActionsCellItem, { ref: reference, component: "a", ...props });
|
|
1746
1719
|
}
|
|
1747
1720
|
);
|
|
1748
1721
|
var CreatedComponent2 = createLink2(Component2);
|
|
1749
1722
|
var RouterGridActionsCellItem = (props) => {
|
|
1750
|
-
return /* @__PURE__ */
|
|
1723
|
+
return /* @__PURE__ */ jsx14(CreatedComponent2, { ...props });
|
|
1751
1724
|
};
|
|
1752
1725
|
|
|
1753
1726
|
// src/components/router/RouterIconButton.tsx
|
|
1754
1727
|
import { IconButton as IconButton3 } from "@mui/material";
|
|
1755
1728
|
import { createLink as createLink3 } from "@tanstack/react-router";
|
|
1756
1729
|
import React5 from "react";
|
|
1757
|
-
import { jsx as
|
|
1730
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1758
1731
|
var Component3 = React5.forwardRef(function IconButtonComponent(props, reference) {
|
|
1759
|
-
return /* @__PURE__ */
|
|
1732
|
+
return /* @__PURE__ */ jsx15(IconButton3, { ref: reference, component: "a", ...props });
|
|
1760
1733
|
});
|
|
1761
1734
|
var CreatedComponent3 = createLink3(Component3);
|
|
1762
1735
|
var RouterIconButton = (props) => {
|
|
1763
|
-
return /* @__PURE__ */
|
|
1736
|
+
return /* @__PURE__ */ jsx15(CreatedComponent3, { ...props });
|
|
1764
1737
|
};
|
|
1765
1738
|
|
|
1766
1739
|
// src/components/router/RouterLink.tsx
|
|
1767
1740
|
import { Link } from "@mui/material";
|
|
1768
1741
|
import { createLink as createLink4 } from "@tanstack/react-router";
|
|
1769
1742
|
import React6 from "react";
|
|
1770
|
-
import { jsx as
|
|
1743
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1771
1744
|
var Component4 = React6.forwardRef(function LinkComponent(props, reference) {
|
|
1772
|
-
return /* @__PURE__ */
|
|
1745
|
+
return /* @__PURE__ */ jsx16(Link, { ref: reference, ...props });
|
|
1773
1746
|
});
|
|
1774
1747
|
var CreatedComponent4 = createLink4(Component4);
|
|
1775
1748
|
var RouterLink = (props) => {
|
|
1776
|
-
return /* @__PURE__ */
|
|
1749
|
+
return /* @__PURE__ */ jsx16(CreatedComponent4, { ...props });
|
|
1777
1750
|
};
|
|
1778
1751
|
|
|
1779
1752
|
// src/components/router/RouterTab.tsx
|
|
1780
1753
|
import { Tab } from "@mui/material";
|
|
1781
1754
|
import { createLink as createLink5 } from "@tanstack/react-router";
|
|
1782
1755
|
import React7 from "react";
|
|
1783
|
-
import { jsx as
|
|
1756
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1784
1757
|
var Component5 = React7.forwardRef(function TabComponent(props, reference) {
|
|
1785
|
-
return /* @__PURE__ */
|
|
1758
|
+
return /* @__PURE__ */ jsx17(Tab, { ref: reference, component: "a", ...props });
|
|
1786
1759
|
});
|
|
1787
1760
|
var CreatedComponent5 = createLink5(Component5);
|
|
1788
1761
|
var RouterTab = (props) => {
|
|
1789
|
-
return /* @__PURE__ */
|
|
1762
|
+
return /* @__PURE__ */ jsx17(CreatedComponent5, { ...props });
|
|
1790
1763
|
};
|
|
1791
1764
|
|
|
1792
1765
|
// src/components/router/RouterListItemButton.tsx
|
|
1793
1766
|
import { ListItemButton as ListItemButton3 } from "@mui/material";
|
|
1794
1767
|
import { createLink as createLink6 } from "@tanstack/react-router";
|
|
1795
1768
|
import React8 from "react";
|
|
1796
|
-
import { jsx as
|
|
1769
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1797
1770
|
var Component6 = React8.forwardRef(function ButtonComponent2(props, reference) {
|
|
1798
|
-
return /* @__PURE__ */
|
|
1771
|
+
return /* @__PURE__ */ jsx18(ListItemButton3, { ref: reference, component: "a", ...props });
|
|
1799
1772
|
});
|
|
1800
1773
|
var CreatedComponent6 = createLink6(Component6);
|
|
1801
1774
|
var RouterListItemButton = (props) => {
|
|
1802
|
-
return /* @__PURE__ */
|
|
1775
|
+
return /* @__PURE__ */ jsx18(CreatedComponent6, { ...props });
|
|
1803
1776
|
};
|
|
1804
1777
|
|
|
1805
1778
|
// src/components/router/RouterNotFound.tsx
|
|
1806
|
-
import { Box as
|
|
1779
|
+
import { Box as Box4, Divider, Typography as Typography4 } from "@mui/material";
|
|
1807
1780
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
1808
|
-
import { jsx as
|
|
1781
|
+
import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1809
1782
|
function RouterNotFound() {
|
|
1810
1783
|
const { t: t2 } = useTranslation4();
|
|
1811
|
-
return /* @__PURE__ */
|
|
1812
|
-
/* @__PURE__ */
|
|
1813
|
-
/* @__PURE__ */
|
|
1814
|
-
/* @__PURE__ */
|
|
1784
|
+
return /* @__PURE__ */ jsx19(Box4, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxs10(Box4, { display: "flex", alignItems: "center", mb: 4, children: [
|
|
1785
|
+
/* @__PURE__ */ jsx19(Typography4, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "404" }),
|
|
1786
|
+
/* @__PURE__ */ jsx19(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
|
|
1787
|
+
/* @__PURE__ */ jsx19(Typography4, { variant: "h5", component: "span", children: t2("Layout.ThisPageCouldNotBeFound") })
|
|
1815
1788
|
] }) });
|
|
1816
1789
|
}
|
|
1817
1790
|
|
|
1818
1791
|
// src/components/router/RouterError.tsx
|
|
1819
|
-
import { Box as
|
|
1820
|
-
import { jsx as
|
|
1792
|
+
import { Box as Box5, Divider as Divider2, Typography as Typography5 } from "@mui/material";
|
|
1793
|
+
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1821
1794
|
var RouterError = ({ error }) => {
|
|
1822
|
-
return /* @__PURE__ */
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
/* @__PURE__ */
|
|
1825
|
-
/* @__PURE__ */
|
|
1795
|
+
return /* @__PURE__ */ jsx20(Box5, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxs11(Box5, { display: "flex", alignItems: "center", mb: 4, children: [
|
|
1796
|
+
/* @__PURE__ */ jsx20(Typography5, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: error.name || "500" }),
|
|
1797
|
+
/* @__PURE__ */ jsx20(Divider2, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
|
|
1798
|
+
/* @__PURE__ */ jsx20(Typography5, { variant: "h5", component: "span", children: error.message })
|
|
1826
1799
|
] }) });
|
|
1827
1800
|
};
|
|
1828
1801
|
|
|
@@ -2601,7 +2574,7 @@ import { cs, en } from "zod/locales";
|
|
|
2601
2574
|
// src/components/core/Layout.tsx
|
|
2602
2575
|
import Menu3 from "@mui/icons-material/Menu";
|
|
2603
2576
|
import MenuOpen from "@mui/icons-material/MenuOpen";
|
|
2604
|
-
import { AppBar, Box as
|
|
2577
|
+
import { AppBar, Box as Box9, CssBaseline, IconButton as IconButton5, InitColorSchemeScript, LinearProgress, Toolbar } from "@mui/material";
|
|
2605
2578
|
import { styled as styled2 } from "@mui/material/styles";
|
|
2606
2579
|
import { useIsFetching, useIsMutating } from "@tanstack/react-query";
|
|
2607
2580
|
import { Fragment as Fragment7 } from "react";
|
|
@@ -2609,7 +2582,7 @@ import useLocalStorageState from "use-local-storage-state";
|
|
|
2609
2582
|
|
|
2610
2583
|
// src/components/core/navigation/NavigationRail.tsx
|
|
2611
2584
|
import { useMediaQuery } from "@mui/material";
|
|
2612
|
-
import
|
|
2585
|
+
import Box7 from "@mui/material/Box";
|
|
2613
2586
|
import Drawer from "@mui/material/Drawer";
|
|
2614
2587
|
import { useTheme as useTheme2 } from "@mui/material/styles";
|
|
2615
2588
|
import { useNavigate, useRouterState as useRouterState2 } from "@tanstack/react-router";
|
|
@@ -2623,7 +2596,7 @@ import { Fragment as Fragment5, useEffect as useEffect5, useState as useState7 }
|
|
|
2623
2596
|
// src/components/core/navigation/NavigationListItem.tsx
|
|
2624
2597
|
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
2625
2598
|
import Avatar from "@mui/material/Avatar";
|
|
2626
|
-
import
|
|
2599
|
+
import Box6 from "@mui/material/Box";
|
|
2627
2600
|
import Popper from "@mui/material/Popper";
|
|
2628
2601
|
import ListItem from "@mui/material/ListItem";
|
|
2629
2602
|
import ListItemButton4 from "@mui/material/ListItemButton";
|
|
@@ -2631,10 +2604,10 @@ import ListItemIcon3 from "@mui/material/ListItemIcon";
|
|
|
2631
2604
|
import ListItemText3 from "@mui/material/ListItemText";
|
|
2632
2605
|
import Paper2 from "@mui/material/Paper";
|
|
2633
2606
|
import { styled } from "@mui/material/styles";
|
|
2634
|
-
import
|
|
2607
|
+
import Typography6 from "@mui/material/Typography";
|
|
2635
2608
|
import { Fragment as Fragment3, useMemo as useMemo3, useState as useState6 } from "react";
|
|
2636
2609
|
import { Collapse } from "@mui/material";
|
|
2637
|
-
import { Fragment as Fragment4, jsx as
|
|
2610
|
+
import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2638
2611
|
var ICON_SIZE = 34;
|
|
2639
2612
|
var StyledNavButton = styled(ListItemButton4)(({ theme }) => ({
|
|
2640
2613
|
borderRadius: 8,
|
|
@@ -2678,13 +2651,13 @@ var StyledRouterButton = styled(RouterListItemButton)(({ theme }) => ({
|
|
|
2678
2651
|
}));
|
|
2679
2652
|
var IconOrAvatar = ({ item, collapsed }) => {
|
|
2680
2653
|
if (item.icon || collapsed) {
|
|
2681
|
-
return /* @__PURE__ */
|
|
2682
|
-
/* @__PURE__ */
|
|
2654
|
+
return /* @__PURE__ */ jsxs12(Box6, { sx: collapsed ? { position: "absolute", left: "50%", top: "calc(50% - 6px)", transform: "translate(-50%, -50%)" } : {}, children: [
|
|
2655
|
+
/* @__PURE__ */ jsxs12(ListItemIcon3, { sx: { display: "flex", alignItems: "center", justifyContent: "center", minWidth: ICON_SIZE }, children: [
|
|
2683
2656
|
item.icon ?? null,
|
|
2684
|
-
!item.icon && collapsed ? /* @__PURE__ */
|
|
2657
|
+
!item.icon && collapsed ? /* @__PURE__ */ jsx21(Avatar, { sx: { width: ICON_SIZE - 7, height: ICON_SIZE - 7, fontSize: 12 }, children: item.title }) : null
|
|
2685
2658
|
] }),
|
|
2686
|
-
collapsed ? /* @__PURE__ */
|
|
2687
|
-
|
|
2659
|
+
collapsed ? /* @__PURE__ */ jsx21(
|
|
2660
|
+
Typography6,
|
|
2688
2661
|
{
|
|
2689
2662
|
variant: "caption",
|
|
2690
2663
|
sx: {
|
|
@@ -2707,7 +2680,7 @@ var IconOrAvatar = ({ item, collapsed }) => {
|
|
|
2707
2680
|
}
|
|
2708
2681
|
return null;
|
|
2709
2682
|
};
|
|
2710
|
-
var MiniPopover = ({ open, anchorEl, children }) => /* @__PURE__ */
|
|
2683
|
+
var MiniPopover = ({ open, anchorEl, children }) => /* @__PURE__ */ jsx21(
|
|
2711
2684
|
Popper,
|
|
2712
2685
|
{
|
|
2713
2686
|
open,
|
|
@@ -2718,7 +2691,7 @@ var MiniPopover = ({ open, anchorEl, children }) => /* @__PURE__ */ jsx22(
|
|
|
2718
2691
|
{ name: "preventOverflow", options: { padding: 8 } },
|
|
2719
2692
|
{ name: "flip", options: { fallbackPlacements: ["right-end", "left-start"] } }
|
|
2720
2693
|
],
|
|
2721
|
-
children: /* @__PURE__ */
|
|
2694
|
+
children: /* @__PURE__ */ jsx21(
|
|
2722
2695
|
Paper2,
|
|
2723
2696
|
{
|
|
2724
2697
|
sx: {
|
|
@@ -2760,9 +2733,9 @@ var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSideb
|
|
|
2760
2733
|
disabled,
|
|
2761
2734
|
sx: { px: 1.4, height: collapsed ? 60 : 48 }
|
|
2762
2735
|
};
|
|
2763
|
-
const buttonContent = /* @__PURE__ */
|
|
2764
|
-
/* @__PURE__ */
|
|
2765
|
-
!collapsed && /* @__PURE__ */
|
|
2736
|
+
const buttonContent = /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
2737
|
+
/* @__PURE__ */ jsx21(IconOrAvatar, { item, collapsed }),
|
|
2738
|
+
!collapsed && /* @__PURE__ */ jsx21(
|
|
2766
2739
|
ListItemText3,
|
|
2767
2740
|
{
|
|
2768
2741
|
primary: item.title,
|
|
@@ -2770,9 +2743,9 @@ var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSideb
|
|
|
2770
2743
|
sx: { ml: 1.2, flex: 1, minWidth: 0, "& .MuiTypography-root": { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } }
|
|
2771
2744
|
}
|
|
2772
2745
|
),
|
|
2773
|
-
item.children ? /* @__PURE__ */
|
|
2746
|
+
item.children ? /* @__PURE__ */ jsx21(ExpandMoreIcon, { sx: chevronSx }) : null
|
|
2774
2747
|
] });
|
|
2775
|
-
const listItem = /* @__PURE__ */
|
|
2748
|
+
const listItem = /* @__PURE__ */ jsxs12(
|
|
2776
2749
|
ListItem,
|
|
2777
2750
|
{
|
|
2778
2751
|
...item.children && collapsed ? {
|
|
@@ -2786,7 +2759,7 @@ var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSideb
|
|
|
2786
2759
|
} : {},
|
|
2787
2760
|
sx: { py: 0, px: 1, overflowX: "hidden" },
|
|
2788
2761
|
children: [
|
|
2789
|
-
shouldJustExpand ? /* @__PURE__ */
|
|
2762
|
+
shouldJustExpand ? /* @__PURE__ */ jsx21(StyledNavButton, { ...buttonProps, onClick: () => onClick?.(item), children: buttonContent }) : /* @__PURE__ */ jsx21(
|
|
2790
2763
|
StyledRouterButton,
|
|
2791
2764
|
{
|
|
2792
2765
|
...buttonProps,
|
|
@@ -2798,18 +2771,18 @@ var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSideb
|
|
|
2798
2771
|
children: buttonContent
|
|
2799
2772
|
}
|
|
2800
2773
|
),
|
|
2801
|
-
item.children && collapsed ? /* @__PURE__ */
|
|
2774
|
+
item.children && collapsed ? /* @__PURE__ */ jsx21(MiniPopover, { open: item.title === hoveredPopoverItem, anchorEl: anchorElement, children: renderNested?.(item.children) }) : null
|
|
2802
2775
|
]
|
|
2803
2776
|
}
|
|
2804
2777
|
);
|
|
2805
|
-
return /* @__PURE__ */
|
|
2778
|
+
return /* @__PURE__ */ jsxs12(Fragment3, { children: [
|
|
2806
2779
|
listItem,
|
|
2807
|
-
item.children && !collapsed ? /* @__PURE__ */
|
|
2780
|
+
item.children && !collapsed ? /* @__PURE__ */ jsx21(Collapse, { in: isOpen, timeout: "auto", unmountOnExit: true, children: renderNested?.(item.children) }) : null
|
|
2808
2781
|
] }, item.to);
|
|
2809
2782
|
};
|
|
2810
2783
|
|
|
2811
2784
|
// src/components/core/navigation/NavigationList.tsx
|
|
2812
|
-
import { jsx as
|
|
2785
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
2813
2786
|
var isPageItem = (item) => !("kind" in item);
|
|
2814
2787
|
var isDivider = (item) => "kind" in item && item.kind === "divider";
|
|
2815
2788
|
var isHeader = (item) => "kind" in item && item.kind === "header";
|
|
@@ -2819,7 +2792,7 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
2819
2792
|
if (collapsed) setOpenKeys([]);
|
|
2820
2793
|
}, [collapsed]);
|
|
2821
2794
|
const toggleKey = (key) => setOpenKeys((previous) => previous.includes(key) ? previous.filter((k) => k !== key) : [...previous, key]);
|
|
2822
|
-
const renderNested = (children) => /* @__PURE__ */
|
|
2795
|
+
const renderNested = (children) => /* @__PURE__ */ jsx22(
|
|
2823
2796
|
NavigationList,
|
|
2824
2797
|
{
|
|
2825
2798
|
subNavigation: children,
|
|
@@ -2832,7 +2805,7 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
2832
2805
|
}
|
|
2833
2806
|
);
|
|
2834
2807
|
const filteredNavigation = subNavigation.filter((nav) => !nav.hidden);
|
|
2835
|
-
return /* @__PURE__ */
|
|
2808
|
+
return /* @__PURE__ */ jsx22(
|
|
2836
2809
|
List3,
|
|
2837
2810
|
{
|
|
2838
2811
|
sx: {
|
|
@@ -2845,7 +2818,7 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
2845
2818
|
},
|
|
2846
2819
|
children: filteredNavigation.map((navItem, index) => {
|
|
2847
2820
|
if (isHeader(navItem)) {
|
|
2848
|
-
return /* @__PURE__ */
|
|
2821
|
+
return /* @__PURE__ */ jsx22(
|
|
2849
2822
|
ListSubheader,
|
|
2850
2823
|
{
|
|
2851
2824
|
sx: {
|
|
@@ -2868,13 +2841,13 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
2868
2841
|
}
|
|
2869
2842
|
if (isDivider(navItem)) {
|
|
2870
2843
|
const nextItem = filteredNavigation[index + 1];
|
|
2871
|
-
return /* @__PURE__ */
|
|
2844
|
+
return /* @__PURE__ */ jsx22("li", { children: /* @__PURE__ */ jsx22(Divider3, { sx: { mx: 1, mt: 1, mb: isHeader(nextItem) && !collapsed ? 0 : 1 } }) }, `divider-${depth}-${index}`);
|
|
2872
2845
|
}
|
|
2873
2846
|
if (!isPageItem(navItem)) return null;
|
|
2874
2847
|
const key = `item-${depth}-${index}`;
|
|
2875
2848
|
const uniqueItemKey = `${depth}-${index}-${navItem.title}`;
|
|
2876
|
-
if (renderItem) return /* @__PURE__ */
|
|
2877
|
-
return /* @__PURE__ */
|
|
2849
|
+
if (renderItem) return /* @__PURE__ */ jsx22(Fragment5, { children: renderItem(navItem, { collapsed: !!collapsed }) }, key);
|
|
2850
|
+
return /* @__PURE__ */ jsx22(
|
|
2878
2851
|
NavigationListItem,
|
|
2879
2852
|
{
|
|
2880
2853
|
item: navItem,
|
|
@@ -2895,7 +2868,7 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
2895
2868
|
};
|
|
2896
2869
|
|
|
2897
2870
|
// src/components/core/navigation/NavigationRail.tsx
|
|
2898
|
-
import { jsx as
|
|
2871
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2899
2872
|
var MINI_WIDTH = 84;
|
|
2900
2873
|
var EXPANDED_WIDTH = 320;
|
|
2901
2874
|
var TOOLBAR_HEIGHT = 64;
|
|
@@ -2904,8 +2877,8 @@ var NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
2904
2877
|
const routerState = useRouterState2();
|
|
2905
2878
|
const theme = useTheme2();
|
|
2906
2879
|
const showPermanent = useMediaQuery(theme.breakpoints.up("sm"));
|
|
2907
|
-
const drawerContent = (collapsed) => /* @__PURE__ */
|
|
2908
|
-
|
|
2880
|
+
const drawerContent = (collapsed) => /* @__PURE__ */ jsx23(
|
|
2881
|
+
Box7,
|
|
2909
2882
|
{
|
|
2910
2883
|
component: "nav",
|
|
2911
2884
|
sx: {
|
|
@@ -2918,7 +2891,7 @@ var NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
2918
2891
|
overflowX: "hidden",
|
|
2919
2892
|
pt: navigation[0] && isHeader(navigation[0]) && !collapsed ? 0 : 2
|
|
2920
2893
|
},
|
|
2921
|
-
children: /* @__PURE__ */
|
|
2894
|
+
children: /* @__PURE__ */ jsx23(
|
|
2922
2895
|
NavigationList,
|
|
2923
2896
|
{
|
|
2924
2897
|
subNavigation: navigation,
|
|
@@ -2934,7 +2907,7 @@ var NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
2934
2907
|
}
|
|
2935
2908
|
);
|
|
2936
2909
|
if (showPermanent)
|
|
2937
|
-
return /* @__PURE__ */
|
|
2910
|
+
return /* @__PURE__ */ jsx23(
|
|
2938
2911
|
Drawer,
|
|
2939
2912
|
{
|
|
2940
2913
|
variant: "permanent",
|
|
@@ -2952,7 +2925,7 @@ var NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
2952
2925
|
children: drawerContent(!expanded)
|
|
2953
2926
|
}
|
|
2954
2927
|
);
|
|
2955
|
-
return /* @__PURE__ */
|
|
2928
|
+
return /* @__PURE__ */ jsx23(Drawer, { open: expanded, onClose: () => setExpanded(false), children: drawerContent(!expanded) });
|
|
2956
2929
|
};
|
|
2957
2930
|
|
|
2958
2931
|
// src/components/core/ToolbarAccount.tsx
|
|
@@ -2966,10 +2939,10 @@ import Login from "@mui/icons-material/Login";
|
|
|
2966
2939
|
import Logout from "@mui/icons-material/Logout";
|
|
2967
2940
|
import SettingsBrightness from "@mui/icons-material/SettingsBrightness";
|
|
2968
2941
|
import Translate from "@mui/icons-material/Translate";
|
|
2969
|
-
import { Avatar as Avatar2, Box as
|
|
2942
|
+
import { Avatar as Avatar2, Box as Box8, IconButton as IconButton4, List as List4, ListItem as ListItem2, ListItemButton as ListItemButton5, ListItemIcon as ListItemIcon4, ListItemText as ListItemText4, ListSubheader as ListSubheader2, Menu as Menu2, Typography as Typography7, useColorScheme } from "@mui/material";
|
|
2970
2943
|
import { Fragment as Fragment6, useState as useState8 } from "react";
|
|
2971
2944
|
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
2972
|
-
import { jsx as
|
|
2945
|
+
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2973
2946
|
var ToolbarAccount = () => {
|
|
2974
2947
|
const [anchorElement, setAnchorElement] = useState8();
|
|
2975
2948
|
const [tab, setTab] = useState8("settings");
|
|
@@ -3012,60 +2985,60 @@ var ToolbarAccount = () => {
|
|
|
3012
2985
|
setTimeout(() => setTab("settings"), 300);
|
|
3013
2986
|
};
|
|
3014
2987
|
const changeTab = (newTab) => () => setTab(newTab);
|
|
3015
|
-
const settings = /* @__PURE__ */
|
|
3016
|
-
/* @__PURE__ */
|
|
3017
|
-
/* @__PURE__ */
|
|
3018
|
-
/* @__PURE__ */
|
|
3019
|
-
/* @__PURE__ */
|
|
2988
|
+
const settings = /* @__PURE__ */ jsxs13(List4, { component: "nav", subheader: /* @__PURE__ */ jsx24(ListSubheader2, { sx: { backgroundColor: "transparent" }, children: t2("Layout.Settings") }), children: [
|
|
2989
|
+
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: changeTab("theme"), sx: { py: 0.3 }, children: [
|
|
2990
|
+
/* @__PURE__ */ jsx24(ListItemIcon4, { children: /* @__PURE__ */ jsx24(Brightness4, {}) }),
|
|
2991
|
+
/* @__PURE__ */ jsx24(ListItemText4, { primary: t2("Layout.Appearance"), secondary: getModeText() }),
|
|
2992
|
+
/* @__PURE__ */ jsx24(ChevronRight, {})
|
|
3020
2993
|
] }),
|
|
3021
|
-
/* @__PURE__ */
|
|
3022
|
-
/* @__PURE__ */
|
|
3023
|
-
/* @__PURE__ */
|
|
3024
|
-
/* @__PURE__ */
|
|
2994
|
+
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: changeTab("language"), sx: { py: 0.3 }, children: [
|
|
2995
|
+
/* @__PURE__ */ jsx24(ListItemIcon4, { children: /* @__PURE__ */ jsx24(Translate, {}) }),
|
|
2996
|
+
/* @__PURE__ */ jsx24(ListItemText4, { primary: t2("Layout.Language"), secondary: i18n.resolvedLanguage === "en" ? "English" : "\u010Ce\u0161tina" }),
|
|
2997
|
+
/* @__PURE__ */ jsx24(ChevronRight, {})
|
|
3025
2998
|
] })
|
|
3026
2999
|
] });
|
|
3027
|
-
const theme = /* @__PURE__ */
|
|
3028
|
-
/* @__PURE__ */
|
|
3000
|
+
const theme = /* @__PURE__ */ jsxs13(List4, { subheader: /* @__PURE__ */ jsxs13(ListSubheader2, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
3001
|
+
/* @__PURE__ */ jsx24(IconButton4, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx24(ArrowBack, { fontSize: "small" }) }),
|
|
3029
3002
|
" ",
|
|
3030
3003
|
t2("Layout.Appearance")
|
|
3031
3004
|
] }), children: [
|
|
3032
|
-
/* @__PURE__ */
|
|
3033
|
-
/* @__PURE__ */
|
|
3034
|
-
/* @__PURE__ */
|
|
3005
|
+
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: changeMode("light"), disabled: mode === "light", children: [
|
|
3006
|
+
/* @__PURE__ */ jsx24(ListItemIcon4, { children: /* @__PURE__ */ jsx24(LightMode, {}) }),
|
|
3007
|
+
/* @__PURE__ */ jsx24(ListItemText4, { primary: t2("Layout.Light") })
|
|
3035
3008
|
] }),
|
|
3036
|
-
/* @__PURE__ */
|
|
3037
|
-
/* @__PURE__ */
|
|
3038
|
-
/* @__PURE__ */
|
|
3009
|
+
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: changeMode("dark"), disabled: mode === "dark", children: [
|
|
3010
|
+
/* @__PURE__ */ jsx24(ListItemIcon4, { children: /* @__PURE__ */ jsx24(DarkMode, {}) }),
|
|
3011
|
+
/* @__PURE__ */ jsx24(ListItemText4, { primary: t2("Layout.Dark") })
|
|
3039
3012
|
] }),
|
|
3040
|
-
/* @__PURE__ */
|
|
3041
|
-
/* @__PURE__ */
|
|
3042
|
-
/* @__PURE__ */
|
|
3013
|
+
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: changeMode("system"), disabled: mode === "system", children: [
|
|
3014
|
+
/* @__PURE__ */ jsx24(ListItemIcon4, { children: /* @__PURE__ */ jsx24(SettingsBrightness, {}) }),
|
|
3015
|
+
/* @__PURE__ */ jsx24(ListItemText4, { primary: t2("Layout.System") })
|
|
3043
3016
|
] })
|
|
3044
3017
|
] });
|
|
3045
|
-
const language = /* @__PURE__ */
|
|
3046
|
-
/* @__PURE__ */
|
|
3018
|
+
const language = /* @__PURE__ */ jsxs13(List4, { subheader: /* @__PURE__ */ jsxs13(ListSubheader2, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
3019
|
+
/* @__PURE__ */ jsx24(IconButton4, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx24(ArrowBack, { fontSize: "small" }) }),
|
|
3047
3020
|
" ",
|
|
3048
3021
|
t2("Layout.Language")
|
|
3049
3022
|
] }), children: [
|
|
3050
|
-
/* @__PURE__ */
|
|
3051
|
-
/* @__PURE__ */
|
|
3023
|
+
/* @__PURE__ */ jsx24(ListItemButton5, { onClick: changeLanguage("en"), disabled: i18n.resolvedLanguage === "en", children: /* @__PURE__ */ jsx24(ListItemText4, { primary: "English" }) }),
|
|
3024
|
+
/* @__PURE__ */ jsx24(ListItemButton5, { onClick: changeLanguage("cs"), disabled: i18n.resolvedLanguage === "cs", children: /* @__PURE__ */ jsx24(ListItemText4, { primary: "\u010Ce\u0161tina" }) })
|
|
3052
3025
|
] });
|
|
3053
|
-
return /* @__PURE__ */
|
|
3054
|
-
/* @__PURE__ */
|
|
3055
|
-
/* @__PURE__ */
|
|
3056
|
-
/* @__PURE__ */
|
|
3057
|
-
/* @__PURE__ */
|
|
3058
|
-
/* @__PURE__ */
|
|
3059
|
-
/* @__PURE__ */
|
|
3060
|
-
/* @__PURE__ */
|
|
3026
|
+
return /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
3027
|
+
/* @__PURE__ */ jsx24(IconButton4, { size: "small", edge: "end", onClick: openMenu, children: user.name ? /* @__PURE__ */ jsx24(Avatar2, { sx: { width: { xs: 32, sm: 40 }, height: { xs: 32, sm: 40 }, bgcolor: "primary.main" }, children: /* @__PURE__ */ jsx24(Typography7, { variant: "subtitle2", sx: { fontWeight: "bold", lineHeight: 0 }, children: usernameInitials() }) }) : /* @__PURE__ */ jsx24(AccountCircle, { fontSize: "large" }) }),
|
|
3028
|
+
/* @__PURE__ */ jsx24(Menu2, { anchorEl: anchorElement, open, onClose: closeMenu, children: /* @__PURE__ */ jsxs13(Box8, { sx: { width: 240 }, children: [
|
|
3029
|
+
/* @__PURE__ */ jsx24(List4, { children: user.name ? /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
3030
|
+
/* @__PURE__ */ jsx24(ListItem2, { children: /* @__PURE__ */ jsx24(ListItemText4, { primary: user.name, secondary: /* @__PURE__ */ jsxs13("span", { children: [
|
|
3031
|
+
/* @__PURE__ */ jsx24("span", { children: user.employeeId }),
|
|
3032
|
+
/* @__PURE__ */ jsx24("br", {}),
|
|
3033
|
+
/* @__PURE__ */ jsx24("span", { children: user.department })
|
|
3061
3034
|
] }) }) }),
|
|
3062
|
-
/* @__PURE__ */
|
|
3063
|
-
/* @__PURE__ */
|
|
3064
|
-
/* @__PURE__ */
|
|
3035
|
+
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: () => console.log("Logout"), children: [
|
|
3036
|
+
/* @__PURE__ */ jsx24(ListItemIcon4, { children: /* @__PURE__ */ jsx24(Logout, { color: "error" }) }),
|
|
3037
|
+
/* @__PURE__ */ jsx24(ListItemText4, { primary: t2("Layout.Logout") })
|
|
3065
3038
|
] })
|
|
3066
|
-
] }) : /* @__PURE__ */
|
|
3067
|
-
/* @__PURE__ */
|
|
3068
|
-
/* @__PURE__ */
|
|
3039
|
+
] }) : /* @__PURE__ */ jsxs13(ListItemButton5, { onClick: () => console.log("Login"), children: [
|
|
3040
|
+
/* @__PURE__ */ jsx24(ListItemIcon4, { children: /* @__PURE__ */ jsx24(Login, { color: "success" }) }),
|
|
3041
|
+
/* @__PURE__ */ jsx24(ListItemText4, { primary: t2("Layout.LogIn") })
|
|
3069
3042
|
] }) }),
|
|
3070
3043
|
tab === "settings" && settings,
|
|
3071
3044
|
tab === "theme" && theme,
|
|
@@ -3075,7 +3048,7 @@ var ToolbarAccount = () => {
|
|
|
3075
3048
|
};
|
|
3076
3049
|
|
|
3077
3050
|
// src/components/core/Layout.tsx
|
|
3078
|
-
import { jsx as
|
|
3051
|
+
import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3079
3052
|
var DrawerHeader = styled2("div")(({ theme }) => ({
|
|
3080
3053
|
display: "flex",
|
|
3081
3054
|
alignItems: "center",
|
|
@@ -3087,11 +3060,11 @@ var Layout = (props) => {
|
|
|
3087
3060
|
const [navigationOpen, setNavigationOpen] = useLocalStorageState("navigationOpen", { defaultServerValue: false });
|
|
3088
3061
|
const isFetching = !!useIsFetching();
|
|
3089
3062
|
const isMutating = !!useIsMutating();
|
|
3090
|
-
return /* @__PURE__ */
|
|
3091
|
-
/* @__PURE__ */
|
|
3092
|
-
/* @__PURE__ */
|
|
3093
|
-
/* @__PURE__ */
|
|
3094
|
-
/* @__PURE__ */
|
|
3063
|
+
return /* @__PURE__ */ jsxs14(Fragment7, { children: [
|
|
3064
|
+
/* @__PURE__ */ jsx25(InitColorSchemeScript, {}),
|
|
3065
|
+
/* @__PURE__ */ jsx25(CssBaseline, {}),
|
|
3066
|
+
/* @__PURE__ */ jsxs14(Box9, { sx: { display: "flex", height: "100dvh", maxHeight: "100dvh", overflow: "hidden", width: "100%" }, children: [
|
|
3067
|
+
/* @__PURE__ */ jsx25(
|
|
3095
3068
|
AppBar,
|
|
3096
3069
|
{
|
|
3097
3070
|
color: "transparent",
|
|
@@ -3101,27 +3074,27 @@ var Layout = (props) => {
|
|
|
3101
3074
|
borderColor: theme.vars?.palette.divider,
|
|
3102
3075
|
boxShadow: "none"
|
|
3103
3076
|
}),
|
|
3104
|
-
children: /* @__PURE__ */
|
|
3105
|
-
props.navigation && /* @__PURE__ */
|
|
3077
|
+
children: /* @__PURE__ */ jsxs14(Toolbar, { children: [
|
|
3078
|
+
props.navigation && /* @__PURE__ */ jsx25(
|
|
3106
3079
|
IconButton5,
|
|
3107
3080
|
{
|
|
3108
3081
|
onClick: () => setNavigationOpen((previous) => !previous),
|
|
3109
3082
|
sx: { marginRight: 2 },
|
|
3110
|
-
children: navigationOpen ? /* @__PURE__ */
|
|
3083
|
+
children: navigationOpen ? /* @__PURE__ */ jsx25(MenuOpen, {}) : /* @__PURE__ */ jsx25(Menu3, {})
|
|
3111
3084
|
}
|
|
3112
3085
|
),
|
|
3113
|
-
/* @__PURE__ */
|
|
3114
|
-
/* @__PURE__ */
|
|
3086
|
+
/* @__PURE__ */ jsx25(AppTitle, {}),
|
|
3087
|
+
/* @__PURE__ */ jsx25(ToolbarAccount, {})
|
|
3115
3088
|
] })
|
|
3116
3089
|
}
|
|
3117
3090
|
),
|
|
3118
|
-
props.navigation && /* @__PURE__ */
|
|
3119
|
-
/* @__PURE__ */
|
|
3120
|
-
/* @__PURE__ */
|
|
3121
|
-
/* @__PURE__ */
|
|
3091
|
+
props.navigation && /* @__PURE__ */ jsx25(NavigationRail, { navigation: props.navigation, expanded: navigationOpen ?? false, setExpanded: setNavigationOpen }),
|
|
3092
|
+
/* @__PURE__ */ jsxs14(Box9, { component: "main", sx: { flexGrow: 1, display: "flex", flexDirection: "column", minWidth: 0, height: "100%", overflow: "hidden" }, children: [
|
|
3093
|
+
/* @__PURE__ */ jsx25(DrawerHeader, {}),
|
|
3094
|
+
/* @__PURE__ */ jsx25(Box9, { sx: { flex: 1, overflow: "auto", position: "relative" }, children: props.children })
|
|
3122
3095
|
] })
|
|
3123
3096
|
] }),
|
|
3124
|
-
(isFetching || isMutating) && /* @__PURE__ */
|
|
3097
|
+
(isFetching || isMutating) && /* @__PURE__ */ jsx25(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
|
|
3125
3098
|
] });
|
|
3126
3099
|
};
|
|
3127
3100
|
|
|
@@ -3882,6 +3855,30 @@ var useGetTheme = (theme) => {
|
|
|
3882
3855
|
};
|
|
3883
3856
|
}
|
|
3884
3857
|
},
|
|
3858
|
+
MuiDataGrid: {
|
|
3859
|
+
styleOverrides: {
|
|
3860
|
+
root: ({ theme: muiTheme }) => ({
|
|
3861
|
+
"& .MuiDataGrid-cell--editing": {
|
|
3862
|
+
"& .MuiInputBase-root": {
|
|
3863
|
+
height: "100%"
|
|
3864
|
+
}
|
|
3865
|
+
},
|
|
3866
|
+
"& .MuiDataGrid-columnHeaderTitle": {
|
|
3867
|
+
fontWeight: 600
|
|
3868
|
+
},
|
|
3869
|
+
"& .Mui-error": {
|
|
3870
|
+
backgroundColor: muiTheme.palette.error.main,
|
|
3871
|
+
color: muiTheme.palette.error.contrastText
|
|
3872
|
+
},
|
|
3873
|
+
"& .MuiDataGrid-booleanCell[data-value='true']": {
|
|
3874
|
+
color: `${muiTheme.palette.success.main} !important`
|
|
3875
|
+
},
|
|
3876
|
+
"& .MuiDataGrid-booleanCell[data-value='false']": {
|
|
3877
|
+
color: `${muiTheme.palette.error.main} !important`
|
|
3878
|
+
}
|
|
3879
|
+
})
|
|
3880
|
+
}
|
|
3881
|
+
},
|
|
3885
3882
|
...theme?.components
|
|
3886
3883
|
}
|
|
3887
3884
|
},
|
|
@@ -3893,7 +3890,7 @@ var useGetTheme = (theme) => {
|
|
|
3893
3890
|
|
|
3894
3891
|
// src/providers/DialogsProvider.tsx
|
|
3895
3892
|
import { useCallback, useId, useMemo as useMemo4, useRef as useRef3, useState as useState9 } from "react";
|
|
3896
|
-
import { jsx as
|
|
3893
|
+
import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3897
3894
|
function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
3898
3895
|
const [stack, setStack] = useState9([]);
|
|
3899
3896
|
const keyPrefix = useId();
|
|
@@ -3945,9 +3942,9 @@ function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
|
3945
3942
|
return dialog;
|
|
3946
3943
|
});
|
|
3947
3944
|
const contextValue = useMemo4(() => ({ open: requestDialog, close: closeDialog }), [requestDialog, closeDialog]);
|
|
3948
|
-
return /* @__PURE__ */
|
|
3945
|
+
return /* @__PURE__ */ jsxs15(DialogsContext.Provider, { value: contextValue, children: [
|
|
3949
3946
|
children,
|
|
3950
|
-
stack.map(({ key, open, Component: Component7, payload, promise }) => /* @__PURE__ */
|
|
3947
|
+
stack.map(({ key, open, Component: Component7, payload, promise }) => /* @__PURE__ */ jsx26(
|
|
3951
3948
|
Component7,
|
|
3952
3949
|
{
|
|
3953
3950
|
payload,
|
|
@@ -3962,7 +3959,7 @@ function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
|
3962
3959
|
}
|
|
3963
3960
|
|
|
3964
3961
|
// src/providers/LayoutProvider.tsx
|
|
3965
|
-
import { jsx as
|
|
3962
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
3966
3963
|
var LayoutProvider = ({ navigation, theme, children }) => {
|
|
3967
3964
|
const { i18n } = useTranslation7();
|
|
3968
3965
|
const createdTheme = useGetTheme(theme);
|
|
@@ -3976,7 +3973,7 @@ var LayoutProvider = ({ navigation, theme, children }) => {
|
|
|
3976
3973
|
i18n.off("languageChanged", handler);
|
|
3977
3974
|
};
|
|
3978
3975
|
}, []);
|
|
3979
|
-
return /* @__PURE__ */
|
|
3976
|
+
return /* @__PURE__ */ jsx27(ThemeProvider, { theme: createdTheme, children: /* @__PURE__ */ jsx27(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n.resolvedLanguage, children: /* @__PURE__ */ jsx27(DialogsProvider, { children: /* @__PURE__ */ jsx27(Layout, { navigation, children }) }) }) });
|
|
3980
3977
|
};
|
|
3981
3978
|
|
|
3982
3979
|
// src/index.ts
|
|
@@ -3998,11 +3995,11 @@ var getFieldStatus = (field) => {
|
|
|
3998
3995
|
};
|
|
3999
3996
|
|
|
4000
3997
|
// src/components/form/FormAutocomplete.tsx
|
|
4001
|
-
import { jsx as
|
|
3998
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4002
3999
|
var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
4003
4000
|
const field = useFieldContext();
|
|
4004
4001
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4005
|
-
return /* @__PURE__ */
|
|
4002
|
+
return /* @__PURE__ */ jsx28(
|
|
4006
4003
|
Autocomplete,
|
|
4007
4004
|
{
|
|
4008
4005
|
value: field.state.value,
|
|
@@ -4011,7 +4008,7 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
|
4011
4008
|
onBlur: field.handleBlur,
|
|
4012
4009
|
"aria-label": field.name,
|
|
4013
4010
|
...autocompleteProps,
|
|
4014
|
-
renderInput: (parameters) => /* @__PURE__ */
|
|
4011
|
+
renderInput: (parameters) => /* @__PURE__ */ jsx28(
|
|
4015
4012
|
TextField,
|
|
4016
4013
|
{
|
|
4017
4014
|
...parameters,
|
|
@@ -4027,15 +4024,15 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
|
4027
4024
|
|
|
4028
4025
|
// src/components/form/FormCheckbox.tsx
|
|
4029
4026
|
import { Checkbox, FormControl, FormControlLabel, FormHelperText } from "@mui/material";
|
|
4030
|
-
import { jsx as
|
|
4027
|
+
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4031
4028
|
var FormCheckbox = (props) => {
|
|
4032
4029
|
const field = useFieldContext();
|
|
4033
4030
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4034
|
-
return /* @__PURE__ */
|
|
4035
|
-
/* @__PURE__ */
|
|
4031
|
+
return /* @__PURE__ */ jsxs16(FormControl, { component: "fieldset", children: [
|
|
4032
|
+
/* @__PURE__ */ jsx29(
|
|
4036
4033
|
FormControlLabel,
|
|
4037
4034
|
{
|
|
4038
|
-
control: /* @__PURE__ */
|
|
4035
|
+
control: /* @__PURE__ */ jsx29(
|
|
4039
4036
|
Checkbox,
|
|
4040
4037
|
{
|
|
4041
4038
|
name: field.name,
|
|
@@ -4049,18 +4046,18 @@ var FormCheckbox = (props) => {
|
|
|
4049
4046
|
label: props.label ?? ""
|
|
4050
4047
|
}
|
|
4051
4048
|
),
|
|
4052
|
-
isTouched && hasError && /* @__PURE__ */
|
|
4049
|
+
isTouched && hasError && /* @__PURE__ */ jsx29(FormHelperText, { error: hasError, children: helperText })
|
|
4053
4050
|
] });
|
|
4054
4051
|
};
|
|
4055
4052
|
|
|
4056
4053
|
// src/components/form/FormDatePicker.tsx
|
|
4057
4054
|
import { DatePicker } from "@mui/x-date-pickers-pro";
|
|
4058
4055
|
import dayjs2 from "dayjs";
|
|
4059
|
-
import { jsx as
|
|
4056
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4060
4057
|
var FormDatePicker = (props) => {
|
|
4061
4058
|
const field = useFieldContext();
|
|
4062
4059
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4063
|
-
return /* @__PURE__ */
|
|
4060
|
+
return /* @__PURE__ */ jsx30(
|
|
4064
4061
|
DatePicker,
|
|
4065
4062
|
{
|
|
4066
4063
|
name: field.name,
|
|
@@ -4084,11 +4081,11 @@ var FormDatePicker = (props) => {
|
|
|
4084
4081
|
// src/components/form/FormDateTimePicker.tsx
|
|
4085
4082
|
import { DateTimePicker } from "@mui/x-date-pickers-pro";
|
|
4086
4083
|
import dayjs3 from "dayjs";
|
|
4087
|
-
import { jsx as
|
|
4084
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4088
4085
|
var FormDateTimePicker = (props) => {
|
|
4089
4086
|
const field = useFieldContext();
|
|
4090
4087
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4091
|
-
return /* @__PURE__ */
|
|
4088
|
+
return /* @__PURE__ */ jsx31(
|
|
4092
4089
|
DateTimePicker,
|
|
4093
4090
|
{
|
|
4094
4091
|
name: field.name,
|
|
@@ -4112,11 +4109,11 @@ var FormDateTimePicker = (props) => {
|
|
|
4112
4109
|
// src/components/form/FormNumberField.tsx
|
|
4113
4110
|
import { TextField as TextField2 } from "@mui/material";
|
|
4114
4111
|
import { NumericFormat } from "react-number-format";
|
|
4115
|
-
import { jsx as
|
|
4112
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4116
4113
|
var FormNumberField = ({ options, ...props }) => {
|
|
4117
4114
|
const field = useFieldContext();
|
|
4118
4115
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4119
|
-
return /* @__PURE__ */
|
|
4116
|
+
return /* @__PURE__ */ jsx32(
|
|
4120
4117
|
NumericFormat,
|
|
4121
4118
|
{
|
|
4122
4119
|
customInput: TextField2,
|
|
@@ -4135,13 +4132,13 @@ var FormNumberField = ({ options, ...props }) => {
|
|
|
4135
4132
|
|
|
4136
4133
|
// src/components/form/FormRadioGroup.tsx
|
|
4137
4134
|
import { FormControl as FormControl2, FormControlLabel as FormControlLabel2, FormHelperText as FormHelperText2, FormLabel, Radio, RadioGroup } from "@mui/material";
|
|
4138
|
-
import { jsx as
|
|
4135
|
+
import { jsx as jsx33, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4139
4136
|
var FormRadioGroup = ({ label, options, ...props }) => {
|
|
4140
4137
|
const field = useFieldContext();
|
|
4141
4138
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4142
|
-
return /* @__PURE__ */
|
|
4143
|
-
label && /* @__PURE__ */
|
|
4144
|
-
/* @__PURE__ */
|
|
4139
|
+
return /* @__PURE__ */ jsxs17(FormControl2, { component: "fieldset", children: [
|
|
4140
|
+
label && /* @__PURE__ */ jsx33(FormLabel, { component: "legend", children: label }),
|
|
4141
|
+
/* @__PURE__ */ jsx33(
|
|
4145
4142
|
RadioGroup,
|
|
4146
4143
|
{
|
|
4147
4144
|
name: field.name,
|
|
@@ -4150,30 +4147,30 @@ var FormRadioGroup = ({ label, options, ...props }) => {
|
|
|
4150
4147
|
onBlur: field.handleBlur,
|
|
4151
4148
|
"aria-label": field.name,
|
|
4152
4149
|
...props,
|
|
4153
|
-
children: options.map((option) => /* @__PURE__ */
|
|
4150
|
+
children: options.map((option) => /* @__PURE__ */ jsx33(
|
|
4154
4151
|
FormControlLabel2,
|
|
4155
4152
|
{
|
|
4156
4153
|
value: option.value,
|
|
4157
|
-
control: /* @__PURE__ */
|
|
4154
|
+
control: /* @__PURE__ */ jsx33(Radio, {}),
|
|
4158
4155
|
label: option.label
|
|
4159
4156
|
},
|
|
4160
4157
|
option.value
|
|
4161
4158
|
))
|
|
4162
4159
|
}
|
|
4163
4160
|
),
|
|
4164
|
-
isTouched && hasError && /* @__PURE__ */
|
|
4161
|
+
isTouched && hasError && /* @__PURE__ */ jsx33(FormHelperText2, { error: hasError, children: helperText })
|
|
4165
4162
|
] });
|
|
4166
4163
|
};
|
|
4167
4164
|
|
|
4168
4165
|
// src/components/form/FormSlider.tsx
|
|
4169
4166
|
import { FormControl as FormControl3, FormHelperText as FormHelperText3, FormLabel as FormLabel2, Slider } from "@mui/material";
|
|
4170
|
-
import { jsx as
|
|
4167
|
+
import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4171
4168
|
var FormSlider = ({ label, ...props }) => {
|
|
4172
4169
|
const field = useFieldContext();
|
|
4173
4170
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4174
|
-
return /* @__PURE__ */
|
|
4175
|
-
label && /* @__PURE__ */
|
|
4176
|
-
/* @__PURE__ */
|
|
4171
|
+
return /* @__PURE__ */ jsxs18(FormControl3, { component: "fieldset", children: [
|
|
4172
|
+
label && /* @__PURE__ */ jsx34(FormLabel2, { children: label }),
|
|
4173
|
+
/* @__PURE__ */ jsx34(
|
|
4177
4174
|
Slider,
|
|
4178
4175
|
{
|
|
4179
4176
|
name: field.name,
|
|
@@ -4184,13 +4181,13 @@ var FormSlider = ({ label, ...props }) => {
|
|
|
4184
4181
|
...props
|
|
4185
4182
|
}
|
|
4186
4183
|
),
|
|
4187
|
-
isTouched && hasError && /* @__PURE__ */
|
|
4184
|
+
isTouched && hasError && /* @__PURE__ */ jsx34(FormHelperText3, { error: hasError, children: helperText })
|
|
4188
4185
|
] });
|
|
4189
4186
|
};
|
|
4190
4187
|
|
|
4191
4188
|
// src/components/form/FormSubmitButton.tsx
|
|
4192
4189
|
import { Button as Button3 } from "@mui/material";
|
|
4193
|
-
import { jsx as
|
|
4190
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4194
4191
|
var FormSubmitButton = (props) => {
|
|
4195
4192
|
const form = useFormContext();
|
|
4196
4193
|
const handleClick = (event) => {
|
|
@@ -4198,7 +4195,7 @@ var FormSubmitButton = (props) => {
|
|
|
4198
4195
|
event.stopPropagation();
|
|
4199
4196
|
form.handleSubmit();
|
|
4200
4197
|
};
|
|
4201
|
-
return /* @__PURE__ */
|
|
4198
|
+
return /* @__PURE__ */ jsx35(form.Subscribe, { selector: (state) => [state.canSubmit, state.isSubmitting], children: ([canSubmit, isSubmitting]) => /* @__PURE__ */ jsx35(
|
|
4202
4199
|
Button3,
|
|
4203
4200
|
{
|
|
4204
4201
|
loading: isSubmitting,
|
|
@@ -4213,15 +4210,15 @@ var FormSubmitButton = (props) => {
|
|
|
4213
4210
|
|
|
4214
4211
|
// src/components/form/FormSwitch.tsx
|
|
4215
4212
|
import { FormControl as FormControl4, FormControlLabel as FormControlLabel3, FormHelperText as FormHelperText4, Switch } from "@mui/material";
|
|
4216
|
-
import { jsx as
|
|
4213
|
+
import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4217
4214
|
var FormSwitch = (props) => {
|
|
4218
4215
|
const field = useFieldContext();
|
|
4219
4216
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4220
|
-
return /* @__PURE__ */
|
|
4221
|
-
/* @__PURE__ */
|
|
4217
|
+
return /* @__PURE__ */ jsxs19(FormControl4, { component: "fieldset", children: [
|
|
4218
|
+
/* @__PURE__ */ jsx36(
|
|
4222
4219
|
FormControlLabel3,
|
|
4223
4220
|
{
|
|
4224
|
-
control: /* @__PURE__ */
|
|
4221
|
+
control: /* @__PURE__ */ jsx36(
|
|
4225
4222
|
Switch,
|
|
4226
4223
|
{
|
|
4227
4224
|
name: field.name,
|
|
@@ -4235,17 +4232,17 @@ var FormSwitch = (props) => {
|
|
|
4235
4232
|
label: props.label ?? ""
|
|
4236
4233
|
}
|
|
4237
4234
|
),
|
|
4238
|
-
isTouched && hasError && /* @__PURE__ */
|
|
4235
|
+
isTouched && hasError && /* @__PURE__ */ jsx36(FormHelperText4, { error: hasError, children: helperText })
|
|
4239
4236
|
] });
|
|
4240
4237
|
};
|
|
4241
4238
|
|
|
4242
4239
|
// src/components/form/FormTextField.tsx
|
|
4243
4240
|
import { TextField as TextField3 } from "@mui/material";
|
|
4244
|
-
import { jsx as
|
|
4241
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
4245
4242
|
var FormTextField = (props) => {
|
|
4246
4243
|
const field = useFieldContext();
|
|
4247
4244
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4248
|
-
return /* @__PURE__ */
|
|
4245
|
+
return /* @__PURE__ */ jsx37(
|
|
4249
4246
|
TextField3,
|
|
4250
4247
|
{
|
|
4251
4248
|
name: field.name,
|
|
@@ -4290,8 +4287,8 @@ export {
|
|
|
4290
4287
|
Dropzone,
|
|
4291
4288
|
EditableColumnHeader,
|
|
4292
4289
|
FileViewer,
|
|
4290
|
+
Fullscreen,
|
|
4293
4291
|
LayoutProvider,
|
|
4294
|
-
PageHeader,
|
|
4295
4292
|
Platform,
|
|
4296
4293
|
RouterButton,
|
|
4297
4294
|
RouterError,
|
|
@@ -4301,7 +4298,6 @@ export {
|
|
|
4301
4298
|
RouterListItemButton,
|
|
4302
4299
|
RouterNotFound,
|
|
4303
4300
|
RouterTab,
|
|
4304
|
-
TableContainer,
|
|
4305
4301
|
TypographyWithIcon,
|
|
4306
4302
|
rootRouteHead,
|
|
4307
4303
|
t,
|