wcz-test 6.7.6 → 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.
- package/dist/ApprovalStatus-C9HPyMiS.js +24 -0
- package/dist/ApprovalStatus-C9HPyMiS.js.map +1 -0
- package/dist/{chunk-4UULRYGW.js → DialogsHooks-BlUsVlfv.js} +7 -14
- package/dist/DialogsHooks-BlUsVlfv.js.map +1 -0
- package/dist/{chunk-MIVD2XWB.js → FileHooks-hWKTwLCr.js} +36 -46
- package/dist/FileHooks-hWKTwLCr.js.map +1 -0
- package/dist/{chunk-TME53DAF.js → FileMeta-G1oT3mYK.js} +3 -5
- package/dist/FileMeta-G1oT3mYK.js.map +1 -0
- package/dist/{chunk-ZMWQQXZT.js → RouterListItemButton-Cx7rXEfm.js} +6 -8
- package/dist/RouterListItemButton-Cx7rXEfm.js.map +1 -0
- package/dist/android-chrome-192x192.png +0 -0
- package/dist/android-chrome-512x512.png +0 -0
- package/dist/apple-touch-icon.png +0 -0
- package/dist/auth-client-D9snEe6B.js +79 -0
- package/dist/auth-client-D9snEe6B.js.map +1 -0
- package/dist/client-utils.d.ts +3 -702
- package/dist/client-utils.js +7 -17
- package/dist/client-utils.js.map +1 -1
- package/dist/components/core/AppTitle.d.ts +2 -0
- package/dist/components/core/Fullscreen.d.ts +3 -0
- package/dist/components/core/Layout.d.ts +8 -0
- package/dist/components/core/ToolbarAccount.d.ts +2 -0
- package/dist/components/core/TypographyWithIcon.d.ts +7 -0
- package/dist/components/core/navigation/NavigationList.d.ts +22 -0
- package/dist/components/core/navigation/NavigationListItem.d.ts +16 -0
- package/dist/components/core/navigation/NavigationRail.d.ts +12 -0
- package/dist/components/data-grid/ChipInputCell.d.ts +9 -0
- package/dist/components/data-grid/EditableColumnHeader.d.ts +2 -0
- package/dist/components/file/Dropzone.d.ts +8 -0
- package/dist/components/file/FileViewer.d.ts +20 -0
- package/dist/components/file/fileViewer/FileViewerGrid.d.ts +17 -0
- package/dist/components/file/fileViewer/FileViewerList.d.ts +12 -0
- package/dist/components/file/fileViewer/ImageViewer.d.ts +6 -0
- package/dist/components/file/fileViewer/common/ActionsMenu.d.ts +15 -0
- package/dist/components/form/FormAutocomplete.d.ts +7 -0
- package/dist/components/form/FormCheckbox.d.ts +7 -0
- package/dist/components/form/FormDatePicker.d.ts +8 -0
- package/dist/components/form/FormDateRangePicker.d.ts +8 -0
- package/dist/components/form/FormDateTimePicker.d.ts +8 -0
- package/dist/components/form/FormDateTimeRangePicker.d.ts +8 -0
- package/dist/components/form/FormNumberField.d.ts +9 -0
- package/dist/components/form/FormRadioGroup.d.ts +13 -0
- package/dist/components/form/FormSlider.d.ts +7 -0
- package/dist/components/form/FormSubmitButton.d.ts +4 -0
- package/dist/components/form/FormSwitch.d.ts +7 -0
- package/dist/components/form/FormTextField.d.ts +7 -0
- package/dist/components/form/FormTimePicker.d.ts +8 -0
- package/dist/components/form/FormTimeRangePicker.d.ts +8 -0
- package/dist/components/router/RouterButton.d.ts +6 -0
- package/dist/components/router/RouterError.d.ts +7 -0
- package/dist/components/router/RouterGridActionsCellItem.d.ts +6 -0
- package/dist/components/router/RouterIconButton.d.ts +6 -0
- package/dist/components/router/RouterLink.d.ts +6 -0
- package/dist/components/router/RouterListItemButton.d.ts +6 -0
- package/dist/components/router/RouterNotFound.d.ts +1 -0
- package/dist/components/router/RouterTab.d.ts +6 -0
- package/dist/components.d.ts +14 -89
- package/dist/components.js +124 -227
- package/dist/components.js.map +1 -1
- package/dist/contexts/DialogsContext.d.ts +6 -0
- package/dist/contexts/FileContext.d.ts +13 -0
- package/dist/env-CoxTjaDr.js +27 -0
- package/dist/env-CoxTjaDr.js.map +1 -0
- package/dist/env.d.ts +10 -0
- package/dist/favicon-16x16.png +0 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/favicon.png +0 -0
- package/dist/hooks/DialogsHooks.d.ts +42 -0
- package/dist/hooks/FormHooks.d.ts +52 -0
- package/dist/hooks/ThemeHook.d.ts +4 -0
- package/dist/hooks.d.ts +3 -159
- package/dist/hooks.js +56 -121
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +3 -36
- package/dist/index.js +173 -1882
- package/dist/index.js.map +1 -1
- package/dist/lib/auth/auth-client.d.ts +688 -0
- package/dist/lib/auth/auth.d.ts +24 -0
- package/dist/lib/db/index.d.ts +4 -0
- package/dist/lib/db/schemas/auth.d.ts +606 -0
- package/dist/{utils-ChipkRJ9.d.ts → lib/utils.d.ts} +11 -10
- package/dist/lib/vite-plugin.d.ts +2 -0
- package/dist/manifest.webmanifest +18 -0
- package/dist/models/Navigation.d.ts +18 -0
- package/dist/models/User.d.ts +8 -0
- package/dist/models/approval/Approval.d.ts +177 -0
- package/dist/models/approval/ApprovalEmployee.d.ts +7 -0
- package/dist/models/approval/ApprovalFlow.d.ts +49 -0
- package/dist/models/approval/ApprovalFlowStep.d.ts +29 -0
- package/dist/models/approval/ApprovalRequestType.d.ts +5 -0
- package/dist/models/approval/ApprovalStatus.d.ts +9 -0
- package/dist/models/approval/ApprovalStepResult.d.ts +11 -0
- package/dist/models/approval/StepApprovalOrder.d.ts +6 -0
- package/dist/models/email/Email.d.ts +13 -0
- package/dist/models/email/EmailAttachment.d.ts +6 -0
- package/dist/models/file/FileActions.d.ts +6 -0
- package/dist/{FileMeta-CC014fnB.d.ts → models/file/FileMeta.d.ts} +3 -6
- package/dist/models/peoplesoft/Department.d.ts +58 -0
- package/dist/models/peoplesoft/Employee.d.ts +46 -0
- package/dist/models/peoplesoft/EmployeeCategoryGroup.d.ts +6 -0
- package/dist/models/peoplesoft/EmployeeStatus.d.ts +6 -0
- package/dist/models.d.ts +25 -161
- package/dist/models.js +109 -160
- package/dist/models.js.map +1 -1
- package/dist/providers/DialogsProvider.d.ts +6 -0
- package/dist/providers/LayoutProvider.d.ts +11 -0
- package/dist/queries/Approval.d.ts +585 -0
- package/dist/queries/ApprovalHooks.d.ts +315 -0
- package/dist/queries/FileHooks.d.ts +151 -0
- package/dist/queries/PeopleSoftHooks.d.ts +537 -0
- package/dist/queries.d.ts +4 -1585
- package/dist/queries.js +59 -86
- package/dist/queries.js.map +1 -1
- package/dist/robots.txt +3 -0
- package/dist/server-utils.d.ts +2 -35
- package/dist/server-utils.js +13 -26
- package/dist/server-utils.js.map +1 -1
- package/dist/{chunk-2ROTNT7W.js → utils-DKyKGba7.js} +13 -18
- package/dist/utils-DKyKGba7.js.map +1 -0
- package/dist/utils.d.ts +1 -2
- package/dist/utils.js +3 -9
- package/dist/utils.js.map +1 -1
- package/dist/vite.d.ts +1 -5
- package/dist/vite.js +3 -6
- package/dist/vite.js.map +1 -1
- package/package.json +5 -4
- package/dist/Approval-CWQn-kah.d.ts +0 -284
- package/dist/chunk-2ROTNT7W.js.map +0 -1
- package/dist/chunk-4FRZRIAO.js +0 -29
- package/dist/chunk-4FRZRIAO.js.map +0 -1
- package/dist/chunk-4UULRYGW.js.map +0 -1
- package/dist/chunk-5WRI5ZAA.js +0 -31
- package/dist/chunk-5WRI5ZAA.js.map +0 -1
- package/dist/chunk-CNDRHYQK.js +0 -883
- package/dist/chunk-CNDRHYQK.js.map +0 -1
- package/dist/chunk-DXXZZHAK.js +0 -28
- package/dist/chunk-DXXZZHAK.js.map +0 -1
- package/dist/chunk-MIVD2XWB.js.map +0 -1
- package/dist/chunk-TME53DAF.js.map +0 -1
- package/dist/chunk-ZMWQQXZT.js.map +0 -1
package/dist/components.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
} from "
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import "
|
|
16
|
-
import "
|
|
17
|
-
import "
|
|
18
|
-
import "
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
import {
|
|
22
|
-
|
|
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__ */
|
|
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
|
-
|
|
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__ */
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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
|
-
|
|
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__ */
|
|
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__ */
|
|
198
|
-
actions?.download !== false && /* @__PURE__ */
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
/* @__PURE__ */
|
|
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__ */
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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__ */
|
|
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
|
-
|
|
188
|
+
const GridFileViewerItem = ({ meta, size, itemBar }) => {
|
|
227
189
|
const { setImageId, actions } = useFile();
|
|
228
|
-
const [showItemBar, setShowItemBar] =
|
|
229
|
-
const [menu, setMenu] =
|
|
190
|
+
const [showItemBar, setShowItemBar] = useState(itemBar === "always");
|
|
191
|
+
const [menu, setMenu] = useState(null);
|
|
230
192
|
const { ref, inView } = useInView();
|
|
231
|
-
|
|
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__ */
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
|
|
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__ */
|
|
234
|
+
itemBar !== "hidden" && showItemBar && /* @__PURE__ */ jsx(
|
|
273
235
|
ImageListItemBar,
|
|
274
236
|
{
|
|
275
|
-
title: /* @__PURE__ */
|
|
276
|
-
actionIcon: (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
295
|
-
(fileMeta) => /* @__PURE__ */
|
|
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
|
-
|
|
257
|
+
const ListFileViewerItem = ({ meta }) => {
|
|
305
258
|
const { setImageId, actions } = useFile();
|
|
306
|
-
const [menu, setMenu] =
|
|
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__ */
|
|
285
|
+
return /* @__PURE__ */ jsx(Image, {});
|
|
333
286
|
}
|
|
334
287
|
case "video": {
|
|
335
|
-
return /* @__PURE__ */
|
|
288
|
+
return /* @__PURE__ */ jsx(SmartDisplay, {});
|
|
336
289
|
}
|
|
337
290
|
default: {
|
|
338
|
-
return /* @__PURE__ */
|
|
291
|
+
return /* @__PURE__ */ jsx(AttachFile, {});
|
|
339
292
|
}
|
|
340
293
|
}
|
|
341
294
|
};
|
|
342
|
-
return /* @__PURE__ */
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
/* @__PURE__ */
|
|
345
|
-
/* @__PURE__ */
|
|
346
|
-
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */
|
|
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__ */
|
|
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
|
-
|
|
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__ */
|
|
400
|
-
/* @__PURE__ */
|
|
401
|
-
/* @__PURE__ */
|
|
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] =
|
|
353
|
+
const [imageId, setImageId] = useState("");
|
|
410
354
|
const components = { Grid: FileViewerGrid, List: FileViewerList };
|
|
411
355
|
if (fileMetas.length === 0) return null;
|
|
412
|
-
return /* @__PURE__ */
|
|
356
|
+
return /* @__PURE__ */ jsxs(FileContext.Provider, { value: { fileMetas, onDelete, actions, setImageId }, children: [
|
|
413
357
|
children(components),
|
|
414
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ jsx(ImageViewer, { metaId: imageId })
|
|
415
359
|
] });
|
|
416
360
|
};
|
|
417
|
-
|
|
418
|
-
|
|
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__ */
|
|
430
|
-
(value, index) => /* @__PURE__ */
|
|
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__ */
|
|
372
|
+
return /* @__PURE__ */ jsx(Chip, { label: getLabelValue(params.value), ...slotProps });
|
|
433
373
|
};
|
|
434
|
-
|
|
435
|
-
|
|
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
|
-
|
|
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
|
-
|
|
451
|
-
|
|
452
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
386
|
+
return /* @__PURE__ */ jsx(GridActionsCellItem, { ref: reference, component: "a", ...props });
|
|
463
387
|
}
|
|
464
388
|
);
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
return /* @__PURE__ */
|
|
389
|
+
const CreatedComponent$3 = createLink(Component$3);
|
|
390
|
+
const RouterGridActionsCellItem = (props) => {
|
|
391
|
+
return /* @__PURE__ */ jsx(CreatedComponent$3, { ...props });
|
|
468
392
|
};
|
|
469
|
-
|
|
470
|
-
|
|
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
|
-
|
|
479
|
-
|
|
480
|
-
return /* @__PURE__ */
|
|
396
|
+
const CreatedComponent$2 = createLink(Component$2);
|
|
397
|
+
const RouterIconButton = (props) => {
|
|
398
|
+
return /* @__PURE__ */ jsx(CreatedComponent$2, { ...props });
|
|
481
399
|
};
|
|
482
|
-
|
|
483
|
-
|
|
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
|
-
|
|
492
|
-
|
|
493
|
-
return /* @__PURE__ */
|
|
403
|
+
const CreatedComponent$1 = createLink(Component$1);
|
|
404
|
+
const RouterLink = (props) => {
|
|
405
|
+
return /* @__PURE__ */ jsx(CreatedComponent$1, { ...props });
|
|
494
406
|
};
|
|
495
|
-
|
|
496
|
-
|
|
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
|
-
|
|
505
|
-
|
|
506
|
-
return /* @__PURE__ */
|
|
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 } =
|
|
515
|
-
return /* @__PURE__ */
|
|
516
|
-
/* @__PURE__ */
|
|
517
|
-
/* @__PURE__ */
|
|
518
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
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
|