wcz-test 3.3.0 → 3.4.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.cjs +3655 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +426 -0
- package/dist/index.d.ts +19 -13
- package/dist/index.js +266 -191
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
209
|
+
var Fragment7 = 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 =
|
|
268
|
+
exports.Fragment = Fragment7;
|
|
269
269
|
exports.Lazy = Lazy;
|
|
270
270
|
exports.Memo = Memo;
|
|
271
271
|
exports.Portal = Portal;
|
|
@@ -1051,9 +1051,9 @@ var PageHeader = ({ title, action, sx }) => {
|
|
|
1051
1051
|
import { Box } from "@mui/material";
|
|
1052
1052
|
import { useEffect, useRef, useState } from "react";
|
|
1053
1053
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
1054
|
-
var TableContainer = ({ children,
|
|
1054
|
+
var TableContainer = ({ children, sx, ...props }) => {
|
|
1055
1055
|
const reference = useRef(null);
|
|
1056
|
-
const [height, setHeight] = useState(
|
|
1056
|
+
const [height, setHeight] = useState();
|
|
1057
1057
|
useEffect(() => {
|
|
1058
1058
|
const element = reference.current;
|
|
1059
1059
|
if (!element) return;
|
|
@@ -1074,12 +1074,10 @@ var TableContainer = ({ children, className, sx }) => {
|
|
|
1074
1074
|
ro.disconnect();
|
|
1075
1075
|
};
|
|
1076
1076
|
}, []);
|
|
1077
|
-
const style = height == null ? { height: "100%" } : { height };
|
|
1078
1077
|
return /* @__PURE__ */ jsx3(
|
|
1079
1078
|
Box,
|
|
1080
1079
|
{
|
|
1081
1080
|
ref: reference,
|
|
1082
|
-
className,
|
|
1083
1081
|
sx: {
|
|
1084
1082
|
display: "flex",
|
|
1085
1083
|
flexDirection: "column",
|
|
@@ -1087,8 +1085,31 @@ var TableContainer = ({ children, className, sx }) => {
|
|
|
1087
1085
|
width: "100%",
|
|
1088
1086
|
...sx
|
|
1089
1087
|
},
|
|
1090
|
-
|
|
1091
|
-
|
|
1088
|
+
height,
|
|
1089
|
+
...props,
|
|
1090
|
+
children: /* @__PURE__ */ jsx3(Box, { sx: (theme) => ({
|
|
1091
|
+
flex: 1,
|
|
1092
|
+
minHeight: 0,
|
|
1093
|
+
height: "100%",
|
|
1094
|
+
"& .MuiDataGrid-cell--editing": {
|
|
1095
|
+
"& .MuiInputBase-root": {
|
|
1096
|
+
height: "100%"
|
|
1097
|
+
}
|
|
1098
|
+
},
|
|
1099
|
+
"& .MuiDataGrid-columnHeaderTitle": {
|
|
1100
|
+
fontWeight: 600
|
|
1101
|
+
},
|
|
1102
|
+
"& .Mui-error": {
|
|
1103
|
+
backgroundColor: theme.palette.error.main,
|
|
1104
|
+
color: theme.palette.error.contrastText
|
|
1105
|
+
},
|
|
1106
|
+
"& .MuiDataGrid-booleanCell[data-value='true']": {
|
|
1107
|
+
color: `${theme.palette.success.main} !important`
|
|
1108
|
+
},
|
|
1109
|
+
"& .MuiDataGrid-booleanCell[data-value='false']": {
|
|
1110
|
+
color: `${theme.palette.error.main} !important`
|
|
1111
|
+
}
|
|
1112
|
+
}), children })
|
|
1092
1113
|
}
|
|
1093
1114
|
);
|
|
1094
1115
|
};
|
|
@@ -1737,7 +1758,7 @@ var Component = React5.forwardRef(function ButtonComponent(props, reference) {
|
|
|
1737
1758
|
});
|
|
1738
1759
|
var CreatedComponent = createLink(Component);
|
|
1739
1760
|
var RouterButton = (props) => {
|
|
1740
|
-
return /* @__PURE__ */ jsx14(CreatedComponent, {
|
|
1761
|
+
return /* @__PURE__ */ jsx14(CreatedComponent, { ...props });
|
|
1741
1762
|
};
|
|
1742
1763
|
|
|
1743
1764
|
// src/components/router/RouterGridActionsCellItem.tsx
|
|
@@ -1752,7 +1773,7 @@ var Component2 = React6.forwardRef(
|
|
|
1752
1773
|
);
|
|
1753
1774
|
var CreatedComponent2 = createLink2(Component2);
|
|
1754
1775
|
var RouterGridActionsCellItem = (props) => {
|
|
1755
|
-
return /* @__PURE__ */ jsx15(CreatedComponent2, {
|
|
1776
|
+
return /* @__PURE__ */ jsx15(CreatedComponent2, { ...props });
|
|
1756
1777
|
};
|
|
1757
1778
|
|
|
1758
1779
|
// src/components/router/RouterIconButton.tsx
|
|
@@ -1765,7 +1786,7 @@ var Component3 = React7.forwardRef(function IconButtonComponent(props, reference
|
|
|
1765
1786
|
});
|
|
1766
1787
|
var CreatedComponent3 = createLink3(Component3);
|
|
1767
1788
|
var RouterIconButton = (props) => {
|
|
1768
|
-
return /* @__PURE__ */ jsx16(CreatedComponent3, {
|
|
1789
|
+
return /* @__PURE__ */ jsx16(CreatedComponent3, { ...props });
|
|
1769
1790
|
};
|
|
1770
1791
|
|
|
1771
1792
|
// src/components/router/RouterLink.tsx
|
|
@@ -1778,7 +1799,7 @@ var Component4 = React8.forwardRef(function LinkComponent(props, reference) {
|
|
|
1778
1799
|
});
|
|
1779
1800
|
var CreatedComponent4 = createLink4(Component4);
|
|
1780
1801
|
var RouterLink = (props) => {
|
|
1781
|
-
return /* @__PURE__ */ jsx17(CreatedComponent4, {
|
|
1802
|
+
return /* @__PURE__ */ jsx17(CreatedComponent4, { ...props });
|
|
1782
1803
|
};
|
|
1783
1804
|
|
|
1784
1805
|
// src/components/router/RouterTab.tsx
|
|
@@ -1791,30 +1812,43 @@ var Component5 = React9.forwardRef(function TabComponent(props, reference) {
|
|
|
1791
1812
|
});
|
|
1792
1813
|
var CreatedComponent5 = createLink5(Component5);
|
|
1793
1814
|
var RouterTab = (props) => {
|
|
1794
|
-
return /* @__PURE__ */ jsx18(CreatedComponent5, {
|
|
1815
|
+
return /* @__PURE__ */ jsx18(CreatedComponent5, { ...props });
|
|
1816
|
+
};
|
|
1817
|
+
|
|
1818
|
+
// src/components/router/RouterListItemButton.tsx
|
|
1819
|
+
import { ListItemButton as ListItemButton3 } from "@mui/material";
|
|
1820
|
+
import { createLink as createLink6 } from "@tanstack/react-router";
|
|
1821
|
+
import React10 from "react";
|
|
1822
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1823
|
+
var Component6 = React10.forwardRef(function ButtonComponent2(props, reference) {
|
|
1824
|
+
return /* @__PURE__ */ jsx19(ListItemButton3, { ref: reference, component: "a", ...props });
|
|
1825
|
+
});
|
|
1826
|
+
var CreatedComponent6 = createLink6(Component6);
|
|
1827
|
+
var RouterListItemButton = (props) => {
|
|
1828
|
+
return /* @__PURE__ */ jsx19(CreatedComponent6, { ...props });
|
|
1795
1829
|
};
|
|
1796
1830
|
|
|
1797
1831
|
// src/components/router/RouterNotFound.tsx
|
|
1798
1832
|
import { Box as Box4, Divider, Typography as Typography5 } from "@mui/material";
|
|
1799
1833
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
1800
|
-
import { jsx as
|
|
1834
|
+
import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1801
1835
|
function RouterNotFound() {
|
|
1802
1836
|
const { t: t2 } = useTranslation4();
|
|
1803
|
-
return /* @__PURE__ */
|
|
1804
|
-
/* @__PURE__ */
|
|
1805
|
-
/* @__PURE__ */
|
|
1806
|
-
/* @__PURE__ */
|
|
1837
|
+
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: [
|
|
1838
|
+
/* @__PURE__ */ jsx20(Typography5, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "404" }),
|
|
1839
|
+
/* @__PURE__ */ jsx20(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
|
|
1840
|
+
/* @__PURE__ */ jsx20(Typography5, { variant: "h5", component: "span", children: t2("Layout.ThisPageCouldNotBeFound") })
|
|
1807
1841
|
] }) });
|
|
1808
1842
|
}
|
|
1809
1843
|
|
|
1810
1844
|
// src/components/router/RouterError.tsx
|
|
1811
1845
|
import { Box as Box5, Divider as Divider2, Typography as Typography6 } from "@mui/material";
|
|
1812
|
-
import { jsx as
|
|
1846
|
+
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1813
1847
|
var RouterError = ({ error }) => {
|
|
1814
|
-
return /* @__PURE__ */
|
|
1815
|
-
/* @__PURE__ */
|
|
1816
|
-
/* @__PURE__ */
|
|
1817
|
-
/* @__PURE__ */
|
|
1848
|
+
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: [
|
|
1849
|
+
/* @__PURE__ */ jsx21(Typography6, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: error.name || "500" }),
|
|
1850
|
+
/* @__PURE__ */ jsx21(Divider2, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
|
|
1851
|
+
/* @__PURE__ */ jsx21(Typography6, { variant: "h5", component: "span", children: error.message })
|
|
1818
1852
|
] }) });
|
|
1819
1853
|
};
|
|
1820
1854
|
|
|
@@ -1842,11 +1876,11 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
1842
1876
|
|
|
1843
1877
|
// node_modules/@mui/x-date-pickers/esm/LocalizationProvider/LocalizationProvider.js
|
|
1844
1878
|
var import_prop_types = __toESM(require_prop_types(), 1);
|
|
1845
|
-
import * as
|
|
1879
|
+
import * as React11 from "react";
|
|
1846
1880
|
import { useThemeProps } from "@mui/material/styles";
|
|
1847
1881
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1848
1882
|
var _excluded = ["localeText"];
|
|
1849
|
-
var PickerAdapterContext = /* @__PURE__ */
|
|
1883
|
+
var PickerAdapterContext = /* @__PURE__ */ React11.createContext(null);
|
|
1850
1884
|
if (process.env.NODE_ENV !== "production") PickerAdapterContext.displayName = "PickerAdapterContext";
|
|
1851
1885
|
var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
1852
1886
|
const {
|
|
@@ -1855,7 +1889,7 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
|
1855
1889
|
const {
|
|
1856
1890
|
adapter: parentAdapter,
|
|
1857
1891
|
localeText: parentLocaleText
|
|
1858
|
-
} =
|
|
1892
|
+
} = React11.useContext(PickerAdapterContext) ?? {
|
|
1859
1893
|
utils: void 0,
|
|
1860
1894
|
adapter: void 0,
|
|
1861
1895
|
localeText: void 0
|
|
@@ -1874,8 +1908,8 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
|
1874
1908
|
adapterLocale,
|
|
1875
1909
|
localeText: themeLocaleText
|
|
1876
1910
|
} = props;
|
|
1877
|
-
const localeText =
|
|
1878
|
-
const adapter =
|
|
1911
|
+
const localeText = React11.useMemo(() => _extends({}, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);
|
|
1912
|
+
const adapter = React11.useMemo(() => {
|
|
1879
1913
|
if (!DateAdapter) {
|
|
1880
1914
|
if (parentAdapter) {
|
|
1881
1915
|
return parentAdapter;
|
|
@@ -1893,7 +1927,7 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
|
1893
1927
|
}
|
|
1894
1928
|
return dateAdapter;
|
|
1895
1929
|
}, [DateAdapter, adapterLocale, dateFormats, dateLibInstance, parentAdapter]);
|
|
1896
|
-
const defaultDates =
|
|
1930
|
+
const defaultDates = React11.useMemo(() => {
|
|
1897
1931
|
if (!adapter) {
|
|
1898
1932
|
return null;
|
|
1899
1933
|
}
|
|
@@ -1902,7 +1936,7 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
|
1902
1936
|
maxDate: adapter.date("2099-12-31T00:00:00.000")
|
|
1903
1937
|
};
|
|
1904
1938
|
}, [adapter]);
|
|
1905
|
-
const contextValue =
|
|
1939
|
+
const contextValue = React11.useMemo(() => {
|
|
1906
1940
|
return {
|
|
1907
1941
|
utils: adapter,
|
|
1908
1942
|
adapter,
|
|
@@ -2548,30 +2582,6 @@ var useGetTheme = (theme) => {
|
|
|
2548
2582
|
};
|
|
2549
2583
|
}
|
|
2550
2584
|
},
|
|
2551
|
-
MuiTableContainer: {
|
|
2552
|
-
styleOverrides: {
|
|
2553
|
-
root: ({ theme: theme2 }) => ({
|
|
2554
|
-
"& .MuiDataGrid-cell--editing": {
|
|
2555
|
-
"& .MuiInputBase-root": {
|
|
2556
|
-
height: "100%"
|
|
2557
|
-
}
|
|
2558
|
-
},
|
|
2559
|
-
"& .MuiDataGrid-columnHeaderTitle": {
|
|
2560
|
-
fontWeight: 600
|
|
2561
|
-
},
|
|
2562
|
-
"& .Mui-error": {
|
|
2563
|
-
backgroundColor: theme2.palette.error.main,
|
|
2564
|
-
color: theme2.palette.error.contrastText
|
|
2565
|
-
},
|
|
2566
|
-
"& .MuiDataGrid-booleanCell[data-value='true']": {
|
|
2567
|
-
color: `${theme2.palette.success.main} !important`
|
|
2568
|
-
},
|
|
2569
|
-
"& .MuiDataGrid-booleanCell[data-value='false']": {
|
|
2570
|
-
color: `${theme2.palette.error.main} !important`
|
|
2571
|
-
}
|
|
2572
|
-
})
|
|
2573
|
-
}
|
|
2574
|
-
},
|
|
2575
2585
|
...theme?.components
|
|
2576
2586
|
}
|
|
2577
2587
|
},
|
|
@@ -2592,25 +2602,45 @@ import { useNavigate, useRouterState as useRouterState2 } from "@tanstack/react-
|
|
|
2592
2602
|
import Divider3 from "@mui/material/Divider";
|
|
2593
2603
|
import List3 from "@mui/material/List";
|
|
2594
2604
|
import ListSubheader from "@mui/material/ListSubheader";
|
|
2595
|
-
import { Fragment as
|
|
2605
|
+
import { Fragment as Fragment5, useEffect as useEffect5, useState as useState7 } from "react";
|
|
2596
2606
|
|
|
2597
2607
|
// src/components/core/navigation/NavigationListItem.tsx
|
|
2598
2608
|
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
2599
2609
|
import Avatar from "@mui/material/Avatar";
|
|
2600
2610
|
import Box6 from "@mui/material/Box";
|
|
2601
|
-
import
|
|
2602
|
-
import Grow from "@mui/material/Grow";
|
|
2611
|
+
import Popper from "@mui/material/Popper";
|
|
2603
2612
|
import ListItem from "@mui/material/ListItem";
|
|
2604
|
-
import
|
|
2613
|
+
import ListItemButton4 from "@mui/material/ListItemButton";
|
|
2605
2614
|
import ListItemIcon3 from "@mui/material/ListItemIcon";
|
|
2606
2615
|
import ListItemText3 from "@mui/material/ListItemText";
|
|
2607
2616
|
import Paper2 from "@mui/material/Paper";
|
|
2608
2617
|
import { styled } from "@mui/material/styles";
|
|
2609
2618
|
import Typography7 from "@mui/material/Typography";
|
|
2610
2619
|
import { Fragment as Fragment3, useMemo as useMemo3, useState as useState6 } from "react";
|
|
2611
|
-
import {
|
|
2620
|
+
import { Collapse } from "@mui/material";
|
|
2621
|
+
import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2612
2622
|
var ICON_SIZE = 34;
|
|
2613
|
-
var StyledNavButton = styled(
|
|
2623
|
+
var StyledNavButton = styled(ListItemButton4)(({ theme }) => ({
|
|
2624
|
+
borderRadius: 8,
|
|
2625
|
+
"&.Mui-selected": {
|
|
2626
|
+
"& .MuiListItemIcon-root, & .MuiTypography-root, & .MuiSvgIcon-root": {
|
|
2627
|
+
color: (theme.vars ?? theme).palette.primary.dark
|
|
2628
|
+
},
|
|
2629
|
+
"& .MuiAvatar-root": {
|
|
2630
|
+
backgroundColor: (theme.vars ?? theme).palette.primary.dark
|
|
2631
|
+
},
|
|
2632
|
+
"& .MuiTouchRipple-child": {
|
|
2633
|
+
backgroundColor: (theme.vars ?? theme).palette.primary.dark
|
|
2634
|
+
}
|
|
2635
|
+
},
|
|
2636
|
+
"& .MuiSvgIcon-root": {
|
|
2637
|
+
color: (theme.vars ?? theme).palette.action.active
|
|
2638
|
+
},
|
|
2639
|
+
"& .MuiAvatar-root": {
|
|
2640
|
+
backgroundColor: (theme.vars ?? theme).palette.action.active
|
|
2641
|
+
}
|
|
2642
|
+
}));
|
|
2643
|
+
var StyledRouterButton = styled(RouterListItemButton)(({ theme }) => ({
|
|
2614
2644
|
borderRadius: 8,
|
|
2615
2645
|
"&.Mui-selected": {
|
|
2616
2646
|
"& .MuiListItemIcon-root, & .MuiTypography-root, & .MuiSvgIcon-root": {
|
|
@@ -2635,9 +2665,9 @@ var IconOrAvatar = ({ item, collapsed }) => {
|
|
|
2635
2665
|
return /* @__PURE__ */ jsxs12(Box6, { sx: collapsed ? { position: "absolute", left: "50%", top: "calc(50% - 6px)", transform: "translate(-50%, -50%)" } : {}, children: [
|
|
2636
2666
|
/* @__PURE__ */ jsxs12(ListItemIcon3, { sx: { display: "flex", alignItems: "center", justifyContent: "center", minWidth: ICON_SIZE }, children: [
|
|
2637
2667
|
item.icon ?? null,
|
|
2638
|
-
!item.icon && collapsed ? /* @__PURE__ */
|
|
2668
|
+
!item.icon && collapsed ? /* @__PURE__ */ jsx22(Avatar, { sx: { width: ICON_SIZE - 7, height: ICON_SIZE - 7, fontSize: 12 }, children: item.title }) : null
|
|
2639
2669
|
] }),
|
|
2640
|
-
collapsed ? /* @__PURE__ */
|
|
2670
|
+
collapsed ? /* @__PURE__ */ jsx22(
|
|
2641
2671
|
Typography7,
|
|
2642
2672
|
{
|
|
2643
2673
|
variant: "caption",
|
|
@@ -2661,9 +2691,35 @@ var IconOrAvatar = ({ item, collapsed }) => {
|
|
|
2661
2691
|
}
|
|
2662
2692
|
return null;
|
|
2663
2693
|
};
|
|
2664
|
-
var MiniPopover = ({ open,
|
|
2694
|
+
var MiniPopover = ({ open, anchorEl, children }) => /* @__PURE__ */ jsx22(
|
|
2695
|
+
Popper,
|
|
2696
|
+
{
|
|
2697
|
+
open,
|
|
2698
|
+
anchorEl,
|
|
2699
|
+
placement: "right-start",
|
|
2700
|
+
modifiers: [
|
|
2701
|
+
{ name: "offset", options: { offset: [6, 0] } },
|
|
2702
|
+
{ name: "preventOverflow", options: { padding: 8 } },
|
|
2703
|
+
{ name: "flip", options: { fallbackPlacements: ["right-end", "left-start"] } }
|
|
2704
|
+
],
|
|
2705
|
+
children: /* @__PURE__ */ jsx22(
|
|
2706
|
+
Paper2,
|
|
2707
|
+
{
|
|
2708
|
+
sx: {
|
|
2709
|
+
pt: 0.5,
|
|
2710
|
+
pb: 0.5,
|
|
2711
|
+
maxHeight: "min(calc(100vh - 100px), 560px)",
|
|
2712
|
+
overflowY: "auto",
|
|
2713
|
+
overscrollBehavior: "contain"
|
|
2714
|
+
},
|
|
2715
|
+
children
|
|
2716
|
+
}
|
|
2717
|
+
)
|
|
2718
|
+
}
|
|
2719
|
+
);
|
|
2665
2720
|
var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSidebarFullyExpanded = true, isSidebarFullyCollapsed, onClick, renderNested }) => {
|
|
2666
2721
|
const [hoveredPopoverItem, setHoveredPopoverItem] = useState6(null);
|
|
2722
|
+
const [anchorElement, setAnchorElement] = useState6(null);
|
|
2667
2723
|
const chevronSx = useMemo3(() => {
|
|
2668
2724
|
if (collapsed && isSidebarFullyCollapsed && item.children) {
|
|
2669
2725
|
return {
|
|
@@ -2677,20 +2733,35 @@ var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSideb
|
|
|
2677
2733
|
if (!collapsed && isSidebarFullyExpanded && item.children) {
|
|
2678
2734
|
return {
|
|
2679
2735
|
ml: 0.5,
|
|
2680
|
-
transform: `rotate(${isOpen ? 0 : -90}deg)
|
|
2681
|
-
transition: (theme) => theme.transitions.create("transform", {
|
|
2682
|
-
easing: theme.transitions.easing.sharp,
|
|
2683
|
-
duration: 100
|
|
2684
|
-
})
|
|
2736
|
+
transform: `rotate(${isOpen ? 0 : -90}deg)`
|
|
2685
2737
|
};
|
|
2686
2738
|
}
|
|
2687
2739
|
return { display: "none" };
|
|
2688
2740
|
}, [collapsed, isSidebarFullyExpanded, isSidebarFullyCollapsed, isOpen, item.children]);
|
|
2741
|
+
const shouldJustExpand = item.children && !collapsed;
|
|
2742
|
+
const buttonProps = {
|
|
2743
|
+
selected,
|
|
2744
|
+
disabled,
|
|
2745
|
+
sx: { px: 1.4, height: collapsed ? 60 : 48 }
|
|
2746
|
+
};
|
|
2747
|
+
const buttonContent = /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
2748
|
+
/* @__PURE__ */ jsx22(IconOrAvatar, { item, collapsed }),
|
|
2749
|
+
!collapsed && /* @__PURE__ */ jsx22(
|
|
2750
|
+
ListItemText3,
|
|
2751
|
+
{
|
|
2752
|
+
primary: item.title,
|
|
2753
|
+
slotProps: { primary: { noWrap: true, title: item.title } },
|
|
2754
|
+
sx: { ml: 1.2, flex: 1, minWidth: 0, "& .MuiTypography-root": { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } }
|
|
2755
|
+
}
|
|
2756
|
+
),
|
|
2757
|
+
item.children ? /* @__PURE__ */ jsx22(ExpandMoreIcon, { sx: chevronSx }) : null
|
|
2758
|
+
] });
|
|
2689
2759
|
const listItem = /* @__PURE__ */ jsxs12(
|
|
2690
2760
|
ListItem,
|
|
2691
2761
|
{
|
|
2692
2762
|
...item.children && collapsed ? {
|
|
2693
|
-
onMouseEnter: () => {
|
|
2763
|
+
onMouseEnter: (event) => {
|
|
2764
|
+
setAnchorElement(event.currentTarget);
|
|
2694
2765
|
setHoveredPopoverItem(item.title);
|
|
2695
2766
|
},
|
|
2696
2767
|
onMouseLeave: () => {
|
|
@@ -2699,30 +2770,29 @@ var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSideb
|
|
|
2699
2770
|
} : {},
|
|
2700
2771
|
sx: { py: 0, px: 1, overflowX: "hidden" },
|
|
2701
2772
|
children: [
|
|
2702
|
-
/* @__PURE__ */
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
item.children && collapsed ? /* @__PURE__ */ jsx21(MiniPopover, { open: item.title === hoveredPopoverItem, children: renderNested?.(item.children) }) : null
|
|
2773
|
+
shouldJustExpand ? /* @__PURE__ */ jsx22(StyledNavButton, { ...buttonProps, onClick: () => onClick?.(item), children: buttonContent }) : /* @__PURE__ */ jsx22(
|
|
2774
|
+
StyledRouterButton,
|
|
2775
|
+
{
|
|
2776
|
+
...buttonProps,
|
|
2777
|
+
to: item.to,
|
|
2778
|
+
href: item.href,
|
|
2779
|
+
params: item.params,
|
|
2780
|
+
search: item.search,
|
|
2781
|
+
children: buttonContent
|
|
2782
|
+
}
|
|
2783
|
+
),
|
|
2784
|
+
item.children && collapsed ? /* @__PURE__ */ jsx22(MiniPopover, { open: item.title === hoveredPopoverItem, anchorEl: anchorElement, children: renderNested?.(item.children) }) : null
|
|
2715
2785
|
]
|
|
2716
2786
|
}
|
|
2717
2787
|
);
|
|
2718
2788
|
return /* @__PURE__ */ jsxs12(Fragment3, { children: [
|
|
2719
2789
|
listItem,
|
|
2720
|
-
item.children && !collapsed ? /* @__PURE__ */
|
|
2790
|
+
item.children && !collapsed ? /* @__PURE__ */ jsx22(Collapse, { in: isOpen, timeout: "auto", unmountOnExit: true, children: renderNested?.(item.children) }) : null
|
|
2721
2791
|
] }, item.to);
|
|
2722
2792
|
};
|
|
2723
2793
|
|
|
2724
2794
|
// src/components/core/navigation/NavigationList.tsx
|
|
2725
|
-
import { jsx as
|
|
2795
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2726
2796
|
var isPageItem = (item) => !("kind" in item);
|
|
2727
2797
|
var isDivider = (item) => "kind" in item && item.kind === "divider";
|
|
2728
2798
|
var isHeader = (item) => "kind" in item && item.kind === "header";
|
|
@@ -2732,7 +2802,7 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
2732
2802
|
if (collapsed) setOpenKeys([]);
|
|
2733
2803
|
}, [collapsed]);
|
|
2734
2804
|
const toggleKey = (key) => setOpenKeys((previous) => previous.includes(key) ? previous.filter((k) => k !== key) : [...previous, key]);
|
|
2735
|
-
const renderNested = (children) => /* @__PURE__ */
|
|
2805
|
+
const renderNested = (children) => /* @__PURE__ */ jsx23(
|
|
2736
2806
|
NavigationList,
|
|
2737
2807
|
{
|
|
2738
2808
|
subNavigation: children,
|
|
@@ -2743,7 +2813,8 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
2743
2813
|
onNavigate
|
|
2744
2814
|
}
|
|
2745
2815
|
);
|
|
2746
|
-
|
|
2816
|
+
const filteredNavigation = subNavigation.filter((nav) => !nav.hidden);
|
|
2817
|
+
return /* @__PURE__ */ jsx23(
|
|
2747
2818
|
List3,
|
|
2748
2819
|
{
|
|
2749
2820
|
sx: {
|
|
@@ -2754,9 +2825,9 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
2754
2825
|
minWidth: isPopover && depth === 1 ? EXPANDED_WIDTH : "auto",
|
|
2755
2826
|
width: collapsed ? MINI_WIDTH : "auto"
|
|
2756
2827
|
},
|
|
2757
|
-
children:
|
|
2828
|
+
children: filteredNavigation.map((navItem, index) => {
|
|
2758
2829
|
if (isHeader(navItem)) {
|
|
2759
|
-
return /* @__PURE__ */
|
|
2830
|
+
return /* @__PURE__ */ jsx23(
|
|
2760
2831
|
ListSubheader,
|
|
2761
2832
|
{
|
|
2762
2833
|
sx: {
|
|
@@ -2778,14 +2849,14 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
2778
2849
|
);
|
|
2779
2850
|
}
|
|
2780
2851
|
if (isDivider(navItem)) {
|
|
2781
|
-
const nextItem =
|
|
2782
|
-
return /* @__PURE__ */
|
|
2852
|
+
const nextItem = filteredNavigation[index + 1];
|
|
2853
|
+
return /* @__PURE__ */ jsx23("li", { children: /* @__PURE__ */ jsx23(Divider3, { sx: { mx: 1, mt: 1, mb: nextItem && isHeader(nextItem) && !collapsed ? 0 : 1 } }) }, `divider-${depth}-${index}`);
|
|
2783
2854
|
}
|
|
2784
2855
|
if (!isPageItem(navItem)) return null;
|
|
2785
2856
|
const key = `item-${depth}-${index}`;
|
|
2786
2857
|
const uniqueItemKey = `${depth}-${index}-${navItem.title}`;
|
|
2787
|
-
if (renderItem) return /* @__PURE__ */
|
|
2788
|
-
return /* @__PURE__ */
|
|
2858
|
+
if (renderItem) return /* @__PURE__ */ jsx23(Fragment5, { children: renderItem(navItem, { collapsed: !!collapsed }) }, key);
|
|
2859
|
+
return /* @__PURE__ */ jsx23(
|
|
2789
2860
|
NavigationListItem,
|
|
2790
2861
|
{
|
|
2791
2862
|
item: navItem,
|
|
@@ -2794,7 +2865,7 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
2794
2865
|
collapsed,
|
|
2795
2866
|
isSidebarFullyExpanded,
|
|
2796
2867
|
isSidebarFullyCollapsed,
|
|
2797
|
-
onClick:
|
|
2868
|
+
onClick: navItem.children && !collapsed ? () => toggleKey(uniqueItemKey) : void 0,
|
|
2798
2869
|
renderNested
|
|
2799
2870
|
},
|
|
2800
2871
|
key
|
|
@@ -2805,7 +2876,7 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
2805
2876
|
};
|
|
2806
2877
|
|
|
2807
2878
|
// src/components/core/navigation/NavigationRail.tsx
|
|
2808
|
-
import { jsx as
|
|
2879
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2809
2880
|
var MINI_WIDTH = 84;
|
|
2810
2881
|
var EXPANDED_WIDTH = 320;
|
|
2811
2882
|
var TOOLBAR_HEIGHT = 65;
|
|
@@ -2814,7 +2885,7 @@ var NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
2814
2885
|
const routerState = useRouterState2();
|
|
2815
2886
|
const theme = useTheme2();
|
|
2816
2887
|
const showPermanent = useMediaQuery(theme.breakpoints.up("sm"));
|
|
2817
|
-
const drawerContent = (collapsed) => /* @__PURE__ */
|
|
2888
|
+
const drawerContent = (collapsed) => /* @__PURE__ */ jsx24(
|
|
2818
2889
|
Box7,
|
|
2819
2890
|
{
|
|
2820
2891
|
component: "nav",
|
|
@@ -2828,7 +2899,7 @@ var NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
2828
2899
|
overflowX: "hidden",
|
|
2829
2900
|
pt: navigation[0] && isHeader(navigation[0]) && !collapsed ? 0 : 2
|
|
2830
2901
|
},
|
|
2831
|
-
children: /* @__PURE__ */
|
|
2902
|
+
children: /* @__PURE__ */ jsx24(
|
|
2832
2903
|
NavigationList,
|
|
2833
2904
|
{
|
|
2834
2905
|
subNavigation: navigation,
|
|
@@ -2843,7 +2914,7 @@ var NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
2843
2914
|
}
|
|
2844
2915
|
);
|
|
2845
2916
|
if (showPermanent)
|
|
2846
|
-
return /* @__PURE__ */
|
|
2917
|
+
return /* @__PURE__ */ jsx24(
|
|
2847
2918
|
Drawer,
|
|
2848
2919
|
{
|
|
2849
2920
|
variant: "permanent",
|
|
@@ -2859,7 +2930,7 @@ var NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
2859
2930
|
children: drawerContent(!expanded)
|
|
2860
2931
|
}
|
|
2861
2932
|
);
|
|
2862
|
-
return /* @__PURE__ */
|
|
2933
|
+
return /* @__PURE__ */ jsx24(Drawer, { open: expanded, onClose: () => setExpanded(false), children: drawerContent(!expanded) });
|
|
2863
2934
|
};
|
|
2864
2935
|
|
|
2865
2936
|
// src/components/core/ToolbarAccount.tsx
|
|
@@ -2873,8 +2944,8 @@ import Login from "@mui/icons-material/Login";
|
|
|
2873
2944
|
import Logout from "@mui/icons-material/Logout";
|
|
2874
2945
|
import SettingsBrightness from "@mui/icons-material/SettingsBrightness";
|
|
2875
2946
|
import Translate from "@mui/icons-material/Translate";
|
|
2876
|
-
import { Avatar as Avatar2, Box as Box8, IconButton as IconButton4, List as List4, ListItem as ListItem2, ListItemButton as
|
|
2877
|
-
import { Fragment as
|
|
2947
|
+
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";
|
|
2948
|
+
import { Fragment as Fragment6, useState as useState8 } from "react";
|
|
2878
2949
|
import { useTranslation as useTranslation6 } from "react-i18next";
|
|
2879
2950
|
|
|
2880
2951
|
// src/auth-test/keycloak.ts
|
|
@@ -2895,7 +2966,7 @@ function useKeycloak() {
|
|
|
2895
2966
|
}
|
|
2896
2967
|
|
|
2897
2968
|
// src/components/core/ToolbarAccount.tsx
|
|
2898
|
-
import { jsx as
|
|
2969
|
+
import { jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2899
2970
|
var ToolbarAccount = () => {
|
|
2900
2971
|
const [anchorElement, setAnchorElement] = useState8();
|
|
2901
2972
|
const [tab, setTab] = useState8("settings");
|
|
@@ -2935,60 +3006,60 @@ var ToolbarAccount = () => {
|
|
|
2935
3006
|
setTimeout(() => setTab("settings"), 300);
|
|
2936
3007
|
};
|
|
2937
3008
|
const changeTab = (newTab) => () => setTab(newTab);
|
|
2938
|
-
const settings = /* @__PURE__ */ jsxs13(List4, { component: "nav", subheader: /* @__PURE__ */
|
|
2939
|
-
/* @__PURE__ */ jsxs13(
|
|
2940
|
-
/* @__PURE__ */
|
|
2941
|
-
/* @__PURE__ */
|
|
2942
|
-
/* @__PURE__ */
|
|
3009
|
+
const settings = /* @__PURE__ */ jsxs13(List4, { component: "nav", subheader: /* @__PURE__ */ jsx25(ListSubheader2, { sx: { backgroundColor: "transparent" }, children: t2("Layout.Settings") }), children: [
|
|
3010
|
+
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: changeTab("theme"), sx: { py: 0.3 }, children: [
|
|
3011
|
+
/* @__PURE__ */ jsx25(ListItemIcon4, { children: /* @__PURE__ */ jsx25(Brightness4, {}) }),
|
|
3012
|
+
/* @__PURE__ */ jsx25(ListItemText4, { primary: t2("Layout.Appearance"), secondary: getModeText() }),
|
|
3013
|
+
/* @__PURE__ */ jsx25(ChevronRight, {})
|
|
2943
3014
|
] }),
|
|
2944
|
-
/* @__PURE__ */ jsxs13(
|
|
2945
|
-
/* @__PURE__ */
|
|
2946
|
-
/* @__PURE__ */
|
|
2947
|
-
/* @__PURE__ */
|
|
3015
|
+
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: changeTab("language"), sx: { py: 0.3 }, children: [
|
|
3016
|
+
/* @__PURE__ */ jsx25(ListItemIcon4, { children: /* @__PURE__ */ jsx25(Translate, {}) }),
|
|
3017
|
+
/* @__PURE__ */ jsx25(ListItemText4, { primary: t2("Layout.Language"), secondary: i18n2.resolvedLanguage === "en" ? "English" : "\u010Ce\u0161tina" }),
|
|
3018
|
+
/* @__PURE__ */ jsx25(ChevronRight, {})
|
|
2948
3019
|
] })
|
|
2949
3020
|
] });
|
|
2950
3021
|
const theme = /* @__PURE__ */ jsxs13(List4, { subheader: /* @__PURE__ */ jsxs13(ListSubheader2, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
2951
|
-
/* @__PURE__ */
|
|
3022
|
+
/* @__PURE__ */ jsx25(IconButton4, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx25(ArrowBack, { fontSize: "small" }) }),
|
|
2952
3023
|
" ",
|
|
2953
3024
|
t2("Layout.Appearance")
|
|
2954
3025
|
] }), children: [
|
|
2955
|
-
/* @__PURE__ */ jsxs13(
|
|
2956
|
-
/* @__PURE__ */
|
|
2957
|
-
/* @__PURE__ */
|
|
3026
|
+
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: changeMode("light"), disabled: mode === "light", children: [
|
|
3027
|
+
/* @__PURE__ */ jsx25(ListItemIcon4, { children: /* @__PURE__ */ jsx25(LightMode, {}) }),
|
|
3028
|
+
/* @__PURE__ */ jsx25(ListItemText4, { primary: t2("Layout.Light") })
|
|
2958
3029
|
] }),
|
|
2959
|
-
/* @__PURE__ */ jsxs13(
|
|
2960
|
-
/* @__PURE__ */
|
|
2961
|
-
/* @__PURE__ */
|
|
3030
|
+
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: changeMode("dark"), disabled: mode === "dark", children: [
|
|
3031
|
+
/* @__PURE__ */ jsx25(ListItemIcon4, { children: /* @__PURE__ */ jsx25(DarkMode, {}) }),
|
|
3032
|
+
/* @__PURE__ */ jsx25(ListItemText4, { primary: t2("Layout.Dark") })
|
|
2962
3033
|
] }),
|
|
2963
|
-
/* @__PURE__ */ jsxs13(
|
|
2964
|
-
/* @__PURE__ */
|
|
2965
|
-
/* @__PURE__ */
|
|
3034
|
+
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: changeMode("system"), disabled: mode === "system", children: [
|
|
3035
|
+
/* @__PURE__ */ jsx25(ListItemIcon4, { children: /* @__PURE__ */ jsx25(SettingsBrightness, {}) }),
|
|
3036
|
+
/* @__PURE__ */ jsx25(ListItemText4, { primary: t2("Layout.System") })
|
|
2966
3037
|
] })
|
|
2967
3038
|
] });
|
|
2968
3039
|
const language = /* @__PURE__ */ jsxs13(List4, { subheader: /* @__PURE__ */ jsxs13(ListSubheader2, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
2969
|
-
/* @__PURE__ */
|
|
3040
|
+
/* @__PURE__ */ jsx25(IconButton4, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx25(ArrowBack, { fontSize: "small" }) }),
|
|
2970
3041
|
" ",
|
|
2971
3042
|
t2("Layout.Language")
|
|
2972
3043
|
] }), children: [
|
|
2973
|
-
/* @__PURE__ */
|
|
2974
|
-
/* @__PURE__ */
|
|
3044
|
+
/* @__PURE__ */ jsx25(ListItemButton5, { onClick: changeLanguage("en"), disabled: i18n2.resolvedLanguage === "en", children: /* @__PURE__ */ jsx25(ListItemText4, { primary: "English" }) }),
|
|
3045
|
+
/* @__PURE__ */ jsx25(ListItemButton5, { onClick: changeLanguage("cs"), disabled: i18n2.resolvedLanguage === "cs", children: /* @__PURE__ */ jsx25(ListItemText4, { primary: "\u010Ce\u0161tina" }) })
|
|
2975
3046
|
] });
|
|
2976
|
-
return /* @__PURE__ */ jsxs13(
|
|
2977
|
-
/* @__PURE__ */
|
|
2978
|
-
/* @__PURE__ */
|
|
2979
|
-
/* @__PURE__ */
|
|
2980
|
-
/* @__PURE__ */
|
|
2981
|
-
/* @__PURE__ */
|
|
2982
|
-
/* @__PURE__ */
|
|
2983
|
-
/* @__PURE__ */
|
|
3047
|
+
return /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
3048
|
+
/* @__PURE__ */ jsx25(IconButton4, { size: "small", edge: "end", onClick: openMenu, children: user?.name ? /* @__PURE__ */ jsx25(Avatar2, { sx: { width: { xs: 32, sm: 40 }, height: { xs: 32, sm: 40 }, bgcolor: "primary.main" }, children: /* @__PURE__ */ jsx25(Typography8, { variant: "subtitle2", sx: { fontWeight: "bold", lineHeight: 0 }, children: usernameInitials() }) }) : /* @__PURE__ */ jsx25(AccountCircle, { fontSize: "large" }) }),
|
|
3049
|
+
/* @__PURE__ */ jsx25(Menu2, { anchorEl: anchorElement, open, onClose: closeMenu, children: /* @__PURE__ */ jsxs13(Box8, { sx: { width: 240 }, children: [
|
|
3050
|
+
/* @__PURE__ */ jsx25(List4, { children: user?.name ? /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
3051
|
+
/* @__PURE__ */ jsx25(ListItem2, { children: /* @__PURE__ */ jsx25(ListItemText4, { primary: user.name, secondary: /* @__PURE__ */ jsxs13("span", { children: [
|
|
3052
|
+
/* @__PURE__ */ jsx25("span", { children: user.employeeId }),
|
|
3053
|
+
/* @__PURE__ */ jsx25("br", {}),
|
|
3054
|
+
/* @__PURE__ */ jsx25("span", { children: user.department })
|
|
2984
3055
|
] }) }) }),
|
|
2985
|
-
/* @__PURE__ */ jsxs13(
|
|
2986
|
-
/* @__PURE__ */
|
|
2987
|
-
/* @__PURE__ */
|
|
3056
|
+
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: () => keycloak.logout(), children: [
|
|
3057
|
+
/* @__PURE__ */ jsx25(ListItemIcon4, { children: /* @__PURE__ */ jsx25(Logout, { color: "error" }) }),
|
|
3058
|
+
/* @__PURE__ */ jsx25(ListItemText4, { primary: t2("Layout.Logout") })
|
|
2988
3059
|
] })
|
|
2989
|
-
] }) : /* @__PURE__ */ jsxs13(
|
|
2990
|
-
/* @__PURE__ */
|
|
2991
|
-
/* @__PURE__ */
|
|
3060
|
+
] }) : /* @__PURE__ */ jsxs13(ListItemButton5, { onClick: () => keycloak.login(), children: [
|
|
3061
|
+
/* @__PURE__ */ jsx25(ListItemIcon4, { children: /* @__PURE__ */ jsx25(Login, { color: "success" }) }),
|
|
3062
|
+
/* @__PURE__ */ jsx25(ListItemText4, { primary: t2("Layout.LogIn") })
|
|
2992
3063
|
] }) }),
|
|
2993
3064
|
tab === "settings" && settings,
|
|
2994
3065
|
tab === "theme" && theme,
|
|
@@ -2998,7 +3069,7 @@ var ToolbarAccount = () => {
|
|
|
2998
3069
|
};
|
|
2999
3070
|
|
|
3000
3071
|
// src/components/core/Layout.tsx
|
|
3001
|
-
import { jsx as
|
|
3072
|
+
import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3002
3073
|
var DrawerHeader = styled2("div")(({ theme }) => ({
|
|
3003
3074
|
display: "flex",
|
|
3004
3075
|
alignItems: "center",
|
|
@@ -3012,10 +3083,10 @@ var Layout = (props) => {
|
|
|
3012
3083
|
const isFetching = !!useIsFetching();
|
|
3013
3084
|
const isMutating = !!useIsMutating();
|
|
3014
3085
|
return /* @__PURE__ */ jsxs14(ThemeProvider, { theme, children: [
|
|
3015
|
-
/* @__PURE__ */
|
|
3016
|
-
/* @__PURE__ */
|
|
3086
|
+
/* @__PURE__ */ jsx26(InitColorSchemeScript, {}),
|
|
3087
|
+
/* @__PURE__ */ jsx26(CssBaseline, {}),
|
|
3017
3088
|
/* @__PURE__ */ jsxs14(Box9, { sx: { display: "flex", height: "100dvh", maxHeight: "100dvh", overflow: "hidden", width: "100%" }, children: [
|
|
3018
|
-
/* @__PURE__ */
|
|
3089
|
+
/* @__PURE__ */ jsx26(
|
|
3019
3090
|
AppBar,
|
|
3020
3091
|
{
|
|
3021
3092
|
color: "transparent",
|
|
@@ -3026,26 +3097,26 @@ var Layout = (props) => {
|
|
|
3026
3097
|
boxShadow: "none"
|
|
3027
3098
|
},
|
|
3028
3099
|
children: /* @__PURE__ */ jsxs14(Toolbar, { children: [
|
|
3029
|
-
props.navigation && /* @__PURE__ */
|
|
3100
|
+
props.navigation && /* @__PURE__ */ jsx26(
|
|
3030
3101
|
IconButton5,
|
|
3031
3102
|
{
|
|
3032
3103
|
onClick: () => setNavigationOpen((previous) => !previous),
|
|
3033
3104
|
sx: { marginRight: 2 },
|
|
3034
|
-
children: navigationOpen ? /* @__PURE__ */
|
|
3105
|
+
children: navigationOpen ? /* @__PURE__ */ jsx26(MenuOpen, {}) : /* @__PURE__ */ jsx26(Menu3, {})
|
|
3035
3106
|
}
|
|
3036
3107
|
),
|
|
3037
|
-
/* @__PURE__ */
|
|
3038
|
-
/* @__PURE__ */
|
|
3108
|
+
/* @__PURE__ */ jsx26(AppTitle, {}),
|
|
3109
|
+
/* @__PURE__ */ jsx26(ToolbarAccount, {})
|
|
3039
3110
|
] })
|
|
3040
3111
|
}
|
|
3041
3112
|
),
|
|
3042
|
-
props.navigation && /* @__PURE__ */
|
|
3113
|
+
props.navigation && /* @__PURE__ */ jsx26(NavigationRail, { navigation: props.navigation, expanded: navigationOpen ?? false, setExpanded: setNavigationOpen }),
|
|
3043
3114
|
/* @__PURE__ */ jsxs14(Box9, { component: "main", sx: { flexGrow: 1, display: "flex", flexDirection: "column", minWidth: 0, height: "100%", overflow: "hidden" }, children: [
|
|
3044
|
-
/* @__PURE__ */
|
|
3045
|
-
/* @__PURE__ */
|
|
3115
|
+
/* @__PURE__ */ jsx26(DrawerHeader, {}),
|
|
3116
|
+
/* @__PURE__ */ jsx26(Box9, { sx: { flex: 1, overflow: "auto", position: "relative" }, children: props.children })
|
|
3046
3117
|
] })
|
|
3047
3118
|
] }),
|
|
3048
|
-
(isFetching || isMutating) && /* @__PURE__ */
|
|
3119
|
+
(isFetching || isMutating) && /* @__PURE__ */ jsx26(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
|
|
3049
3120
|
] });
|
|
3050
3121
|
};
|
|
3051
3122
|
|
|
@@ -3071,13 +3142,13 @@ i18n.use(HttpBackend).use(LanguageDetector).use(initReactI18next).init({
|
|
|
3071
3142
|
|
|
3072
3143
|
// src/providers/DialogsProvider.tsx
|
|
3073
3144
|
import { useCallback, useId, useMemo as useMemo4, useRef as useRef3, useState as useState9 } from "react";
|
|
3074
|
-
import { jsx as
|
|
3145
|
+
import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3075
3146
|
function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
3076
3147
|
const [stack, setStack] = useState9([]);
|
|
3077
3148
|
const keyPrefix = useId();
|
|
3078
3149
|
const nextId = useRef3(0);
|
|
3079
3150
|
const dialogMetadata = useRef3(/* @__PURE__ */ new WeakMap());
|
|
3080
|
-
const requestDialog = useEventCallback_default(function open(
|
|
3151
|
+
const requestDialog = useEventCallback_default(function open(Component7, payload, options = {}) {
|
|
3081
3152
|
const { onClose = async () => {
|
|
3082
3153
|
} } = options;
|
|
3083
3154
|
let resolve;
|
|
@@ -3090,7 +3161,7 @@ function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
|
3090
3161
|
key,
|
|
3091
3162
|
open: true,
|
|
3092
3163
|
promise,
|
|
3093
|
-
Component:
|
|
3164
|
+
Component: Component7,
|
|
3094
3165
|
payload,
|
|
3095
3166
|
onClose,
|
|
3096
3167
|
resolve
|
|
@@ -3125,8 +3196,8 @@ function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
|
3125
3196
|
const contextValue = useMemo4(() => ({ open: requestDialog, close: closeDialog }), [requestDialog, closeDialog]);
|
|
3126
3197
|
return /* @__PURE__ */ jsxs15(DialogsContext.Provider, { value: contextValue, children: [
|
|
3127
3198
|
children,
|
|
3128
|
-
stack.map(({ key, open, Component:
|
|
3129
|
-
|
|
3199
|
+
stack.map(({ key, open, Component: Component7, payload, promise }) => /* @__PURE__ */ jsx27(
|
|
3200
|
+
Component7,
|
|
3130
3201
|
{
|
|
3131
3202
|
payload,
|
|
3132
3203
|
open,
|
|
@@ -3140,7 +3211,7 @@ function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
|
3140
3211
|
}
|
|
3141
3212
|
|
|
3142
3213
|
// src/providers/LayoutProvider.tsx
|
|
3143
|
-
import { jsx as
|
|
3214
|
+
import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3144
3215
|
var LayoutProvider = (props) => {
|
|
3145
3216
|
const [user, setUser] = useState10({ employeeId: "", name: "Unknown", department: "", company: "", category: "" });
|
|
3146
3217
|
const { t: t2 } = useTranslation7();
|
|
@@ -3148,7 +3219,10 @@ var LayoutProvider = (props) => {
|
|
|
3148
3219
|
useEffect6(() => {
|
|
3149
3220
|
z.config(default2.resolvedLanguage === "cs" ? cs() : en());
|
|
3150
3221
|
}, []);
|
|
3151
|
-
return /* @__PURE__ */
|
|
3222
|
+
return /* @__PURE__ */ jsx28(I18nextProvider, { i18n: default2, children: /* @__PURE__ */ jsx28(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: default2.resolvedLanguage, children: /* @__PURE__ */ jsx28(LayoutContext.Provider, { value: { user: { get: user, set: setUser } }, children: /* @__PURE__ */ jsxs16(Layout, { navigation, theme: props.theme, children: [
|
|
3223
|
+
"\xA8",
|
|
3224
|
+
/* @__PURE__ */ jsx28(DialogsProvider, { children: props.children })
|
|
3225
|
+
] }) }) }) });
|
|
3152
3226
|
};
|
|
3153
3227
|
|
|
3154
3228
|
// src/index.ts
|
|
@@ -3170,11 +3244,11 @@ var getFieldStatus = (field) => {
|
|
|
3170
3244
|
};
|
|
3171
3245
|
|
|
3172
3246
|
// src/components/form/FormAutocomplete.tsx
|
|
3173
|
-
import { jsx as
|
|
3247
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
3174
3248
|
var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
3175
3249
|
const field = useFieldContext();
|
|
3176
3250
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3177
|
-
return /* @__PURE__ */
|
|
3251
|
+
return /* @__PURE__ */ jsx29(
|
|
3178
3252
|
Autocomplete,
|
|
3179
3253
|
{
|
|
3180
3254
|
value: field.state.value,
|
|
@@ -3183,7 +3257,7 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
|
3183
3257
|
onBlur: field.handleBlur,
|
|
3184
3258
|
"aria-label": field.name,
|
|
3185
3259
|
...autocompleteProps,
|
|
3186
|
-
renderInput: (parameters) => /* @__PURE__ */
|
|
3260
|
+
renderInput: (parameters) => /* @__PURE__ */ jsx29(
|
|
3187
3261
|
TextField,
|
|
3188
3262
|
{
|
|
3189
3263
|
...parameters,
|
|
@@ -3199,15 +3273,15 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
|
3199
3273
|
|
|
3200
3274
|
// src/components/form/FormCheckbox.tsx
|
|
3201
3275
|
import { Checkbox, FormControl, FormControlLabel, FormHelperText } from "@mui/material";
|
|
3202
|
-
import { jsx as
|
|
3276
|
+
import { jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3203
3277
|
var FormCheckbox = (props) => {
|
|
3204
3278
|
const field = useFieldContext();
|
|
3205
3279
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3206
|
-
return /* @__PURE__ */
|
|
3207
|
-
/* @__PURE__ */
|
|
3280
|
+
return /* @__PURE__ */ jsxs17(FormControl, { component: "fieldset", children: [
|
|
3281
|
+
/* @__PURE__ */ jsx30(
|
|
3208
3282
|
FormControlLabel,
|
|
3209
3283
|
{
|
|
3210
|
-
control: /* @__PURE__ */
|
|
3284
|
+
control: /* @__PURE__ */ jsx30(
|
|
3211
3285
|
Checkbox,
|
|
3212
3286
|
{
|
|
3213
3287
|
name: field.name,
|
|
@@ -3221,18 +3295,18 @@ var FormCheckbox = (props) => {
|
|
|
3221
3295
|
label: props.label ?? ""
|
|
3222
3296
|
}
|
|
3223
3297
|
),
|
|
3224
|
-
isTouched && hasError && /* @__PURE__ */
|
|
3298
|
+
isTouched && hasError && /* @__PURE__ */ jsx30(FormHelperText, { error: hasError, children: helperText })
|
|
3225
3299
|
] });
|
|
3226
3300
|
};
|
|
3227
3301
|
|
|
3228
3302
|
// src/components/form/FormDatePicker.tsx
|
|
3229
3303
|
import { DatePicker } from "@mui/x-date-pickers-pro";
|
|
3230
3304
|
import dayjs2 from "dayjs";
|
|
3231
|
-
import { jsx as
|
|
3305
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3232
3306
|
var FormDatePicker = (props) => {
|
|
3233
3307
|
const field = useFieldContext();
|
|
3234
3308
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3235
|
-
return /* @__PURE__ */
|
|
3309
|
+
return /* @__PURE__ */ jsx31(
|
|
3236
3310
|
DatePicker,
|
|
3237
3311
|
{
|
|
3238
3312
|
name: field.name,
|
|
@@ -3256,11 +3330,11 @@ var FormDatePicker = (props) => {
|
|
|
3256
3330
|
// src/components/form/FormDateTimePicker.tsx
|
|
3257
3331
|
import { DateTimePicker } from "@mui/x-date-pickers-pro";
|
|
3258
3332
|
import dayjs3 from "dayjs";
|
|
3259
|
-
import { jsx as
|
|
3333
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3260
3334
|
var FormDateTimePicker = (props) => {
|
|
3261
3335
|
const field = useFieldContext();
|
|
3262
3336
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3263
|
-
return /* @__PURE__ */
|
|
3337
|
+
return /* @__PURE__ */ jsx32(
|
|
3264
3338
|
DateTimePicker,
|
|
3265
3339
|
{
|
|
3266
3340
|
name: field.name,
|
|
@@ -3284,11 +3358,11 @@ var FormDateTimePicker = (props) => {
|
|
|
3284
3358
|
// src/components/form/FormNumberField.tsx
|
|
3285
3359
|
import { TextField as TextField2 } from "@mui/material";
|
|
3286
3360
|
import { NumericFormat } from "react-number-format";
|
|
3287
|
-
import { jsx as
|
|
3361
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
3288
3362
|
var FormNumberField = ({ options, ...props }) => {
|
|
3289
3363
|
const field = useFieldContext();
|
|
3290
3364
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3291
|
-
return /* @__PURE__ */
|
|
3365
|
+
return /* @__PURE__ */ jsx33(
|
|
3292
3366
|
NumericFormat,
|
|
3293
3367
|
{
|
|
3294
3368
|
customInput: TextField2,
|
|
@@ -3307,13 +3381,13 @@ var FormNumberField = ({ options, ...props }) => {
|
|
|
3307
3381
|
|
|
3308
3382
|
// src/components/form/FormRadioGroup.tsx
|
|
3309
3383
|
import { FormControl as FormControl2, FormControlLabel as FormControlLabel2, FormHelperText as FormHelperText2, FormLabel, Radio, RadioGroup } from "@mui/material";
|
|
3310
|
-
import { jsx as
|
|
3384
|
+
import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3311
3385
|
var FormRadioGroup = ({ label, options, ...props }) => {
|
|
3312
3386
|
const field = useFieldContext();
|
|
3313
3387
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3314
|
-
return /* @__PURE__ */
|
|
3315
|
-
label && /* @__PURE__ */
|
|
3316
|
-
/* @__PURE__ */
|
|
3388
|
+
return /* @__PURE__ */ jsxs18(FormControl2, { component: "fieldset", children: [
|
|
3389
|
+
label && /* @__PURE__ */ jsx34(FormLabel, { component: "legend", children: label }),
|
|
3390
|
+
/* @__PURE__ */ jsx34(
|
|
3317
3391
|
RadioGroup,
|
|
3318
3392
|
{
|
|
3319
3393
|
name: field.name,
|
|
@@ -3322,30 +3396,30 @@ var FormRadioGroup = ({ label, options, ...props }) => {
|
|
|
3322
3396
|
onBlur: field.handleBlur,
|
|
3323
3397
|
"aria-label": field.name,
|
|
3324
3398
|
...props,
|
|
3325
|
-
children: options.map((option) => /* @__PURE__ */
|
|
3399
|
+
children: options.map((option) => /* @__PURE__ */ jsx34(
|
|
3326
3400
|
FormControlLabel2,
|
|
3327
3401
|
{
|
|
3328
3402
|
value: option.value,
|
|
3329
|
-
control: /* @__PURE__ */
|
|
3403
|
+
control: /* @__PURE__ */ jsx34(Radio, {}),
|
|
3330
3404
|
label: option.label
|
|
3331
3405
|
},
|
|
3332
3406
|
option.value
|
|
3333
3407
|
))
|
|
3334
3408
|
}
|
|
3335
3409
|
),
|
|
3336
|
-
isTouched && hasError && /* @__PURE__ */
|
|
3410
|
+
isTouched && hasError && /* @__PURE__ */ jsx34(FormHelperText2, { error: hasError, children: helperText })
|
|
3337
3411
|
] });
|
|
3338
3412
|
};
|
|
3339
3413
|
|
|
3340
3414
|
// src/components/form/FormSlider.tsx
|
|
3341
3415
|
import { FormControl as FormControl3, FormHelperText as FormHelperText3, FormLabel as FormLabel2, Slider } from "@mui/material";
|
|
3342
|
-
import { jsx as
|
|
3416
|
+
import { jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3343
3417
|
var FormSlider = ({ label, ...props }) => {
|
|
3344
3418
|
const field = useFieldContext();
|
|
3345
3419
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3346
|
-
return /* @__PURE__ */
|
|
3347
|
-
label && /* @__PURE__ */
|
|
3348
|
-
/* @__PURE__ */
|
|
3420
|
+
return /* @__PURE__ */ jsxs19(FormControl3, { component: "fieldset", children: [
|
|
3421
|
+
label && /* @__PURE__ */ jsx35(FormLabel2, { children: label }),
|
|
3422
|
+
/* @__PURE__ */ jsx35(
|
|
3349
3423
|
Slider,
|
|
3350
3424
|
{
|
|
3351
3425
|
name: field.name,
|
|
@@ -3356,13 +3430,13 @@ var FormSlider = ({ label, ...props }) => {
|
|
|
3356
3430
|
...props
|
|
3357
3431
|
}
|
|
3358
3432
|
),
|
|
3359
|
-
isTouched && hasError && /* @__PURE__ */
|
|
3433
|
+
isTouched && hasError && /* @__PURE__ */ jsx35(FormHelperText3, { error: hasError, children: helperText })
|
|
3360
3434
|
] });
|
|
3361
3435
|
};
|
|
3362
3436
|
|
|
3363
3437
|
// src/components/form/FormSubmitButton.tsx
|
|
3364
3438
|
import { Button as Button3 } from "@mui/material";
|
|
3365
|
-
import { jsx as
|
|
3439
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3366
3440
|
var FormSubmitButton = (props) => {
|
|
3367
3441
|
const form = useFormContext();
|
|
3368
3442
|
const handleClick = (event) => {
|
|
@@ -3370,7 +3444,7 @@ var FormSubmitButton = (props) => {
|
|
|
3370
3444
|
event.stopPropagation();
|
|
3371
3445
|
form.handleSubmit();
|
|
3372
3446
|
};
|
|
3373
|
-
return /* @__PURE__ */
|
|
3447
|
+
return /* @__PURE__ */ jsx36(form.Subscribe, { selector: (state) => [state.canSubmit, state.isSubmitting], children: ([canSubmit, isSubmitting]) => /* @__PURE__ */ jsx36(
|
|
3374
3448
|
Button3,
|
|
3375
3449
|
{
|
|
3376
3450
|
loading: isSubmitting,
|
|
@@ -3385,15 +3459,15 @@ var FormSubmitButton = (props) => {
|
|
|
3385
3459
|
|
|
3386
3460
|
// src/components/form/FormSwitch.tsx
|
|
3387
3461
|
import { FormControl as FormControl4, FormControlLabel as FormControlLabel3, FormHelperText as FormHelperText4, Switch } from "@mui/material";
|
|
3388
|
-
import { jsx as
|
|
3462
|
+
import { jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3389
3463
|
var FormSwitch = (props) => {
|
|
3390
3464
|
const field = useFieldContext();
|
|
3391
3465
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3392
|
-
return /* @__PURE__ */
|
|
3393
|
-
/* @__PURE__ */
|
|
3466
|
+
return /* @__PURE__ */ jsxs20(FormControl4, { component: "fieldset", children: [
|
|
3467
|
+
/* @__PURE__ */ jsx37(
|
|
3394
3468
|
FormControlLabel3,
|
|
3395
3469
|
{
|
|
3396
|
-
control: /* @__PURE__ */
|
|
3470
|
+
control: /* @__PURE__ */ jsx37(
|
|
3397
3471
|
Switch,
|
|
3398
3472
|
{
|
|
3399
3473
|
name: field.name,
|
|
@@ -3407,17 +3481,17 @@ var FormSwitch = (props) => {
|
|
|
3407
3481
|
label: props.label ?? ""
|
|
3408
3482
|
}
|
|
3409
3483
|
),
|
|
3410
|
-
isTouched && hasError && /* @__PURE__ */
|
|
3484
|
+
isTouched && hasError && /* @__PURE__ */ jsx37(FormHelperText4, { error: hasError, children: helperText })
|
|
3411
3485
|
] });
|
|
3412
3486
|
};
|
|
3413
3487
|
|
|
3414
3488
|
// src/components/form/FormTextField.tsx
|
|
3415
3489
|
import { TextField as TextField3 } from "@mui/material";
|
|
3416
|
-
import { jsx as
|
|
3490
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3417
3491
|
var FormTextField = (props) => {
|
|
3418
3492
|
const field = useFieldContext();
|
|
3419
3493
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3420
|
-
return /* @__PURE__ */
|
|
3494
|
+
return /* @__PURE__ */ jsx38(
|
|
3421
3495
|
TextField3,
|
|
3422
3496
|
{
|
|
3423
3497
|
name: field.name,
|
|
@@ -3470,6 +3544,7 @@ export {
|
|
|
3470
3544
|
RouterGridActionsCellItem,
|
|
3471
3545
|
RouterIconButton,
|
|
3472
3546
|
RouterLink,
|
|
3547
|
+
RouterListItemButton,
|
|
3473
3548
|
RouterNotFound,
|
|
3474
3549
|
RouterTab,
|
|
3475
3550
|
TableContainer,
|