wcz-test 4.1.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import { TFunction } from 'i18next';
9
9
  export { t } from 'i18next';
10
10
  export { uuidv7 } from 'uuidv7';
11
11
  import * as axios from 'axios';
12
+ import * as _tanstack_start_client_core from '@tanstack/start-client-core';
12
13
  import { DateTimePickerProps, DatePickerProps } from '@mui/x-date-pickers-pro';
13
14
  import { NumericFormatProps, InputAttributes } from 'react-number-format/types/types';
14
15
  import * as _tanstack_react_form from '@tanstack/react-form';
@@ -202,6 +203,8 @@ declare const rootRouteHead: ({ title }: RootRouteHeadProps) => () => {
202
203
  };
203
204
  declare const wczApiClient: axios.AxiosInstance;
204
205
 
206
+ declare const setSSRLanguage: _tanstack_start_client_core.ServerOnlyFn<[], Promise<void>>;
207
+
205
208
  type FormSubmitButtonProps = Omit<ButtonProps, "loading" | "disabled" | "onClick" | "type">;
206
209
 
207
210
  type FormOmittedProps = "name" | "value" | "onChange" | "onBlur" | "error" | "helperText" | "renderInput" | "type" | "aria-label";
@@ -423,4 +426,4 @@ interface Department {
423
426
  manager: Employee;
424
427
  }
425
428
 
426
- export { ChipInputCell, type Department, type DialogProps, Dropzone, EditableColumnHeader, type Email, type EmailAttachment, type Employee, EmployeeCategoryGroup, EmployeeStatus, type FileMeta, FileViewer, LayoutProvider, type Navigation, type NavigationParams, PageHeader, Platform, RouterButton, RouterError, RouterGridActionsCellItem, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab, TableContainer, TypographyWithIcon, type User, rootRouteHead, useDeleteFile, useDeleteFiles, useDialogs, useDownloadFile, useFieldContext, useFormContext, useGetFile, useGetFileMetas, useGetFileThumbnail, useLayoutForm, useOpenFile, useUpdateFileMeta, useUploadFile, wczApiClient, withLayoutForm };
429
+ export { ChipInputCell, type Department, type DialogProps, Dropzone, EditableColumnHeader, type Email, type EmailAttachment, type Employee, EmployeeCategoryGroup, EmployeeStatus, type FileMeta, FileViewer, LayoutProvider, type Navigation, type NavigationParams, PageHeader, Platform, RouterButton, RouterError, RouterGridActionsCellItem, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab, TableContainer, TypographyWithIcon, type User, rootRouteHead, setSSRLanguage, useDeleteFile, useDeleteFiles, useDialogs, useDownloadFile, useFieldContext, useFormContext, useGetFile, useGetFileMetas, useGetFileThumbnail, useLayoutForm, useOpenFile, useUpdateFileMeta, useUploadFile, wczApiClient, withLayoutForm };
package/dist/index.js CHANGED
@@ -1025,12 +1025,10 @@ var stackSxProps = [
1025
1025
  var TypographyWithIcon = ({ startIcon, endIcon, children, sx, gutterBottom, ...props }) => {
1026
1026
  const sxCopy = { ...sx };
1027
1027
  const stackStyles = {};
1028
- if (sxCopy) {
1029
- for (const current of stackSxProps) {
1030
- if (sxCopy[current]) {
1031
- stackStyles[current] = sxCopy[current];
1032
- delete sxCopy[current];
1033
- }
1028
+ for (const current of stackSxProps) {
1029
+ if (sxCopy[current]) {
1030
+ stackStyles[current] = sxCopy[current];
1031
+ delete sxCopy[current];
1034
1032
  }
1035
1033
  }
1036
1034
  return /* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", gap: 1, sx: stackStyles, mb: gutterBottom ? 0.7 : void 0, children: [
@@ -1157,7 +1155,7 @@ import { useState as useState5 } from "react";
1157
1155
  import MoreVert from "@mui/icons-material/MoreVert";
1158
1156
  import { Box as Box2, IconButton, ImageListItem, ImageListItemBar, Stack as Stack3, Tooltip } from "@mui/material";
1159
1157
  import { grey } from "@mui/material/colors";
1160
- import { Fragment, useEffect as useEffect3, useState as useState3 } from "react";
1158
+ import { Fragment, useEffect as useEffect2, useState as useState3 } from "react";
1161
1159
 
1162
1160
  // src/components/file/fileViewer/common/ActionsMenu.tsx
1163
1161
  import Delete from "@mui/icons-material/Delete";
@@ -1177,34 +1175,7 @@ var useFile = () => {
1177
1175
  };
1178
1176
 
1179
1177
  // src/hooks/DialogsHooks.tsx
1180
- import Button from "@mui/material/Button";
1181
- import Dialog from "@mui/material/Dialog";
1182
- import DialogActions from "@mui/material/DialogActions";
1183
- import DialogContent from "@mui/material/DialogContent";
1184
- import DialogTitle from "@mui/material/DialogTitle";
1185
-
1186
- // node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js
1187
- import * as React2 from "react";
1188
-
1189
- // node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js
1190
- import * as React from "react";
1191
- var useEnhancedEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
1192
- var useEnhancedEffect_default = useEnhancedEffect;
1193
-
1194
- // node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js
1195
- function useEventCallback(fn) {
1196
- const ref = React2.useRef(fn);
1197
- useEnhancedEffect_default(() => {
1198
- ref.current = fn;
1199
- });
1200
- return React2.useRef((...args) => (
1201
- // @ts-expect-error hide `this`
1202
- (0, ref.current)(...args)
1203
- )).current;
1204
- }
1205
- var useEventCallback_default = useEventCallback;
1206
-
1207
- // src/hooks/DialogsHooks.tsx
1178
+ import { Button, Dialog, DialogActions, DialogContent, DialogTitle, useEventCallback } from "@mui/material";
1208
1179
  import { useContext as useContext2, useMemo } from "react";
1209
1180
  import { useTranslation as useTranslation2 } from "react-i18next";
1210
1181
 
@@ -1235,10 +1206,10 @@ function ConfirmDialog({ open, payload, onClose }) {
1235
1206
  }
1236
1207
  function useDialogs() {
1237
1208
  const { open, close } = useContext2(DialogsContext);
1238
- const alert = useEventCallback_default(
1209
+ const alert = useEventCallback(
1239
1210
  (message, { ...options } = {}) => open(AlertDialog, { ...options, message })
1240
1211
  );
1241
- const confirm = useEventCallback_default(
1212
+ const confirm = useEventCallback(
1242
1213
  (message, { ...options } = {}) => open(ConfirmDialog, { ...options, message })
1243
1214
  );
1244
1215
  return useMemo(() => ({ alert, confirm, open, close }), [alert, close, confirm, open]);
@@ -1537,7 +1508,7 @@ var GridFileViewerItem = ({ meta, size, itemBar }) => {
1537
1508
  const { setImageId, actions } = useFile();
1538
1509
  const [showItemBar, setShowItemBar] = useState3(itemBar === "always");
1539
1510
  const [menu, setMenu] = useState3(null);
1540
- useEffect3(() => {
1511
+ useEffect2(() => {
1541
1512
  setShowItemBar(itemBar === "always");
1542
1513
  }, [itemBar]);
1543
1514
  const { data: source } = useGetFileThumbnail(meta);
@@ -1582,11 +1553,11 @@ var GridFileViewerItem = ({ meta, size, itemBar }) => {
1582
1553
  ImageListItemBar,
1583
1554
  {
1584
1555
  title: /* @__PURE__ */ jsx8(Tooltip, { title: meta.fileName, children: /* @__PURE__ */ jsx8(Box2, { children: meta.fileName }) }),
1585
- actionIcon: (actions?.download !== false || actions?.delete !== false) && /* @__PURE__ */ jsx8(IconButton, { sx: { color: grey[100] }, onClick: openMenu, children: /* @__PURE__ */ jsx8(MoreVert, {}) })
1556
+ actionIcon: (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx8(IconButton, { sx: { color: grey[100] }, onClick: openMenu, children: /* @__PURE__ */ jsx8(MoreVert, {}) })
1586
1557
  }
1587
1558
  )
1588
1559
  ] }),
1589
- (actions?.download !== false || actions?.delete !== false) && /* @__PURE__ */ jsx8(ActionsMenu, { meta, menu, setMenu })
1560
+ (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx8(ActionsMenu, { meta, menu, setMenu })
1590
1561
  ] });
1591
1562
  };
1592
1563
 
@@ -1652,22 +1623,22 @@ var ListFileViewerItem = ({ meta }) => {
1652
1623
  /* @__PURE__ */ jsxs7(ListItemButton2, { onClick, children: [
1653
1624
  /* @__PURE__ */ jsx9(ListItemIcon2, { children: icon() }),
1654
1625
  /* @__PURE__ */ jsx9(ListItemText2, { primary: `${meta.fileName}.${meta.fileExtension}` }),
1655
- (actions?.download !== false || actions?.delete !== false) && /* @__PURE__ */ jsx9(IconButton2, { edge: "end", onClick: openMenu, children: /* @__PURE__ */ jsx9(MoreVert2, {}) })
1626
+ (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx9(IconButton2, { edge: "end", onClick: openMenu, children: /* @__PURE__ */ jsx9(MoreVert2, {}) })
1656
1627
  ] }, meta.id),
1657
- (actions?.download !== false || actions?.delete !== false) && /* @__PURE__ */ jsx9(ActionsMenu, { meta, menu, setMenu })
1628
+ (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx9(ActionsMenu, { meta, menu, setMenu })
1658
1629
  ] });
1659
1630
  };
1660
1631
 
1661
1632
  // src/components/file/fileViewer/ImageViewer.tsx
1662
1633
  import Close from "@mui/icons-material/Close";
1663
1634
  import { Box as Box3, Dialog as Dialog2, Fab } from "@mui/material";
1664
- import { useEffect as useEffect4 } from "react";
1635
+ import { useEffect as useEffect3 } from "react";
1665
1636
  import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
1666
1637
  var ImageViewer = ({ metaId }) => {
1667
1638
  const { fileMetas, setImageId } = useFile();
1668
1639
  const meta = fileMetas.find((m) => m.id === metaId);
1669
1640
  const { data: source } = useGetFile(meta);
1670
- useEffect4(() => {
1641
+ useEffect3(() => {
1671
1642
  if (metaId)
1672
1643
  globalThis.addEventListener("keydown", handleOnKeydown);
1673
1644
  return () => {
@@ -1751,9 +1722,9 @@ var EditableColumnHeader = ({ colDef }) => {
1751
1722
  // src/components/router/RouterButton.tsx
1752
1723
  import { Button as Button2 } from "@mui/material";
1753
1724
  import { createLink } from "@tanstack/react-router";
1754
- import React5 from "react";
1725
+ import React3 from "react";
1755
1726
  import { jsx as jsx14 } from "react/jsx-runtime";
1756
- var Component = React5.forwardRef(function ButtonComponent(props, reference) {
1727
+ var Component = React3.forwardRef(function ButtonComponent(props, reference) {
1757
1728
  return /* @__PURE__ */ jsx14(Button2, { ref: reference, component: "a", ...props });
1758
1729
  });
1759
1730
  var CreatedComponent = createLink(Component);
@@ -1764,9 +1735,9 @@ var RouterButton = (props) => {
1764
1735
  // src/components/router/RouterGridActionsCellItem.tsx
1765
1736
  import { GridActionsCellItem } from "@mui/x-data-grid-premium";
1766
1737
  import { createLink as createLink2 } from "@tanstack/react-router";
1767
- import React6 from "react";
1738
+ import React4 from "react";
1768
1739
  import { jsx as jsx15 } from "react/jsx-runtime";
1769
- var Component2 = React6.forwardRef(
1740
+ var Component2 = React4.forwardRef(
1770
1741
  function GridActionsCellItemComponent(props, reference) {
1771
1742
  return /* @__PURE__ */ jsx15(GridActionsCellItem, { ref: reference, component: "a", ...props });
1772
1743
  }
@@ -1779,9 +1750,9 @@ var RouterGridActionsCellItem = (props) => {
1779
1750
  // src/components/router/RouterIconButton.tsx
1780
1751
  import { IconButton as IconButton3 } from "@mui/material";
1781
1752
  import { createLink as createLink3 } from "@tanstack/react-router";
1782
- import React7 from "react";
1753
+ import React5 from "react";
1783
1754
  import { jsx as jsx16 } from "react/jsx-runtime";
1784
- var Component3 = React7.forwardRef(function IconButtonComponent(props, reference) {
1755
+ var Component3 = React5.forwardRef(function IconButtonComponent(props, reference) {
1785
1756
  return /* @__PURE__ */ jsx16(IconButton3, { ref: reference, component: "a", ...props });
1786
1757
  });
1787
1758
  var CreatedComponent3 = createLink3(Component3);
@@ -1792,9 +1763,9 @@ var RouterIconButton = (props) => {
1792
1763
  // src/components/router/RouterLink.tsx
1793
1764
  import { Link } from "@mui/material";
1794
1765
  import { createLink as createLink4 } from "@tanstack/react-router";
1795
- import React8 from "react";
1766
+ import React6 from "react";
1796
1767
  import { jsx as jsx17 } from "react/jsx-runtime";
1797
- var Component4 = React8.forwardRef(function LinkComponent(props, reference) {
1768
+ var Component4 = React6.forwardRef(function LinkComponent(props, reference) {
1798
1769
  return /* @__PURE__ */ jsx17(Link, { ref: reference, ...props });
1799
1770
  });
1800
1771
  var CreatedComponent4 = createLink4(Component4);
@@ -1805,9 +1776,9 @@ var RouterLink = (props) => {
1805
1776
  // src/components/router/RouterTab.tsx
1806
1777
  import { Tab } from "@mui/material";
1807
1778
  import { createLink as createLink5 } from "@tanstack/react-router";
1808
- import React9 from "react";
1779
+ import React7 from "react";
1809
1780
  import { jsx as jsx18 } from "react/jsx-runtime";
1810
- var Component5 = React9.forwardRef(function TabComponent(props, reference) {
1781
+ var Component5 = React7.forwardRef(function TabComponent(props, reference) {
1811
1782
  return /* @__PURE__ */ jsx18(Tab, { ref: reference, component: "a", ...props });
1812
1783
  });
1813
1784
  var CreatedComponent5 = createLink5(Component5);
@@ -1818,9 +1789,9 @@ var RouterTab = (props) => {
1818
1789
  // src/components/router/RouterListItemButton.tsx
1819
1790
  import { ListItemButton as ListItemButton3 } from "@mui/material";
1820
1791
  import { createLink as createLink6 } from "@tanstack/react-router";
1821
- import React10 from "react";
1792
+ import React8 from "react";
1822
1793
  import { jsx as jsx19 } from "react/jsx-runtime";
1823
- var Component6 = React10.forwardRef(function ButtonComponent2(props, reference) {
1794
+ var Component6 = React8.forwardRef(function ButtonComponent2(props, reference) {
1824
1795
  return /* @__PURE__ */ jsx19(ListItemButton3, { ref: reference, component: "a", ...props });
1825
1796
  });
1826
1797
  var CreatedComponent6 = createLink6(Component6);
@@ -1876,11 +1847,11 @@ function _objectWithoutPropertiesLoose(r, e) {
1876
1847
 
1877
1848
  // node_modules/@mui/x-date-pickers/esm/LocalizationProvider/LocalizationProvider.js
1878
1849
  var import_prop_types = __toESM(require_prop_types(), 1);
1879
- import * as React11 from "react";
1850
+ import * as React9 from "react";
1880
1851
  import { useThemeProps } from "@mui/material/styles";
1881
1852
  import { jsx as _jsx } from "react/jsx-runtime";
1882
1853
  var _excluded = ["localeText"];
1883
- var PickerAdapterContext = /* @__PURE__ */ React11.createContext(null);
1854
+ var PickerAdapterContext = /* @__PURE__ */ React9.createContext(null);
1884
1855
  if (process.env.NODE_ENV !== "production") PickerAdapterContext.displayName = "PickerAdapterContext";
1885
1856
  var LocalizationProvider = function LocalizationProvider2(inProps) {
1886
1857
  const {
@@ -1889,7 +1860,7 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
1889
1860
  const {
1890
1861
  adapter: parentAdapter,
1891
1862
  localeText: parentLocaleText
1892
- } = React11.useContext(PickerAdapterContext) ?? {
1863
+ } = React9.useContext(PickerAdapterContext) ?? {
1893
1864
  utils: void 0,
1894
1865
  adapter: void 0,
1895
1866
  localeText: void 0
@@ -1908,8 +1879,8 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
1908
1879
  adapterLocale,
1909
1880
  localeText: themeLocaleText
1910
1881
  } = props;
1911
- const localeText = React11.useMemo(() => _extends({}, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);
1912
- const adapter = React11.useMemo(() => {
1882
+ const localeText = React9.useMemo(() => _extends({}, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);
1883
+ const adapter = React9.useMemo(() => {
1913
1884
  if (!DateAdapter) {
1914
1885
  if (parentAdapter) {
1915
1886
  return parentAdapter;
@@ -1927,7 +1898,7 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
1927
1898
  }
1928
1899
  return dateAdapter;
1929
1900
  }, [DateAdapter, adapterLocale, dateFormats, dateLibInstance, parentAdapter]);
1930
- const defaultDates = React11.useMemo(() => {
1901
+ const defaultDates = React9.useMemo(() => {
1931
1902
  if (!adapter) {
1932
1903
  return null;
1933
1904
  }
@@ -1936,7 +1907,7 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
1936
1907
  maxDate: adapter.date("2099-12-31T00:00:00.000")
1937
1908
  };
1938
1909
  }, [adapter]);
1939
- const contextValue = React11.useMemo(() => {
1910
+ const contextValue = React9.useMemo(() => {
1940
1911
  return {
1941
1912
  utils: adapter,
1942
1913
  adapter,
@@ -2004,6 +1975,27 @@ process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
2004
1975
  localeText: import_prop_types.default.object
2005
1976
  } : void 0;
2006
1977
 
1978
+ // node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js
1979
+ import * as React11 from "react";
1980
+
1981
+ // node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js
1982
+ import * as React10 from "react";
1983
+ var useEnhancedEffect = typeof window !== "undefined" ? React10.useLayoutEffect : React10.useEffect;
1984
+ var useEnhancedEffect_default = useEnhancedEffect;
1985
+
1986
+ // node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js
1987
+ function useEventCallback2(fn) {
1988
+ const ref = React11.useRef(fn);
1989
+ useEnhancedEffect_default(() => {
1990
+ ref.current = fn;
1991
+ });
1992
+ return React11.useRef((...args) => (
1993
+ // @ts-expect-error hide `this`
1994
+ (0, ref.current)(...args)
1995
+ )).current;
1996
+ }
1997
+ var useEventCallback_default = useEventCallback2;
1998
+
2007
1999
  // node_modules/@mui/x-internals/esm/warning/warning.js
2008
2000
  var warnedOnceCache = /* @__PURE__ */ new Set();
2009
2001
  function warnOnce(message, gravity = "warning") {
@@ -2512,7 +2504,7 @@ var AdapterDayjs = class {
2512
2504
 
2513
2505
  // src/providers/LayoutProvider.tsx
2514
2506
  import { useEffect as useEffect6, useState as useState10 } from "react";
2515
- import { I18nextProvider, useTranslation as useTranslation7 } from "react-i18next";
2507
+ import { useTranslation as useTranslation6 } from "react-i18next";
2516
2508
  import * as z from "zod";
2517
2509
  import { cs, en } from "zod/locales";
2518
2510
 
@@ -2605,16 +2597,20 @@ i18n.use(HttpBackend).use(LanguageDetector).use(initReactI18next).init({
2605
2597
  },
2606
2598
  interpolation: { escapeValue: false }
2607
2599
  });
2608
- var setupRouterSsrI18nIntegration = createIsomorphicFn().server(async () => {
2600
+ var setSSRLanguage = createIsomorphicFn().server(async () => {
2609
2601
  const language = getCookie(i18nCookieName);
2610
2602
  await i18n.changeLanguage(language || "en");
2611
2603
  });
2612
2604
 
2605
+ // src/contexts/LayoutContext.ts
2606
+ import { createContext as createContext4, useContext as useContext4 } from "react";
2607
+ var LayoutContext = createContext4(null);
2608
+
2613
2609
  // src/components/core/Layout.tsx
2614
2610
  import Menu3 from "@mui/icons-material/Menu";
2615
2611
  import MenuOpen from "@mui/icons-material/MenuOpen";
2616
2612
  import { AppBar, Box as Box9, CssBaseline, IconButton as IconButton5, InitColorSchemeScript, LinearProgress, Toolbar } from "@mui/material";
2617
- import { ThemeProvider, styled as styled2 } from "@mui/material/styles";
2613
+ import { ThemeProvider, createTheme, styled as styled2 } from "@mui/material/styles";
2618
2614
  import { useIsFetching, useIsMutating } from "@tanstack/react-query";
2619
2615
  import useLocalStorageState from "use-local-storage-state";
2620
2616
 
@@ -3095,73 +3091,6 @@ var ToolbarAccount = () => {
3095
3091
  ] });
3096
3092
  };
3097
3093
 
3098
- // src/hooks/ThemeHook.ts
3099
- import { createTheme, darken, lighten } from "@mui/material";
3100
- import { grey as grey2 } from "@mui/material/colors";
3101
- import { csCZ, enUS } from "@mui/material/locale";
3102
- import { csCZ as dataGridCsCz, enUS as dataGridEnUs } from "@mui/x-data-grid-premium/locales";
3103
- import { csCZ as datePickersCsCz, enUS as datePickersEnUs } from "@mui/x-date-pickers-pro/locales";
3104
- import { useTranslation as useTranslation6 } from "react-i18next";
3105
- var WISTRON_PRIMARY_COLOR = "#00506E";
3106
- var WISTRON_SECONDARY_COLOR = "#64DC00";
3107
- var useGetTheme = (theme) => {
3108
- const { i18n: i18n2 } = useTranslation6();
3109
- return createTheme(
3110
- {
3111
- cssVariables: {
3112
- colorSchemeSelector: "data-mui-color-scheme"
3113
- },
3114
- colorSchemes: {
3115
- light: {
3116
- palette: {
3117
- primary: { main: WISTRON_PRIMARY_COLOR },
3118
- secondary: { main: WISTRON_SECONDARY_COLOR }
3119
- }
3120
- },
3121
- dark: {
3122
- palette: {
3123
- primary: { main: lighten(WISTRON_PRIMARY_COLOR, 0.5) },
3124
- secondary: { main: darken(WISTRON_SECONDARY_COLOR, 0.5) }
3125
- }
3126
- },
3127
- ...theme?.colorSchemes
3128
- },
3129
- components: {
3130
- MuiCssBaseline: {
3131
- styleOverrides: (theme2) => {
3132
- return {
3133
- body: {
3134
- "&::-webkit-scrollbar, & *::-webkit-scrollbar": {
3135
- width: "0.7em",
3136
- height: "0.7em"
3137
- },
3138
- "&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {
3139
- backgroundColor: theme2.palette.mode === "dark" ? grey2[900] : grey2[200],
3140
- borderRadius: "5px"
3141
- },
3142
- "&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": {
3143
- backgroundColor: theme2.palette.mode === "dark" ? grey2[800] : grey2[400],
3144
- borderRadius: "10px"
3145
- },
3146
- "&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": {
3147
- backgroundColor: theme2.palette.mode === "dark" ? grey2[700] : grey2[500]
3148
- },
3149
- "&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": {
3150
- backgroundColor: "transparent"
3151
- }
3152
- }
3153
- };
3154
- }
3155
- },
3156
- ...theme?.components
3157
- }
3158
- },
3159
- i18n2.resolvedLanguage === "cs" ? datePickersCsCz : datePickersEnUs,
3160
- i18n2.resolvedLanguage === "cs" ? dataGridCsCz : dataGridEnUs,
3161
- i18n2.resolvedLanguage === "cs" ? csCZ : enUS
3162
- );
3163
- };
3164
-
3165
3094
  // src/components/core/Layout.tsx
3166
3095
  import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
3167
3096
  var DrawerHeader = styled2("div")(({ theme }) => ({
@@ -3172,7 +3101,7 @@ var DrawerHeader = styled2("div")(({ theme }) => ({
3172
3101
  ...theme.mixins.toolbar
3173
3102
  }));
3174
3103
  var Layout = (props) => {
3175
- const theme = useGetTheme(props.theme);
3104
+ const theme = createTheme();
3176
3105
  const [navigationOpen, setNavigationOpen] = useLocalStorageState("navigationOpen", { defaultServerValue: false });
3177
3106
  const isFetching = !!useIsFetching();
3178
3107
  const isMutating = !!useIsMutating();
@@ -3214,23 +3143,19 @@ var Layout = (props) => {
3214
3143
  ] });
3215
3144
  };
3216
3145
 
3217
- // src/contexts/LayoutContext.ts
3218
- import { createContext as createContext4, useContext as useContext4 } from "react";
3219
- var LayoutContext = createContext4(null);
3220
-
3221
3146
  // src/providers/LayoutProvider.tsx
3222
3147
  import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
3223
3148
  var LayoutProvider = (props) => {
3224
3149
  const [user, setUser] = useState10({ employeeId: "", name: "Unknown", department: "", company: "", category: "" });
3225
- const { t: t2 } = useTranslation7();
3150
+ const { t: t2 } = useTranslation6();
3226
3151
  const navigation = props.getNavigation?.({ user, t: t2 });
3227
3152
  useEffect6(() => {
3228
3153
  z.config(default2.resolvedLanguage === "cs" ? cs() : en());
3229
3154
  }, []);
3230
- 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: [
3155
+ return /* @__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: [
3231
3156
  "\xA8",
3232
3157
  /* @__PURE__ */ jsx28(DialogsProvider, { children: props.children })
3233
- ] }) }) }) });
3158
+ ] }) }) });
3234
3159
  };
3235
3160
 
3236
3161
  // src/index.ts
@@ -3537,7 +3462,7 @@ var { useAppForm: useLayoutForm, withForm: withLayoutForm } = createFormHook({
3537
3462
 
3538
3463
  // src/index.ts
3539
3464
  import { default as default3 } from "use-local-storage-state";
3540
- import { useTranslation as useTranslation8 } from "react-i18next";
3465
+ import { useTranslation as useTranslation7 } from "react-i18next";
3541
3466
  import { t } from "i18next";
3542
3467
  export {
3543
3468
  ChipInputCell,
@@ -3558,6 +3483,7 @@ export {
3558
3483
  TableContainer,
3559
3484
  TypographyWithIcon,
3560
3485
  rootRouteHead,
3486
+ setSSRLanguage,
3561
3487
  t,
3562
3488
  useDeleteFile,
3563
3489
  useDeleteFiles,
@@ -3571,7 +3497,7 @@ export {
3571
3497
  useLayoutForm,
3572
3498
  default3 as useLocalStorageState,
3573
3499
  useOpenFile,
3574
- useTranslation8 as useTranslation,
3500
+ useTranslation7 as useTranslation,
3575
3501
  useUpdateFileMeta,
3576
3502
  useUploadFile,
3577
3503
  uuidv72 as uuidv7,