wcz-layout 9.6.6 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/AggregatedCell-BtKC5-m6.mjs +497 -0
  2. package/dist/AggregatedCell-BtKC5-m6.mjs.map +1 -0
  3. package/dist/Approval-C-hF4jbT.mjs.map +1 -1
  4. package/dist/DialogsContext-DLqA8RJ_.mjs.map +1 -1
  5. package/dist/Email-BzQQkbe9.mjs.map +1 -1
  6. package/dist/FileMeta-DDqUju1Y.mjs.map +1 -1
  7. package/dist/LayoutTable-4DLs-NI-.d.mts +752 -0
  8. package/dist/{QueryClientParam-Cbb0MIKg.d.mts → QueryClientParam-JcH0mJWl.d.mts} +2 -2
  9. package/dist/RouterListItemButton-ULMlaQh6.mjs.map +1 -1
  10. package/dist/{User-1gKoYJvW.d.mts → User-D4__w1I1.d.mts} +4 -2
  11. package/dist/approval-DFExxyAJ.mjs +84 -0
  12. package/dist/approval-DFExxyAJ.mjs.map +1 -0
  13. package/dist/auth.d.mts +21 -11
  14. package/dist/auth.mjs +43 -26
  15. package/dist/auth.mjs.map +1 -1
  16. package/dist/components.d.mts +22 -30
  17. package/dist/components.mjs +792 -145
  18. package/dist/components.mjs.map +1 -1
  19. package/dist/createApi-CLYWCzR2.mjs +27 -0
  20. package/dist/createApi-CLYWCzR2.mjs.map +1 -0
  21. package/dist/data/client.d.mts +703 -1152
  22. package/dist/data/client.mjs +4 -3
  23. package/dist/data/client.mjs.map +1 -1
  24. package/dist/data/server.d.mts +3 -3
  25. package/dist/data/server.mjs +4 -2
  26. package/dist/data/server.mjs.map +1 -1
  27. package/dist/{file-BTFDDalH.mjs → file-CZwQfvTU.mjs} +8 -27
  28. package/dist/file-CZwQfvTU.mjs.map +1 -0
  29. package/dist/{file-CuvAmdJW.mjs → file-aSQto2rw.mjs} +7 -9
  30. package/dist/file-aSQto2rw.mjs.map +1 -0
  31. package/dist/hooks.d.mts +7 -46
  32. package/dist/hooks.mjs +2578 -239
  33. package/dist/hooks.mjs.map +1 -1
  34. package/dist/index.d.mts +29 -9
  35. package/dist/index.mjs +1257 -499
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/middleware.d.mts +20 -19
  38. package/dist/middleware.mjs +47 -2
  39. package/dist/middleware.mjs.map +1 -1
  40. package/dist/models.d.mts +17 -10
  41. package/dist/models.mjs.map +1 -1
  42. package/dist/{peoplesoft-D4w8d4s1.d.mts → peoplesoft-BY_75WTS.d.mts} +3 -2
  43. package/dist/{peoplesoft-DGdM1bws.mjs → peoplesoft-CQnc01Hc.mjs} +24 -81
  44. package/dist/peoplesoft-CQnc01Hc.mjs.map +1 -0
  45. package/dist/providers-Dbl95AxR.mjs +74 -0
  46. package/dist/providers-Dbl95AxR.mjs.map +1 -0
  47. package/dist/tokens-D8CVIFTb.mjs +143 -0
  48. package/dist/tokens-D8CVIFTb.mjs.map +1 -0
  49. package/dist/{utils-5x4uNxsX.d.mts → utils-Bhi0KiBx.d.mts} +18 -6
  50. package/dist/{utils-DjdexspV.mjs → utils-KaM5VMTJ.mjs} +64 -42
  51. package/dist/utils-KaM5VMTJ.mjs.map +1 -0
  52. package/dist/utils.d.mts +2 -2
  53. package/dist/utils.mjs +2 -2
  54. package/dist/vite.d.mts +1 -2
  55. package/dist/vite.mjs +3 -3
  56. package/dist/vite.mjs.map +1 -1
  57. package/package.json +128 -127
  58. package/skills/client-db/SKILL.md +104 -96
  59. package/skills/db-schema/SKILL.md +46 -33
  60. package/skills/dialogs/SKILL.md +21 -27
  61. package/skills/forms/SKILL.md +60 -39
  62. package/skills/general/SKILL.md +125 -94
  63. package/skills/general/references/exports.md +106 -0
  64. package/skills/migrations/SKILL.md +57 -0
  65. package/skills/migrations/versions/migrate-v9-to-v10.md +581 -0
  66. package/skills/routing/SKILL.md +50 -60
  67. package/skills/server-functions/SKILL.md +36 -56
  68. package/skills/services/SKILL.md +34 -31
  69. package/skills/services/docs/approval.md +2 -2
  70. package/skills/services/docs/peoplesoft.md +1 -1
  71. package/skills/start/SKILL.md +51 -47
  72. package/skills/start/steps/01-git-setup.md +0 -1
  73. package/skills/start/steps/04-wicop-setup.md +105 -80
  74. package/skills/start/steps/05-database-setup.md +13 -5
  75. package/skills/start/steps/06-entra-setup.md +96 -98
  76. package/skills/start/steps/07-vault-setup.md +57 -24
  77. package/skills/table/SKILL.md +275 -0
  78. package/skills/unslop/SKILL.md +80 -0
  79. package/dist/NotificationContext-CgwUOeW0.mjs +0 -7
  80. package/dist/NotificationContext-CgwUOeW0.mjs.map +0 -1
  81. package/dist/authMiddleware-DPly0b_T.mjs +0 -48
  82. package/dist/authMiddleware-DPly0b_T.mjs.map +0 -1
  83. package/dist/entra-CJSyeQsx.mjs +0 -109
  84. package/dist/entra-CJSyeQsx.mjs.map +0 -1
  85. package/dist/file-BTFDDalH.mjs.map +0 -1
  86. package/dist/file-CuvAmdJW.mjs.map +0 -1
  87. package/dist/msalServer-DLwA7_ta.mjs +0 -30
  88. package/dist/msalServer-DLwA7_ta.mjs.map +0 -1
  89. package/dist/peoplesoft-DGdM1bws.mjs.map +0 -1
  90. package/dist/useDialogs-BUzVrTSP.mjs +0 -248
  91. package/dist/useDialogs-BUzVrTSP.mjs.map +0 -1
  92. package/dist/user-Dzv0N9fj.d.mts +0 -16
  93. package/dist/utils-DjdexspV.mjs.map +0 -1
  94. package/skills/data-grid/SKILL.md +0 -142
@@ -1,13 +1,18 @@
1
+ import { d as sanitizeReturnTo, m as loginProvidersQueryOptions } from "./utils-KaM5VMTJ.mjs";
1
2
  import { n as RouterIconButton, t as RouterListItemButton } from "./RouterListItemButton-ULMlaQh6.mjs";
2
- import { a as fileQueryOptions, i as fileMetasQueryOptions, n as deleteFileMutationOptions, o as fileThumbnailQueryOptions, r as downloadFileMutationOptions, s as openFileMutationOptions } from "./file-CuvAmdJW.mjs";
3
- import { t as useDialogs } from "./useDialogs-BUzVrTSP.mjs";
3
+ import { a as fileQueryOptions, i as fileMetasQueryOptions, n as deleteFileMutationOptions, o as fileThumbnailQueryOptions, r as downloadFileMutationOptions, s as openFileMutationOptions } from "./file-aSQto2rw.mjs";
4
+ import { _ as toClipboardText, d as columnAlign, h as pinnedSx, p as hasColumnLabel, t as AggregatedCell, u as cellSelectionSx, v as useDialogs } from "./AggregatedCell-BtKC5-m6.mjs";
4
5
  import { c } from "react/compiler-runtime";
5
- import { Box, Button, CircularProgress, Dialog, Divider, Fab, IconButton, ImageListItem, ImageListItemBar, Link, List, ListItemButton, ListItemIcon, ListItemText, Menu, Skeleton, Stack, Tab, Tooltip, Typography, useTheme } from "@mui/material";
6
+ import { Box, Button, Card, CardContent, CircularProgress, Dialog, Divider, Fab, IconButton, ImageListItem, ImageListItemBar, Link, List, ListItemButton, ListItemIcon, ListItemText, Menu, Paper, Skeleton, Stack, Tab, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TableRow, Tooltip, Typography, alpha, useTheme } from "@mui/material";
6
7
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
7
8
  import React, { Fragment, createContext, useContext, useEffect, useEffectEvent, useLayoutEffect, useRef, useState } from "react";
8
9
  import { useTranslation } from "react-i18next";
9
- import { createLink, rootRouteId, useMatch } from "@tanstack/react-router";
10
- import { jsx, jsxs } from "react/jsx-runtime";
10
+ import { manifest } from "virtual:wcz-layout";
11
+ import { createLink, rootRouteId, useLocation, useMatch } from "@tanstack/react-router";
12
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
+ import Close from "@mui/icons-material/Close";
14
+ import CloudQueue from "@mui/icons-material/CloudQueue";
15
+ import Microsoft from "@mui/icons-material/Microsoft";
11
16
  import CloudUpload from "@mui/icons-material/CloudUpload";
12
17
  import { useDropzone } from "react-dropzone";
13
18
  import MoreVert from "@mui/icons-material/MoreVert";
@@ -18,29 +23,241 @@ import FileDownload from "@mui/icons-material/FileDownload";
18
23
  import AttachFile from "@mui/icons-material/AttachFile";
19
24
  import Image from "@mui/icons-material/Image";
20
25
  import SmartDisplay from "@mui/icons-material/SmartDisplay";
21
- import Close from "@mui/icons-material/Close";
22
- import Edit from "@mui/icons-material/Edit";
23
- import { GridActionsCellItem } from "@mui/x-data-grid-premium";
24
- //#region src/components/core/TypographyWithIcon.tsx
25
- const TypographyWithIcon = ({ startIcon, endIcon, children, gap = 1, sx, ...props }) => /* @__PURE__ */ jsxs(Typography, {
26
- component: "span",
27
- sx: [{
28
- display: "inline-flex",
29
- alignItems: "center",
30
- verticalAlign: "middle",
31
- gap,
32
- "& > svg": {
33
- display: "block",
34
- flexShrink: 0
35
- }
36
- }, ...Array.isArray(sx) ? sx : [sx]],
37
- ...props,
38
- children: [
39
- startIcon,
40
- children,
41
- endIcon
42
- ]
43
- });
26
+ import { useHotkeys } from "@tanstack/react-hotkeys";
27
+ import { useVirtualizer } from "@tanstack/react-virtual";
28
+ //#region src/components/core/account/LoginForm.tsx
29
+ const LAST_PROVIDER_KEY = "auth-provider";
30
+ const PROVIDER_ICON = {
31
+ entra: /* @__PURE__ */ jsx(Microsoft, {}),
32
+ aws: /* @__PURE__ */ jsx(CloudQueue, {})
33
+ };
34
+ /**
35
+ * The provider chooser card. Mount it at `/login` — `requireAuth` redirects there,
36
+ * and it reads `?returnTo` from the URL itself, so it takes no props.
37
+ */
38
+ const LoginForm = () => {
39
+ const $ = c(36);
40
+ if ($[0] !== "768688d2a6d9f6d1b08467771ab00d6ca2dc6a32d0233a10821cfaf230752138") {
41
+ for (let $i = 0; $i < 36; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
42
+ $[0] = "768688d2a6d9f6d1b08467771ab00d6ca2dc6a32d0233a10821cfaf230752138";
43
+ }
44
+ const { data: t0 } = useQuery(loginProvidersQueryOptions);
45
+ let t1;
46
+ if ($[1] !== t0) {
47
+ t1 = t0 === void 0 ? [] : t0;
48
+ $[1] = t0;
49
+ $[2] = t1;
50
+ } else t1 = $[2];
51
+ const providers = t1;
52
+ let t2;
53
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
54
+ t2 = { select: _temp$1 };
55
+ $[3] = t2;
56
+ } else t2 = $[3];
57
+ const search = useLocation(t2);
58
+ let t3;
59
+ if ($[4] !== search.returnTo) {
60
+ t3 = sanitizeReturnTo(search.returnTo);
61
+ $[4] = search.returnTo;
62
+ $[5] = t3;
63
+ } else t3 = $[5];
64
+ const returnTo = t3;
65
+ const { t } = useTranslation();
66
+ const [lastProvider, setLastProvider] = useState(null);
67
+ let t4;
68
+ let t5;
69
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
70
+ t4 = () => setLastProvider(localStorage.getItem(LAST_PROVIDER_KEY));
71
+ t5 = [];
72
+ $[6] = t4;
73
+ $[7] = t5;
74
+ } else {
75
+ t4 = $[6];
76
+ t5 = $[7];
77
+ }
78
+ useEffect(t4, t5);
79
+ const preferred = lastProvider ?? (providers.length === 1 ? providers[0].id : null);
80
+ let t6;
81
+ if ($[8] !== returnTo) {
82
+ t6 = (provider) => () => {
83
+ localStorage.setItem(LAST_PROVIDER_KEY, provider);
84
+ location.href = `/auth/login?provider=${provider}&returnTo=${encodeURIComponent(returnTo)}`;
85
+ };
86
+ $[8] = returnTo;
87
+ $[9] = t6;
88
+ } else t6 = $[9];
89
+ const signIn = t6;
90
+ let t7;
91
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
92
+ t7 = {
93
+ minHeight: "100%",
94
+ display: "flex",
95
+ alignItems: "center",
96
+ justifyContent: "center",
97
+ px: 2,
98
+ py: 6
99
+ };
100
+ $[10] = t7;
101
+ } else t7 = $[10];
102
+ let t8;
103
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
104
+ t8 = [_temp2, _temp3];
105
+ $[11] = t8;
106
+ } else t8 = $[11];
107
+ let t9;
108
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
109
+ t9 = { p: {
110
+ xs: 3,
111
+ sm: 4
112
+ } };
113
+ $[12] = t9;
114
+ } else t9 = $[12];
115
+ let t10;
116
+ let t11;
117
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
118
+ t10 = { alignItems: "center" };
119
+ t11 = /* @__PURE__ */ jsx(Box, {
120
+ component: "img",
121
+ src: "/android-chrome-192x192.png",
122
+ alt: manifest.name,
123
+ width: 48,
124
+ height: 48
125
+ });
126
+ $[13] = t10;
127
+ $[14] = t11;
128
+ } else {
129
+ t10 = $[13];
130
+ t11 = $[14];
131
+ }
132
+ let t12;
133
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
134
+ t12 = /* @__PURE__ */ jsx(Typography, {
135
+ variant: "body2",
136
+ color: "text.secondary",
137
+ sx: { fontWeight: 600 },
138
+ children: manifest.name
139
+ });
140
+ $[15] = t12;
141
+ } else t12 = $[15];
142
+ let t13;
143
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
144
+ t13 = { fontWeight: 700 };
145
+ $[16] = t13;
146
+ } else t13 = $[16];
147
+ let t14;
148
+ if ($[17] !== t) {
149
+ t14 = t("Layout.LogIn");
150
+ $[17] = t;
151
+ $[18] = t14;
152
+ } else t14 = $[18];
153
+ let t15;
154
+ if ($[19] !== t14) {
155
+ t15 = /* @__PURE__ */ jsxs(Stack, {
156
+ direction: "row",
157
+ spacing: 2,
158
+ sx: t10,
159
+ children: [t11, /* @__PURE__ */ jsxs(Stack, {
160
+ spacing: .25,
161
+ children: [t12, /* @__PURE__ */ jsx(Typography, {
162
+ variant: "h5",
163
+ sx: t13,
164
+ children: t14
165
+ })]
166
+ })]
167
+ });
168
+ $[19] = t14;
169
+ $[20] = t15;
170
+ } else t15 = $[20];
171
+ let t16;
172
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
173
+ t16 = /* @__PURE__ */ jsx(Divider, { sx: { my: 3 } });
174
+ $[21] = t16;
175
+ } else t16 = $[21];
176
+ let t17;
177
+ if ($[22] !== preferred || $[23] !== providers || $[24] !== signIn || $[25] !== t) {
178
+ let t18;
179
+ if ($[27] !== preferred || $[28] !== signIn || $[29] !== t) {
180
+ t18 = (t19) => {
181
+ const { id, label } = t19;
182
+ return /* @__PURE__ */ jsx(Button, {
183
+ fullWidth: true,
184
+ size: "large",
185
+ startIcon: PROVIDER_ICON[id],
186
+ variant: id === preferred ? "contained" : "outlined",
187
+ onClick: signIn(id),
188
+ sx: {
189
+ minHeight: 52,
190
+ px: 2,
191
+ borderRadius: 1,
192
+ fontWeight: 600,
193
+ textTransform: "none",
194
+ boxShadow: "none"
195
+ },
196
+ children: t("Layout.ContinueWith", { provider: label })
197
+ }, id);
198
+ };
199
+ $[27] = preferred;
200
+ $[28] = signIn;
201
+ $[29] = t;
202
+ $[30] = t18;
203
+ } else t18 = $[30];
204
+ t17 = providers.map(t18);
205
+ $[22] = preferred;
206
+ $[23] = providers;
207
+ $[24] = signIn;
208
+ $[25] = t;
209
+ $[26] = t17;
210
+ } else t17 = $[26];
211
+ let t18;
212
+ if ($[31] !== t17) {
213
+ t18 = /* @__PURE__ */ jsx(Stack, {
214
+ spacing: 1.5,
215
+ children: t17
216
+ });
217
+ $[31] = t17;
218
+ $[32] = t18;
219
+ } else t18 = $[32];
220
+ let t19;
221
+ if ($[33] !== t15 || $[34] !== t18) {
222
+ t19 = /* @__PURE__ */ jsx(Box, {
223
+ sx: t7,
224
+ children: /* @__PURE__ */ jsx(Card, {
225
+ variant: "outlined",
226
+ sx: t8,
227
+ children: /* @__PURE__ */ jsxs(CardContent, {
228
+ sx: t9,
229
+ children: [
230
+ t15,
231
+ t16,
232
+ t18
233
+ ]
234
+ })
235
+ })
236
+ });
237
+ $[33] = t15;
238
+ $[34] = t18;
239
+ $[35] = t19;
240
+ } else t19 = $[35];
241
+ return t19;
242
+ };
243
+ function _temp$1(location) {
244
+ return location.search;
245
+ }
246
+ function _temp2(theme) {
247
+ return {
248
+ width: "100%",
249
+ maxWidth: 440,
250
+ borderColor: alpha(theme.palette.primary.main, .2),
251
+ borderRadius: 1,
252
+ boxShadow: `0 20px 50px ${alpha(theme.palette.common.black, .08)}`
253
+ };
254
+ }
255
+ function _temp3(theme_0) {
256
+ return theme_0.applyStyles("dark", {
257
+ borderColor: alpha(theme_0.palette.primary.main, .28),
258
+ boxShadow: `0 20px 50px ${alpha(theme_0.palette.common.black, .28)}`
259
+ });
260
+ }
44
261
  //#endregion
45
262
  //#region src/components/core/Fullscreen.tsx
46
263
  const Fullscreen = (t0) => {
@@ -150,9 +367,9 @@ const baseStyle = {
150
367
  };
151
368
  const Dropzone = (t0) => {
152
369
  const $ = c(32);
153
- if ($[0] !== "b5bf5b5d281edd44834873bfefae09761c13d535bf60e1ff80df8ed9edd6a03b") {
370
+ if ($[0] !== "835a1014bc277abe6d9ec1a05ba4c7bf5844ace27aac767fe4a606b16069e907") {
154
371
  for (let $i = 0; $i < 32; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
155
- $[0] = "b5bf5b5d281edd44834873bfefae09761c13d535bf60e1ff80df8ed9edd6a03b";
372
+ $[0] = "835a1014bc277abe6d9ec1a05ba4c7bf5844ace27aac767fe4a606b16069e907";
156
373
  }
157
374
  let progress;
158
375
  let props;
@@ -432,9 +649,9 @@ const ActionsMenu = (t0) => {
432
649
  const IMAGE_SIZE = 150;
433
650
  const FileViewerGrid = (t0) => {
434
651
  const $ = c(13);
435
- if ($[0] !== "bc5b647583214f754be7f38d757996f0eba6fa435240965b8abc15fa6f9a6a5c") {
652
+ if ($[0] !== "fb41b3b0b995b83bc7531222ea82e43374e75765dca0bbfabbc703db4b87aac4") {
436
653
  for (let $i = 0; $i < 13; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
437
- $[0] = "bc5b647583214f754be7f38d757996f0eba6fa435240965b8abc15fa6f9a6a5c";
654
+ $[0] = "fb41b3b0b995b83bc7531222ea82e43374e75765dca0bbfabbc703db4b87aac4";
438
655
  }
439
656
  const { sx, size, itemBar } = t0;
440
657
  const { fileMetas } = useFile();
@@ -576,9 +793,9 @@ const GridFileViewerItem = ({ meta, size, itemBar }) => {
576
793
  //#region src/components/file/fileViewer/FileViewerList.tsx
577
794
  const FileViewerList = (t0) => {
578
795
  const $ = c(6);
579
- if ($[0] !== "e722a3273480830659aee3fb7ea3f313b724a6b70ec66bb9e867418a71728eba") {
796
+ if ($[0] !== "90821c9c06bc31e3067959087f22fa79fc3b392b2e1718015a5455d608dce1c7") {
580
797
  for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
581
- $[0] = "e722a3273480830659aee3fb7ea3f313b724a6b70ec66bb9e867418a71728eba";
798
+ $[0] = "90821c9c06bc31e3067959087f22fa79fc3b392b2e1718015a5455d608dce1c7";
582
799
  }
583
800
  const { sx } = t0;
584
801
  const { fileMetas } = useFile();
@@ -751,63 +968,90 @@ const ImageViewer = ({ metaId }) => {
751
968
  };
752
969
  //#endregion
753
970
  //#region src/components/file/FileViewer.tsx
754
- const FileViewer = ({ appName, subId, onDelete, actions, children }) => {
755
- const { data: fileMetas = [] } = useQuery({
756
- ...fileMetasQueryOptions({
971
+ const FileViewer = (t0) => {
972
+ const $ = c(22);
973
+ if ($[0] !== "f20716e955e976c65e4217e568b647786c1c8599751fff5b227781489170527e") {
974
+ for (let $i = 0; $i < 22; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
975
+ $[0] = "f20716e955e976c65e4217e568b647786c1c8599751fff5b227781489170527e";
976
+ }
977
+ const { appName, subId, onDelete, actions, children } = t0;
978
+ let t1;
979
+ if ($[1] !== appName || $[2] !== subId) {
980
+ t1 = fileMetasQueryOptions({
757
981
  appName,
758
982
  subId
759
- }),
760
- enabled: !!subId
761
- });
983
+ });
984
+ $[1] = appName;
985
+ $[2] = subId;
986
+ $[3] = t1;
987
+ } else t1 = $[3];
988
+ const t2 = !!subId;
989
+ let t3;
990
+ if ($[4] !== t1 || $[5] !== t2) {
991
+ t3 = {
992
+ ...t1,
993
+ enabled: t2
994
+ };
995
+ $[4] = t1;
996
+ $[5] = t2;
997
+ $[6] = t3;
998
+ } else t3 = $[6];
999
+ const { data: t4 } = useQuery(t3);
1000
+ let t5;
1001
+ if ($[7] !== t4) {
1002
+ t5 = t4 === void 0 ? [] : t4;
1003
+ $[7] = t4;
1004
+ $[8] = t5;
1005
+ } else t5 = $[8];
1006
+ const fileMetas = t5;
762
1007
  const [imageId, setImageId] = useState("");
763
1008
  if (fileMetas.length === 0) return null;
764
- return /* @__PURE__ */ jsxs(FileContext.Provider, {
765
- value: {
1009
+ let t6;
1010
+ if ($[9] !== actions || $[10] !== appName || $[11] !== fileMetas || $[12] !== onDelete) {
1011
+ t6 = {
766
1012
  appName,
767
1013
  fileMetas,
768
1014
  onDelete,
769
1015
  actions,
770
1016
  setImageId
771
- },
772
- children: [children({
1017
+ };
1018
+ $[9] = actions;
1019
+ $[10] = appName;
1020
+ $[11] = fileMetas;
1021
+ $[12] = onDelete;
1022
+ $[13] = t6;
1023
+ } else t6 = $[13];
1024
+ let t7;
1025
+ if ($[14] !== children) {
1026
+ t7 = children({
773
1027
  Grid: FileViewerGrid,
774
1028
  List: FileViewerList
775
- }), /* @__PURE__ */ jsx(ImageViewer, { metaId: imageId })]
776
- });
777
- };
778
- //#endregion
779
- //#region src/components/data-grid/EditableColumnHeader.tsx
780
- const EditableColumnHeader = (t0) => {
781
- const $ = c(4);
782
- if ($[0] !== "6a15ed1416d709da03e45c16a891abdc148cf158eccf7a8f811dad6581ee54b2") {
783
- for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
784
- $[0] = "6a15ed1416d709da03e45c16a891abdc148cf158eccf7a8f811dad6581ee54b2";
785
- }
786
- const { colDef } = t0;
787
- let t1;
788
- if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
789
- t1 = /* @__PURE__ */ jsx(Edit, {
790
- color: "disabled",
791
- fontSize: "small"
792
1029
  });
793
- $[1] = t1;
794
- } else t1 = $[1];
795
- let t2;
796
- if ($[2] !== colDef.headerName) {
797
- t2 = /* @__PURE__ */ jsx(TypographyWithIcon, {
798
- endIcon: t1,
799
- variant: "body2",
800
- className: "MuiDataGrid-columnHeaderTitle",
801
- children: colDef.headerName
1030
+ $[14] = children;
1031
+ $[15] = t7;
1032
+ } else t7 = $[15];
1033
+ let t8;
1034
+ if ($[16] !== imageId) {
1035
+ t8 = /* @__PURE__ */ jsx(ImageViewer, { metaId: imageId });
1036
+ $[16] = imageId;
1037
+ $[17] = t8;
1038
+ } else t8 = $[17];
1039
+ let t9;
1040
+ if ($[18] !== t6 || $[19] !== t7 || $[20] !== t8) {
1041
+ t9 = /* @__PURE__ */ jsxs(FileContext.Provider, {
1042
+ value: t6,
1043
+ children: [t7, t8]
802
1044
  });
803
- $[2] = colDef.headerName;
804
- $[3] = t2;
805
- } else t2 = $[3];
806
- return t2;
1045
+ $[18] = t6;
1046
+ $[19] = t7;
1047
+ $[20] = t8;
1048
+ $[21] = t9;
1049
+ } else t9 = $[21];
1050
+ return t9;
807
1051
  };
808
1052
  //#endregion
809
1053
  //#region src/components/router/RouterButton.tsx
810
- const Component$4 = React.forwardRef(function ButtonComponent(props, reference) {
1054
+ const Component$3 = React.forwardRef(function ButtonComponent(props, reference) {
811
1055
  const $ = c(4);
812
1056
  if ($[0] !== "ac6204c9fa419bc8efad3ebea0df725f19f2cc476a09c695e535caec26527133") {
813
1057
  for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
@@ -826,7 +1070,7 @@ const Component$4 = React.forwardRef(function ButtonComponent(props, reference)
826
1070
  } else t0 = $[3];
827
1071
  return t0;
828
1072
  });
829
- const CreatedComponent$4 = createLink(Component$4);
1073
+ const CreatedComponent$3 = createLink(Component$3);
830
1074
  const RouterButton = (props) => {
831
1075
  const $ = c(3);
832
1076
  if ($[0] !== "ac6204c9fa419bc8efad3ebea0df725f19f2cc476a09c695e535caec26527133") {
@@ -835,7 +1079,7 @@ const RouterButton = (props) => {
835
1079
  }
836
1080
  let t0;
837
1081
  if ($[1] !== props) {
838
- t0 = /* @__PURE__ */ jsx(CreatedComponent$4, { ...props });
1082
+ t0 = /* @__PURE__ */ jsx(CreatedComponent$3, { ...props });
839
1083
  $[1] = props;
840
1084
  $[2] = t0;
841
1085
  } else t0 = $[2];
@@ -843,7 +1087,7 @@ const RouterButton = (props) => {
843
1087
  };
844
1088
  //#endregion
845
1089
  //#region src/components/router/RouterFab.tsx
846
- const Component$3 = React.forwardRef(function FabComponent(props, reference) {
1090
+ const Component$2 = React.forwardRef(function FabComponent(props, reference) {
847
1091
  const $ = c(4);
848
1092
  if ($[0] !== "ecf406c2f1df75bd8d4f8cc1e2a0841119cda75e807b28c7c03400a2d927c16b") {
849
1093
  for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
@@ -862,7 +1106,7 @@ const Component$3 = React.forwardRef(function FabComponent(props, reference) {
862
1106
  } else t0 = $[3];
863
1107
  return t0;
864
1108
  });
865
- const CreatedComponent$3 = createLink(Component$3);
1109
+ const CreatedComponent$2 = createLink(Component$2);
866
1110
  const RouterFab = (props) => {
867
1111
  const $ = c(3);
868
1112
  if ($[0] !== "ecf406c2f1df75bd8d4f8cc1e2a0841119cda75e807b28c7c03400a2d927c16b") {
@@ -870,42 +1114,6 @@ const RouterFab = (props) => {
870
1114
  $[0] = "ecf406c2f1df75bd8d4f8cc1e2a0841119cda75e807b28c7c03400a2d927c16b";
871
1115
  }
872
1116
  let t0;
873
- if ($[1] !== props) {
874
- t0 = /* @__PURE__ */ jsx(CreatedComponent$3, { ...props });
875
- $[1] = props;
876
- $[2] = t0;
877
- } else t0 = $[2];
878
- return t0;
879
- };
880
- //#endregion
881
- //#region src/components/router/RouterGridActionsCellItem.tsx
882
- const Component$2 = React.forwardRef(function GridActionsCellItemComponent(props, reference) {
883
- const $ = c(4);
884
- if ($[0] !== "fe0074f677567d6263d3c9001c809e24912c6a92680ef5ea22c5d1aebd696958") {
885
- for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
886
- $[0] = "fe0074f677567d6263d3c9001c809e24912c6a92680ef5ea22c5d1aebd696958";
887
- }
888
- let t0;
889
- if ($[1] !== props || $[2] !== reference) {
890
- t0 = /* @__PURE__ */ jsx(GridActionsCellItem, {
891
- ref: reference,
892
- component: "a",
893
- ...props
894
- });
895
- $[1] = props;
896
- $[2] = reference;
897
- $[3] = t0;
898
- } else t0 = $[3];
899
- return t0;
900
- });
901
- const CreatedComponent$2 = createLink(Component$2);
902
- const RouterGridActionsCellItem = (props) => {
903
- const $ = c(3);
904
- if ($[0] !== "fe0074f677567d6263d3c9001c809e24912c6a92680ef5ea22c5d1aebd696958") {
905
- for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
906
- $[0] = "fe0074f677567d6263d3c9001c809e24912c6a92680ef5ea22c5d1aebd696958";
907
- }
908
- let t0;
909
1117
  if ($[1] !== props) {
910
1118
  t0 = /* @__PURE__ */ jsx(CreatedComponent$2, { ...props });
911
1119
  $[1] = props;
@@ -988,20 +1196,16 @@ const RouterTab = (props) => {
988
1196
  //#region src/components/router/RouterNotFound.tsx
989
1197
  function RouterNotFound() {
990
1198
  const $ = c(9);
991
- if ($[0] !== "a2fff6f270e5984a013a333cd77bf760bd02234c9fba174ec98da467b3cc7c39") {
1199
+ if ($[0] !== "8a932f32be41de20bb279988c19a99e19e47742df0f90842afbafb2f61f78e2b") {
992
1200
  for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
993
- $[0] = "a2fff6f270e5984a013a333cd77bf760bd02234c9fba174ec98da467b3cc7c39";
1201
+ $[0] = "8a932f32be41de20bb279988c19a99e19e47742df0f90842afbafb2f61f78e2b";
994
1202
  }
995
1203
  const { t } = useTranslation();
996
1204
  let t0;
997
1205
  if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
998
1206
  t0 = {
999
- height: "100vh",
1000
- display: "flex",
1001
- flexDirection: "column",
1002
1207
  alignItems: "center",
1003
1208
  justifyContent: "center",
1004
- textAlign: "center",
1005
1209
  px: 2
1006
1210
  };
1007
1211
  $[1] = t0;
@@ -1045,7 +1249,7 @@ function RouterNotFound() {
1045
1249
  } else t4 = $[6];
1046
1250
  let t5;
1047
1251
  if ($[7] !== t4) {
1048
- t5 = /* @__PURE__ */ jsx(Box, {
1252
+ t5 = /* @__PURE__ */ jsx(Fullscreen, {
1049
1253
  sx: t0,
1050
1254
  children: /* @__PURE__ */ jsxs(Box, {
1051
1255
  sx: t1,
@@ -1069,20 +1273,17 @@ function RouterNotFound() {
1069
1273
  //#region src/components/router/RouterError.tsx
1070
1274
  const RouterError = (t0) => {
1071
1275
  const $ = c(12);
1072
- if ($[0] !== "cf071e5896b5a38250f396768818719aba3f257e614991b086e2337a7a292d24") {
1276
+ if ($[0] !== "5b254385a6d8e94b48b6f5b7d9a805c0a6c781995d61d22d20f368b43b726800") {
1073
1277
  for (let $i = 0; $i < 12; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1074
- $[0] = "cf071e5896b5a38250f396768818719aba3f257e614991b086e2337a7a292d24";
1278
+ $[0] = "5b254385a6d8e94b48b6f5b7d9a805c0a6c781995d61d22d20f368b43b726800";
1075
1279
  }
1076
1280
  const { error } = t0;
1281
+ const isError = error instanceof Error;
1077
1282
  let t1;
1078
1283
  if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
1079
1284
  t1 = {
1080
- height: "100vh",
1081
- display: "flex",
1082
- flexDirection: "column",
1083
1285
  alignItems: "center",
1084
1286
  justifyContent: "center",
1085
- textAlign: "center",
1086
1287
  px: 2
1087
1288
  };
1088
1289
  $[1] = t1;
@@ -1104,7 +1305,7 @@ const RouterError = (t0) => {
1104
1305
  };
1105
1306
  $[3] = t3;
1106
1307
  } else t3 = $[3];
1107
- const t4 = error.name || "500";
1308
+ const t4 = isError && error.name || "500";
1108
1309
  let t5;
1109
1310
  if ($[4] !== t4) {
1110
1311
  t5 = /* @__PURE__ */ jsx(Typography, {
@@ -1125,36 +1326,482 @@ const RouterError = (t0) => {
1125
1326
  });
1126
1327
  $[6] = t6;
1127
1328
  } else t6 = $[6];
1128
- let t7;
1129
- if ($[7] !== error.message) {
1130
- t7 = /* @__PURE__ */ jsx(Typography, {
1329
+ const t7 = isError ? error.message : String(error);
1330
+ let t8;
1331
+ if ($[7] !== t7) {
1332
+ t8 = /* @__PURE__ */ jsx(Typography, {
1131
1333
  variant: "h5",
1132
1334
  component: "span",
1133
- children: error.message
1335
+ children: t7
1134
1336
  });
1135
- $[7] = error.message;
1136
- $[8] = t7;
1137
- } else t7 = $[8];
1138
- let t8;
1139
- if ($[9] !== t5 || $[10] !== t7) {
1140
- t8 = /* @__PURE__ */ jsx(Box, {
1337
+ $[7] = t7;
1338
+ $[8] = t8;
1339
+ } else t8 = $[8];
1340
+ let t9;
1341
+ if ($[9] !== t5 || $[10] !== t8) {
1342
+ t9 = /* @__PURE__ */ jsx(Fullscreen, {
1141
1343
  sx: t1,
1142
1344
  children: /* @__PURE__ */ jsxs(Box, {
1143
1345
  sx: t2,
1144
1346
  children: [
1145
1347
  t5,
1146
1348
  t6,
1147
- t7
1349
+ t8
1148
1350
  ]
1149
1351
  })
1150
1352
  });
1151
1353
  $[9] = t5;
1152
- $[10] = t7;
1153
- $[11] = t8;
1154
- } else t8 = $[11];
1155
- return t8;
1354
+ $[10] = t8;
1355
+ $[11] = t9;
1356
+ } else t9 = $[11];
1357
+ return t9;
1358
+ };
1359
+ //#endregion
1360
+ //#region src/components/table/LayoutTable.tsx
1361
+ const ROW_HEIGHT = 52;
1362
+ const COLUMN_HEADER_HEIGHT = 56;
1363
+ /** Rows and columns kept mounted past the viewport edge so scrolling never shows a gap. */
1364
+ const ROW_OVERSCAN = 6;
1365
+ const COLUMN_OVERSCAN = 3;
1366
+ const JUSTIFY = {
1367
+ left: "flex-start",
1368
+ center: "center",
1369
+ right: "flex-end"
1370
+ };
1371
+ const CELL_SX = {
1372
+ py: 0,
1373
+ px: "10px"
1374
+ };
1375
+ const UTILITY_SX = {
1376
+ py: 0,
1377
+ px: .5
1378
+ };
1379
+ /** Pins the aggregation row to the bottom of the scroll area, like the sticky header. */
1380
+ const FOOTER_SX = {
1381
+ position: "sticky",
1382
+ bottom: 0,
1383
+ zIndex: 3,
1384
+ bgcolor: "background.paper",
1385
+ borderTop: 1,
1386
+ borderTopStyle: "solid",
1387
+ borderColor: "divider"
1156
1388
  };
1389
+ const pinnedWidth = (columns) => columns.reduce((total, column) => total + column.getSize(), 0);
1390
+ function LayoutTable({ table, loading = false, pagination = false, pageSizeOptions = [
1391
+ 10,
1392
+ 25,
1393
+ 50,
1394
+ 100
1395
+ ], showToolbar = false, disableColumnMenu = false, onRowClick, onRowDoubleClick, sx, ...toolbar }) {
1396
+ "use no memo";
1397
+ const { t } = useTranslation();
1398
+ const containerRef = useRef(null);
1399
+ const headerGroups = table.getHeaderGroups();
1400
+ const headerHeight = headerGroups.length * COLUMN_HEADER_HEIGHT;
1401
+ const visibleColumnCount = table.getVisibleLeafColumns().length;
1402
+ const hasFooter = table.getAllLeafColumns().some((column) => column.columnDef.footer);
1403
+ const { top, bottom } = table.state.rowPinning;
1404
+ const pinnedIds = /* @__PURE__ */ new Set([...top, ...bottom]);
1405
+ const centerRows = (pagination ? table.getRowModel() : table.getPrePaginatedRowModel()).rows.filter((row) => !pinnedIds.has(row.id));
1406
+ const rows = [
1407
+ ...table.getTopRows(),
1408
+ ...centerRows,
1409
+ ...table.getBottomRows()
1410
+ ];
1411
+ const isEmpty = !loading && !rows.length;
1412
+ const pageSize = table.state.pagination.pageSize;
1413
+ useEffect(() => {
1414
+ if (!pagination && pageSize !== rows.length) table.setPageSize(Math.max(rows.length, 1));
1415
+ }, [
1416
+ pagination,
1417
+ pageSize,
1418
+ rows.length,
1419
+ table
1420
+ ]);
1421
+ const startColumns = table.getStartVisibleLeafColumns();
1422
+ const endColumns = table.getEndVisibleLeafColumns();
1423
+ const centerColumns = table.getCenterVisibleLeafColumns();
1424
+ const startPinnedWidth = pinnedWidth(startColumns);
1425
+ const endPinnedWidth = pinnedWidth(endColumns);
1426
+ const virtualizeColumns = headerGroups.length === 1 && !loading;
1427
+ const rowVirtualizer = useVirtualizer({
1428
+ count: rows.length,
1429
+ getScrollElement: () => containerRef.current,
1430
+ estimateSize: () => ROW_HEIGHT,
1431
+ getItemKey: (index) => rows[index].id,
1432
+ overscan: ROW_OVERSCAN,
1433
+ scrollMargin: headerHeight,
1434
+ scrollPaddingStart: headerHeight
1435
+ });
1436
+ const columnVirtualizer = useVirtualizer({
1437
+ count: virtualizeColumns ? centerColumns.length : 0,
1438
+ getScrollElement: () => containerRef.current,
1439
+ estimateSize: (index_0) => centerColumns[index_0].getSize(),
1440
+ getItemKey: (index_1) => centerColumns[index_1].id,
1441
+ horizontal: true,
1442
+ overscan: COLUMN_OVERSCAN,
1443
+ scrollPaddingStart: startPinnedWidth,
1444
+ scrollPaddingEnd: endPinnedWidth
1445
+ });
1446
+ const columnSizing = table.state.columnSizing;
1447
+ useEffect(() => {
1448
+ columnVirtualizer.measure();
1449
+ }, [columnVirtualizer, columnSizing]);
1450
+ const focusedCell = table.getFocusedCell();
1451
+ const focusedRowId = focusedCell?.row.id;
1452
+ const focusedColumnId = focusedCell?.column.id;
1453
+ useEffect(() => {
1454
+ const cell = containerRef.current?.querySelector("tbody td[tabindex='0']");
1455
+ if (cell) {
1456
+ cell.scrollIntoView({
1457
+ block: "nearest",
1458
+ inline: "nearest"
1459
+ });
1460
+ return;
1461
+ }
1462
+ const rowIndex = rows.findIndex((row_0) => row_0.id === focusedRowId);
1463
+ if (rowIndex >= 0) rowVirtualizer.scrollToIndex(rowIndex);
1464
+ const columnIndex = centerColumns.findIndex((column_0) => column_0.id === focusedColumnId);
1465
+ if (columnIndex >= 0) columnVirtualizer.scrollToIndex(columnIndex);
1466
+ }, [focusedRowId, focusedColumnId]);
1467
+ const hasCellSelection = table.state.cellSelection.length > 0;
1468
+ const copySelection = () => {
1469
+ const text = toClipboardText(table.getSelectedCellRangesData());
1470
+ if (text) navigator.clipboard.writeText(text);
1471
+ };
1472
+ useHotkeys([
1473
+ {
1474
+ hotkey: "ArrowUp",
1475
+ callback: () => table.moveCellSelection("up")
1476
+ },
1477
+ {
1478
+ hotkey: "ArrowDown",
1479
+ callback: () => table.moveCellSelection("down")
1480
+ },
1481
+ {
1482
+ hotkey: "ArrowLeft",
1483
+ callback: () => table.moveCellSelection("left")
1484
+ },
1485
+ {
1486
+ hotkey: "ArrowRight",
1487
+ callback: () => table.moveCellSelection("right")
1488
+ },
1489
+ {
1490
+ hotkey: "Shift+ArrowUp",
1491
+ callback: () => table.extendCellSelection("up")
1492
+ },
1493
+ {
1494
+ hotkey: "Shift+ArrowDown",
1495
+ callback: () => table.extendCellSelection("down")
1496
+ },
1497
+ {
1498
+ hotkey: "Shift+ArrowLeft",
1499
+ callback: () => table.extendCellSelection("left")
1500
+ },
1501
+ {
1502
+ hotkey: "Shift+ArrowRight",
1503
+ callback: () => table.extendCellSelection("right")
1504
+ },
1505
+ {
1506
+ hotkey: "Mod+C",
1507
+ callback: copySelection
1508
+ },
1509
+ {
1510
+ hotkey: "Escape",
1511
+ callback: () => table.resetCellSelection(true)
1512
+ },
1513
+ {
1514
+ hotkey: "Mod+A",
1515
+ callback: () => table.selectAllCells(),
1516
+ options: { enabled: true }
1517
+ }
1518
+ ], {
1519
+ target: containerRef,
1520
+ enabled: hasCellSelection
1521
+ });
1522
+ const virtualRows = rowVirtualizer.getVirtualItems();
1523
+ const paddingTop = virtualRows.length ? virtualRows[0].start - headerHeight : 0;
1524
+ const paddingBottom = virtualRows.length ? rowVirtualizer.getTotalSize() - virtualRows[virtualRows.length - 1].end + headerHeight : 0;
1525
+ const virtualColumns = columnVirtualizer.getVirtualItems();
1526
+ const firstColumn = virtualColumns.length ? virtualColumns[0] : void 0;
1527
+ const lastColumn = virtualColumns.length ? virtualColumns[virtualColumns.length - 1] : void 0;
1528
+ const paddingStart = firstColumn ? firstColumn.start : 0;
1529
+ const paddingEnd = lastColumn ? columnVirtualizer.getTotalSize() - lastColumn.end : 0;
1530
+ /**
1531
+ * Splits a display-ordered leaf array — a header row, a footer row or a row's
1532
+ * cells, which TanStack all orders start-pinned, centre, end-pinned — into the
1533
+ * pinned regions, which always render, and the virtualized centre window.
1534
+ */
1535
+ const windowColumns = (all) => firstColumn && lastColumn ? {
1536
+ start: all.slice(0, startColumns.length),
1537
+ center: all.slice(startColumns.length + firstColumn.index, startColumns.length + lastColumn.index + 1),
1538
+ end: endColumns.length ? all.slice(all.length - endColumns.length) : []
1539
+ } : {
1540
+ start: all,
1541
+ center: [],
1542
+ end: []
1543
+ };
1544
+ /** Absorbs the width of the columns the centre window skipped. */
1545
+ const skippedColumns = (width) => width > 0 ? /* @__PURE__ */ jsx(TableCell, {
1546
+ "aria-hidden": true,
1547
+ style: { width },
1548
+ sx: { p: 0 }
1549
+ }) : null;
1550
+ const renderHeader = (h, groupIndex) => /* @__PURE__ */ jsx(table.AppHeader, {
1551
+ header: h,
1552
+ children: (header) => {
1553
+ const align = columnAlign(header.column);
1554
+ const labelled = hasColumnLabel(header.column);
1555
+ return /* @__PURE__ */ jsxs(TableCell, {
1556
+ colSpan: header.colSpan,
1557
+ align,
1558
+ sortDirection: header.column.getIsSorted(),
1559
+ sx: {
1560
+ position: "sticky",
1561
+ top: groupIndex * COLUMN_HEADER_HEIGHT,
1562
+ zIndex: 3,
1563
+ bgcolor: "background.paper",
1564
+ width: header.getSize(),
1565
+ whiteSpace: "nowrap",
1566
+ overflow: "hidden",
1567
+ ...labelled ? CELL_SX : UTILITY_SX,
1568
+ ...pinnedSx(header.column, true)
1569
+ },
1570
+ children: [header.isPlaceholder ? null : /* @__PURE__ */ jsxs(Box, {
1571
+ sx: {
1572
+ display: "flex",
1573
+ alignItems: "center",
1574
+ minWidth: 0,
1575
+ justifyContent: JUSTIFY[align]
1576
+ },
1577
+ children: [/* @__PURE__ */ jsx(Box, {
1578
+ sx: {
1579
+ flex: labelled ? 1 : "0 1 auto",
1580
+ minWidth: 0,
1581
+ display: "flex",
1582
+ justifyContent: JUSTIFY[align],
1583
+ overflow: "hidden",
1584
+ "& .MuiTableSortLabel-root": { minWidth: 0 },
1585
+ "& .MuiTableSortLabel-root > *:first-of-type": {
1586
+ overflow: "hidden",
1587
+ textOverflow: "ellipsis"
1588
+ }
1589
+ },
1590
+ children: /* @__PURE__ */ jsx(header.HeaderSortLabel, { children: /* @__PURE__ */ jsx(header.FlexRender, {}) })
1591
+ }), !disableColumnMenu && /* @__PURE__ */ jsx(header.HeaderMenu, {})]
1592
+ }), /* @__PURE__ */ jsx(header.HeaderResizeHandle, {})]
1593
+ });
1594
+ }
1595
+ }, h.id);
1596
+ const renderCell = (c) => /* @__PURE__ */ jsx(table.AppCell, {
1597
+ cell: c,
1598
+ children: (cell_0) => cell_0.getIsCovered() ? null : /* @__PURE__ */ jsx(TableCell, {
1599
+ align: columnAlign(cell_0.column),
1600
+ rowSpan: cell_0.getRowSpan(),
1601
+ colSpan: cell_0.getColSpan(),
1602
+ tabIndex: cell_0.getCanSelect() ? cell_0.getTabIndex() : void 0,
1603
+ onMouseDown: cell_0.getSelectionStartHandler(),
1604
+ onMouseEnter: cell_0.getSelectionExtendHandler(),
1605
+ sx: {
1606
+ overflow: "hidden",
1607
+ textOverflow: "ellipsis",
1608
+ whiteSpace: "nowrap",
1609
+ userSelect: cell_0.getCanSelect() ? "none" : void 0,
1610
+ ...hasColumnLabel(cell_0.column) ? CELL_SX : UTILITY_SX,
1611
+ ...pinnedSx(cell_0.column),
1612
+ ...cellSelectionSx(cell_0)
1613
+ },
1614
+ children: cell_0.getIsGrouped() ? /* @__PURE__ */ jsx(cell_0.GroupCell, {}) : cell_0.row.getIsGrouped() && !cell_0.getIsAggregated() ? null : /* @__PURE__ */ jsx(cell_0.FlexRender, {})
1615
+ })
1616
+ }, c.id);
1617
+ const renderFooter = (f) => /* @__PURE__ */ jsx(table.AppFooter, {
1618
+ header: f,
1619
+ children: (footer) => /* @__PURE__ */ jsx(TableCell, {
1620
+ colSpan: footer.colSpan,
1621
+ align: columnAlign(footer.column),
1622
+ sx: {
1623
+ ...hasColumnLabel(footer.column) ? CELL_SX : UTILITY_SX,
1624
+ ...pinnedSx(footer.column),
1625
+ ...FOOTER_SX
1626
+ },
1627
+ children: footer.isPlaceholder ? null : /* @__PURE__ */ jsx(footer.FlexRender, {})
1628
+ })
1629
+ }, f.id);
1630
+ const renderRow = (row_1) => {
1631
+ const cells = windowColumns(row_1.getVisibleCells());
1632
+ return /* @__PURE__ */ jsxs(TableRow, {
1633
+ hover: true,
1634
+ selected: row_1.getIsSelected(),
1635
+ onClick: onRowClick && (() => onRowClick(row_1)),
1636
+ onDoubleClick: onRowDoubleClick && (() => onRowDoubleClick(row_1)),
1637
+ sx: {
1638
+ height: ROW_HEIGHT,
1639
+ cursor: onRowClick || onRowDoubleClick ? "pointer" : void 0
1640
+ },
1641
+ children: [
1642
+ cells.start.map(renderCell),
1643
+ skippedColumns(paddingStart),
1644
+ cells.center.map(renderCell),
1645
+ skippedColumns(paddingEnd),
1646
+ cells.end.map(renderCell),
1647
+ /* @__PURE__ */ jsx(TableCell, {
1648
+ "aria-hidden": true,
1649
+ sx: { p: 0 }
1650
+ })
1651
+ ]
1652
+ }, row_1.id);
1653
+ };
1654
+ /** Reserves the scroll height of the rows outside the virtual window. */
1655
+ const skippedRows = (height) => height > 0 ? /* @__PURE__ */ jsx(TableRow, {
1656
+ "aria-hidden": true,
1657
+ style: { height },
1658
+ children: /* @__PURE__ */ jsx(TableCell, {
1659
+ colSpan: visibleColumnCount + 1,
1660
+ sx: {
1661
+ p: 0,
1662
+ border: 0
1663
+ }
1664
+ })
1665
+ }) : null;
1666
+ return /* @__PURE__ */ jsx(table.AppTable, { children: /* @__PURE__ */ jsxs(Paper, {
1667
+ variant: "outlined",
1668
+ sx: {
1669
+ display: "flex",
1670
+ flexDirection: "column",
1671
+ height: "100%",
1672
+ minHeight: 0,
1673
+ overflow: "hidden",
1674
+ ...sx
1675
+ },
1676
+ children: [
1677
+ showToolbar && /* @__PURE__ */ jsx(table.Toolbar, { ...toolbar }),
1678
+ /* @__PURE__ */ jsx(TableContainer, {
1679
+ ref: containerRef,
1680
+ sx: {
1681
+ flex: 1,
1682
+ minHeight: 0,
1683
+ position: "relative",
1684
+ scrollPaddingBlockStart: `${headerHeight}px`,
1685
+ scrollPaddingInlineStart: `${startPinnedWidth}px`,
1686
+ scrollPaddingInlineEnd: `${endPinnedWidth}px`
1687
+ },
1688
+ children: /* @__PURE__ */ jsxs(Table, {
1689
+ stickyHeader: true,
1690
+ size: "small",
1691
+ sx: {
1692
+ tableLayout: "fixed",
1693
+ width: table.getTotalSize(),
1694
+ minWidth: "100%",
1695
+ "& tbody .MuiTableRow-root:last-of-type .MuiTableCell-root": { borderBottom: 0 },
1696
+ "& .MuiTableCell-root:focus": {
1697
+ outline: "1px solid",
1698
+ outlineColor: "primary.main",
1699
+ outlineOffset: -1
1700
+ }
1701
+ },
1702
+ children: [
1703
+ /* @__PURE__ */ jsx(TableHead, { children: headerGroups.map((headerGroup, groupIndex_0) => {
1704
+ const headers = windowColumns(headerGroup.headers.filter((header_0) => header_0.column.getIsVisible()));
1705
+ return /* @__PURE__ */ jsxs(TableRow, {
1706
+ sx: { height: COLUMN_HEADER_HEIGHT },
1707
+ children: [
1708
+ headers.start.map((h_0) => renderHeader(h_0, groupIndex_0)),
1709
+ skippedColumns(paddingStart),
1710
+ headers.center.map((h_1) => renderHeader(h_1, groupIndex_0)),
1711
+ skippedColumns(paddingEnd),
1712
+ headers.end.map((h_2) => renderHeader(h_2, groupIndex_0)),
1713
+ /* @__PURE__ */ jsx(TableCell, {
1714
+ "aria-hidden": true,
1715
+ sx: {
1716
+ p: 0,
1717
+ position: "sticky",
1718
+ top: groupIndex_0 * COLUMN_HEADER_HEIGHT,
1719
+ zIndex: 3,
1720
+ bgcolor: "background.paper"
1721
+ }
1722
+ })
1723
+ ]
1724
+ }, headerGroup.id);
1725
+ }) }),
1726
+ /* @__PURE__ */ jsxs(TableBody, { children: [loading ? /* @__PURE__ */ jsx(table.Skeleton, { rowHeight: ROW_HEIGHT }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
1727
+ skippedRows(paddingTop),
1728
+ virtualRows.map((virtualRow) => renderRow(rows[virtualRow.index])),
1729
+ skippedRows(paddingBottom)
1730
+ ] }), isEmpty && /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, {
1731
+ colSpan: visibleColumnCount + 1,
1732
+ sx: {
1733
+ border: 0,
1734
+ p: 0
1735
+ },
1736
+ children: /* @__PURE__ */ jsxs(Box, {
1737
+ sx: {
1738
+ position: "absolute",
1739
+ top: headerHeight,
1740
+ left: 0,
1741
+ right: 0,
1742
+ bottom: 0,
1743
+ display: "flex",
1744
+ flexDirection: "column",
1745
+ alignItems: "center",
1746
+ justifyContent: "center",
1747
+ gap: 1,
1748
+ color: "text.secondary",
1749
+ bgcolor: "background.paper",
1750
+ "& .no-rows-primary": { opacity: .7 },
1751
+ "& .no-rows-secondary": { opacity: .3 }
1752
+ },
1753
+ children: [/* @__PURE__ */ jsxs("svg", {
1754
+ fill: "currentColor",
1755
+ width: 96,
1756
+ viewBox: "0 0 452 257",
1757
+ "aria-hidden": true,
1758
+ focusable: "false",
1759
+ children: [
1760
+ /* @__PURE__ */ jsx("path", {
1761
+ className: "no-rows-primary",
1762
+ d: "M348 69c-46.392 0-84 37.608-84 84s37.608 84 84 84 84-37.608 84-84-37.608-84-84-84Zm-104 84c0-57.438 46.562-104 104-104s104 46.562 104 104-46.562 104-104 104-104-46.562-104-104Z"
1763
+ }),
1764
+ /* @__PURE__ */ jsx("path", {
1765
+ className: "no-rows-primary",
1766
+ d: "M308.929 113.929c3.905-3.905 10.237-3.905 14.142 0l63.64 63.64c3.905 3.905 3.905 10.236 0 14.142-3.906 3.905-10.237 3.905-14.142 0l-63.64-63.64c-3.905-3.905-3.905-10.237 0-14.142Z"
1767
+ }),
1768
+ /* @__PURE__ */ jsx("path", {
1769
+ className: "no-rows-primary",
1770
+ d: "M308.929 191.711c-3.905-3.906-3.905-10.237 0-14.142l63.64-63.64c3.905-3.905 10.236-3.905 14.142 0 3.905 3.905 3.905 10.237 0 14.142l-63.64 63.64c-3.905 3.905-10.237 3.905-14.142 0Z"
1771
+ }),
1772
+ /* @__PURE__ */ jsx("path", {
1773
+ className: "no-rows-secondary",
1774
+ d: "M0 10C0 4.477 4.477 0 10 0h380c5.523 0 10 4.477 10 10s-4.477 10-10 10H10C4.477 20 0 15.523 0 10ZM0 59c0-5.523 4.477-10 10-10h231c5.523 0 10 4.477 10 10s-4.477 10-10 10H10C4.477 69 0 64.523 0 59ZM0 106c0-5.523 4.477-10 10-10h203c5.523 0 10 4.477 10 10s-4.477 10-10 10H10c-5.523 0-10-4.477-10-10ZM0 153c0-5.523 4.477-10 10-10h195.5c5.523 0 10 4.477 10 10s-4.477 10-10 10H10c-5.523 0-10-4.477-10-10ZM0 200c0-5.523 4.477-10 10-10h203c5.523 0 10 4.477 10 10s-4.477 10-10 10H10c-5.523 0-10-4.477-10-10ZM0 247c0-5.523 4.477-10 10-10h231c5.523 0 10 4.477 10 10s-4.477 10-10 10H10c-5.523 0-10-4.477-10-10Z"
1775
+ })
1776
+ ]
1777
+ }), /* @__PURE__ */ jsx(Box, { children: t("Layout.Table.NoRows") })]
1778
+ })
1779
+ }) })] }),
1780
+ hasFooter && /* @__PURE__ */ jsx(TableFooter, { children: table.getFooterGroups().map((footerGroup) => {
1781
+ const footers = windowColumns(footerGroup.headers.filter((header_1) => header_1.column.getIsVisible()));
1782
+ return /* @__PURE__ */ jsxs(TableRow, { children: [
1783
+ footers.start.map(renderFooter),
1784
+ skippedColumns(paddingStart),
1785
+ footers.center.map(renderFooter),
1786
+ skippedColumns(paddingEnd),
1787
+ footers.end.map(renderFooter),
1788
+ /* @__PURE__ */ jsx(TableCell, {
1789
+ "aria-hidden": true,
1790
+ sx: {
1791
+ p: 0,
1792
+ ...FOOTER_SX
1793
+ }
1794
+ })
1795
+ ] }, footerGroup.id);
1796
+ }) })
1797
+ ]
1798
+ })
1799
+ }),
1800
+ pagination && /* @__PURE__ */ jsx(table.Pagination, { pageSizeOptions })
1801
+ ]
1802
+ }) });
1803
+ }
1157
1804
  //#endregion
1158
- export { Dropzone, EditableColumnHeader, FileViewer, Fullscreen, RouterButton, RouterError, RouterFab, RouterGridActionsCellItem, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab, TypographyWithIcon };
1805
+ export { AggregatedCell, Dropzone, FileViewer, Fullscreen, LayoutTable, LoginForm, RouterButton, RouterError, RouterFab, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab };
1159
1806
 
1160
1807
  //# sourceMappingURL=components.mjs.map