wcz-test 4.5.6 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -206,7 +206,7 @@ var require_react_is_development = __commonJS({
206
206
  var ContextProvider = REACT_PROVIDER_TYPE;
207
207
  var Element = REACT_ELEMENT_TYPE;
208
208
  var ForwardRef = REACT_FORWARD_REF_TYPE;
209
- var Fragment7 = REACT_FRAGMENT_TYPE;
209
+ var Fragment8 = REACT_FRAGMENT_TYPE;
210
210
  var Lazy = REACT_LAZY_TYPE;
211
211
  var Memo = REACT_MEMO_TYPE;
212
212
  var Portal = REACT_PORTAL_TYPE;
@@ -265,7 +265,7 @@ var require_react_is_development = __commonJS({
265
265
  exports.ContextProvider = ContextProvider;
266
266
  exports.Element = Element;
267
267
  exports.ForwardRef = ForwardRef;
268
- exports.Fragment = Fragment7;
268
+ exports.Fragment = Fragment8;
269
269
  exports.Lazy = Lazy;
270
270
  exports.Memo = Memo;
271
271
  exports.Portal = Portal;
@@ -1039,14 +1039,17 @@ var TypographyWithIcon = ({ startIcon, endIcon, children, sx, gutterBottom, ...p
1039
1039
  };
1040
1040
 
1041
1041
  // src/components/core/PageHeader.tsx
1042
- import { CardHeader, Typography as Typography2 } from "@mui/material";
1043
- import { jsx as jsx2 } from "react/jsx-runtime";
1042
+ import { Box, Stack as Stack2, Typography as Typography2 } from "@mui/material";
1043
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1044
1044
  var PageHeader = ({ title, action, sx }) => {
1045
- return /* @__PURE__ */ jsx2(CardHeader, { title: /* @__PURE__ */ jsx2(Typography2, { variant: "h4", fontWeight: 600, children: title }), action, sx: { px: 0, ...sx } });
1045
+ return /* @__PURE__ */ jsxs2(Stack2, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { ...sx }, children: [
1046
+ /* @__PURE__ */ jsx2(Typography2, { variant: "h4", fontWeight: 600, children: title }),
1047
+ action && /* @__PURE__ */ jsx2(Box, { children: action })
1048
+ ] });
1046
1049
  };
1047
1050
 
1048
1051
  // src/components/core/TableContainer.tsx
1049
- import { Box } from "@mui/material";
1052
+ import { Box as Box2 } from "@mui/material";
1050
1053
  import { useEffect, useRef, useState } from "react";
1051
1054
  import { jsx as jsx3 } from "react/jsx-runtime";
1052
1055
  var TableContainer = ({ children, sx, ...props }) => {
@@ -1073,7 +1076,7 @@ var TableContainer = ({ children, sx, ...props }) => {
1073
1076
  };
1074
1077
  }, []);
1075
1078
  return /* @__PURE__ */ jsx3(
1076
- Box,
1079
+ Box2,
1077
1080
  {
1078
1081
  ref: reference,
1079
1082
  sx: {
@@ -1085,7 +1088,7 @@ var TableContainer = ({ children, sx, ...props }) => {
1085
1088
  },
1086
1089
  height,
1087
1090
  ...props,
1088
- children: /* @__PURE__ */ jsx3(Box, { sx: (theme) => ({
1091
+ children: /* @__PURE__ */ jsx3(Box2, { sx: (theme) => ({
1089
1092
  flex: 1,
1090
1093
  minHeight: 0,
1091
1094
  height: "100%",
@@ -1117,7 +1120,7 @@ import CloudUpload from "@mui/icons-material/CloudUpload";
1117
1120
  import { Paper, Typography as Typography3, useTheme } from "@mui/material";
1118
1121
  import { useDropzone } from "react-dropzone";
1119
1122
  import { useTranslation } from "react-i18next";
1120
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
1123
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
1121
1124
  var baseStyle = {
1122
1125
  flex: 1,
1123
1126
  display: "flex",
@@ -1141,7 +1144,7 @@ var Dropzone = ({ sx, ...props }) => {
1141
1144
  ...isDragAccept ? { borderColor: theme.palette.success.main } : {},
1142
1145
  ...isDragReject ? { borderColor: theme.palette.error.main } : {}
1143
1146
  };
1144
- return /* @__PURE__ */ jsxs2(Paper, { variant: "outlined", ...getRootProps({ style }), sx, children: [
1147
+ return /* @__PURE__ */ jsxs3(Paper, { variant: "outlined", ...getRootProps({ style }), sx, children: [
1145
1148
  /* @__PURE__ */ jsx4("input", { ...getInputProps(), style: { display: "none" } }),
1146
1149
  /* @__PURE__ */ jsx4(CloudUpload, {}),
1147
1150
  /* @__PURE__ */ jsx4(Typography3, { children: t2("Layout.File.DragSomeFilesHereOrClickToSelectThem") })
@@ -1153,7 +1156,7 @@ import { useState as useState5 } from "react";
1153
1156
 
1154
1157
  // src/components/file/fileViewer/FileViewerGrid.tsx
1155
1158
  import MoreVert from "@mui/icons-material/MoreVert";
1156
- import { Box as Box2, IconButton, ImageListItem, ImageListItemBar, Stack as Stack3, Tooltip } from "@mui/material";
1159
+ import { Box as Box3, IconButton, ImageListItem, ImageListItemBar, Stack as Stack4, Tooltip } from "@mui/material";
1157
1160
  import { grey } from "@mui/material/colors";
1158
1161
  import { Fragment, useEffect as useEffect2, useState as useState3 } from "react";
1159
1162
 
@@ -1184,10 +1187,10 @@ import { createContext as createContext2 } from "react";
1184
1187
  var DialogsContext = createContext2({});
1185
1188
 
1186
1189
  // src/hooks/DialogsHooks.tsx
1187
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
1190
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
1188
1191
  function AlertDialog({ open, payload, onClose }) {
1189
1192
  const { t: t2 } = useTranslation2();
1190
- return /* @__PURE__ */ jsxs3(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(), children: [
1193
+ return /* @__PURE__ */ jsxs4(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(), children: [
1191
1194
  /* @__PURE__ */ jsx5(DialogTitle, { children: payload.title ?? t2("Layout.Dialog.Alert") }),
1192
1195
  /* @__PURE__ */ jsx5(DialogContent, { children: payload.message }),
1193
1196
  /* @__PURE__ */ jsx5(DialogActions, { children: /* @__PURE__ */ jsx5(Button, { disabled: !open, onClick: () => onClose(), children: t2("Layout.Dialog.Confirm") }) })
@@ -1195,10 +1198,10 @@ function AlertDialog({ open, payload, onClose }) {
1195
1198
  }
1196
1199
  function ConfirmDialog({ open, payload, onClose }) {
1197
1200
  const { t: t2 } = useTranslation2();
1198
- return /* @__PURE__ */ jsxs3(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(false), children: [
1201
+ return /* @__PURE__ */ jsxs4(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(false), children: [
1199
1202
  /* @__PURE__ */ jsx5(DialogTitle, { children: payload.title ?? t2("Layout.Dialog.Confirm") }),
1200
1203
  /* @__PURE__ */ jsx5(DialogContent, { children: payload.message }),
1201
- /* @__PURE__ */ jsxs3(DialogActions, { children: [
1204
+ /* @__PURE__ */ jsxs4(DialogActions, { children: [
1202
1205
  /* @__PURE__ */ jsx5(Button, { autoFocus: true, disabled: !open, onClick: () => onClose(false), children: payload.cancelText ?? t2("Layout.Dialog.Cancel") }),
1203
1206
  /* @__PURE__ */ jsx5(Button, { disabled: !open, onClick: () => onClose(true), children: t2("Layout.Dialog.Confirm") })
1204
1207
  ] })
@@ -1223,12 +1226,12 @@ import { Upload as TusUpload } from "tus-js-client";
1223
1226
  import { uuidv7 } from "uuidv7";
1224
1227
 
1225
1228
  // src/components/core/AppTitle.tsx
1226
- import { Chip, Stack as Stack2, Typography as Typography4 } from "@mui/material";
1229
+ import { Chip, Stack as Stack3, Typography as Typography4 } from "@mui/material";
1227
1230
  import { useRouterState } from "@tanstack/react-router";
1228
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
1231
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
1229
1232
  var AppTitle = () => {
1230
1233
  const title = useAppTitle();
1231
- return /* @__PURE__ */ jsxs4(Stack2, { direction: "row", alignItems: "center", spacing: 2, flexGrow: 1, children: [
1234
+ return /* @__PURE__ */ jsxs5(Stack3, { direction: "row", alignItems: "center", spacing: 2, flexGrow: 1, children: [
1232
1235
  /* @__PURE__ */ jsx6("img", { src: "/favicon-32x32.png", alt: "app-logo", loading: "lazy" }),
1233
1236
  /* @__PURE__ */ jsx6(Typography4, { variant: "h6", children: title }),
1234
1237
  import.meta.env.DEV && /* @__PURE__ */ jsx6(Chip, { size: "small", label: "TEST", color: "info" })
@@ -1443,7 +1446,7 @@ var useUploadFile = ({ subId, onSuccess, onError }) => {
1443
1446
  };
1444
1447
 
1445
1448
  // src/components/file/fileViewer/common/ActionsMenu.tsx
1446
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
1449
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
1447
1450
  var ActionsMenu = ({ meta, menu, setMenu }) => {
1448
1451
  const { t: t2 } = useTranslation3();
1449
1452
  const { fileMetas, onDelete, actions } = useFile();
@@ -1475,12 +1478,12 @@ var ActionsMenu = ({ meta, menu, setMenu }) => {
1475
1478
  anchorReference: "anchorPosition",
1476
1479
  variant: "menu",
1477
1480
  anchorPosition: menu === null ? void 0 : { top: menu.mouseY, left: menu.mouseX },
1478
- children: /* @__PURE__ */ jsxs5(List, { disablePadding: true, children: [
1479
- actions?.download !== false && /* @__PURE__ */ jsxs5(ListItemButton, { onClick: handleOnDownload, disabled: isDownloading, children: [
1481
+ children: /* @__PURE__ */ jsxs6(List, { disablePadding: true, children: [
1482
+ actions?.download !== false && /* @__PURE__ */ jsxs6(ListItemButton, { onClick: handleOnDownload, disabled: isDownloading, children: [
1480
1483
  /* @__PURE__ */ jsx7(ListItemIcon, { children: /* @__PURE__ */ jsx7(FileDownload, {}) }),
1481
1484
  /* @__PURE__ */ jsx7(ListItemText, { children: t2("Layout.File.Download") })
1482
1485
  ] }),
1483
- actions?.delete !== false && /* @__PURE__ */ jsxs5(ListItemButton, { onClick: handleOnDelete, disabled: isDeleting, children: [
1486
+ actions?.delete !== false && /* @__PURE__ */ jsxs6(ListItemButton, { onClick: handleOnDelete, disabled: isDeleting, children: [
1484
1487
  /* @__PURE__ */ jsx7(ListItemIcon, { children: /* @__PURE__ */ jsx7(Delete, {}) }),
1485
1488
  /* @__PURE__ */ jsx7(ListItemText, { children: t2("Layout.File.Delete") })
1486
1489
  ] })
@@ -1490,11 +1493,11 @@ var ActionsMenu = ({ meta, menu, setMenu }) => {
1490
1493
  };
1491
1494
 
1492
1495
  // src/components/file/fileViewer/FileViewerGrid.tsx
1493
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1496
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1494
1497
  var IMAGE_SIZE = 150;
1495
1498
  var FileViewerGrid = ({ sx, size, itemBar }) => {
1496
1499
  const { fileMetas } = useFile();
1497
- return /* @__PURE__ */ jsx8(Stack3, { direction: "row", spacing: 1, sx: { overflow: "auto", ...sx }, children: fileMetas.map((fileMeta) => /* @__PURE__ */ jsx8(
1500
+ return /* @__PURE__ */ jsx8(Stack4, { direction: "row", spacing: 1, sx: { overflow: "auto", ...sx }, children: fileMetas.map((fileMeta) => /* @__PURE__ */ jsx8(
1498
1501
  GridFileViewerItem,
1499
1502
  {
1500
1503
  meta: fileMeta,
@@ -1536,10 +1539,10 @@ var GridFileViewerItem = ({ meta, size, itemBar }) => {
1536
1539
  }
1537
1540
  }
1538
1541
  };
1539
- return /* @__PURE__ */ jsxs6(Fragment, { children: [
1540
- /* @__PURE__ */ jsxs6(ImageListItem, { sx: { width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }, onMouseEnter: handleOnMouseEnter, onMouseLeave: handleOnMouseLeave, children: [
1542
+ return /* @__PURE__ */ jsxs7(Fragment, { children: [
1543
+ /* @__PURE__ */ jsxs7(ImageListItem, { sx: { width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }, onMouseEnter: handleOnMouseEnter, onMouseLeave: handleOnMouseLeave, children: [
1541
1544
  /* @__PURE__ */ jsx8(
1542
- Box2,
1545
+ Box3,
1543
1546
  {
1544
1547
  component: "img",
1545
1548
  src: source,
@@ -1552,7 +1555,7 @@ var GridFileViewerItem = ({ meta, size, itemBar }) => {
1552
1555
  itemBar !== "hidden" && showItemBar && /* @__PURE__ */ jsx8(
1553
1556
  ImageListItemBar,
1554
1557
  {
1555
- title: /* @__PURE__ */ jsx8(Tooltip, { title: meta.fileName, children: /* @__PURE__ */ jsx8(Box2, { children: meta.fileName }) }),
1558
+ title: /* @__PURE__ */ jsx8(Tooltip, { title: meta.fileName, children: /* @__PURE__ */ jsx8(Box3, { children: meta.fileName }) }),
1556
1559
  actionIcon: (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx8(IconButton, { sx: { color: grey[100] }, onClick: openMenu, children: /* @__PURE__ */ jsx8(MoreVert, {}) })
1557
1560
  }
1558
1561
  )
@@ -1568,7 +1571,7 @@ import MoreVert2 from "@mui/icons-material/MoreVert";
1568
1571
  import SmartDisplay from "@mui/icons-material/SmartDisplay";
1569
1572
  import { IconButton as IconButton2, List as List2, ListItemButton as ListItemButton2, ListItemIcon as ListItemIcon2, ListItemText as ListItemText2 } from "@mui/material";
1570
1573
  import { Fragment as Fragment2, useState as useState4 } from "react";
1571
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
1574
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1572
1575
  var FileViewerList = ({ sx }) => {
1573
1576
  const { fileMetas } = useFile();
1574
1577
  return /* @__PURE__ */ jsx9(List2, { dense: true, sx, children: fileMetas.map(
@@ -1619,8 +1622,8 @@ var ListFileViewerItem = ({ meta }) => {
1619
1622
  }
1620
1623
  }
1621
1624
  };
1622
- return /* @__PURE__ */ jsxs7(Fragment2, { children: [
1623
- /* @__PURE__ */ jsxs7(ListItemButton2, { onClick, children: [
1625
+ return /* @__PURE__ */ jsxs8(Fragment2, { children: [
1626
+ /* @__PURE__ */ jsxs8(ListItemButton2, { onClick, children: [
1624
1627
  /* @__PURE__ */ jsx9(ListItemIcon2, { children: icon() }),
1625
1628
  /* @__PURE__ */ jsx9(ListItemText2, { primary: `${meta.fileName}.${meta.fileExtension}` }),
1626
1629
  (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx9(IconButton2, { edge: "end", onClick: openMenu, children: /* @__PURE__ */ jsx9(MoreVert2, {}) })
@@ -1631,9 +1634,9 @@ var ListFileViewerItem = ({ meta }) => {
1631
1634
 
1632
1635
  // src/components/file/fileViewer/ImageViewer.tsx
1633
1636
  import Close from "@mui/icons-material/Close";
1634
- import { Box as Box3, Dialog as Dialog2, Fab } from "@mui/material";
1637
+ import { Box as Box4, Dialog as Dialog2, Fab } from "@mui/material";
1635
1638
  import { useEffect as useEffect3 } from "react";
1636
- import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
1639
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1637
1640
  var ImageViewer = ({ metaId }) => {
1638
1641
  const { fileMetas, setImageId } = useFile();
1639
1642
  const meta = fileMetas.find((m) => m.id === metaId);
@@ -1676,27 +1679,27 @@ var ImageViewer = ({ metaId }) => {
1676
1679
  };
1677
1680
  const onClose = () => setImageId("");
1678
1681
  if (!metaId) return null;
1679
- return /* @__PURE__ */ jsxs8(Dialog2, { open: true, onClose, maxWidth: "xl", children: [
1680
- /* @__PURE__ */ jsx10(Box3, { component: "img", src: source, alt: metaId, sx: { maxWidth: "100vw", maxHeight: { xs: "calc(100vh - 56px)", sm: "calc(100vh - 64px)" } } }),
1682
+ return /* @__PURE__ */ jsxs9(Dialog2, { open: true, onClose, maxWidth: "xl", children: [
1683
+ /* @__PURE__ */ jsx10(Box4, { component: "img", src: source, alt: metaId, sx: { maxWidth: "100vw", maxHeight: { xs: "calc(100vh - 56px)", sm: "calc(100vh - 64px)" } } }),
1681
1684
  /* @__PURE__ */ jsx10(Fab, { size: "medium", onClick: onClose, sx: { position: "fixed", top: 8, right: 8 }, children: /* @__PURE__ */ jsx10(Close, {}) })
1682
1685
  ] });
1683
1686
  };
1684
1687
 
1685
1688
  // src/components/file/FileViewer.tsx
1686
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
1689
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1687
1690
  var FileViewer = ({ subId, onDelete, actions, children }) => {
1688
1691
  const { data: fileMetas = [] } = useGetFileMetas(subId, { enabled: !!subId });
1689
1692
  const [imageId, setImageId] = useState5("");
1690
1693
  const components = { Grid: FileViewerGrid, List: FileViewerList };
1691
1694
  if (fileMetas.length === 0) return null;
1692
- return /* @__PURE__ */ jsxs9(FileContext.Provider, { value: { fileMetas, onDelete, actions, setImageId }, children: [
1695
+ return /* @__PURE__ */ jsxs10(FileContext.Provider, { value: { fileMetas, onDelete, actions, setImageId }, children: [
1693
1696
  children(components),
1694
1697
  /* @__PURE__ */ jsx11(ImageViewer, { metaId: imageId })
1695
1698
  ] });
1696
1699
  };
1697
1700
 
1698
1701
  // src/components/data-grid/ChipInputCell.tsx
1699
- import { Chip as Chip2, Stack as Stack4 } from "@mui/material";
1702
+ import { Chip as Chip2, Stack as Stack5 } from "@mui/material";
1700
1703
  import { jsx as jsx12 } from "react/jsx-runtime";
1701
1704
  var isArray = (value) => Array.isArray(value);
1702
1705
  var ChipInputCell = ({ params, slotProps, getLabel }) => {
@@ -1706,7 +1709,7 @@ var ChipInputCell = ({ params, slotProps, getLabel }) => {
1706
1709
  return value;
1707
1710
  };
1708
1711
  if (isArray(params.value))
1709
- return /* @__PURE__ */ jsx12(Stack4, { direction: "row", alignItems: "center", gap: 1, sx: { overflowX: "auto", height: "100%", width: params.colDef.computedWidth }, children: params.value.map(
1712
+ return /* @__PURE__ */ jsx12(Stack5, { direction: "row", alignItems: "center", gap: 1, sx: { overflowX: "auto", height: "100%", width: params.colDef.computedWidth }, children: params.value.map(
1710
1713
  (value, index) => /* @__PURE__ */ jsx12(Chip2, { label: getLabelValue(value), ...slotProps }, `${index + 1}-chip-input-cell`)
1711
1714
  ) });
1712
1715
  return /* @__PURE__ */ jsx12(Chip2, { label: getLabelValue(params.value), ...slotProps });
@@ -1800,12 +1803,12 @@ var RouterListItemButton = (props) => {
1800
1803
  };
1801
1804
 
1802
1805
  // src/components/router/RouterNotFound.tsx
1803
- import { Box as Box4, Divider, Typography as Typography5 } from "@mui/material";
1806
+ import { Box as Box5, Divider, Typography as Typography5 } from "@mui/material";
1804
1807
  import { useTranslation as useTranslation4 } from "react-i18next";
1805
- import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
1808
+ import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
1806
1809
  function RouterNotFound() {
1807
1810
  const { t: t2 } = useTranslation4();
1808
- return /* @__PURE__ */ jsx20(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: [
1811
+ 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: [
1809
1812
  /* @__PURE__ */ jsx20(Typography5, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "404" }),
1810
1813
  /* @__PURE__ */ jsx20(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
1811
1814
  /* @__PURE__ */ jsx20(Typography5, { variant: "h5", component: "span", children: t2("Layout.ThisPageCouldNotBeFound") })
@@ -1813,10 +1816,10 @@ function RouterNotFound() {
1813
1816
  }
1814
1817
 
1815
1818
  // src/components/router/RouterError.tsx
1816
- import { Box as Box5, Divider as Divider2, Typography as Typography6 } from "@mui/material";
1817
- import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
1819
+ import { Box as Box6, Divider as Divider2, Typography as Typography6 } from "@mui/material";
1820
+ import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
1818
1821
  var RouterError = ({ error }) => {
1819
- return /* @__PURE__ */ jsx21(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: [
1822
+ return /* @__PURE__ */ jsx21(Box6, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxs12(Box6, { display: "flex", alignItems: "center", mb: 4, children: [
1820
1823
  /* @__PURE__ */ jsx21(Typography6, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: error.name || "500" }),
1821
1824
  /* @__PURE__ */ jsx21(Divider2, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
1822
1825
  /* @__PURE__ */ jsx21(Typography6, { variant: "h5", component: "span", children: error.message })
@@ -2587,14 +2590,13 @@ var AdapterDayjs = class {
2587
2590
  };
2588
2591
 
2589
2592
  // src/providers/LayoutProvider.tsx
2590
- import { useEffect as useEffect6, useState as useState10 } from "react";
2591
- import { useTranslation as useTranslation7 } from "react-i18next";
2593
+ import { useEffect as useEffect6 } from "react";
2592
2594
  import * as z from "zod";
2593
2595
  import { cs, en } from "zod/locales";
2594
2596
 
2595
2597
  // src/providers/DialogsProvider.tsx
2596
2598
  import { useCallback, useId, useMemo as useMemo3, useRef as useRef3, useState as useState6 } from "react";
2597
- import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
2599
+ import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
2598
2600
  function DialogsProvider({ children, unmountAfter = 1e3 }) {
2599
2601
  const [stack, setStack] = useState6([]);
2600
2602
  const keyPrefix = useId();
@@ -2646,7 +2648,7 @@ function DialogsProvider({ children, unmountAfter = 1e3 }) {
2646
2648
  return dialog;
2647
2649
  });
2648
2650
  const contextValue = useMemo3(() => ({ open: requestDialog, close: closeDialog }), [requestDialog, closeDialog]);
2649
- return /* @__PURE__ */ jsxs12(DialogsContext.Provider, { value: contextValue, children: [
2651
+ return /* @__PURE__ */ jsxs13(DialogsContext.Provider, { value: contextValue, children: [
2650
2652
  children,
2651
2653
  stack.map(({ key, open, Component: Component7, payload, promise }) => /* @__PURE__ */ jsx22(
2652
2654
  Component7,
@@ -2662,45 +2664,32 @@ function DialogsProvider({ children, unmountAfter = 1e3 }) {
2662
2664
  ] });
2663
2665
  }
2664
2666
 
2667
+ // src/providers/LayoutProvider.tsx
2668
+ import { ThemeProvider } from "@mui/material";
2669
+
2665
2670
  // src/utils/i18n.ts
2666
- import { createIsomorphicFn } from "@tanstack/react-start";
2667
- import { getCookie } from "@tanstack/react-start/server";
2668
2671
  import i18n from "i18next";
2669
2672
  import LanguageDetector from "i18next-browser-languagedetector";
2670
2673
  import HttpBackend from "i18next-http-backend";
2671
2674
  import { initReactI18next } from "react-i18next";
2672
2675
  import { default as default2 } from "i18next";
2673
- var i18nCookieName = "i18nextLng";
2674
2676
  i18n.use(HttpBackend).use(LanguageDetector).use(initReactI18next).init({
2675
2677
  fallbackLng: "en",
2676
- detection: {
2677
- order: ["cookie"],
2678
- lookupCookie: i18nCookieName,
2679
- caches: ["cookie"],
2680
- cookieMinutes: 60 * 24 * 365
2681
- },
2682
2678
  interpolation: { escapeValue: false }
2683
2679
  });
2684
- var setSSRLanguage = createIsomorphicFn().server(async () => {
2685
- const language = getCookie(i18nCookieName);
2686
- await i18n.changeLanguage(language || "en");
2687
- });
2688
-
2689
- // src/contexts/LayoutContext.ts
2690
- import { createContext as createContext4, useContext as useContext4 } from "react";
2691
- var LayoutContext = createContext4(null);
2692
2680
 
2693
2681
  // src/components/core/Layout.tsx
2694
2682
  import Menu3 from "@mui/icons-material/Menu";
2695
2683
  import MenuOpen from "@mui/icons-material/MenuOpen";
2696
- import { AppBar, Box as Box9, CssBaseline, IconButton as IconButton5, InitColorSchemeScript, LinearProgress, Toolbar } from "@mui/material";
2697
- import { ThemeProvider, styled as styled2 } from "@mui/material/styles";
2684
+ import { AppBar, Box as Box10, CssBaseline, IconButton as IconButton5, InitColorSchemeScript, LinearProgress, Toolbar } from "@mui/material";
2685
+ import { styled as styled2 } from "@mui/material/styles";
2698
2686
  import { useIsFetching, useIsMutating } from "@tanstack/react-query";
2687
+ import { Fragment as Fragment7 } from "react";
2699
2688
  import useLocalStorageState from "use-local-storage-state";
2700
2689
 
2701
2690
  // src/components/core/navigation/NavigationRail.tsx
2702
2691
  import { useMediaQuery } from "@mui/material";
2703
- import Box7 from "@mui/material/Box";
2692
+ import Box8 from "@mui/material/Box";
2704
2693
  import Drawer from "@mui/material/Drawer";
2705
2694
  import { useTheme as useTheme2 } from "@mui/material/styles";
2706
2695
  import { useNavigate, useRouterState as useRouterState2 } from "@tanstack/react-router";
@@ -2714,7 +2703,7 @@ import { Fragment as Fragment5, useEffect as useEffect5, useState as useState8 }
2714
2703
  // src/components/core/navigation/NavigationListItem.tsx
2715
2704
  import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
2716
2705
  import Avatar from "@mui/material/Avatar";
2717
- import Box6 from "@mui/material/Box";
2706
+ import Box7 from "@mui/material/Box";
2718
2707
  import Popper from "@mui/material/Popper";
2719
2708
  import ListItem from "@mui/material/ListItem";
2720
2709
  import ListItemButton4 from "@mui/material/ListItemButton";
@@ -2725,7 +2714,7 @@ import { styled } from "@mui/material/styles";
2725
2714
  import Typography7 from "@mui/material/Typography";
2726
2715
  import { Fragment as Fragment3, useMemo as useMemo4, useState as useState7 } from "react";
2727
2716
  import { Collapse } from "@mui/material";
2728
- import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
2717
+ import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
2729
2718
  var ICON_SIZE = 34;
2730
2719
  var StyledNavButton = styled(ListItemButton4)(({ theme }) => ({
2731
2720
  borderRadius: 8,
@@ -2769,8 +2758,8 @@ var StyledRouterButton = styled(RouterListItemButton)(({ theme }) => ({
2769
2758
  }));
2770
2759
  var IconOrAvatar = ({ item, collapsed }) => {
2771
2760
  if (item.icon || collapsed) {
2772
- return /* @__PURE__ */ jsxs13(Box6, { sx: collapsed ? { position: "absolute", left: "50%", top: "calc(50% - 6px)", transform: "translate(-50%, -50%)" } : {}, children: [
2773
- /* @__PURE__ */ jsxs13(ListItemIcon3, { sx: { display: "flex", alignItems: "center", justifyContent: "center", minWidth: ICON_SIZE }, children: [
2761
+ return /* @__PURE__ */ jsxs14(Box7, { sx: collapsed ? { position: "absolute", left: "50%", top: "calc(50% - 6px)", transform: "translate(-50%, -50%)" } : {}, children: [
2762
+ /* @__PURE__ */ jsxs14(ListItemIcon3, { sx: { display: "flex", alignItems: "center", justifyContent: "center", minWidth: ICON_SIZE }, children: [
2774
2763
  item.icon ?? null,
2775
2764
  !item.icon && collapsed ? /* @__PURE__ */ jsx23(Avatar, { sx: { width: ICON_SIZE - 7, height: ICON_SIZE - 7, fontSize: 12 }, children: item.title }) : null
2776
2765
  ] }),
@@ -2851,7 +2840,7 @@ var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSideb
2851
2840
  disabled,
2852
2841
  sx: { px: 1.4, height: collapsed ? 60 : 48 }
2853
2842
  };
2854
- const buttonContent = /* @__PURE__ */ jsxs13(Fragment4, { children: [
2843
+ const buttonContent = /* @__PURE__ */ jsxs14(Fragment4, { children: [
2855
2844
  /* @__PURE__ */ jsx23(IconOrAvatar, { item, collapsed }),
2856
2845
  !collapsed && /* @__PURE__ */ jsx23(
2857
2846
  ListItemText3,
@@ -2863,7 +2852,7 @@ var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSideb
2863
2852
  ),
2864
2853
  item.children ? /* @__PURE__ */ jsx23(ExpandMoreIcon, { sx: chevronSx }) : null
2865
2854
  ] });
2866
- const listItem = /* @__PURE__ */ jsxs13(
2855
+ const listItem = /* @__PURE__ */ jsxs14(
2867
2856
  ListItem,
2868
2857
  {
2869
2858
  ...item.children && collapsed ? {
@@ -2892,7 +2881,7 @@ var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSideb
2892
2881
  ]
2893
2882
  }
2894
2883
  );
2895
- return /* @__PURE__ */ jsxs13(Fragment3, { children: [
2884
+ return /* @__PURE__ */ jsxs14(Fragment3, { children: [
2896
2885
  listItem,
2897
2886
  item.children && !collapsed ? /* @__PURE__ */ jsx23(Collapse, { in: isOpen, timeout: "auto", unmountOnExit: true, children: renderNested?.(item.children) }) : null
2898
2887
  ] }, item.to);
@@ -2993,7 +2982,7 @@ var NavigationRail = ({ navigation, expanded, setExpanded }) => {
2993
2982
  const theme = useTheme2();
2994
2983
  const showPermanent = useMediaQuery(theme.breakpoints.up("sm"));
2995
2984
  const drawerContent = (collapsed) => /* @__PURE__ */ jsx25(
2996
- Box7,
2985
+ Box8,
2997
2986
  {
2998
2987
  component: "nav",
2999
2988
  sx: {
@@ -3051,29 +3040,10 @@ import Login from "@mui/icons-material/Login";
3051
3040
  import Logout from "@mui/icons-material/Logout";
3052
3041
  import SettingsBrightness from "@mui/icons-material/SettingsBrightness";
3053
3042
  import Translate from "@mui/icons-material/Translate";
3054
- 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 Typography8, useColorScheme } from "@mui/material";
3043
+ import { Avatar as Avatar2, Box as Box9, 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 Typography8, useColorScheme } from "@mui/material";
3055
3044
  import { Fragment as Fragment6, useState as useState9 } from "react";
3056
3045
  import { useTranslation as useTranslation5 } from "react-i18next";
3057
-
3058
- // src/auth-test/keycloak.ts
3059
- import { useRouter } from "@tanstack/react-router";
3060
- import Keycloak from "keycloak-js";
3061
- var keycloakConfig = {
3062
- url: import.meta.env.VITE_KEYCLOAK_URL,
3063
- realm: import.meta.env.VITE_KEYCLOAK_REALM,
3064
- clientId: import.meta.env.VITE_KEYCLOAK_CLIENT_ID,
3065
- idpHint: import.meta.env.VITE_KEYCLOAK_IDP_HINT,
3066
- confidentialClientId: import.meta.env.VITE_KEYCLOAK_CONFIDENTIAL_CLIENT_ID,
3067
- confidentialClientSecret: import.meta.env.VITE_KEYCLOAK_CONFIDENTIAL_CLIENT_SECRET
3068
- };
3069
- function useKeycloak() {
3070
- const routerContext = useRouter();
3071
- const keycloak = routerContext.options.context.keycloak;
3072
- return keycloak;
3073
- }
3074
-
3075
- // src/components/core/ToolbarAccount.tsx
3076
- import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
3046
+ import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
3077
3047
  var ToolbarAccount = () => {
3078
3048
  const [anchorElement, setAnchorElement] = useState9();
3079
3049
  const [tab, setTab] = useState9("settings");
@@ -3087,7 +3057,6 @@ var ToolbarAccount = () => {
3087
3057
  setMode(newMode);
3088
3058
  closeMenu();
3089
3059
  };
3090
- const keycloak = useKeycloak();
3091
3060
  const user = {
3092
3061
  name: "Dalibor Homola",
3093
3062
  employeeId: "C2503017",
@@ -3107,7 +3076,7 @@ var ToolbarAccount = () => {
3107
3076
  }
3108
3077
  };
3109
3078
  const usernameInitials = () => {
3110
- if (!user?.name) return "";
3079
+ if (!user.name) return "";
3111
3080
  const splittedName = user.name.split(" ");
3112
3081
  return `${splittedName[0][0]}${splittedName.length > 1 ? splittedName[1][0] : ""}`;
3113
3082
  };
@@ -3117,37 +3086,37 @@ var ToolbarAccount = () => {
3117
3086
  setTimeout(() => setTab("settings"), 300);
3118
3087
  };
3119
3088
  const changeTab = (newTab) => () => setTab(newTab);
3120
- const settings = /* @__PURE__ */ jsxs14(List4, { component: "nav", subheader: /* @__PURE__ */ jsx26(ListSubheader2, { sx: { backgroundColor: "transparent" }, children: t2("Layout.Settings") }), children: [
3121
- /* @__PURE__ */ jsxs14(ListItemButton5, { onClick: changeTab("theme"), sx: { py: 0.3 }, children: [
3089
+ const settings = /* @__PURE__ */ jsxs15(List4, { component: "nav", subheader: /* @__PURE__ */ jsx26(ListSubheader2, { sx: { backgroundColor: "transparent" }, children: t2("Layout.Settings") }), children: [
3090
+ /* @__PURE__ */ jsxs15(ListItemButton5, { onClick: changeTab("theme"), sx: { py: 0.3 }, children: [
3122
3091
  /* @__PURE__ */ jsx26(ListItemIcon4, { children: /* @__PURE__ */ jsx26(Brightness4, {}) }),
3123
3092
  /* @__PURE__ */ jsx26(ListItemText4, { primary: t2("Layout.Appearance"), secondary: getModeText() }),
3124
3093
  /* @__PURE__ */ jsx26(ChevronRight, {})
3125
3094
  ] }),
3126
- /* @__PURE__ */ jsxs14(ListItemButton5, { onClick: changeTab("language"), sx: { py: 0.3 }, children: [
3095
+ /* @__PURE__ */ jsxs15(ListItemButton5, { onClick: changeTab("language"), sx: { py: 0.3 }, children: [
3127
3096
  /* @__PURE__ */ jsx26(ListItemIcon4, { children: /* @__PURE__ */ jsx26(Translate, {}) }),
3128
3097
  /* @__PURE__ */ jsx26(ListItemText4, { primary: t2("Layout.Language"), secondary: i18n2.resolvedLanguage === "en" ? "English" : "\u010Ce\u0161tina" }),
3129
3098
  /* @__PURE__ */ jsx26(ChevronRight, {})
3130
3099
  ] })
3131
3100
  ] });
3132
- const theme = /* @__PURE__ */ jsxs14(List4, { subheader: /* @__PURE__ */ jsxs14(ListSubheader2, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
3101
+ const theme = /* @__PURE__ */ jsxs15(List4, { subheader: /* @__PURE__ */ jsxs15(ListSubheader2, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
3133
3102
  /* @__PURE__ */ jsx26(IconButton4, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx26(ArrowBack, { fontSize: "small" }) }),
3134
3103
  " ",
3135
3104
  t2("Layout.Appearance")
3136
3105
  ] }), children: [
3137
- /* @__PURE__ */ jsxs14(ListItemButton5, { onClick: changeMode("light"), disabled: mode === "light", children: [
3106
+ /* @__PURE__ */ jsxs15(ListItemButton5, { onClick: changeMode("light"), disabled: mode === "light", children: [
3138
3107
  /* @__PURE__ */ jsx26(ListItemIcon4, { children: /* @__PURE__ */ jsx26(LightMode, {}) }),
3139
3108
  /* @__PURE__ */ jsx26(ListItemText4, { primary: t2("Layout.Light") })
3140
3109
  ] }),
3141
- /* @__PURE__ */ jsxs14(ListItemButton5, { onClick: changeMode("dark"), disabled: mode === "dark", children: [
3110
+ /* @__PURE__ */ jsxs15(ListItemButton5, { onClick: changeMode("dark"), disabled: mode === "dark", children: [
3142
3111
  /* @__PURE__ */ jsx26(ListItemIcon4, { children: /* @__PURE__ */ jsx26(DarkMode, {}) }),
3143
3112
  /* @__PURE__ */ jsx26(ListItemText4, { primary: t2("Layout.Dark") })
3144
3113
  ] }),
3145
- /* @__PURE__ */ jsxs14(ListItemButton5, { onClick: changeMode("system"), disabled: mode === "system", children: [
3114
+ /* @__PURE__ */ jsxs15(ListItemButton5, { onClick: changeMode("system"), disabled: mode === "system", children: [
3146
3115
  /* @__PURE__ */ jsx26(ListItemIcon4, { children: /* @__PURE__ */ jsx26(SettingsBrightness, {}) }),
3147
3116
  /* @__PURE__ */ jsx26(ListItemText4, { primary: t2("Layout.System") })
3148
3117
  ] })
3149
3118
  ] });
3150
- const language = /* @__PURE__ */ jsxs14(List4, { subheader: /* @__PURE__ */ jsxs14(ListSubheader2, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
3119
+ const language = /* @__PURE__ */ jsxs15(List4, { subheader: /* @__PURE__ */ jsxs15(ListSubheader2, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
3151
3120
  /* @__PURE__ */ jsx26(IconButton4, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx26(ArrowBack, { fontSize: "small" }) }),
3152
3121
  " ",
3153
3122
  t2("Layout.Language")
@@ -3155,20 +3124,20 @@ var ToolbarAccount = () => {
3155
3124
  /* @__PURE__ */ jsx26(ListItemButton5, { onClick: changeLanguage("en"), disabled: i18n2.resolvedLanguage === "en", children: /* @__PURE__ */ jsx26(ListItemText4, { primary: "English" }) }),
3156
3125
  /* @__PURE__ */ jsx26(ListItemButton5, { onClick: changeLanguage("cs"), disabled: i18n2.resolvedLanguage === "cs", children: /* @__PURE__ */ jsx26(ListItemText4, { primary: "\u010Ce\u0161tina" }) })
3157
3126
  ] });
3158
- return /* @__PURE__ */ jsxs14(Fragment6, { children: [
3159
- /* @__PURE__ */ jsx26(IconButton4, { size: "small", edge: "end", onClick: openMenu, children: user?.name ? /* @__PURE__ */ jsx26(Avatar2, { sx: { width: { xs: 32, sm: 40 }, height: { xs: 32, sm: 40 }, bgcolor: "primary.main" }, children: /* @__PURE__ */ jsx26(Typography8, { variant: "subtitle2", sx: { fontWeight: "bold", lineHeight: 0 }, children: usernameInitials() }) }) : /* @__PURE__ */ jsx26(AccountCircle, { fontSize: "large" }) }),
3160
- /* @__PURE__ */ jsx26(Menu2, { anchorEl: anchorElement, open, onClose: closeMenu, children: /* @__PURE__ */ jsxs14(Box8, { sx: { width: 240 }, children: [
3161
- /* @__PURE__ */ jsx26(List4, { children: user?.name ? /* @__PURE__ */ jsxs14(Fragment6, { children: [
3162
- /* @__PURE__ */ jsx26(ListItem2, { children: /* @__PURE__ */ jsx26(ListItemText4, { primary: user.name, secondary: /* @__PURE__ */ jsxs14("span", { children: [
3127
+ return /* @__PURE__ */ jsxs15(Fragment6, { children: [
3128
+ /* @__PURE__ */ jsx26(IconButton4, { size: "small", edge: "end", onClick: openMenu, children: user.name ? /* @__PURE__ */ jsx26(Avatar2, { sx: { width: { xs: 32, sm: 40 }, height: { xs: 32, sm: 40 }, bgcolor: "primary.main" }, children: /* @__PURE__ */ jsx26(Typography8, { variant: "subtitle2", sx: { fontWeight: "bold", lineHeight: 0 }, children: usernameInitials() }) }) : /* @__PURE__ */ jsx26(AccountCircle, { fontSize: "large" }) }),
3129
+ /* @__PURE__ */ jsx26(Menu2, { anchorEl: anchorElement, open, onClose: closeMenu, children: /* @__PURE__ */ jsxs15(Box9, { sx: { width: 240 }, children: [
3130
+ /* @__PURE__ */ jsx26(List4, { children: user.name ? /* @__PURE__ */ jsxs15(Fragment6, { children: [
3131
+ /* @__PURE__ */ jsx26(ListItem2, { children: /* @__PURE__ */ jsx26(ListItemText4, { primary: user.name, secondary: /* @__PURE__ */ jsxs15("span", { children: [
3163
3132
  /* @__PURE__ */ jsx26("span", { children: user.employeeId }),
3164
3133
  /* @__PURE__ */ jsx26("br", {}),
3165
3134
  /* @__PURE__ */ jsx26("span", { children: user.department })
3166
3135
  ] }) }) }),
3167
- /* @__PURE__ */ jsxs14(ListItemButton5, { onClick: () => keycloak.logout(), children: [
3136
+ /* @__PURE__ */ jsxs15(ListItemButton5, { onClick: () => console.log("Logout"), children: [
3168
3137
  /* @__PURE__ */ jsx26(ListItemIcon4, { children: /* @__PURE__ */ jsx26(Logout, { color: "error" }) }),
3169
3138
  /* @__PURE__ */ jsx26(ListItemText4, { primary: t2("Layout.Logout") })
3170
3139
  ] })
3171
- ] }) : /* @__PURE__ */ jsxs14(ListItemButton5, { onClick: () => keycloak.login(), children: [
3140
+ ] }) : /* @__PURE__ */ jsxs15(ListItemButton5, { onClick: () => console.log("Login"), children: [
3172
3141
  /* @__PURE__ */ jsx26(ListItemIcon4, { children: /* @__PURE__ */ jsx26(Login, { color: "success" }) }),
3173
3142
  /* @__PURE__ */ jsx26(ListItemText4, { primary: t2("Layout.LogIn") })
3174
3143
  ] }) }),
@@ -3179,6 +3148,57 @@ var ToolbarAccount = () => {
3179
3148
  ] });
3180
3149
  };
3181
3150
 
3151
+ // src/components/core/Layout.tsx
3152
+ import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
3153
+ var DrawerHeader = styled2("div")(({ theme }) => ({
3154
+ display: "flex",
3155
+ alignItems: "center",
3156
+ justifyContent: "flex-end",
3157
+ padding: theme.spacing(0, 1),
3158
+ ...theme.mixins.toolbar
3159
+ }));
3160
+ var Layout = (props) => {
3161
+ const [navigationOpen, setNavigationOpen] = useLocalStorageState("navigationOpen", { defaultServerValue: false });
3162
+ const isFetching = !!useIsFetching();
3163
+ const isMutating = !!useIsMutating();
3164
+ return /* @__PURE__ */ jsxs16(Fragment7, { children: [
3165
+ /* @__PURE__ */ jsx27(InitColorSchemeScript, {}),
3166
+ /* @__PURE__ */ jsx27(CssBaseline, {}),
3167
+ /* @__PURE__ */ jsxs16(Box10, { sx: { display: "flex", height: "100dvh", maxHeight: "100dvh", overflow: "hidden", width: "100%" }, children: [
3168
+ /* @__PURE__ */ jsx27(
3169
+ AppBar,
3170
+ {
3171
+ color: "transparent",
3172
+ position: "fixed",
3173
+ sx: (theme) => ({
3174
+ borderBottom: "1px solid",
3175
+ borderColor: theme.vars?.palette.divider,
3176
+ boxShadow: "none"
3177
+ }),
3178
+ children: /* @__PURE__ */ jsxs16(Toolbar, { children: [
3179
+ props.navigation && /* @__PURE__ */ jsx27(
3180
+ IconButton5,
3181
+ {
3182
+ onClick: () => setNavigationOpen((previous) => !previous),
3183
+ sx: { marginRight: 2 },
3184
+ children: navigationOpen ? /* @__PURE__ */ jsx27(MenuOpen, {}) : /* @__PURE__ */ jsx27(Menu3, {})
3185
+ }
3186
+ ),
3187
+ /* @__PURE__ */ jsx27(AppTitle, {}),
3188
+ /* @__PURE__ */ jsx27(ToolbarAccount, {})
3189
+ ] })
3190
+ }
3191
+ ),
3192
+ props.navigation && /* @__PURE__ */ jsx27(NavigationRail, { navigation: props.navigation, expanded: navigationOpen ?? false, setExpanded: setNavigationOpen }),
3193
+ /* @__PURE__ */ jsxs16(Box10, { component: "main", sx: { flexGrow: 1, display: "flex", flexDirection: "column", minWidth: 0, height: "100%", overflow: "hidden" }, children: [
3194
+ /* @__PURE__ */ jsx27(DrawerHeader, {}),
3195
+ /* @__PURE__ */ jsx27(Box10, { sx: { flex: 1, overflow: "auto", position: "relative" }, children: props.children })
3196
+ ] })
3197
+ ] }),
3198
+ (isFetching || isMutating) && /* @__PURE__ */ jsx27(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
3199
+ ] });
3200
+ };
3201
+
3182
3202
  // src/hooks/ThemeHook.ts
3183
3203
  import { createTheme, darken, lighten } from "@mui/material";
3184
3204
  import { grey as grey2 } from "@mui/material/colors";
@@ -3238,6 +3258,8 @@ var csCZGrid = {
3238
3258
  toolbarExportExcel: "St\xE1hnout jako Excel",
3239
3259
  // Toolbar pivot button
3240
3260
  // toolbarPivot: 'Pivot',
3261
+ // Toolbar charts button
3262
+ // toolbarCharts: 'Charts',
3241
3263
  // Toolbar AI Assistant button
3242
3264
  // toolbarAssistant: 'AI Assistant',
3243
3265
  // Columns management text
@@ -3317,6 +3339,7 @@ var csCZGrid = {
3317
3339
  columnMenuSortAsc: "Se\u0159adit vzestupn\u011B",
3318
3340
  columnMenuSortDesc: "Se\u0159adit sestupn\u011B",
3319
3341
  // columnMenuManagePivot: 'Manage pivot',
3342
+ // columnMenuManageCharts: 'Manage charts',
3320
3343
  // Column header text
3321
3344
  columnHeaderFiltersTooltipActive: (count) => {
3322
3345
  let pluralForm = "aktivn\xEDch filtr\u016F";
@@ -3405,6 +3428,7 @@ var csCZGrid = {
3405
3428
  rowReorderingHeaderName: "P\u0159euspo\u0159\xE1d\xE1v\xE1n\xED \u0159\xE1dk\u016F",
3406
3429
  // Aggregation
3407
3430
  aggregationMenuItemHeader: "Seskupov\xE1n\xED",
3431
+ // aggregationFunctionLabelNone: 'none',
3408
3432
  aggregationFunctionLabelSum: "sou\u010Det",
3409
3433
  aggregationFunctionLabelAvg: "pr\u016Fm\u011Br",
3410
3434
  aggregationFunctionLabelMin: "min",
@@ -3438,6 +3462,31 @@ var csCZGrid = {
3438
3462
  // pivotDragToValues: 'Drag here to create values',
3439
3463
  // pivotYearColumnHeaderName: '(Year)',
3440
3464
  // pivotQuarterColumnHeaderName: '(Quarter)',
3465
+ // Charts configuration panel
3466
+ // chartsNoCharts: 'There are no charts available',
3467
+ // chartsChartNotSelected: 'Select a chart type to configure its options',
3468
+ // chartsTabChart: 'Chart',
3469
+ // chartsTabFields: 'Fields',
3470
+ // chartsTabCustomize: 'Customize',
3471
+ // chartsCloseButton: 'Close charts configuration',
3472
+ // chartsSyncButtonLabel: 'Sync chart',
3473
+ // chartsSearchPlaceholder: 'Search fields',
3474
+ // chartsSearchLabel: 'Search fields',
3475
+ // chartsSearchClear: 'Clear search',
3476
+ // chartsNoFields: 'No fields',
3477
+ // chartsFieldBlocked: 'This field cannot be added to any section',
3478
+ // chartsCategories: 'Categories',
3479
+ // chartsSeries: 'Series',
3480
+ // chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
3481
+ // chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
3482
+ // chartsMenuMoveUp: 'Move up',
3483
+ // chartsMenuMoveDown: 'Move down',
3484
+ // chartsMenuMoveToTop: 'Move to top',
3485
+ // chartsMenuMoveToBottom: 'Move to bottom',
3486
+ // chartsMenuOptions: 'Field options',
3487
+ // chartsMenuRemove: 'Remove',
3488
+ // chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
3489
+ // chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
3441
3490
  // AI Assistant panel
3442
3491
  // aiAssistantPanelTitle: 'AI Assistant',
3443
3492
  // aiAssistantPanelClose: 'Close AI Assistant',
@@ -3520,6 +3569,8 @@ var GRID_DEFAULT_LOCALE_TEXT = {
3520
3569
  toolbarExportExcel: "Download as Excel",
3521
3570
  // Toolbar pivot button
3522
3571
  toolbarPivot: "Pivot",
3572
+ // Toolbar charts button
3573
+ toolbarCharts: "Charts",
3523
3574
  // Toolbar AI Assistant button
3524
3575
  toolbarAssistant: "AI Assistant",
3525
3576
  // Columns management text
@@ -3599,6 +3650,7 @@ var GRID_DEFAULT_LOCALE_TEXT = {
3599
3650
  columnMenuSortAsc: "Sort by ASC",
3600
3651
  columnMenuSortDesc: "Sort by DESC",
3601
3652
  columnMenuManagePivot: "Manage pivot",
3653
+ columnMenuManageCharts: "Manage charts",
3602
3654
  // Column header text
3603
3655
  columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} active filters` : `${count} active filter`,
3604
3656
  columnHeaderFiltersLabel: "Show filters",
@@ -3666,6 +3718,7 @@ var GRID_DEFAULT_LOCALE_TEXT = {
3666
3718
  rowReorderingHeaderName: "Row reordering",
3667
3719
  // Aggregation
3668
3720
  aggregationMenuItemHeader: "Aggregation",
3721
+ aggregationFunctionLabelNone: "none",
3669
3722
  aggregationFunctionLabelSum: "sum",
3670
3723
  aggregationFunctionLabelAvg: "avg",
3671
3724
  aggregationFunctionLabelMin: "min",
@@ -3699,6 +3752,31 @@ var GRID_DEFAULT_LOCALE_TEXT = {
3699
3752
  pivotDragToValues: "Drag here to create values",
3700
3753
  pivotYearColumnHeaderName: "(Year)",
3701
3754
  pivotQuarterColumnHeaderName: "(Quarter)",
3755
+ // Charts configuration panel
3756
+ chartsNoCharts: "There are no charts available",
3757
+ chartsChartNotSelected: "Select a chart type to configure its options",
3758
+ chartsTabChart: "Chart",
3759
+ chartsTabFields: "Fields",
3760
+ chartsTabCustomize: "Customize",
3761
+ chartsCloseButton: "Close charts configuration",
3762
+ chartsSyncButtonLabel: "Sync chart",
3763
+ chartsSearchPlaceholder: "Search fields",
3764
+ chartsSearchLabel: "Search fields",
3765
+ chartsSearchClear: "Clear search",
3766
+ chartsNoFields: "No fields",
3767
+ chartsFieldBlocked: "This field cannot be added to any section",
3768
+ chartsCategories: "Categories",
3769
+ chartsSeries: "Series",
3770
+ chartsMenuAddToDimensions: (dimensionLabel) => `Add to ${dimensionLabel}`,
3771
+ chartsMenuAddToValues: (valuesLabel) => `Add to ${valuesLabel}`,
3772
+ chartsMenuMoveUp: "Move up",
3773
+ chartsMenuMoveDown: "Move down",
3774
+ chartsMenuMoveToTop: "Move to top",
3775
+ chartsMenuMoveToBottom: "Move to bottom",
3776
+ chartsMenuOptions: "Field options",
3777
+ chartsMenuRemove: "Remove",
3778
+ chartsDragToDimensions: (dimensionLabel) => `Drag here to use column as ${dimensionLabel}`,
3779
+ chartsDragToValues: (valuesLabel) => `Drag here to use column as ${valuesLabel}`,
3702
3780
  // AI Assistant panel
3703
3781
  aiAssistantPanelTitle: "AI Assistant",
3704
3782
  aiAssistantPanelClose: "Close AI Assistant",
@@ -3887,68 +3965,21 @@ var useGetTheme = (theme) => {
3887
3965
  );
3888
3966
  };
3889
3967
 
3890
- // src/components/core/Layout.tsx
3891
- import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
3892
- var DrawerHeader = styled2("div")(({ theme }) => ({
3893
- display: "flex",
3894
- alignItems: "center",
3895
- justifyContent: "flex-end",
3896
- padding: theme.spacing(0, 1),
3897
- ...theme.mixins.toolbar
3898
- }));
3899
- var Layout = (props) => {
3900
- const theme = useGetTheme(props.theme);
3901
- const [navigationOpen, setNavigationOpen] = useLocalStorageState("navigationOpen", { defaultServerValue: false });
3902
- const isFetching = !!useIsFetching();
3903
- const isMutating = !!useIsMutating();
3904
- return /* @__PURE__ */ jsxs15(ThemeProvider, { theme, children: [
3905
- /* @__PURE__ */ jsx27(InitColorSchemeScript, {}),
3906
- /* @__PURE__ */ jsx27(CssBaseline, {}),
3907
- /* @__PURE__ */ jsxs15(Box9, { sx: { display: "flex", height: "100dvh", maxHeight: "100dvh", overflow: "hidden", width: "100%" }, children: [
3908
- /* @__PURE__ */ jsx27(
3909
- AppBar,
3910
- {
3911
- color: "transparent",
3912
- position: "fixed",
3913
- sx: {
3914
- borderBottom: "1px solid",
3915
- borderColor: theme.vars?.palette.divider,
3916
- boxShadow: "none"
3917
- },
3918
- children: /* @__PURE__ */ jsxs15(Toolbar, { children: [
3919
- props.navigation && /* @__PURE__ */ jsx27(
3920
- IconButton5,
3921
- {
3922
- onClick: () => setNavigationOpen((previous) => !previous),
3923
- sx: { marginRight: 2 },
3924
- children: navigationOpen ? /* @__PURE__ */ jsx27(MenuOpen, {}) : /* @__PURE__ */ jsx27(Menu3, {})
3925
- }
3926
- ),
3927
- /* @__PURE__ */ jsx27(AppTitle, {}),
3928
- /* @__PURE__ */ jsx27(ToolbarAccount, {})
3929
- ] })
3930
- }
3931
- ),
3932
- props.navigation && /* @__PURE__ */ jsx27(NavigationRail, { navigation: props.navigation, expanded: navigationOpen ?? false, setExpanded: setNavigationOpen }),
3933
- /* @__PURE__ */ jsxs15(Box9, { component: "main", sx: { flexGrow: 1, display: "flex", flexDirection: "column", minWidth: 0, height: "100%", overflow: "hidden" }, children: [
3934
- /* @__PURE__ */ jsx27(DrawerHeader, {}),
3935
- /* @__PURE__ */ jsx27(Box9, { sx: { flex: 1, overflow: "auto", position: "relative" }, children: props.children })
3936
- ] })
3937
- ] }),
3938
- (isFetching || isMutating) && /* @__PURE__ */ jsx27(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
3939
- ] });
3940
- };
3941
-
3942
3968
  // src/providers/LayoutProvider.tsx
3943
3969
  import { jsx as jsx28 } from "react/jsx-runtime";
3944
- var LayoutProvider = (props) => {
3945
- const [user, setUser] = useState10({ employeeId: "", name: "Unknown", department: "", company: "", category: "" });
3946
- const { t: t2 } = useTranslation7();
3947
- const navigation = props.getNavigation?.({ user, t: t2 });
3970
+ var LayoutProvider = ({ navigation, theme, children }) => {
3971
+ const createdTheme = useGetTheme(theme);
3948
3972
  useEffect6(() => {
3949
- z.config(default2.resolvedLanguage === "cs" ? cs() : en());
3973
+ const handler = () => {
3974
+ z.config(default2.resolvedLanguage === "cs" ? cs() : en());
3975
+ };
3976
+ handler();
3977
+ default2.on("languageChanged", handler);
3978
+ return () => {
3979
+ default2.off("languageChanged", handler);
3980
+ };
3950
3981
  }, []);
3951
- return /* @__PURE__ */ jsx28(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: default2.resolvedLanguage, children: /* @__PURE__ */ jsx28(LayoutContext.Provider, { value: { user: { get: user, set: setUser } }, children: /* @__PURE__ */ jsx28(Layout, { navigation, theme: props.theme, children: /* @__PURE__ */ jsx28(DialogsProvider, { children: props.children }) }) }) });
3982
+ return /* @__PURE__ */ jsx28(ThemeProvider, { theme: createdTheme, children: /* @__PURE__ */ jsx28(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: default2.resolvedLanguage, children: /* @__PURE__ */ jsx28(DialogsProvider, { children: /* @__PURE__ */ jsx28(Layout, { navigation, children }) }) }) });
3952
3983
  };
3953
3984
 
3954
3985
  // src/index.ts
@@ -3999,11 +4030,11 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
3999
4030
 
4000
4031
  // src/components/form/FormCheckbox.tsx
4001
4032
  import { Checkbox, FormControl, FormControlLabel, FormHelperText } from "@mui/material";
4002
- import { jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
4033
+ import { jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
4003
4034
  var FormCheckbox = (props) => {
4004
4035
  const field = useFieldContext();
4005
4036
  const { isTouched, hasError, helperText } = getFieldStatus(field);
4006
- return /* @__PURE__ */ jsxs16(FormControl, { component: "fieldset", children: [
4037
+ return /* @__PURE__ */ jsxs17(FormControl, { component: "fieldset", children: [
4007
4038
  /* @__PURE__ */ jsx30(
4008
4039
  FormControlLabel,
4009
4040
  {
@@ -4107,11 +4138,11 @@ var FormNumberField = ({ options, ...props }) => {
4107
4138
 
4108
4139
  // src/components/form/FormRadioGroup.tsx
4109
4140
  import { FormControl as FormControl2, FormControlLabel as FormControlLabel2, FormHelperText as FormHelperText2, FormLabel, Radio, RadioGroup } from "@mui/material";
4110
- import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
4141
+ import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
4111
4142
  var FormRadioGroup = ({ label, options, ...props }) => {
4112
4143
  const field = useFieldContext();
4113
4144
  const { isTouched, hasError, helperText } = getFieldStatus(field);
4114
- return /* @__PURE__ */ jsxs17(FormControl2, { component: "fieldset", children: [
4145
+ return /* @__PURE__ */ jsxs18(FormControl2, { component: "fieldset", children: [
4115
4146
  label && /* @__PURE__ */ jsx34(FormLabel, { component: "legend", children: label }),
4116
4147
  /* @__PURE__ */ jsx34(
4117
4148
  RadioGroup,
@@ -4139,11 +4170,11 @@ var FormRadioGroup = ({ label, options, ...props }) => {
4139
4170
 
4140
4171
  // src/components/form/FormSlider.tsx
4141
4172
  import { FormControl as FormControl3, FormHelperText as FormHelperText3, FormLabel as FormLabel2, Slider } from "@mui/material";
4142
- import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
4173
+ import { jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
4143
4174
  var FormSlider = ({ label, ...props }) => {
4144
4175
  const field = useFieldContext();
4145
4176
  const { isTouched, hasError, helperText } = getFieldStatus(field);
4146
- return /* @__PURE__ */ jsxs18(FormControl3, { component: "fieldset", children: [
4177
+ return /* @__PURE__ */ jsxs19(FormControl3, { component: "fieldset", children: [
4147
4178
  label && /* @__PURE__ */ jsx35(FormLabel2, { children: label }),
4148
4179
  /* @__PURE__ */ jsx35(
4149
4180
  Slider,
@@ -4185,11 +4216,11 @@ var FormSubmitButton = (props) => {
4185
4216
 
4186
4217
  // src/components/form/FormSwitch.tsx
4187
4218
  import { FormControl as FormControl4, FormControlLabel as FormControlLabel3, FormHelperText as FormHelperText4, Switch } from "@mui/material";
4188
- import { jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
4219
+ import { jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
4189
4220
  var FormSwitch = (props) => {
4190
4221
  const field = useFieldContext();
4191
4222
  const { isTouched, hasError, helperText } = getFieldStatus(field);
4192
- return /* @__PURE__ */ jsxs19(FormControl4, { component: "fieldset", children: [
4223
+ return /* @__PURE__ */ jsxs20(FormControl4, { component: "fieldset", children: [
4193
4224
  /* @__PURE__ */ jsx37(
4194
4225
  FormControlLabel3,
4195
4226
  {
@@ -4255,7 +4286,7 @@ var { useAppForm: useLayoutForm, withForm: withLayoutForm } = createFormHook({
4255
4286
 
4256
4287
  // src/index.ts
4257
4288
  import { default as default3 } from "use-local-storage-state";
4258
- import { useTranslation as useTranslation8 } from "react-i18next";
4289
+ import { useTranslation as useTranslation7 } from "react-i18next";
4259
4290
  import { t } from "i18next";
4260
4291
  export {
4261
4292
  ChipInputCell,
@@ -4276,7 +4307,6 @@ export {
4276
4307
  TableContainer,
4277
4308
  TypographyWithIcon,
4278
4309
  rootRouteHead,
4279
- setSSRLanguage,
4280
4310
  t,
4281
4311
  useDeleteFile,
4282
4312
  useDeleteFiles,
@@ -4290,7 +4320,7 @@ export {
4290
4320
  useLayoutForm,
4291
4321
  default3 as useLocalStorageState,
4292
4322
  useOpenFile,
4293
- useTranslation8 as useTranslation,
4323
+ useTranslation7 as useTranslation,
4294
4324
  useUpdateFileMeta,
4295
4325
  useUploadFile,
4296
4326
  uuidv72 as uuidv7,