wcz-test 6.4.2 → 6.4.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.
Files changed (49) hide show
  1. package/dist/Approval-gLhUz6rw.d.ts +284 -0
  2. package/dist/FileMeta-CC014fnB.d.ts +18 -0
  3. package/dist/chunk-4FRZRIAO.js +29 -0
  4. package/dist/chunk-4FRZRIAO.js.map +1 -0
  5. package/dist/chunk-4UULRYGW.js +46 -0
  6. package/dist/chunk-4UULRYGW.js.map +1 -0
  7. package/dist/chunk-5WRI5ZAA.js +31 -0
  8. package/dist/chunk-5WRI5ZAA.js.map +1 -0
  9. package/dist/chunk-BZEEKZFG.js +206 -0
  10. package/dist/chunk-BZEEKZFG.js.map +1 -0
  11. package/dist/chunk-GBRG7C6R.js +61 -0
  12. package/dist/chunk-GBRG7C6R.js.map +1 -0
  13. package/dist/chunk-TME53DAF.js +20 -0
  14. package/dist/chunk-TME53DAF.js.map +1 -0
  15. package/dist/chunk-TVEJZEZT.js +883 -0
  16. package/dist/chunk-TVEJZEZT.js.map +1 -0
  17. package/dist/chunk-YHTLF4NN.js +27 -0
  18. package/dist/chunk-YHTLF4NN.js.map +1 -0
  19. package/dist/chunk-ZMWQQXZT.js +17 -0
  20. package/dist/chunk-ZMWQQXZT.js.map +1 -0
  21. package/dist/components.d.ts +89 -0
  22. package/dist/components.js +546 -0
  23. package/dist/components.js.map +1 -0
  24. package/dist/hooks.d.ts +129 -0
  25. package/dist/hooks.js +304 -0
  26. package/dist/hooks.js.map +1 -0
  27. package/dist/i18next-browser-languagedetector.d.ts +4 -0
  28. package/dist/i18next-browser-languagedetector.js +8 -0
  29. package/dist/i18next-browser-languagedetector.js.map +1 -0
  30. package/dist/i18next.d.ts +2 -0
  31. package/dist/i18next.js +9 -0
  32. package/dist/i18next.js.map +1 -0
  33. package/dist/index.d.ts +4 -3542
  34. package/dist/index.js +228 -2752
  35. package/dist/index.js.map +1 -1
  36. package/dist/models.d.ts +161 -0
  37. package/dist/models.js +249 -0
  38. package/dist/models.js.map +1 -0
  39. package/dist/queries.d.ts +1024 -0
  40. package/dist/queries.js +364 -0
  41. package/dist/queries.js.map +1 -0
  42. package/dist/react-i18next.d.ts +1 -0
  43. package/dist/react-i18next.js +3 -0
  44. package/dist/react-i18next.js.map +1 -0
  45. package/dist/utils-DLRiZ02r.d.ts +47 -0
  46. package/dist/utils.d.ts +2154 -0
  47. package/dist/utils.js +27 -0
  48. package/dist/utils.js.map +1 -0
  49. package/package.json +37 -5
@@ -0,0 +1,546 @@
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-BZEEKZFG.js";
15
+ import "./chunk-GBRG7C6R.js";
16
+ import "./chunk-YHTLF4NN.js";
17
+ import "./chunk-TME53DAF.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 }) => {
24
+ const iconSx = {
25
+ display: "inline-flex",
26
+ alignItems: "center",
27
+ justifyContent: "center",
28
+ flexShrink: 0,
29
+ lineHeight: 0,
30
+ "& > svg": {
31
+ display: "block"
32
+ }
33
+ };
34
+ return /* @__PURE__ */ jsxs(
35
+ Typography,
36
+ {
37
+ component: "span",
38
+ sx: {
39
+ display: "inline-flex",
40
+ alignItems: "center",
41
+ verticalAlign: "middle",
42
+ ...sx
43
+ },
44
+ gap: 1,
45
+ ...props,
46
+ children: [
47
+ startIcon && /* @__PURE__ */ jsx(Stack, { component: "span", sx: iconSx, children: startIcon }),
48
+ /* @__PURE__ */ jsx(Stack, { component: "span", sx: { display: "inline", lineHeight: "inherit" }, children }),
49
+ endIcon && /* @__PURE__ */ jsx(Stack, { component: "span", sx: iconSx, children: endIcon })
50
+ ]
51
+ }
52
+ );
53
+ };
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 }) => {
60
+ const reference = useRef(null);
61
+ const [height, setHeight] = useState();
62
+ const recompute = useEffectEvent(() => {
63
+ if (!reference.current) return;
64
+ const top = Math.ceil(reference.current.getBoundingClientRect().top);
65
+ const avail = Math.max(0, window.innerHeight - top);
66
+ setHeight(avail);
67
+ });
68
+ useEffect(() => {
69
+ const element = reference.current;
70
+ if (!element) return;
71
+ recompute();
72
+ window.addEventListener("resize", recompute);
73
+ const ro = new ResizeObserver(recompute);
74
+ ro.observe(document.documentElement);
75
+ ro.observe(document.body);
76
+ ro.observe(element);
77
+ return () => {
78
+ window.removeEventListener("resize", recompute);
79
+ ro.disconnect();
80
+ };
81
+ }, []);
82
+ return /* @__PURE__ */ jsx2(
83
+ Box,
84
+ {
85
+ ref: reference,
86
+ sx: {
87
+ display: "flex",
88
+ flexDirection: "column",
89
+ minHeight: 0,
90
+ width: "100%",
91
+ overflow: "auto",
92
+ ...sx
93
+ },
94
+ height,
95
+ ...props,
96
+ children
97
+ }
98
+ );
99
+ };
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 = {
108
+ flex: 1,
109
+ display: "flex",
110
+ flexDirection: "column",
111
+ alignItems: "center",
112
+ padding: "20px",
113
+ borderWidth: 2,
114
+ borderRadius: 2,
115
+ borderStyle: "dashed",
116
+ outline: "none",
117
+ transition: "border .24s ease-in-out",
118
+ cursor: "pointer"
119
+ };
120
+ var Dropzone = ({ sx, ...props }) => {
121
+ const { getRootProps, getInputProps, isFocused, isDragAccept, isDragReject } = useDropzone(props);
122
+ const { t } = useTranslation();
123
+ const theme = useTheme();
124
+ const style = {
125
+ ...baseStyle,
126
+ ...isFocused ? { borderColor: theme.palette.primary.main } : {},
127
+ ...isDragAccept ? { borderColor: theme.palette.success.main } : {},
128
+ ...isDragReject ? { borderColor: theme.palette.error.main } : {}
129
+ };
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") })
134
+ ] });
135
+ };
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
+
146
+ // src/components/file/fileViewer/common/ActionsMenu.tsx
147
+ import Delete from "@mui/icons-material/Delete";
148
+ import FileDownload from "@mui/icons-material/FileDownload";
149
+ import { List, ListItemButton, ListItemIcon, ListItemText, Menu } from "@mui/material";
150
+ import { useTranslation as useTranslation2 } from "react-i18next";
151
+
152
+ // src/contexts/FileContext.ts
153
+ import { createContext, useContext } from "react";
154
+ var FileContext = createContext(null);
155
+ var useFile = () => {
156
+ const context = useContext(FileContext);
157
+ if (!context) {
158
+ throw new Error("FileViewer components must be used within FileViewer");
159
+ }
160
+ return context;
161
+ };
162
+
163
+ // src/components/file/fileViewer/common/ActionsMenu.tsx
164
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
165
+ var ActionsMenu = ({ meta, menu, setMenu }) => {
166
+ const { t } = useTranslation2();
167
+ const { fileMetas, onDelete, actions } = useFile();
168
+ const { confirm } = useDialogs();
169
+ const handleMenuClose = () => {
170
+ setMenu(null);
171
+ };
172
+ const { mutate: download, isPending: isDownloading } = useDownloadFile();
173
+ const { mutate: deleteFile, isPending: isDeleting } = useDeleteFile();
174
+ const handleOnDownload = () => {
175
+ handleMenuClose();
176
+ download(meta);
177
+ };
178
+ const handleOnDelete = async () => {
179
+ if (!await confirm(t("Layout.File.AreYouSureYouWantToDelete", { fileName: meta.fileName })))
180
+ return;
181
+ deleteFile(meta);
182
+ handleMenuClose();
183
+ if (onDelete) {
184
+ const remainingFileMetas = fileMetas.filter((m) => m.id !== meta.id);
185
+ onDelete({ remainingFileMetas, deletedFileMeta: meta });
186
+ }
187
+ };
188
+ return /* @__PURE__ */ jsx4(
189
+ Menu,
190
+ {
191
+ open: menu !== null,
192
+ onClose: handleMenuClose,
193
+ anchorReference: "anchorPosition",
194
+ variant: "menu",
195
+ anchorPosition: menu === null ? void 0 : { top: menu.mouseY, left: menu.mouseX },
196
+ children: /* @__PURE__ */ jsxs3(List, { disablePadding: true, children: [
197
+ actions?.download !== false && /* @__PURE__ */ jsxs3(ListItemButton, { onClick: handleOnDownload, disabled: isDownloading, children: [
198
+ /* @__PURE__ */ jsx4(ListItemIcon, { children: /* @__PURE__ */ jsx4(FileDownload, {}) }),
199
+ /* @__PURE__ */ jsx4(ListItemText, { children: t("Layout.File.Download") })
200
+ ] }),
201
+ actions?.delete !== false && /* @__PURE__ */ jsxs3(ListItemButton, { onClick: handleOnDelete, disabled: isDeleting, children: [
202
+ /* @__PURE__ */ jsx4(ListItemIcon, { children: /* @__PURE__ */ jsx4(Delete, {}) }),
203
+ /* @__PURE__ */ jsx4(ListItemText, { children: t("Layout.File.Delete") })
204
+ ] })
205
+ ] })
206
+ }
207
+ );
208
+ };
209
+
210
+ // src/components/file/fileViewer/FileViewerGrid.tsx
211
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
212
+ var IMAGE_SIZE = 150;
213
+ var FileViewerGrid = ({ sx, size, itemBar }) => {
214
+ const { fileMetas } = useFile();
215
+ return /* @__PURE__ */ jsx5(Stack2, { direction: "row", spacing: 1, sx: { overflow: "auto", ...sx }, children: fileMetas.map((fileMeta) => /* @__PURE__ */ jsx5(
216
+ GridFileViewerItem,
217
+ {
218
+ meta: fileMeta,
219
+ size,
220
+ itemBar
221
+ },
222
+ fileMeta.id
223
+ )) });
224
+ };
225
+ var GridFileViewerItem = ({ meta, size, itemBar }) => {
226
+ const { setImageId, actions } = useFile();
227
+ const [showItemBar, setShowItemBar] = useState2(itemBar === "always");
228
+ const [menu, setMenu] = useState2(null);
229
+ useEffect2(() => {
230
+ setShowItemBar(itemBar === "always");
231
+ }, [itemBar]);
232
+ const { data: source } = useGetFileThumbnail({ meta });
233
+ const handleOnMouseEnter = () => setShowItemBar(true);
234
+ const handleOnMouseLeave = () => itemBar !== "always" && setShowItemBar(false);
235
+ const openMenu = (event) => {
236
+ setMenu(menu === null ? { mouseX: event.clientX, mouseY: event.clientY } : null);
237
+ setTimeout(() => setShowItemBar(true));
238
+ };
239
+ const { mutate: openFile } = useOpenFile();
240
+ const { mutate: download } = useDownloadFile();
241
+ const onClick = () => {
242
+ switch (meta.mediaType) {
243
+ case "image": {
244
+ return setImageId(meta.id);
245
+ }
246
+ case "application": {
247
+ return openFile(meta);
248
+ }
249
+ case "video": {
250
+ return openFile(meta);
251
+ }
252
+ default: {
253
+ return download(meta);
254
+ }
255
+ }
256
+ };
257
+ return /* @__PURE__ */ jsxs4(Fragment, { children: [
258
+ /* @__PURE__ */ jsxs4(ImageListItem, { sx: { width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }, onMouseEnter: handleOnMouseEnter, onMouseLeave: handleOnMouseLeave, children: [
259
+ /* @__PURE__ */ jsx5(
260
+ Box2,
261
+ {
262
+ component: "img",
263
+ src: source,
264
+ loading: "lazy",
265
+ alt: "thumbnail-" + meta.id,
266
+ onClick,
267
+ sx: { cursor: "pointer", objectFit: "contain", width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }
268
+ }
269
+ ),
270
+ itemBar !== "hidden" && showItemBar && /* @__PURE__ */ jsx5(
271
+ ImageListItemBar,
272
+ {
273
+ title: /* @__PURE__ */ jsx5(Tooltip, { title: meta.fileName, children: /* @__PURE__ */ jsx5(Box2, { children: meta.fileName }) }),
274
+ actionIcon: (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx5(IconButton, { sx: { color: grey[100] }, onClick: openMenu, children: /* @__PURE__ */ jsx5(MoreVert, {}) })
275
+ }
276
+ )
277
+ ] }),
278
+ (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx5(ActionsMenu, { meta, menu, setMenu })
279
+ ] });
280
+ };
281
+
282
+ // src/components/file/fileViewer/FileViewerList.tsx
283
+ import AttachFile from "@mui/icons-material/AttachFile";
284
+ import Image from "@mui/icons-material/Image";
285
+ import MoreVert2 from "@mui/icons-material/MoreVert";
286
+ import SmartDisplay from "@mui/icons-material/SmartDisplay";
287
+ import { IconButton as IconButton2, List as List2, ListItemButton as ListItemButton2, ListItemIcon as ListItemIcon2, ListItemText as ListItemText2 } from "@mui/material";
288
+ import { Fragment as Fragment2, useState as useState3 } from "react";
289
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
290
+ var FileViewerList = ({ sx }) => {
291
+ const { fileMetas } = useFile();
292
+ return /* @__PURE__ */ jsx6(List2, { dense: true, sx, children: fileMetas.map(
293
+ (fileMeta) => /* @__PURE__ */ jsx6(
294
+ ListFileViewerItem,
295
+ {
296
+ meta: fileMeta
297
+ },
298
+ fileMeta.id
299
+ )
300
+ ) });
301
+ };
302
+ var ListFileViewerItem = ({ meta }) => {
303
+ const { setImageId, actions } = useFile();
304
+ const [menu, setMenu] = useState3(null);
305
+ const openMenu = (event) => {
306
+ event.stopPropagation();
307
+ setMenu(menu === null ? { mouseX: event.clientX, mouseY: event.clientY } : null);
308
+ };
309
+ const { mutate: openFile } = useOpenFile();
310
+ const { mutate: download } = useDownloadFile();
311
+ const onClick = () => {
312
+ switch (meta.mediaType) {
313
+ case "image": {
314
+ return setImageId(meta.id);
315
+ }
316
+ case "application": {
317
+ return openFile(meta);
318
+ }
319
+ case "video": {
320
+ return openFile(meta);
321
+ }
322
+ default: {
323
+ return download(meta);
324
+ }
325
+ }
326
+ };
327
+ const icon = () => {
328
+ switch (meta.mediaType) {
329
+ case "image": {
330
+ return /* @__PURE__ */ jsx6(Image, {});
331
+ }
332
+ case "video": {
333
+ return /* @__PURE__ */ jsx6(SmartDisplay, {});
334
+ }
335
+ default: {
336
+ return /* @__PURE__ */ jsx6(AttachFile, {});
337
+ }
338
+ }
339
+ };
340
+ return /* @__PURE__ */ jsxs5(Fragment2, { children: [
341
+ /* @__PURE__ */ jsxs5(ListItemButton2, { onClick, children: [
342
+ /* @__PURE__ */ jsx6(ListItemIcon2, { children: icon() }),
343
+ /* @__PURE__ */ jsx6(ListItemText2, { primary: `${meta.fileName}.${meta.fileExtension}` }),
344
+ (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx6(IconButton2, { edge: "end", onClick: openMenu, children: /* @__PURE__ */ jsx6(MoreVert2, {}) })
345
+ ] }, meta.id),
346
+ (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx6(ActionsMenu, { meta, menu, setMenu })
347
+ ] });
348
+ };
349
+
350
+ // src/components/file/fileViewer/ImageViewer.tsx
351
+ import Close from "@mui/icons-material/Close";
352
+ import { Box as Box3, Dialog, Fab } from "@mui/material";
353
+ import { useEffect as useEffect3 } from "react";
354
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
355
+ var ImageViewer = ({ metaId }) => {
356
+ const { fileMetas, setImageId } = useFile();
357
+ const meta = fileMetas.find((m) => m.id === metaId);
358
+ const { data: source } = useGetFile({ meta });
359
+ useEffect3(() => {
360
+ if (metaId)
361
+ globalThis.addEventListener("keydown", handleOnKeydown);
362
+ return () => {
363
+ globalThis.removeEventListener("keydown", handleOnKeydown);
364
+ };
365
+ }, [metaId]);
366
+ const handleOnKeydown = (event) => {
367
+ const images = fileMetas.filter((m) => m.mediaType === "image");
368
+ const imageIndex = images.findIndex((m) => m.id === metaId);
369
+ switch (event.key) {
370
+ case "ArrowLeft": {
371
+ return handleOnArrowLeft(images, imageIndex);
372
+ }
373
+ case "ArrowRight": {
374
+ return handleOnArrowRight(images, imageIndex);
375
+ }
376
+ case "Backspace":
377
+ case "Escape": {
378
+ event.preventDefault();
379
+ return onClose();
380
+ }
381
+ }
382
+ };
383
+ const handleOnArrowLeft = (images, index) => {
384
+ if (index > 0) {
385
+ const previousFile = images[index - 1];
386
+ setImageId(previousFile.id);
387
+ }
388
+ };
389
+ const handleOnArrowRight = (images, index) => {
390
+ if (index < images.length - 1) {
391
+ const nextFile = images[index + 1];
392
+ setImageId(nextFile.id);
393
+ }
394
+ };
395
+ const onClose = () => setImageId("");
396
+ if (!metaId) return null;
397
+ return /* @__PURE__ */ jsxs6(Dialog, { open: true, onClose, maxWidth: "xl", children: [
398
+ /* @__PURE__ */ jsx7(Box3, { component: "img", src: source, alt: metaId, sx: { maxWidth: "100vw", maxHeight: { xs: "calc(100vh - 56px)", sm: "calc(100vh - 64px)" } } }),
399
+ /* @__PURE__ */ jsx7(Fab, { size: "medium", onClick: onClose, sx: { position: "fixed", top: 8, right: 8 }, children: /* @__PURE__ */ jsx7(Close, {}) })
400
+ ] });
401
+ };
402
+
403
+ // src/components/file/FileViewer.tsx
404
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
405
+ var FileViewer = ({ subId, onDelete, actions, children }) => {
406
+ const { data: fileMetas = [] } = useGetFileMetas({ subId }, { enabled: !!subId });
407
+ const [imageId, setImageId] = useState4("");
408
+ const components = { Grid: FileViewerGrid, List: FileViewerList };
409
+ if (fileMetas.length === 0) return null;
410
+ return /* @__PURE__ */ jsxs7(FileContext.Provider, { value: { fileMetas, onDelete, actions, setImageId }, children: [
411
+ children(components),
412
+ /* @__PURE__ */ jsx8(ImageViewer, { metaId: imageId })
413
+ ] });
414
+ };
415
+
416
+ // src/components/data-grid/ChipInputCell.tsx
417
+ import { Chip, Stack as Stack3 } from "@mui/material";
418
+ import { jsx as jsx9 } from "react/jsx-runtime";
419
+ var isArray = (value) => Array.isArray(value);
420
+ var ChipInputCell = ({ params, slotProps, getLabel }) => {
421
+ if (!params.value) return null;
422
+ const getLabelValue = (value) => {
423
+ if (getLabel) return getLabel(value);
424
+ return value;
425
+ };
426
+ if (isArray(params.value))
427
+ return /* @__PURE__ */ jsx9(Stack3, { direction: "row", alignItems: "center", gap: 1, sx: { overflowX: "auto", height: "100%", width: params.colDef.computedWidth }, children: params.value.map(
428
+ (value, index) => /* @__PURE__ */ jsx9(Chip, { label: getLabelValue(value), ...slotProps }, `${index + 1}-chip-input-cell`)
429
+ ) });
430
+ return /* @__PURE__ */ jsx9(Chip, { label: getLabelValue(params.value), ...slotProps });
431
+ };
432
+
433
+ // src/components/data-grid/EditableColumnHeader.tsx
434
+ import Edit from "@mui/icons-material/Edit";
435
+ import { jsx as jsx10 } from "react/jsx-runtime";
436
+ var EditableColumnHeader = ({ colDef }) => {
437
+ return /* @__PURE__ */ jsx10(TypographyWithIcon, { endIcon: /* @__PURE__ */ jsx10(Edit, { color: "disabled", fontSize: "small" }), variant: "body2", className: "MuiDataGrid-columnHeaderTitle", children: colDef.headerName });
438
+ };
439
+
440
+ // src/components/router/RouterButton.tsx
441
+ import { Button } from "@mui/material";
442
+ import { createLink } from "@tanstack/react-router";
443
+ import React3 from "react";
444
+ import { jsx as jsx11 } from "react/jsx-runtime";
445
+ var Component = React3.forwardRef(function ButtonComponent(props, reference) {
446
+ return /* @__PURE__ */ jsx11(Button, { ref: reference, component: "a", ...props });
447
+ });
448
+ var CreatedComponent = createLink(Component);
449
+ var RouterButton = (props) => {
450
+ return /* @__PURE__ */ jsx11(CreatedComponent, { ...props });
451
+ };
452
+
453
+ // src/components/router/RouterGridActionsCellItem.tsx
454
+ import { GridActionsCellItem } from "@mui/x-data-grid-premium";
455
+ import { createLink as createLink2 } from "@tanstack/react-router";
456
+ import React4 from "react";
457
+ import { jsx as jsx12 } from "react/jsx-runtime";
458
+ var Component2 = React4.forwardRef(
459
+ function GridActionsCellItemComponent(props, reference) {
460
+ return /* @__PURE__ */ jsx12(GridActionsCellItem, { ref: reference, component: "a", ...props });
461
+ }
462
+ );
463
+ var CreatedComponent2 = createLink2(Component2);
464
+ var RouterGridActionsCellItem = (props) => {
465
+ return /* @__PURE__ */ jsx12(CreatedComponent2, { ...props });
466
+ };
467
+
468
+ // src/components/router/RouterIconButton.tsx
469
+ import { IconButton as IconButton3 } from "@mui/material";
470
+ import { createLink as createLink3 } from "@tanstack/react-router";
471
+ import React5 from "react";
472
+ import { jsx as jsx13 } from "react/jsx-runtime";
473
+ var Component3 = React5.forwardRef(function IconButtonComponent(props, reference) {
474
+ return /* @__PURE__ */ jsx13(IconButton3, { ref: reference, component: "a", ...props });
475
+ });
476
+ var CreatedComponent3 = createLink3(Component3);
477
+ var RouterIconButton = (props) => {
478
+ return /* @__PURE__ */ jsx13(CreatedComponent3, { ...props });
479
+ };
480
+
481
+ // src/components/router/RouterLink.tsx
482
+ import { Link } from "@mui/material";
483
+ import { createLink as createLink4 } from "@tanstack/react-router";
484
+ import React6 from "react";
485
+ import { jsx as jsx14 } from "react/jsx-runtime";
486
+ var Component4 = React6.forwardRef(function LinkComponent(props, reference) {
487
+ return /* @__PURE__ */ jsx14(Link, { ref: reference, ...props });
488
+ });
489
+ var CreatedComponent4 = createLink4(Component4);
490
+ var RouterLink = (props) => {
491
+ return /* @__PURE__ */ jsx14(CreatedComponent4, { ...props });
492
+ };
493
+
494
+ // src/components/router/RouterTab.tsx
495
+ import { Tab } from "@mui/material";
496
+ import { createLink as createLink5 } from "@tanstack/react-router";
497
+ import React7 from "react";
498
+ import { jsx as jsx15 } from "react/jsx-runtime";
499
+ var Component5 = React7.forwardRef(function TabComponent(props, reference) {
500
+ return /* @__PURE__ */ jsx15(Tab, { ref: reference, component: "a", ...props });
501
+ });
502
+ var CreatedComponent5 = createLink5(Component5);
503
+ var RouterTab = (props) => {
504
+ return /* @__PURE__ */ jsx15(CreatedComponent5, { ...props });
505
+ };
506
+
507
+ // src/components/router/RouterNotFound.tsx
508
+ import { Box as Box4, Divider, Typography as Typography3 } from "@mui/material";
509
+ import { useTranslation as useTranslation3 } from "react-i18next";
510
+ import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
511
+ function RouterNotFound() {
512
+ const { t } = useTranslation3();
513
+ 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: [
514
+ /* @__PURE__ */ jsx16(Typography3, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "404" }),
515
+ /* @__PURE__ */ jsx16(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
516
+ /* @__PURE__ */ jsx16(Typography3, { variant: "h5", component: "span", children: t("Layout.ThisPageCouldNotBeFound") })
517
+ ] }) });
518
+ }
519
+
520
+ // src/components/router/RouterError.tsx
521
+ import { Box as Box5, Divider as Divider2, Typography as Typography4 } from "@mui/material";
522
+ import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
523
+ var RouterError = ({ error }) => {
524
+ 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: [
525
+ /* @__PURE__ */ jsx17(Typography4, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: error.name || "500" }),
526
+ /* @__PURE__ */ jsx17(Divider2, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
527
+ /* @__PURE__ */ jsx17(Typography4, { variant: "h5", component: "span", children: error.message })
528
+ ] }) });
529
+ };
530
+ export {
531
+ ChipInputCell,
532
+ Dropzone,
533
+ EditableColumnHeader,
534
+ FileViewer,
535
+ Fullscreen,
536
+ RouterButton,
537
+ RouterError,
538
+ RouterGridActionsCellItem,
539
+ RouterIconButton,
540
+ RouterLink,
541
+ RouterListItemButton,
542
+ RouterNotFound,
543
+ RouterTab,
544
+ TypographyWithIcon
545
+ };
546
+ //# sourceMappingURL=components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/core/TypographyWithIcon.tsx","../src/components/core/Fullscreen.tsx","../src/components/file/Dropzone.tsx","../src/components/file/FileViewer.tsx","../src/components/file/fileViewer/FileViewerGrid.tsx","../src/components/file/fileViewer/common/ActionsMenu.tsx","../src/contexts/FileContext.ts","../src/components/file/fileViewer/FileViewerList.tsx","../src/components/file/fileViewer/ImageViewer.tsx","../src/components/data-grid/ChipInputCell.tsx","../src/components/data-grid/EditableColumnHeader.tsx","../src/components/router/RouterButton.tsx","../src/components/router/RouterGridActionsCellItem.tsx","../src/components/router/RouterIconButton.tsx","../src/components/router/RouterLink.tsx","../src/components/router/RouterTab.tsx","../src/components/router/RouterNotFound.tsx","../src/components/router/RouterError.tsx"],"sourcesContent":["import { Stack, Typography } from \"@mui/material\";\r\nimport type { SxProps, Theme, TypographyProps } from \"@mui/material\";\r\n\r\ninterface TypographyWithIconProps extends TypographyProps {\r\n startIcon?: React.ReactNode;\r\n endIcon?: React.ReactNode;\r\n}\r\n\r\nexport const TypographyWithIcon: React.FC<TypographyWithIconProps> = ({ startIcon, endIcon, children, sx, ...props }) => {\r\n const iconSx: SxProps<Theme> = {\r\n display: \"inline-flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n flexShrink: 0,\r\n lineHeight: 0,\r\n \"& > svg\": {\r\n display: \"block\",\r\n },\r\n };\r\n\r\n return (\r\n <Typography\r\n component=\"span\"\r\n sx={{\r\n display: \"inline-flex\",\r\n alignItems: \"center\",\r\n verticalAlign: \"middle\",\r\n ...sx,\r\n }}\r\n gap={1}\r\n {...props}\r\n >\r\n {startIcon && (\r\n <Stack component=\"span\" sx={iconSx}>\r\n {startIcon}\r\n </Stack>\r\n )}\r\n <Stack component=\"span\" sx={{ display: \"inline\", lineHeight: \"inherit\" }}>\r\n {children}\r\n </Stack>\r\n {endIcon && (\r\n <Stack component=\"span\" sx={iconSx}>\r\n {endIcon}\r\n </Stack>\r\n )}\r\n </Typography>\r\n );\r\n};","import { Box } from \"@mui/material\";\r\nimport { useEffect, useEffectEvent, useRef, useState } from \"react\";\r\nimport type { BoxProps } from \"@mui/material\";\r\nimport type { FC } from \"react\";\r\n\r\nexport const Fullscreen: FC<BoxProps> = ({ children, sx, ...props }) => {\r\n const reference = useRef<HTMLDivElement | null>(null);\r\n const [height, setHeight] = useState<number>();\r\n\r\n const recompute = useEffectEvent(() => {\r\n if (!reference.current) return;\r\n const top = Math.ceil(reference.current.getBoundingClientRect().top);\r\n const avail = Math.max(0, window.innerHeight - top);\r\n setHeight(avail);\r\n });\r\n\r\n useEffect(() => {\r\n const element = reference.current;\r\n if (!element) return;\r\n\r\n recompute();\r\n\r\n window.addEventListener(\"resize\", recompute);\r\n\r\n const ro = new ResizeObserver(recompute);\r\n ro.observe(document.documentElement);\r\n ro.observe(document.body);\r\n ro.observe(element);\r\n\r\n return () => {\r\n window.removeEventListener(\"resize\", recompute);\r\n ro.disconnect();\r\n };\r\n }, []);\r\n\r\n return (\r\n <Box\r\n ref={reference}\r\n sx={{\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n minHeight: 0,\r\n width: \"100%\",\r\n overflow: \"auto\",\r\n ...sx,\r\n }}\r\n height={height}\r\n {...props}\r\n >\r\n {children}\r\n </Box>\r\n );\r\n};","import CloudUpload from \"@mui/icons-material/CloudUpload\";\r\nimport { Paper, Typography, useTheme } from \"@mui/material\";\r\nimport { useDropzone } from \"react-dropzone\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport type { SxProps, Theme} from \"@mui/material\";\r\nimport type { CSSProperties, FC } from \"react\";\r\nimport type { DropzoneOptions} from \"react-dropzone\";\r\n\r\nconst baseStyle: CSSProperties = {\r\n flex: 1,\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n alignItems: \"center\",\r\n padding: \"20px\",\r\n borderWidth: 2,\r\n borderRadius: 2,\r\n borderStyle: \"dashed\",\r\n outline: \"none\",\r\n transition: \"border .24s ease-in-out\",\r\n cursor: \"pointer\",\r\n};\r\n\r\ninterface DropzoneProps extends DropzoneOptions {\r\n sx?: SxProps<Theme>;\r\n}\r\n\r\nexport const Dropzone: FC<DropzoneProps> = ({ sx, ...props }) => {\r\n const { getRootProps, getInputProps, isFocused, isDragAccept, isDragReject, } = useDropzone(props);\r\n const { t } = useTranslation();\r\n const theme = useTheme();\r\n\r\n const style = {\r\n ...baseStyle,\r\n ...(isFocused ? { borderColor: theme.palette.primary.main } : {}),\r\n ...(isDragAccept ? { borderColor: theme.palette.success.main } : {}),\r\n ...(isDragReject ? { borderColor: theme.palette.error.main } : {})\r\n };\r\n\r\n return (\r\n <Paper variant=\"outlined\" {...getRootProps({ style })} sx={sx}>\r\n <input {...getInputProps()} style={{ display: \"none\" }} />\r\n <CloudUpload />\r\n <Typography>{t(\"Layout.File.DragSomeFilesHereOrClickToSelectThem\")}</Typography>\r\n </Paper>\r\n );\r\n};","import { useState } from \"react\";\r\nimport { FileViewerGrid } from \"./fileViewer/FileViewerGrid\";\r\nimport { FileViewerList } from \"./fileViewer/FileViewerList\";\r\nimport { ImageViewer } from \"./fileViewer/ImageViewer\";\r\nimport type { FileViewerGridProps } from \"./fileViewer/FileViewerGrid\";\r\nimport type { ComponentType, FC, ReactNode } from \"react\";\r\nimport type { FileMeta } from \"~/models/file/FileMeta\";\r\nimport type { FileActions } from \"~/models/file/FileActions\";\r\nimport type { FileViewerListProps } from \"./fileViewer/FileViewerList\";\r\nimport { FileContext } from \"~/contexts/FileContext\";\r\nimport { useGetFileMetas } from \"~/queries/FileHooks\";\r\n\r\ninterface FileViewerComponent {\r\n Grid: ComponentType<FileViewerGridProps>;\r\n List: ComponentType<FileViewerListProps>;\r\n}\r\n\r\ninterface FileViewerProps {\r\n subId: string;\r\n onDelete?: (params: { remainingFileMetas: Array<FileMeta>; deletedFileMeta: FileMeta }) => void;\r\n actions?: FileActions;\r\n children: (component: FileViewerComponent) => ReactNode;\r\n}\r\n\r\nexport const FileViewer: FC<FileViewerProps> = ({ subId, onDelete, actions, children }) => {\r\n const { data: fileMetas = [] } = useGetFileMetas({ subId }, { enabled: !!subId });\r\n const [imageId, setImageId] = useState<string>(\"\");\r\n\r\n const components: FileViewerComponent = { Grid: FileViewerGrid, List: FileViewerList };\r\n\r\n if (fileMetas.length === 0) return null;\r\n\r\n return (\r\n <FileContext.Provider value={{ fileMetas, onDelete, actions, setImageId }}>\r\n {children(components)}\r\n <ImageViewer metaId={imageId} />\r\n </FileContext.Provider>\r\n );\r\n};\r\n","import MoreVert from \"@mui/icons-material/MoreVert\";\r\nimport { Box, IconButton, ImageListItem, ImageListItemBar, Stack, Tooltip } from \"@mui/material\";\r\nimport { grey } from \"@mui/material/colors\";\r\nimport React, { Fragment, useEffect, useState } from \"react\";\r\nimport { ActionsMenu } from \"./common/ActionsMenu\";\r\nimport type { SxProps, Theme } from \"@mui/material\";\r\nimport type { FileMeta } from \"~/models/file/FileMeta\";\r\nimport { useFile } from \"~/contexts/FileContext\";\r\nimport { useDownloadFile, useGetFileThumbnail, useOpenFile } from \"~/queries/FileHooks\";\r\n\r\nconst IMAGE_SIZE = 150;\r\n\r\ntype FileViewerGridItemBar = \"hidden\" | \"always\" | \"onMouseEnter\";\r\n\r\nexport interface FileViewerGridProps {\r\n size?: number;\r\n itemBar?: FileViewerGridItemBar;\r\n sx?: SxProps<Theme>;\r\n}\r\n\r\nexport const FileViewerGrid: React.FC<FileViewerGridProps> = ({ sx, size, itemBar }) => {\r\n const { fileMetas } = useFile();\r\n\r\n return (\r\n <Stack direction=\"row\" spacing={1} sx={{ overflow: \"auto\", ...sx }}>\r\n {fileMetas.map(fileMeta => (\r\n <GridFileViewerItem\r\n key={fileMeta.id}\r\n meta={fileMeta}\r\n size={size}\r\n itemBar={itemBar}\r\n />\r\n ))}\r\n </Stack>\r\n );\r\n};\r\n\r\ninterface GridFileViewerItemProps {\r\n meta: FileMeta;\r\n size?: number;\r\n itemBar?: FileViewerGridItemBar;\r\n}\r\n\r\nexport const GridFileViewerItem: React.FC<GridFileViewerItemProps> = ({ meta, size, itemBar }) => {\r\n const { setImageId, actions } = useFile();\r\n const [showItemBar, setShowItemBar] = useState<boolean>(itemBar === \"always\");\r\n const [menu, setMenu] = useState<{ mouseX: number; mouseY: number; } | null>(null);\r\n\r\n useEffect(() => {\r\n setShowItemBar(itemBar === \"always\");\r\n }, [itemBar]);\r\n\r\n const { data: source } = useGetFileThumbnail({ meta });\r\n\r\n const handleOnMouseEnter = () => setShowItemBar(true);\r\n const handleOnMouseLeave = () => itemBar !== \"always\" && setShowItemBar(false);\r\n\r\n const openMenu = (event: React.MouseEvent) => {\r\n setMenu(menu === null ? { mouseX: event.clientX, mouseY: event.clientY, } : null);\r\n setTimeout(() => setShowItemBar(true));\r\n };\r\n\r\n const { mutate: openFile } = useOpenFile();\r\n const { mutate: download } = useDownloadFile();\r\n\r\n const onClick = () => {\r\n switch (meta.mediaType) {\r\n case \"image\": { return setImageId(meta.id); }\r\n case \"application\": { return openFile(meta); }\r\n case \"video\": { return openFile(meta); }\r\n default: { return download(meta); }\r\n }\r\n };\r\n\r\n return (\r\n <Fragment>\r\n <ImageListItem sx={{ width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }} onMouseEnter={handleOnMouseEnter} onMouseLeave={handleOnMouseLeave}>\r\n <Box\r\n component=\"img\"\r\n src={source}\r\n loading=\"lazy\"\r\n alt={\"thumbnail-\" + meta.id}\r\n onClick={onClick}\r\n sx={{ cursor: \"pointer\", objectFit: \"contain\", width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }}\r\n />\r\n {(itemBar !== \"hidden\" && showItemBar) &&\r\n <ImageListItemBar\r\n title={\r\n <Tooltip title={meta.fileName}>\r\n <Box>\r\n {meta.fileName}\r\n </Box>\r\n </Tooltip>\r\n }\r\n actionIcon={\r\n (actions?.download !== false || actions.delete !== false) &&\r\n <IconButton sx={{ color: grey[100] }} onClick={openMenu}>\r\n <MoreVert />\r\n </IconButton>\r\n }\r\n />\r\n }\r\n </ImageListItem>\r\n\r\n {(actions?.download !== false || actions.delete !== false) && <ActionsMenu meta={meta} menu={menu} setMenu={setMenu} />}\r\n </Fragment>\r\n );\r\n};\r\n","import Delete from \"@mui/icons-material/Delete\";\r\nimport FileDownload from \"@mui/icons-material/FileDownload\";\r\nimport { List, ListItemButton, ListItemIcon, ListItemText, Menu } from \"@mui/material\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport type { FC } from \"react\";\r\nimport type { FileMeta } from \"~/models/file/FileMeta\";\r\nimport { useFile } from \"~/contexts/FileContext\";\r\nimport { useDialogs } from \"~/hooks/DialogsHooks\";\r\nimport { useDeleteFile, useDownloadFile } from \"~/queries/FileHooks\";\r\n\r\ninterface ActionsMenuProps {\r\n meta: FileMeta;\r\n menu: { mouseX: number; mouseY: number } | null;\r\n setMenu: (menu: { mouseX: number; mouseY: number } | null) => void;\r\n}\r\n\r\nexport const ActionsMenu: FC<ActionsMenuProps> = ({ meta, menu, setMenu }) => {\r\n const { t } = useTranslation();\r\n const { fileMetas, onDelete, actions } = useFile();\r\n const { confirm } = useDialogs();\r\n\r\n const handleMenuClose = () => { setMenu(null); };\r\n\r\n const { mutate: download, isPending: isDownloading } = useDownloadFile();\r\n const { mutate: deleteFile, isPending: isDeleting } = useDeleteFile();\r\n\r\n const handleOnDownload = () => {\r\n handleMenuClose();\r\n download(meta);\r\n };\r\n\r\n const handleOnDelete = async () => {\r\n if (!await confirm(t(\"Layout.File.AreYouSureYouWantToDelete\", { fileName: meta.fileName })))\r\n return;\r\n\r\n deleteFile(meta);\r\n handleMenuClose();\r\n\r\n if (onDelete) {\r\n const remainingFileMetas: Array<FileMeta> = fileMetas.filter(m => m.id !== meta.id);\r\n onDelete({ remainingFileMetas, deletedFileMeta: meta });\r\n }\r\n };\r\n\r\n return (\r\n <Menu open={menu !== null} onClose={handleMenuClose} anchorReference=\"anchorPosition\" variant=\"menu\"\r\n anchorPosition={menu === null ? undefined : { top: menu.mouseY, left: menu.mouseX }}>\r\n <List disablePadding>\r\n {actions?.download !== false &&\r\n <ListItemButton onClick={handleOnDownload} disabled={isDownloading}>\r\n <ListItemIcon>\r\n <FileDownload />\r\n </ListItemIcon>\r\n <ListItemText>{t(\"Layout.File.Download\")}</ListItemText>\r\n </ListItemButton>\r\n }\r\n {actions?.delete !== false &&\r\n <ListItemButton onClick={handleOnDelete} disabled={isDeleting}>\r\n <ListItemIcon>\r\n <Delete />\r\n </ListItemIcon>\r\n <ListItemText>{t(\"Layout.File.Delete\")}</ListItemText>\r\n </ListItemButton>\r\n }\r\n </List>\r\n </Menu>\r\n );\r\n};\r\n","import { createContext, useContext } from \"react\";\r\nimport type { FileMeta } from \"../models/file/FileMeta\";\r\nimport type { FileActions } from \"~/models/file/FileActions\";\r\n\r\nexport interface FileContextValue {\r\n fileMetas: Array<FileMeta>;\r\n onDelete?: (params: { remainingFileMetas: Array<FileMeta>; deletedFileMeta: FileMeta }) => void;\r\n actions?: FileActions;\r\n setImageId: (imageId: string) => void;\r\n};\r\n\r\nexport const FileContext = createContext<FileContextValue | null>(null);\r\n\r\nexport const useFile = () => {\r\n const context = useContext(FileContext);\r\n if (!context) {\r\n throw new Error(\"FileViewer components must be used within FileViewer\");\r\n }\r\n return context;\r\n};","import AttachFile from \"@mui/icons-material/AttachFile\";\r\nimport Image from \"@mui/icons-material/Image\";\r\nimport MoreVert from \"@mui/icons-material/MoreVert\";\r\nimport SmartDisplay from \"@mui/icons-material/SmartDisplay\";\r\nimport { IconButton, List, ListItemButton, ListItemIcon, ListItemText } from \"@mui/material\";\r\nimport { Fragment, useState } from \"react\";\r\nimport { ActionsMenu } from \"./common/ActionsMenu\";\r\nimport type { FC } from \"react\";\r\nimport type { SxProps, Theme } from \"@mui/material\";\r\nimport type { FileMeta } from \"~/models/file/FileMeta\";\r\nimport { useFile } from \"~/contexts/FileContext\";\r\nimport { useDownloadFile, useOpenFile } from \"~/queries/FileHooks\";\r\n\r\nexport interface FileViewerListProps {\r\n sx?: SxProps<Theme>;\r\n}\r\n\r\nexport const FileViewerList: FC<FileViewerListProps> = ({ sx }) => {\r\n const { fileMetas } = useFile();\r\n\r\n return (\r\n <List dense sx={sx}>\r\n {fileMetas.map(fileMeta =>\r\n <ListFileViewerItem\r\n key={fileMeta.id}\r\n meta={fileMeta}\r\n />\r\n )}\r\n </List>\r\n );\r\n};\r\n\r\ninterface ListFileViewerItemProps {\r\n meta: FileMeta;\r\n}\r\n\r\nexport const ListFileViewerItem: React.FC<ListFileViewerItemProps> = ({ meta }) => {\r\n const { setImageId, actions } = useFile();\r\n const [menu, setMenu] = useState<{ mouseX: number; mouseY: number; } | null>(null);\r\n\r\n const openMenu = (event: React.MouseEvent) => {\r\n event.stopPropagation();\r\n setMenu(menu === null ? { mouseX: event.clientX, mouseY: event.clientY, } : null);\r\n };\r\n\r\n const { mutate: openFile } = useOpenFile();\r\n const { mutate: download } = useDownloadFile();\r\n\r\n const onClick = () => {\r\n switch (meta.mediaType) {\r\n case \"image\": { return setImageId(meta.id); }\r\n case \"application\": { return openFile(meta); }\r\n case \"video\": { return openFile(meta); }\r\n default: { return download(meta); }\r\n }\r\n };\r\n\r\n const icon = () => {\r\n switch (meta.mediaType) {\r\n case \"image\": {\r\n return <Image />;\r\n }\r\n case \"video\": {\r\n return <SmartDisplay />;\r\n }\r\n default: {\r\n return <AttachFile />;\r\n }\r\n }\r\n };\r\n\r\n return (\r\n <Fragment>\r\n <ListItemButton key={meta.id} onClick={onClick}>\r\n <ListItemIcon>\r\n {icon()}\r\n </ListItemIcon>\r\n <ListItemText primary={`${meta.fileName}.${meta.fileExtension}`} />\r\n {(actions?.download !== false || actions.delete !== false) &&\r\n <IconButton edge=\"end\" onClick={openMenu}>\r\n <MoreVert />\r\n </IconButton>\r\n }\r\n </ListItemButton>\r\n\r\n {(actions?.download !== false || actions.delete !== false) && <ActionsMenu meta={meta} menu={menu} setMenu={setMenu} />}\r\n </Fragment>\r\n );\r\n};\r\n","import Close from \"@mui/icons-material/Close\";\r\nimport { Box, Dialog, Fab } from \"@mui/material\";\r\nimport React, { useEffect } from \"react\";\r\nimport type { FileMeta } from \"~/models/file/FileMeta\";\r\nimport { useFile } from \"~/contexts/FileContext\";\r\nimport { useGetFile } from \"~/queries/FileHooks\";\r\n\r\ninterface ImageViewerProps {\r\n metaId: string;\r\n}\r\n\r\nexport const ImageViewer: React.FC<ImageViewerProps> = ({ metaId }) => {\r\n const { fileMetas, setImageId } = useFile();\r\n\r\n const meta = fileMetas.find(m => m.id === metaId)!;\r\n\r\n const { data: source } = useGetFile({ meta });\r\n\r\n useEffect(() => {\r\n if (metaId)\r\n globalThis.addEventListener(\"keydown\", handleOnKeydown);\r\n\r\n return () => { globalThis.removeEventListener(\"keydown\", handleOnKeydown); };\r\n }, [metaId]);\r\n\r\n const handleOnKeydown = (event: KeyboardEvent) => {\r\n const images: Array<FileMeta> = fileMetas.filter(m => m.mediaType === \"image\");\r\n const imageIndex: number = images.findIndex(m => m.id === metaId);\r\n\r\n switch (event.key) {\r\n case \"ArrowLeft\": {\r\n return handleOnArrowLeft(images, imageIndex);\r\n }\r\n case \"ArrowRight\": {\r\n return handleOnArrowRight(images, imageIndex);\r\n }\r\n case \"Backspace\":\r\n case \"Escape\": {\r\n event.preventDefault();\r\n return onClose();\r\n }\r\n }\r\n };\r\n\r\n const handleOnArrowLeft = (images: Array<FileMeta>, index: number) => {\r\n if (index > 0) {\r\n const previousFile: FileMeta = images[index - 1];\r\n setImageId(previousFile.id);\r\n }\r\n };\r\n\r\n const handleOnArrowRight = (images: Array<FileMeta>, index: number) => {\r\n if (index < images.length - 1) {\r\n const nextFile: FileMeta = images[index + 1];\r\n setImageId(nextFile.id);\r\n }\r\n };\r\n\r\n const onClose = () => setImageId(\"\");\r\n\r\n if (!metaId) return null;\r\n\r\n return (\r\n <Dialog open onClose={onClose} maxWidth=\"xl\">\r\n <Box component=\"img\" src={source} alt={metaId} sx={{ maxWidth: \"100vw\", maxHeight: { xs: \"calc(100vh - 56px)\", sm: \"calc(100vh - 64px)\" } }} />\r\n\r\n <Fab size=\"medium\" onClick={onClose} sx={{ position: \"fixed\", top: 8, right: 8 }}>\r\n <Close />\r\n </Fab>\r\n </Dialog>\r\n );\r\n};\r\n","import { Chip, Stack } from \"@mui/material\";\r\nimport type { ChipProps} from \"@mui/material\";\r\nimport type { GridRenderCellParams, GridValidRowModel } from \"@mui/x-data-grid-premium\";\r\n\r\nconst isArray = (value: any) => Array.isArray(value);\r\n\r\ninterface ChipInputCellProps<T extends GridValidRowModel> {\r\n params: GridRenderCellParams<T>;\r\n slotProps?: ChipProps;\r\n getLabel?: (object: T) => string | number;\r\n}\r\n\r\nexport const ChipInputCell = <T extends GridValidRowModel>({ params, slotProps, getLabel }: ChipInputCellProps<T>) => {\r\n if (!params.value) return null;\r\n\r\n const getLabelValue = (value: any) => {\r\n if (getLabel) return getLabel(value);\r\n return value;\r\n };\r\n\r\n if (isArray(params.value))\r\n return (\r\n <Stack direction=\"row\" alignItems=\"center\" gap={1} sx={{ overflowX: \"auto\", height: \"100%\", width: params.colDef.computedWidth }}>\r\n {params.value.map((value: any, index) =>\r\n <Chip key={`${index + 1}-chip-input-cell`} label={getLabelValue(value)} {...slotProps} />\r\n )}\r\n </Stack>\r\n );\r\n\r\n return <Chip label={getLabelValue(params.value)} {...slotProps} />;\r\n};","import Edit from \"@mui/icons-material/Edit\";\r\nimport { TypographyWithIcon } from \"../core/TypographyWithIcon\";\r\nimport type { GridColumnHeaderParams, GridValidRowModel } from \"@mui/x-data-grid-premium\";\r\n\r\nexport const EditableColumnHeader = <T extends GridValidRowModel>({ colDef }: GridColumnHeaderParams<T>) => {\r\n return <TypographyWithIcon endIcon={<Edit color=\"disabled\" fontSize=\"small\" />} variant=\"body2\" className=\"MuiDataGrid-columnHeaderTitle\">{colDef.headerName}</TypographyWithIcon>;\r\n};","import { Button } from \"@mui/material\";\r\nimport { createLink } from \"@tanstack/react-router\";\r\nimport React from \"react\";\r\nimport type { ButtonProps } from \"@mui/material\";\r\nimport type { LinkComponent } from \"@tanstack/react-router\";\r\n\r\nconst Component = React.forwardRef<HTMLAnchorElement, ButtonProps<\"a\">>(function ButtonComponent(props, reference) {\r\n return <Button ref={reference} component=\"a\" {...props} />;\r\n});\r\n\r\nconst CreatedComponent = createLink(Component);\r\n\r\nexport const RouterButton: LinkComponent<typeof Component> = (props) => {\r\n return <CreatedComponent {...props} />;\r\n};","import { GridActionsCellItem } from \"@mui/x-data-grid-premium\";\r\nimport { createLink } from \"@tanstack/react-router\";\r\nimport React from \"react\";\r\nimport type { GridActionsCellItemProps } from \"@mui/x-data-grid-premium\";\r\nimport type { LinkComponent } from \"@tanstack/react-router\";\r\n\r\nconst Component = React.forwardRef<HTMLButtonElement, GridActionsCellItemProps>(\r\n function GridActionsCellItemComponent(props, reference) {\r\n return <GridActionsCellItem ref={reference} component=\"a\" {...props} />;\r\n }\r\n) as React.ForwardRefExoticComponent<GridActionsCellItemProps & React.RefAttributes<HTMLButtonElement>>;\r\n\r\nconst CreatedComponent = createLink(Component);\r\n\r\nexport const RouterGridActionsCellItem: LinkComponent<typeof Component> = (props) => {\r\n return <CreatedComponent {...props} />;\r\n};","import { IconButton } from \"@mui/material\";\r\nimport { createLink } from \"@tanstack/react-router\";\r\nimport React from \"react\";\r\nimport type { IconButtonProps } from \"@mui/material\";\r\nimport type { LinkComponent } from \"@tanstack/react-router\";\r\n\r\nconst Component = React.forwardRef<HTMLAnchorElement, IconButtonProps<\"a\">>(function IconButtonComponent(props, reference) {\r\n return <IconButton ref={reference} component=\"a\" {...props} />;\r\n});\r\n\r\nconst CreatedComponent = createLink(Component);\r\n\r\nexport const RouterIconButton: LinkComponent<typeof Component> = (props) => {\r\n return <CreatedComponent {...props} />;\r\n};","import { Link } from \"@mui/material\";\r\nimport { createLink } from \"@tanstack/react-router\";\r\nimport React from \"react\";\r\nimport type { LinkProps } from \"@mui/material\";\r\nimport type { LinkComponent } from \"@tanstack/react-router\";\r\n\r\nconst Component = React.forwardRef<HTMLAnchorElement, LinkProps>(function LinkComponent(props, reference) {\r\n return <Link ref={reference} {...props} />;\r\n});\r\n\r\nconst CreatedComponent = createLink(Component);\r\n\r\nexport const RouterLink: LinkComponent<typeof Component> = (props) => {\r\n return <CreatedComponent {...props} />;\r\n};","import { Tab } from \"@mui/material\";\r\nimport { createLink } from \"@tanstack/react-router\";\r\nimport React from \"react\";\r\nimport type { TabProps } from \"@mui/material\";\r\nimport type { LinkComponent } from \"@tanstack/react-router\";\r\n\r\nconst Component = React.forwardRef<HTMLAnchorElement, TabProps<\"a\">>(function TabComponent(props, reference) {\r\n return <Tab ref={reference} component=\"a\" {...props} />;\r\n});\r\n\r\nconst CreatedComponent = createLink(Component);\r\n\r\nexport const RouterTab: LinkComponent<typeof Component> = (props) => {\r\n return <CreatedComponent {...props} />;\r\n};","import { Box, Divider, Typography } from \"@mui/material\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nexport function RouterNotFound() {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n <Box height=\"100vh\" display=\"flex\" flexDirection=\"column\" alignItems=\"center\" justifyContent=\"center\" textAlign=\"center\" px={2} >\r\n <Box display=\"flex\" alignItems=\"center\" mb={4}>\r\n <Typography variant=\"h3\" component=\"span\" fontWeight={500} sx={{ lineHeight: 1 }}>404</Typography>\r\n <Divider orientation=\"vertical\" flexItem sx={{ mx: 3 }} />\r\n <Typography variant=\"h5\" component=\"span\">{t(\"Layout.ThisPageCouldNotBeFound\")}</Typography>\r\n </Box>\r\n </Box>\r\n );\r\n}\r\n","import { Box, Divider, Typography } from \"@mui/material\";\r\nimport type { FC } from \"react\";\r\nimport type { ErrorComponentProps } from \"@tanstack/react-router\";\r\n\r\ninterface RouterErrorProps {\r\n error: ErrorComponentProps[\"error\"];\r\n}\r\n\r\nexport const RouterError: FC<RouterErrorProps> = ({ error }) => {\r\n\r\n return (\r\n <Box height=\"100vh\" display=\"flex\" flexDirection=\"column\" alignItems=\"center\" justifyContent=\"center\" textAlign=\"center\" px={2} >\r\n <Box display=\"flex\" alignItems=\"center\" mb={4}>\r\n <Typography variant=\"h3\" component=\"span\" fontWeight={500} sx={{ lineHeight: 1 }}>{error.name || \"500\"}</Typography>\r\n <Divider orientation=\"vertical\" flexItem sx={{ mx: 3 }} />\r\n <Typography variant=\"h5\" component=\"span\">{error.message}</Typography>\r\n </Box>\r\n </Box>\r\n );\r\n};\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAS,OAAO,kBAAkB;AAqB1B,SAYQ,KAZR;AAbD,IAAM,qBAAwD,CAAC,EAAE,WAAW,SAAS,UAAU,IAAI,GAAG,MAAM,MAAM;AACrH,QAAM,SAAyB;AAAA,IAC3B,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,WAAW;AAAA,MACP,SAAS;AAAA,IACb;AAAA,EACJ;AAEA,SACI;AAAA,IAAC;AAAA;AAAA,MACG,WAAU;AAAA,MACV,IAAI;AAAA,QACA,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,eAAe;AAAA,QACf,GAAG;AAAA,MACP;AAAA,MACA,KAAK;AAAA,MACJ,GAAG;AAAA,MAEH;AAAA,qBACG,oBAAC,SA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Translation","jsx","jsxs","useTranslation","jsx","jsxs","Stack","useState","useEffect","Box","MoreVert","IconButton","List","ListItemButton","ListItemIcon","ListItemText","Fragment","useState","jsx","jsxs","List","useState","Fragment","ListItemButton","ListItemIcon","ListItemText","IconButton","MoreVert","Box","useEffect","jsx","jsxs","useEffect","Box","jsx","jsxs","useState","Stack","jsx","jsx","React","jsx","createLink","React","jsx","Component","CreatedComponent","IconButton","createLink","React","jsx","Component","CreatedComponent","createLink","React","jsx","Component","CreatedComponent","createLink","React","jsx","Component","CreatedComponent","Box","Typography","useTranslation","jsx","jsxs","Box","Divider","Typography","jsx","jsxs"]}