wcz-layout 10.1.10 → 10.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Approval-D1TfISUL.mjs.map +1 -1
- package/dist/{LayoutTable-CxQNMuwo.d.mts → ChatLayout-BmLySLXy.d.mts} +11 -2
- package/dist/ChatLayout-BpRj5rlH.mjs +1639 -0
- package/dist/ChatLayout-BpRj5rlH.mjs.map +1 -0
- package/dist/DialogsContext-D23fJjYR.mjs.map +1 -1
- package/dist/Email-rnz3H0x3.mjs.map +1 -1
- package/dist/FileMeta-CPBWI_jA.mjs.map +1 -1
- package/dist/RouterListItemButton-CF-8w-08.mjs +62 -0
- package/dist/RouterListItemButton-CF-8w-08.mjs.map +1 -0
- package/dist/ai.d.mts +9 -0
- package/dist/ai.mjs +24 -0
- package/dist/ai.mjs.map +1 -0
- package/dist/{approval-ByDIMRhe.mjs → approval-B3ZQn9aH.mjs} +2 -2
- package/dist/approval-B3ZQn9aH.mjs.map +1 -0
- package/dist/auth.mjs +5 -4
- package/dist/auth.mjs.map +1 -1
- package/dist/components.d.mts +3 -2
- package/dist/components.mjs +524 -627
- package/dist/components.mjs.map +1 -1
- package/dist/{createApi-L3ypB1gH.mjs → createApi-BXjkj4fM.mjs} +3 -4
- package/dist/createApi-BXjkj4fM.mjs.map +1 -0
- package/dist/data/client.mjs +3 -4
- package/dist/data/client.mjs.map +1 -1
- package/dist/data/server.mjs +4 -4
- package/dist/data/server.mjs.map +1 -1
- package/dist/env-BwFl7nWc.mjs +48 -0
- package/dist/env-BwFl7nWc.mjs.map +1 -0
- package/dist/{file-CwumKq_P.mjs → file-BQ-Bu2g8.mjs} +5 -4
- package/dist/file-BQ-Bu2g8.mjs.map +1 -0
- package/dist/{file-B4Q_bGLN.mjs → file-DZ0KYhoB.mjs} +5 -4
- package/dist/file-DZ0KYhoB.mjs.map +1 -0
- package/dist/generatedChart-k7NEdi5Z.mjs +211 -0
- package/dist/generatedChart-k7NEdi5Z.mjs.map +1 -0
- package/dist/hooks.d.mts +30 -2
- package/dist/hooks.mjs +1750 -1227
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.d.mts +9 -2
- package/dist/index.mjs +1250 -1010
- package/dist/index.mjs.map +1 -1
- package/dist/middleware.mjs +2 -2
- package/dist/middleware.mjs.map +1 -1
- package/dist/models.d.mts +2 -2
- package/dist/models.mjs.map +1 -1
- package/dist/{peoplesoft-D1jPlXr9.mjs → peoplesoft-CvwdApCK.mjs} +4 -23
- package/dist/peoplesoft-CvwdApCK.mjs.map +1 -0
- package/dist/{providers-gKUqnVV5.mjs → providers-BfFg_3eo.mjs} +4 -20
- package/dist/providers-BfFg_3eo.mjs.map +1 -0
- package/dist/session-B_jK90RC.mjs +23 -0
- package/dist/session-B_jK90RC.mjs.map +1 -0
- package/dist/{tokens-DODxwvZ2.mjs → tokens-CkWpu7Qp.mjs} +10 -4
- package/dist/tokens-CkWpu7Qp.mjs.map +1 -0
- package/dist/{utils-giYfiv39.d.mts → utils-CNYCSgip.d.mts} +2 -2
- package/dist/{utils-obBGIuT3.mjs → utils-DJx-7b4M.mjs} +4 -50
- package/dist/utils-DJx-7b4M.mjs.map +1 -0
- package/dist/utils.d.mts +1 -1
- package/dist/utils.mjs +1 -1
- package/dist/vite.mjs.map +1 -1
- package/package.json +29 -21
- package/skills/ai/SKILL.md +156 -97
- package/skills/client-db/SKILL.md +104 -90
- package/skills/db-schema/SKILL.md +28 -20
- package/skills/dialogs/SKILL.md +26 -38
- package/skills/forms/SKILL.md +133 -73
- package/skills/general/SKILL.md +111 -126
- package/skills/general/references/auth.md +3 -7
- package/skills/migrations/versions/migrate-v10-to-v11.md +4 -0
- package/skills/routing/SKILL.md +60 -66
- package/skills/server-functions/SKILL.md +71 -26
- package/skills/services/SKILL.md +1 -1
- package/skills/services/docs/approval.md +9 -4
- package/skills/table/SKILL.md +113 -130
- package/dist/AggregatedCell-3CIdlmt6.mjs +0 -615
- package/dist/AggregatedCell-3CIdlmt6.mjs.map +0 -1
- package/dist/RouterListItemButton-B-cQ1XwU.mjs +0 -78
- package/dist/RouterListItemButton-B-cQ1XwU.mjs.map +0 -1
- package/dist/approval-ByDIMRhe.mjs.map +0 -1
- package/dist/createApi-L3ypB1gH.mjs.map +0 -1
- package/dist/file-B4Q_bGLN.mjs.map +0 -1
- package/dist/file-CwumKq_P.mjs.map +0 -1
- package/dist/peoplesoft-D1jPlXr9.mjs.map +0 -1
- package/dist/providers-gKUqnVV5.mjs.map +0 -1
- package/dist/tokens-DODxwvZ2.mjs.map +0 -1
- package/dist/utils-obBGIuT3.mjs.map +0 -1
- package/skills/general/references/exports.md +0 -117
package/dist/components.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { d as sanitizeReturnTo, m as loginProvidersQueryOptions } from "./utils-
|
|
2
|
-
import { n as
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
1
|
+
import { d as sanitizeReturnTo, m as loginProvidersQueryOptions } from "./utils-DJx-7b4M.mjs";
|
|
2
|
+
import { a as fileQueryOptions, i as fileMetasQueryOptions, n as deleteFileMutationOptions, o as fileThumbnailQueryOptions, r as downloadFileMutationOptions, s as openFileMutationOptions } from "./file-BQ-Bu2g8.mjs";
|
|
3
|
+
import { D as RouterLink, O as useDialogs, _ as toClipboardText, a as cellSelectionSx, c as columnFlex, d as layoutTableClasses, f as lookaheadRange, h as pinnedSx, m as pinnedClass, o as classNames, r as AggregatedCell, s as columnAlign, t as ChatLayout, u as hasColumnLabel, v as DEFAULT_PAGE_SIZE_OPTIONS } from "./ChatLayout-BpRj5rlH.mjs";
|
|
4
|
+
import { n as RouterIconButton, t as RouterListItemButton } from "./RouterListItemButton-CF-8w-08.mjs";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
|
-
import { Box, Button, ButtonBase, Card, CardContent, CircularProgress, Dialog, Divider, Fab, IconButton, ImageListItem, ImageListItemBar,
|
|
6
|
+
import { Box, Button, ButtonBase, Card, CardContent, CircularProgress, Dialog, Divider, Fab, IconButton, ImageListItem, ImageListItemBar, List, ListItem, ListItemButton, ListItemIcon, ListItemText, Menu, MenuItem, Paper, Skeleton, Stack, Tab, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TableRow, Tooltip, Typography, alpha, useTheme } from "@mui/material";
|
|
7
7
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
8
8
|
import React, { Fragment, createContext, useContext, useEffect, useEffectEvent, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
10
|
import { manifest } from "virtual:wcz-layout";
|
|
11
11
|
import { createLink, rootRouteId, useLocation, useMatch } from "@tanstack/react-router";
|
|
12
|
-
import ChevronRight from "@mui/icons-material/ChevronRight";
|
|
13
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import ChevronRight from "@mui/icons-material/ChevronRight";
|
|
14
14
|
import Close from "@mui/icons-material/Close";
|
|
15
15
|
import CloudQueue from "@mui/icons-material/CloudQueue";
|
|
16
16
|
import Microsoft from "@mui/icons-material/Microsoft";
|
|
@@ -38,59 +38,55 @@ const PROVIDER_ICON = {
|
|
|
38
38
|
* and it reads `?returnTo` from the URL itself, so it takes no props.
|
|
39
39
|
*/
|
|
40
40
|
const LoginForm = () => {
|
|
41
|
-
const $ = c(
|
|
42
|
-
if ($[0] !== "5f14f2dd7f994bdd88840e3f375e9ee4b049c4d266a9eaf4b3e2533ff17cc7c6") {
|
|
43
|
-
for (let $i = 0; $i < 36; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
44
|
-
$[0] = "5f14f2dd7f994bdd88840e3f375e9ee4b049c4d266a9eaf4b3e2533ff17cc7c6";
|
|
45
|
-
}
|
|
41
|
+
const $ = c(35);
|
|
46
42
|
const { data: t0 } = useQuery(loginProvidersQueryOptions);
|
|
47
43
|
let t1;
|
|
48
|
-
if ($[
|
|
44
|
+
if ($[0] !== t0) {
|
|
49
45
|
t1 = t0 === void 0 ? [] : t0;
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
52
|
-
} else t1 = $[
|
|
46
|
+
$[0] = t0;
|
|
47
|
+
$[1] = t1;
|
|
48
|
+
} else t1 = $[1];
|
|
53
49
|
const providers = t1;
|
|
54
50
|
let t2;
|
|
55
|
-
if ($[
|
|
51
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
56
52
|
t2 = { select: _temp$2 };
|
|
57
|
-
$[
|
|
58
|
-
} else t2 = $[
|
|
53
|
+
$[2] = t2;
|
|
54
|
+
} else t2 = $[2];
|
|
59
55
|
const search = useLocation(t2);
|
|
60
56
|
let t3;
|
|
61
|
-
if ($[
|
|
57
|
+
if ($[3] !== search.returnTo) {
|
|
62
58
|
t3 = sanitizeReturnTo(search.returnTo);
|
|
63
|
-
$[
|
|
64
|
-
$[
|
|
65
|
-
} else t3 = $[
|
|
59
|
+
$[3] = search.returnTo;
|
|
60
|
+
$[4] = t3;
|
|
61
|
+
} else t3 = $[4];
|
|
66
62
|
const returnTo = t3;
|
|
67
63
|
const { t } = useTranslation();
|
|
68
64
|
const [lastProvider, setLastProvider] = useState(null);
|
|
69
65
|
let t4;
|
|
70
66
|
let t5;
|
|
71
|
-
if ($[
|
|
67
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
72
68
|
t4 = () => setLastProvider(localStorage.getItem(LAST_PROVIDER_KEY));
|
|
73
69
|
t5 = [];
|
|
74
|
-
$[
|
|
75
|
-
$[
|
|
70
|
+
$[5] = t4;
|
|
71
|
+
$[6] = t5;
|
|
76
72
|
} else {
|
|
77
|
-
t4 = $[
|
|
78
|
-
t5 = $[
|
|
73
|
+
t4 = $[5];
|
|
74
|
+
t5 = $[6];
|
|
79
75
|
}
|
|
80
76
|
useEffect(t4, t5);
|
|
81
77
|
const preferred = lastProvider ?? (providers.length === 1 ? providers[0].id : null);
|
|
82
78
|
let t6;
|
|
83
|
-
if ($[
|
|
79
|
+
if ($[7] !== returnTo) {
|
|
84
80
|
t6 = (provider) => () => {
|
|
85
81
|
localStorage.setItem(LAST_PROVIDER_KEY, provider);
|
|
86
82
|
location.href = `/auth/login?provider=${provider}&returnTo=${encodeURIComponent(returnTo)}`;
|
|
87
83
|
};
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
} else t6 = $[
|
|
84
|
+
$[7] = returnTo;
|
|
85
|
+
$[8] = t6;
|
|
86
|
+
} else t6 = $[8];
|
|
91
87
|
const signIn = t6;
|
|
92
88
|
let t7;
|
|
93
|
-
if ($[
|
|
89
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
94
90
|
t7 = {
|
|
95
91
|
minHeight: "100%",
|
|
96
92
|
display: "flex",
|
|
@@ -99,24 +95,24 @@ const LoginForm = () => {
|
|
|
99
95
|
px: 2,
|
|
100
96
|
py: 6
|
|
101
97
|
};
|
|
102
|
-
$[
|
|
103
|
-
} else t7 = $[
|
|
98
|
+
$[9] = t7;
|
|
99
|
+
} else t7 = $[9];
|
|
104
100
|
let t8;
|
|
105
|
-
if ($[
|
|
101
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
106
102
|
t8 = [_temp2, _temp3];
|
|
107
|
-
$[
|
|
108
|
-
} else t8 = $[
|
|
103
|
+
$[10] = t8;
|
|
104
|
+
} else t8 = $[10];
|
|
109
105
|
let t9;
|
|
110
|
-
if ($[
|
|
106
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
111
107
|
t9 = { p: {
|
|
112
108
|
xs: 3,
|
|
113
109
|
sm: 4
|
|
114
110
|
} };
|
|
115
|
-
$[
|
|
116
|
-
} else t9 = $[
|
|
111
|
+
$[11] = t9;
|
|
112
|
+
} else t9 = $[11];
|
|
117
113
|
let t10;
|
|
118
114
|
let t11;
|
|
119
|
-
if ($[
|
|
115
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
120
116
|
t10 = { alignItems: "center" };
|
|
121
117
|
t11 = /* @__PURE__ */ jsx(Box, {
|
|
122
118
|
component: "img",
|
|
@@ -125,35 +121,35 @@ const LoginForm = () => {
|
|
|
125
121
|
width: 48,
|
|
126
122
|
height: 48
|
|
127
123
|
});
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
124
|
+
$[12] = t10;
|
|
125
|
+
$[13] = t11;
|
|
130
126
|
} else {
|
|
131
|
-
t10 = $[
|
|
132
|
-
t11 = $[
|
|
127
|
+
t10 = $[12];
|
|
128
|
+
t11 = $[13];
|
|
133
129
|
}
|
|
134
130
|
let t12;
|
|
135
|
-
if ($[
|
|
131
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
136
132
|
t12 = /* @__PURE__ */ jsx(Typography, {
|
|
137
133
|
variant: "body2",
|
|
138
134
|
color: "text.secondary",
|
|
139
135
|
sx: { fontWeight: 600 },
|
|
140
136
|
children: manifest.name
|
|
141
137
|
});
|
|
142
|
-
$[
|
|
143
|
-
} else t12 = $[
|
|
138
|
+
$[14] = t12;
|
|
139
|
+
} else t12 = $[14];
|
|
144
140
|
let t13;
|
|
145
|
-
if ($[
|
|
141
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
146
142
|
t13 = { fontWeight: 700 };
|
|
147
|
-
$[
|
|
148
|
-
} else t13 = $[
|
|
143
|
+
$[15] = t13;
|
|
144
|
+
} else t13 = $[15];
|
|
149
145
|
let t14;
|
|
150
|
-
if ($[
|
|
146
|
+
if ($[16] !== t) {
|
|
151
147
|
t14 = t("Layout.LogIn");
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
} else t14 = $[
|
|
148
|
+
$[16] = t;
|
|
149
|
+
$[17] = t14;
|
|
150
|
+
} else t14 = $[17];
|
|
155
151
|
let t15;
|
|
156
|
-
if ($[
|
|
152
|
+
if ($[18] !== t14) {
|
|
157
153
|
t15 = /* @__PURE__ */ jsxs(Stack, {
|
|
158
154
|
direction: "row",
|
|
159
155
|
spacing: 2,
|
|
@@ -168,18 +164,18 @@ const LoginForm = () => {
|
|
|
168
164
|
})]
|
|
169
165
|
})]
|
|
170
166
|
});
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
} else t15 = $[
|
|
167
|
+
$[18] = t14;
|
|
168
|
+
$[19] = t15;
|
|
169
|
+
} else t15 = $[19];
|
|
174
170
|
let t16;
|
|
175
|
-
if ($[
|
|
171
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
176
172
|
t16 = /* @__PURE__ */ jsx(Divider, { sx: { my: 3 } });
|
|
177
|
-
$[
|
|
178
|
-
} else t16 = $[
|
|
173
|
+
$[20] = t16;
|
|
174
|
+
} else t16 = $[20];
|
|
179
175
|
let t17;
|
|
180
|
-
if ($[
|
|
176
|
+
if ($[21] !== preferred || $[22] !== providers || $[23] !== signIn || $[24] !== t) {
|
|
181
177
|
let t18;
|
|
182
|
-
if ($[
|
|
178
|
+
if ($[26] !== preferred || $[27] !== signIn || $[28] !== t) {
|
|
183
179
|
t18 = (t19) => {
|
|
184
180
|
const { id, label } = t19;
|
|
185
181
|
return /* @__PURE__ */ jsx(Button, {
|
|
@@ -199,29 +195,29 @@ const LoginForm = () => {
|
|
|
199
195
|
children: t("Layout.ContinueWith", { provider: label })
|
|
200
196
|
}, id);
|
|
201
197
|
};
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
} else t18 = $[
|
|
198
|
+
$[26] = preferred;
|
|
199
|
+
$[27] = signIn;
|
|
200
|
+
$[28] = t;
|
|
201
|
+
$[29] = t18;
|
|
202
|
+
} else t18 = $[29];
|
|
207
203
|
t17 = providers.map(t18);
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
} else t17 = $[
|
|
204
|
+
$[21] = preferred;
|
|
205
|
+
$[22] = providers;
|
|
206
|
+
$[23] = signIn;
|
|
207
|
+
$[24] = t;
|
|
208
|
+
$[25] = t17;
|
|
209
|
+
} else t17 = $[25];
|
|
214
210
|
let t18;
|
|
215
|
-
if ($[
|
|
211
|
+
if ($[30] !== t17) {
|
|
216
212
|
t18 = /* @__PURE__ */ jsx(Stack, {
|
|
217
213
|
spacing: 1.5,
|
|
218
214
|
children: t17
|
|
219
215
|
});
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
} else t18 = $[
|
|
216
|
+
$[30] = t17;
|
|
217
|
+
$[31] = t18;
|
|
218
|
+
} else t18 = $[31];
|
|
223
219
|
let t19;
|
|
224
|
-
if ($[
|
|
220
|
+
if ($[32] !== t15 || $[33] !== t18) {
|
|
225
221
|
t19 = /* @__PURE__ */ jsx(Box, {
|
|
226
222
|
sx: t7,
|
|
227
223
|
children: /* @__PURE__ */ jsx(Card, {
|
|
@@ -237,10 +233,10 @@ const LoginForm = () => {
|
|
|
237
233
|
})
|
|
238
234
|
})
|
|
239
235
|
});
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
} else t19 = $[
|
|
236
|
+
$[32] = t15;
|
|
237
|
+
$[33] = t18;
|
|
238
|
+
$[34] = t19;
|
|
239
|
+
} else t19 = $[34];
|
|
244
240
|
return t19;
|
|
245
241
|
};
|
|
246
242
|
function _temp$2(location) {
|
|
@@ -277,29 +273,25 @@ const getAncestors = (element) => {
|
|
|
277
273
|
};
|
|
278
274
|
const px = (value) => Number.parseFloat(value) || 0;
|
|
279
275
|
const Fullscreen = (t0) => {
|
|
280
|
-
const $ = c(
|
|
281
|
-
if ($[0] !== "8cbf7a32d40cad26f487ed7c5e0b8451044a6d7e404e9591bd3919c6daa7488f") {
|
|
282
|
-
for (let $i = 0; $i < 16; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
283
|
-
$[0] = "8cbf7a32d40cad26f487ed7c5e0b8451044a6d7e404e9591bd3919c6daa7488f";
|
|
284
|
-
}
|
|
276
|
+
const $ = c(15);
|
|
285
277
|
let children;
|
|
286
278
|
let props;
|
|
287
279
|
let sx;
|
|
288
|
-
if ($[
|
|
280
|
+
if ($[0] !== t0) {
|
|
289
281
|
({children, sx, ...props} = t0);
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
282
|
+
$[0] = t0;
|
|
283
|
+
$[1] = children;
|
|
284
|
+
$[2] = props;
|
|
285
|
+
$[3] = sx;
|
|
294
286
|
} else {
|
|
295
|
-
children = $[
|
|
296
|
-
props = $[
|
|
297
|
-
sx = $[
|
|
287
|
+
children = $[1];
|
|
288
|
+
props = $[2];
|
|
289
|
+
sx = $[3];
|
|
298
290
|
}
|
|
299
291
|
const reference = useRef(null);
|
|
300
292
|
const [height, setHeight] = useState();
|
|
301
293
|
let t1;
|
|
302
|
-
if ($[
|
|
294
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
303
295
|
t1 = () => {
|
|
304
296
|
const element = reference.current;
|
|
305
297
|
if (!element) return;
|
|
@@ -318,11 +310,11 @@ const Fullscreen = (t0) => {
|
|
|
318
310
|
}
|
|
319
311
|
setHeight(Math.max(0, Math.floor(containerHeight - offsetTop - trailing)));
|
|
320
312
|
};
|
|
321
|
-
$[
|
|
322
|
-
} else t1 = $[
|
|
313
|
+
$[4] = t1;
|
|
314
|
+
} else t1 = $[4];
|
|
323
315
|
const recompute = useEffectEvent(t1);
|
|
324
316
|
let t2;
|
|
325
|
-
if ($[
|
|
317
|
+
if ($[5] !== recompute) {
|
|
326
318
|
t2 = () => {
|
|
327
319
|
const element_0 = reference.current;
|
|
328
320
|
if (!element_0) return;
|
|
@@ -338,17 +330,17 @@ const Fullscreen = (t0) => {
|
|
|
338
330
|
ro.disconnect();
|
|
339
331
|
};
|
|
340
332
|
};
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
} else t2 = $[
|
|
333
|
+
$[5] = recompute;
|
|
334
|
+
$[6] = t2;
|
|
335
|
+
} else t2 = $[6];
|
|
344
336
|
let t3;
|
|
345
|
-
if ($[
|
|
337
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
346
338
|
t3 = [];
|
|
347
|
-
$[
|
|
348
|
-
} else t3 = $[
|
|
339
|
+
$[7] = t3;
|
|
340
|
+
} else t3 = $[7];
|
|
349
341
|
useLayoutEffect(t2, t3);
|
|
350
342
|
let t4;
|
|
351
|
-
if ($[
|
|
343
|
+
if ($[8] !== height || $[9] !== sx) {
|
|
352
344
|
t4 = {
|
|
353
345
|
display: "flex",
|
|
354
346
|
flexDirection: "column",
|
|
@@ -359,23 +351,23 @@ const Fullscreen = (t0) => {
|
|
|
359
351
|
height,
|
|
360
352
|
...sx
|
|
361
353
|
};
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
$[
|
|
365
|
-
} else t4 = $[
|
|
354
|
+
$[8] = height;
|
|
355
|
+
$[9] = sx;
|
|
356
|
+
$[10] = t4;
|
|
357
|
+
} else t4 = $[10];
|
|
366
358
|
let t5;
|
|
367
|
-
if ($[
|
|
359
|
+
if ($[11] !== children || $[12] !== props || $[13] !== t4) {
|
|
368
360
|
t5 = /* @__PURE__ */ jsx(Box, {
|
|
369
361
|
ref: reference,
|
|
370
362
|
sx: t4,
|
|
371
363
|
...props,
|
|
372
364
|
children
|
|
373
365
|
});
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[
|
|
378
|
-
} else t5 = $[
|
|
366
|
+
$[11] = children;
|
|
367
|
+
$[12] = props;
|
|
368
|
+
$[13] = t4;
|
|
369
|
+
$[14] = t5;
|
|
370
|
+
} else t5 = $[14];
|
|
379
371
|
return t5;
|
|
380
372
|
};
|
|
381
373
|
// src/components/file/Dropzone.tsx
|
|
@@ -392,24 +384,20 @@ const baseStyle = {
|
|
|
392
384
|
cursor: "pointer"
|
|
393
385
|
};
|
|
394
386
|
const Dropzone = (t0) => {
|
|
395
|
-
const $ = c(
|
|
396
|
-
if ($[0] !== "5f7e412e732333f86e343ff1dbc3882283622c609fd4ce6a961ebef933e25fd9") {
|
|
397
|
-
for (let $i = 0; $i < 33; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
398
|
-
$[0] = "5f7e412e732333f86e343ff1dbc3882283622c609fd4ce6a961ebef933e25fd9";
|
|
399
|
-
}
|
|
387
|
+
const $ = c(32);
|
|
400
388
|
let progress;
|
|
401
389
|
let props;
|
|
402
390
|
let sx;
|
|
403
|
-
if ($[
|
|
391
|
+
if ($[0] !== t0) {
|
|
404
392
|
({sx, progress, ...props} = t0);
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
$[
|
|
408
|
-
$[
|
|
393
|
+
$[0] = t0;
|
|
394
|
+
$[1] = progress;
|
|
395
|
+
$[2] = props;
|
|
396
|
+
$[3] = sx;
|
|
409
397
|
} else {
|
|
410
|
-
progress = $[
|
|
411
|
-
props = $[
|
|
412
|
-
sx = $[
|
|
398
|
+
progress = $[1];
|
|
399
|
+
props = $[2];
|
|
400
|
+
sx = $[3];
|
|
413
401
|
}
|
|
414
402
|
const { getRootProps, getInputProps, isFocused, isDragAccept, isDragReject } = useDropzone(props);
|
|
415
403
|
const { t } = useTranslation();
|
|
@@ -418,7 +406,7 @@ const Dropzone = (t0) => {
|
|
|
418
406
|
const t2 = theme.vars || theme;
|
|
419
407
|
let T0;
|
|
420
408
|
let t3;
|
|
421
|
-
if ($[
|
|
409
|
+
if ($[4] !== getRootProps || $[5] !== isDragAccept || $[6] !== isDragReject || $[7] !== isFocused || $[8] !== props.disabled || $[9] !== t1 || $[10] !== t2.palette.text.disabled || $[11] !== theme) {
|
|
422
410
|
const style = {
|
|
423
411
|
...baseStyle,
|
|
424
412
|
cursor: t1,
|
|
@@ -433,65 +421,65 @@ const Dropzone = (t0) => {
|
|
|
433
421
|
role: "button",
|
|
434
422
|
"aria-disabled": props.disabled || void 0
|
|
435
423
|
});
|
|
436
|
-
$[
|
|
437
|
-
$[
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
$[
|
|
424
|
+
$[4] = getRootProps;
|
|
425
|
+
$[5] = isDragAccept;
|
|
426
|
+
$[6] = isDragReject;
|
|
427
|
+
$[7] = isFocused;
|
|
428
|
+
$[8] = props.disabled;
|
|
429
|
+
$[9] = t1;
|
|
430
|
+
$[10] = t2.palette.text.disabled;
|
|
431
|
+
$[11] = theme;
|
|
432
|
+
$[12] = T0;
|
|
433
|
+
$[13] = t3;
|
|
446
434
|
} else {
|
|
447
|
-
T0 = $[
|
|
448
|
-
t3 = $[
|
|
435
|
+
T0 = $[12];
|
|
436
|
+
t3 = $[13];
|
|
449
437
|
}
|
|
450
438
|
let t4;
|
|
451
|
-
if ($[
|
|
439
|
+
if ($[14] !== getInputProps) {
|
|
452
440
|
t4 = getInputProps();
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
} else t4 = $[
|
|
441
|
+
$[14] = getInputProps;
|
|
442
|
+
$[15] = t4;
|
|
443
|
+
} else t4 = $[15];
|
|
456
444
|
let t5;
|
|
457
|
-
if ($[
|
|
445
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
458
446
|
t5 = { display: "none" };
|
|
459
|
-
$[
|
|
460
|
-
} else t5 = $[
|
|
447
|
+
$[16] = t5;
|
|
448
|
+
} else t5 = $[16];
|
|
461
449
|
let t6;
|
|
462
|
-
if ($[
|
|
450
|
+
if ($[17] !== t4) {
|
|
463
451
|
t6 = /* @__PURE__ */ jsx("input", {
|
|
464
452
|
...t4,
|
|
465
453
|
style: t5
|
|
466
454
|
});
|
|
467
|
-
$[
|
|
468
|
-
$[
|
|
469
|
-
} else t6 = $[
|
|
455
|
+
$[17] = t4;
|
|
456
|
+
$[18] = t6;
|
|
457
|
+
} else t6 = $[18];
|
|
470
458
|
let t7;
|
|
471
|
-
if ($[
|
|
459
|
+
if ($[19] !== progress) {
|
|
472
460
|
t7 = progress ? /* @__PURE__ */ jsx(CircularProgress, {
|
|
473
461
|
size: 24,
|
|
474
462
|
variant: "determinate",
|
|
475
463
|
value: progress,
|
|
476
464
|
"aria-label": "Uploading"
|
|
477
465
|
}) : /* @__PURE__ */ jsx(CloudUpload, {});
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
} else t7 = $[
|
|
466
|
+
$[19] = progress;
|
|
467
|
+
$[20] = t7;
|
|
468
|
+
} else t7 = $[20];
|
|
481
469
|
let t8;
|
|
482
|
-
if ($[
|
|
470
|
+
if ($[21] !== t) {
|
|
483
471
|
t8 = t("Layout.File.DragSomeFilesHereOrClickToSelectThem");
|
|
484
|
-
$[
|
|
485
|
-
$[
|
|
486
|
-
} else t8 = $[
|
|
472
|
+
$[21] = t;
|
|
473
|
+
$[22] = t8;
|
|
474
|
+
} else t8 = $[22];
|
|
487
475
|
let t9;
|
|
488
|
-
if ($[
|
|
476
|
+
if ($[23] !== t8) {
|
|
489
477
|
t9 = /* @__PURE__ */ jsx(Typography, { children: t8 });
|
|
490
|
-
$[
|
|
491
|
-
$[
|
|
492
|
-
} else t9 = $[
|
|
478
|
+
$[23] = t8;
|
|
479
|
+
$[24] = t9;
|
|
480
|
+
} else t9 = $[24];
|
|
493
481
|
let t10;
|
|
494
|
-
if ($[
|
|
482
|
+
if ($[25] !== T0 || $[26] !== sx || $[27] !== t3 || $[28] !== t6 || $[29] !== t7 || $[30] !== t9) {
|
|
495
483
|
t10 = /* @__PURE__ */ jsxs(T0, {
|
|
496
484
|
...t3,
|
|
497
485
|
sx,
|
|
@@ -501,60 +489,51 @@ const Dropzone = (t0) => {
|
|
|
501
489
|
t9
|
|
502
490
|
]
|
|
503
491
|
});
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
509
|
-
$[
|
|
510
|
-
$[
|
|
511
|
-
} else t10 = $[
|
|
492
|
+
$[25] = T0;
|
|
493
|
+
$[26] = sx;
|
|
494
|
+
$[27] = t3;
|
|
495
|
+
$[28] = t6;
|
|
496
|
+
$[29] = t7;
|
|
497
|
+
$[30] = t9;
|
|
498
|
+
$[31] = t10;
|
|
499
|
+
} else t10 = $[31];
|
|
512
500
|
return t10;
|
|
513
501
|
};
|
|
514
502
|
// src/contexts/FileContext.ts
|
|
515
503
|
const FileContext = createContext(null);
|
|
516
504
|
const useFile = () => {
|
|
517
|
-
const $ = c(1);
|
|
518
|
-
if ($[0] !== "a9a469a99242723a03ab2ab21b9513f8d7f393e7a397296039721f8243a94fd9") {
|
|
519
|
-
for (let $i = 0; $i < 1; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
520
|
-
$[0] = "a9a469a99242723a03ab2ab21b9513f8d7f393e7a397296039721f8243a94fd9";
|
|
521
|
-
}
|
|
522
505
|
const context = useContext(FileContext);
|
|
523
506
|
if (!context) throw new Error("FileViewer components must be used within FileViewer");
|
|
524
507
|
return context;
|
|
525
508
|
};
|
|
526
509
|
// src/components/file/fileViewer/common/ActionsMenu.tsx
|
|
527
510
|
const ActionsMenu = (t0) => {
|
|
528
|
-
const $ = c(
|
|
529
|
-
if ($[0] !== "7ed2ca73a1b83560ce36924119f722bc2853d54808eacf915e739dac0ddf031e") {
|
|
530
|
-
for (let $i = 0; $i < 38; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
531
|
-
$[0] = "7ed2ca73a1b83560ce36924119f722bc2853d54808eacf915e739dac0ddf031e";
|
|
532
|
-
}
|
|
511
|
+
const $ = c(37);
|
|
533
512
|
const { meta, anchorEl, onClose } = t0;
|
|
534
513
|
const { t } = useTranslation();
|
|
535
514
|
const { fileMetas, onDelete, actions, appName } = useFile();
|
|
536
515
|
const { alert, confirm } = useDialogs();
|
|
537
516
|
let t1;
|
|
538
|
-
if ($[
|
|
517
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
539
518
|
t1 = { from: rootRouteId };
|
|
540
|
-
$[
|
|
541
|
-
} else t1 = $[
|
|
519
|
+
$[0] = t1;
|
|
520
|
+
} else t1 = $[0];
|
|
542
521
|
const queryClient = useMatch(t1).context.queryClient;
|
|
543
522
|
let t2;
|
|
544
|
-
if ($[
|
|
523
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
545
524
|
t2 = downloadFileMutationOptions();
|
|
546
|
-
$[
|
|
547
|
-
} else t2 = $[
|
|
525
|
+
$[1] = t2;
|
|
526
|
+
} else t2 = $[1];
|
|
548
527
|
const { mutate: download, isPending: isDownloading } = useMutation(t2);
|
|
549
528
|
let t3;
|
|
550
|
-
if ($[
|
|
529
|
+
if ($[2] !== queryClient) {
|
|
551
530
|
t3 = deleteFileMutationOptions({ queryClient });
|
|
552
|
-
$[
|
|
553
|
-
$[
|
|
554
|
-
} else t3 = $[
|
|
531
|
+
$[2] = queryClient;
|
|
532
|
+
$[3] = t3;
|
|
533
|
+
} else t3 = $[3];
|
|
555
534
|
const { mutateAsync: deleteFile, isPending: isDeleting } = useMutation(t3);
|
|
556
535
|
let t4;
|
|
557
|
-
if ($[
|
|
536
|
+
if ($[4] !== appName || $[5] !== download || $[6] !== meta.fileExtension || $[7] !== meta.fileName || $[8] !== meta.id || $[9] !== onClose) {
|
|
558
537
|
t4 = () => {
|
|
559
538
|
onClose();
|
|
560
539
|
download({
|
|
@@ -564,17 +543,17 @@ const ActionsMenu = (t0) => {
|
|
|
564
543
|
fileExtension: meta.fileExtension
|
|
565
544
|
});
|
|
566
545
|
};
|
|
567
|
-
$[
|
|
568
|
-
$[
|
|
569
|
-
$[
|
|
570
|
-
$[
|
|
571
|
-
$[
|
|
572
|
-
$[
|
|
573
|
-
$[
|
|
574
|
-
} else t4 = $[
|
|
546
|
+
$[4] = appName;
|
|
547
|
+
$[5] = download;
|
|
548
|
+
$[6] = meta.fileExtension;
|
|
549
|
+
$[7] = meta.fileName;
|
|
550
|
+
$[8] = meta.id;
|
|
551
|
+
$[9] = onClose;
|
|
552
|
+
$[10] = t4;
|
|
553
|
+
} else t4 = $[10];
|
|
575
554
|
const handleOnDownload = t4;
|
|
576
555
|
let t5;
|
|
577
|
-
if ($[
|
|
556
|
+
if ($[11] !== alert || $[12] !== appName || $[13] !== confirm || $[14] !== deleteFile || $[15] !== fileMetas || $[16] !== meta || $[17] !== onClose || $[18] !== onDelete || $[19] !== t) {
|
|
578
557
|
t5 = async () => {
|
|
579
558
|
onClose();
|
|
580
559
|
if (!await confirm(t("Layout.File.AreYouSureYouWantToDelete", { name: meta.fileName }), {
|
|
@@ -596,112 +575,108 @@ const ActionsMenu = (t0) => {
|
|
|
596
575
|
deletedFileMeta: meta
|
|
597
576
|
});
|
|
598
577
|
};
|
|
599
|
-
$[
|
|
600
|
-
$[
|
|
601
|
-
$[
|
|
602
|
-
$[
|
|
603
|
-
$[
|
|
604
|
-
$[
|
|
605
|
-
$[
|
|
606
|
-
$[
|
|
607
|
-
$[
|
|
608
|
-
$[
|
|
609
|
-
} else t5 = $[
|
|
578
|
+
$[11] = alert;
|
|
579
|
+
$[12] = appName;
|
|
580
|
+
$[13] = confirm;
|
|
581
|
+
$[14] = deleteFile;
|
|
582
|
+
$[15] = fileMetas;
|
|
583
|
+
$[16] = meta;
|
|
584
|
+
$[17] = onClose;
|
|
585
|
+
$[18] = onDelete;
|
|
586
|
+
$[19] = t;
|
|
587
|
+
$[20] = t5;
|
|
588
|
+
} else t5 = $[20];
|
|
610
589
|
const handleOnDelete = t5;
|
|
611
590
|
const t6 = !!anchorEl;
|
|
612
591
|
let t7;
|
|
613
|
-
if ($[
|
|
592
|
+
if ($[21] !== actions?.download || $[22] !== handleOnDownload || $[23] !== isDownloading || $[24] !== t) {
|
|
614
593
|
t7 = actions?.download !== false && /* @__PURE__ */ jsxs(MenuItem, {
|
|
615
594
|
onClick: handleOnDownload,
|
|
616
595
|
disabled: isDownloading,
|
|
617
596
|
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(FileDownload, {}) }), /* @__PURE__ */ jsx(ListItemText, { children: t("Layout.File.Download") })]
|
|
618
597
|
});
|
|
619
|
-
$[
|
|
620
|
-
$[
|
|
621
|
-
$[
|
|
622
|
-
$[
|
|
623
|
-
$[
|
|
624
|
-
} else t7 = $[
|
|
598
|
+
$[21] = actions?.download;
|
|
599
|
+
$[22] = handleOnDownload;
|
|
600
|
+
$[23] = isDownloading;
|
|
601
|
+
$[24] = t;
|
|
602
|
+
$[25] = t7;
|
|
603
|
+
} else t7 = $[25];
|
|
625
604
|
let t8;
|
|
626
|
-
if ($[
|
|
605
|
+
if ($[26] !== actions?.delete || $[27] !== handleOnDelete || $[28] !== isDeleting || $[29] !== t) {
|
|
627
606
|
t8 = actions?.delete !== false && /* @__PURE__ */ jsxs(MenuItem, {
|
|
628
607
|
onClick: handleOnDelete,
|
|
629
608
|
disabled: isDeleting,
|
|
630
609
|
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(Delete, {}) }), /* @__PURE__ */ jsx(ListItemText, { children: t("Layout.File.Delete") })]
|
|
631
610
|
});
|
|
632
|
-
$[
|
|
633
|
-
$[
|
|
634
|
-
$[
|
|
635
|
-
$[
|
|
636
|
-
$[
|
|
637
|
-
} else t8 = $[
|
|
611
|
+
$[26] = actions?.delete;
|
|
612
|
+
$[27] = handleOnDelete;
|
|
613
|
+
$[28] = isDeleting;
|
|
614
|
+
$[29] = t;
|
|
615
|
+
$[30] = t8;
|
|
616
|
+
} else t8 = $[30];
|
|
638
617
|
let t9;
|
|
639
|
-
if ($[
|
|
618
|
+
if ($[31] !== anchorEl || $[32] !== onClose || $[33] !== t6 || $[34] !== t7 || $[35] !== t8) {
|
|
640
619
|
t9 = /* @__PURE__ */ jsxs(Menu, {
|
|
641
620
|
anchorEl,
|
|
642
621
|
open: t6,
|
|
643
622
|
onClose,
|
|
644
623
|
children: [t7, t8]
|
|
645
624
|
});
|
|
646
|
-
$[
|
|
647
|
-
$[
|
|
648
|
-
$[
|
|
649
|
-
$[
|
|
650
|
-
$[
|
|
651
|
-
$[
|
|
652
|
-
} else t9 = $[
|
|
625
|
+
$[31] = anchorEl;
|
|
626
|
+
$[32] = onClose;
|
|
627
|
+
$[33] = t6;
|
|
628
|
+
$[34] = t7;
|
|
629
|
+
$[35] = t8;
|
|
630
|
+
$[36] = t9;
|
|
631
|
+
} else t9 = $[36];
|
|
653
632
|
return t9;
|
|
654
633
|
};
|
|
655
634
|
// src/components/file/fileViewer/FileViewerGrid.tsx
|
|
656
635
|
const IMAGE_SIZE = 150;
|
|
657
636
|
const FileViewerGrid = (t0) => {
|
|
658
|
-
const $ = c(
|
|
659
|
-
if ($[0] !== "d34a3a98fae1ee0c7bd956efc6c660c0dd0cdc0eff211c4027f8000d5ce89d2b") {
|
|
660
|
-
for (let $i = 0; $i < 13; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
661
|
-
$[0] = "d34a3a98fae1ee0c7bd956efc6c660c0dd0cdc0eff211c4027f8000d5ce89d2b";
|
|
662
|
-
}
|
|
637
|
+
const $ = c(12);
|
|
663
638
|
const { sx, size, itemBar } = t0;
|
|
664
639
|
const { fileMetas } = useFile();
|
|
665
640
|
let t1;
|
|
666
|
-
if ($[
|
|
641
|
+
if ($[0] !== sx) {
|
|
667
642
|
t1 = {
|
|
668
643
|
overflow: "auto",
|
|
669
644
|
...sx
|
|
670
645
|
};
|
|
671
|
-
$[
|
|
672
|
-
$[
|
|
673
|
-
} else t1 = $[
|
|
646
|
+
$[0] = sx;
|
|
647
|
+
$[1] = t1;
|
|
648
|
+
} else t1 = $[1];
|
|
674
649
|
let t2;
|
|
675
|
-
if ($[
|
|
650
|
+
if ($[2] !== fileMetas || $[3] !== itemBar || $[4] !== size) {
|
|
676
651
|
let t3;
|
|
677
|
-
if ($[
|
|
652
|
+
if ($[6] !== itemBar || $[7] !== size) {
|
|
678
653
|
t3 = (fileMeta) => /* @__PURE__ */ jsx(GridFileViewerItem, {
|
|
679
654
|
meta: fileMeta,
|
|
680
655
|
size,
|
|
681
656
|
itemBar
|
|
682
657
|
}, fileMeta.id);
|
|
683
|
-
$[
|
|
684
|
-
$[
|
|
685
|
-
$[
|
|
686
|
-
} else t3 = $[
|
|
658
|
+
$[6] = itemBar;
|
|
659
|
+
$[7] = size;
|
|
660
|
+
$[8] = t3;
|
|
661
|
+
} else t3 = $[8];
|
|
687
662
|
t2 = fileMetas.map(t3);
|
|
688
|
-
$[
|
|
689
|
-
$[
|
|
690
|
-
$[
|
|
691
|
-
$[
|
|
692
|
-
} else t2 = $[
|
|
663
|
+
$[2] = fileMetas;
|
|
664
|
+
$[3] = itemBar;
|
|
665
|
+
$[4] = size;
|
|
666
|
+
$[5] = t2;
|
|
667
|
+
} else t2 = $[5];
|
|
693
668
|
let t3;
|
|
694
|
-
if ($[
|
|
669
|
+
if ($[9] !== t1 || $[10] !== t2) {
|
|
695
670
|
t3 = /* @__PURE__ */ jsx(Stack, {
|
|
696
671
|
direction: "row",
|
|
697
672
|
spacing: 1,
|
|
698
673
|
sx: t1,
|
|
699
674
|
children: t2
|
|
700
675
|
});
|
|
701
|
-
$[
|
|
702
|
-
$[
|
|
703
|
-
$[
|
|
704
|
-
} else t3 = $[
|
|
676
|
+
$[9] = t1;
|
|
677
|
+
$[10] = t2;
|
|
678
|
+
$[11] = t3;
|
|
679
|
+
} else t3 = $[11];
|
|
705
680
|
return t3;
|
|
706
681
|
};
|
|
707
682
|
const GridFileViewerItem = ({ meta, size, itemBar }) => {
|
|
@@ -795,7 +770,7 @@ const GridFileViewerItem = ({ meta, size, itemBar }) => {
|
|
|
795
770
|
}),
|
|
796
771
|
actionIcon: hasActions && /* @__PURE__ */ jsx(IconButton, {
|
|
797
772
|
sx: { color: grey[100] },
|
|
798
|
-
onClick: (
|
|
773
|
+
onClick: (event) => setMenuAnchor(event.currentTarget),
|
|
799
774
|
"aria-label": `Actions for ${fileName}`,
|
|
800
775
|
"aria-haspopup": "menu",
|
|
801
776
|
children: /* @__PURE__ */ jsx(MoreVert, {})
|
|
@@ -809,30 +784,26 @@ const GridFileViewerItem = ({ meta, size, itemBar }) => {
|
|
|
809
784
|
};
|
|
810
785
|
// src/components/file/fileViewer/FileViewerList.tsx
|
|
811
786
|
const FileViewerList = (t0) => {
|
|
812
|
-
const $ = c(
|
|
813
|
-
if ($[0] !== "def12bfee125db96c0e25478a726cf153aa928252368ec27de2bcba8f364adae") {
|
|
814
|
-
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
815
|
-
$[0] = "def12bfee125db96c0e25478a726cf153aa928252368ec27de2bcba8f364adae";
|
|
816
|
-
}
|
|
787
|
+
const $ = c(5);
|
|
817
788
|
const { sx } = t0;
|
|
818
789
|
const { fileMetas } = useFile();
|
|
819
790
|
let t1;
|
|
820
|
-
if ($[
|
|
791
|
+
if ($[0] !== fileMetas) {
|
|
821
792
|
t1 = fileMetas.map(_temp$1);
|
|
822
|
-
$[
|
|
823
|
-
$[
|
|
824
|
-
} else t1 = $[
|
|
793
|
+
$[0] = fileMetas;
|
|
794
|
+
$[1] = t1;
|
|
795
|
+
} else t1 = $[1];
|
|
825
796
|
let t2;
|
|
826
|
-
if ($[
|
|
797
|
+
if ($[2] !== sx || $[3] !== t1) {
|
|
827
798
|
t2 = /* @__PURE__ */ jsx(List, {
|
|
828
799
|
dense: true,
|
|
829
800
|
sx,
|
|
830
801
|
children: t1
|
|
831
802
|
});
|
|
832
|
-
$[
|
|
833
|
-
$[
|
|
834
|
-
$[
|
|
835
|
-
} else t2 = $[
|
|
803
|
+
$[2] = sx;
|
|
804
|
+
$[3] = t1;
|
|
805
|
+
$[4] = t2;
|
|
806
|
+
} else t2 = $[4];
|
|
836
807
|
return t2;
|
|
837
808
|
};
|
|
838
809
|
const ListFileViewerItem = ({ meta }) => {
|
|
@@ -897,11 +868,7 @@ function _temp$1(fileMeta) {
|
|
|
897
868
|
}
|
|
898
869
|
// src/components/file/fileViewer/ImageViewer.tsx
|
|
899
870
|
const ImageViewer = (t0) => {
|
|
900
|
-
const $ = c(
|
|
901
|
-
if ($[0] !== "c362b5d42dedaecf837e96525daab6341b34e31726fb1413e37d4a5eb8122071") {
|
|
902
|
-
for (let $i = 0; $i < 56; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
903
|
-
$[0] = "c362b5d42dedaecf837e96525daab6341b34e31726fb1413e37d4a5eb8122071";
|
|
904
|
-
}
|
|
871
|
+
const $ = c(55);
|
|
905
872
|
const { metaId } = t0;
|
|
906
873
|
const { fileMetas, setImageId, appName } = useFile();
|
|
907
874
|
let meta;
|
|
@@ -909,32 +876,32 @@ const ImageViewer = (t0) => {
|
|
|
909
876
|
let previous;
|
|
910
877
|
let t1;
|
|
911
878
|
let t2;
|
|
912
|
-
if ($[
|
|
879
|
+
if ($[0] !== appName || $[1] !== fileMetas || $[2] !== metaId) {
|
|
913
880
|
let t3;
|
|
914
|
-
if ($[
|
|
881
|
+
if ($[8] !== metaId) {
|
|
915
882
|
t3 = (m) => m.id === metaId;
|
|
916
|
-
$[
|
|
917
|
-
$[
|
|
918
|
-
} else t3 = $[
|
|
883
|
+
$[8] = metaId;
|
|
884
|
+
$[9] = t3;
|
|
885
|
+
} else t3 = $[9];
|
|
919
886
|
meta = fileMetas.find(t3);
|
|
920
887
|
let images;
|
|
921
888
|
let t4;
|
|
922
|
-
if ($[
|
|
889
|
+
if ($[10] !== fileMetas || $[11] !== metaId) {
|
|
923
890
|
images = fileMetas.filter(_temp);
|
|
924
891
|
let t5;
|
|
925
|
-
if ($[
|
|
892
|
+
if ($[14] !== metaId) {
|
|
926
893
|
t5 = (m_1) => m_1.id === metaId;
|
|
927
|
-
$[
|
|
928
|
-
$[
|
|
929
|
-
} else t5 = $[
|
|
894
|
+
$[14] = metaId;
|
|
895
|
+
$[15] = t5;
|
|
896
|
+
} else t5 = $[15];
|
|
930
897
|
t4 = images.findIndex(t5);
|
|
931
|
-
$[
|
|
932
|
-
$[
|
|
933
|
-
$[
|
|
934
|
-
$[
|
|
898
|
+
$[10] = fileMetas;
|
|
899
|
+
$[11] = metaId;
|
|
900
|
+
$[12] = images;
|
|
901
|
+
$[13] = t4;
|
|
935
902
|
} else {
|
|
936
|
-
images = $[
|
|
937
|
-
t4 = $[
|
|
903
|
+
images = $[12];
|
|
904
|
+
t4 = $[13];
|
|
938
905
|
}
|
|
939
906
|
const index = t4;
|
|
940
907
|
previous = index > 0 ? images[index - 1] : void 0;
|
|
@@ -944,42 +911,42 @@ const ImageViewer = (t0) => {
|
|
|
944
911
|
id: meta?.id ?? "",
|
|
945
912
|
appName
|
|
946
913
|
});
|
|
947
|
-
$[
|
|
948
|
-
$[
|
|
949
|
-
$[
|
|
950
|
-
$[
|
|
951
|
-
$[
|
|
952
|
-
$[
|
|
953
|
-
$[
|
|
954
|
-
$[
|
|
914
|
+
$[0] = appName;
|
|
915
|
+
$[1] = fileMetas;
|
|
916
|
+
$[2] = metaId;
|
|
917
|
+
$[3] = meta;
|
|
918
|
+
$[4] = next;
|
|
919
|
+
$[5] = previous;
|
|
920
|
+
$[6] = t1;
|
|
921
|
+
$[7] = t2;
|
|
955
922
|
} else {
|
|
956
|
-
meta = $[
|
|
957
|
-
next = $[
|
|
958
|
-
previous = $[
|
|
959
|
-
t1 = $[
|
|
960
|
-
t2 = $[
|
|
923
|
+
meta = $[3];
|
|
924
|
+
next = $[4];
|
|
925
|
+
previous = $[5];
|
|
926
|
+
t1 = $[6];
|
|
927
|
+
t2 = $[7];
|
|
961
928
|
}
|
|
962
929
|
const t3 = !!meta;
|
|
963
930
|
let t4;
|
|
964
|
-
if ($[
|
|
931
|
+
if ($[16] !== t1 || $[17] !== t3) {
|
|
965
932
|
t4 = {
|
|
966
933
|
...t1,
|
|
967
934
|
enabled: t3
|
|
968
935
|
};
|
|
969
|
-
$[
|
|
970
|
-
$[
|
|
971
|
-
$[
|
|
972
|
-
} else t4 = $[
|
|
936
|
+
$[16] = t1;
|
|
937
|
+
$[17] = t3;
|
|
938
|
+
$[18] = t4;
|
|
939
|
+
} else t4 = $[18];
|
|
973
940
|
const { data: source, isPending } = t2(t4);
|
|
974
941
|
let t5;
|
|
975
|
-
if ($[
|
|
942
|
+
if ($[19] !== setImageId) {
|
|
976
943
|
t5 = () => setImageId("");
|
|
977
|
-
$[
|
|
978
|
-
$[
|
|
979
|
-
} else t5 = $[
|
|
944
|
+
$[19] = setImageId;
|
|
945
|
+
$[20] = t5;
|
|
946
|
+
} else t5 = $[20];
|
|
980
947
|
const onClose = t5;
|
|
981
948
|
let t6;
|
|
982
|
-
if ($[
|
|
949
|
+
if ($[21] !== metaId || $[22] !== next || $[23] !== onClose || $[24] !== previous || $[25] !== setImageId) {
|
|
983
950
|
t6 = () => {
|
|
984
951
|
if (!metaId) return;
|
|
985
952
|
const handleOnKeydown = (event) => {
|
|
@@ -995,45 +962,45 @@ const ImageViewer = (t0) => {
|
|
|
995
962
|
globalThis.addEventListener("keydown", handleOnKeydown);
|
|
996
963
|
return () => globalThis.removeEventListener("keydown", handleOnKeydown);
|
|
997
964
|
};
|
|
998
|
-
$[
|
|
999
|
-
$[
|
|
1000
|
-
$[
|
|
1001
|
-
$[
|
|
1002
|
-
$[
|
|
1003
|
-
$[
|
|
1004
|
-
} else t6 = $[
|
|
965
|
+
$[21] = metaId;
|
|
966
|
+
$[22] = next;
|
|
967
|
+
$[23] = onClose;
|
|
968
|
+
$[24] = previous;
|
|
969
|
+
$[25] = setImageId;
|
|
970
|
+
$[26] = t6;
|
|
971
|
+
} else t6 = $[26];
|
|
1005
972
|
let t7;
|
|
1006
|
-
if ($[
|
|
973
|
+
if ($[27] !== metaId || $[28] !== next || $[29] !== previous) {
|
|
1007
974
|
t7 = [
|
|
1008
975
|
metaId,
|
|
1009
976
|
previous,
|
|
1010
977
|
next
|
|
1011
978
|
];
|
|
1012
|
-
$[
|
|
1013
|
-
$[
|
|
1014
|
-
$[
|
|
1015
|
-
$[
|
|
1016
|
-
} else t7 = $[
|
|
979
|
+
$[27] = metaId;
|
|
980
|
+
$[28] = next;
|
|
981
|
+
$[29] = previous;
|
|
982
|
+
$[30] = t7;
|
|
983
|
+
} else t7 = $[30];
|
|
1017
984
|
useEffect(t6, t7);
|
|
1018
985
|
if (!meta) return null;
|
|
1019
986
|
let t8;
|
|
1020
|
-
if ($[
|
|
987
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1021
988
|
t8 = {
|
|
1022
989
|
position: "fixed",
|
|
1023
990
|
top: "50%",
|
|
1024
991
|
transform: "translateY(-50%)"
|
|
1025
992
|
};
|
|
1026
|
-
$[
|
|
1027
|
-
} else t8 = $[
|
|
993
|
+
$[31] = t8;
|
|
994
|
+
} else t8 = $[31];
|
|
1028
995
|
const navSx = t8;
|
|
1029
996
|
let t9;
|
|
1030
|
-
if ($[
|
|
997
|
+
if ($[32] !== meta.fileName) {
|
|
1031
998
|
t9 = { paper: { "aria-label": meta.fileName } };
|
|
1032
|
-
$[
|
|
1033
|
-
$[
|
|
1034
|
-
} else t9 = $[
|
|
999
|
+
$[32] = meta.fileName;
|
|
1000
|
+
$[33] = t9;
|
|
1001
|
+
} else t9 = $[33];
|
|
1035
1002
|
let t10;
|
|
1036
|
-
if ($[
|
|
1003
|
+
if ($[34] !== isPending || $[35] !== meta.fileName || $[36] !== source) {
|
|
1037
1004
|
t10 = isPending ? /* @__PURE__ */ jsx(Skeleton, {
|
|
1038
1005
|
variant: "rectangular",
|
|
1039
1006
|
sx: {
|
|
@@ -1058,13 +1025,13 @@ const ImageViewer = (t0) => {
|
|
|
1058
1025
|
}
|
|
1059
1026
|
}
|
|
1060
1027
|
});
|
|
1061
|
-
$[
|
|
1062
|
-
$[
|
|
1063
|
-
$[
|
|
1064
|
-
$[
|
|
1065
|
-
} else t10 = $[
|
|
1028
|
+
$[34] = isPending;
|
|
1029
|
+
$[35] = meta.fileName;
|
|
1030
|
+
$[36] = source;
|
|
1031
|
+
$[37] = t10;
|
|
1032
|
+
} else t10 = $[37];
|
|
1066
1033
|
let t11;
|
|
1067
|
-
if ($[
|
|
1034
|
+
if ($[38] !== previous || $[39] !== setImageId) {
|
|
1068
1035
|
t11 = previous && /* @__PURE__ */ jsx(Fab, {
|
|
1069
1036
|
size: "medium",
|
|
1070
1037
|
onClick: () => setImageId(previous.id),
|
|
@@ -1075,12 +1042,12 @@ const ImageViewer = (t0) => {
|
|
|
1075
1042
|
},
|
|
1076
1043
|
children: /* @__PURE__ */ jsx(ChevronLeft, {})
|
|
1077
1044
|
});
|
|
1078
|
-
$[
|
|
1079
|
-
$[
|
|
1080
|
-
$[
|
|
1081
|
-
} else t11 = $[
|
|
1045
|
+
$[38] = previous;
|
|
1046
|
+
$[39] = setImageId;
|
|
1047
|
+
$[40] = t11;
|
|
1048
|
+
} else t11 = $[40];
|
|
1082
1049
|
let t12;
|
|
1083
|
-
if ($[
|
|
1050
|
+
if ($[41] !== next || $[42] !== setImageId) {
|
|
1084
1051
|
t12 = next && /* @__PURE__ */ jsx(Fab, {
|
|
1085
1052
|
size: "medium",
|
|
1086
1053
|
onClick: () => setImageId(next.id),
|
|
@@ -1091,27 +1058,27 @@ const ImageViewer = (t0) => {
|
|
|
1091
1058
|
},
|
|
1092
1059
|
children: /* @__PURE__ */ jsx(ChevronRight, {})
|
|
1093
1060
|
});
|
|
1094
|
-
$[
|
|
1095
|
-
$[
|
|
1096
|
-
$[
|
|
1097
|
-
} else t12 = $[
|
|
1061
|
+
$[41] = next;
|
|
1062
|
+
$[42] = setImageId;
|
|
1063
|
+
$[43] = t12;
|
|
1064
|
+
} else t12 = $[43];
|
|
1098
1065
|
let t13;
|
|
1099
1066
|
let t14;
|
|
1100
|
-
if ($[
|
|
1067
|
+
if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1101
1068
|
t13 = {
|
|
1102
1069
|
position: "fixed",
|
|
1103
1070
|
top: 8,
|
|
1104
1071
|
right: 8
|
|
1105
1072
|
};
|
|
1106
1073
|
t14 = /* @__PURE__ */ jsx(Close, {});
|
|
1107
|
-
$[
|
|
1108
|
-
$[
|
|
1074
|
+
$[44] = t13;
|
|
1075
|
+
$[45] = t14;
|
|
1109
1076
|
} else {
|
|
1110
|
-
t13 = $[
|
|
1111
|
-
t14 = $[
|
|
1077
|
+
t13 = $[44];
|
|
1078
|
+
t14 = $[45];
|
|
1112
1079
|
}
|
|
1113
1080
|
let t15;
|
|
1114
|
-
if ($[
|
|
1081
|
+
if ($[46] !== onClose) {
|
|
1115
1082
|
t15 = /* @__PURE__ */ jsx(Fab, {
|
|
1116
1083
|
size: "medium",
|
|
1117
1084
|
onClick: onClose,
|
|
@@ -1119,11 +1086,11 @@ const ImageViewer = (t0) => {
|
|
|
1119
1086
|
sx: t13,
|
|
1120
1087
|
children: t14
|
|
1121
1088
|
});
|
|
1122
|
-
$[
|
|
1123
|
-
$[
|
|
1124
|
-
} else t15 = $[
|
|
1089
|
+
$[46] = onClose;
|
|
1090
|
+
$[47] = t15;
|
|
1091
|
+
} else t15 = $[47];
|
|
1125
1092
|
let t16;
|
|
1126
|
-
if ($[
|
|
1093
|
+
if ($[48] !== onClose || $[49] !== t10 || $[50] !== t11 || $[51] !== t12 || $[52] !== t15 || $[53] !== t9) {
|
|
1127
1094
|
t16 = /* @__PURE__ */ jsxs(Dialog, {
|
|
1128
1095
|
open: true,
|
|
1129
1096
|
onClose,
|
|
@@ -1136,14 +1103,14 @@ const ImageViewer = (t0) => {
|
|
|
1136
1103
|
t15
|
|
1137
1104
|
]
|
|
1138
1105
|
});
|
|
1139
|
-
$[
|
|
1140
|
-
$[
|
|
1141
|
-
$[
|
|
1142
|
-
$[
|
|
1143
|
-
$[
|
|
1144
|
-
$[
|
|
1145
|
-
$[
|
|
1146
|
-
} else t16 = $[
|
|
1106
|
+
$[48] = onClose;
|
|
1107
|
+
$[49] = t10;
|
|
1108
|
+
$[50] = t11;
|
|
1109
|
+
$[51] = t12;
|
|
1110
|
+
$[52] = t15;
|
|
1111
|
+
$[53] = t9;
|
|
1112
|
+
$[54] = t16;
|
|
1113
|
+
} else t16 = $[54];
|
|
1147
1114
|
return t16;
|
|
1148
1115
|
};
|
|
1149
1116
|
function _temp(m_0) {
|
|
@@ -1151,45 +1118,41 @@ function _temp(m_0) {
|
|
|
1151
1118
|
}
|
|
1152
1119
|
// src/components/file/FileViewer.tsx
|
|
1153
1120
|
const FileViewer = (t0) => {
|
|
1154
|
-
const $ = c(
|
|
1155
|
-
if ($[0] !== "f20716e955e976c65e4217e568b647786c1c8599751fff5b227781489170527e") {
|
|
1156
|
-
for (let $i = 0; $i < 22; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1157
|
-
$[0] = "f20716e955e976c65e4217e568b647786c1c8599751fff5b227781489170527e";
|
|
1158
|
-
}
|
|
1121
|
+
const $ = c(21);
|
|
1159
1122
|
const { appName, subId, onDelete, actions, children } = t0;
|
|
1160
1123
|
let t1;
|
|
1161
|
-
if ($[
|
|
1124
|
+
if ($[0] !== appName || $[1] !== subId) {
|
|
1162
1125
|
t1 = fileMetasQueryOptions({
|
|
1163
1126
|
appName,
|
|
1164
1127
|
subId
|
|
1165
1128
|
});
|
|
1166
|
-
$[
|
|
1167
|
-
$[
|
|
1168
|
-
$[
|
|
1169
|
-
} else t1 = $[
|
|
1129
|
+
$[0] = appName;
|
|
1130
|
+
$[1] = subId;
|
|
1131
|
+
$[2] = t1;
|
|
1132
|
+
} else t1 = $[2];
|
|
1170
1133
|
const t2 = !!subId;
|
|
1171
1134
|
let t3;
|
|
1172
|
-
if ($[
|
|
1135
|
+
if ($[3] !== t1 || $[4] !== t2) {
|
|
1173
1136
|
t3 = {
|
|
1174
1137
|
...t1,
|
|
1175
1138
|
enabled: t2
|
|
1176
1139
|
};
|
|
1177
|
-
$[
|
|
1178
|
-
$[
|
|
1179
|
-
$[
|
|
1180
|
-
} else t3 = $[
|
|
1140
|
+
$[3] = t1;
|
|
1141
|
+
$[4] = t2;
|
|
1142
|
+
$[5] = t3;
|
|
1143
|
+
} else t3 = $[5];
|
|
1181
1144
|
const { data: t4 } = useQuery(t3);
|
|
1182
1145
|
let t5;
|
|
1183
|
-
if ($[
|
|
1146
|
+
if ($[6] !== t4) {
|
|
1184
1147
|
t5 = t4 === void 0 ? [] : t4;
|
|
1185
|
-
$[
|
|
1186
|
-
$[
|
|
1187
|
-
} else t5 = $[
|
|
1148
|
+
$[6] = t4;
|
|
1149
|
+
$[7] = t5;
|
|
1150
|
+
} else t5 = $[7];
|
|
1188
1151
|
const fileMetas = t5;
|
|
1189
1152
|
const [imageId, setImageId] = useState("");
|
|
1190
1153
|
if (fileMetas.length === 0) return null;
|
|
1191
1154
|
let t6;
|
|
1192
|
-
if ($[
|
|
1155
|
+
if ($[8] !== actions || $[9] !== appName || $[10] !== fileMetas || $[11] !== onDelete) {
|
|
1193
1156
|
t6 = {
|
|
1194
1157
|
appName,
|
|
1195
1158
|
fileMetas,
|
|
@@ -1197,208 +1160,146 @@ const FileViewer = (t0) => {
|
|
|
1197
1160
|
actions,
|
|
1198
1161
|
setImageId
|
|
1199
1162
|
};
|
|
1200
|
-
$[
|
|
1201
|
-
$[
|
|
1202
|
-
$[
|
|
1203
|
-
$[
|
|
1204
|
-
$[
|
|
1205
|
-
} else t6 = $[
|
|
1163
|
+
$[8] = actions;
|
|
1164
|
+
$[9] = appName;
|
|
1165
|
+
$[10] = fileMetas;
|
|
1166
|
+
$[11] = onDelete;
|
|
1167
|
+
$[12] = t6;
|
|
1168
|
+
} else t6 = $[12];
|
|
1206
1169
|
let t7;
|
|
1207
|
-
if ($[
|
|
1170
|
+
if ($[13] !== children) {
|
|
1208
1171
|
t7 = children({
|
|
1209
1172
|
Grid: FileViewerGrid,
|
|
1210
1173
|
List: FileViewerList
|
|
1211
1174
|
});
|
|
1212
|
-
$[
|
|
1213
|
-
$[
|
|
1214
|
-
} else t7 = $[
|
|
1175
|
+
$[13] = children;
|
|
1176
|
+
$[14] = t7;
|
|
1177
|
+
} else t7 = $[14];
|
|
1215
1178
|
let t8;
|
|
1216
|
-
if ($[
|
|
1179
|
+
if ($[15] !== imageId) {
|
|
1217
1180
|
t8 = /* @__PURE__ */ jsx(ImageViewer, { metaId: imageId });
|
|
1218
|
-
$[
|
|
1219
|
-
$[
|
|
1220
|
-
} else t8 = $[
|
|
1181
|
+
$[15] = imageId;
|
|
1182
|
+
$[16] = t8;
|
|
1183
|
+
} else t8 = $[16];
|
|
1221
1184
|
let t9;
|
|
1222
|
-
if ($[
|
|
1185
|
+
if ($[17] !== t6 || $[18] !== t7 || $[19] !== t8) {
|
|
1223
1186
|
t9 = /* @__PURE__ */ jsxs(FileContext.Provider, {
|
|
1224
1187
|
value: t6,
|
|
1225
1188
|
children: [t7, t8]
|
|
1226
1189
|
});
|
|
1227
|
-
$[
|
|
1228
|
-
$[
|
|
1229
|
-
$[
|
|
1230
|
-
$[
|
|
1231
|
-
} else t9 = $[
|
|
1190
|
+
$[17] = t6;
|
|
1191
|
+
$[18] = t7;
|
|
1192
|
+
$[19] = t8;
|
|
1193
|
+
$[20] = t9;
|
|
1194
|
+
} else t9 = $[20];
|
|
1232
1195
|
return t9;
|
|
1233
1196
|
};
|
|
1234
1197
|
// src/components/router/RouterButton.tsx
|
|
1235
|
-
const Component$
|
|
1236
|
-
const $ = c(
|
|
1237
|
-
if ($[0] !== "ac6204c9fa419bc8efad3ebea0df725f19f2cc476a09c695e535caec26527133") {
|
|
1238
|
-
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1239
|
-
$[0] = "ac6204c9fa419bc8efad3ebea0df725f19f2cc476a09c695e535caec26527133";
|
|
1240
|
-
}
|
|
1198
|
+
const Component$2 = React.forwardRef(function ButtonComponent(props, reference) {
|
|
1199
|
+
const $ = c(3);
|
|
1241
1200
|
let t0;
|
|
1242
|
-
if ($[
|
|
1201
|
+
if ($[0] !== props || $[1] !== reference) {
|
|
1243
1202
|
t0 = /* @__PURE__ */ jsx(Button, {
|
|
1244
1203
|
ref: reference,
|
|
1245
1204
|
component: "a",
|
|
1246
1205
|
...props
|
|
1247
1206
|
});
|
|
1248
|
-
$[
|
|
1249
|
-
$[
|
|
1250
|
-
$[
|
|
1251
|
-
} else t0 = $[
|
|
1207
|
+
$[0] = props;
|
|
1208
|
+
$[1] = reference;
|
|
1209
|
+
$[2] = t0;
|
|
1210
|
+
} else t0 = $[2];
|
|
1252
1211
|
return t0;
|
|
1253
1212
|
});
|
|
1254
|
-
const CreatedComponent$
|
|
1213
|
+
const CreatedComponent$2 = createLink(Component$2);
|
|
1255
1214
|
const RouterButton = (props) => {
|
|
1256
|
-
const $ = c(
|
|
1257
|
-
if ($[0] !== "ac6204c9fa419bc8efad3ebea0df725f19f2cc476a09c695e535caec26527133") {
|
|
1258
|
-
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1259
|
-
$[0] = "ac6204c9fa419bc8efad3ebea0df725f19f2cc476a09c695e535caec26527133";
|
|
1260
|
-
}
|
|
1215
|
+
const $ = c(2);
|
|
1261
1216
|
let t0;
|
|
1262
|
-
if ($[
|
|
1263
|
-
t0 = /* @__PURE__ */ jsx(CreatedComponent$
|
|
1264
|
-
$[
|
|
1265
|
-
$[
|
|
1266
|
-
} else t0 = $[
|
|
1217
|
+
if ($[0] !== props) {
|
|
1218
|
+
t0 = /* @__PURE__ */ jsx(CreatedComponent$2, { ...props });
|
|
1219
|
+
$[0] = props;
|
|
1220
|
+
$[1] = t0;
|
|
1221
|
+
} else t0 = $[1];
|
|
1267
1222
|
return t0;
|
|
1268
1223
|
};
|
|
1269
1224
|
// src/components/router/RouterFab.tsx
|
|
1270
|
-
const Component$
|
|
1271
|
-
const $ = c(
|
|
1272
|
-
if ($[0] !== "ecf406c2f1df75bd8d4f8cc1e2a0841119cda75e807b28c7c03400a2d927c16b") {
|
|
1273
|
-
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1274
|
-
$[0] = "ecf406c2f1df75bd8d4f8cc1e2a0841119cda75e807b28c7c03400a2d927c16b";
|
|
1275
|
-
}
|
|
1225
|
+
const Component$1 = React.forwardRef(function FabComponent(props, reference) {
|
|
1226
|
+
const $ = c(3);
|
|
1276
1227
|
let t0;
|
|
1277
|
-
if ($[
|
|
1228
|
+
if ($[0] !== props || $[1] !== reference) {
|
|
1278
1229
|
t0 = /* @__PURE__ */ jsx(Fab, {
|
|
1279
1230
|
ref: reference,
|
|
1280
1231
|
component: "a",
|
|
1281
1232
|
...props
|
|
1282
1233
|
});
|
|
1283
|
-
$[
|
|
1284
|
-
$[
|
|
1285
|
-
$[3] = t0;
|
|
1286
|
-
} else t0 = $[3];
|
|
1287
|
-
return t0;
|
|
1288
|
-
});
|
|
1289
|
-
const CreatedComponent$2 = createLink(Component$2);
|
|
1290
|
-
const RouterFab = (props) => {
|
|
1291
|
-
const $ = c(3);
|
|
1292
|
-
if ($[0] !== "ecf406c2f1df75bd8d4f8cc1e2a0841119cda75e807b28c7c03400a2d927c16b") {
|
|
1293
|
-
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1294
|
-
$[0] = "ecf406c2f1df75bd8d4f8cc1e2a0841119cda75e807b28c7c03400a2d927c16b";
|
|
1295
|
-
}
|
|
1296
|
-
let t0;
|
|
1297
|
-
if ($[1] !== props) {
|
|
1298
|
-
t0 = /* @__PURE__ */ jsx(CreatedComponent$2, { ...props });
|
|
1299
|
-
$[1] = props;
|
|
1234
|
+
$[0] = props;
|
|
1235
|
+
$[1] = reference;
|
|
1300
1236
|
$[2] = t0;
|
|
1301
1237
|
} else t0 = $[2];
|
|
1302
1238
|
return t0;
|
|
1303
|
-
};
|
|
1304
|
-
// src/components/router/RouterLink.tsx
|
|
1305
|
-
const Component$1 = React.forwardRef(function LinkComponent(props, reference) {
|
|
1306
|
-
const $ = c(4);
|
|
1307
|
-
if ($[0] !== "b12e87e18a050ab0e29a4efcc3bd2a9fa6915db983e56ea2dc68853a7dc4b979") {
|
|
1308
|
-
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1309
|
-
$[0] = "b12e87e18a050ab0e29a4efcc3bd2a9fa6915db983e56ea2dc68853a7dc4b979";
|
|
1310
|
-
}
|
|
1311
|
-
let t0;
|
|
1312
|
-
if ($[1] !== props || $[2] !== reference) {
|
|
1313
|
-
t0 = /* @__PURE__ */ jsx(Link, {
|
|
1314
|
-
ref: reference,
|
|
1315
|
-
...props
|
|
1316
|
-
});
|
|
1317
|
-
$[1] = props;
|
|
1318
|
-
$[2] = reference;
|
|
1319
|
-
$[3] = t0;
|
|
1320
|
-
} else t0 = $[3];
|
|
1321
|
-
return t0;
|
|
1322
1239
|
});
|
|
1323
1240
|
const CreatedComponent$1 = createLink(Component$1);
|
|
1324
|
-
const
|
|
1325
|
-
const $ = c(
|
|
1326
|
-
if ($[0] !== "b12e87e18a050ab0e29a4efcc3bd2a9fa6915db983e56ea2dc68853a7dc4b979") {
|
|
1327
|
-
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1328
|
-
$[0] = "b12e87e18a050ab0e29a4efcc3bd2a9fa6915db983e56ea2dc68853a7dc4b979";
|
|
1329
|
-
}
|
|
1241
|
+
const RouterFab = (props) => {
|
|
1242
|
+
const $ = c(2);
|
|
1330
1243
|
let t0;
|
|
1331
|
-
if ($[
|
|
1244
|
+
if ($[0] !== props) {
|
|
1332
1245
|
t0 = /* @__PURE__ */ jsx(CreatedComponent$1, { ...props });
|
|
1333
|
-
$[
|
|
1334
|
-
$[
|
|
1335
|
-
} else t0 = $[
|
|
1246
|
+
$[0] = props;
|
|
1247
|
+
$[1] = t0;
|
|
1248
|
+
} else t0 = $[1];
|
|
1336
1249
|
return t0;
|
|
1337
1250
|
};
|
|
1338
1251
|
// src/components/router/RouterTab.tsx
|
|
1339
1252
|
const Component = React.forwardRef(function TabComponent(props, reference) {
|
|
1340
|
-
const $ = c(
|
|
1341
|
-
if ($[0] !== "219e07108be3e229bc6eb53840beb65505cbaaf46f02d872937e7895165a73de") {
|
|
1342
|
-
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1343
|
-
$[0] = "219e07108be3e229bc6eb53840beb65505cbaaf46f02d872937e7895165a73de";
|
|
1344
|
-
}
|
|
1253
|
+
const $ = c(3);
|
|
1345
1254
|
let t0;
|
|
1346
|
-
if ($[
|
|
1255
|
+
if ($[0] !== props || $[1] !== reference) {
|
|
1347
1256
|
t0 = /* @__PURE__ */ jsx(Tab, {
|
|
1348
1257
|
ref: reference,
|
|
1349
1258
|
component: "a",
|
|
1350
1259
|
...props
|
|
1351
1260
|
});
|
|
1352
|
-
$[
|
|
1353
|
-
$[
|
|
1354
|
-
$[
|
|
1355
|
-
} else t0 = $[
|
|
1261
|
+
$[0] = props;
|
|
1262
|
+
$[1] = reference;
|
|
1263
|
+
$[2] = t0;
|
|
1264
|
+
} else t0 = $[2];
|
|
1356
1265
|
return t0;
|
|
1357
1266
|
});
|
|
1358
1267
|
const CreatedComponent = createLink(Component);
|
|
1359
1268
|
const RouterTab = (props) => {
|
|
1360
|
-
const $ = c(
|
|
1361
|
-
if ($[0] !== "219e07108be3e229bc6eb53840beb65505cbaaf46f02d872937e7895165a73de") {
|
|
1362
|
-
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1363
|
-
$[0] = "219e07108be3e229bc6eb53840beb65505cbaaf46f02d872937e7895165a73de";
|
|
1364
|
-
}
|
|
1269
|
+
const $ = c(2);
|
|
1365
1270
|
let t0;
|
|
1366
|
-
if ($[
|
|
1271
|
+
if ($[0] !== props) {
|
|
1367
1272
|
t0 = /* @__PURE__ */ jsx(CreatedComponent, { ...props });
|
|
1368
|
-
$[
|
|
1369
|
-
$[
|
|
1370
|
-
} else t0 = $[
|
|
1273
|
+
$[0] = props;
|
|
1274
|
+
$[1] = t0;
|
|
1275
|
+
} else t0 = $[1];
|
|
1371
1276
|
return t0;
|
|
1372
1277
|
};
|
|
1373
1278
|
// src/components/router/RouterNotFound.tsx
|
|
1374
1279
|
function RouterNotFound() {
|
|
1375
|
-
const $ = c(
|
|
1376
|
-
if ($[0] !== "b85bee0f4f29e1fb858e96e13dc2fcbb04a6bbd08c5b88b6d4df66a8869ddb03") {
|
|
1377
|
-
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1378
|
-
$[0] = "b85bee0f4f29e1fb858e96e13dc2fcbb04a6bbd08c5b88b6d4df66a8869ddb03";
|
|
1379
|
-
}
|
|
1280
|
+
const $ = c(8);
|
|
1380
1281
|
const { t } = useTranslation();
|
|
1381
1282
|
let t0;
|
|
1382
|
-
if ($[
|
|
1283
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1383
1284
|
t0 = {
|
|
1384
1285
|
alignItems: "center",
|
|
1385
1286
|
justifyContent: "center",
|
|
1386
1287
|
px: 2
|
|
1387
1288
|
};
|
|
1388
|
-
$[
|
|
1389
|
-
} else t0 = $[
|
|
1289
|
+
$[0] = t0;
|
|
1290
|
+
} else t0 = $[0];
|
|
1390
1291
|
let t1;
|
|
1391
|
-
if ($[
|
|
1292
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1392
1293
|
t1 = {
|
|
1393
1294
|
display: "flex",
|
|
1394
1295
|
alignItems: "center",
|
|
1395
1296
|
m: 0,
|
|
1396
1297
|
mb: 4
|
|
1397
1298
|
};
|
|
1398
|
-
$[
|
|
1399
|
-
} else t1 = $[
|
|
1299
|
+
$[1] = t1;
|
|
1300
|
+
} else t1 = $[1];
|
|
1400
1301
|
let t2;
|
|
1401
|
-
if ($[
|
|
1302
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1402
1303
|
t2 = /* @__PURE__ */ jsx(Typography, {
|
|
1403
1304
|
variant: "h3",
|
|
1404
1305
|
component: "span",
|
|
@@ -1408,10 +1309,10 @@ function RouterNotFound() {
|
|
|
1408
1309
|
},
|
|
1409
1310
|
children: "404"
|
|
1410
1311
|
});
|
|
1411
|
-
$[
|
|
1412
|
-
} else t2 = $[
|
|
1312
|
+
$[2] = t2;
|
|
1313
|
+
} else t2 = $[2];
|
|
1413
1314
|
let t3;
|
|
1414
|
-
if ($[
|
|
1315
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1415
1316
|
t3 = /* @__PURE__ */ jsx(Divider, {
|
|
1416
1317
|
component: "span",
|
|
1417
1318
|
role: "presentation",
|
|
@@ -1419,16 +1320,16 @@ function RouterNotFound() {
|
|
|
1419
1320
|
flexItem: true,
|
|
1420
1321
|
sx: { mx: 3 }
|
|
1421
1322
|
});
|
|
1422
|
-
$[
|
|
1423
|
-
} else t3 = $[
|
|
1323
|
+
$[3] = t3;
|
|
1324
|
+
} else t3 = $[3];
|
|
1424
1325
|
let t4;
|
|
1425
|
-
if ($[
|
|
1326
|
+
if ($[4] !== t) {
|
|
1426
1327
|
t4 = t("Layout.ThisPageCouldNotBeFound");
|
|
1427
|
-
$[
|
|
1428
|
-
$[
|
|
1429
|
-
} else t4 = $[
|
|
1328
|
+
$[4] = t;
|
|
1329
|
+
$[5] = t4;
|
|
1330
|
+
} else t4 = $[5];
|
|
1430
1331
|
let t5;
|
|
1431
|
-
if ($[
|
|
1332
|
+
if ($[6] !== t4) {
|
|
1432
1333
|
t5 = /* @__PURE__ */ jsx(Fullscreen, {
|
|
1433
1334
|
sx: t0,
|
|
1434
1335
|
children: /* @__PURE__ */ jsxs(Box, {
|
|
@@ -1445,61 +1346,57 @@ function RouterNotFound() {
|
|
|
1445
1346
|
]
|
|
1446
1347
|
})
|
|
1447
1348
|
});
|
|
1448
|
-
$[
|
|
1449
|
-
$[
|
|
1450
|
-
} else t5 = $[
|
|
1349
|
+
$[6] = t4;
|
|
1350
|
+
$[7] = t5;
|
|
1351
|
+
} else t5 = $[7];
|
|
1451
1352
|
return t5;
|
|
1452
1353
|
}
|
|
1453
1354
|
// src/components/router/RouterError.tsx
|
|
1454
1355
|
const RouterError = (t0) => {
|
|
1455
|
-
const $ = c(
|
|
1456
|
-
if ($[0] !== "99b46ee567229b93d88dd5dde9a07d2a370c1710d4e834f04c33ae486b9ec8a5") {
|
|
1457
|
-
for (let $i = 0; $i < 12; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1458
|
-
$[0] = "99b46ee567229b93d88dd5dde9a07d2a370c1710d4e834f04c33ae486b9ec8a5";
|
|
1459
|
-
}
|
|
1356
|
+
const $ = c(11);
|
|
1460
1357
|
const { error } = t0;
|
|
1461
1358
|
const isError = error instanceof Error;
|
|
1462
1359
|
let t1;
|
|
1463
|
-
if ($[
|
|
1360
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1464
1361
|
t1 = {
|
|
1465
1362
|
alignItems: "center",
|
|
1466
1363
|
justifyContent: "center",
|
|
1467
1364
|
px: 2
|
|
1468
1365
|
};
|
|
1469
|
-
$[
|
|
1470
|
-
} else t1 = $[
|
|
1366
|
+
$[0] = t1;
|
|
1367
|
+
} else t1 = $[0];
|
|
1471
1368
|
let t2;
|
|
1472
|
-
if ($[
|
|
1369
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1473
1370
|
t2 = {
|
|
1474
1371
|
display: "flex",
|
|
1475
1372
|
alignItems: "center",
|
|
1476
1373
|
m: 0,
|
|
1477
1374
|
mb: 4
|
|
1478
1375
|
};
|
|
1479
|
-
$[
|
|
1480
|
-
} else t2 = $[
|
|
1376
|
+
$[1] = t2;
|
|
1377
|
+
} else t2 = $[1];
|
|
1481
1378
|
let t3;
|
|
1482
|
-
if ($[
|
|
1379
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1483
1380
|
t3 = {
|
|
1484
1381
|
fontWeight: 500,
|
|
1485
1382
|
lineHeight: 1
|
|
1486
1383
|
};
|
|
1487
|
-
$[
|
|
1488
|
-
} else t3 = $[
|
|
1384
|
+
$[2] = t3;
|
|
1385
|
+
} else t3 = $[2];
|
|
1489
1386
|
const t4 = isError && error.name || "500";
|
|
1490
1387
|
let t5;
|
|
1491
|
-
if ($[
|
|
1388
|
+
if ($[3] !== t4) {
|
|
1492
1389
|
t5 = /* @__PURE__ */ jsx(Typography, {
|
|
1493
1390
|
variant: "h3",
|
|
1494
1391
|
component: "span",
|
|
1495
1392
|
sx: t3,
|
|
1496
1393
|
children: t4
|
|
1497
1394
|
});
|
|
1498
|
-
$[
|
|
1499
|
-
$[
|
|
1500
|
-
} else t5 = $[
|
|
1395
|
+
$[3] = t4;
|
|
1396
|
+
$[4] = t5;
|
|
1397
|
+
} else t5 = $[4];
|
|
1501
1398
|
let t6;
|
|
1502
|
-
if ($[
|
|
1399
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1503
1400
|
t6 = /* @__PURE__ */ jsx(Divider, {
|
|
1504
1401
|
component: "span",
|
|
1505
1402
|
role: "presentation",
|
|
@@ -1507,21 +1404,21 @@ const RouterError = (t0) => {
|
|
|
1507
1404
|
flexItem: true,
|
|
1508
1405
|
sx: { mx: 3 }
|
|
1509
1406
|
});
|
|
1510
|
-
$[
|
|
1511
|
-
} else t6 = $[
|
|
1407
|
+
$[5] = t6;
|
|
1408
|
+
} else t6 = $[5];
|
|
1512
1409
|
const t7 = isError ? error.message : String(error);
|
|
1513
1410
|
let t8;
|
|
1514
|
-
if ($[
|
|
1411
|
+
if ($[6] !== t7) {
|
|
1515
1412
|
t8 = /* @__PURE__ */ jsx(Typography, {
|
|
1516
1413
|
variant: "h5",
|
|
1517
1414
|
component: "span",
|
|
1518
1415
|
children: t7
|
|
1519
1416
|
});
|
|
1520
|
-
$[
|
|
1521
|
-
$[
|
|
1522
|
-
} else t8 = $[
|
|
1417
|
+
$[6] = t7;
|
|
1418
|
+
$[7] = t8;
|
|
1419
|
+
} else t8 = $[7];
|
|
1523
1420
|
let t9;
|
|
1524
|
-
if ($[
|
|
1421
|
+
if ($[8] !== t5 || $[9] !== t8) {
|
|
1525
1422
|
t9 = /* @__PURE__ */ jsx(Fullscreen, {
|
|
1526
1423
|
sx: t1,
|
|
1527
1424
|
children: /* @__PURE__ */ jsxs(Box, {
|
|
@@ -1534,10 +1431,10 @@ const RouterError = (t0) => {
|
|
|
1534
1431
|
]
|
|
1535
1432
|
})
|
|
1536
1433
|
});
|
|
1537
|
-
$[
|
|
1538
|
-
$[
|
|
1539
|
-
$[
|
|
1540
|
-
} else t9 = $[
|
|
1434
|
+
$[8] = t5;
|
|
1435
|
+
$[9] = t8;
|
|
1436
|
+
$[10] = t9;
|
|
1437
|
+
} else t9 = $[10];
|
|
1541
1438
|
return t9;
|
|
1542
1439
|
};
|
|
1543
1440
|
// src/components/table/LayoutTable.tsx
|
|
@@ -1633,22 +1530,22 @@ function LayoutTable({ table, loading = false, pagination = false, pageSizeOptio
|
|
|
1633
1530
|
observer.observe(container);
|
|
1634
1531
|
return () => observer.disconnect();
|
|
1635
1532
|
}, []);
|
|
1636
|
-
const flexColumns = table.getVisibleLeafColumns().filter((
|
|
1637
|
-
const totalFlex = flexColumns.reduce((total,
|
|
1533
|
+
const flexColumns = table.getVisibleLeafColumns().filter((column) => columnFlex(column) > 0);
|
|
1534
|
+
const totalFlex = flexColumns.reduce((total, column) => total + columnFlex(column), 0);
|
|
1638
1535
|
const flexSpace = containerWidth - table.getTotalSize();
|
|
1639
|
-
const flexDeltas = flexColumns.map((
|
|
1640
|
-
const flexFits = flexColumns.every((
|
|
1536
|
+
const flexDeltas = flexColumns.map((column) => [column.id, Math.floor(flexSpace * columnFlex(column) / totalFlex)]);
|
|
1537
|
+
const flexFits = flexColumns.every((column, index) => column.getSize() + flexDeltas[index][1] >= (column.columnDef.minSize ?? 20));
|
|
1641
1538
|
const flexWidths = new Map(flexFits ? flexDeltas : []);
|
|
1642
|
-
const tableWidth = [...flexWidths.values()].reduce((
|
|
1643
|
-
const renderedWidth = (
|
|
1644
|
-
const headerWidth = (header) => header.column.getLeafColumns().reduce((width,
|
|
1539
|
+
const tableWidth = [...flexWidths.values()].reduce((total, delta) => total + delta, table.getTotalSize());
|
|
1540
|
+
const renderedWidth = (column) => column.getSize() + (flexWidths.get(column.id) ?? 0);
|
|
1541
|
+
const headerWidth = (header) => header.column.getLeafColumns().reduce((width, column) => width + (flexWidths.get(column.id) ?? 0), header.getSize());
|
|
1645
1542
|
const virtualizeColumns = headerGroups.length === 1 && !loading;
|
|
1646
1543
|
const rowVirtualizer = useVirtualizer({
|
|
1647
1544
|
count: rows.length,
|
|
1648
1545
|
getScrollElement: () => containerRef.current,
|
|
1649
1546
|
estimateSize: () => ROW_HEIGHT,
|
|
1650
1547
|
measureElement: (element) => element.getBoundingClientRect().height,
|
|
1651
|
-
getItemKey: (
|
|
1548
|
+
getItemKey: (index) => rows[index].id,
|
|
1652
1549
|
overscan: ROW_OVERSCAN,
|
|
1653
1550
|
rangeExtractor: (range) => lookaheadRange(range, rowVirtualizer.scrollDirection, ROW_LOOKAHEAD),
|
|
1654
1551
|
scrollMargin: headerHeight,
|
|
@@ -1657,8 +1554,8 @@ function LayoutTable({ table, loading = false, pagination = false, pageSizeOptio
|
|
|
1657
1554
|
const columnVirtualizer = useVirtualizer({
|
|
1658
1555
|
count: virtualizeColumns ? centerColumns.length : 0,
|
|
1659
1556
|
getScrollElement: () => containerRef.current,
|
|
1660
|
-
estimateSize: (
|
|
1661
|
-
getItemKey: (
|
|
1557
|
+
estimateSize: (index) => renderedWidth(centerColumns[index]),
|
|
1558
|
+
getItemKey: (index) => centerColumns[index].id,
|
|
1662
1559
|
horizontal: true,
|
|
1663
1560
|
overscan: COLUMN_OVERSCAN,
|
|
1664
1561
|
scrollPaddingStart: startPinnedWidth,
|
|
@@ -1684,9 +1581,9 @@ function LayoutTable({ table, loading = false, pagination = false, pageSizeOptio
|
|
|
1684
1581
|
});
|
|
1685
1582
|
return;
|
|
1686
1583
|
}
|
|
1687
|
-
const rowIndex = rows.findIndex((
|
|
1584
|
+
const rowIndex = rows.findIndex((row) => row.id === focusedRowId);
|
|
1688
1585
|
if (rowIndex >= 0) rowVirtualizer.scrollToIndex(rowIndex);
|
|
1689
|
-
const columnIndex = centerColumns.findIndex((
|
|
1586
|
+
const columnIndex = centerColumns.findIndex((column) => column.id === focusedColumnId);
|
|
1690
1587
|
if (columnIndex >= 0) columnVirtualizer.scrollToIndex(columnIndex);
|
|
1691
1588
|
}, [focusedRowId, focusedColumnId]);
|
|
1692
1589
|
const hasCellSelection = table.state.cellSelection.length > 0;
|
|
@@ -1767,34 +1664,34 @@ function LayoutTable({ table, loading = false, pagination = false, pageSizeOptio
|
|
|
1767
1664
|
end: []
|
|
1768
1665
|
};
|
|
1769
1666
|
/** Absorbs the width of the columns the centre window skipped. */
|
|
1770
|
-
const skippedColumns = (
|
|
1667
|
+
const skippedColumns = (width) => width > 0 ? /* @__PURE__ */ jsx(TableCell, {
|
|
1771
1668
|
"aria-hidden": true,
|
|
1772
1669
|
className: layoutTableClasses.cellOffset,
|
|
1773
|
-
style: { width
|
|
1670
|
+
style: { width },
|
|
1774
1671
|
sx: { p: 0 }
|
|
1775
1672
|
}) : null;
|
|
1776
1673
|
const renderHeader = (h, groupIndex) => /* @__PURE__ */ jsx(table.AppHeader, {
|
|
1777
1674
|
header: h,
|
|
1778
|
-
children: (
|
|
1779
|
-
const align = columnAlign(
|
|
1780
|
-
const labelled = hasColumnLabel(
|
|
1675
|
+
children: (header) => {
|
|
1676
|
+
const align = columnAlign(header.column);
|
|
1677
|
+
const labelled = hasColumnLabel(header.column);
|
|
1781
1678
|
return /* @__PURE__ */ jsxs(TableCell, {
|
|
1782
|
-
className: classNames(layoutTableClasses.columnHeader,
|
|
1783
|
-
colSpan:
|
|
1679
|
+
className: classNames(layoutTableClasses.columnHeader, header.column.getCanSort() && layoutTableClasses["columnHeader--sortable"], header.column.getIsSorted() && layoutTableClasses["columnHeader--sorted"], header.column.getIsFiltered() && layoutTableClasses["columnHeader--filtered"], pinnedClass(header.column, "columnHeader")),
|
|
1680
|
+
colSpan: header.colSpan,
|
|
1784
1681
|
align,
|
|
1785
|
-
sortDirection:
|
|
1682
|
+
sortDirection: header.column.getIsSorted(),
|
|
1786
1683
|
sx: {
|
|
1787
1684
|
position: "sticky",
|
|
1788
1685
|
top: groupIndex * COLUMN_HEADER_HEIGHT,
|
|
1789
1686
|
zIndex: 3,
|
|
1790
1687
|
bgcolor: "background.paper",
|
|
1791
|
-
width: headerWidth(
|
|
1688
|
+
width: headerWidth(header),
|
|
1792
1689
|
whiteSpace: "nowrap",
|
|
1793
1690
|
overflow: "hidden",
|
|
1794
1691
|
...labelled ? CELL_SX : UTILITY_SX,
|
|
1795
|
-
...pinnedSx(
|
|
1692
|
+
...pinnedSx(header.column, true)
|
|
1796
1693
|
},
|
|
1797
|
-
children: [
|
|
1694
|
+
children: [header.isPlaceholder ? null : /* @__PURE__ */ jsxs(Box, {
|
|
1798
1695
|
className: layoutTableClasses.columnHeaderContent,
|
|
1799
1696
|
sx: {
|
|
1800
1697
|
display: "flex",
|
|
@@ -1816,34 +1713,34 @@ function LayoutTable({ table, loading = false, pagination = false, pageSizeOptio
|
|
|
1816
1713
|
textOverflow: "ellipsis"
|
|
1817
1714
|
}
|
|
1818
1715
|
},
|
|
1819
|
-
children: /* @__PURE__ */ jsx(
|
|
1820
|
-
}), !disableColumnMenu && /* @__PURE__ */ jsx(
|
|
1821
|
-
}), /* @__PURE__ */ jsx(
|
|
1716
|
+
children: /* @__PURE__ */ jsx(header.HeaderSortLabel, { children: /* @__PURE__ */ jsx(header.FlexRender, {}) })
|
|
1717
|
+
}), !disableColumnMenu && /* @__PURE__ */ jsx(header.HeaderMenu, { disableGrouping: pagination })]
|
|
1718
|
+
}), /* @__PURE__ */ jsx(header.HeaderResizeHandle, {})]
|
|
1822
1719
|
});
|
|
1823
1720
|
}
|
|
1824
1721
|
}, h.id);
|
|
1825
|
-
const cellClassName = (
|
|
1722
|
+
const cellClassName = (cell) => classNames(layoutTableClasses.cell, cell.getIsSelected() && layoutTableClasses["cell--selected"], cell.getIsGrouped() && layoutTableClasses["cell--grouped"], cell.getIsAggregated() && layoutTableClasses["cell--aggregated"], pinnedClass(cell.column, "cell"));
|
|
1826
1723
|
const renderCell = (c) => /* @__PURE__ */ jsx(table.AppCell, {
|
|
1827
1724
|
cell: c,
|
|
1828
|
-
children: (
|
|
1829
|
-
className: cellClassName(
|
|
1830
|
-
align: columnAlign(
|
|
1831
|
-
rowSpan:
|
|
1832
|
-
colSpan:
|
|
1833
|
-
tabIndex:
|
|
1834
|
-
onMouseDown:
|
|
1835
|
-
onMouseEnter:
|
|
1725
|
+
children: (cell) => cell.getIsCovered() ? null : /* @__PURE__ */ jsx(TableCell, {
|
|
1726
|
+
className: cellClassName(cell),
|
|
1727
|
+
align: columnAlign(cell.column),
|
|
1728
|
+
rowSpan: cell.getRowSpan(),
|
|
1729
|
+
colSpan: cell.getColSpan(),
|
|
1730
|
+
tabIndex: cell.getCanSelect() ? cell.getTabIndex() : void 0,
|
|
1731
|
+
onMouseDown: cell.getSelectionStartHandler(),
|
|
1732
|
+
onMouseEnter: cell.getSelectionExtendHandler(),
|
|
1836
1733
|
onMouseOver: titleIfTruncated,
|
|
1837
1734
|
sx: {
|
|
1838
1735
|
overflow: "hidden",
|
|
1839
1736
|
textOverflow: "ellipsis",
|
|
1840
1737
|
whiteSpace: "nowrap",
|
|
1841
|
-
userSelect:
|
|
1842
|
-
...hasColumnLabel(
|
|
1843
|
-
...pinnedSx(
|
|
1844
|
-
...cellSelectionSx(
|
|
1738
|
+
userSelect: cell.getCanSelect() ? "none" : void 0,
|
|
1739
|
+
...hasColumnLabel(cell.column) ? CELL_SX : UTILITY_SX,
|
|
1740
|
+
...pinnedSx(cell.column),
|
|
1741
|
+
...cellSelectionSx(cell)
|
|
1845
1742
|
},
|
|
1846
|
-
children:
|
|
1743
|
+
children: cell.getIsGrouped() ? /* @__PURE__ */ jsx(cell.GroupCell, {}) : cell.row.getIsGrouped() && !cell.getIsAggregated() ? null : /* @__PURE__ */ jsx(cell.FlexRender, {})
|
|
1847
1744
|
})
|
|
1848
1745
|
}, c.id);
|
|
1849
1746
|
const renderFooter = (f) => /* @__PURE__ */ jsx(table.AppFooter, {
|
|
@@ -1861,21 +1758,21 @@ function LayoutTable({ table, loading = false, pagination = false, pageSizeOptio
|
|
|
1861
1758
|
})
|
|
1862
1759
|
}, f.id);
|
|
1863
1760
|
const rowAction = onRowClick ?? onRowDoubleClick;
|
|
1864
|
-
const renderRow = (
|
|
1865
|
-
const cells = windowColumns(
|
|
1866
|
-
const focusableCells =
|
|
1761
|
+
const renderRow = (row, index) => {
|
|
1762
|
+
const cells = windowColumns(row.getVisibleCells());
|
|
1763
|
+
const focusableCells = row.getVisibleCells().some((cell) => cell.getCanSelect());
|
|
1867
1764
|
return /* @__PURE__ */ jsxs(TableRow, {
|
|
1868
|
-
className: classNames(layoutTableClasses.row,
|
|
1765
|
+
className: classNames(layoutTableClasses.row, row.getIsGrouped() && layoutTableClasses["row--grouped"], row.getIsExpanded() && layoutTableClasses["row--expanded"], row.getIsPinned() && layoutTableClasses["row--pinned"]),
|
|
1869
1766
|
ref: rowVirtualizer.measureElement,
|
|
1870
|
-
"data-index":
|
|
1767
|
+
"data-index": index,
|
|
1871
1768
|
hover: true,
|
|
1872
|
-
selected:
|
|
1769
|
+
selected: row.getIsSelected(),
|
|
1873
1770
|
tabIndex: rowAction && !focusableCells ? 0 : void 0,
|
|
1874
|
-
onClick: onRowClick && (() => onRowClick(
|
|
1875
|
-
onDoubleClick: onRowDoubleClick && (() => onRowDoubleClick(
|
|
1771
|
+
onClick: onRowClick && (() => onRowClick(row)),
|
|
1772
|
+
onDoubleClick: onRowDoubleClick && (() => onRowDoubleClick(row)),
|
|
1876
1773
|
onKeyDown: rowAction && ((event) => {
|
|
1877
1774
|
const target = event.target;
|
|
1878
|
-
if (event.key === "Enter" && (target === event.currentTarget || target.tagName === "TD")) rowAction(
|
|
1775
|
+
if (event.key === "Enter" && (target === event.currentTarget || target.tagName === "TD")) rowAction(row);
|
|
1879
1776
|
}),
|
|
1880
1777
|
sx: {
|
|
1881
1778
|
height: ROW_HEIGHT,
|
|
@@ -1893,7 +1790,7 @@ function LayoutTable({ table, loading = false, pagination = false, pageSizeOptio
|
|
|
1893
1790
|
sx: { p: 0 }
|
|
1894
1791
|
})
|
|
1895
1792
|
]
|
|
1896
|
-
},
|
|
1793
|
+
}, row.id);
|
|
1897
1794
|
};
|
|
1898
1795
|
const rowCache = useMemo(() => ({ current: /* @__PURE__ */ new Map() }), [
|
|
1899
1796
|
table,
|
|
@@ -1902,9 +1799,9 @@ function LayoutTable({ table, loading = false, pagination = false, pageSizeOptio
|
|
|
1902
1799
|
paddingStart,
|
|
1903
1800
|
paddingEnd
|
|
1904
1801
|
]);
|
|
1905
|
-
const cacheKey = (
|
|
1906
|
-
const bodyRows = virtualRows.map(({ index
|
|
1907
|
-
rowCache.current = new Map(virtualRows.map(({ index
|
|
1802
|
+
const cacheKey = (index) => `${index}:${rows[index].id}`;
|
|
1803
|
+
const bodyRows = virtualRows.map(({ index }) => rowCache.current.get(cacheKey(index)) ?? renderRow(rows[index], index));
|
|
1804
|
+
rowCache.current = new Map(virtualRows.map(({ index }, i) => [cacheKey(index), bodyRows[i]]));
|
|
1908
1805
|
/** Reserves the scroll height of the rows outside the virtual window. */
|
|
1909
1806
|
const skippedRows = (height) => height > 0 ? /* @__PURE__ */ jsx(TableRow, {
|
|
1910
1807
|
"aria-hidden": true,
|
|
@@ -1961,24 +1858,24 @@ function LayoutTable({ table, loading = false, pagination = false, pageSizeOptio
|
|
|
1961
1858
|
children: [
|
|
1962
1859
|
/* @__PURE__ */ jsx(TableHead, {
|
|
1963
1860
|
className: layoutTableClasses.columnHeaders,
|
|
1964
|
-
children: headerGroups.map((headerGroup,
|
|
1965
|
-
const headers = windowColumns(headerGroup.headers.filter((
|
|
1861
|
+
children: headerGroups.map((headerGroup, groupIndex) => {
|
|
1862
|
+
const headers = windowColumns(headerGroup.headers.filter((header) => header.column.getIsVisible()));
|
|
1966
1863
|
return /* @__PURE__ */ jsxs(TableRow, {
|
|
1967
1864
|
className: layoutTableClasses.columnHeaderRow,
|
|
1968
1865
|
sx: { height: COLUMN_HEADER_HEIGHT },
|
|
1969
1866
|
children: [
|
|
1970
|
-
headers.start.map((
|
|
1867
|
+
headers.start.map((h) => renderHeader(h, groupIndex)),
|
|
1971
1868
|
skippedColumns(paddingStart),
|
|
1972
|
-
headers.center.map((
|
|
1869
|
+
headers.center.map((h) => renderHeader(h, groupIndex)),
|
|
1973
1870
|
skippedColumns(paddingEnd),
|
|
1974
|
-
headers.end.map((
|
|
1871
|
+
headers.end.map((h) => renderHeader(h, groupIndex)),
|
|
1975
1872
|
/* @__PURE__ */ jsx(TableCell, {
|
|
1976
1873
|
"aria-hidden": true,
|
|
1977
1874
|
className: layoutTableClasses.filler,
|
|
1978
1875
|
sx: {
|
|
1979
1876
|
p: 0,
|
|
1980
1877
|
position: "sticky",
|
|
1981
|
-
top:
|
|
1878
|
+
top: groupIndex * COLUMN_HEADER_HEIGHT,
|
|
1982
1879
|
zIndex: 3,
|
|
1983
1880
|
bgcolor: "background.paper"
|
|
1984
1881
|
}
|
|
@@ -2056,7 +1953,7 @@ function LayoutTable({ table, loading = false, pagination = false, pageSizeOptio
|
|
|
2056
1953
|
hasFooter && /* @__PURE__ */ jsx(TableFooter, {
|
|
2057
1954
|
className: layoutTableClasses.footer,
|
|
2058
1955
|
children: table.getFooterGroups().map((footerGroup) => {
|
|
2059
|
-
const footers = windowColumns(footerGroup.headers.filter((
|
|
1956
|
+
const footers = windowColumns(footerGroup.headers.filter((header) => header.column.getIsVisible()));
|
|
2060
1957
|
return /* @__PURE__ */ jsxs(TableRow, {
|
|
2061
1958
|
className: layoutTableClasses.footerRow,
|
|
2062
1959
|
children: [
|
|
@@ -2087,6 +1984,6 @@ function LayoutTable({ table, loading = false, pagination = false, pageSizeOptio
|
|
|
2087
1984
|
]
|
|
2088
1985
|
}) });
|
|
2089
1986
|
}
|
|
2090
|
-
export { AggregatedCell, Dropzone, FileViewer, Fullscreen, LayoutTable, LoginForm, RouterButton, RouterError, RouterFab, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab, layoutTableClasses };
|
|
1987
|
+
export { AggregatedCell, ChatLayout, Dropzone, FileViewer, Fullscreen, LayoutTable, LoginForm, RouterButton, RouterError, RouterFab, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab, layoutTableClasses };
|
|
2091
1988
|
|
|
2092
1989
|
//# sourceMappingURL=components.mjs.map
|