wcz-test 6.9.2 → 6.9.4
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/DialogsHooks-Bi8dZoyu.js +338 -0
- package/dist/DialogsHooks-Bi8dZoyu.js.map +1 -0
- package/dist/{RouterListItemButton-Cx7rXEfm.js → RouterListItemButton-CHS7rofI.js} +4 -4
- package/dist/{RouterListItemButton-Cx7rXEfm.js.map → RouterListItemButton-CHS7rofI.js.map} +1 -1
- package/dist/auth-client-B6cIXYDV.js +1417 -0
- package/dist/auth-client-B6cIXYDV.js.map +1 -0
- package/dist/client.d.ts +725 -0
- package/dist/client.js +1 -1
- package/dist/components.d.ts +134 -0
- package/dist/components.js +65 -66
- package/dist/components.js.map +1 -1
- package/dist/error-BhAKg8LX-X0sdNXNa.js +195 -0
- package/dist/error-BhAKg8LX-X0sdNXNa.js.map +1 -0
- package/dist/hooks.d.ts +192 -0
- package/dist/hooks.js +31 -31
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +74 -0
- package/dist/index.js +83 -84
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +476 -0
- package/dist/queries.d.ts +1956 -0
- package/dist/server-mxQ3s5dx-CC81W42s.js +644 -0
- package/dist/server-mxQ3s5dx-CC81W42s.js.map +1 -0
- package/dist/server.d.ts +41 -0
- package/dist/server.js +8659 -7
- package/dist/server.js.map +1 -1
- package/dist/utils.d.ts +11 -0
- package/dist/vite.d.ts +5 -0
- package/package.json +29 -29
- package/dist/DialogsHooks-BlUsVlfv.js +0 -39
- package/dist/DialogsHooks-BlUsVlfv.js.map +0 -1
- package/dist/auth-client-o9U0_qmf.js +0 -79
- package/dist/auth-client-o9U0_qmf.js.map +0 -1
- package/dist/components/core/AppTitle.d.ts +0 -2
- package/dist/components/core/Fullscreen.d.ts +0 -3
- package/dist/components/core/Layout.d.ts +0 -8
- package/dist/components/core/ToolbarAccount.d.ts +0 -2
- package/dist/components/core/TypographyWithIcon.d.ts +0 -7
- package/dist/components/core/navigation/NavigationList.d.ts +0 -22
- package/dist/components/core/navigation/NavigationListItem.d.ts +0 -16
- package/dist/components/core/navigation/NavigationRail.d.ts +0 -12
- package/dist/components/data-grid/ChipInputCell.d.ts +0 -9
- package/dist/components/data-grid/EditableColumnHeader.d.ts +0 -2
- package/dist/components/file/Dropzone.d.ts +0 -8
- package/dist/components/file/FileViewer.d.ts +0 -20
- package/dist/components/file/fileViewer/FileViewerGrid.d.ts +0 -17
- package/dist/components/file/fileViewer/FileViewerList.d.ts +0 -12
- package/dist/components/file/fileViewer/ImageViewer.d.ts +0 -6
- package/dist/components/file/fileViewer/common/ActionsMenu.d.ts +0 -15
- package/dist/components/form/FormAutocomplete.d.ts +0 -7
- package/dist/components/form/FormCheckbox.d.ts +0 -7
- package/dist/components/form/FormDatePicker.d.ts +0 -8
- package/dist/components/form/FormDateRangePicker.d.ts +0 -8
- package/dist/components/form/FormDateTimePicker.d.ts +0 -8
- package/dist/components/form/FormDateTimeRangePicker.d.ts +0 -8
- package/dist/components/form/FormNumberField.d.ts +0 -9
- package/dist/components/form/FormRadioGroup.d.ts +0 -13
- package/dist/components/form/FormSlider.d.ts +0 -7
- package/dist/components/form/FormSubmitButton.d.ts +0 -4
- package/dist/components/form/FormSwitch.d.ts +0 -7
- package/dist/components/form/FormTextField.d.ts +0 -7
- package/dist/components/form/FormTimePicker.d.ts +0 -8
- package/dist/components/form/FormTimeRangePicker.d.ts +0 -8
- package/dist/components/router/RouterButton.d.ts +0 -6
- package/dist/components/router/RouterError.d.ts +0 -7
- package/dist/components/router/RouterGridActionsCellItem.d.ts +0 -6
- package/dist/components/router/RouterIconButton.d.ts +0 -6
- package/dist/components/router/RouterLink.d.ts +0 -6
- package/dist/components/router/RouterListItemButton.d.ts +0 -6
- package/dist/components/router/RouterNotFound.d.ts +0 -1
- package/dist/components/router/RouterTab.d.ts +0 -6
- package/dist/contexts/DialogsContext.d.ts +0 -6
- package/dist/contexts/FileContext.d.ts +0 -13
- package/dist/env.d.ts +0 -10
- package/dist/exports/client.d.ts +0 -5
- package/dist/exports/components.d.ts +0 -14
- package/dist/exports/hooks.d.ts +0 -4
- package/dist/exports/index.d.ts +0 -3
- package/dist/exports/models.d.ts +0 -25
- package/dist/exports/queries.d.ts +0 -4
- package/dist/exports/server.d.ts +0 -3
- package/dist/exports/utils.d.ts +0 -3
- package/dist/exports/vite.d.ts +0 -1
- package/dist/hooks/DialogsHooks.d.ts +0 -42
- package/dist/hooks/FormHooks.d.ts +0 -52
- package/dist/hooks/ThemeHook.d.ts +0 -4
- package/dist/lib/auth/auth-client.d.ts +0 -688
- package/dist/lib/auth/auth.d.ts +0 -24
- package/dist/lib/db/index.d.ts +0 -4
- package/dist/lib/db/schemas/auth.d.ts +0 -606
- package/dist/lib/utils.d.ts +0 -50
- package/dist/lib/vite-plugin.d.ts +0 -2
- package/dist/models/Navigation.d.ts +0 -18
- package/dist/models/User.d.ts +0 -8
- package/dist/models/approval/Approval.d.ts +0 -177
- package/dist/models/approval/ApprovalEmployee.d.ts +0 -7
- package/dist/models/approval/ApprovalFlow.d.ts +0 -49
- package/dist/models/approval/ApprovalFlowStep.d.ts +0 -29
- package/dist/models/approval/ApprovalRequestType.d.ts +0 -5
- package/dist/models/approval/ApprovalStatus.d.ts +0 -9
- package/dist/models/approval/ApprovalStepResult.d.ts +0 -11
- package/dist/models/approval/StepApprovalOrder.d.ts +0 -6
- package/dist/models/email/Email.d.ts +0 -13
- package/dist/models/email/EmailAttachment.d.ts +0 -6
- package/dist/models/file/FileActions.d.ts +0 -6
- package/dist/models/file/FileMeta.d.ts +0 -15
- package/dist/models/peoplesoft/Department.d.ts +0 -58
- package/dist/models/peoplesoft/Employee.d.ts +0 -46
- package/dist/models/peoplesoft/EmployeeCategoryGroup.d.ts +0 -6
- package/dist/models/peoplesoft/EmployeeStatus.d.ts +0 -6
- package/dist/providers/DialogsProvider.d.ts +0 -6
- package/dist/providers/LayoutProvider.d.ts +0 -11
- package/dist/queries/Approval.d.ts +0 -585
- package/dist/queries/ApprovalHooks.d.ts +0 -315
- package/dist/queries/FileHooks.d.ts +0 -151
- package/dist/queries/PeopleSoftHooks.d.ts +0 -537
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as jsxRuntimeExports, D as DialogsContext, u as useDialogs } from "./DialogsHooks-Bi8dZoyu.js";
|
|
2
2
|
import { Stack, Typography, Collapse, useMediaQuery, useColorScheme, List as List$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, ListSubheader as ListSubheader$1, IconButton, Avatar as Avatar$1, Menu, Box as Box$1, ListItem as ListItem$1, InitColorSchemeScript, CssBaseline, AppBar, Toolbar, LinearProgress, ThemeProvider } from "@mui/material";
|
|
3
3
|
import { LocalizationProvider } from "@mui/x-date-pickers";
|
|
4
4
|
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
|
|
@@ -7,13 +7,12 @@ import { getCookie } from "@tanstack/react-start/server";
|
|
|
7
7
|
import dayjs from "dayjs";
|
|
8
8
|
import i18n from "i18next";
|
|
9
9
|
import LanguageDetector from "i18next-browser-languagedetector";
|
|
10
|
-
import { useState, useId, useRef, Fragment
|
|
10
|
+
import { useState, useId, useRef, Fragment, useEffect, useEffectEvent } from "react";
|
|
11
11
|
import { useTranslation, initReactI18next } from "react-i18next";
|
|
12
12
|
import { resources } from "virtual:wcz-layout";
|
|
13
13
|
import z__default from "zod";
|
|
14
14
|
import useEventCallback from "@mui/utils/useEventCallback";
|
|
15
|
-
import {
|
|
16
|
-
import { a as authClient, u as useGetTheme } from "./auth-client-o9U0_qmf.js";
|
|
15
|
+
import { a as authClient, u as useGetTheme } from "./auth-client-B6cIXYDV.js";
|
|
17
16
|
import Menu$1 from "@mui/icons-material/Menu";
|
|
18
17
|
import MenuOpen from "@mui/icons-material/MenuOpen";
|
|
19
18
|
import { styled, useTheme } from "@mui/material/styles";
|
|
@@ -34,7 +33,7 @@ import ListItemText from "@mui/material/ListItemText";
|
|
|
34
33
|
import Paper from "@mui/material/Paper";
|
|
35
34
|
import Popper from "@mui/material/Popper";
|
|
36
35
|
import Typography$1 from "@mui/material/Typography";
|
|
37
|
-
import { R as RouterListItemButton } from "./RouterListItemButton-
|
|
36
|
+
import { R as RouterListItemButton } from "./RouterListItemButton-CHS7rofI.js";
|
|
38
37
|
import "@mui/icons-material/AccountCircle";
|
|
39
38
|
import ArrowBack from "@mui/icons-material/ArrowBack";
|
|
40
39
|
import Brightness4 from "@mui/icons-material/Brightness4";
|
|
@@ -97,9 +96,9 @@ function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
|
97
96
|
}
|
|
98
97
|
return dialog;
|
|
99
98
|
});
|
|
100
|
-
return /* @__PURE__ */ jsxs(DialogsContext.Provider, { value: { open: requestDialog, close: closeDialog }, children: [
|
|
99
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogsContext.Provider, { value: { open: requestDialog, close: closeDialog }, children: [
|
|
101
100
|
children,
|
|
102
|
-
stack.map(({ key, open, Component, payload, promise }) => /* @__PURE__ */ jsx(
|
|
101
|
+
stack.map(({ key, open, Component, payload, promise }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
103
102
|
Component,
|
|
104
103
|
{
|
|
105
104
|
payload,
|
|
@@ -113,9 +112,9 @@ function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
|
113
112
|
] });
|
|
114
113
|
}
|
|
115
114
|
const AppTitle = () => {
|
|
116
|
-
return /* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", spacing: 2, flexGrow: 1, children: [
|
|
117
|
-
/* @__PURE__ */ jsx("img", { src: "/favicon-32x32.png", alt: "app-logo", loading: "lazy" }),
|
|
118
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: clientEnv.VITE_APP_TITLE }),
|
|
115
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { direction: "row", alignItems: "center", spacing: 2, flexGrow: 1, children: [
|
|
116
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: "/favicon-32x32.png", alt: "app-logo", loading: "lazy" }),
|
|
117
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h6", children: clientEnv.VITE_APP_TITLE }),
|
|
119
118
|
false
|
|
120
119
|
] });
|
|
121
120
|
};
|
|
@@ -162,12 +161,12 @@ const StyledRouterButton = styled(RouterListItemButton)(({ theme }) => ({
|
|
|
162
161
|
}));
|
|
163
162
|
const IconOrAvatar = ({ item, collapsed }) => {
|
|
164
163
|
if (item.icon || collapsed) {
|
|
165
|
-
return /* @__PURE__ */ jsxs(Box, { sx: collapsed ? { position: "absolute", left: "50%", top: "calc(50% - 6px)", transform: "translate(-50%, -50%)" } : {}, children: [
|
|
166
|
-
/* @__PURE__ */ jsxs(ListItemIcon, { sx: { display: "flex", alignItems: "center", justifyContent: "center", minWidth: ICON_SIZE }, children: [
|
|
164
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { sx: collapsed ? { position: "absolute", left: "50%", top: "calc(50% - 6px)", transform: "translate(-50%, -50%)" } : {}, children: [
|
|
165
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemIcon, { sx: { display: "flex", alignItems: "center", justifyContent: "center", minWidth: ICON_SIZE }, children: [
|
|
167
166
|
item.icon ?? null,
|
|
168
|
-
!item.icon && collapsed ? /* @__PURE__ */ jsx(Avatar, { sx: { width: ICON_SIZE - 7, height: ICON_SIZE - 7, fontSize: 12 }, children: item.title }) : null
|
|
167
|
+
!item.icon && collapsed ? /* @__PURE__ */ jsxRuntimeExports.jsx(Avatar, { sx: { width: ICON_SIZE - 7, height: ICON_SIZE - 7, fontSize: 12 }, children: item.title }) : null
|
|
169
168
|
] }),
|
|
170
|
-
collapsed ? /* @__PURE__ */ jsx(
|
|
169
|
+
collapsed ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
171
170
|
Typography$1,
|
|
172
171
|
{
|
|
173
172
|
variant: "caption",
|
|
@@ -191,7 +190,7 @@ const IconOrAvatar = ({ item, collapsed }) => {
|
|
|
191
190
|
}
|
|
192
191
|
return null;
|
|
193
192
|
};
|
|
194
|
-
const MiniPopover = ({ open, anchorEl, children }) => /* @__PURE__ */ jsx(
|
|
193
|
+
const MiniPopover = ({ open, anchorEl, children }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
195
194
|
Popper,
|
|
196
195
|
{
|
|
197
196
|
open,
|
|
@@ -202,7 +201,7 @@ const MiniPopover = ({ open, anchorEl, children }) => /* @__PURE__ */ jsx(
|
|
|
202
201
|
{ name: "preventOverflow", options: { padding: 8 } },
|
|
203
202
|
{ name: "flip", options: { fallbackPlacements: ["right-end", "left-start"] } }
|
|
204
203
|
],
|
|
205
|
-
children: /* @__PURE__ */ jsx(
|
|
204
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
206
205
|
Paper,
|
|
207
206
|
{
|
|
208
207
|
sx: {
|
|
@@ -244,9 +243,9 @@ const NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSid
|
|
|
244
243
|
disabled,
|
|
245
244
|
sx: { px: 1.4, height: collapsed ? 60 : 48 }
|
|
246
245
|
};
|
|
247
|
-
const buttonContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
248
|
-
/* @__PURE__ */ jsx(IconOrAvatar, { item, collapsed }),
|
|
249
|
-
!collapsed && /* @__PURE__ */ jsx(
|
|
246
|
+
const buttonContent = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
247
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(IconOrAvatar, { item, collapsed }),
|
|
248
|
+
!collapsed && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
250
249
|
ListItemText,
|
|
251
250
|
{
|
|
252
251
|
primary: item.title,
|
|
@@ -254,9 +253,9 @@ const NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSid
|
|
|
254
253
|
sx: { ml: 1.2, flex: 1, minWidth: 0, "& .MuiTypography-root": { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } }
|
|
255
254
|
}
|
|
256
255
|
),
|
|
257
|
-
item.children ? /* @__PURE__ */ jsx(ExpandMoreIcon, { sx: chevronSx }) : null
|
|
256
|
+
item.children ? /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandMoreIcon, { sx: chevronSx }) : null
|
|
258
257
|
] });
|
|
259
|
-
const listItem = /* @__PURE__ */ jsxs(
|
|
258
|
+
const listItem = /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
260
259
|
ListItem,
|
|
261
260
|
{
|
|
262
261
|
...item.children && collapsed ? {
|
|
@@ -270,7 +269,7 @@ const NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSid
|
|
|
270
269
|
} : {},
|
|
271
270
|
sx: { py: 0, px: 1, overflowX: "hidden" },
|
|
272
271
|
children: [
|
|
273
|
-
shouldJustExpand ? /* @__PURE__ */ jsx(StyledNavButton, { ...buttonProps, onClick: () => onClick?.(item), children: buttonContent }) : /* @__PURE__ */ jsx(
|
|
272
|
+
shouldJustExpand ? /* @__PURE__ */ jsxRuntimeExports.jsx(StyledNavButton, { ...buttonProps, onClick: () => onClick?.(item), children: buttonContent }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
274
273
|
StyledRouterButton,
|
|
275
274
|
{
|
|
276
275
|
...buttonProps,
|
|
@@ -282,13 +281,13 @@ const NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSid
|
|
|
282
281
|
children: buttonContent
|
|
283
282
|
}
|
|
284
283
|
),
|
|
285
|
-
item.children && collapsed ? /* @__PURE__ */ jsx(MiniPopover, { open: item.title === hoveredPopoverItem, anchorEl: anchorElement, children: renderNested?.(item.children) }) : null
|
|
284
|
+
item.children && collapsed ? /* @__PURE__ */ jsxRuntimeExports.jsx(MiniPopover, { open: item.title === hoveredPopoverItem, anchorEl: anchorElement, children: renderNested?.(item.children) }) : null
|
|
286
285
|
]
|
|
287
286
|
}
|
|
288
287
|
);
|
|
289
|
-
return /* @__PURE__ */ jsxs(Fragment
|
|
288
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
|
|
290
289
|
listItem,
|
|
291
|
-
item.children && !collapsed ? /* @__PURE__ */ jsx(Collapse, { in: isOpen, timeout: "auto", unmountOnExit: true, children: renderNested?.(item.children) }) : null
|
|
290
|
+
item.children && !collapsed ? /* @__PURE__ */ jsxRuntimeExports.jsx(Collapse, { in: isOpen, timeout: "auto", unmountOnExit: true, children: renderNested?.(item.children) }) : null
|
|
292
291
|
] }, item.to);
|
|
293
292
|
};
|
|
294
293
|
const isPageItem = (item) => !("kind" in item);
|
|
@@ -300,7 +299,7 @@ const NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSide
|
|
|
300
299
|
if (collapsed) setOpenKeys([]);
|
|
301
300
|
}, [collapsed]);
|
|
302
301
|
const toggleKey = (key) => setOpenKeys((previous) => previous.includes(key) ? previous.filter((k) => k !== key) : [...previous, key]);
|
|
303
|
-
const renderNested = (children) => /* @__PURE__ */ jsx(
|
|
302
|
+
const renderNested = (children) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
304
303
|
NavigationList,
|
|
305
304
|
{
|
|
306
305
|
subNavigation: children,
|
|
@@ -313,7 +312,7 @@ const NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSide
|
|
|
313
312
|
}
|
|
314
313
|
);
|
|
315
314
|
const filteredNavigation = subNavigation.filter((nav) => !nav.hidden);
|
|
316
|
-
return /* @__PURE__ */ jsx(
|
|
315
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
317
316
|
List,
|
|
318
317
|
{
|
|
319
318
|
sx: {
|
|
@@ -326,7 +325,7 @@ const NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSide
|
|
|
326
325
|
},
|
|
327
326
|
children: filteredNavigation.map((navItem, index) => {
|
|
328
327
|
if (isHeader(navItem)) {
|
|
329
|
-
return /* @__PURE__ */ jsx(
|
|
328
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
330
329
|
ListSubheader,
|
|
331
330
|
{
|
|
332
331
|
sx: {
|
|
@@ -349,13 +348,13 @@ const NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSide
|
|
|
349
348
|
}
|
|
350
349
|
if (isDivider(navItem)) {
|
|
351
350
|
const nextItem = filteredNavigation[index + 1];
|
|
352
|
-
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Divider, { sx: { mx: 1, mt: 1, mb: isHeader(nextItem) && !collapsed ? 0 : 1 } }) }, `divider-${depth}-${index}`);
|
|
351
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { sx: { mx: 1, mt: 1, mb: isHeader(nextItem) && !collapsed ? 0 : 1 } }) }, `divider-${depth}-${index}`);
|
|
353
352
|
}
|
|
354
353
|
if (!isPageItem(navItem)) return null;
|
|
355
354
|
const key = `item-${depth}-${index}`;
|
|
356
355
|
const uniqueItemKey = `${depth}-${index}-${navItem.title}`;
|
|
357
|
-
if (renderItem) return /* @__PURE__ */ jsx(Fragment
|
|
358
|
-
return /* @__PURE__ */ jsx(
|
|
356
|
+
if (renderItem) return /* @__PURE__ */ jsxRuntimeExports.jsx(Fragment, { children: renderItem(navItem, { collapsed: !!collapsed }) }, key);
|
|
357
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
359
358
|
NavigationListItem,
|
|
360
359
|
{
|
|
361
360
|
item: navItem,
|
|
@@ -382,7 +381,7 @@ const NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
382
381
|
const routerState = useRouterState();
|
|
383
382
|
const theme = useTheme();
|
|
384
383
|
const showPermanent = useMediaQuery(theme.breakpoints.up("sm"));
|
|
385
|
-
const drawerContent = (collapsed) => /* @__PURE__ */ jsx(
|
|
384
|
+
const drawerContent = (collapsed) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
386
385
|
Box,
|
|
387
386
|
{
|
|
388
387
|
component: "nav",
|
|
@@ -396,7 +395,7 @@ const NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
396
395
|
overflowX: "hidden",
|
|
397
396
|
pt: navigation[0] && isHeader(navigation[0]) && !collapsed ? 0 : 2
|
|
398
397
|
},
|
|
399
|
-
children: /* @__PURE__ */ jsx(
|
|
398
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
400
399
|
NavigationList,
|
|
401
400
|
{
|
|
402
401
|
subNavigation: navigation,
|
|
@@ -412,7 +411,7 @@ const NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
412
411
|
}
|
|
413
412
|
);
|
|
414
413
|
if (showPermanent)
|
|
415
|
-
return /* @__PURE__ */ jsx(
|
|
414
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
416
415
|
Drawer,
|
|
417
416
|
{
|
|
418
417
|
variant: "permanent",
|
|
@@ -430,7 +429,7 @@ const NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
430
429
|
children: drawerContent(!expanded)
|
|
431
430
|
}
|
|
432
431
|
);
|
|
433
|
-
return /* @__PURE__ */ jsx(Drawer, { open: expanded, onClose: () => setExpanded(false), children: drawerContent(!expanded) });
|
|
432
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Drawer, { open: expanded, onClose: () => setExpanded(false), children: drawerContent(!expanded) });
|
|
434
433
|
};
|
|
435
434
|
const capitalize = (value) => value && value.charAt(0).toUpperCase() + value.slice(1);
|
|
436
435
|
const ToolbarAccount = () => {
|
|
@@ -463,23 +462,23 @@ const ToolbarAccount = () => {
|
|
|
463
462
|
setTimeout(() => setTab("settings"), 300);
|
|
464
463
|
};
|
|
465
464
|
const changeTab = (newTab) => () => setTab(newTab);
|
|
466
|
-
const settings = /* @__PURE__ */ jsxs(List$1, { component: "nav", subheader: /* @__PURE__ */ jsx(ListSubheader$1, { sx: { backgroundColor: "transparent" }, children: t("Layout.Settings") }), children: [
|
|
467
|
-
/* @__PURE__ */ jsxs(ListItemButton$1, { onClick: changeTab("theme"), sx: { py: 0.3 }, children: [
|
|
468
|
-
/* @__PURE__ */ jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsx(Brightness4, {}) }),
|
|
469
|
-
/* @__PURE__ */ jsx(ListItemText$1, { primary: t("Layout.Appearance"), secondary: colorModes.find((m) => m.mode === mode)?.label }),
|
|
470
|
-
/* @__PURE__ */ jsx(ChevronRight, {})
|
|
465
|
+
const settings = /* @__PURE__ */ jsxRuntimeExports.jsxs(List$1, { component: "nav", subheader: /* @__PURE__ */ jsxRuntimeExports.jsx(ListSubheader$1, { sx: { backgroundColor: "transparent" }, children: t("Layout.Settings") }), children: [
|
|
466
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemButton$1, { onClick: changeTab("theme"), sx: { py: 0.3 }, children: [
|
|
467
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Brightness4, {}) }),
|
|
468
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { primary: t("Layout.Appearance"), secondary: colorModes.find((m) => m.mode === mode)?.label }),
|
|
469
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, {})
|
|
471
470
|
] }),
|
|
472
|
-
/* @__PURE__ */ jsxs(ListItemButton$1, { onClick: changeTab("language"), sx: { py: 0.3 }, children: [
|
|
473
|
-
/* @__PURE__ */ jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsx(Translate, {}) }),
|
|
474
|
-
/* @__PURE__ */ jsx(ListItemText$1, { primary: t("Layout.Language"), secondary: capitalize(languageDisplayNames.of(i18n2.language)) }),
|
|
475
|
-
/* @__PURE__ */ jsx(ChevronRight, {})
|
|
471
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemButton$1, { onClick: changeTab("language"), sx: { py: 0.3 }, children: [
|
|
472
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Translate, {}) }),
|
|
473
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { primary: t("Layout.Language"), secondary: capitalize(languageDisplayNames.of(i18n2.language)) }),
|
|
474
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, {})
|
|
476
475
|
] })
|
|
477
476
|
] });
|
|
478
|
-
const theme = /* @__PURE__ */ jsx(List$1, { subheader: /* @__PURE__ */ jsxs(ListSubheader$1, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
479
|
-
/* @__PURE__ */ jsx(IconButton, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx(ArrowBack, { fontSize: "small" }) }),
|
|
477
|
+
const theme = /* @__PURE__ */ jsxRuntimeExports.jsx(List$1, { subheader: /* @__PURE__ */ jsxRuntimeExports.jsxs(ListSubheader$1, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
478
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowBack, { fontSize: "small" }) }),
|
|
480
479
|
" ",
|
|
481
480
|
t("Layout.Appearance")
|
|
482
|
-
] }), children: colorModes.map(({ mode: modeValue, icon: Icon, label }) => /* @__PURE__ */ jsxs(
|
|
481
|
+
] }), children: colorModes.map(({ mode: modeValue, icon: Icon, label }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
483
482
|
ListItemButton$1,
|
|
484
483
|
{
|
|
485
484
|
onClick: () => {
|
|
@@ -488,40 +487,40 @@ const ToolbarAccount = () => {
|
|
|
488
487
|
},
|
|
489
488
|
selected: mode === modeValue,
|
|
490
489
|
children: [
|
|
491
|
-
/* @__PURE__ */ jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsx(Icon, {}) }),
|
|
492
|
-
/* @__PURE__ */ jsx(ListItemText$1, { primary: label })
|
|
490
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {}) }),
|
|
491
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { primary: label })
|
|
493
492
|
]
|
|
494
493
|
},
|
|
495
494
|
modeValue
|
|
496
495
|
)) });
|
|
497
|
-
const language = /* @__PURE__ */ jsx(List$1, { subheader: /* @__PURE__ */ jsxs(ListSubheader$1, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
498
|
-
/* @__PURE__ */ jsx(IconButton, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx(ArrowBack, { fontSize: "small" }) }),
|
|
496
|
+
const language = /* @__PURE__ */ jsxRuntimeExports.jsx(List$1, { subheader: /* @__PURE__ */ jsxRuntimeExports.jsxs(ListSubheader$1, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
497
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowBack, { fontSize: "small" }) }),
|
|
499
498
|
" ",
|
|
500
499
|
t("Layout.Language")
|
|
501
500
|
] }), children: supportedLanguages.map(
|
|
502
|
-
(languageCode) => /* @__PURE__ */ jsxs(
|
|
501
|
+
(languageCode) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
503
502
|
ListItemButton$1,
|
|
504
503
|
{
|
|
505
504
|
onClick: () => i18n2.changeLanguage(languageCode).finally(() => closeMenu()),
|
|
506
505
|
selected: i18n2.resolvedLanguage === languageCode,
|
|
507
506
|
children: [
|
|
508
|
-
/* @__PURE__ */ jsx(ListItemIcon$1, { children: i18n2.resolvedLanguage === languageCode && /* @__PURE__ */ jsx(Done, {}) }),
|
|
509
|
-
/* @__PURE__ */ jsx(ListItemText$1, { primary: capitalize(languageDisplayNames.of(languageCode)) })
|
|
507
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon$1, { children: i18n2.resolvedLanguage === languageCode && /* @__PURE__ */ jsxRuntimeExports.jsx(Done, {}) }),
|
|
508
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { primary: capitalize(languageDisplayNames.of(languageCode)) })
|
|
510
509
|
]
|
|
511
510
|
},
|
|
512
511
|
languageCode
|
|
513
512
|
)
|
|
514
513
|
) });
|
|
515
|
-
return /* @__PURE__ */ jsxs(Fragment
|
|
516
|
-
/* @__PURE__ */ jsx(IconButton, { size: "small", edge: "end", onClick: openMenu, children: /* @__PURE__ */ jsx(Avatar$1, { sx: { width: { xs: 32, sm: 40 }, height: { xs: 32, sm: 40 }, bgcolor: "primary.main" }, children: /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", sx: { fontWeight: "bold", lineHeight: 0 }, children: usernameInitials() }) }) }),
|
|
517
|
-
/* @__PURE__ */ jsx(Menu, { anchorEl: anchorElement, open, onClose: closeMenu, children: /* @__PURE__ */ jsxs(Box$1, { sx: { width: 240 }, children: [
|
|
518
|
-
/* @__PURE__ */ jsx(List$1, { children: session ? /* @__PURE__ */ jsxs(Fragment
|
|
519
|
-
/* @__PURE__ */ jsx(ListItem$1, { children: /* @__PURE__ */ jsx(ListItemText$1, { primary: user.name, secondary: /* @__PURE__ */ jsxs("span", { children: [
|
|
520
|
-
/* @__PURE__ */ jsx("span", { children: user.employeeId }),
|
|
521
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
522
|
-
/* @__PURE__ */ jsx("span", { children: user.department })
|
|
514
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
|
|
515
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { size: "small", edge: "end", onClick: openMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Avatar$1, { sx: { width: { xs: 32, sm: 40 }, height: { xs: 32, sm: 40 }, bgcolor: "primary.main" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "subtitle2", sx: { fontWeight: "bold", lineHeight: 0 }, children: usernameInitials() }) }) }),
|
|
516
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Menu, { anchorEl: anchorElement, open, onClose: closeMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$1, { sx: { width: 240 }, children: [
|
|
517
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(List$1, { children: session ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
|
|
518
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItem$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { primary: user.name, secondary: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
519
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: user.employeeId }),
|
|
520
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
521
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: user.department })
|
|
523
522
|
] }) }) }),
|
|
524
|
-
/* @__PURE__ */ jsxs(
|
|
523
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
525
524
|
ListItemButton$1,
|
|
526
525
|
{
|
|
527
526
|
onClick: () => authClient.signOut({}, {
|
|
@@ -529,12 +528,12 @@ const ToolbarAccount = () => {
|
|
|
529
528
|
onError: ({ error }) => alert(error.message)
|
|
530
529
|
}),
|
|
531
530
|
children: [
|
|
532
|
-
/* @__PURE__ */ jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsx(Logout, { color: "error" }) }),
|
|
533
|
-
/* @__PURE__ */ jsx(ListItemText$1, { primary: t("Layout.Logout") })
|
|
531
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Logout, { color: "error" }) }),
|
|
532
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { primary: t("Layout.Logout") })
|
|
534
533
|
]
|
|
535
534
|
}
|
|
536
535
|
)
|
|
537
|
-
] }) : /* @__PURE__ */ jsxs(
|
|
536
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
538
537
|
ListItemButton$1,
|
|
539
538
|
{
|
|
540
539
|
onClick: () => authClient.signIn.social({ provider: "microsoft" }, {
|
|
@@ -542,8 +541,8 @@ const ToolbarAccount = () => {
|
|
|
542
541
|
onError: ({ error }) => alert(error.message)
|
|
543
542
|
}),
|
|
544
543
|
children: [
|
|
545
|
-
/* @__PURE__ */ jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsx(Login, { color: "success" }) }),
|
|
546
|
-
/* @__PURE__ */ jsx(ListItemText$1, { primary: t("Layout.LogIn") })
|
|
544
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Login, { color: "success" }) }),
|
|
545
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { primary: t("Layout.LogIn") })
|
|
547
546
|
]
|
|
548
547
|
}
|
|
549
548
|
) }),
|
|
@@ -572,11 +571,11 @@ const Layout = (props) => {
|
|
|
572
571
|
const [navigationOpen, setNavigationOpen] = useState(getNavigationOpenStatus);
|
|
573
572
|
const isFetching = !!useIsFetching();
|
|
574
573
|
const isMutating = !!useIsMutating();
|
|
575
|
-
return /* @__PURE__ */ jsxs(Fragment
|
|
576
|
-
/* @__PURE__ */ jsx(InitColorSchemeScript, {}),
|
|
577
|
-
/* @__PURE__ */ jsx(CssBaseline, {}),
|
|
578
|
-
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", height: "100dvh", maxHeight: "100dvh", overflow: "hidden", width: "100%" }, children: [
|
|
579
|
-
/* @__PURE__ */ jsx(
|
|
574
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
|
|
575
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(InitColorSchemeScript, {}),
|
|
576
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CssBaseline, {}),
|
|
577
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box$1, { sx: { display: "flex", height: "100dvh", maxHeight: "100dvh", overflow: "hidden", width: "100%" }, children: [
|
|
578
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
580
579
|
AppBar,
|
|
581
580
|
{
|
|
582
581
|
color: "transparent",
|
|
@@ -586,8 +585,8 @@ const Layout = (props) => {
|
|
|
586
585
|
borderColor: theme.vars?.palette.divider,
|
|
587
586
|
boxShadow: "none"
|
|
588
587
|
}),
|
|
589
|
-
children: /* @__PURE__ */ jsxs(Toolbar, { children: [
|
|
590
|
-
props.navigation && /* @__PURE__ */ jsx(
|
|
588
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Toolbar, { children: [
|
|
589
|
+
props.navigation && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
591
590
|
IconButton,
|
|
592
591
|
{
|
|
593
592
|
onClick: () => {
|
|
@@ -598,15 +597,15 @@ const Layout = (props) => {
|
|
|
598
597
|
});
|
|
599
598
|
},
|
|
600
599
|
sx: { marginRight: 2 },
|
|
601
|
-
children: navigationOpen ? /* @__PURE__ */ jsx(MenuOpen, {}) : /* @__PURE__ */ jsx(Menu$1, {})
|
|
600
|
+
children: navigationOpen ? /* @__PURE__ */ jsxRuntimeExports.jsx(MenuOpen, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1, {})
|
|
602
601
|
}
|
|
603
602
|
),
|
|
604
|
-
/* @__PURE__ */ jsx(AppTitle, {}),
|
|
605
|
-
/* @__PURE__ */ jsx(ToolbarAccount, {})
|
|
603
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AppTitle, {}),
|
|
604
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ToolbarAccount, {})
|
|
606
605
|
] })
|
|
607
606
|
}
|
|
608
607
|
),
|
|
609
|
-
props.navigation && /* @__PURE__ */ jsx(
|
|
608
|
+
props.navigation && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
610
609
|
NavigationRail,
|
|
611
610
|
{
|
|
612
611
|
navigation: props.navigation,
|
|
@@ -617,12 +616,12 @@ const Layout = (props) => {
|
|
|
617
616
|
}
|
|
618
617
|
}
|
|
619
618
|
),
|
|
620
|
-
/* @__PURE__ */ jsxs(Box$1, { component: "main", sx: { flexGrow: 1, display: "flex", flexDirection: "column", minWidth: 0, height: "100%", overflow: "hidden" }, children: [
|
|
621
|
-
/* @__PURE__ */ jsx(DrawerHeader, {}),
|
|
622
|
-
/* @__PURE__ */ jsx(Box$1, { sx: { flex: 1, overflow: "auto", position: "relative" }, children: props.children })
|
|
619
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box$1, { component: "main", sx: { flexGrow: 1, display: "flex", flexDirection: "column", minWidth: 0, height: "100%", overflow: "hidden" }, children: [
|
|
620
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DrawerHeader, {}),
|
|
621
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { sx: { flex: 1, overflow: "auto", position: "relative" }, children: props.children })
|
|
623
622
|
] })
|
|
624
623
|
] }),
|
|
625
|
-
(isFetching || isMutating) && /* @__PURE__ */ jsx(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
|
|
624
|
+
(isFetching || isMutating) && /* @__PURE__ */ jsxRuntimeExports.jsx(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
|
|
626
625
|
] });
|
|
627
626
|
};
|
|
628
627
|
const YEAR_IN_MINUTES = 60 * 24 * 365;
|
|
@@ -649,7 +648,7 @@ const LayoutProvider = ({ navigation, theme, children }) => {
|
|
|
649
648
|
i18n.off("languageChanged", languageChangedHandler);
|
|
650
649
|
};
|
|
651
650
|
}, []);
|
|
652
|
-
return /* @__PURE__ */ jsx(ThemeProvider, { theme: createdTheme, children: /* @__PURE__ */ jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n.language, children: /* @__PURE__ */ jsx(DialogsProvider, { children: /* @__PURE__ */ jsx(Layout, { navigation, children }) }) }, i18n.language) });
|
|
651
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { theme: createdTheme, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n.language, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DialogsProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Layout, { navigation, children }) }) }, i18n.language) });
|
|
653
652
|
};
|
|
654
653
|
const setSSRLanguage = createServerFn().handler(async () => {
|
|
655
654
|
const language = getCookie(i18n.services.languageDetector.options.lookupCookie) || "en";
|