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/client.js
CHANGED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
import { ButtonProps } from '@mui/material';
|
|
3
|
+
import { ChipProps } from '@mui/material';
|
|
4
|
+
import { ComponentType } from 'react';
|
|
5
|
+
import { default as default_2 } from 'react';
|
|
6
|
+
import { DropzoneOptions } from 'react-dropzone';
|
|
7
|
+
import { ErrorComponentProps } from '@tanstack/react-router';
|
|
8
|
+
import { FC } from 'react';
|
|
9
|
+
import { GridActionsCellItemProps } from '@mui/x-data-grid-premium';
|
|
10
|
+
import { GridColumnHeaderParams } from '@mui/x-data-grid-premium';
|
|
11
|
+
import { GridRenderCellParams } from '@mui/x-data-grid-premium';
|
|
12
|
+
import { GridValidRowModel } from '@mui/x-data-grid-premium';
|
|
13
|
+
import { IconButtonProps } from '@mui/material';
|
|
14
|
+
import { JSX } from 'react/jsx-runtime';
|
|
15
|
+
import { LinkComponent } from '@tanstack/react-router';
|
|
16
|
+
import { LinkProps } from '@mui/material';
|
|
17
|
+
import { ListItemButtonProps } from '@mui/material';
|
|
18
|
+
import { ReactNode } from 'react';
|
|
19
|
+
import { SxProps } from '@mui/material';
|
|
20
|
+
import { TabProps } from '@mui/material';
|
|
21
|
+
import { Theme } from '@mui/material';
|
|
22
|
+
import { TypographyProps } from '@mui/material';
|
|
23
|
+
import * as z from 'zod';
|
|
24
|
+
|
|
25
|
+
export declare const ChipInputCell: <T extends GridValidRowModel>({ params, slotProps, getLabel }: ChipInputCellProps<T>) => JSX.Element | null;
|
|
26
|
+
|
|
27
|
+
declare interface ChipInputCellProps<T extends GridValidRowModel> {
|
|
28
|
+
params: GridRenderCellParams<T>;
|
|
29
|
+
slotProps?: ChipProps;
|
|
30
|
+
getLabel?: (object: T) => string | number;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare const Component: default_2.ForwardRefExoticComponent<Omit<ButtonProps<"a">, "ref"> & default_2.RefAttributes<HTMLAnchorElement>>;
|
|
34
|
+
|
|
35
|
+
declare const Component_2: default_2.ForwardRefExoticComponent<GridActionsCellItemProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
36
|
+
|
|
37
|
+
declare const Component_3: default_2.ForwardRefExoticComponent<Omit<IconButtonProps<"a">, "ref"> & default_2.RefAttributes<HTMLAnchorElement>>;
|
|
38
|
+
|
|
39
|
+
declare const Component_4: default_2.ForwardRefExoticComponent<Omit<LinkProps, "ref"> & default_2.RefAttributes<HTMLAnchorElement>>;
|
|
40
|
+
|
|
41
|
+
declare const Component_5: default_2.ForwardRefExoticComponent<Omit<TabProps<"a">, "ref"> & default_2.RefAttributes<HTMLAnchorElement>>;
|
|
42
|
+
|
|
43
|
+
declare const Component_6: default_2.ForwardRefExoticComponent<Omit<ListItemButtonProps<"a">, "ref"> & default_2.RefAttributes<HTMLAnchorElement>>;
|
|
44
|
+
|
|
45
|
+
export declare const Dropzone: FC<DropzoneProps>;
|
|
46
|
+
|
|
47
|
+
declare interface DropzoneProps extends DropzoneOptions {
|
|
48
|
+
sx?: SxProps<Theme>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export declare const EditableColumnHeader: <T extends GridValidRowModel>({ colDef }: GridColumnHeaderParams<T>) => JSX.Element;
|
|
52
|
+
|
|
53
|
+
declare type FileActions = z.infer<typeof FileActionsSchema>;
|
|
54
|
+
|
|
55
|
+
declare const FileActionsSchema: z.ZodObject<{
|
|
56
|
+
download: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
delete: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
|
|
60
|
+
declare type FileMeta = z.infer<typeof FileMetaSchema>;
|
|
61
|
+
|
|
62
|
+
declare const FileMetaSchema: z.ZodObject<{
|
|
63
|
+
id: z.ZodUUID;
|
|
64
|
+
subId: z.ZodUUID;
|
|
65
|
+
appName: z.ZodString;
|
|
66
|
+
fileName: z.ZodString;
|
|
67
|
+
fileExtension: z.ZodString;
|
|
68
|
+
fileSize: z.ZodNumber;
|
|
69
|
+
mediaSubType: z.ZodString;
|
|
70
|
+
mediaType: z.ZodString;
|
|
71
|
+
mimeType: z.ZodString;
|
|
72
|
+
createdBy: z.ZodString;
|
|
73
|
+
createdDate: z.ZodDate;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
|
|
76
|
+
export declare const FileViewer: FC<FileViewerProps>;
|
|
77
|
+
|
|
78
|
+
declare interface FileViewerComponent {
|
|
79
|
+
Grid: ComponentType<FileViewerGridProps>;
|
|
80
|
+
List: ComponentType<FileViewerListProps>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
declare type FileViewerGridItemBar = "hidden" | "always" | "onMouseEnter";
|
|
84
|
+
|
|
85
|
+
declare interface FileViewerGridProps {
|
|
86
|
+
size?: number;
|
|
87
|
+
itemBar?: FileViewerGridItemBar;
|
|
88
|
+
sx?: SxProps<Theme>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare interface FileViewerListProps {
|
|
92
|
+
sx?: SxProps<Theme>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
declare interface FileViewerProps {
|
|
96
|
+
subId: string;
|
|
97
|
+
onDelete?: (params: {
|
|
98
|
+
remainingFileMetas: Array<FileMeta>;
|
|
99
|
+
deletedFileMeta: FileMeta;
|
|
100
|
+
}) => void;
|
|
101
|
+
actions?: FileActions;
|
|
102
|
+
children: (component: FileViewerComponent) => ReactNode;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export declare const Fullscreen: FC<BoxProps>;
|
|
106
|
+
|
|
107
|
+
export declare const RouterButton: LinkComponent<typeof Component>;
|
|
108
|
+
|
|
109
|
+
export declare const RouterError: FC<RouterErrorProps>;
|
|
110
|
+
|
|
111
|
+
declare interface RouterErrorProps {
|
|
112
|
+
error: ErrorComponentProps["error"];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export declare const RouterGridActionsCellItem: LinkComponent<typeof Component_2>;
|
|
116
|
+
|
|
117
|
+
export declare const RouterIconButton: LinkComponent<typeof Component_3>;
|
|
118
|
+
|
|
119
|
+
export declare const RouterLink: LinkComponent<typeof Component_4>;
|
|
120
|
+
|
|
121
|
+
export declare const RouterListItemButton: LinkComponent<typeof Component_6>;
|
|
122
|
+
|
|
123
|
+
export declare function RouterNotFound(): JSX.Element;
|
|
124
|
+
|
|
125
|
+
export declare const RouterTab: LinkComponent<typeof Component_5>;
|
|
126
|
+
|
|
127
|
+
export declare const TypographyWithIcon: React.FC<TypographyWithIconProps>;
|
|
128
|
+
|
|
129
|
+
declare interface TypographyWithIconProps extends TypographyProps {
|
|
130
|
+
startIcon?: React.ReactNode;
|
|
131
|
+
endIcon?: React.ReactNode;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export { }
|
package/dist/components.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as jsxRuntimeExports, u as useDialogs } from "./DialogsHooks-Bi8dZoyu.js";
|
|
2
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
3
|
import React, { useRef, useState, useEffectEvent, useEffect, createContext, useContext, Fragment } from "react";
|
|
4
4
|
import CloudUpload from "@mui/icons-material/CloudUpload";
|
|
@@ -9,7 +9,6 @@ import { grey } from "@mui/material/colors";
|
|
|
9
9
|
import { useInView } from "react-intersection-observer";
|
|
10
10
|
import Delete from "@mui/icons-material/Delete";
|
|
11
11
|
import FileDownload from "@mui/icons-material/FileDownload";
|
|
12
|
-
import { u as useDialogs } from "./DialogsHooks-BlUsVlfv.js";
|
|
13
12
|
import { c as useDownloadFile, f as useDeleteFile, a as useGetFileThumbnail, d as useOpenFile, b as useGetFile, u as useGetFileMetas } from "./FileHooks-hWKTwLCr.js";
|
|
14
13
|
import AttachFile from "@mui/icons-material/AttachFile";
|
|
15
14
|
import Image from "@mui/icons-material/Image";
|
|
@@ -18,7 +17,7 @@ import Close from "@mui/icons-material/Close";
|
|
|
18
17
|
import Edit from "@mui/icons-material/Edit";
|
|
19
18
|
import { createLink } from "@tanstack/react-router";
|
|
20
19
|
import { GridActionsCellItem } from "@mui/x-data-grid-premium";
|
|
21
|
-
import { R } from "./RouterListItemButton-
|
|
20
|
+
import { R } from "./RouterListItemButton-CHS7rofI.js";
|
|
22
21
|
const TypographyWithIcon = ({ startIcon, endIcon, children, sx, ...props }) => {
|
|
23
22
|
const iconSx = {
|
|
24
23
|
display: "inline-flex",
|
|
@@ -30,7 +29,7 @@ const TypographyWithIcon = ({ startIcon, endIcon, children, sx, ...props }) => {
|
|
|
30
29
|
display: "block"
|
|
31
30
|
}
|
|
32
31
|
};
|
|
33
|
-
return /* @__PURE__ */ jsxs(
|
|
32
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
34
33
|
Typography,
|
|
35
34
|
{
|
|
36
35
|
component: "span",
|
|
@@ -43,9 +42,9 @@ const TypographyWithIcon = ({ startIcon, endIcon, children, sx, ...props }) => {
|
|
|
43
42
|
gap: 1,
|
|
44
43
|
...props,
|
|
45
44
|
children: [
|
|
46
|
-
startIcon && /* @__PURE__ */ jsx(Stack, { component: "span", sx: iconSx, children: startIcon }),
|
|
47
|
-
/* @__PURE__ */ jsx(Stack, { component: "span", sx: { display: "inline", lineHeight: "inherit" }, children }),
|
|
48
|
-
endIcon && /* @__PURE__ */ jsx(Stack, { component: "span", sx: iconSx, children: endIcon })
|
|
45
|
+
startIcon && /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { component: "span", sx: iconSx, children: startIcon }),
|
|
46
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { component: "span", sx: { display: "inline", lineHeight: "inherit" }, children }),
|
|
47
|
+
endIcon && /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { component: "span", sx: iconSx, children: endIcon })
|
|
49
48
|
]
|
|
50
49
|
}
|
|
51
50
|
);
|
|
@@ -73,7 +72,7 @@ const Fullscreen = ({ children, sx, ...props }) => {
|
|
|
73
72
|
ro.disconnect();
|
|
74
73
|
};
|
|
75
74
|
}, []);
|
|
76
|
-
return /* @__PURE__ */ jsx(
|
|
75
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
77
76
|
Box,
|
|
78
77
|
{
|
|
79
78
|
ref: reference,
|
|
@@ -114,10 +113,10 @@ const Dropzone = ({ sx, ...props }) => {
|
|
|
114
113
|
...isDragAccept ? { borderColor: theme.palette.success.main } : {},
|
|
115
114
|
...isDragReject ? { borderColor: theme.palette.error.main } : {}
|
|
116
115
|
};
|
|
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") })
|
|
116
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Paper, { variant: "outlined", ...getRootProps({ style }), sx, children: [
|
|
117
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("input", { ...getInputProps(), style: { display: "none" } }),
|
|
118
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CloudUpload, {}),
|
|
119
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { children: t("Layout.File.DragSomeFilesHereOrClickToSelectThem") })
|
|
121
120
|
] });
|
|
122
121
|
};
|
|
123
122
|
const FileContext = createContext(null);
|
|
@@ -151,7 +150,7 @@ const ActionsMenu = ({ meta, menu, setMenu }) => {
|
|
|
151
150
|
onDelete({ remainingFileMetas, deletedFileMeta: meta });
|
|
152
151
|
}
|
|
153
152
|
};
|
|
154
|
-
return /* @__PURE__ */ jsx(
|
|
153
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
155
154
|
Menu,
|
|
156
155
|
{
|
|
157
156
|
open: menu !== null,
|
|
@@ -159,14 +158,14 @@ const ActionsMenu = ({ meta, menu, setMenu }) => {
|
|
|
159
158
|
anchorReference: "anchorPosition",
|
|
160
159
|
variant: "menu",
|
|
161
160
|
anchorPosition: menu === null ? void 0 : { top: menu.mouseY, left: menu.mouseX },
|
|
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") })
|
|
161
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(List, { disablePadding: true, children: [
|
|
162
|
+
actions?.download !== false && /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemButton, { onClick: handleOnDownload, disabled: isDownloading, children: [
|
|
163
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FileDownload, {}) }),
|
|
164
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText, { children: t("Layout.File.Download") })
|
|
166
165
|
] }),
|
|
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") })
|
|
166
|
+
actions?.delete !== false && /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemButton, { onClick: handleOnDelete, disabled: isDeleting, children: [
|
|
167
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Delete, {}) }),
|
|
168
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText, { children: t("Layout.File.Delete") })
|
|
170
169
|
] })
|
|
171
170
|
] })
|
|
172
171
|
}
|
|
@@ -175,7 +174,7 @@ const ActionsMenu = ({ meta, menu, setMenu }) => {
|
|
|
175
174
|
const IMAGE_SIZE = 150;
|
|
176
175
|
const FileViewerGrid = ({ sx, size, itemBar }) => {
|
|
177
176
|
const { fileMetas } = useFile();
|
|
178
|
-
return /* @__PURE__ */ jsx(Stack, { direction: "row", spacing: 1, sx: { overflow: "auto", ...sx }, children: fileMetas.map((fileMeta) => /* @__PURE__ */ jsx(
|
|
177
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { direction: "row", spacing: 1, sx: { overflow: "auto", ...sx }, children: fileMetas.map((fileMeta) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
179
178
|
GridFileViewerItem,
|
|
180
179
|
{
|
|
181
180
|
meta: fileMeta,
|
|
@@ -218,9 +217,9 @@ const GridFileViewerItem = ({ meta, size, itemBar }) => {
|
|
|
218
217
|
}
|
|
219
218
|
}
|
|
220
219
|
};
|
|
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(
|
|
220
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
|
|
221
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ImageListItem, { sx: { width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }, onMouseEnter: handleOnMouseEnter, onMouseLeave: handleOnMouseLeave, ref, children: [
|
|
222
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
224
223
|
Box,
|
|
225
224
|
{
|
|
226
225
|
component: "img",
|
|
@@ -231,21 +230,21 @@ const GridFileViewerItem = ({ meta, size, itemBar }) => {
|
|
|
231
230
|
sx: { cursor: "pointer", objectFit: "contain", width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }
|
|
232
231
|
}
|
|
233
232
|
),
|
|
234
|
-
itemBar !== "hidden" && showItemBar && /* @__PURE__ */ jsx(
|
|
233
|
+
itemBar !== "hidden" && showItemBar && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
235
234
|
ImageListItemBar,
|
|
236
235
|
{
|
|
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, {}) })
|
|
236
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: meta.fileName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { children: meta.fileName }) }),
|
|
237
|
+
actionIcon: (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { sx: { color: grey[100] }, onClick: openMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MoreVert, {}) })
|
|
239
238
|
}
|
|
240
239
|
)
|
|
241
240
|
] }),
|
|
242
|
-
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx(ActionsMenu, { meta, menu, setMenu })
|
|
241
|
+
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsxRuntimeExports.jsx(ActionsMenu, { meta, menu, setMenu })
|
|
243
242
|
] });
|
|
244
243
|
};
|
|
245
244
|
const FileViewerList = ({ sx }) => {
|
|
246
245
|
const { fileMetas } = useFile();
|
|
247
|
-
return /* @__PURE__ */ jsx(List, { dense: true, sx, children: fileMetas.map(
|
|
248
|
-
(fileMeta) => /* @__PURE__ */ jsx(
|
|
246
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(List, { dense: true, sx, children: fileMetas.map(
|
|
247
|
+
(fileMeta) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
249
248
|
ListFileViewerItem,
|
|
250
249
|
{
|
|
251
250
|
meta: fileMeta
|
|
@@ -282,23 +281,23 @@ const ListFileViewerItem = ({ meta }) => {
|
|
|
282
281
|
const icon = () => {
|
|
283
282
|
switch (meta.mediaType) {
|
|
284
283
|
case "image": {
|
|
285
|
-
return /* @__PURE__ */ jsx(Image, {});
|
|
284
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Image, {});
|
|
286
285
|
}
|
|
287
286
|
case "video": {
|
|
288
|
-
return /* @__PURE__ */ jsx(SmartDisplay, {});
|
|
287
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SmartDisplay, {});
|
|
289
288
|
}
|
|
290
289
|
default: {
|
|
291
|
-
return /* @__PURE__ */ jsx(AttachFile, {});
|
|
290
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AttachFile, {});
|
|
292
291
|
}
|
|
293
292
|
}
|
|
294
293
|
};
|
|
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, {}) })
|
|
294
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
|
|
295
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemButton, { onClick, children: [
|
|
296
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon, { children: icon() }),
|
|
297
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText, { primary: `${meta.fileName}.${meta.fileExtension}` }),
|
|
298
|
+
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { edge: "end", onClick: openMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MoreVert, {}) })
|
|
300
299
|
] }, meta.id),
|
|
301
|
-
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx(ActionsMenu, { meta, menu, setMenu })
|
|
300
|
+
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsxRuntimeExports.jsx(ActionsMenu, { meta, menu, setMenu })
|
|
302
301
|
] });
|
|
303
302
|
};
|
|
304
303
|
const ImageViewer = ({ metaId }) => {
|
|
@@ -343,9 +342,9 @@ const ImageViewer = ({ metaId }) => {
|
|
|
343
342
|
};
|
|
344
343
|
const onClose = () => setImageId("");
|
|
345
344
|
if (!metaId) return null;
|
|
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, {}) })
|
|
345
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Dialog, { open: true, onClose, maxWidth: "xl", children: [
|
|
346
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Box, { component: "img", src: source, alt: metaId, sx: { maxWidth: "100vw", maxHeight: { xs: "calc(100vh - 56px)", sm: "calc(100vh - 64px)" } } }),
|
|
347
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Fab, { size: "medium", onClick: onClose, sx: { position: "fixed", top: 8, right: 8 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Close, {}) })
|
|
349
348
|
] });
|
|
350
349
|
};
|
|
351
350
|
const FileViewer = ({ subId, onDelete, actions, children }) => {
|
|
@@ -353,9 +352,9 @@ const FileViewer = ({ subId, onDelete, actions, children }) => {
|
|
|
353
352
|
const [imageId, setImageId] = useState("");
|
|
354
353
|
const components = { Grid: FileViewerGrid, List: FileViewerList };
|
|
355
354
|
if (fileMetas.length === 0) return null;
|
|
356
|
-
return /* @__PURE__ */ jsxs(FileContext.Provider, { value: { fileMetas, onDelete, actions, setImageId }, children: [
|
|
355
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(FileContext.Provider, { value: { fileMetas, onDelete, actions, setImageId }, children: [
|
|
357
356
|
children(components),
|
|
358
|
-
/* @__PURE__ */ jsx(ImageViewer, { metaId: imageId })
|
|
357
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ImageViewer, { metaId: imageId })
|
|
359
358
|
] });
|
|
360
359
|
};
|
|
361
360
|
const isArray = (value) => Array.isArray(value);
|
|
@@ -366,64 +365,64 @@ const ChipInputCell = ({ params, slotProps, getLabel }) => {
|
|
|
366
365
|
return value;
|
|
367
366
|
};
|
|
368
367
|
if (isArray(params.value))
|
|
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`)
|
|
368
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { direction: "row", alignItems: "center", gap: 1, sx: { overflowX: "auto", height: "100%", width: params.colDef.computedWidth }, children: params.value.map(
|
|
369
|
+
(value, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(Chip, { label: getLabelValue(value), ...slotProps }, `${index + 1}-chip-input-cell`)
|
|
371
370
|
) });
|
|
372
|
-
return /* @__PURE__ */ jsx(Chip, { label: getLabelValue(params.value), ...slotProps });
|
|
371
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Chip, { label: getLabelValue(params.value), ...slotProps });
|
|
373
372
|
};
|
|
374
373
|
const EditableColumnHeader = ({ colDef }) => {
|
|
375
|
-
return /* @__PURE__ */ jsx(TypographyWithIcon, { endIcon: /* @__PURE__ */ jsx(Edit, { color: "disabled", fontSize: "small" }), variant: "body2", className: "MuiDataGrid-columnHeaderTitle", children: colDef.headerName });
|
|
374
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithIcon, { endIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(Edit, { color: "disabled", fontSize: "small" }), variant: "body2", className: "MuiDataGrid-columnHeaderTitle", children: colDef.headerName });
|
|
376
375
|
};
|
|
377
376
|
const Component$4 = React.forwardRef(function ButtonComponent(props, reference) {
|
|
378
|
-
return /* @__PURE__ */ jsx(Button, { ref: reference, component: "a", ...props });
|
|
377
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { ref: reference, component: "a", ...props });
|
|
379
378
|
});
|
|
380
379
|
const CreatedComponent$4 = createLink(Component$4);
|
|
381
380
|
const RouterButton = (props) => {
|
|
382
|
-
return /* @__PURE__ */ jsx(CreatedComponent$4, { ...props });
|
|
381
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent$4, { ...props });
|
|
383
382
|
};
|
|
384
383
|
const Component$3 = React.forwardRef(
|
|
385
384
|
function GridActionsCellItemComponent(props, reference) {
|
|
386
|
-
return /* @__PURE__ */ jsx(GridActionsCellItem, { ref: reference, component: "a", ...props });
|
|
385
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(GridActionsCellItem, { ref: reference, component: "a", ...props });
|
|
387
386
|
}
|
|
388
387
|
);
|
|
389
388
|
const CreatedComponent$3 = createLink(Component$3);
|
|
390
389
|
const RouterGridActionsCellItem = (props) => {
|
|
391
|
-
return /* @__PURE__ */ jsx(CreatedComponent$3, { ...props });
|
|
390
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent$3, { ...props });
|
|
392
391
|
};
|
|
393
392
|
const Component$2 = React.forwardRef(function IconButtonComponent(props, reference) {
|
|
394
|
-
return /* @__PURE__ */ jsx(IconButton, { ref: reference, component: "a", ...props });
|
|
393
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { ref: reference, component: "a", ...props });
|
|
395
394
|
});
|
|
396
395
|
const CreatedComponent$2 = createLink(Component$2);
|
|
397
396
|
const RouterIconButton = (props) => {
|
|
398
|
-
return /* @__PURE__ */ jsx(CreatedComponent$2, { ...props });
|
|
397
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent$2, { ...props });
|
|
399
398
|
};
|
|
400
399
|
const Component$1 = React.forwardRef(function LinkComponent(props, reference) {
|
|
401
|
-
return /* @__PURE__ */ jsx(Link, { ref: reference, ...props });
|
|
400
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { ref: reference, ...props });
|
|
402
401
|
});
|
|
403
402
|
const CreatedComponent$1 = createLink(Component$1);
|
|
404
403
|
const RouterLink = (props) => {
|
|
405
|
-
return /* @__PURE__ */ jsx(CreatedComponent$1, { ...props });
|
|
404
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent$1, { ...props });
|
|
406
405
|
};
|
|
407
406
|
const Component = React.forwardRef(function TabComponent(props, reference) {
|
|
408
|
-
return /* @__PURE__ */ jsx(Tab, { ref: reference, component: "a", ...props });
|
|
407
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tab, { ref: reference, component: "a", ...props });
|
|
409
408
|
});
|
|
410
409
|
const CreatedComponent = createLink(Component);
|
|
411
410
|
const RouterTab = (props) => {
|
|
412
|
-
return /* @__PURE__ */ jsx(CreatedComponent, { ...props });
|
|
411
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent, { ...props });
|
|
413
412
|
};
|
|
414
413
|
function RouterNotFound() {
|
|
415
414
|
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") })
|
|
415
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", mb: 4, children: [
|
|
416
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "404" }),
|
|
417
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
|
|
418
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h5", component: "span", children: t("Layout.ThisPageCouldNotBeFound") })
|
|
420
419
|
] }) });
|
|
421
420
|
}
|
|
422
421
|
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 })
|
|
422
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", mb: 4, children: [
|
|
423
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: error.name || "500" }),
|
|
424
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
|
|
425
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h5", component: "span", children: error.message })
|
|
427
426
|
] }) });
|
|
428
427
|
};
|
|
429
428
|
export {
|