wcz-layout 9.7.0 → 10.1.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 (93) hide show
  1. package/dist/AggregatedCell-C7nAQyMO.mjs +510 -0
  2. package/dist/AggregatedCell-C7nAQyMO.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-BkrjgpW_.d.mts +758 -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-BYryxFOW.mjs +84 -0
  12. package/dist/approval-BYryxFOW.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 +813 -140
  18. package/dist/components.mjs.map +1 -1
  19. package/dist/createApi-DGJJ4I_R.mjs +27 -0
  20. package/dist/createApi-DGJJ4I_R.mjs.map +1 -0
  21. package/dist/data/client.d.mts +690 -1176
  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-DimNsRly.mjs → file-C14fhUeg.mjs} +6 -7
  28. package/dist/file-C14fhUeg.mjs.map +1 -0
  29. package/dist/{file-BWcNzq55.mjs → file-C5BOj1q8.mjs} +5 -24
  30. package/dist/file-C5BOj1q8.mjs.map +1 -0
  31. package/dist/hooks.d.mts +7 -46
  32. package/dist/hooks.mjs +2587 -239
  33. package/dist/hooks.mjs.map +1 -1
  34. package/dist/index.d.mts +28 -9
  35. package/dist/index.mjs +1248 -500
  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-CskGsqd6.d.mts → peoplesoft-BY_75WTS.d.mts} +2 -2
  43. package/dist/{peoplesoft-DTPGpN2h.mjs → peoplesoft-BkJMCcHb.mjs} +24 -81
  44. package/dist/peoplesoft-BkJMCcHb.mjs.map +1 -0
  45. package/dist/providers-DrairEO2.mjs +74 -0
  46. package/dist/providers-DrairEO2.mjs.map +1 -0
  47. package/dist/tokens-BLRreL1j.mjs +143 -0
  48. package/dist/tokens-BLRreL1j.mjs.map +1 -0
  49. package/dist/{utils-DjdexspV.mjs → utils-BUpDoqme.mjs} +73 -51
  50. package/dist/utils-BUpDoqme.mjs.map +1 -0
  51. package/dist/{utils-5x4uNxsX.d.mts → utils-Bhi0KiBx.d.mts} +18 -6
  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 +130 -128
  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 +122 -94
  63. package/skills/general/references/exports.md +106 -0
  64. package/skills/migrations/SKILL.md +53 -2
  65. package/skills/migrations/versions/migrate-v9-to-v10.md +582 -0
  66. package/skills/routing/SKILL.md +50 -60
  67. package/skills/server-functions/SKILL.md +36 -56
  68. package/skills/services/SKILL.md +7 -4
  69. package/skills/services/docs/approval.md +2 -2
  70. package/skills/services/docs/peoplesoft.md +114 -110
  71. package/skills/start/SKILL.md +9 -5
  72. package/skills/start/steps/05-database-setup.md +52 -52
  73. package/skills/start/steps/06-entra-setup.md +1 -1
  74. package/skills/start/steps/07-vault-setup.md +5 -12
  75. package/skills/table/SKILL.md +263 -0
  76. package/skills/unslop/SKILL.md +80 -0
  77. package/dist/NotificationContext-CgwUOeW0.mjs +0 -7
  78. package/dist/NotificationContext-CgwUOeW0.mjs.map +0 -1
  79. package/dist/authMiddleware-DPly0b_T.mjs +0 -48
  80. package/dist/authMiddleware-DPly0b_T.mjs.map +0 -1
  81. package/dist/entra-CJSyeQsx.mjs +0 -109
  82. package/dist/entra-CJSyeQsx.mjs.map +0 -1
  83. package/dist/file-BWcNzq55.mjs.map +0 -1
  84. package/dist/file-DimNsRly.mjs.map +0 -1
  85. package/dist/msalServer-DLwA7_ta.mjs +0 -30
  86. package/dist/msalServer-DLwA7_ta.mjs.map +0 -1
  87. package/dist/peoplesoft-DTPGpN2h.mjs.map +0 -1
  88. package/dist/useDialogs-BUzVrTSP.mjs +0 -248
  89. package/dist/useDialogs-BUzVrTSP.mjs.map +0 -1
  90. package/dist/user-Dzv0N9fj.d.mts +0 -16
  91. package/dist/utils-DjdexspV.mjs.map +0 -1
  92. package/skills/data-grid/SKILL.md +0 -142
  93. package/skills/migrations/versions/migrate-v9-to-v10.tsx +0 -9
@@ -1,13 +1,18 @@
1
+ import { d as sanitizeReturnTo, m as loginProvidersQueryOptions } from "./utils-BUpDoqme.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-DimNsRly.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-C14fhUeg.mjs";
4
+ import { _ as pinnedSx, b as useDialogs, d as columnAlign, f as columnFlex, h as lookaheadRange, m as hasColumnLabel, t as AggregatedCell, u as cellSelectionSx, y as toClipboardText } from "./AggregatedCell-C7nAQyMO.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
- import React, { Fragment, createContext, useContext, useEffect, useEffectEvent, useLayoutEffect, useRef, useState } from "react";
8
+ import React, { Fragment, createContext, useContext, useEffect, useEffectEvent, useLayoutEffect, useMemo, 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) => {
@@ -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,508 @@ 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 ROW_LOOKAHEAD = 15;
1366
+ const COLUMN_OVERSCAN = 3;
1367
+ const JUSTIFY = {
1368
+ left: "flex-start",
1369
+ center: "center",
1370
+ right: "flex-end"
1371
+ };
1372
+ const CELL_SX = {
1373
+ py: 0,
1374
+ px: "10px"
1375
+ };
1376
+ const UTILITY_SX = {
1377
+ py: 0,
1378
+ px: .5
1379
+ };
1380
+ /** Pins the aggregation row to the bottom of the scroll area, like the sticky header. */
1381
+ const FOOTER_SX = {
1382
+ position: "sticky",
1383
+ bottom: 0,
1384
+ zIndex: 3,
1385
+ bgcolor: "background.paper",
1386
+ borderTop: 1,
1387
+ borderTopStyle: "solid",
1388
+ borderColor: "divider"
1156
1389
  };
1390
+ const pinnedWidth = (columns) => columns.reduce((total, column) => total + column.getSize(), 0);
1391
+ function LayoutTable({ table, loading = false, pagination = false, pageSizeOptions = [
1392
+ 10,
1393
+ 25,
1394
+ 50,
1395
+ 100
1396
+ ], showToolbar = false, disableColumnMenu = false, onRowClick, onRowDoubleClick, sx, ...toolbar }) {
1397
+ "use no memo";
1398
+ const { t } = useTranslation();
1399
+ const containerRef = useRef(null);
1400
+ const headerGroups = table.getHeaderGroups();
1401
+ const headerHeight = headerGroups.length * COLUMN_HEADER_HEIGHT;
1402
+ const visibleColumnCount = table.getVisibleLeafColumns().length;
1403
+ const hasFooter = table.getAllLeafColumns().some((column) => column.columnDef.footer);
1404
+ const { top, bottom } = table.state.rowPinning;
1405
+ const pinnedIds = /* @__PURE__ */ new Set([...top, ...bottom]);
1406
+ const centerRows = (pagination ? table.getRowModel() : table.getPrePaginatedRowModel()).rows.filter((row) => !pinnedIds.has(row.id));
1407
+ const rows = [
1408
+ ...table.getTopRows(),
1409
+ ...centerRows,
1410
+ ...table.getBottomRows()
1411
+ ];
1412
+ const isEmpty = !loading && !rows.length;
1413
+ const pageSize = table.state.pagination.pageSize;
1414
+ useEffect(() => {
1415
+ if (!pagination && pageSize !== rows.length) table.setPageSize(Math.max(rows.length, 1));
1416
+ }, [
1417
+ pagination,
1418
+ pageSize,
1419
+ rows.length,
1420
+ table
1421
+ ]);
1422
+ const startColumns = table.getStartVisibleLeafColumns();
1423
+ const endColumns = table.getEndVisibleLeafColumns();
1424
+ const centerColumns = table.getCenterVisibleLeafColumns();
1425
+ const startPinnedWidth = pinnedWidth(startColumns);
1426
+ const endPinnedWidth = pinnedWidth(endColumns);
1427
+ const [containerWidth, setContainerWidth] = useState(0);
1428
+ useLayoutEffect(() => {
1429
+ const container = containerRef.current;
1430
+ if (!container) return;
1431
+ const measure = () => setContainerWidth(container.clientWidth);
1432
+ measure();
1433
+ const observer = new ResizeObserver(measure);
1434
+ observer.observe(container);
1435
+ return () => observer.disconnect();
1436
+ }, []);
1437
+ const flexColumns = table.getVisibleLeafColumns().filter((column_0) => columnFlex(column_0) > 0);
1438
+ const totalFlex = flexColumns.reduce((total, column_1) => total + columnFlex(column_1), 0);
1439
+ const flexSpace = Math.max(containerWidth - table.getTotalSize(), 0);
1440
+ const flexWidths = new Map(flexColumns.map((column_2) => [column_2.id, Math.floor(flexSpace * columnFlex(column_2) / totalFlex)]));
1441
+ const headerWidth = (header) => header.column.getLeafColumns().reduce((width, column_3) => width + (flexWidths.get(column_3.id) ?? 0), header.getSize());
1442
+ const virtualizeColumns = headerGroups.length === 1 && !loading;
1443
+ const rowVirtualizer = useVirtualizer({
1444
+ count: rows.length,
1445
+ getScrollElement: () => containerRef.current,
1446
+ estimateSize: () => ROW_HEIGHT,
1447
+ getItemKey: (index) => rows[index].id,
1448
+ overscan: ROW_OVERSCAN,
1449
+ rangeExtractor: (range) => lookaheadRange(range, rowVirtualizer.scrollDirection, ROW_LOOKAHEAD),
1450
+ scrollMargin: headerHeight,
1451
+ scrollPaddingStart: headerHeight
1452
+ });
1453
+ const columnVirtualizer = useVirtualizer({
1454
+ count: virtualizeColumns ? centerColumns.length : 0,
1455
+ getScrollElement: () => containerRef.current,
1456
+ estimateSize: (index_0) => centerColumns[index_0].getSize(),
1457
+ getItemKey: (index_1) => centerColumns[index_1].id,
1458
+ horizontal: true,
1459
+ overscan: COLUMN_OVERSCAN,
1460
+ scrollPaddingStart: startPinnedWidth,
1461
+ scrollPaddingEnd: endPinnedWidth
1462
+ });
1463
+ const columnSizing = table.state.columnSizing;
1464
+ useEffect(() => {
1465
+ columnVirtualizer.measure();
1466
+ }, [columnVirtualizer, columnSizing]);
1467
+ const focusedCell = table.getFocusedCell();
1468
+ const focusedRowId = focusedCell?.row.id;
1469
+ const focusedColumnId = focusedCell?.column.id;
1470
+ useEffect(() => {
1471
+ const cell = containerRef.current?.querySelector("tbody td[tabindex='0']");
1472
+ if (cell) {
1473
+ cell.scrollIntoView({
1474
+ block: "nearest",
1475
+ inline: "nearest"
1476
+ });
1477
+ return;
1478
+ }
1479
+ const rowIndex = rows.findIndex((row_0) => row_0.id === focusedRowId);
1480
+ if (rowIndex >= 0) rowVirtualizer.scrollToIndex(rowIndex);
1481
+ const columnIndex = centerColumns.findIndex((column_4) => column_4.id === focusedColumnId);
1482
+ if (columnIndex >= 0) columnVirtualizer.scrollToIndex(columnIndex);
1483
+ }, [focusedRowId, focusedColumnId]);
1484
+ const hasCellSelection = table.state.cellSelection.length > 0;
1485
+ const copySelection = () => {
1486
+ const text = toClipboardText(table.getSelectedCellRangesData());
1487
+ if (text) navigator.clipboard.writeText(text);
1488
+ };
1489
+ useHotkeys([
1490
+ {
1491
+ hotkey: "ArrowUp",
1492
+ callback: () => table.moveCellSelection("up")
1493
+ },
1494
+ {
1495
+ hotkey: "ArrowDown",
1496
+ callback: () => table.moveCellSelection("down")
1497
+ },
1498
+ {
1499
+ hotkey: "ArrowLeft",
1500
+ callback: () => table.moveCellSelection("left")
1501
+ },
1502
+ {
1503
+ hotkey: "ArrowRight",
1504
+ callback: () => table.moveCellSelection("right")
1505
+ },
1506
+ {
1507
+ hotkey: "Shift+ArrowUp",
1508
+ callback: () => table.extendCellSelection("up")
1509
+ },
1510
+ {
1511
+ hotkey: "Shift+ArrowDown",
1512
+ callback: () => table.extendCellSelection("down")
1513
+ },
1514
+ {
1515
+ hotkey: "Shift+ArrowLeft",
1516
+ callback: () => table.extendCellSelection("left")
1517
+ },
1518
+ {
1519
+ hotkey: "Shift+ArrowRight",
1520
+ callback: () => table.extendCellSelection("right")
1521
+ },
1522
+ {
1523
+ hotkey: "Mod+C",
1524
+ callback: copySelection
1525
+ },
1526
+ {
1527
+ hotkey: "Escape",
1528
+ callback: () => table.resetCellSelection(true)
1529
+ },
1530
+ {
1531
+ hotkey: "Mod+A",
1532
+ callback: () => table.selectAllCells(),
1533
+ options: { enabled: true }
1534
+ }
1535
+ ], {
1536
+ target: containerRef,
1537
+ enabled: hasCellSelection
1538
+ });
1539
+ const virtualRows = rowVirtualizer.getVirtualItems();
1540
+ const paddingTop = virtualRows.length ? virtualRows[0].start - headerHeight : 0;
1541
+ const paddingBottom = virtualRows.length ? rowVirtualizer.getTotalSize() - virtualRows[virtualRows.length - 1].end + headerHeight : 0;
1542
+ const virtualColumns = columnVirtualizer.getVirtualItems();
1543
+ const firstColumn = virtualColumns.length ? virtualColumns[0] : void 0;
1544
+ const lastColumn = virtualColumns.length ? virtualColumns[virtualColumns.length - 1] : void 0;
1545
+ const paddingStart = firstColumn ? firstColumn.start : 0;
1546
+ const paddingEnd = lastColumn ? columnVirtualizer.getTotalSize() - lastColumn.end : 0;
1547
+ /**
1548
+ * Splits a display-ordered leaf array — a header row, a footer row or a row's
1549
+ * cells, which TanStack all orders start-pinned, centre, end-pinned — into the
1550
+ * pinned regions, which always render, and the virtualized centre window.
1551
+ */
1552
+ const windowColumns = (all) => firstColumn && lastColumn ? {
1553
+ start: all.slice(0, startColumns.length),
1554
+ center: all.slice(startColumns.length + firstColumn.index, startColumns.length + lastColumn.index + 1),
1555
+ end: endColumns.length ? all.slice(all.length - endColumns.length) : []
1556
+ } : {
1557
+ start: all,
1558
+ center: [],
1559
+ end: []
1560
+ };
1561
+ /** Absorbs the width of the columns the centre window skipped. */
1562
+ const skippedColumns = (width_0) => width_0 > 0 ? /* @__PURE__ */ jsx(TableCell, {
1563
+ "aria-hidden": true,
1564
+ style: { width: width_0 },
1565
+ sx: { p: 0 }
1566
+ }) : null;
1567
+ const renderHeader = (h, groupIndex) => /* @__PURE__ */ jsx(table.AppHeader, {
1568
+ header: h,
1569
+ children: (header_0) => {
1570
+ const align = columnAlign(header_0.column);
1571
+ const labelled = hasColumnLabel(header_0.column);
1572
+ return /* @__PURE__ */ jsxs(TableCell, {
1573
+ colSpan: header_0.colSpan,
1574
+ align,
1575
+ sortDirection: header_0.column.getIsSorted(),
1576
+ sx: {
1577
+ position: "sticky",
1578
+ top: groupIndex * COLUMN_HEADER_HEIGHT,
1579
+ zIndex: 3,
1580
+ bgcolor: "background.paper",
1581
+ width: headerWidth(header_0),
1582
+ whiteSpace: "nowrap",
1583
+ overflow: "hidden",
1584
+ ...labelled ? CELL_SX : UTILITY_SX,
1585
+ ...pinnedSx(header_0.column, true)
1586
+ },
1587
+ children: [header_0.isPlaceholder ? null : /* @__PURE__ */ jsxs(Box, {
1588
+ sx: {
1589
+ display: "flex",
1590
+ alignItems: "center",
1591
+ minWidth: 0,
1592
+ justifyContent: JUSTIFY[align]
1593
+ },
1594
+ children: [/* @__PURE__ */ jsx(Box, {
1595
+ sx: {
1596
+ flex: labelled ? 1 : "0 1 auto",
1597
+ minWidth: 0,
1598
+ display: "flex",
1599
+ justifyContent: JUSTIFY[align],
1600
+ overflow: "hidden",
1601
+ "& .MuiTableSortLabel-root": { minWidth: 0 },
1602
+ "& .MuiTableSortLabel-root > *:first-of-type": {
1603
+ overflow: "hidden",
1604
+ textOverflow: "ellipsis"
1605
+ }
1606
+ },
1607
+ children: /* @__PURE__ */ jsx(header_0.HeaderSortLabel, { children: /* @__PURE__ */ jsx(header_0.FlexRender, {}) })
1608
+ }), !disableColumnMenu && /* @__PURE__ */ jsx(header_0.HeaderMenu, {})]
1609
+ }), /* @__PURE__ */ jsx(header_0.HeaderResizeHandle, {})]
1610
+ });
1611
+ }
1612
+ }, h.id);
1613
+ const renderCell = (c) => /* @__PURE__ */ jsx(table.AppCell, {
1614
+ cell: c,
1615
+ children: (cell_0) => cell_0.getIsCovered() ? null : /* @__PURE__ */ jsx(TableCell, {
1616
+ align: columnAlign(cell_0.column),
1617
+ rowSpan: cell_0.getRowSpan(),
1618
+ colSpan: cell_0.getColSpan(),
1619
+ tabIndex: cell_0.getCanSelect() ? cell_0.getTabIndex() : void 0,
1620
+ onMouseDown: cell_0.getSelectionStartHandler(),
1621
+ onMouseEnter: cell_0.getSelectionExtendHandler(),
1622
+ sx: {
1623
+ overflow: "hidden",
1624
+ textOverflow: "ellipsis",
1625
+ whiteSpace: "nowrap",
1626
+ userSelect: cell_0.getCanSelect() ? "none" : void 0,
1627
+ ...hasColumnLabel(cell_0.column) ? CELL_SX : UTILITY_SX,
1628
+ ...pinnedSx(cell_0.column),
1629
+ ...cellSelectionSx(cell_0)
1630
+ },
1631
+ children: cell_0.getIsGrouped() ? /* @__PURE__ */ jsx(cell_0.GroupCell, {}) : cell_0.row.getIsGrouped() && !cell_0.getIsAggregated() ? null : /* @__PURE__ */ jsx(cell_0.FlexRender, {})
1632
+ })
1633
+ }, c.id);
1634
+ const renderFooter = (f) => /* @__PURE__ */ jsx(table.AppFooter, {
1635
+ header: f,
1636
+ children: (footer) => /* @__PURE__ */ jsx(TableCell, {
1637
+ colSpan: footer.colSpan,
1638
+ align: columnAlign(footer.column),
1639
+ sx: {
1640
+ ...hasColumnLabel(footer.column) ? CELL_SX : UTILITY_SX,
1641
+ ...pinnedSx(footer.column),
1642
+ ...FOOTER_SX
1643
+ },
1644
+ children: footer.isPlaceholder ? null : /* @__PURE__ */ jsx(footer.FlexRender, {})
1645
+ })
1646
+ }, f.id);
1647
+ const renderRow = (row_1) => {
1648
+ const cells = windowColumns(row_1.getVisibleCells());
1649
+ return /* @__PURE__ */ jsxs(TableRow, {
1650
+ hover: true,
1651
+ selected: row_1.getIsSelected(),
1652
+ onClick: onRowClick && (() => onRowClick(row_1)),
1653
+ onDoubleClick: onRowDoubleClick && (() => onRowDoubleClick(row_1)),
1654
+ sx: {
1655
+ height: ROW_HEIGHT,
1656
+ cursor: onRowClick || onRowDoubleClick ? "pointer" : void 0
1657
+ },
1658
+ children: [
1659
+ cells.start.map(renderCell),
1660
+ skippedColumns(paddingStart),
1661
+ cells.center.map(renderCell),
1662
+ skippedColumns(paddingEnd),
1663
+ cells.end.map(renderCell),
1664
+ /* @__PURE__ */ jsx(TableCell, {
1665
+ "aria-hidden": true,
1666
+ sx: { p: 0 }
1667
+ })
1668
+ ]
1669
+ }, row_1.id);
1670
+ };
1671
+ const rowCache = useMemo(() => ({ current: /* @__PURE__ */ new Map() }), [
1672
+ table,
1673
+ firstColumn?.index,
1674
+ lastColumn?.index,
1675
+ paddingStart,
1676
+ paddingEnd
1677
+ ]);
1678
+ const bodyRows = virtualRows.map(({ index: index_2 }) => rowCache.current.get(rows[index_2].id) ?? renderRow(rows[index_2]));
1679
+ rowCache.current = new Map(bodyRows.map((row_2) => [row_2.key, row_2]));
1680
+ /** Reserves the scroll height of the rows outside the virtual window. */
1681
+ const skippedRows = (height) => height > 0 ? /* @__PURE__ */ jsx(TableRow, {
1682
+ "aria-hidden": true,
1683
+ style: { height },
1684
+ children: /* @__PURE__ */ jsx(TableCell, {
1685
+ colSpan: visibleColumnCount + 1,
1686
+ sx: {
1687
+ p: 0,
1688
+ border: 0
1689
+ }
1690
+ })
1691
+ }) : null;
1692
+ return /* @__PURE__ */ jsx(table.AppTable, { children: /* @__PURE__ */ jsxs(Paper, {
1693
+ variant: "outlined",
1694
+ sx: {
1695
+ display: "flex",
1696
+ flexDirection: "column",
1697
+ height: "100%",
1698
+ minHeight: 0,
1699
+ overflow: "hidden",
1700
+ ...sx
1701
+ },
1702
+ children: [
1703
+ showToolbar && /* @__PURE__ */ jsx(table.Toolbar, { ...toolbar }),
1704
+ /* @__PURE__ */ jsx(TableContainer, {
1705
+ ref: containerRef,
1706
+ sx: {
1707
+ flex: 1,
1708
+ minHeight: 0,
1709
+ position: "relative",
1710
+ scrollPaddingBlockStart: `${headerHeight}px`,
1711
+ scrollPaddingInlineStart: `${startPinnedWidth}px`,
1712
+ scrollPaddingInlineEnd: `${endPinnedWidth}px`
1713
+ },
1714
+ children: /* @__PURE__ */ jsxs(Table, {
1715
+ stickyHeader: true,
1716
+ size: "small",
1717
+ sx: {
1718
+ tableLayout: "fixed",
1719
+ width: table.getTotalSize(),
1720
+ minWidth: "100%",
1721
+ "& tbody .MuiTableRow-root:last-of-type .MuiTableCell-root": { borderBottom: 0 },
1722
+ "& .MuiTableCell-root:focus": {
1723
+ outline: "1px solid",
1724
+ outlineColor: "primary.main",
1725
+ outlineOffset: -1
1726
+ }
1727
+ },
1728
+ children: [
1729
+ /* @__PURE__ */ jsx(TableHead, { children: headerGroups.map((headerGroup, groupIndex_0) => {
1730
+ const headers = windowColumns(headerGroup.headers.filter((header_1) => header_1.column.getIsVisible()));
1731
+ return /* @__PURE__ */ jsxs(TableRow, {
1732
+ sx: { height: COLUMN_HEADER_HEIGHT },
1733
+ children: [
1734
+ headers.start.map((h_0) => renderHeader(h_0, groupIndex_0)),
1735
+ skippedColumns(paddingStart),
1736
+ headers.center.map((h_1) => renderHeader(h_1, groupIndex_0)),
1737
+ skippedColumns(paddingEnd),
1738
+ headers.end.map((h_2) => renderHeader(h_2, groupIndex_0)),
1739
+ /* @__PURE__ */ jsx(TableCell, {
1740
+ "aria-hidden": true,
1741
+ sx: {
1742
+ p: 0,
1743
+ position: "sticky",
1744
+ top: groupIndex_0 * COLUMN_HEADER_HEIGHT,
1745
+ zIndex: 3,
1746
+ bgcolor: "background.paper"
1747
+ }
1748
+ })
1749
+ ]
1750
+ }, headerGroup.id);
1751
+ }) }),
1752
+ /* @__PURE__ */ jsxs(TableBody, { children: [loading ? /* @__PURE__ */ jsx(table.Skeleton, { rowHeight: ROW_HEIGHT }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
1753
+ skippedRows(paddingTop),
1754
+ bodyRows,
1755
+ skippedRows(paddingBottom)
1756
+ ] }), isEmpty && /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, {
1757
+ colSpan: visibleColumnCount + 1,
1758
+ sx: {
1759
+ border: 0,
1760
+ p: 0
1761
+ },
1762
+ children: /* @__PURE__ */ jsxs(Box, {
1763
+ sx: {
1764
+ position: "absolute",
1765
+ top: headerHeight,
1766
+ left: 0,
1767
+ right: 0,
1768
+ bottom: 0,
1769
+ display: "flex",
1770
+ flexDirection: "column",
1771
+ alignItems: "center",
1772
+ justifyContent: "center",
1773
+ gap: 1,
1774
+ color: "text.secondary",
1775
+ bgcolor: "background.paper",
1776
+ "& .no-rows-primary": { opacity: .7 },
1777
+ "& .no-rows-secondary": { opacity: .3 }
1778
+ },
1779
+ children: [/* @__PURE__ */ jsxs("svg", {
1780
+ fill: "currentColor",
1781
+ width: 96,
1782
+ viewBox: "0 0 452 257",
1783
+ "aria-hidden": true,
1784
+ focusable: "false",
1785
+ children: [
1786
+ /* @__PURE__ */ jsx("path", {
1787
+ className: "no-rows-primary",
1788
+ 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"
1789
+ }),
1790
+ /* @__PURE__ */ jsx("path", {
1791
+ className: "no-rows-primary",
1792
+ 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"
1793
+ }),
1794
+ /* @__PURE__ */ jsx("path", {
1795
+ className: "no-rows-primary",
1796
+ 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"
1797
+ }),
1798
+ /* @__PURE__ */ jsx("path", {
1799
+ className: "no-rows-secondary",
1800
+ 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"
1801
+ })
1802
+ ]
1803
+ }), /* @__PURE__ */ jsx(Box, { children: t("Layout.Table.NoRows") })]
1804
+ })
1805
+ }) })] }),
1806
+ hasFooter && /* @__PURE__ */ jsx(TableFooter, { children: table.getFooterGroups().map((footerGroup) => {
1807
+ const footers = windowColumns(footerGroup.headers.filter((header_2) => header_2.column.getIsVisible()));
1808
+ return /* @__PURE__ */ jsxs(TableRow, { children: [
1809
+ footers.start.map(renderFooter),
1810
+ skippedColumns(paddingStart),
1811
+ footers.center.map(renderFooter),
1812
+ skippedColumns(paddingEnd),
1813
+ footers.end.map(renderFooter),
1814
+ /* @__PURE__ */ jsx(TableCell, {
1815
+ "aria-hidden": true,
1816
+ sx: {
1817
+ p: 0,
1818
+ ...FOOTER_SX
1819
+ }
1820
+ })
1821
+ ] }, footerGroup.id);
1822
+ }) })
1823
+ ]
1824
+ })
1825
+ }),
1826
+ pagination && /* @__PURE__ */ jsx(table.Pagination, { pageSizeOptions })
1827
+ ]
1828
+ }) });
1829
+ }
1157
1830
  //#endregion
1158
- export { Dropzone, EditableColumnHeader, FileViewer, Fullscreen, RouterButton, RouterError, RouterFab, RouterGridActionsCellItem, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab, TypographyWithIcon };
1831
+ export { AggregatedCell, Dropzone, FileViewer, Fullscreen, LayoutTable, LoginForm, RouterButton, RouterError, RouterFab, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab };
1159
1832
 
1160
1833
  //# sourceMappingURL=components.mjs.map