wcz-test 6.7.7 → 6.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/dist/ApprovalStatus-C9HPyMiS.js +24 -0
  2. package/dist/ApprovalStatus-C9HPyMiS.js.map +1 -0
  3. package/dist/{chunk-4UULRYGW.js → DialogsHooks-BlUsVlfv.js} +7 -14
  4. package/dist/DialogsHooks-BlUsVlfv.js.map +1 -0
  5. package/dist/{chunk-MIVD2XWB.js → FileHooks-hWKTwLCr.js} +36 -46
  6. package/dist/FileHooks-hWKTwLCr.js.map +1 -0
  7. package/dist/{chunk-TME53DAF.js → FileMeta-G1oT3mYK.js} +3 -5
  8. package/dist/FileMeta-G1oT3mYK.js.map +1 -0
  9. package/dist/{chunk-ZMWQQXZT.js → RouterListItemButton-Cx7rXEfm.js} +6 -8
  10. package/dist/RouterListItemButton-Cx7rXEfm.js.map +1 -0
  11. package/dist/android-chrome-192x192.png +0 -0
  12. package/dist/android-chrome-512x512.png +0 -0
  13. package/dist/apple-touch-icon.png +0 -0
  14. package/dist/auth-client-D9snEe6B.js +79 -0
  15. package/dist/auth-client-D9snEe6B.js.map +1 -0
  16. package/dist/client-utils.d.ts +3 -702
  17. package/dist/client-utils.js +7 -17
  18. package/dist/client-utils.js.map +1 -1
  19. package/dist/components/core/AppTitle.d.ts +2 -0
  20. package/dist/components/core/Fullscreen.d.ts +3 -0
  21. package/dist/components/core/Layout.d.ts +8 -0
  22. package/dist/components/core/ToolbarAccount.d.ts +2 -0
  23. package/dist/components/core/TypographyWithIcon.d.ts +7 -0
  24. package/dist/components/core/navigation/NavigationList.d.ts +22 -0
  25. package/dist/components/core/navigation/NavigationListItem.d.ts +16 -0
  26. package/dist/components/core/navigation/NavigationRail.d.ts +12 -0
  27. package/dist/components/data-grid/ChipInputCell.d.ts +9 -0
  28. package/dist/components/data-grid/EditableColumnHeader.d.ts +2 -0
  29. package/dist/components/file/Dropzone.d.ts +8 -0
  30. package/dist/components/file/FileViewer.d.ts +20 -0
  31. package/dist/components/file/fileViewer/FileViewerGrid.d.ts +17 -0
  32. package/dist/components/file/fileViewer/FileViewerList.d.ts +12 -0
  33. package/dist/components/file/fileViewer/ImageViewer.d.ts +6 -0
  34. package/dist/components/file/fileViewer/common/ActionsMenu.d.ts +15 -0
  35. package/dist/components/form/FormAutocomplete.d.ts +7 -0
  36. package/dist/components/form/FormCheckbox.d.ts +7 -0
  37. package/dist/components/form/FormDatePicker.d.ts +8 -0
  38. package/dist/components/form/FormDateRangePicker.d.ts +8 -0
  39. package/dist/components/form/FormDateTimePicker.d.ts +8 -0
  40. package/dist/components/form/FormDateTimeRangePicker.d.ts +8 -0
  41. package/dist/components/form/FormNumberField.d.ts +9 -0
  42. package/dist/components/form/FormRadioGroup.d.ts +13 -0
  43. package/dist/components/form/FormSlider.d.ts +7 -0
  44. package/dist/components/form/FormSubmitButton.d.ts +4 -0
  45. package/dist/components/form/FormSwitch.d.ts +7 -0
  46. package/dist/components/form/FormTextField.d.ts +7 -0
  47. package/dist/components/form/FormTimePicker.d.ts +8 -0
  48. package/dist/components/form/FormTimeRangePicker.d.ts +8 -0
  49. package/dist/components/router/RouterButton.d.ts +6 -0
  50. package/dist/components/router/RouterError.d.ts +7 -0
  51. package/dist/components/router/RouterGridActionsCellItem.d.ts +6 -0
  52. package/dist/components/router/RouterIconButton.d.ts +6 -0
  53. package/dist/components/router/RouterLink.d.ts +6 -0
  54. package/dist/components/router/RouterListItemButton.d.ts +6 -0
  55. package/dist/components/router/RouterNotFound.d.ts +1 -0
  56. package/dist/components/router/RouterTab.d.ts +6 -0
  57. package/dist/components.d.ts +14 -89
  58. package/dist/components.js +124 -227
  59. package/dist/components.js.map +1 -1
  60. package/dist/contexts/DialogsContext.d.ts +6 -0
  61. package/dist/contexts/FileContext.d.ts +13 -0
  62. package/dist/env-CoxTjaDr.js +27 -0
  63. package/dist/env-CoxTjaDr.js.map +1 -0
  64. package/dist/env.d.ts +10 -0
  65. package/dist/favicon-16x16.png +0 -0
  66. package/dist/favicon-32x32.png +0 -0
  67. package/dist/favicon.ico +0 -0
  68. package/dist/favicon.png +0 -0
  69. package/dist/hooks/DialogsHooks.d.ts +42 -0
  70. package/dist/hooks/FormHooks.d.ts +52 -0
  71. package/dist/hooks/ThemeHook.d.ts +4 -0
  72. package/dist/hooks.d.ts +3 -159
  73. package/dist/hooks.js +56 -121
  74. package/dist/hooks.js.map +1 -1
  75. package/dist/index.d.ts +3 -36
  76. package/dist/index.js +173 -1882
  77. package/dist/index.js.map +1 -1
  78. package/dist/{client-utils.d.cts → lib/auth/auth-client.d.ts} +110 -126
  79. package/dist/lib/auth/auth.d.ts +24 -0
  80. package/dist/lib/db/index.d.ts +4 -0
  81. package/dist/lib/db/schemas/auth.d.ts +606 -0
  82. package/dist/{utils-ChipkRJ9.d.ts → lib/utils.d.ts} +11 -10
  83. package/dist/lib/vite-plugin.d.ts +2 -0
  84. package/dist/manifest.webmanifest +18 -0
  85. package/dist/models/Navigation.d.ts +18 -0
  86. package/dist/models/User.d.ts +8 -0
  87. package/dist/models/approval/Approval.d.ts +177 -0
  88. package/dist/models/approval/ApprovalEmployee.d.ts +7 -0
  89. package/dist/models/approval/ApprovalFlow.d.ts +49 -0
  90. package/dist/models/approval/ApprovalFlowStep.d.ts +29 -0
  91. package/dist/models/approval/ApprovalRequestType.d.ts +5 -0
  92. package/dist/models/approval/ApprovalStatus.d.ts +9 -0
  93. package/dist/models/approval/ApprovalStepResult.d.ts +11 -0
  94. package/dist/models/approval/StepApprovalOrder.d.ts +6 -0
  95. package/dist/models/email/Email.d.ts +13 -0
  96. package/dist/models/email/EmailAttachment.d.ts +6 -0
  97. package/dist/models/file/FileActions.d.ts +6 -0
  98. package/dist/{FileMeta-CC014fnB.d.cts → models/file/FileMeta.d.ts} +3 -6
  99. package/dist/models/peoplesoft/Department.d.ts +58 -0
  100. package/dist/models/peoplesoft/Employee.d.ts +46 -0
  101. package/dist/models/peoplesoft/EmployeeCategoryGroup.d.ts +6 -0
  102. package/dist/models/peoplesoft/EmployeeStatus.d.ts +6 -0
  103. package/dist/models.d.ts +25 -161
  104. package/dist/models.js +109 -160
  105. package/dist/models.js.map +1 -1
  106. package/dist/providers/DialogsProvider.d.ts +6 -0
  107. package/dist/providers/LayoutProvider.d.ts +11 -0
  108. package/dist/queries/Approval.d.ts +585 -0
  109. package/dist/queries/ApprovalHooks.d.ts +315 -0
  110. package/dist/queries/FileHooks.d.ts +151 -0
  111. package/dist/queries/PeopleSoftHooks.d.ts +537 -0
  112. package/dist/queries.d.ts +4 -1585
  113. package/dist/queries.js +59 -86
  114. package/dist/queries.js.map +1 -1
  115. package/dist/robots.txt +3 -0
  116. package/dist/server-utils.d.ts +2 -35
  117. package/dist/server-utils.js +13 -26
  118. package/dist/server-utils.js.map +1 -1
  119. package/dist/{chunk-2ROTNT7W.js → utils-DKyKGba7.js} +13 -18
  120. package/dist/utils-DKyKGba7.js.map +1 -0
  121. package/dist/utils.d.ts +1 -2
  122. package/dist/utils.js +3 -9
  123. package/dist/utils.js.map +1 -1
  124. package/dist/vite.d.ts +1 -5
  125. package/dist/vite.js +3 -6
  126. package/dist/vite.js.map +1 -1
  127. package/package.json +15 -23
  128. package/dist/Approval-CWQn-kah.d.cts +0 -284
  129. package/dist/Approval-CWQn-kah.d.ts +0 -284
  130. package/dist/FileMeta-CC014fnB.d.ts +0 -18
  131. package/dist/chunk-2ROTNT7W.js.map +0 -1
  132. package/dist/chunk-4FRZRIAO.js +0 -29
  133. package/dist/chunk-4FRZRIAO.js.map +0 -1
  134. package/dist/chunk-4UULRYGW.js.map +0 -1
  135. package/dist/chunk-5WRI5ZAA.js +0 -31
  136. package/dist/chunk-5WRI5ZAA.js.map +0 -1
  137. package/dist/chunk-CNDRHYQK.js +0 -883
  138. package/dist/chunk-CNDRHYQK.js.map +0 -1
  139. package/dist/chunk-DXXZZHAK.js +0 -28
  140. package/dist/chunk-DXXZZHAK.js.map +0 -1
  141. package/dist/chunk-MIVD2XWB.js.map +0 -1
  142. package/dist/chunk-TME53DAF.js.map +0 -1
  143. package/dist/chunk-ZMWQQXZT.js.map +0 -1
  144. package/dist/client-utils.cjs +0 -118
  145. package/dist/client-utils.cjs.map +0 -1
  146. package/dist/components.cjs +0 -802
  147. package/dist/components.cjs.map +0 -1
  148. package/dist/components.d.cts +0 -89
  149. package/dist/hooks.cjs +0 -534
  150. package/dist/hooks.cjs.map +0 -1
  151. package/dist/hooks.d.cts +0 -160
  152. package/dist/index.cjs +0 -3373
  153. package/dist/index.cjs.map +0 -1
  154. package/dist/index.d.cts +0 -36
  155. package/dist/models.cjs +0 -330
  156. package/dist/models.cjs.map +0 -1
  157. package/dist/models.d.cts +0 -161
  158. package/dist/queries.cjs +0 -706
  159. package/dist/queries.cjs.map +0 -1
  160. package/dist/queries.d.cts +0 -1585
  161. package/dist/server-utils.cjs +0 -145
  162. package/dist/server-utils.cjs.map +0 -1
  163. package/dist/server-utils.d.cts +0 -36
  164. package/dist/utils-ChipkRJ9.d.cts +0 -49
  165. package/dist/utils.cjs +0 -81
  166. package/dist/utils.cjs.map +0 -1
  167. package/dist/utils.d.cts +0 -4
  168. package/dist/vite.cjs +0 -94
  169. package/dist/vite.cjs.map +0 -1
  170. package/dist/vite.d.cts +0 -5
@@ -1,26 +1,25 @@
1
- import {
2
- RouterListItemButton
3
- } from "./chunk-ZMWQQXZT.js";
4
- import {
5
- useDialogs
6
- } from "./chunk-4UULRYGW.js";
7
- import {
8
- useDeleteFile,
9
- useDownloadFile,
10
- useGetFile,
11
- useGetFileMetas,
12
- useGetFileThumbnail,
13
- useOpenFile
14
- } from "./chunk-MIVD2XWB.js";
15
- import "./chunk-TME53DAF.js";
16
- import "./chunk-2ROTNT7W.js";
17
- import "./chunk-DXXZZHAK.js";
18
- import "./chunk-5WRI5ZAA.js";
19
-
20
- // src/components/core/TypographyWithIcon.tsx
21
- import { Stack, Typography } from "@mui/material";
22
- import { jsx, jsxs } from "react/jsx-runtime";
23
- var TypographyWithIcon = ({ startIcon, endIcon, children, sx, ...props }) => {
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Typography, Stack, Box, useTheme, Paper, Menu, List, ListItemButton, ListItemIcon, ListItemText, ImageListItem, ImageListItemBar, IconButton, Tooltip, Dialog, Fab, Chip, Button, Link, Tab, Divider } from "@mui/material";
3
+ import React, { useRef, useState, useEffectEvent, useEffect, createContext, useContext, Fragment } from "react";
4
+ import CloudUpload from "@mui/icons-material/CloudUpload";
5
+ import { useDropzone } from "react-dropzone";
6
+ import { useTranslation } from "react-i18next";
7
+ import MoreVert from "@mui/icons-material/MoreVert";
8
+ import { grey } from "@mui/material/colors";
9
+ import { useInView } from "react-intersection-observer";
10
+ import Delete from "@mui/icons-material/Delete";
11
+ import FileDownload from "@mui/icons-material/FileDownload";
12
+ import { u as useDialogs } from "./DialogsHooks-BlUsVlfv.js";
13
+ import { c as useDownloadFile, f as useDeleteFile, a as useGetFileThumbnail, d as useOpenFile, b as useGetFile, u as useGetFileMetas } from "./FileHooks-hWKTwLCr.js";
14
+ import AttachFile from "@mui/icons-material/AttachFile";
15
+ import Image from "@mui/icons-material/Image";
16
+ import SmartDisplay from "@mui/icons-material/SmartDisplay";
17
+ import Close from "@mui/icons-material/Close";
18
+ import Edit from "@mui/icons-material/Edit";
19
+ import { createLink } from "@tanstack/react-router";
20
+ import { GridActionsCellItem } from "@mui/x-data-grid-premium";
21
+ import { R } from "./RouterListItemButton-Cx7rXEfm.js";
22
+ const TypographyWithIcon = ({ startIcon, endIcon, children, sx, ...props }) => {
24
23
  const iconSx = {
25
24
  display: "inline-flex",
26
25
  alignItems: "center",
@@ -51,12 +50,7 @@ var TypographyWithIcon = ({ startIcon, endIcon, children, sx, ...props }) => {
51
50
  }
52
51
  );
53
52
  };
54
-
55
- // src/components/core/Fullscreen.tsx
56
- import { Box } from "@mui/material";
57
- import { useEffect, useEffectEvent, useRef, useState } from "react";
58
- import { jsx as jsx2 } from "react/jsx-runtime";
59
- var Fullscreen = ({ children, sx, ...props }) => {
53
+ const Fullscreen = ({ children, sx, ...props }) => {
60
54
  const reference = useRef(null);
61
55
  const [height, setHeight] = useState();
62
56
  const recompute = useEffectEvent(() => {
@@ -79,7 +73,7 @@ var Fullscreen = ({ children, sx, ...props }) => {
79
73
  ro.disconnect();
80
74
  };
81
75
  }, []);
82
- return /* @__PURE__ */ jsx2(
76
+ return /* @__PURE__ */ jsx(
83
77
  Box,
84
78
  {
85
79
  ref: reference,
@@ -97,14 +91,7 @@ var Fullscreen = ({ children, sx, ...props }) => {
97
91
  }
98
92
  );
99
93
  };
100
-
101
- // src/components/file/Dropzone.tsx
102
- import CloudUpload from "@mui/icons-material/CloudUpload";
103
- import { Paper, Typography as Typography2, useTheme } from "@mui/material";
104
- import { useDropzone } from "react-dropzone";
105
- import { useTranslation } from "react-i18next";
106
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
107
- var baseStyle = {
94
+ const baseStyle = {
108
95
  flex: 1,
109
96
  display: "flex",
110
97
  flexDirection: "column",
@@ -117,7 +104,7 @@ var baseStyle = {
117
104
  transition: "border .24s ease-in-out",
118
105
  cursor: "pointer"
119
106
  };
120
- var Dropzone = ({ sx, ...props }) => {
107
+ const Dropzone = ({ sx, ...props }) => {
121
108
  const { getRootProps, getInputProps, isFocused, isDragAccept, isDragReject } = useDropzone(props);
122
109
  const { t } = useTranslation();
123
110
  const theme = useTheme();
@@ -127,44 +114,22 @@ var Dropzone = ({ sx, ...props }) => {
127
114
  ...isDragAccept ? { borderColor: theme.palette.success.main } : {},
128
115
  ...isDragReject ? { borderColor: theme.palette.error.main } : {}
129
116
  };
130
- return /* @__PURE__ */ jsxs2(Paper, { variant: "outlined", ...getRootProps({ style }), sx, children: [
131
- /* @__PURE__ */ jsx3("input", { ...getInputProps(), style: { display: "none" } }),
132
- /* @__PURE__ */ jsx3(CloudUpload, {}),
133
- /* @__PURE__ */ jsx3(Typography2, { children: t("Layout.File.DragSomeFilesHereOrClickToSelectThem") })
117
+ return /* @__PURE__ */ jsxs(Paper, { variant: "outlined", ...getRootProps({ style }), sx, children: [
118
+ /* @__PURE__ */ jsx("input", { ...getInputProps(), style: { display: "none" } }),
119
+ /* @__PURE__ */ jsx(CloudUpload, {}),
120
+ /* @__PURE__ */ jsx(Typography, { children: t("Layout.File.DragSomeFilesHereOrClickToSelectThem") })
134
121
  ] });
135
122
  };
136
-
137
- // src/components/file/FileViewer.tsx
138
- import { useState as useState4 } from "react";
139
-
140
- // src/components/file/fileViewer/FileViewerGrid.tsx
141
- import MoreVert from "@mui/icons-material/MoreVert";
142
- import { Box as Box2, IconButton, ImageListItem, ImageListItemBar, Stack as Stack2, Tooltip } from "@mui/material";
143
- import { grey } from "@mui/material/colors";
144
- import { Fragment, useEffect as useEffect2, useState as useState2 } from "react";
145
- import { useInView } from "react-intersection-observer";
146
-
147
- // src/components/file/fileViewer/common/ActionsMenu.tsx
148
- import Delete from "@mui/icons-material/Delete";
149
- import FileDownload from "@mui/icons-material/FileDownload";
150
- import { List, ListItemButton, ListItemIcon, ListItemText, Menu } from "@mui/material";
151
- import { useTranslation as useTranslation2 } from "react-i18next";
152
-
153
- // src/contexts/FileContext.ts
154
- import { createContext, useContext } from "react";
155
- var FileContext = createContext(null);
156
- var useFile = () => {
123
+ const FileContext = createContext(null);
124
+ const useFile = () => {
157
125
  const context = useContext(FileContext);
158
126
  if (!context) {
159
127
  throw new Error("FileViewer components must be used within FileViewer");
160
128
  }
161
129
  return context;
162
130
  };
163
-
164
- // src/components/file/fileViewer/common/ActionsMenu.tsx
165
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
166
- var ActionsMenu = ({ meta, menu, setMenu }) => {
167
- const { t } = useTranslation2();
131
+ const ActionsMenu = ({ meta, menu, setMenu }) => {
132
+ const { t } = useTranslation();
168
133
  const { fileMetas, onDelete, actions } = useFile();
169
134
  const { confirm } = useDialogs();
170
135
  const handleMenuClose = () => {
@@ -186,7 +151,7 @@ var ActionsMenu = ({ meta, menu, setMenu }) => {
186
151
  onDelete({ remainingFileMetas, deletedFileMeta: meta });
187
152
  }
188
153
  };
189
- return /* @__PURE__ */ jsx4(
154
+ return /* @__PURE__ */ jsx(
190
155
  Menu,
191
156
  {
192
157
  open: menu !== null,
@@ -194,26 +159,23 @@ var ActionsMenu = ({ meta, menu, setMenu }) => {
194
159
  anchorReference: "anchorPosition",
195
160
  variant: "menu",
196
161
  anchorPosition: menu === null ? void 0 : { top: menu.mouseY, left: menu.mouseX },
197
- children: /* @__PURE__ */ jsxs3(List, { disablePadding: true, children: [
198
- actions?.download !== false && /* @__PURE__ */ jsxs3(ListItemButton, { onClick: handleOnDownload, disabled: isDownloading, children: [
199
- /* @__PURE__ */ jsx4(ListItemIcon, { children: /* @__PURE__ */ jsx4(FileDownload, {}) }),
200
- /* @__PURE__ */ jsx4(ListItemText, { children: t("Layout.File.Download") })
162
+ children: /* @__PURE__ */ jsxs(List, { disablePadding: true, children: [
163
+ actions?.download !== false && /* @__PURE__ */ jsxs(ListItemButton, { onClick: handleOnDownload, disabled: isDownloading, children: [
164
+ /* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(FileDownload, {}) }),
165
+ /* @__PURE__ */ jsx(ListItemText, { children: t("Layout.File.Download") })
201
166
  ] }),
202
- actions?.delete !== false && /* @__PURE__ */ jsxs3(ListItemButton, { onClick: handleOnDelete, disabled: isDeleting, children: [
203
- /* @__PURE__ */ jsx4(ListItemIcon, { children: /* @__PURE__ */ jsx4(Delete, {}) }),
204
- /* @__PURE__ */ jsx4(ListItemText, { children: t("Layout.File.Delete") })
167
+ actions?.delete !== false && /* @__PURE__ */ jsxs(ListItemButton, { onClick: handleOnDelete, disabled: isDeleting, children: [
168
+ /* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(Delete, {}) }),
169
+ /* @__PURE__ */ jsx(ListItemText, { children: t("Layout.File.Delete") })
205
170
  ] })
206
171
  ] })
207
172
  }
208
173
  );
209
174
  };
210
-
211
- // src/components/file/fileViewer/FileViewerGrid.tsx
212
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
213
- var IMAGE_SIZE = 150;
214
- var FileViewerGrid = ({ sx, size, itemBar }) => {
175
+ const IMAGE_SIZE = 150;
176
+ const FileViewerGrid = ({ sx, size, itemBar }) => {
215
177
  const { fileMetas } = useFile();
216
- return /* @__PURE__ */ jsx5(Stack2, { direction: "row", spacing: 1, sx: { overflow: "auto", ...sx }, children: fileMetas.map((fileMeta) => /* @__PURE__ */ jsx5(
178
+ return /* @__PURE__ */ jsx(Stack, { direction: "row", spacing: 1, sx: { overflow: "auto", ...sx }, children: fileMetas.map((fileMeta) => /* @__PURE__ */ jsx(
217
179
  GridFileViewerItem,
218
180
  {
219
181
  meta: fileMeta,
@@ -223,12 +185,12 @@ var FileViewerGrid = ({ sx, size, itemBar }) => {
223
185
  fileMeta.id
224
186
  )) });
225
187
  };
226
- var GridFileViewerItem = ({ meta, size, itemBar }) => {
188
+ const GridFileViewerItem = ({ meta, size, itemBar }) => {
227
189
  const { setImageId, actions } = useFile();
228
- const [showItemBar, setShowItemBar] = useState2(itemBar === "always");
229
- const [menu, setMenu] = useState2(null);
190
+ const [showItemBar, setShowItemBar] = useState(itemBar === "always");
191
+ const [menu, setMenu] = useState(null);
230
192
  const { ref, inView } = useInView();
231
- useEffect2(() => {
193
+ useEffect(() => {
232
194
  setShowItemBar(itemBar === "always");
233
195
  }, [itemBar]);
234
196
  const { data: source } = useGetFileThumbnail({ meta }, { enabled: inView });
@@ -256,10 +218,10 @@ var GridFileViewerItem = ({ meta, size, itemBar }) => {
256
218
  }
257
219
  }
258
220
  };
259
- return /* @__PURE__ */ jsxs4(Fragment, { children: [
260
- /* @__PURE__ */ jsxs4(ImageListItem, { sx: { width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }, onMouseEnter: handleOnMouseEnter, onMouseLeave: handleOnMouseLeave, ref, children: [
261
- /* @__PURE__ */ jsx5(
262
- Box2,
221
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
222
+ /* @__PURE__ */ jsxs(ImageListItem, { sx: { width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }, onMouseEnter: handleOnMouseEnter, onMouseLeave: handleOnMouseLeave, ref, children: [
223
+ /* @__PURE__ */ jsx(
224
+ Box,
263
225
  {
264
226
  component: "img",
265
227
  src: source,
@@ -269,30 +231,21 @@ var GridFileViewerItem = ({ meta, size, itemBar }) => {
269
231
  sx: { cursor: "pointer", objectFit: "contain", width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }
270
232
  }
271
233
  ),
272
- itemBar !== "hidden" && showItemBar && /* @__PURE__ */ jsx5(
234
+ itemBar !== "hidden" && showItemBar && /* @__PURE__ */ jsx(
273
235
  ImageListItemBar,
274
236
  {
275
- title: /* @__PURE__ */ jsx5(Tooltip, { title: meta.fileName, children: /* @__PURE__ */ jsx5(Box2, { children: meta.fileName }) }),
276
- actionIcon: (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx5(IconButton, { sx: { color: grey[100] }, onClick: openMenu, children: /* @__PURE__ */ jsx5(MoreVert, {}) })
237
+ title: /* @__PURE__ */ jsx(Tooltip, { title: meta.fileName, children: /* @__PURE__ */ jsx(Box, { children: meta.fileName }) }),
238
+ actionIcon: (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx(IconButton, { sx: { color: grey[100] }, onClick: openMenu, children: /* @__PURE__ */ jsx(MoreVert, {}) })
277
239
  }
278
240
  )
279
241
  ] }),
280
- (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx5(ActionsMenu, { meta, menu, setMenu })
242
+ (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx(ActionsMenu, { meta, menu, setMenu })
281
243
  ] });
282
244
  };
283
-
284
- // src/components/file/fileViewer/FileViewerList.tsx
285
- import AttachFile from "@mui/icons-material/AttachFile";
286
- import Image from "@mui/icons-material/Image";
287
- import MoreVert2 from "@mui/icons-material/MoreVert";
288
- import SmartDisplay from "@mui/icons-material/SmartDisplay";
289
- import { IconButton as IconButton2, List as List2, ListItemButton as ListItemButton2, ListItemIcon as ListItemIcon2, ListItemText as ListItemText2 } from "@mui/material";
290
- import { Fragment as Fragment2, useState as useState3 } from "react";
291
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
292
- var FileViewerList = ({ sx }) => {
245
+ const FileViewerList = ({ sx }) => {
293
246
  const { fileMetas } = useFile();
294
- return /* @__PURE__ */ jsx6(List2, { dense: true, sx, children: fileMetas.map(
295
- (fileMeta) => /* @__PURE__ */ jsx6(
247
+ return /* @__PURE__ */ jsx(List, { dense: true, sx, children: fileMetas.map(
248
+ (fileMeta) => /* @__PURE__ */ jsx(
296
249
  ListFileViewerItem,
297
250
  {
298
251
  meta: fileMeta
@@ -301,9 +254,9 @@ var FileViewerList = ({ sx }) => {
301
254
  )
302
255
  ) });
303
256
  };
304
- var ListFileViewerItem = ({ meta }) => {
257
+ const ListFileViewerItem = ({ meta }) => {
305
258
  const { setImageId, actions } = useFile();
306
- const [menu, setMenu] = useState3(null);
259
+ const [menu, setMenu] = useState(null);
307
260
  const openMenu = (event) => {
308
261
  event.stopPropagation();
309
262
  setMenu(menu === null ? { mouseX: event.clientX, mouseY: event.clientY } : null);
@@ -329,36 +282,30 @@ var ListFileViewerItem = ({ meta }) => {
329
282
  const icon = () => {
330
283
  switch (meta.mediaType) {
331
284
  case "image": {
332
- return /* @__PURE__ */ jsx6(Image, {});
285
+ return /* @__PURE__ */ jsx(Image, {});
333
286
  }
334
287
  case "video": {
335
- return /* @__PURE__ */ jsx6(SmartDisplay, {});
288
+ return /* @__PURE__ */ jsx(SmartDisplay, {});
336
289
  }
337
290
  default: {
338
- return /* @__PURE__ */ jsx6(AttachFile, {});
291
+ return /* @__PURE__ */ jsx(AttachFile, {});
339
292
  }
340
293
  }
341
294
  };
342
- return /* @__PURE__ */ jsxs5(Fragment2, { children: [
343
- /* @__PURE__ */ jsxs5(ListItemButton2, { onClick, children: [
344
- /* @__PURE__ */ jsx6(ListItemIcon2, { children: icon() }),
345
- /* @__PURE__ */ jsx6(ListItemText2, { primary: `${meta.fileName}.${meta.fileExtension}` }),
346
- (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx6(IconButton2, { edge: "end", onClick: openMenu, children: /* @__PURE__ */ jsx6(MoreVert2, {}) })
295
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
296
+ /* @__PURE__ */ jsxs(ListItemButton, { onClick, children: [
297
+ /* @__PURE__ */ jsx(ListItemIcon, { children: icon() }),
298
+ /* @__PURE__ */ jsx(ListItemText, { primary: `${meta.fileName}.${meta.fileExtension}` }),
299
+ (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx(IconButton, { edge: "end", onClick: openMenu, children: /* @__PURE__ */ jsx(MoreVert, {}) })
347
300
  ] }, meta.id),
348
- (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx6(ActionsMenu, { meta, menu, setMenu })
301
+ (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx(ActionsMenu, { meta, menu, setMenu })
349
302
  ] });
350
303
  };
351
-
352
- // src/components/file/fileViewer/ImageViewer.tsx
353
- import Close from "@mui/icons-material/Close";
354
- import { Box as Box3, Dialog, Fab } from "@mui/material";
355
- import { useEffect as useEffect3 } from "react";
356
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
357
- var ImageViewer = ({ metaId }) => {
304
+ const ImageViewer = ({ metaId }) => {
358
305
  const { fileMetas, setImageId } = useFile();
359
306
  const meta = fileMetas.find((m) => m.id === metaId);
360
307
  const { data: source } = useGetFile({ meta });
361
- useEffect3(() => {
308
+ useEffect(() => {
362
309
  if (metaId)
363
310
  globalThis.addEventListener("keydown", handleOnKeydown);
364
311
  return () => {
@@ -396,137 +343,87 @@ var ImageViewer = ({ metaId }) => {
396
343
  };
397
344
  const onClose = () => setImageId("");
398
345
  if (!metaId) return null;
399
- return /* @__PURE__ */ jsxs6(Dialog, { open: true, onClose, maxWidth: "xl", children: [
400
- /* @__PURE__ */ jsx7(Box3, { component: "img", src: source, alt: metaId, sx: { maxWidth: "100vw", maxHeight: { xs: "calc(100vh - 56px)", sm: "calc(100vh - 64px)" } } }),
401
- /* @__PURE__ */ jsx7(Fab, { size: "medium", onClick: onClose, sx: { position: "fixed", top: 8, right: 8 }, children: /* @__PURE__ */ jsx7(Close, {}) })
346
+ return /* @__PURE__ */ jsxs(Dialog, { open: true, onClose, maxWidth: "xl", children: [
347
+ /* @__PURE__ */ jsx(Box, { component: "img", src: source, alt: metaId, sx: { maxWidth: "100vw", maxHeight: { xs: "calc(100vh - 56px)", sm: "calc(100vh - 64px)" } } }),
348
+ /* @__PURE__ */ jsx(Fab, { size: "medium", onClick: onClose, sx: { position: "fixed", top: 8, right: 8 }, children: /* @__PURE__ */ jsx(Close, {}) })
402
349
  ] });
403
350
  };
404
-
405
- // src/components/file/FileViewer.tsx
406
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
407
- var FileViewer = ({ subId, onDelete, actions, children }) => {
351
+ const FileViewer = ({ subId, onDelete, actions, children }) => {
408
352
  const { data: fileMetas = [] } = useGetFileMetas({ subId }, { enabled: !!subId });
409
- const [imageId, setImageId] = useState4("");
353
+ const [imageId, setImageId] = useState("");
410
354
  const components = { Grid: FileViewerGrid, List: FileViewerList };
411
355
  if (fileMetas.length === 0) return null;
412
- return /* @__PURE__ */ jsxs7(FileContext.Provider, { value: { fileMetas, onDelete, actions, setImageId }, children: [
356
+ return /* @__PURE__ */ jsxs(FileContext.Provider, { value: { fileMetas, onDelete, actions, setImageId }, children: [
413
357
  children(components),
414
- /* @__PURE__ */ jsx8(ImageViewer, { metaId: imageId })
358
+ /* @__PURE__ */ jsx(ImageViewer, { metaId: imageId })
415
359
  ] });
416
360
  };
417
-
418
- // src/components/data-grid/ChipInputCell.tsx
419
- import { Chip, Stack as Stack3 } from "@mui/material";
420
- import { jsx as jsx9 } from "react/jsx-runtime";
421
- var isArray = (value) => Array.isArray(value);
422
- var ChipInputCell = ({ params, slotProps, getLabel }) => {
361
+ const isArray = (value) => Array.isArray(value);
362
+ const ChipInputCell = ({ params, slotProps, getLabel }) => {
423
363
  if (!params.value) return null;
424
364
  const getLabelValue = (value) => {
425
365
  if (getLabel) return getLabel(value);
426
366
  return value;
427
367
  };
428
368
  if (isArray(params.value))
429
- return /* @__PURE__ */ jsx9(Stack3, { direction: "row", alignItems: "center", gap: 1, sx: { overflowX: "auto", height: "100%", width: params.colDef.computedWidth }, children: params.value.map(
430
- (value, index) => /* @__PURE__ */ jsx9(Chip, { label: getLabelValue(value), ...slotProps }, `${index + 1}-chip-input-cell`)
369
+ return /* @__PURE__ */ jsx(Stack, { direction: "row", alignItems: "center", gap: 1, sx: { overflowX: "auto", height: "100%", width: params.colDef.computedWidth }, children: params.value.map(
370
+ (value, index) => /* @__PURE__ */ jsx(Chip, { label: getLabelValue(value), ...slotProps }, `${index + 1}-chip-input-cell`)
431
371
  ) });
432
- return /* @__PURE__ */ jsx9(Chip, { label: getLabelValue(params.value), ...slotProps });
372
+ return /* @__PURE__ */ jsx(Chip, { label: getLabelValue(params.value), ...slotProps });
433
373
  };
434
-
435
- // src/components/data-grid/EditableColumnHeader.tsx
436
- import Edit from "@mui/icons-material/Edit";
437
- import { jsx as jsx10 } from "react/jsx-runtime";
438
- var EditableColumnHeader = ({ colDef }) => {
439
- return /* @__PURE__ */ jsx10(TypographyWithIcon, { endIcon: /* @__PURE__ */ jsx10(Edit, { color: "disabled", fontSize: "small" }), variant: "body2", className: "MuiDataGrid-columnHeaderTitle", children: colDef.headerName });
374
+ const EditableColumnHeader = ({ colDef }) => {
375
+ return /* @__PURE__ */ jsx(TypographyWithIcon, { endIcon: /* @__PURE__ */ jsx(Edit, { color: "disabled", fontSize: "small" }), variant: "body2", className: "MuiDataGrid-columnHeaderTitle", children: colDef.headerName });
440
376
  };
441
-
442
- // src/components/router/RouterButton.tsx
443
- import { Button } from "@mui/material";
444
- import { createLink } from "@tanstack/react-router";
445
- import React3 from "react";
446
- import { jsx as jsx11 } from "react/jsx-runtime";
447
- var Component = React3.forwardRef(function ButtonComponent(props, reference) {
448
- return /* @__PURE__ */ jsx11(Button, { ref: reference, component: "a", ...props });
377
+ const Component$4 = React.forwardRef(function ButtonComponent(props, reference) {
378
+ return /* @__PURE__ */ jsx(Button, { ref: reference, component: "a", ...props });
449
379
  });
450
- var CreatedComponent = createLink(Component);
451
- var RouterButton = (props) => {
452
- return /* @__PURE__ */ jsx11(CreatedComponent, { ...props });
380
+ const CreatedComponent$4 = createLink(Component$4);
381
+ const RouterButton = (props) => {
382
+ return /* @__PURE__ */ jsx(CreatedComponent$4, { ...props });
453
383
  };
454
-
455
- // src/components/router/RouterGridActionsCellItem.tsx
456
- import { GridActionsCellItem } from "@mui/x-data-grid-premium";
457
- import { createLink as createLink2 } from "@tanstack/react-router";
458
- import React4 from "react";
459
- import { jsx as jsx12 } from "react/jsx-runtime";
460
- var Component2 = React4.forwardRef(
384
+ const Component$3 = React.forwardRef(
461
385
  function GridActionsCellItemComponent(props, reference) {
462
- return /* @__PURE__ */ jsx12(GridActionsCellItem, { ref: reference, component: "a", ...props });
386
+ return /* @__PURE__ */ jsx(GridActionsCellItem, { ref: reference, component: "a", ...props });
463
387
  }
464
388
  );
465
- var CreatedComponent2 = createLink2(Component2);
466
- var RouterGridActionsCellItem = (props) => {
467
- return /* @__PURE__ */ jsx12(CreatedComponent2, { ...props });
389
+ const CreatedComponent$3 = createLink(Component$3);
390
+ const RouterGridActionsCellItem = (props) => {
391
+ return /* @__PURE__ */ jsx(CreatedComponent$3, { ...props });
468
392
  };
469
-
470
- // src/components/router/RouterIconButton.tsx
471
- import { IconButton as IconButton3 } from "@mui/material";
472
- import { createLink as createLink3 } from "@tanstack/react-router";
473
- import React5 from "react";
474
- import { jsx as jsx13 } from "react/jsx-runtime";
475
- var Component3 = React5.forwardRef(function IconButtonComponent(props, reference) {
476
- return /* @__PURE__ */ jsx13(IconButton3, { ref: reference, component: "a", ...props });
393
+ const Component$2 = React.forwardRef(function IconButtonComponent(props, reference) {
394
+ return /* @__PURE__ */ jsx(IconButton, { ref: reference, component: "a", ...props });
477
395
  });
478
- var CreatedComponent3 = createLink3(Component3);
479
- var RouterIconButton = (props) => {
480
- return /* @__PURE__ */ jsx13(CreatedComponent3, { ...props });
396
+ const CreatedComponent$2 = createLink(Component$2);
397
+ const RouterIconButton = (props) => {
398
+ return /* @__PURE__ */ jsx(CreatedComponent$2, { ...props });
481
399
  };
482
-
483
- // src/components/router/RouterLink.tsx
484
- import { Link } from "@mui/material";
485
- import { createLink as createLink4 } from "@tanstack/react-router";
486
- import React6 from "react";
487
- import { jsx as jsx14 } from "react/jsx-runtime";
488
- var Component4 = React6.forwardRef(function LinkComponent(props, reference) {
489
- return /* @__PURE__ */ jsx14(Link, { ref: reference, ...props });
400
+ const Component$1 = React.forwardRef(function LinkComponent(props, reference) {
401
+ return /* @__PURE__ */ jsx(Link, { ref: reference, ...props });
490
402
  });
491
- var CreatedComponent4 = createLink4(Component4);
492
- var RouterLink = (props) => {
493
- return /* @__PURE__ */ jsx14(CreatedComponent4, { ...props });
403
+ const CreatedComponent$1 = createLink(Component$1);
404
+ const RouterLink = (props) => {
405
+ return /* @__PURE__ */ jsx(CreatedComponent$1, { ...props });
494
406
  };
495
-
496
- // src/components/router/RouterTab.tsx
497
- import { Tab } from "@mui/material";
498
- import { createLink as createLink5 } from "@tanstack/react-router";
499
- import React7 from "react";
500
- import { jsx as jsx15 } from "react/jsx-runtime";
501
- var Component5 = React7.forwardRef(function TabComponent(props, reference) {
502
- return /* @__PURE__ */ jsx15(Tab, { ref: reference, component: "a", ...props });
407
+ const Component = React.forwardRef(function TabComponent(props, reference) {
408
+ return /* @__PURE__ */ jsx(Tab, { ref: reference, component: "a", ...props });
503
409
  });
504
- var CreatedComponent5 = createLink5(Component5);
505
- var RouterTab = (props) => {
506
- return /* @__PURE__ */ jsx15(CreatedComponent5, { ...props });
410
+ const CreatedComponent = createLink(Component);
411
+ const RouterTab = (props) => {
412
+ return /* @__PURE__ */ jsx(CreatedComponent, { ...props });
507
413
  };
508
-
509
- // src/components/router/RouterNotFound.tsx
510
- import { Box as Box4, Divider, Typography as Typography3 } from "@mui/material";
511
- import { useTranslation as useTranslation3 } from "react-i18next";
512
- import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
513
414
  function RouterNotFound() {
514
- const { t } = useTranslation3();
515
- return /* @__PURE__ */ jsx16(Box4, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxs8(Box4, { display: "flex", alignItems: "center", mb: 4, children: [
516
- /* @__PURE__ */ jsx16(Typography3, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "404" }),
517
- /* @__PURE__ */ jsx16(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
518
- /* @__PURE__ */ jsx16(Typography3, { variant: "h5", component: "span", children: t("Layout.ThisPageCouldNotBeFound") })
415
+ const { t } = useTranslation();
416
+ return /* @__PURE__ */ jsx(Box, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", mb: 4, children: [
417
+ /* @__PURE__ */ jsx(Typography, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "404" }),
418
+ /* @__PURE__ */ jsx(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
419
+ /* @__PURE__ */ jsx(Typography, { variant: "h5", component: "span", children: t("Layout.ThisPageCouldNotBeFound") })
519
420
  ] }) });
520
421
  }
521
-
522
- // src/components/router/RouterError.tsx
523
- import { Box as Box5, Divider as Divider2, Typography as Typography4 } from "@mui/material";
524
- import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
525
- var RouterError = ({ error }) => {
526
- return /* @__PURE__ */ jsx17(Box5, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxs9(Box5, { display: "flex", alignItems: "center", mb: 4, children: [
527
- /* @__PURE__ */ jsx17(Typography4, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: error.name || "500" }),
528
- /* @__PURE__ */ jsx17(Divider2, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
529
- /* @__PURE__ */ jsx17(Typography4, { variant: "h5", component: "span", children: error.message })
422
+ const RouterError = ({ error }) => {
423
+ return /* @__PURE__ */ jsx(Box, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", mb: 4, children: [
424
+ /* @__PURE__ */ jsx(Typography, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: error.name || "500" }),
425
+ /* @__PURE__ */ jsx(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
426
+ /* @__PURE__ */ jsx(Typography, { variant: "h5", component: "span", children: error.message })
530
427
  ] }) });
531
428
  };
532
429
  export {
@@ -540,9 +437,9 @@ export {
540
437
  RouterGridActionsCellItem,
541
438
  RouterIconButton,
542
439
  RouterLink,
543
- RouterListItemButton,
440
+ R as RouterListItemButton,
544
441
  RouterNotFound,
545
442
  RouterTab,
546
443
  TypographyWithIcon
547
444
  };
548
- //# sourceMappingURL=components.js.map
445
+ //# sourceMappingURL=components.js.map