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.
- package/dist/AggregatedCell-C7nAQyMO.mjs +510 -0
- package/dist/AggregatedCell-C7nAQyMO.mjs.map +1 -0
- package/dist/Approval-C-hF4jbT.mjs.map +1 -1
- package/dist/DialogsContext-DLqA8RJ_.mjs.map +1 -1
- package/dist/Email-BzQQkbe9.mjs.map +1 -1
- package/dist/FileMeta-DDqUju1Y.mjs.map +1 -1
- package/dist/LayoutTable-BkrjgpW_.d.mts +758 -0
- package/dist/{QueryClientParam-Cbb0MIKg.d.mts → QueryClientParam-JcH0mJWl.d.mts} +2 -2
- package/dist/RouterListItemButton-ULMlaQh6.mjs.map +1 -1
- package/dist/{User-1gKoYJvW.d.mts → User-D4__w1I1.d.mts} +4 -2
- package/dist/approval-BYryxFOW.mjs +84 -0
- package/dist/approval-BYryxFOW.mjs.map +1 -0
- package/dist/auth.d.mts +21 -11
- package/dist/auth.mjs +43 -26
- package/dist/auth.mjs.map +1 -1
- package/dist/components.d.mts +22 -30
- package/dist/components.mjs +813 -140
- package/dist/components.mjs.map +1 -1
- package/dist/createApi-DGJJ4I_R.mjs +27 -0
- package/dist/createApi-DGJJ4I_R.mjs.map +1 -0
- package/dist/data/client.d.mts +690 -1176
- package/dist/data/client.mjs +4 -3
- package/dist/data/client.mjs.map +1 -1
- package/dist/data/server.d.mts +3 -3
- package/dist/data/server.mjs +4 -2
- package/dist/data/server.mjs.map +1 -1
- package/dist/{file-DimNsRly.mjs → file-C14fhUeg.mjs} +6 -7
- package/dist/file-C14fhUeg.mjs.map +1 -0
- package/dist/{file-BWcNzq55.mjs → file-C5BOj1q8.mjs} +5 -24
- package/dist/file-C5BOj1q8.mjs.map +1 -0
- package/dist/hooks.d.mts +7 -46
- package/dist/hooks.mjs +2587 -239
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.d.mts +28 -9
- package/dist/index.mjs +1248 -500
- package/dist/index.mjs.map +1 -1
- package/dist/middleware.d.mts +20 -19
- package/dist/middleware.mjs +47 -2
- package/dist/middleware.mjs.map +1 -1
- package/dist/models.d.mts +17 -10
- package/dist/models.mjs.map +1 -1
- package/dist/{peoplesoft-CskGsqd6.d.mts → peoplesoft-BY_75WTS.d.mts} +2 -2
- package/dist/{peoplesoft-DTPGpN2h.mjs → peoplesoft-BkJMCcHb.mjs} +24 -81
- package/dist/peoplesoft-BkJMCcHb.mjs.map +1 -0
- package/dist/providers-DrairEO2.mjs +74 -0
- package/dist/providers-DrairEO2.mjs.map +1 -0
- package/dist/tokens-BLRreL1j.mjs +143 -0
- package/dist/tokens-BLRreL1j.mjs.map +1 -0
- package/dist/{utils-DjdexspV.mjs → utils-BUpDoqme.mjs} +73 -51
- package/dist/utils-BUpDoqme.mjs.map +1 -0
- package/dist/{utils-5x4uNxsX.d.mts → utils-Bhi0KiBx.d.mts} +18 -6
- package/dist/utils.d.mts +2 -2
- package/dist/utils.mjs +2 -2
- package/dist/vite.d.mts +1 -2
- package/dist/vite.mjs +3 -3
- package/dist/vite.mjs.map +1 -1
- package/package.json +130 -128
- package/skills/client-db/SKILL.md +104 -96
- package/skills/db-schema/SKILL.md +46 -33
- package/skills/dialogs/SKILL.md +21 -27
- package/skills/forms/SKILL.md +60 -39
- package/skills/general/SKILL.md +122 -94
- package/skills/general/references/exports.md +106 -0
- package/skills/migrations/SKILL.md +53 -2
- package/skills/migrations/versions/migrate-v9-to-v10.md +582 -0
- package/skills/routing/SKILL.md +50 -60
- package/skills/server-functions/SKILL.md +36 -56
- package/skills/services/SKILL.md +7 -4
- package/skills/services/docs/approval.md +2 -2
- package/skills/services/docs/peoplesoft.md +114 -110
- package/skills/start/SKILL.md +9 -5
- package/skills/start/steps/05-database-setup.md +52 -52
- package/skills/start/steps/06-entra-setup.md +1 -1
- package/skills/start/steps/07-vault-setup.md +5 -12
- package/skills/table/SKILL.md +263 -0
- package/skills/unslop/SKILL.md +80 -0
- package/dist/NotificationContext-CgwUOeW0.mjs +0 -7
- package/dist/NotificationContext-CgwUOeW0.mjs.map +0 -1
- package/dist/authMiddleware-DPly0b_T.mjs +0 -48
- package/dist/authMiddleware-DPly0b_T.mjs.map +0 -1
- package/dist/entra-CJSyeQsx.mjs +0 -109
- package/dist/entra-CJSyeQsx.mjs.map +0 -1
- package/dist/file-BWcNzq55.mjs.map +0 -1
- package/dist/file-DimNsRly.mjs.map +0 -1
- package/dist/msalServer-DLwA7_ta.mjs +0 -30
- package/dist/msalServer-DLwA7_ta.mjs.map +0 -1
- package/dist/peoplesoft-DTPGpN2h.mjs.map +0 -1
- package/dist/useDialogs-BUzVrTSP.mjs +0 -248
- package/dist/useDialogs-BUzVrTSP.mjs.map +0 -1
- package/dist/user-Dzv0N9fj.d.mts +0 -16
- package/dist/utils-DjdexspV.mjs.map +0 -1
- package/skills/data-grid/SKILL.md +0 -142
- package/skills/migrations/versions/migrate-v9-to-v10.tsx +0 -9
package/dist/hooks.mjs
CHANGED
|
@@ -1,15 +1,37 @@
|
|
|
1
|
-
import { a as getFieldStatus } from "./utils-
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as useDialogs } from "./useDialogs-BUzVrTSP.mjs";
|
|
1
|
+
import { a as foldForSearch, o as getFieldStatus } from "./utils-BUpDoqme.mjs";
|
|
2
|
+
import { a as tableContext, b as useDialogs, c as useTableContext, f as columnFlex, g as moveColumn, i as layoutTableFeatures, l as formatValue, m as hasColumnLabel, n as cellContext, o as useCellContext, p as columnLabel, r as headerContext, s as useHeaderContext, t as AggregatedCell, v as shortcutLabel } from "./AggregatedCell-C7nAQyMO.mjs";
|
|
4
3
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
import { Autocomplete, Button, Checkbox, FormControl, FormControlLabel, FormHelperText, FormLabel, Radio, RadioGroup, Slider, Switch, TextField } from "@mui/material";
|
|
6
|
-
import { DatePicker,
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { Autocomplete, Badge, Box, Button, Checkbox, Divider, FormControl, FormControlLabel, FormHelperText, FormLabel, IconButton, InputAdornment, InputLabel, ListItemIcon, ListItemText, Menu, MenuItem, Popover, Radio, RadioGroup, Select, Skeleton, Slider, Stack, Switch, TableCell, TablePagination, TableRow, TableSortLabel, TextField, Tooltip, Typography, useTheme } from "@mui/material";
|
|
5
|
+
import { DatePicker, DateTimePicker, TimePicker } from "@mui/x-date-pickers";
|
|
6
|
+
import dayjs from "dayjs";
|
|
7
|
+
import { useEffect, useRef, useState } from "react";
|
|
8
|
+
import { useTranslation, useTranslation as useTranslation$1 } from "react-i18next";
|
|
9
|
+
import ArrowBack from "@mui/icons-material/ArrowBack";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import Close from "@mui/icons-material/Close";
|
|
12
|
+
import MoreVert from "@mui/icons-material/MoreVert";
|
|
10
13
|
import { useInView } from "react-intersection-observer";
|
|
14
|
+
import { useHotkey } from "@tanstack/react-hotkeys";
|
|
15
|
+
import { FlexRender, Subscribe, constructFilterFn, createTableHook, filterFn_arrHas, filterFn_empty, filterFn_endsWith, filterFn_equals, filterFn_equalsString, filterFn_greaterThan, filterFn_greaterThanOrEqualTo, filterFn_inDateRange, filterFn_inNumberRange, filterFn_includesString, filterFn_lessThan, filterFn_lessThanOrEqualTo, filterFn_notEmpty, filterFn_startsWith } from "@tanstack/react-table";
|
|
11
16
|
import { createFormHook, createFormHookContexts } from "@tanstack/react-form";
|
|
12
17
|
import { NumericFormat } from "react-number-format";
|
|
18
|
+
import KeyboardArrowDown from "@mui/icons-material/KeyboardArrowDown";
|
|
19
|
+
import KeyboardArrowRight from "@mui/icons-material/KeyboardArrowRight";
|
|
20
|
+
import PushPin from "@mui/icons-material/PushPin";
|
|
21
|
+
import Check from "@mui/icons-material/Check";
|
|
22
|
+
import localizedFormat from "dayjs/plugin/localizedFormat";
|
|
23
|
+
import ArrowDownward from "@mui/icons-material/ArrowDownward";
|
|
24
|
+
import ArrowForward from "@mui/icons-material/ArrowForward";
|
|
25
|
+
import ArrowUpward from "@mui/icons-material/ArrowUpward";
|
|
26
|
+
import Clear from "@mui/icons-material/Clear";
|
|
27
|
+
import VisibilityOff from "@mui/icons-material/VisibilityOff";
|
|
28
|
+
import Workspaces from "@mui/icons-material/Workspaces";
|
|
29
|
+
import ViewColumn from "@mui/icons-material/ViewColumn";
|
|
30
|
+
import Add from "@mui/icons-material/Add";
|
|
31
|
+
import DeleteForever from "@mui/icons-material/DeleteForever";
|
|
32
|
+
import FilterList from "@mui/icons-material/FilterList";
|
|
33
|
+
import { useDebouncedCallback } from "@tanstack/react-pacer/debouncer";
|
|
34
|
+
import Search from "@mui/icons-material/Search";
|
|
13
35
|
//#region src/components/form/FormAutocomplete.tsx
|
|
14
36
|
const FormAutocomplete = (t0) => {
|
|
15
37
|
const $ = c(24);
|
|
@@ -166,9 +188,9 @@ const FormCheckbox = (props) => {
|
|
|
166
188
|
//#region src/components/form/FormDatePicker.tsx
|
|
167
189
|
const FormDatePicker = (props) => {
|
|
168
190
|
const $ = c(19);
|
|
169
|
-
if ($[0] !== "
|
|
191
|
+
if ($[0] !== "b3ec6a4f7a9d751734b17e31959ca5d29f8a6181225d63bd8d0d932da93bddff") {
|
|
170
192
|
for (let $i = 0; $i < 19; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
171
|
-
$[0] = "
|
|
193
|
+
$[0] = "b3ec6a4f7a9d751734b17e31959ca5d29f8a6181225d63bd8d0d932da93bddff";
|
|
172
194
|
}
|
|
173
195
|
const field = useFieldContext();
|
|
174
196
|
let t0;
|
|
@@ -230,79 +252,12 @@ const FormDatePicker = (props) => {
|
|
|
230
252
|
return t6;
|
|
231
253
|
};
|
|
232
254
|
//#endregion
|
|
233
|
-
//#region src/components/form/FormDateRangePicker.tsx
|
|
234
|
-
const FormDateRangePicker = (props) => {
|
|
235
|
-
const $ = c(19);
|
|
236
|
-
if ($[0] !== "26740a78e061ed162c8cdd3f736bac4bbd8228343542f0a95b626c4370dfec2c") {
|
|
237
|
-
for (let $i = 0; $i < 19; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
238
|
-
$[0] = "26740a78e061ed162c8cdd3f736bac4bbd8228343542f0a95b626c4370dfec2c";
|
|
239
|
-
}
|
|
240
|
-
const field = useFieldContext();
|
|
241
|
-
let t0;
|
|
242
|
-
if ($[1] !== field) {
|
|
243
|
-
t0 = getFieldStatus(field);
|
|
244
|
-
$[1] = field;
|
|
245
|
-
$[2] = t0;
|
|
246
|
-
} else t0 = $[2];
|
|
247
|
-
const { isTouched, hasError, helperText } = t0;
|
|
248
|
-
let t1;
|
|
249
|
-
if ($[3] !== field) {
|
|
250
|
-
t1 = (value) => field.handleChange(value);
|
|
251
|
-
$[3] = field;
|
|
252
|
-
$[4] = t1;
|
|
253
|
-
} else t1 = $[4];
|
|
254
|
-
const t2 = isTouched && hasError;
|
|
255
|
-
const t3 = isTouched && helperText;
|
|
256
|
-
let t4;
|
|
257
|
-
if ($[5] !== field.handleBlur || $[6] !== props.textFieldProps || $[7] !== t2 || $[8] !== t3) {
|
|
258
|
-
t4 = {
|
|
259
|
-
onBlur: field.handleBlur,
|
|
260
|
-
error: t2,
|
|
261
|
-
helperText: t3,
|
|
262
|
-
...props.textFieldProps
|
|
263
|
-
};
|
|
264
|
-
$[5] = field.handleBlur;
|
|
265
|
-
$[6] = props.textFieldProps;
|
|
266
|
-
$[7] = t2;
|
|
267
|
-
$[8] = t3;
|
|
268
|
-
$[9] = t4;
|
|
269
|
-
} else t4 = $[9];
|
|
270
|
-
let t5;
|
|
271
|
-
if ($[10] !== props.slotProps || $[11] !== t4) {
|
|
272
|
-
t5 = {
|
|
273
|
-
textField: t4,
|
|
274
|
-
...props.slotProps
|
|
275
|
-
};
|
|
276
|
-
$[10] = props.slotProps;
|
|
277
|
-
$[11] = t4;
|
|
278
|
-
$[12] = t5;
|
|
279
|
-
} else t5 = $[12];
|
|
280
|
-
let t6;
|
|
281
|
-
if ($[13] !== field.name || $[14] !== field.state.value || $[15] !== props || $[16] !== t1 || $[17] !== t5) {
|
|
282
|
-
t6 = /* @__PURE__ */ jsx(DateRangePicker, {
|
|
283
|
-
name: field.name,
|
|
284
|
-
value: field.state.value,
|
|
285
|
-
onChange: t1,
|
|
286
|
-
slotProps: t5,
|
|
287
|
-
"aria-label": field.name,
|
|
288
|
-
...props
|
|
289
|
-
});
|
|
290
|
-
$[13] = field.name;
|
|
291
|
-
$[14] = field.state.value;
|
|
292
|
-
$[15] = props;
|
|
293
|
-
$[16] = t1;
|
|
294
|
-
$[17] = t5;
|
|
295
|
-
$[18] = t6;
|
|
296
|
-
} else t6 = $[18];
|
|
297
|
-
return t6;
|
|
298
|
-
};
|
|
299
|
-
//#endregion
|
|
300
255
|
//#region src/components/form/FormTimePicker.tsx
|
|
301
256
|
const FormTimePicker = (props) => {
|
|
302
257
|
const $ = c(19);
|
|
303
|
-
if ($[0] !== "
|
|
258
|
+
if ($[0] !== "009664b5441550099c1a5250000faad760e9a295ff513262f5d4c405041c4af0") {
|
|
304
259
|
for (let $i = 0; $i < 19; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
305
|
-
$[0] = "
|
|
260
|
+
$[0] = "009664b5441550099c1a5250000faad760e9a295ff513262f5d4c405041c4af0";
|
|
306
261
|
}
|
|
307
262
|
const field = useFieldContext();
|
|
308
263
|
let t0;
|
|
@@ -364,79 +319,12 @@ const FormTimePicker = (props) => {
|
|
|
364
319
|
return t6;
|
|
365
320
|
};
|
|
366
321
|
//#endregion
|
|
367
|
-
//#region src/components/form/FormTimeRangePicker.tsx
|
|
368
|
-
const FormTimeRangePicker = (props) => {
|
|
369
|
-
const $ = c(19);
|
|
370
|
-
if ($[0] !== "30660889eec66a781b0a525918a386583e5fce924bb503c7bbb22779b32dfb41") {
|
|
371
|
-
for (let $i = 0; $i < 19; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
372
|
-
$[0] = "30660889eec66a781b0a525918a386583e5fce924bb503c7bbb22779b32dfb41";
|
|
373
|
-
}
|
|
374
|
-
const field = useFieldContext();
|
|
375
|
-
let t0;
|
|
376
|
-
if ($[1] !== field) {
|
|
377
|
-
t0 = getFieldStatus(field);
|
|
378
|
-
$[1] = field;
|
|
379
|
-
$[2] = t0;
|
|
380
|
-
} else t0 = $[2];
|
|
381
|
-
const { isTouched, hasError, helperText } = t0;
|
|
382
|
-
let t1;
|
|
383
|
-
if ($[3] !== field) {
|
|
384
|
-
t1 = (value) => field.handleChange(value);
|
|
385
|
-
$[3] = field;
|
|
386
|
-
$[4] = t1;
|
|
387
|
-
} else t1 = $[4];
|
|
388
|
-
const t2 = isTouched && hasError;
|
|
389
|
-
const t3 = isTouched && helperText;
|
|
390
|
-
let t4;
|
|
391
|
-
if ($[5] !== field.handleBlur || $[6] !== props.textFieldProps || $[7] !== t2 || $[8] !== t3) {
|
|
392
|
-
t4 = {
|
|
393
|
-
onBlur: field.handleBlur,
|
|
394
|
-
error: t2,
|
|
395
|
-
helperText: t3,
|
|
396
|
-
...props.textFieldProps
|
|
397
|
-
};
|
|
398
|
-
$[5] = field.handleBlur;
|
|
399
|
-
$[6] = props.textFieldProps;
|
|
400
|
-
$[7] = t2;
|
|
401
|
-
$[8] = t3;
|
|
402
|
-
$[9] = t4;
|
|
403
|
-
} else t4 = $[9];
|
|
404
|
-
let t5;
|
|
405
|
-
if ($[10] !== props.slotProps || $[11] !== t4) {
|
|
406
|
-
t5 = {
|
|
407
|
-
textField: t4,
|
|
408
|
-
...props.slotProps
|
|
409
|
-
};
|
|
410
|
-
$[10] = props.slotProps;
|
|
411
|
-
$[11] = t4;
|
|
412
|
-
$[12] = t5;
|
|
413
|
-
} else t5 = $[12];
|
|
414
|
-
let t6;
|
|
415
|
-
if ($[13] !== field.name || $[14] !== field.state.value || $[15] !== props || $[16] !== t1 || $[17] !== t5) {
|
|
416
|
-
t6 = /* @__PURE__ */ jsx(TimeRangePicker, {
|
|
417
|
-
name: field.name,
|
|
418
|
-
value: field.state.value,
|
|
419
|
-
onChange: t1,
|
|
420
|
-
slotProps: t5,
|
|
421
|
-
"aria-label": field.name,
|
|
422
|
-
...props
|
|
423
|
-
});
|
|
424
|
-
$[13] = field.name;
|
|
425
|
-
$[14] = field.state.value;
|
|
426
|
-
$[15] = props;
|
|
427
|
-
$[16] = t1;
|
|
428
|
-
$[17] = t5;
|
|
429
|
-
$[18] = t6;
|
|
430
|
-
} else t6 = $[18];
|
|
431
|
-
return t6;
|
|
432
|
-
};
|
|
433
|
-
//#endregion
|
|
434
322
|
//#region src/components/form/FormDateTimePicker.tsx
|
|
435
323
|
const FormDateTimePicker = (props) => {
|
|
436
324
|
const $ = c(19);
|
|
437
|
-
if ($[0] !== "
|
|
325
|
+
if ($[0] !== "dc1d4a9f2239023276c3ff2c1edc368e73b5542beb69edd186ca52ac837a180c") {
|
|
438
326
|
for (let $i = 0; $i < 19; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
439
|
-
$[0] = "
|
|
327
|
+
$[0] = "dc1d4a9f2239023276c3ff2c1edc368e73b5542beb69edd186ca52ac837a180c";
|
|
440
328
|
}
|
|
441
329
|
const field = useFieldContext();
|
|
442
330
|
let t0;
|
|
@@ -498,73 +386,6 @@ const FormDateTimePicker = (props) => {
|
|
|
498
386
|
return t6;
|
|
499
387
|
};
|
|
500
388
|
//#endregion
|
|
501
|
-
//#region src/components/form/FormDateTimeRangePicker.tsx
|
|
502
|
-
const FormDateTimeRangePicker = (props) => {
|
|
503
|
-
const $ = c(19);
|
|
504
|
-
if ($[0] !== "90233aef36d5b4bc17041c44cfdbb9dd1cb92164078d619b4751236fb27414a5") {
|
|
505
|
-
for (let $i = 0; $i < 19; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
506
|
-
$[0] = "90233aef36d5b4bc17041c44cfdbb9dd1cb92164078d619b4751236fb27414a5";
|
|
507
|
-
}
|
|
508
|
-
const field = useFieldContext();
|
|
509
|
-
let t0;
|
|
510
|
-
if ($[1] !== field) {
|
|
511
|
-
t0 = getFieldStatus(field);
|
|
512
|
-
$[1] = field;
|
|
513
|
-
$[2] = t0;
|
|
514
|
-
} else t0 = $[2];
|
|
515
|
-
const { isTouched, hasError, helperText } = t0;
|
|
516
|
-
let t1;
|
|
517
|
-
if ($[3] !== field) {
|
|
518
|
-
t1 = (value) => field.handleChange(value);
|
|
519
|
-
$[3] = field;
|
|
520
|
-
$[4] = t1;
|
|
521
|
-
} else t1 = $[4];
|
|
522
|
-
const t2 = isTouched && hasError;
|
|
523
|
-
const t3 = isTouched && helperText;
|
|
524
|
-
let t4;
|
|
525
|
-
if ($[5] !== field.handleBlur || $[6] !== props.textFieldProps || $[7] !== t2 || $[8] !== t3) {
|
|
526
|
-
t4 = {
|
|
527
|
-
onBlur: field.handleBlur,
|
|
528
|
-
error: t2,
|
|
529
|
-
helperText: t3,
|
|
530
|
-
...props.textFieldProps
|
|
531
|
-
};
|
|
532
|
-
$[5] = field.handleBlur;
|
|
533
|
-
$[6] = props.textFieldProps;
|
|
534
|
-
$[7] = t2;
|
|
535
|
-
$[8] = t3;
|
|
536
|
-
$[9] = t4;
|
|
537
|
-
} else t4 = $[9];
|
|
538
|
-
let t5;
|
|
539
|
-
if ($[10] !== props.slotProps || $[11] !== t4) {
|
|
540
|
-
t5 = {
|
|
541
|
-
textField: t4,
|
|
542
|
-
...props.slotProps
|
|
543
|
-
};
|
|
544
|
-
$[10] = props.slotProps;
|
|
545
|
-
$[11] = t4;
|
|
546
|
-
$[12] = t5;
|
|
547
|
-
} else t5 = $[12];
|
|
548
|
-
let t6;
|
|
549
|
-
if ($[13] !== field.name || $[14] !== field.state.value || $[15] !== props || $[16] !== t1 || $[17] !== t5) {
|
|
550
|
-
t6 = /* @__PURE__ */ jsx(DateTimeRangePicker, {
|
|
551
|
-
name: field.name,
|
|
552
|
-
value: field.state.value,
|
|
553
|
-
onChange: t1,
|
|
554
|
-
slotProps: t5,
|
|
555
|
-
"aria-label": field.name,
|
|
556
|
-
...props
|
|
557
|
-
});
|
|
558
|
-
$[13] = field.name;
|
|
559
|
-
$[14] = field.state.value;
|
|
560
|
-
$[15] = props;
|
|
561
|
-
$[16] = t1;
|
|
562
|
-
$[17] = t5;
|
|
563
|
-
$[18] = t6;
|
|
564
|
-
} else t6 = $[18];
|
|
565
|
-
return t6;
|
|
566
|
-
};
|
|
567
|
-
//#endregion
|
|
568
389
|
//#region src/components/form/FormNumberField.tsx
|
|
569
390
|
const FormNumberField = (t0) => {
|
|
570
391
|
const $ = c(17);
|
|
@@ -680,7 +501,7 @@ const FormRadioGroup = (t0) => {
|
|
|
680
501
|
const t7 = field.name;
|
|
681
502
|
let t8;
|
|
682
503
|
if ($[11] !== options) {
|
|
683
|
-
t8 = options.map(_temp$
|
|
504
|
+
t8 = options.map(_temp$9);
|
|
684
505
|
$[11] = options;
|
|
685
506
|
$[12] = t8;
|
|
686
507
|
} else t8 = $[12];
|
|
@@ -731,7 +552,7 @@ const FormRadioGroup = (t0) => {
|
|
|
731
552
|
} else t11 = $[27];
|
|
732
553
|
return t11;
|
|
733
554
|
};
|
|
734
|
-
function _temp$
|
|
555
|
+
function _temp$9(option) {
|
|
735
556
|
return /* @__PURE__ */ jsx(FormControlLabel, {
|
|
736
557
|
value: option.value,
|
|
737
558
|
control: /* @__PURE__ */ jsx(Radio, {}),
|
|
@@ -863,7 +684,7 @@ const FormSubmitButton = (props) => {
|
|
|
863
684
|
let t2;
|
|
864
685
|
if ($[6] !== form.Subscribe || $[7] !== t1) {
|
|
865
686
|
t2 = /* @__PURE__ */ jsx(form.Subscribe, {
|
|
866
|
-
selector: _temp,
|
|
687
|
+
selector: _temp$8,
|
|
867
688
|
children: t1
|
|
868
689
|
});
|
|
869
690
|
$[6] = form.Subscribe;
|
|
@@ -872,7 +693,7 @@ const FormSubmitButton = (props) => {
|
|
|
872
693
|
} else t2 = $[8];
|
|
873
694
|
return t2;
|
|
874
695
|
};
|
|
875
|
-
function _temp(state) {
|
|
696
|
+
function _temp$8(state) {
|
|
876
697
|
return [state.canSubmit, state.isSubmitting];
|
|
877
698
|
}
|
|
878
699
|
//#endregion
|
|
@@ -1011,32 +832,14 @@ const { useAppForm: useLayoutForm, withForm: withLayoutForm } = createFormHook({
|
|
|
1011
832
|
RadioGroup: FormRadioGroup,
|
|
1012
833
|
Slider: FormSlider,
|
|
1013
834
|
DatePicker: FormDatePicker,
|
|
1014
|
-
DateRangePicker: FormDateRangePicker,
|
|
1015
835
|
TimePicker: FormTimePicker,
|
|
1016
|
-
|
|
1017
|
-
DateTimePicker: FormDateTimePicker,
|
|
1018
|
-
DateTimeRangePicker: FormDateTimeRangePicker
|
|
836
|
+
DateTimePicker: FormDateTimePicker
|
|
1019
837
|
},
|
|
1020
838
|
formComponents: { SubmitButton: FormSubmitButton },
|
|
1021
839
|
fieldContext,
|
|
1022
840
|
formContext
|
|
1023
841
|
});
|
|
1024
842
|
//#endregion
|
|
1025
|
-
//#region src/hooks/useNotification.ts
|
|
1026
|
-
/**
|
|
1027
|
-
* @deprecated Prefer a success animation for successful actions and a non-disappearing alert dialog for errors.
|
|
1028
|
-
*/
|
|
1029
|
-
function useNotification() {
|
|
1030
|
-
const $ = c(1);
|
|
1031
|
-
if ($[0] !== "8e3153deaa4a94d3ff93cc356c9ebb0318779678482cc87d8179a89624e3d9fb") {
|
|
1032
|
-
for (let $i = 0; $i < 1; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1033
|
-
$[0] = "8e3153deaa4a94d3ff93cc356c9ebb0318779678482cc87d8179a89624e3d9fb";
|
|
1034
|
-
}
|
|
1035
|
-
const context = useContext(NotificationContext);
|
|
1036
|
-
if (!context) throw new Error("useNotification must be used within a NotificationProvider");
|
|
1037
|
-
return context;
|
|
1038
|
-
}
|
|
1039
|
-
//#endregion
|
|
1040
843
|
//#region src/hooks/useScanDetection.ts
|
|
1041
844
|
const useScanDetection = ({ timeToEvaluate = 100, averageWaitTime = 50, startCharacter = [], endCharacter = ["Enter", "Escape"], onComplete, onError, minLength = 1, ignoreIfFocusOn, stopPropagation = false, preventDefault = false, container, enabled = true }) => {
|
|
1042
845
|
const buffer = useRef([]);
|
|
@@ -1085,6 +888,2551 @@ const useScanDetection = ({ timeToEvaluate = 100, averageWaitTime = 50, startCha
|
|
|
1085
888
|
}, [container]);
|
|
1086
889
|
};
|
|
1087
890
|
//#endregion
|
|
1088
|
-
|
|
891
|
+
//#region src/components/table/cells/features/ActionsCell.tsx
|
|
892
|
+
const ActionsCell = (t0) => {
|
|
893
|
+
const $ = c(9);
|
|
894
|
+
if ($[0] !== "5ef513b7074a5c10143af85116c5042019a2751468e77a12cea8cff24b83e8fa") {
|
|
895
|
+
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
896
|
+
$[0] = "5ef513b7074a5c10143af85116c5042019a2751468e77a12cea8cff24b83e8fa";
|
|
897
|
+
}
|
|
898
|
+
const { actions } = t0;
|
|
899
|
+
const cell = useCellContext();
|
|
900
|
+
const { t } = useTranslation$1();
|
|
901
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
902
|
+
let t1;
|
|
903
|
+
if ($[1] !== actions || $[2] !== anchorEl || $[3] !== cell || $[4] !== t) {
|
|
904
|
+
const buttons = actions.filter(_temp$7);
|
|
905
|
+
const menuItems = actions.filter(_temp2$2);
|
|
906
|
+
let t2;
|
|
907
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
908
|
+
t2 = { alignItems: "center" };
|
|
909
|
+
$[6] = t2;
|
|
910
|
+
} else t2 = $[6];
|
|
911
|
+
let t3;
|
|
912
|
+
if ($[7] !== cell) {
|
|
913
|
+
t3 = (action_1) => /* @__PURE__ */ jsx(Tooltip, {
|
|
914
|
+
title: action_1.label,
|
|
915
|
+
children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(IconButton, {
|
|
916
|
+
size: "small",
|
|
917
|
+
"aria-label": action_1.label,
|
|
918
|
+
disabled: action_1.disabled,
|
|
919
|
+
onClick: () => action_1.onClick(cell.row.original),
|
|
920
|
+
children: action_1.icon
|
|
921
|
+
}) })
|
|
922
|
+
}, action_1.label);
|
|
923
|
+
$[7] = cell;
|
|
924
|
+
$[8] = t3;
|
|
925
|
+
} else t3 = $[8];
|
|
926
|
+
t1 = /* @__PURE__ */ jsxs(Stack, {
|
|
927
|
+
direction: "row",
|
|
928
|
+
spacing: 1,
|
|
929
|
+
sx: t2,
|
|
930
|
+
onClick: _temp3$1,
|
|
931
|
+
onDoubleClick: _temp4,
|
|
932
|
+
children: [buttons.map(t3), menuItems.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Tooltip, {
|
|
933
|
+
title: t("Layout.Table.RowActions"),
|
|
934
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
935
|
+
size: "small",
|
|
936
|
+
"aria-label": t("Layout.Table.RowActions"),
|
|
937
|
+
"aria-haspopup": "menu",
|
|
938
|
+
onClick: (event_1) => setAnchorEl(event_1.currentTarget),
|
|
939
|
+
children: /* @__PURE__ */ jsx(MoreVert, { fontSize: "small" })
|
|
940
|
+
})
|
|
941
|
+
}), /* @__PURE__ */ jsx(Menu, {
|
|
942
|
+
anchorEl,
|
|
943
|
+
open: !!anchorEl,
|
|
944
|
+
onClose: () => setAnchorEl(null),
|
|
945
|
+
children: menuItems.flatMap((action_2) => [...action_2.divider ? [/* @__PURE__ */ jsx(Divider, {}, `${action_2.label}-divider`)] : [], /* @__PURE__ */ jsxs(MenuItem, {
|
|
946
|
+
disabled: action_2.disabled,
|
|
947
|
+
onClick: () => {
|
|
948
|
+
action_2.onClick(cell.row.original);
|
|
949
|
+
setAnchorEl(null);
|
|
950
|
+
},
|
|
951
|
+
children: [action_2.icon && /* @__PURE__ */ jsx(ListItemIcon, { children: action_2.icon }), /* @__PURE__ */ jsx(ListItemText, { children: action_2.label })]
|
|
952
|
+
}, action_2.label)])
|
|
953
|
+
})] })]
|
|
954
|
+
});
|
|
955
|
+
$[1] = actions;
|
|
956
|
+
$[2] = anchorEl;
|
|
957
|
+
$[3] = cell;
|
|
958
|
+
$[4] = t;
|
|
959
|
+
$[5] = t1;
|
|
960
|
+
} else t1 = $[5];
|
|
961
|
+
return t1;
|
|
962
|
+
};
|
|
963
|
+
function _temp$7(action) {
|
|
964
|
+
return !action.showInMenu;
|
|
965
|
+
}
|
|
966
|
+
function _temp2$2(action_0) {
|
|
967
|
+
return action_0.showInMenu;
|
|
968
|
+
}
|
|
969
|
+
function _temp3$1(event) {
|
|
970
|
+
return event.stopPropagation();
|
|
971
|
+
}
|
|
972
|
+
function _temp4(event_0) {
|
|
973
|
+
return event_0.stopPropagation();
|
|
974
|
+
}
|
|
975
|
+
//#endregion
|
|
976
|
+
//#region src/components/table/cells/features/ExpandCell.tsx
|
|
977
|
+
const ExpandCell = () => {
|
|
978
|
+
const $ = c(6);
|
|
979
|
+
if ($[0] !== "e373a958f2659efd7f8e4c11adbdf6443660367dbb6d665b170d691b9c28fde7") {
|
|
980
|
+
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
981
|
+
$[0] = "e373a958f2659efd7f8e4c11adbdf6443660367dbb6d665b170d691b9c28fde7";
|
|
982
|
+
}
|
|
983
|
+
const { row } = useCellContext();
|
|
984
|
+
let t0;
|
|
985
|
+
if ($[1] !== row) {
|
|
986
|
+
t0 = () => {
|
|
987
|
+
if (!row.getCanExpand()) return null;
|
|
988
|
+
const expanded = row.getIsExpanded();
|
|
989
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
990
|
+
size: "small",
|
|
991
|
+
onClick: (event) => {
|
|
992
|
+
event.stopPropagation();
|
|
993
|
+
row.toggleExpanded();
|
|
994
|
+
},
|
|
995
|
+
"aria-label": expanded ? "Collapse row" : "Expand row",
|
|
996
|
+
sx: { ml: row.depth * 2 },
|
|
997
|
+
children: expanded ? /* @__PURE__ */ jsx(KeyboardArrowDown, { fontSize: "small" }) : /* @__PURE__ */ jsx(KeyboardArrowRight, { fontSize: "small" })
|
|
998
|
+
});
|
|
999
|
+
};
|
|
1000
|
+
$[1] = row;
|
|
1001
|
+
$[2] = t0;
|
|
1002
|
+
} else t0 = $[2];
|
|
1003
|
+
let t1;
|
|
1004
|
+
if ($[3] !== row.table.atoms.expanded || $[4] !== t0) {
|
|
1005
|
+
t1 = /* @__PURE__ */ jsx(Subscribe, {
|
|
1006
|
+
source: row.table.atoms.expanded,
|
|
1007
|
+
children: t0
|
|
1008
|
+
});
|
|
1009
|
+
$[3] = row.table.atoms.expanded;
|
|
1010
|
+
$[4] = t0;
|
|
1011
|
+
$[5] = t1;
|
|
1012
|
+
} else t1 = $[5];
|
|
1013
|
+
return t1;
|
|
1014
|
+
};
|
|
1015
|
+
//#endregion
|
|
1016
|
+
//#region src/components/table/cells/features/GroupCell.tsx
|
|
1017
|
+
const GroupCell = () => {
|
|
1018
|
+
const $ = c(17);
|
|
1019
|
+
if ($[0] !== "5e5ed5193c8ad64ae2d82dd097433b77f8ae2ca32d57487fd7564cb6ebc811a4") {
|
|
1020
|
+
for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1021
|
+
$[0] = "5e5ed5193c8ad64ae2d82dd097433b77f8ae2ca32d57487fd7564cb6ebc811a4";
|
|
1022
|
+
}
|
|
1023
|
+
const cell = useCellContext();
|
|
1024
|
+
const { row } = cell;
|
|
1025
|
+
const t0 = row.depth * 2;
|
|
1026
|
+
let t1;
|
|
1027
|
+
if ($[1] !== t0) {
|
|
1028
|
+
t1 = {
|
|
1029
|
+
ml: t0,
|
|
1030
|
+
alignItems: "center"
|
|
1031
|
+
};
|
|
1032
|
+
$[1] = t0;
|
|
1033
|
+
$[2] = t1;
|
|
1034
|
+
} else t1 = $[2];
|
|
1035
|
+
let t2;
|
|
1036
|
+
if ($[3] !== row) {
|
|
1037
|
+
t2 = () => {
|
|
1038
|
+
const expanded = row.getIsExpanded();
|
|
1039
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
1040
|
+
size: "small",
|
|
1041
|
+
onClick: (event) => {
|
|
1042
|
+
event.stopPropagation();
|
|
1043
|
+
row.toggleExpanded();
|
|
1044
|
+
},
|
|
1045
|
+
"aria-label": expanded ? "Collapse group" : "Expand group",
|
|
1046
|
+
children: expanded ? /* @__PURE__ */ jsx(KeyboardArrowDown, { fontSize: "small" }) : /* @__PURE__ */ jsx(KeyboardArrowRight, { fontSize: "small" })
|
|
1047
|
+
});
|
|
1048
|
+
};
|
|
1049
|
+
$[3] = row;
|
|
1050
|
+
$[4] = t2;
|
|
1051
|
+
} else t2 = $[4];
|
|
1052
|
+
let t3;
|
|
1053
|
+
if ($[5] !== row.table.atoms.expanded || $[6] !== t2) {
|
|
1054
|
+
t3 = /* @__PURE__ */ jsx(Subscribe, {
|
|
1055
|
+
source: row.table.atoms.expanded,
|
|
1056
|
+
children: t2
|
|
1057
|
+
});
|
|
1058
|
+
$[5] = row.table.atoms.expanded;
|
|
1059
|
+
$[6] = t2;
|
|
1060
|
+
$[7] = t3;
|
|
1061
|
+
} else t3 = $[7];
|
|
1062
|
+
let t4;
|
|
1063
|
+
if ($[8] !== cell) {
|
|
1064
|
+
t4 = /* @__PURE__ */ jsx(FlexRender, { cell });
|
|
1065
|
+
$[8] = cell;
|
|
1066
|
+
$[9] = t4;
|
|
1067
|
+
} else t4 = $[9];
|
|
1068
|
+
let t5;
|
|
1069
|
+
if ($[10] !== row.subRows.length) {
|
|
1070
|
+
t5 = /* @__PURE__ */ jsxs(Typography, {
|
|
1071
|
+
variant: "caption",
|
|
1072
|
+
color: "text.secondary",
|
|
1073
|
+
children: [
|
|
1074
|
+
"(",
|
|
1075
|
+
row.subRows.length,
|
|
1076
|
+
")"
|
|
1077
|
+
]
|
|
1078
|
+
});
|
|
1079
|
+
$[10] = row.subRows.length;
|
|
1080
|
+
$[11] = t5;
|
|
1081
|
+
} else t5 = $[11];
|
|
1082
|
+
let t6;
|
|
1083
|
+
if ($[12] !== t1 || $[13] !== t3 || $[14] !== t4 || $[15] !== t5) {
|
|
1084
|
+
t6 = /* @__PURE__ */ jsxs(Stack, {
|
|
1085
|
+
direction: "row",
|
|
1086
|
+
spacing: .5,
|
|
1087
|
+
sx: t1,
|
|
1088
|
+
children: [
|
|
1089
|
+
t3,
|
|
1090
|
+
t4,
|
|
1091
|
+
t5
|
|
1092
|
+
]
|
|
1093
|
+
});
|
|
1094
|
+
$[12] = t1;
|
|
1095
|
+
$[13] = t3;
|
|
1096
|
+
$[14] = t4;
|
|
1097
|
+
$[15] = t5;
|
|
1098
|
+
$[16] = t6;
|
|
1099
|
+
} else t6 = $[16];
|
|
1100
|
+
return t6;
|
|
1101
|
+
};
|
|
1102
|
+
//#endregion
|
|
1103
|
+
//#region src/components/table/cells/features/PinRowCell.tsx
|
|
1104
|
+
const PinRowCell = () => {
|
|
1105
|
+
const $ = c(6);
|
|
1106
|
+
if ($[0] !== "7f27a5609f2431f18a788370d3382a09670f5d22d3f0bf3673d963f7c1d96a2d") {
|
|
1107
|
+
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1108
|
+
$[0] = "7f27a5609f2431f18a788370d3382a09670f5d22d3f0bf3673d963f7c1d96a2d";
|
|
1109
|
+
}
|
|
1110
|
+
const { row } = useCellContext();
|
|
1111
|
+
let t0;
|
|
1112
|
+
if ($[1] !== row) {
|
|
1113
|
+
t0 = () => {
|
|
1114
|
+
if (!row.getCanPin()) return null;
|
|
1115
|
+
const pinned = row.getIsPinned();
|
|
1116
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
1117
|
+
title: pinned ? "Unpin row" : "Pin row",
|
|
1118
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
1119
|
+
size: "small",
|
|
1120
|
+
color: pinned ? "primary" : "default",
|
|
1121
|
+
onClick: (event) => {
|
|
1122
|
+
event.stopPropagation();
|
|
1123
|
+
row.pin(pinned ? false : "top");
|
|
1124
|
+
},
|
|
1125
|
+
children: /* @__PURE__ */ jsx(PushPin, { fontSize: "small" })
|
|
1126
|
+
})
|
|
1127
|
+
});
|
|
1128
|
+
};
|
|
1129
|
+
$[1] = row;
|
|
1130
|
+
$[2] = t0;
|
|
1131
|
+
} else t0 = $[2];
|
|
1132
|
+
let t1;
|
|
1133
|
+
if ($[3] !== row.table.atoms.rowPinning || $[4] !== t0) {
|
|
1134
|
+
t1 = /* @__PURE__ */ jsx(Subscribe, {
|
|
1135
|
+
source: row.table.atoms.rowPinning,
|
|
1136
|
+
children: t0
|
|
1137
|
+
});
|
|
1138
|
+
$[3] = row.table.atoms.rowPinning;
|
|
1139
|
+
$[4] = t0;
|
|
1140
|
+
$[5] = t1;
|
|
1141
|
+
} else t1 = $[5];
|
|
1142
|
+
return t1;
|
|
1143
|
+
};
|
|
1144
|
+
//#endregion
|
|
1145
|
+
//#region src/components/table/cells/features/SelectCell.tsx
|
|
1146
|
+
const SelectCell = () => {
|
|
1147
|
+
const $ = c(6);
|
|
1148
|
+
if ($[0] !== "63921cbcf7fcb34cd713e4f8ddc73200874bc27abe8c714719a6e3a2f7d9bc3a") {
|
|
1149
|
+
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1150
|
+
$[0] = "63921cbcf7fcb34cd713e4f8ddc73200874bc27abe8c714719a6e3a2f7d9bc3a";
|
|
1151
|
+
}
|
|
1152
|
+
const { row } = useCellContext();
|
|
1153
|
+
let t0;
|
|
1154
|
+
if ($[1] !== row) {
|
|
1155
|
+
t0 = () => row.getCanSelect() ? /* @__PURE__ */ jsx(Checkbox, {
|
|
1156
|
+
size: "small",
|
|
1157
|
+
checked: row.getIsSelected(),
|
|
1158
|
+
indeterminate: !row.getIsSelected() && row.getIsSomeSelected(),
|
|
1159
|
+
onChange: row.getToggleSelectedHandler(),
|
|
1160
|
+
onClick: _temp$6,
|
|
1161
|
+
slotProps: { input: { "aria-label": "Select row" } }
|
|
1162
|
+
}) : null;
|
|
1163
|
+
$[1] = row;
|
|
1164
|
+
$[2] = t0;
|
|
1165
|
+
} else t0 = $[2];
|
|
1166
|
+
let t1;
|
|
1167
|
+
if ($[3] !== row.table.atoms.rowSelection || $[4] !== t0) {
|
|
1168
|
+
t1 = /* @__PURE__ */ jsx(Subscribe, {
|
|
1169
|
+
source: row.table.atoms.rowSelection,
|
|
1170
|
+
children: t0
|
|
1171
|
+
});
|
|
1172
|
+
$[3] = row.table.atoms.rowSelection;
|
|
1173
|
+
$[4] = t0;
|
|
1174
|
+
$[5] = t1;
|
|
1175
|
+
} else t1 = $[5];
|
|
1176
|
+
return t1;
|
|
1177
|
+
};
|
|
1178
|
+
function _temp$6(event) {
|
|
1179
|
+
return event.stopPropagation();
|
|
1180
|
+
}
|
|
1181
|
+
//#endregion
|
|
1182
|
+
//#region src/components/table/cells/formatters/BooleanCell.tsx
|
|
1183
|
+
/** Icons are inline-block, so without this they sit on the baseline and read as too high. */
|
|
1184
|
+
const ICON_SX = { verticalAlign: "middle" };
|
|
1185
|
+
const BooleanCell = () => {
|
|
1186
|
+
const $ = c(3);
|
|
1187
|
+
if ($[0] !== "c4041104e91084b687210e0524e009dc1af846acee76bcfc3bf9d28753f13090") {
|
|
1188
|
+
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1189
|
+
$[0] = "c4041104e91084b687210e0524e009dc1af846acee76bcfc3bf9d28753f13090";
|
|
1190
|
+
}
|
|
1191
|
+
const cell = useCellContext();
|
|
1192
|
+
let t0;
|
|
1193
|
+
if ($[1] !== cell) {
|
|
1194
|
+
t0 = cell.getValue() ? /* @__PURE__ */ jsx(Check, {
|
|
1195
|
+
fontSize: "small",
|
|
1196
|
+
color: "success",
|
|
1197
|
+
sx: ICON_SX
|
|
1198
|
+
}) : /* @__PURE__ */ jsx(Close, {
|
|
1199
|
+
fontSize: "small",
|
|
1200
|
+
color: "error",
|
|
1201
|
+
sx: ICON_SX
|
|
1202
|
+
});
|
|
1203
|
+
$[1] = cell;
|
|
1204
|
+
$[2] = t0;
|
|
1205
|
+
} else t0 = $[2];
|
|
1206
|
+
return t0;
|
|
1207
|
+
};
|
|
1208
|
+
//#endregion
|
|
1209
|
+
//#region src/components/table/cells/formatters/DateCell.tsx
|
|
1210
|
+
dayjs.extend(localizedFormat);
|
|
1211
|
+
const DateCell = (t0) => {
|
|
1212
|
+
const $ = c(19);
|
|
1213
|
+
if ($[0] !== "21b387c4bddca0bccbe970e472aebb39930745f6d942bddb5392537064b45906") {
|
|
1214
|
+
for (let $i = 0; $i < 19; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1215
|
+
$[0] = "21b387c4bddca0bccbe970e472aebb39930745f6d942bddb5392537064b45906";
|
|
1216
|
+
}
|
|
1217
|
+
let props;
|
|
1218
|
+
let t1;
|
|
1219
|
+
if ($[1] !== t0) {
|
|
1220
|
+
({format: t1, ...props} = t0);
|
|
1221
|
+
$[1] = t0;
|
|
1222
|
+
$[2] = props;
|
|
1223
|
+
$[3] = t1;
|
|
1224
|
+
} else {
|
|
1225
|
+
props = $[2];
|
|
1226
|
+
t1 = $[3];
|
|
1227
|
+
}
|
|
1228
|
+
const format = t1 === void 0 ? "L" : t1;
|
|
1229
|
+
const cell = useCellContext();
|
|
1230
|
+
let T0;
|
|
1231
|
+
let t2;
|
|
1232
|
+
let t3;
|
|
1233
|
+
let t4;
|
|
1234
|
+
let t5;
|
|
1235
|
+
let t6;
|
|
1236
|
+
if ($[4] !== cell || $[5] !== format || $[6] !== props) {
|
|
1237
|
+
t6 = Symbol.for("react.early_return_sentinel");
|
|
1238
|
+
bb0: {
|
|
1239
|
+
const value = cell.getValue();
|
|
1240
|
+
if (!value) {
|
|
1241
|
+
t6 = null;
|
|
1242
|
+
break bb0;
|
|
1243
|
+
}
|
|
1244
|
+
T0 = Typography;
|
|
1245
|
+
t2 = "body2";
|
|
1246
|
+
t3 = true;
|
|
1247
|
+
t4 = props;
|
|
1248
|
+
t5 = dayjs(value).format(format);
|
|
1249
|
+
}
|
|
1250
|
+
$[4] = cell;
|
|
1251
|
+
$[5] = format;
|
|
1252
|
+
$[6] = props;
|
|
1253
|
+
$[7] = T0;
|
|
1254
|
+
$[8] = t2;
|
|
1255
|
+
$[9] = t3;
|
|
1256
|
+
$[10] = t4;
|
|
1257
|
+
$[11] = t5;
|
|
1258
|
+
$[12] = t6;
|
|
1259
|
+
} else {
|
|
1260
|
+
T0 = $[7];
|
|
1261
|
+
t2 = $[8];
|
|
1262
|
+
t3 = $[9];
|
|
1263
|
+
t4 = $[10];
|
|
1264
|
+
t5 = $[11];
|
|
1265
|
+
t6 = $[12];
|
|
1266
|
+
}
|
|
1267
|
+
if (t6 !== Symbol.for("react.early_return_sentinel")) return t6;
|
|
1268
|
+
let t7;
|
|
1269
|
+
if ($[13] !== T0 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5) {
|
|
1270
|
+
t7 = /* @__PURE__ */ jsx(T0, {
|
|
1271
|
+
variant: t2,
|
|
1272
|
+
noWrap: t3,
|
|
1273
|
+
...t4,
|
|
1274
|
+
children: t5
|
|
1275
|
+
});
|
|
1276
|
+
$[13] = T0;
|
|
1277
|
+
$[14] = t2;
|
|
1278
|
+
$[15] = t3;
|
|
1279
|
+
$[16] = t4;
|
|
1280
|
+
$[17] = t5;
|
|
1281
|
+
$[18] = t7;
|
|
1282
|
+
} else t7 = $[18];
|
|
1283
|
+
return t7;
|
|
1284
|
+
};
|
|
1285
|
+
//#endregion
|
|
1286
|
+
//#region src/components/table/cells/formatters/DateTimeCell.tsx
|
|
1287
|
+
const DateTimeCell = (t0) => {
|
|
1288
|
+
const $ = c(7);
|
|
1289
|
+
if ($[0] !== "fe9e4fc38583f37e5227c0f76eb86e36fdbf232415dbb06681be0a948a3dc051") {
|
|
1290
|
+
for (let $i = 0; $i < 7; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1291
|
+
$[0] = "fe9e4fc38583f37e5227c0f76eb86e36fdbf232415dbb06681be0a948a3dc051";
|
|
1292
|
+
}
|
|
1293
|
+
let props;
|
|
1294
|
+
let t1;
|
|
1295
|
+
if ($[1] !== t0) {
|
|
1296
|
+
({format: t1, ...props} = t0);
|
|
1297
|
+
$[1] = t0;
|
|
1298
|
+
$[2] = props;
|
|
1299
|
+
$[3] = t1;
|
|
1300
|
+
} else {
|
|
1301
|
+
props = $[2];
|
|
1302
|
+
t1 = $[3];
|
|
1303
|
+
}
|
|
1304
|
+
const format = t1 === void 0 ? "L LT" : t1;
|
|
1305
|
+
let t2;
|
|
1306
|
+
if ($[4] !== format || $[5] !== props) {
|
|
1307
|
+
t2 = /* @__PURE__ */ jsx(DateCell, {
|
|
1308
|
+
format,
|
|
1309
|
+
...props
|
|
1310
|
+
});
|
|
1311
|
+
$[4] = format;
|
|
1312
|
+
$[5] = props;
|
|
1313
|
+
$[6] = t2;
|
|
1314
|
+
} else t2 = $[6];
|
|
1315
|
+
return t2;
|
|
1316
|
+
};
|
|
1317
|
+
//#endregion
|
|
1318
|
+
//#region src/components/table/cells/formatters/NumberCell.tsx
|
|
1319
|
+
const NumberCell = (t0) => {
|
|
1320
|
+
const $ = c(12);
|
|
1321
|
+
if ($[0] !== "7cf664bb8daeb610d39db08282e13af06d501456129b3096149df17a8de8bf43") {
|
|
1322
|
+
for (let $i = 0; $i < 12; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1323
|
+
$[0] = "7cf664bb8daeb610d39db08282e13af06d501456129b3096149df17a8de8bf43";
|
|
1324
|
+
}
|
|
1325
|
+
let options;
|
|
1326
|
+
let props;
|
|
1327
|
+
let sx;
|
|
1328
|
+
if ($[1] !== t0) {
|
|
1329
|
+
({options, sx, ...props} = t0);
|
|
1330
|
+
$[1] = t0;
|
|
1331
|
+
$[2] = options;
|
|
1332
|
+
$[3] = props;
|
|
1333
|
+
$[4] = sx;
|
|
1334
|
+
} else {
|
|
1335
|
+
options = $[2];
|
|
1336
|
+
props = $[3];
|
|
1337
|
+
sx = $[4];
|
|
1338
|
+
}
|
|
1339
|
+
const cell = useCellContext();
|
|
1340
|
+
let t1;
|
|
1341
|
+
if ($[5] !== cell || $[6] !== options || $[7] !== props || $[8] !== sx) {
|
|
1342
|
+
const value = cell.getValue();
|
|
1343
|
+
let t2;
|
|
1344
|
+
if ($[10] !== sx) {
|
|
1345
|
+
t2 = {
|
|
1346
|
+
fontVariantNumeric: "tabular-nums",
|
|
1347
|
+
...sx
|
|
1348
|
+
};
|
|
1349
|
+
$[10] = sx;
|
|
1350
|
+
$[11] = t2;
|
|
1351
|
+
} else t2 = $[11];
|
|
1352
|
+
t1 = /* @__PURE__ */ jsx(Typography, {
|
|
1353
|
+
variant: "body2",
|
|
1354
|
+
noWrap: true,
|
|
1355
|
+
sx: t2,
|
|
1356
|
+
...props,
|
|
1357
|
+
children: typeof value === "number" && value.toLocaleString(void 0, options)
|
|
1358
|
+
});
|
|
1359
|
+
$[5] = cell;
|
|
1360
|
+
$[6] = options;
|
|
1361
|
+
$[7] = props;
|
|
1362
|
+
$[8] = sx;
|
|
1363
|
+
$[9] = t1;
|
|
1364
|
+
} else t1 = $[9];
|
|
1365
|
+
return t1;
|
|
1366
|
+
};
|
|
1367
|
+
//#endregion
|
|
1368
|
+
//#region src/components/table/cells/formatters/ValueCell.tsx
|
|
1369
|
+
const ValueCell = (props) => {
|
|
1370
|
+
const $ = c(6);
|
|
1371
|
+
if ($[0] !== "0ab00a06181368c5fd56e221c1dd8e5c7a77c9128bcfd533b69fc70bfb59896f") {
|
|
1372
|
+
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1373
|
+
$[0] = "0ab00a06181368c5fd56e221c1dd8e5c7a77c9128bcfd533b69fc70bfb59896f";
|
|
1374
|
+
}
|
|
1375
|
+
const cell = useCellContext();
|
|
1376
|
+
let t0;
|
|
1377
|
+
if ($[1] !== cell) {
|
|
1378
|
+
t0 = cell.renderValue();
|
|
1379
|
+
$[1] = cell;
|
|
1380
|
+
$[2] = t0;
|
|
1381
|
+
} else t0 = $[2];
|
|
1382
|
+
const value = t0;
|
|
1383
|
+
let t1;
|
|
1384
|
+
if ($[3] !== props || $[4] !== value) {
|
|
1385
|
+
t1 = /* @__PURE__ */ jsx(Typography, {
|
|
1386
|
+
variant: "body2",
|
|
1387
|
+
noWrap: true,
|
|
1388
|
+
...props,
|
|
1389
|
+
children: value
|
|
1390
|
+
});
|
|
1391
|
+
$[3] = props;
|
|
1392
|
+
$[4] = value;
|
|
1393
|
+
$[5] = t1;
|
|
1394
|
+
} else t1 = $[5];
|
|
1395
|
+
return t1;
|
|
1396
|
+
};
|
|
1397
|
+
//#endregion
|
|
1398
|
+
//#region src/components/table/filterFns.ts
|
|
1399
|
+
const apply = (fn, row, columnId, value) => fn(row, columnId, fn.resolveFilterValue?.(value) ?? value);
|
|
1400
|
+
const ignoreDiacritics = (fn) => constructFilterFn({
|
|
1401
|
+
...fn,
|
|
1402
|
+
resolveFilterValue: foldForSearch,
|
|
1403
|
+
resolveDataValue: foldForSearch
|
|
1404
|
+
});
|
|
1405
|
+
const includesString = ignoreDiacritics(filterFn_includesString);
|
|
1406
|
+
const equalsString = ignoreDiacritics(filterFn_equalsString);
|
|
1407
|
+
const startsWith = ignoreDiacritics(filterFn_startsWith);
|
|
1408
|
+
const endsWith = ignoreDiacritics(filterFn_endsWith);
|
|
1409
|
+
const isFilterActive = (filter) => filter.operator === "isEmpty" || filter.operator === "isNotEmpty" || !isBlank(filter.value);
|
|
1410
|
+
const isBlank = (value) => value === void 0 || value === null || value === "" || Array.isArray(value) && (!value.length || value.every(isBlank));
|
|
1411
|
+
const toTime = (value) => {
|
|
1412
|
+
if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : value.getTime();
|
|
1413
|
+
if (typeof value === "string" || typeof value === "number") {
|
|
1414
|
+
const time = new Date(value).getTime();
|
|
1415
|
+
return Number.isNaN(time) ? null : time;
|
|
1416
|
+
}
|
|
1417
|
+
return null;
|
|
1418
|
+
};
|
|
1419
|
+
const toDay = (time) => new Date(time).setHours(0, 0, 0, 0);
|
|
1420
|
+
const compareDates = (row, columnId, value, operator) => {
|
|
1421
|
+
const rowTime = toTime(row.getValue(columnId));
|
|
1422
|
+
const filterTime = toTime(value);
|
|
1423
|
+
if (rowTime === null || filterTime === null) return void 0;
|
|
1424
|
+
switch (operator) {
|
|
1425
|
+
case "equals": return toDay(rowTime) === toDay(filterTime);
|
|
1426
|
+
case "greaterThan": return rowTime > filterTime;
|
|
1427
|
+
case "greaterThanOrEqualTo": return rowTime >= filterTime;
|
|
1428
|
+
case "lessThan": return rowTime < filterTime;
|
|
1429
|
+
case "lessThanOrEqualTo": return rowTime <= filterTime;
|
|
1430
|
+
default: return;
|
|
1431
|
+
}
|
|
1432
|
+
};
|
|
1433
|
+
const daysFromToday = (row, columnId) => {
|
|
1434
|
+
const rowTime = toTime(row.getValue(columnId));
|
|
1435
|
+
if (rowTime === null) return null;
|
|
1436
|
+
return Math.floor((toDay(rowTime) - toDay(Date.now())) / 864e5);
|
|
1437
|
+
};
|
|
1438
|
+
const isRelativeToToday = (row, columnId, value) => {
|
|
1439
|
+
const diff = daysFromToday(row, columnId);
|
|
1440
|
+
if (diff === null) return false;
|
|
1441
|
+
if (Array.isArray(value)) {
|
|
1442
|
+
const [min, max] = value.map(Number);
|
|
1443
|
+
return (Number.isNaN(min) || diff >= min) && (Number.isNaN(max) || diff <= max);
|
|
1444
|
+
}
|
|
1445
|
+
const days = Number(value);
|
|
1446
|
+
return !Number.isNaN(days) && diff === days;
|
|
1447
|
+
};
|
|
1448
|
+
const equals = (row, columnId, value, variant) => {
|
|
1449
|
+
if (Array.isArray(value)) return apply(filterFn_arrHas, row, columnId, value);
|
|
1450
|
+
if (variant === "date") return compareDates(row, columnId, value, "equals") ?? false;
|
|
1451
|
+
return apply(filterFn_equals, row, columnId, value);
|
|
1452
|
+
};
|
|
1453
|
+
const test = (row, columnId, operator, value, variant) => {
|
|
1454
|
+
switch (operator) {
|
|
1455
|
+
case "includesString": return apply(includesString, row, columnId, value);
|
|
1456
|
+
case "notIncludesString": return !apply(includesString, row, columnId, value);
|
|
1457
|
+
case "equalsString": return apply(equalsString, row, columnId, value);
|
|
1458
|
+
case "notEqualsString": return !apply(equalsString, row, columnId, value);
|
|
1459
|
+
case "startsWith": return apply(startsWith, row, columnId, value);
|
|
1460
|
+
case "endsWith": return apply(endsWith, row, columnId, value);
|
|
1461
|
+
case "isEmpty": return filterFn_empty(row, columnId, true);
|
|
1462
|
+
case "isNotEmpty": return filterFn_notEmpty(row, columnId, true);
|
|
1463
|
+
case "equals": return equals(row, columnId, value, variant);
|
|
1464
|
+
case "notEquals": return !equals(row, columnId, value, variant);
|
|
1465
|
+
case "greaterThan":
|
|
1466
|
+
case "greaterThanOrEqualTo":
|
|
1467
|
+
case "lessThan":
|
|
1468
|
+
case "lessThanOrEqualTo": {
|
|
1469
|
+
if (variant === "date") return compareDates(row, columnId, value, operator) ?? false;
|
|
1470
|
+
const fn = {
|
|
1471
|
+
greaterThan: filterFn_greaterThan,
|
|
1472
|
+
greaterThanOrEqualTo: filterFn_greaterThanOrEqualTo,
|
|
1473
|
+
lessThan: filterFn_lessThan,
|
|
1474
|
+
lessThanOrEqualTo: filterFn_lessThanOrEqualTo
|
|
1475
|
+
}[operator];
|
|
1476
|
+
return apply(fn, row, columnId, value);
|
|
1477
|
+
}
|
|
1478
|
+
case "inRange": return apply(variant === "date" ? filterFn_inDateRange : filterFn_inNumberRange, row, columnId, Array.isArray(value) ? value : [value, value]);
|
|
1479
|
+
case "isRelativeToToday": return isRelativeToToday(row, columnId, value);
|
|
1480
|
+
}
|
|
1481
|
+
};
|
|
1482
|
+
const dynamicFilterFn = (row, columnId) => {
|
|
1483
|
+
const filters = row.table.store.state.columnFilters.filter((filter) => filter.id === columnId);
|
|
1484
|
+
if (!filters.length) return true;
|
|
1485
|
+
const variant = (row.table.getColumn(columnId)?.columnDef.meta)?.variant ?? "text";
|
|
1486
|
+
const results = filters.filter(isFilterActive).map((filter) => test(row, columnId, filter.operator ?? "includesString", filter.value, variant));
|
|
1487
|
+
if (!results.length) return true;
|
|
1488
|
+
return (filters[0].joinOperator ?? "and") === "and" ? results.every(Boolean) : results.some(Boolean);
|
|
1489
|
+
};
|
|
1490
|
+
dynamicFilterFn.autoRemove = () => false;
|
|
1491
|
+
const globalFilterFn = includesString;
|
|
1492
|
+
const TEXT_OPERATORS = [
|
|
1493
|
+
"includesString",
|
|
1494
|
+
"notIncludesString",
|
|
1495
|
+
"startsWith",
|
|
1496
|
+
"endsWith",
|
|
1497
|
+
"equalsString",
|
|
1498
|
+
"notEqualsString",
|
|
1499
|
+
"isEmpty",
|
|
1500
|
+
"isNotEmpty"
|
|
1501
|
+
];
|
|
1502
|
+
const NUMBER_OPERATORS = [
|
|
1503
|
+
"equals",
|
|
1504
|
+
"notEquals",
|
|
1505
|
+
"lessThan",
|
|
1506
|
+
"lessThanOrEqualTo",
|
|
1507
|
+
"greaterThan",
|
|
1508
|
+
"greaterThanOrEqualTo",
|
|
1509
|
+
"inRange"
|
|
1510
|
+
];
|
|
1511
|
+
const DATE_OPERATORS = [
|
|
1512
|
+
"equals",
|
|
1513
|
+
"notEquals",
|
|
1514
|
+
"lessThan",
|
|
1515
|
+
"lessThanOrEqualTo",
|
|
1516
|
+
"greaterThan",
|
|
1517
|
+
"greaterThanOrEqualTo",
|
|
1518
|
+
"inRange",
|
|
1519
|
+
"isRelativeToToday",
|
|
1520
|
+
"isEmpty",
|
|
1521
|
+
"isNotEmpty"
|
|
1522
|
+
];
|
|
1523
|
+
const CHOICE_OPERATORS = [
|
|
1524
|
+
"equals",
|
|
1525
|
+
"notEquals",
|
|
1526
|
+
"isEmpty",
|
|
1527
|
+
"isNotEmpty"
|
|
1528
|
+
];
|
|
1529
|
+
const getFilterOperators = (variant) => {
|
|
1530
|
+
switch (variant) {
|
|
1531
|
+
case "number": return NUMBER_OPERATORS;
|
|
1532
|
+
case "date": return DATE_OPERATORS;
|
|
1533
|
+
case "boolean":
|
|
1534
|
+
case "select":
|
|
1535
|
+
case "multi-select": return CHOICE_OPERATORS;
|
|
1536
|
+
default: return TEXT_OPERATORS;
|
|
1537
|
+
}
|
|
1538
|
+
};
|
|
1539
|
+
//#endregion
|
|
1540
|
+
//#region src/components/table/headers/AggregationFooter.tsx
|
|
1541
|
+
const AggregationFooter = (t0) => {
|
|
1542
|
+
const $ = c(8);
|
|
1543
|
+
if ($[0] !== "2b3427c1cdd7a1c3368f3344dda08d0113fd71842b5d048d5aefe63b4f576caa") {
|
|
1544
|
+
for (let $i = 0; $i < 8; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1545
|
+
$[0] = "2b3427c1cdd7a1c3368f3344dda08d0113fd71842b5d048d5aefe63b4f576caa";
|
|
1546
|
+
}
|
|
1547
|
+
const { prefix: t1, options } = t0;
|
|
1548
|
+
const prefix = t1 === void 0 ? "" : t1;
|
|
1549
|
+
const { column } = useHeaderContext();
|
|
1550
|
+
let t2;
|
|
1551
|
+
if ($[1] !== column || $[2] !== options || $[3] !== prefix) {
|
|
1552
|
+
t2 = () => {
|
|
1553
|
+
const value = formatValue(column.getAggregationValue({ rows: column.table.getFilteredRowModel().rows }));
|
|
1554
|
+
if (!value) return null;
|
|
1555
|
+
const numeric = Number(value);
|
|
1556
|
+
return /* @__PURE__ */ jsxs(Typography, {
|
|
1557
|
+
variant: "body2",
|
|
1558
|
+
noWrap: true,
|
|
1559
|
+
sx: { fontWeight: 700 },
|
|
1560
|
+
children: [prefix, Number.isFinite(numeric) ? numeric.toLocaleString(void 0, options) : value]
|
|
1561
|
+
});
|
|
1562
|
+
};
|
|
1563
|
+
$[1] = column;
|
|
1564
|
+
$[2] = options;
|
|
1565
|
+
$[3] = prefix;
|
|
1566
|
+
$[4] = t2;
|
|
1567
|
+
} else t2 = $[4];
|
|
1568
|
+
let t3;
|
|
1569
|
+
if ($[5] !== column.table.atoms.columnFilters || $[6] !== t2) {
|
|
1570
|
+
t3 = /* @__PURE__ */ jsx(Subscribe, {
|
|
1571
|
+
source: column.table.atoms.columnFilters,
|
|
1572
|
+
children: t2
|
|
1573
|
+
});
|
|
1574
|
+
$[5] = column.table.atoms.columnFilters;
|
|
1575
|
+
$[6] = t2;
|
|
1576
|
+
$[7] = t3;
|
|
1577
|
+
} else t3 = $[7];
|
|
1578
|
+
return t3;
|
|
1579
|
+
};
|
|
1580
|
+
//#endregion
|
|
1581
|
+
//#region src/components/table/headers/ExpandAllCell.tsx
|
|
1582
|
+
const ExpandAllCell = () => {
|
|
1583
|
+
const $ = c(6);
|
|
1584
|
+
if ($[0] !== "851f8a7aeadefee23d0b10559fef0b77d249b3af774b5b47e7baf05db417b810") {
|
|
1585
|
+
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1586
|
+
$[0] = "851f8a7aeadefee23d0b10559fef0b77d249b3af774b5b47e7baf05db417b810";
|
|
1587
|
+
}
|
|
1588
|
+
const table = useHeaderContext().table;
|
|
1589
|
+
let t0;
|
|
1590
|
+
if ($[1] !== table) {
|
|
1591
|
+
t0 = () => {
|
|
1592
|
+
if (!table.getCanSomeRowsExpand()) return null;
|
|
1593
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
1594
|
+
size: "small",
|
|
1595
|
+
onClick: table.getToggleAllRowsExpandedHandler(),
|
|
1596
|
+
"aria-label": "Toggle all rows",
|
|
1597
|
+
children: /* @__PURE__ */ jsx(ArrowDownward, {
|
|
1598
|
+
fontSize: "small",
|
|
1599
|
+
sx: {
|
|
1600
|
+
transition: "transform 150ms",
|
|
1601
|
+
transform: table.getIsAllRowsExpanded() ? "rotate(0deg)" : "rotate(-90deg)"
|
|
1602
|
+
}
|
|
1603
|
+
})
|
|
1604
|
+
});
|
|
1605
|
+
};
|
|
1606
|
+
$[1] = table;
|
|
1607
|
+
$[2] = t0;
|
|
1608
|
+
} else t0 = $[2];
|
|
1609
|
+
let t1;
|
|
1610
|
+
if ($[3] !== t0 || $[4] !== table.atoms.expanded) {
|
|
1611
|
+
t1 = /* @__PURE__ */ jsx(Subscribe, {
|
|
1612
|
+
source: table.atoms.expanded,
|
|
1613
|
+
children: t0
|
|
1614
|
+
});
|
|
1615
|
+
$[3] = t0;
|
|
1616
|
+
$[4] = table.atoms.expanded;
|
|
1617
|
+
$[5] = t1;
|
|
1618
|
+
} else t1 = $[5];
|
|
1619
|
+
return t1;
|
|
1620
|
+
};
|
|
1621
|
+
//#endregion
|
|
1622
|
+
//#region src/components/table/headers/HeaderMenu.tsx
|
|
1623
|
+
const HeaderMenu = () => {
|
|
1624
|
+
const $ = c(10);
|
|
1625
|
+
if ($[0] !== "ecfcf0f9fe23e5b130d059c75e052010db8c0f428bc5ec35c88d8a9df9828811") {
|
|
1626
|
+
for (let $i = 0; $i < 10; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1627
|
+
$[0] = "ecfcf0f9fe23e5b130d059c75e052010db8c0f428bc5ec35c88d8a9df9828811";
|
|
1628
|
+
}
|
|
1629
|
+
const header = useHeaderContext();
|
|
1630
|
+
const { t } = useTranslation$1();
|
|
1631
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
1632
|
+
const { column } = header;
|
|
1633
|
+
let t0;
|
|
1634
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1635
|
+
t0 = () => setAnchorEl(null);
|
|
1636
|
+
$[1] = t0;
|
|
1637
|
+
} else t0 = $[1];
|
|
1638
|
+
const close = t0;
|
|
1639
|
+
let t1;
|
|
1640
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1641
|
+
t1 = (action) => () => {
|
|
1642
|
+
action();
|
|
1643
|
+
close();
|
|
1644
|
+
};
|
|
1645
|
+
$[2] = t1;
|
|
1646
|
+
} else t1 = $[2];
|
|
1647
|
+
const run = t1;
|
|
1648
|
+
if (!hasColumnLabel(column)) return null;
|
|
1649
|
+
let t2;
|
|
1650
|
+
if ($[3] !== anchorEl || $[4] !== column || $[5] !== t) {
|
|
1651
|
+
t2 = () => {
|
|
1652
|
+
const canSort = column.getCanSort();
|
|
1653
|
+
const canPin = column.getCanPin();
|
|
1654
|
+
const canGroup = column.getCanGroup();
|
|
1655
|
+
const canHide = column.getCanHide();
|
|
1656
|
+
if (!canSort && !canPin && !canGroup && !canHide) return null;
|
|
1657
|
+
const sorted = column.getIsSorted();
|
|
1658
|
+
const pinned = column.getIsPinned();
|
|
1659
|
+
const grouped = column.getIsGrouped();
|
|
1660
|
+
const index = column.getIndex();
|
|
1661
|
+
const leafCount = column.table.getVisibleLeafColumns().length;
|
|
1662
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
1663
|
+
sx: {
|
|
1664
|
+
display: "flex",
|
|
1665
|
+
flexShrink: 0,
|
|
1666
|
+
mr: "-5px",
|
|
1667
|
+
overflow: "hidden",
|
|
1668
|
+
width: anchorEl ? "auto" : 0,
|
|
1669
|
+
".MuiTableCell-root:hover &": { width: "auto" },
|
|
1670
|
+
"&:focus-within": { width: "auto" },
|
|
1671
|
+
"@media (hover: none)": { width: "auto" }
|
|
1672
|
+
},
|
|
1673
|
+
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
1674
|
+
size: "small",
|
|
1675
|
+
onClick: (event) => setAnchorEl(event.currentTarget),
|
|
1676
|
+
"aria-label": t("Layout.Table.ColumnMenu"),
|
|
1677
|
+
children: /* @__PURE__ */ jsx(MoreVert, { fontSize: "small" })
|
|
1678
|
+
}), /* @__PURE__ */ jsxs(Menu, {
|
|
1679
|
+
anchorEl,
|
|
1680
|
+
open: !!anchorEl,
|
|
1681
|
+
onClose: close,
|
|
1682
|
+
children: [
|
|
1683
|
+
canSort && sorted !== "asc" && /* @__PURE__ */ jsxs(MenuItem, {
|
|
1684
|
+
onClick: run(() => column.toggleSorting(false, true)),
|
|
1685
|
+
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(ArrowUpward, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: t("Layout.Table.SortAscending") })]
|
|
1686
|
+
}),
|
|
1687
|
+
canSort && sorted !== "desc" && /* @__PURE__ */ jsxs(MenuItem, {
|
|
1688
|
+
onClick: run(() => column.toggleSorting(true, true)),
|
|
1689
|
+
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(ArrowDownward, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: t("Layout.Table.SortDescending") })]
|
|
1690
|
+
}),
|
|
1691
|
+
canSort && sorted !== false && /* @__PURE__ */ jsxs(MenuItem, {
|
|
1692
|
+
onClick: run(() => column.clearSorting()),
|
|
1693
|
+
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(Clear, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: t("Layout.Table.ClearSort") })]
|
|
1694
|
+
}),
|
|
1695
|
+
canPin && /* @__PURE__ */ jsx(Divider, {}),
|
|
1696
|
+
canPin && ["start", "end"].map((position) => /* @__PURE__ */ jsxs(MenuItem, {
|
|
1697
|
+
selected: pinned === position,
|
|
1698
|
+
onClick: run(() => column.pin(pinned === position ? false : position)),
|
|
1699
|
+
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(PushPin, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: pinned === position ? t("Layout.Table.Unpin") : position === "start" ? t("Layout.Table.PinStart") : t("Layout.Table.PinEnd") })]
|
|
1700
|
+
}, position)),
|
|
1701
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
1702
|
+
/* @__PURE__ */ jsxs(MenuItem, {
|
|
1703
|
+
disabled: index <= 0,
|
|
1704
|
+
onClick: run(() => moveColumn(column, -1)),
|
|
1705
|
+
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(ArrowBack, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: t("Layout.Table.MoveLeft") })]
|
|
1706
|
+
}),
|
|
1707
|
+
/* @__PURE__ */ jsxs(MenuItem, {
|
|
1708
|
+
disabled: index >= leafCount - 1,
|
|
1709
|
+
onClick: run(() => moveColumn(column, 1)),
|
|
1710
|
+
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(ArrowForward, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: t("Layout.Table.MoveRight") })]
|
|
1711
|
+
}),
|
|
1712
|
+
canGroup && /* @__PURE__ */ jsx(Divider, {}),
|
|
1713
|
+
canGroup && /* @__PURE__ */ jsxs(MenuItem, {
|
|
1714
|
+
onClick: run(() => column.toggleGrouping()),
|
|
1715
|
+
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(Workspaces, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: grouped ? t("Layout.Table.Ungroup") : t("Layout.Table.GroupBy") })]
|
|
1716
|
+
}),
|
|
1717
|
+
canHide && /* @__PURE__ */ jsx(Divider, {}),
|
|
1718
|
+
canHide && /* @__PURE__ */ jsxs(MenuItem, {
|
|
1719
|
+
onClick: run(() => column.toggleVisibility(false)),
|
|
1720
|
+
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(VisibilityOff, { fontSize: "small" }) }), /* @__PURE__ */ jsx(ListItemText, { children: t("Layout.Table.HideColumn") })]
|
|
1721
|
+
})
|
|
1722
|
+
]
|
|
1723
|
+
})]
|
|
1724
|
+
});
|
|
1725
|
+
};
|
|
1726
|
+
$[3] = anchorEl;
|
|
1727
|
+
$[4] = column;
|
|
1728
|
+
$[5] = t;
|
|
1729
|
+
$[6] = t2;
|
|
1730
|
+
} else t2 = $[6];
|
|
1731
|
+
let t3;
|
|
1732
|
+
if ($[7] !== column.table.store || $[8] !== t2) {
|
|
1733
|
+
t3 = /* @__PURE__ */ jsx(Subscribe, {
|
|
1734
|
+
source: column.table.store,
|
|
1735
|
+
selector: _temp$5,
|
|
1736
|
+
children: t2
|
|
1737
|
+
});
|
|
1738
|
+
$[7] = column.table.store;
|
|
1739
|
+
$[8] = t2;
|
|
1740
|
+
$[9] = t3;
|
|
1741
|
+
} else t3 = $[9];
|
|
1742
|
+
return t3;
|
|
1743
|
+
};
|
|
1744
|
+
function _temp$5(state) {
|
|
1745
|
+
return state;
|
|
1746
|
+
}
|
|
1747
|
+
//#endregion
|
|
1748
|
+
//#region src/components/table/headers/HeaderResizeHandle.tsx
|
|
1749
|
+
const BAR_HEIGHT = 24;
|
|
1750
|
+
const TARGET_SIZE = 10;
|
|
1751
|
+
const bar = (accent) => ({
|
|
1752
|
+
content: "\"\"",
|
|
1753
|
+
position: "absolute",
|
|
1754
|
+
insetInlineEnd: 0,
|
|
1755
|
+
top: `calc(50% - ${BAR_HEIGHT / 2}px)`,
|
|
1756
|
+
width: accent ? "3px" : "1px",
|
|
1757
|
+
height: BAR_HEIGHT,
|
|
1758
|
+
borderRadius: accent ? "1.5px" : "0.5px",
|
|
1759
|
+
bgcolor: accent ? "primary.dark" : "divider",
|
|
1760
|
+
transition: (theme) => theme.transitions.create(["width", "background-color"])
|
|
1761
|
+
});
|
|
1762
|
+
const base = {
|
|
1763
|
+
position: "absolute",
|
|
1764
|
+
insetBlock: 0,
|
|
1765
|
+
insetInlineEnd: 0,
|
|
1766
|
+
width: TARGET_SIZE
|
|
1767
|
+
};
|
|
1768
|
+
const HeaderResizeHandle = () => {
|
|
1769
|
+
const $ = c(14);
|
|
1770
|
+
if ($[0] !== "ba4f406a8d45438b6ce257702797cd3ac0221d6619bbb168f4451c745108af48") {
|
|
1771
|
+
for (let $i = 0; $i < 14; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1772
|
+
$[0] = "ba4f406a8d45438b6ce257702797cd3ac0221d6619bbb168f4451c745108af48";
|
|
1773
|
+
}
|
|
1774
|
+
const header = useHeaderContext();
|
|
1775
|
+
const { column } = header;
|
|
1776
|
+
if (!column.getCanResize()) {
|
|
1777
|
+
let t0;
|
|
1778
|
+
if ($[1] !== column) {
|
|
1779
|
+
t0 = column.getIsLastColumn() ? null : /* @__PURE__ */ jsx(Box, { sx: {
|
|
1780
|
+
...base,
|
|
1781
|
+
"&::after": bar(false)
|
|
1782
|
+
} });
|
|
1783
|
+
$[1] = column;
|
|
1784
|
+
$[2] = t0;
|
|
1785
|
+
} else t0 = $[2];
|
|
1786
|
+
return t0;
|
|
1787
|
+
}
|
|
1788
|
+
let t0;
|
|
1789
|
+
if ($[3] !== header) {
|
|
1790
|
+
t0 = header.getResizeHandler();
|
|
1791
|
+
$[3] = header;
|
|
1792
|
+
$[4] = t0;
|
|
1793
|
+
} else t0 = $[4];
|
|
1794
|
+
const resize = t0;
|
|
1795
|
+
let t1;
|
|
1796
|
+
if ($[5] !== column || $[6] !== resize) {
|
|
1797
|
+
t1 = (event) => {
|
|
1798
|
+
const width = event.currentTarget.parentElement?.offsetWidth;
|
|
1799
|
+
if (columnFlex(column) && width) column.table.setColumnSizing((old) => ({
|
|
1800
|
+
...old,
|
|
1801
|
+
[column.id]: width
|
|
1802
|
+
}));
|
|
1803
|
+
resize(event);
|
|
1804
|
+
};
|
|
1805
|
+
$[5] = column;
|
|
1806
|
+
$[6] = resize;
|
|
1807
|
+
$[7] = t1;
|
|
1808
|
+
} else t1 = $[7];
|
|
1809
|
+
const handler = t1;
|
|
1810
|
+
let t2;
|
|
1811
|
+
if ($[8] !== column || $[9] !== handler) {
|
|
1812
|
+
t2 = () => /* @__PURE__ */ jsx(Box, {
|
|
1813
|
+
role: "separator",
|
|
1814
|
+
"aria-orientation": "vertical",
|
|
1815
|
+
onMouseDown: handler,
|
|
1816
|
+
onTouchStart: handler,
|
|
1817
|
+
onDoubleClick: () => column.resetSize(),
|
|
1818
|
+
onClick: _temp$4,
|
|
1819
|
+
sx: {
|
|
1820
|
+
...base,
|
|
1821
|
+
cursor: "col-resize",
|
|
1822
|
+
touchAction: "none",
|
|
1823
|
+
userSelect: "none",
|
|
1824
|
+
"&::after": bar(column.getIsResizing()),
|
|
1825
|
+
"&:hover::after": bar(true)
|
|
1826
|
+
}
|
|
1827
|
+
});
|
|
1828
|
+
$[8] = column;
|
|
1829
|
+
$[9] = handler;
|
|
1830
|
+
$[10] = t2;
|
|
1831
|
+
} else t2 = $[10];
|
|
1832
|
+
let t3;
|
|
1833
|
+
if ($[11] !== column.table.atoms.columnResizing || $[12] !== t2) {
|
|
1834
|
+
t3 = /* @__PURE__ */ jsx(Subscribe, {
|
|
1835
|
+
source: column.table.atoms.columnResizing,
|
|
1836
|
+
children: t2
|
|
1837
|
+
});
|
|
1838
|
+
$[11] = column.table.atoms.columnResizing;
|
|
1839
|
+
$[12] = t2;
|
|
1840
|
+
$[13] = t3;
|
|
1841
|
+
} else t3 = $[13];
|
|
1842
|
+
return t3;
|
|
1843
|
+
};
|
|
1844
|
+
function _temp$4(event_0) {
|
|
1845
|
+
return event_0.stopPropagation();
|
|
1846
|
+
}
|
|
1847
|
+
//#endregion
|
|
1848
|
+
//#region src/components/table/headers/HeaderSortLabel.tsx
|
|
1849
|
+
const HeaderSortLabel = (t0) => {
|
|
1850
|
+
const $ = c(7);
|
|
1851
|
+
if ($[0] !== "3963eb1f093b2c0b3513d5574e478a830b2db6eeb5db09ed16762691d354080a") {
|
|
1852
|
+
for (let $i = 0; $i < 7; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1853
|
+
$[0] = "3963eb1f093b2c0b3513d5574e478a830b2db6eeb5db09ed16762691d354080a";
|
|
1854
|
+
}
|
|
1855
|
+
const { children } = t0;
|
|
1856
|
+
const { column } = useHeaderContext();
|
|
1857
|
+
if (!column.getCanSort()) return children;
|
|
1858
|
+
let t1;
|
|
1859
|
+
if ($[1] !== children || $[2] !== column) {
|
|
1860
|
+
t1 = (sorting) => {
|
|
1861
|
+
const direction = column.getIsSorted();
|
|
1862
|
+
const sortIndex = sorting.length > 1 ? column.getSortIndex() : -1;
|
|
1863
|
+
return /* @__PURE__ */ jsxs(TableSortLabel, {
|
|
1864
|
+
active: direction !== false,
|
|
1865
|
+
direction: direction === false ? "asc" : direction,
|
|
1866
|
+
onClick: column.getToggleSortingHandler(),
|
|
1867
|
+
children: [children, sortIndex > -1 && /* @__PURE__ */ jsx(Box, {
|
|
1868
|
+
component: "span",
|
|
1869
|
+
sx: {
|
|
1870
|
+
ml: .5,
|
|
1871
|
+
fontSize: 11,
|
|
1872
|
+
opacity: .7
|
|
1873
|
+
},
|
|
1874
|
+
children: sortIndex + 1
|
|
1875
|
+
})]
|
|
1876
|
+
});
|
|
1877
|
+
};
|
|
1878
|
+
$[1] = children;
|
|
1879
|
+
$[2] = column;
|
|
1880
|
+
$[3] = t1;
|
|
1881
|
+
} else t1 = $[3];
|
|
1882
|
+
let t2;
|
|
1883
|
+
if ($[4] !== column.table.atoms.sorting || $[5] !== t1) {
|
|
1884
|
+
t2 = /* @__PURE__ */ jsx(Subscribe, {
|
|
1885
|
+
source: column.table.atoms.sorting,
|
|
1886
|
+
children: t1
|
|
1887
|
+
});
|
|
1888
|
+
$[4] = column.table.atoms.sorting;
|
|
1889
|
+
$[5] = t1;
|
|
1890
|
+
$[6] = t2;
|
|
1891
|
+
} else t2 = $[6];
|
|
1892
|
+
return t2;
|
|
1893
|
+
};
|
|
1894
|
+
//#endregion
|
|
1895
|
+
//#region src/components/table/headers/SelectAllCell.tsx
|
|
1896
|
+
const SelectAllCell = (t0) => {
|
|
1897
|
+
const $ = c(7);
|
|
1898
|
+
if ($[0] !== "33588c3e9cbdc713efa770a1c85d8af909b2a6100693622a56aa84ee845a7d85") {
|
|
1899
|
+
for (let $i = 0; $i < 7; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1900
|
+
$[0] = "33588c3e9cbdc713efa770a1c85d8af909b2a6100693622a56aa84ee845a7d85";
|
|
1901
|
+
}
|
|
1902
|
+
const { scope: t1 } = t0;
|
|
1903
|
+
const scope = t1 === void 0 ? "page" : t1;
|
|
1904
|
+
const table = useHeaderContext().table;
|
|
1905
|
+
let t2;
|
|
1906
|
+
if ($[1] !== scope || $[2] !== table) {
|
|
1907
|
+
t2 = () => {
|
|
1908
|
+
const checked = scope === "page" ? table.getIsAllPageRowsSelected() : table.getIsAllRowsSelected();
|
|
1909
|
+
const indeterminate = scope === "page" ? table.getIsSomePageRowsSelected() : table.getIsSomeRowsSelected();
|
|
1910
|
+
return /* @__PURE__ */ jsx(Checkbox, {
|
|
1911
|
+
size: "small",
|
|
1912
|
+
checked,
|
|
1913
|
+
indeterminate: !checked && indeterminate,
|
|
1914
|
+
onChange: scope === "page" ? table.getToggleAllPageRowsSelectedHandler() : table.getToggleAllRowsSelectedHandler(),
|
|
1915
|
+
slotProps: { input: { "aria-label": "Select all rows" } }
|
|
1916
|
+
});
|
|
1917
|
+
};
|
|
1918
|
+
$[1] = scope;
|
|
1919
|
+
$[2] = table;
|
|
1920
|
+
$[3] = t2;
|
|
1921
|
+
} else t2 = $[3];
|
|
1922
|
+
let t3;
|
|
1923
|
+
if ($[4] !== t2 || $[5] !== table.atoms.rowSelection) {
|
|
1924
|
+
t3 = /* @__PURE__ */ jsx(Subscribe, {
|
|
1925
|
+
source: table.atoms.rowSelection,
|
|
1926
|
+
children: t2
|
|
1927
|
+
});
|
|
1928
|
+
$[4] = t2;
|
|
1929
|
+
$[5] = table.atoms.rowSelection;
|
|
1930
|
+
$[6] = t3;
|
|
1931
|
+
} else t3 = $[6];
|
|
1932
|
+
return t3;
|
|
1933
|
+
};
|
|
1934
|
+
//#endregion
|
|
1935
|
+
//#region src/components/table/table/ColumnsPanel.tsx
|
|
1936
|
+
const ColumnsPanel = () => {
|
|
1937
|
+
const $ = c(29);
|
|
1938
|
+
if ($[0] !== "6e9b775bc940f7c6695c6f73b0a2c1b2006d3ddafbf891fff9340e618b93e44d") {
|
|
1939
|
+
for (let $i = 0; $i < 29; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1940
|
+
$[0] = "6e9b775bc940f7c6695c6f73b0a2c1b2006d3ddafbf891fff9340e618b93e44d";
|
|
1941
|
+
}
|
|
1942
|
+
const table = useTableContext();
|
|
1943
|
+
const { t } = useTranslation$1();
|
|
1944
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
1945
|
+
const buttonRef = useRef(null);
|
|
1946
|
+
let t0;
|
|
1947
|
+
if ($[1] !== table) {
|
|
1948
|
+
t0 = table.getAllLeafColumns().filter(_temp$3);
|
|
1949
|
+
$[1] = table;
|
|
1950
|
+
$[2] = t0;
|
|
1951
|
+
} else t0 = $[2];
|
|
1952
|
+
const columns = t0;
|
|
1953
|
+
let t1;
|
|
1954
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1955
|
+
t1 = () => setAnchorEl((current) => current ? null : buttonRef.current);
|
|
1956
|
+
$[3] = t1;
|
|
1957
|
+
} else t1 = $[3];
|
|
1958
|
+
const t2 = columns.length > 0;
|
|
1959
|
+
let t3;
|
|
1960
|
+
if ($[4] !== t2) {
|
|
1961
|
+
t3 = { enabled: t2 };
|
|
1962
|
+
$[4] = t2;
|
|
1963
|
+
$[5] = t3;
|
|
1964
|
+
} else t3 = $[5];
|
|
1965
|
+
useHotkey("Alt+C", t1, t3);
|
|
1966
|
+
if (!columns.length) return null;
|
|
1967
|
+
let t4;
|
|
1968
|
+
if ($[6] !== t) {
|
|
1969
|
+
t4 = shortcutLabel(t("Layout.Table.Columns"), "Alt+C");
|
|
1970
|
+
$[6] = t;
|
|
1971
|
+
$[7] = t4;
|
|
1972
|
+
} else t4 = $[7];
|
|
1973
|
+
let t5;
|
|
1974
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1975
|
+
t5 = /* @__PURE__ */ jsx(IconButton, {
|
|
1976
|
+
ref: buttonRef,
|
|
1977
|
+
size: "small",
|
|
1978
|
+
onClick: (event) => setAnchorEl(event.currentTarget),
|
|
1979
|
+
children: /* @__PURE__ */ jsx(ViewColumn, { fontSize: "small" })
|
|
1980
|
+
});
|
|
1981
|
+
$[8] = t5;
|
|
1982
|
+
} else t5 = $[8];
|
|
1983
|
+
let t6;
|
|
1984
|
+
if ($[9] !== t4) {
|
|
1985
|
+
t6 = /* @__PURE__ */ jsx(Tooltip, {
|
|
1986
|
+
title: t4,
|
|
1987
|
+
children: t5
|
|
1988
|
+
});
|
|
1989
|
+
$[9] = t4;
|
|
1990
|
+
$[10] = t6;
|
|
1991
|
+
} else t6 = $[10];
|
|
1992
|
+
const t7 = !!anchorEl;
|
|
1993
|
+
let t10;
|
|
1994
|
+
let t11;
|
|
1995
|
+
let t8;
|
|
1996
|
+
let t9;
|
|
1997
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1998
|
+
t8 = () => setAnchorEl(null);
|
|
1999
|
+
t9 = {
|
|
2000
|
+
vertical: "bottom",
|
|
2001
|
+
horizontal: "right"
|
|
2002
|
+
};
|
|
2003
|
+
t10 = {
|
|
2004
|
+
vertical: "top",
|
|
2005
|
+
horizontal: "right"
|
|
2006
|
+
};
|
|
2007
|
+
t11 = { paper: { sx: { maxWidth: "calc(100vw - 16px)" } } };
|
|
2008
|
+
$[11] = t10;
|
|
2009
|
+
$[12] = t11;
|
|
2010
|
+
$[13] = t8;
|
|
2011
|
+
$[14] = t9;
|
|
2012
|
+
} else {
|
|
2013
|
+
t10 = $[11];
|
|
2014
|
+
t11 = $[12];
|
|
2015
|
+
t8 = $[13];
|
|
2016
|
+
t9 = $[14];
|
|
2017
|
+
}
|
|
2018
|
+
let t12;
|
|
2019
|
+
if ($[15] !== columns || $[16] !== t || $[17] !== table) {
|
|
2020
|
+
t12 = () => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Box, {
|
|
2021
|
+
sx: {
|
|
2022
|
+
display: "flex",
|
|
2023
|
+
flexDirection: "column",
|
|
2024
|
+
px: 1.5,
|
|
2025
|
+
py: 1,
|
|
2026
|
+
maxHeight: 300,
|
|
2027
|
+
minWidth: 240,
|
|
2028
|
+
overflow: "auto"
|
|
2029
|
+
},
|
|
2030
|
+
children: columns.map(_temp2$1)
|
|
2031
|
+
}), /* @__PURE__ */ jsx(Box, {
|
|
2032
|
+
sx: {
|
|
2033
|
+
display: "flex",
|
|
2034
|
+
alignItems: "center",
|
|
2035
|
+
p: 1.5,
|
|
2036
|
+
borderTop: 1,
|
|
2037
|
+
borderColor: "divider"
|
|
2038
|
+
},
|
|
2039
|
+
children: /* @__PURE__ */ jsx(FormControlLabel, {
|
|
2040
|
+
label: t("Layout.Table.ShowHideAll"),
|
|
2041
|
+
slotProps: { typography: {
|
|
2042
|
+
variant: "body2",
|
|
2043
|
+
noWrap: true
|
|
2044
|
+
} },
|
|
2045
|
+
control: /* @__PURE__ */ jsx(Checkbox, {
|
|
2046
|
+
size: "small",
|
|
2047
|
+
checked: table.getIsAllColumnsVisible(),
|
|
2048
|
+
indeterminate: table.getIsSomeColumnsVisible() && !table.getIsAllColumnsVisible(),
|
|
2049
|
+
onChange: table.getToggleAllColumnsVisibilityHandler()
|
|
2050
|
+
})
|
|
2051
|
+
})
|
|
2052
|
+
})] });
|
|
2053
|
+
$[15] = columns;
|
|
2054
|
+
$[16] = t;
|
|
2055
|
+
$[17] = table;
|
|
2056
|
+
$[18] = t12;
|
|
2057
|
+
} else t12 = $[18];
|
|
2058
|
+
let t13;
|
|
2059
|
+
if ($[19] !== t12 || $[20] !== table.atoms.columnVisibility) {
|
|
2060
|
+
t13 = /* @__PURE__ */ jsx(Subscribe, {
|
|
2061
|
+
source: table.atoms.columnVisibility,
|
|
2062
|
+
children: t12
|
|
2063
|
+
});
|
|
2064
|
+
$[19] = t12;
|
|
2065
|
+
$[20] = table.atoms.columnVisibility;
|
|
2066
|
+
$[21] = t13;
|
|
2067
|
+
} else t13 = $[21];
|
|
2068
|
+
let t14;
|
|
2069
|
+
if ($[22] !== anchorEl || $[23] !== t13 || $[24] !== t7) {
|
|
2070
|
+
t14 = /* @__PURE__ */ jsx(Popover, {
|
|
2071
|
+
anchorEl,
|
|
2072
|
+
open: t7,
|
|
2073
|
+
onClose: t8,
|
|
2074
|
+
anchorOrigin: t9,
|
|
2075
|
+
transformOrigin: t10,
|
|
2076
|
+
slotProps: t11,
|
|
2077
|
+
children: t13
|
|
2078
|
+
});
|
|
2079
|
+
$[22] = anchorEl;
|
|
2080
|
+
$[23] = t13;
|
|
2081
|
+
$[24] = t7;
|
|
2082
|
+
$[25] = t14;
|
|
2083
|
+
} else t14 = $[25];
|
|
2084
|
+
let t15;
|
|
2085
|
+
if ($[26] !== t14 || $[27] !== t6) {
|
|
2086
|
+
t15 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t6, t14] });
|
|
2087
|
+
$[26] = t14;
|
|
2088
|
+
$[27] = t6;
|
|
2089
|
+
$[28] = t15;
|
|
2090
|
+
} else t15 = $[28];
|
|
2091
|
+
return t15;
|
|
2092
|
+
};
|
|
2093
|
+
function _temp$3(column) {
|
|
2094
|
+
return hasColumnLabel(column) && column.getCanHide();
|
|
2095
|
+
}
|
|
2096
|
+
function _temp2$1(column_0) {
|
|
2097
|
+
return /* @__PURE__ */ jsx(FormControlLabel, {
|
|
2098
|
+
label: columnLabel(column_0),
|
|
2099
|
+
slotProps: { typography: {
|
|
2100
|
+
variant: "body2",
|
|
2101
|
+
noWrap: true
|
|
2102
|
+
} },
|
|
2103
|
+
control: /* @__PURE__ */ jsx(Checkbox, {
|
|
2104
|
+
size: "small",
|
|
2105
|
+
checked: column_0.getIsVisible(),
|
|
2106
|
+
onChange: column_0.getToggleVisibilityHandler()
|
|
2107
|
+
})
|
|
2108
|
+
}, column_0.id);
|
|
2109
|
+
}
|
|
2110
|
+
//#endregion
|
|
2111
|
+
//#region src/components/table/ColumnFilterField.tsx
|
|
2112
|
+
const filterMeta = (column) => column.columnDef.meta ?? {};
|
|
2113
|
+
const resolveOptions = (column) => {
|
|
2114
|
+
const declared = filterMeta(column).options;
|
|
2115
|
+
if (declared) return declared;
|
|
2116
|
+
return Array.from(column.getFacetedUniqueValues().keys()).map((value) => ({
|
|
2117
|
+
label: formatValue(value),
|
|
2118
|
+
value: formatValue(value)
|
|
2119
|
+
})).filter((option) => option.value !== "").sort((a, b) => a.label.localeCompare(b.label));
|
|
2120
|
+
};
|
|
2121
|
+
const toDateInputValue = (value) => {
|
|
2122
|
+
if (!(value instanceof Date || typeof value === "string" || typeof value === "number")) return "";
|
|
2123
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
2124
|
+
if (Number.isNaN(date.getTime())) return "";
|
|
2125
|
+
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
|
|
2126
|
+
};
|
|
2127
|
+
const fromDateInputValue = (raw) => raw ? (/* @__PURE__ */ new Date(`${raw}T00:00:00`)).toISOString() : void 0;
|
|
2128
|
+
const toNumber = (raw) => raw === "" ? "" : Number(raw);
|
|
2129
|
+
const pair = (value) => Array.isArray(value) ? [value[0], value[1]] : ["", ""];
|
|
2130
|
+
function ColumnFilterField(t0) {
|
|
2131
|
+
const $ = c(126);
|
|
2132
|
+
if ($[0] !== "70d9525a526f8d7a67ab772f022a6cf530f26a1e99c43a5881011caa57faeb51") {
|
|
2133
|
+
for (let $i = 0; $i < 126; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
2134
|
+
$[0] = "70d9525a526f8d7a67ab772f022a6cf530f26a1e99c43a5881011caa57faeb51";
|
|
2135
|
+
}
|
|
2136
|
+
const { column, filter, onChange } = t0;
|
|
2137
|
+
const { t } = useTranslation$1();
|
|
2138
|
+
let t1;
|
|
2139
|
+
if ($[1] !== column) {
|
|
2140
|
+
t1 = filterMeta(column).variant ?? "text";
|
|
2141
|
+
$[1] = column;
|
|
2142
|
+
$[2] = t1;
|
|
2143
|
+
} else t1 = $[2];
|
|
2144
|
+
const variant = t1;
|
|
2145
|
+
const operator = filter.operator ?? "includesString";
|
|
2146
|
+
let t2;
|
|
2147
|
+
if ($[3] !== t) {
|
|
2148
|
+
t2 = t("Layout.Table.Value");
|
|
2149
|
+
$[3] = t;
|
|
2150
|
+
$[4] = t2;
|
|
2151
|
+
} else t2 = $[4];
|
|
2152
|
+
let t3;
|
|
2153
|
+
if ($[5] !== t2) {
|
|
2154
|
+
t3 = {
|
|
2155
|
+
size: "small",
|
|
2156
|
+
fullWidth: true,
|
|
2157
|
+
label: t2
|
|
2158
|
+
};
|
|
2159
|
+
$[5] = t2;
|
|
2160
|
+
$[6] = t3;
|
|
2161
|
+
} else t3 = $[6];
|
|
2162
|
+
const shared = t3;
|
|
2163
|
+
const [value, setValue] = useState(filter.value);
|
|
2164
|
+
let t4;
|
|
2165
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2166
|
+
t4 = { wait: 300 };
|
|
2167
|
+
$[7] = t4;
|
|
2168
|
+
} else t4 = $[7];
|
|
2169
|
+
const commit = useDebouncedCallback(onChange, t4);
|
|
2170
|
+
let t5;
|
|
2171
|
+
if ($[8] !== commit) {
|
|
2172
|
+
t5 = (next) => {
|
|
2173
|
+
setValue(next);
|
|
2174
|
+
commit(next);
|
|
2175
|
+
};
|
|
2176
|
+
$[8] = commit;
|
|
2177
|
+
$[9] = t5;
|
|
2178
|
+
} else t5 = $[9];
|
|
2179
|
+
const change = t5;
|
|
2180
|
+
if (operator === "isEmpty" || operator === "isNotEmpty") {
|
|
2181
|
+
let t6;
|
|
2182
|
+
if ($[10] !== t) {
|
|
2183
|
+
t6 = t("Layout.Table.NoValueRequired");
|
|
2184
|
+
$[10] = t;
|
|
2185
|
+
$[11] = t6;
|
|
2186
|
+
} else t6 = $[11];
|
|
2187
|
+
let t7;
|
|
2188
|
+
if ($[12] !== t6) {
|
|
2189
|
+
t7 = /* @__PURE__ */ jsx(Typography, {
|
|
2190
|
+
variant: "body2",
|
|
2191
|
+
color: "text.secondary",
|
|
2192
|
+
children: t6
|
|
2193
|
+
});
|
|
2194
|
+
$[12] = t6;
|
|
2195
|
+
$[13] = t7;
|
|
2196
|
+
} else t7 = $[13];
|
|
2197
|
+
return t7;
|
|
2198
|
+
}
|
|
2199
|
+
if (operator === "inRange") {
|
|
2200
|
+
let T0;
|
|
2201
|
+
let T1;
|
|
2202
|
+
let from;
|
|
2203
|
+
let isDate;
|
|
2204
|
+
let t10;
|
|
2205
|
+
let t11;
|
|
2206
|
+
let t6;
|
|
2207
|
+
let t7;
|
|
2208
|
+
let t8;
|
|
2209
|
+
let t9;
|
|
2210
|
+
let to;
|
|
2211
|
+
if ($[14] !== shared || $[15] !== t || $[16] !== value || $[17] !== variant) {
|
|
2212
|
+
[from, to] = pair(value);
|
|
2213
|
+
isDate = variant === "date";
|
|
2214
|
+
T1 = Stack;
|
|
2215
|
+
t10 = "row";
|
|
2216
|
+
t11 = 1;
|
|
2217
|
+
T0 = TextField;
|
|
2218
|
+
t6 = shared;
|
|
2219
|
+
t7 = isDate ? "date" : "number";
|
|
2220
|
+
if ($[29] !== t) {
|
|
2221
|
+
t8 = t("Layout.Table.From");
|
|
2222
|
+
$[29] = t;
|
|
2223
|
+
$[30] = t8;
|
|
2224
|
+
} else t8 = $[30];
|
|
2225
|
+
t9 = isDate ? toDateInputValue(from) : from ?? "";
|
|
2226
|
+
$[14] = shared;
|
|
2227
|
+
$[15] = t;
|
|
2228
|
+
$[16] = value;
|
|
2229
|
+
$[17] = variant;
|
|
2230
|
+
$[18] = T0;
|
|
2231
|
+
$[19] = T1;
|
|
2232
|
+
$[20] = from;
|
|
2233
|
+
$[21] = isDate;
|
|
2234
|
+
$[22] = t10;
|
|
2235
|
+
$[23] = t11;
|
|
2236
|
+
$[24] = t6;
|
|
2237
|
+
$[25] = t7;
|
|
2238
|
+
$[26] = t8;
|
|
2239
|
+
$[27] = t9;
|
|
2240
|
+
$[28] = to;
|
|
2241
|
+
} else {
|
|
2242
|
+
T0 = $[18];
|
|
2243
|
+
T1 = $[19];
|
|
2244
|
+
from = $[20];
|
|
2245
|
+
isDate = $[21];
|
|
2246
|
+
t10 = $[22];
|
|
2247
|
+
t11 = $[23];
|
|
2248
|
+
t6 = $[24];
|
|
2249
|
+
t7 = $[25];
|
|
2250
|
+
t8 = $[26];
|
|
2251
|
+
t9 = $[27];
|
|
2252
|
+
to = $[28];
|
|
2253
|
+
}
|
|
2254
|
+
let t12;
|
|
2255
|
+
if ($[31] !== change || $[32] !== isDate || $[33] !== to) {
|
|
2256
|
+
t12 = (event) => change([isDate ? fromDateInputValue(event.target.value) : toNumber(event.target.value), to]);
|
|
2257
|
+
$[31] = change;
|
|
2258
|
+
$[32] = isDate;
|
|
2259
|
+
$[33] = to;
|
|
2260
|
+
$[34] = t12;
|
|
2261
|
+
} else t12 = $[34];
|
|
2262
|
+
let t13;
|
|
2263
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2264
|
+
t13 = { inputLabel: { shrink: true } };
|
|
2265
|
+
$[35] = t13;
|
|
2266
|
+
} else t13 = $[35];
|
|
2267
|
+
let t14;
|
|
2268
|
+
if ($[36] !== T0 || $[37] !== t12 || $[38] !== t6 || $[39] !== t7 || $[40] !== t8 || $[41] !== t9) {
|
|
2269
|
+
t14 = /* @__PURE__ */ jsx(T0, {
|
|
2270
|
+
...t6,
|
|
2271
|
+
type: t7,
|
|
2272
|
+
label: t8,
|
|
2273
|
+
value: t9,
|
|
2274
|
+
onChange: t12,
|
|
2275
|
+
slotProps: t13
|
|
2276
|
+
});
|
|
2277
|
+
$[36] = T0;
|
|
2278
|
+
$[37] = t12;
|
|
2279
|
+
$[38] = t6;
|
|
2280
|
+
$[39] = t7;
|
|
2281
|
+
$[40] = t8;
|
|
2282
|
+
$[41] = t9;
|
|
2283
|
+
$[42] = t14;
|
|
2284
|
+
} else t14 = $[42];
|
|
2285
|
+
const t15 = isDate ? "date" : "number";
|
|
2286
|
+
let t16;
|
|
2287
|
+
if ($[43] !== t) {
|
|
2288
|
+
t16 = t("Layout.Table.To");
|
|
2289
|
+
$[43] = t;
|
|
2290
|
+
$[44] = t16;
|
|
2291
|
+
} else t16 = $[44];
|
|
2292
|
+
let t17;
|
|
2293
|
+
if ($[45] !== isDate || $[46] !== to) {
|
|
2294
|
+
t17 = isDate ? toDateInputValue(to) : to ?? "";
|
|
2295
|
+
$[45] = isDate;
|
|
2296
|
+
$[46] = to;
|
|
2297
|
+
$[47] = t17;
|
|
2298
|
+
} else t17 = $[47];
|
|
2299
|
+
let t18;
|
|
2300
|
+
if ($[48] !== change || $[49] !== from || $[50] !== isDate) {
|
|
2301
|
+
t18 = (event_0) => change([from, isDate ? fromDateInputValue(event_0.target.value) : toNumber(event_0.target.value)]);
|
|
2302
|
+
$[48] = change;
|
|
2303
|
+
$[49] = from;
|
|
2304
|
+
$[50] = isDate;
|
|
2305
|
+
$[51] = t18;
|
|
2306
|
+
} else t18 = $[51];
|
|
2307
|
+
let t19;
|
|
2308
|
+
if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2309
|
+
t19 = { inputLabel: { shrink: true } };
|
|
2310
|
+
$[52] = t19;
|
|
2311
|
+
} else t19 = $[52];
|
|
2312
|
+
let t20;
|
|
2313
|
+
if ($[53] !== shared || $[54] !== t15 || $[55] !== t16 || $[56] !== t17 || $[57] !== t18) {
|
|
2314
|
+
t20 = /* @__PURE__ */ jsx(TextField, {
|
|
2315
|
+
...shared,
|
|
2316
|
+
type: t15,
|
|
2317
|
+
label: t16,
|
|
2318
|
+
value: t17,
|
|
2319
|
+
onChange: t18,
|
|
2320
|
+
slotProps: t19
|
|
2321
|
+
});
|
|
2322
|
+
$[53] = shared;
|
|
2323
|
+
$[54] = t15;
|
|
2324
|
+
$[55] = t16;
|
|
2325
|
+
$[56] = t17;
|
|
2326
|
+
$[57] = t18;
|
|
2327
|
+
$[58] = t20;
|
|
2328
|
+
} else t20 = $[58];
|
|
2329
|
+
let t21;
|
|
2330
|
+
if ($[59] !== T1 || $[60] !== t10 || $[61] !== t11 || $[62] !== t14 || $[63] !== t20) {
|
|
2331
|
+
t21 = /* @__PURE__ */ jsxs(T1, {
|
|
2332
|
+
direction: t10,
|
|
2333
|
+
spacing: t11,
|
|
2334
|
+
children: [t14, t20]
|
|
2335
|
+
});
|
|
2336
|
+
$[59] = T1;
|
|
2337
|
+
$[60] = t10;
|
|
2338
|
+
$[61] = t11;
|
|
2339
|
+
$[62] = t14;
|
|
2340
|
+
$[63] = t20;
|
|
2341
|
+
$[64] = t21;
|
|
2342
|
+
} else t21 = $[64];
|
|
2343
|
+
return t21;
|
|
2344
|
+
}
|
|
2345
|
+
if (operator === "isRelativeToToday") {
|
|
2346
|
+
let t6;
|
|
2347
|
+
if ($[65] !== t) {
|
|
2348
|
+
t6 = t("Layout.Table.DaysFromToday");
|
|
2349
|
+
$[65] = t;
|
|
2350
|
+
$[66] = t6;
|
|
2351
|
+
} else t6 = $[66];
|
|
2352
|
+
const t7 = value ?? "";
|
|
2353
|
+
let t8;
|
|
2354
|
+
if ($[67] !== change) {
|
|
2355
|
+
t8 = (event_1) => change(toNumber(event_1.target.value));
|
|
2356
|
+
$[67] = change;
|
|
2357
|
+
$[68] = t8;
|
|
2358
|
+
} else t8 = $[68];
|
|
2359
|
+
let t9;
|
|
2360
|
+
if ($[69] !== shared || $[70] !== t6 || $[71] !== t7 || $[72] !== t8) {
|
|
2361
|
+
t9 = /* @__PURE__ */ jsx(TextField, {
|
|
2362
|
+
...shared,
|
|
2363
|
+
type: "number",
|
|
2364
|
+
label: t6,
|
|
2365
|
+
value: t7,
|
|
2366
|
+
onChange: t8
|
|
2367
|
+
});
|
|
2368
|
+
$[69] = shared;
|
|
2369
|
+
$[70] = t6;
|
|
2370
|
+
$[71] = t7;
|
|
2371
|
+
$[72] = t8;
|
|
2372
|
+
$[73] = t9;
|
|
2373
|
+
} else t9 = $[73];
|
|
2374
|
+
return t9;
|
|
2375
|
+
}
|
|
2376
|
+
if (variant === "select" || variant === "multi-select") {
|
|
2377
|
+
let T0;
|
|
2378
|
+
let t10;
|
|
2379
|
+
let t11;
|
|
2380
|
+
let t6;
|
|
2381
|
+
let t7;
|
|
2382
|
+
let t8;
|
|
2383
|
+
let t9;
|
|
2384
|
+
if ($[74] !== column || $[75] !== value || $[76] !== variant) {
|
|
2385
|
+
const options = resolveOptions(column);
|
|
2386
|
+
const multiple = variant === "multi-select";
|
|
2387
|
+
let t12;
|
|
2388
|
+
if ($[84] !== value) {
|
|
2389
|
+
t12 = Array.isArray(value) ? value : [];
|
|
2390
|
+
$[84] = value;
|
|
2391
|
+
$[85] = t12;
|
|
2392
|
+
} else t12 = $[85];
|
|
2393
|
+
const selected = t12;
|
|
2394
|
+
T0 = Autocomplete;
|
|
2395
|
+
t6 = "small";
|
|
2396
|
+
t7 = true;
|
|
2397
|
+
t8 = multiple;
|
|
2398
|
+
t9 = options;
|
|
2399
|
+
t10 = multiple;
|
|
2400
|
+
t11 = multiple ? options.filter((option) => selected.includes(option.value)) : options.find((option_0) => option_0.value === value) ?? null;
|
|
2401
|
+
$[74] = column;
|
|
2402
|
+
$[75] = value;
|
|
2403
|
+
$[76] = variant;
|
|
2404
|
+
$[77] = T0;
|
|
2405
|
+
$[78] = t10;
|
|
2406
|
+
$[79] = t11;
|
|
2407
|
+
$[80] = t6;
|
|
2408
|
+
$[81] = t7;
|
|
2409
|
+
$[82] = t8;
|
|
2410
|
+
$[83] = t9;
|
|
2411
|
+
} else {
|
|
2412
|
+
T0 = $[77];
|
|
2413
|
+
t10 = $[78];
|
|
2414
|
+
t11 = $[79];
|
|
2415
|
+
t6 = $[80];
|
|
2416
|
+
t7 = $[81];
|
|
2417
|
+
t8 = $[82];
|
|
2418
|
+
t9 = $[83];
|
|
2419
|
+
}
|
|
2420
|
+
let t12;
|
|
2421
|
+
if ($[86] !== change) {
|
|
2422
|
+
t12 = (_, next_0) => change(Array.isArray(next_0) ? next_0.map(_temp3) : next_0?.value ?? void 0);
|
|
2423
|
+
$[86] = change;
|
|
2424
|
+
$[87] = t12;
|
|
2425
|
+
} else t12 = $[87];
|
|
2426
|
+
let t13;
|
|
2427
|
+
if ($[88] !== t) {
|
|
2428
|
+
t13 = (params) => /* @__PURE__ */ jsx(TextField, {
|
|
2429
|
+
...params,
|
|
2430
|
+
size: "small",
|
|
2431
|
+
label: t("Layout.Table.Value")
|
|
2432
|
+
});
|
|
2433
|
+
$[88] = t;
|
|
2434
|
+
$[89] = t13;
|
|
2435
|
+
} else t13 = $[89];
|
|
2436
|
+
let t14;
|
|
2437
|
+
if ($[90] !== T0 || $[91] !== t10 || $[92] !== t11 || $[93] !== t12 || $[94] !== t13 || $[95] !== t6 || $[96] !== t7 || $[97] !== t8 || $[98] !== t9) {
|
|
2438
|
+
t14 = /* @__PURE__ */ jsx(T0, {
|
|
2439
|
+
size: t6,
|
|
2440
|
+
fullWidth: t7,
|
|
2441
|
+
multiple: t8,
|
|
2442
|
+
options: t9,
|
|
2443
|
+
disableCloseOnSelect: t10,
|
|
2444
|
+
value: t11,
|
|
2445
|
+
isOptionEqualToValue: _temp$2,
|
|
2446
|
+
getOptionLabel: _temp2,
|
|
2447
|
+
onChange: t12,
|
|
2448
|
+
renderInput: t13
|
|
2449
|
+
});
|
|
2450
|
+
$[90] = T0;
|
|
2451
|
+
$[91] = t10;
|
|
2452
|
+
$[92] = t11;
|
|
2453
|
+
$[93] = t12;
|
|
2454
|
+
$[94] = t13;
|
|
2455
|
+
$[95] = t6;
|
|
2456
|
+
$[96] = t7;
|
|
2457
|
+
$[97] = t8;
|
|
2458
|
+
$[98] = t9;
|
|
2459
|
+
$[99] = t14;
|
|
2460
|
+
} else t14 = $[99];
|
|
2461
|
+
return t14;
|
|
2462
|
+
}
|
|
2463
|
+
if (variant === "boolean") {
|
|
2464
|
+
const t6 = typeof value === "boolean" ? String(value) : "";
|
|
2465
|
+
let t7;
|
|
2466
|
+
if ($[100] !== change) {
|
|
2467
|
+
t7 = (event_2) => change(event_2.target.value === "" ? void 0 : event_2.target.value === "true");
|
|
2468
|
+
$[100] = change;
|
|
2469
|
+
$[101] = t7;
|
|
2470
|
+
} else t7 = $[101];
|
|
2471
|
+
let t10;
|
|
2472
|
+
let t8;
|
|
2473
|
+
let t9;
|
|
2474
|
+
if ($[102] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2475
|
+
t8 = /* @__PURE__ */ jsx(MenuItem, {
|
|
2476
|
+
value: "",
|
|
2477
|
+
children: "—"
|
|
2478
|
+
});
|
|
2479
|
+
t9 = /* @__PURE__ */ jsx(MenuItem, {
|
|
2480
|
+
value: "true",
|
|
2481
|
+
children: "✓"
|
|
2482
|
+
});
|
|
2483
|
+
t10 = /* @__PURE__ */ jsx(MenuItem, {
|
|
2484
|
+
value: "false",
|
|
2485
|
+
children: "✗"
|
|
2486
|
+
});
|
|
2487
|
+
$[102] = t10;
|
|
2488
|
+
$[103] = t8;
|
|
2489
|
+
$[104] = t9;
|
|
2490
|
+
} else {
|
|
2491
|
+
t10 = $[102];
|
|
2492
|
+
t8 = $[103];
|
|
2493
|
+
t9 = $[104];
|
|
2494
|
+
}
|
|
2495
|
+
let t11;
|
|
2496
|
+
if ($[105] !== shared || $[106] !== t6 || $[107] !== t7) {
|
|
2497
|
+
t11 = /* @__PURE__ */ jsxs(TextField, {
|
|
2498
|
+
...shared,
|
|
2499
|
+
select: true,
|
|
2500
|
+
value: t6,
|
|
2501
|
+
onChange: t7,
|
|
2502
|
+
children: [
|
|
2503
|
+
t8,
|
|
2504
|
+
t9,
|
|
2505
|
+
t10
|
|
2506
|
+
]
|
|
2507
|
+
});
|
|
2508
|
+
$[105] = shared;
|
|
2509
|
+
$[106] = t6;
|
|
2510
|
+
$[107] = t7;
|
|
2511
|
+
$[108] = t11;
|
|
2512
|
+
} else t11 = $[108];
|
|
2513
|
+
return t11;
|
|
2514
|
+
}
|
|
2515
|
+
if (variant === "date") {
|
|
2516
|
+
let t6;
|
|
2517
|
+
if ($[109] !== value) {
|
|
2518
|
+
t6 = toDateInputValue(value);
|
|
2519
|
+
$[109] = value;
|
|
2520
|
+
$[110] = t6;
|
|
2521
|
+
} else t6 = $[110];
|
|
2522
|
+
let t7;
|
|
2523
|
+
if ($[111] !== change) {
|
|
2524
|
+
t7 = (event_3) => change(fromDateInputValue(event_3.target.value) ?? "");
|
|
2525
|
+
$[111] = change;
|
|
2526
|
+
$[112] = t7;
|
|
2527
|
+
} else t7 = $[112];
|
|
2528
|
+
let t8;
|
|
2529
|
+
if ($[113] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2530
|
+
t8 = { inputLabel: { shrink: true } };
|
|
2531
|
+
$[113] = t8;
|
|
2532
|
+
} else t8 = $[113];
|
|
2533
|
+
let t9;
|
|
2534
|
+
if ($[114] !== shared || $[115] !== t6 || $[116] !== t7) {
|
|
2535
|
+
t9 = /* @__PURE__ */ jsx(TextField, {
|
|
2536
|
+
...shared,
|
|
2537
|
+
type: "date",
|
|
2538
|
+
value: t6,
|
|
2539
|
+
onChange: t7,
|
|
2540
|
+
slotProps: t8
|
|
2541
|
+
});
|
|
2542
|
+
$[114] = shared;
|
|
2543
|
+
$[115] = t6;
|
|
2544
|
+
$[116] = t7;
|
|
2545
|
+
$[117] = t9;
|
|
2546
|
+
} else t9 = $[117];
|
|
2547
|
+
return t9;
|
|
2548
|
+
}
|
|
2549
|
+
const t6 = variant === "number" ? "number" : "text";
|
|
2550
|
+
const t7 = value ?? "";
|
|
2551
|
+
let t8;
|
|
2552
|
+
if ($[118] !== change || $[119] !== variant) {
|
|
2553
|
+
t8 = (event_4) => change(variant === "number" ? toNumber(event_4.target.value) : event_4.target.value);
|
|
2554
|
+
$[118] = change;
|
|
2555
|
+
$[119] = variant;
|
|
2556
|
+
$[120] = t8;
|
|
2557
|
+
} else t8 = $[120];
|
|
2558
|
+
let t9;
|
|
2559
|
+
if ($[121] !== shared || $[122] !== t6 || $[123] !== t7 || $[124] !== t8) {
|
|
2560
|
+
t9 = /* @__PURE__ */ jsx(TextField, {
|
|
2561
|
+
...shared,
|
|
2562
|
+
type: t6,
|
|
2563
|
+
value: t7,
|
|
2564
|
+
onChange: t8
|
|
2565
|
+
});
|
|
2566
|
+
$[121] = shared;
|
|
2567
|
+
$[122] = t6;
|
|
2568
|
+
$[123] = t7;
|
|
2569
|
+
$[124] = t8;
|
|
2570
|
+
$[125] = t9;
|
|
2571
|
+
} else t9 = $[125];
|
|
2572
|
+
return t9;
|
|
2573
|
+
}
|
|
2574
|
+
function _temp3(option_3) {
|
|
2575
|
+
return option_3.value;
|
|
2576
|
+
}
|
|
2577
|
+
function _temp2(option_2) {
|
|
2578
|
+
return option_2.label;
|
|
2579
|
+
}
|
|
2580
|
+
function _temp$2(option_1, selectedOption) {
|
|
2581
|
+
return option_1.value === selectedOption.value;
|
|
2582
|
+
}
|
|
2583
|
+
//#endregion
|
|
2584
|
+
//#region src/components/table/table/FiltersMenu.tsx
|
|
2585
|
+
const DATE_OPERATOR_LABELS = {
|
|
2586
|
+
lessThan: "Layout.Table.Operators.Date.lessThan",
|
|
2587
|
+
lessThanOrEqualTo: "Layout.Table.Operators.Date.lessThanOrEqualTo",
|
|
2588
|
+
greaterThan: "Layout.Table.Operators.Date.greaterThan",
|
|
2589
|
+
greaterThanOrEqualTo: "Layout.Table.Operators.Date.greaterThanOrEqualTo"
|
|
2590
|
+
};
|
|
2591
|
+
/** Slot widths taken from the MUI X `GridFilterForm` inputs. */
|
|
2592
|
+
const LOGIC_WIDTH = 75;
|
|
2593
|
+
const FIELD_WIDTH = 150;
|
|
2594
|
+
const VALUE_WIDTH = 190;
|
|
2595
|
+
const FiltersMenu = () => {
|
|
2596
|
+
const table = useTableContext();
|
|
2597
|
+
const { t } = useTranslation$1();
|
|
2598
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
2599
|
+
const placeholder = useRef(null);
|
|
2600
|
+
const buttonRef = useRef(null);
|
|
2601
|
+
const filterableColumns = table.getAllLeafColumns().filter((column) => column.getCanFilter());
|
|
2602
|
+
const close = () => {
|
|
2603
|
+
setAnchorEl(null);
|
|
2604
|
+
placeholder.current = null;
|
|
2605
|
+
};
|
|
2606
|
+
useHotkey("Control+F", () => anchorEl ? close() : setAnchorEl(buttonRef.current), { enabled: filterableColumns.length > 0 });
|
|
2607
|
+
if (!filterableColumns.length) return null;
|
|
2608
|
+
const setFilters = (filters) => table.setColumnFilters(filters);
|
|
2609
|
+
const newFilter = (column_0, joinOperator = "and") => ({
|
|
2610
|
+
id: column_0.id,
|
|
2611
|
+
filterId: crypto.randomUUID(),
|
|
2612
|
+
value: "",
|
|
2613
|
+
operator: getFilterOperators(column_0.columnDef.meta?.variant ?? "text")[0],
|
|
2614
|
+
joinOperator
|
|
2615
|
+
});
|
|
2616
|
+
return /* @__PURE__ */ jsx(Subscribe, {
|
|
2617
|
+
source: table.atoms.columnFilters,
|
|
2618
|
+
selector: (filters_0) => filters_0,
|
|
2619
|
+
children: (columnFilters) => {
|
|
2620
|
+
if (!columnFilters.length) placeholder.current ??= newFilter(filterableColumns[0]);
|
|
2621
|
+
const rows = columnFilters.length ? columnFilters : placeholder.current ? [placeholder.current] : [];
|
|
2622
|
+
const activeCount = columnFilters.filter(isFilterActive).length;
|
|
2623
|
+
const update = (filterId, patch) => setFilters(rows.map((filter) => filter.filterId === filterId ? {
|
|
2624
|
+
...filter,
|
|
2625
|
+
...patch,
|
|
2626
|
+
..."value" in patch && { value: patch.value ?? "" }
|
|
2627
|
+
} : filter));
|
|
2628
|
+
const remove = (filterId_0) => {
|
|
2629
|
+
const next = rows.filter((filter_0) => filter_0.filterId !== filterId_0);
|
|
2630
|
+
placeholder.current = null;
|
|
2631
|
+
setFilters(next);
|
|
2632
|
+
if (!next.length) close();
|
|
2633
|
+
};
|
|
2634
|
+
const add = () => setFilters([...rows, newFilter(filterableColumns[0], rows[0]?.joinOperator ?? "and")]);
|
|
2635
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Tooltip, {
|
|
2636
|
+
title: shortcutLabel(t("Layout.Table.Filters"), "Control+F"),
|
|
2637
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
2638
|
+
ref: buttonRef,
|
|
2639
|
+
size: "small",
|
|
2640
|
+
color: activeCount ? "primary" : "default",
|
|
2641
|
+
onClick: (event) => setAnchorEl(event.currentTarget),
|
|
2642
|
+
children: /* @__PURE__ */ jsx(Badge, {
|
|
2643
|
+
badgeContent: activeCount,
|
|
2644
|
+
color: "primary",
|
|
2645
|
+
variant: "dot",
|
|
2646
|
+
children: /* @__PURE__ */ jsx(FilterList, { fontSize: "small" })
|
|
2647
|
+
})
|
|
2648
|
+
})
|
|
2649
|
+
}), /* @__PURE__ */ jsxs(Popover, {
|
|
2650
|
+
anchorEl,
|
|
2651
|
+
open: !!anchorEl,
|
|
2652
|
+
onClose: close,
|
|
2653
|
+
anchorOrigin: {
|
|
2654
|
+
vertical: "bottom",
|
|
2655
|
+
horizontal: "right"
|
|
2656
|
+
},
|
|
2657
|
+
transformOrigin: {
|
|
2658
|
+
vertical: "top",
|
|
2659
|
+
horizontal: "right"
|
|
2660
|
+
},
|
|
2661
|
+
slotProps: { paper: { sx: { maxWidth: "calc(100vw - 16px)" } } },
|
|
2662
|
+
children: [/* @__PURE__ */ jsx(Box, {
|
|
2663
|
+
sx: {
|
|
2664
|
+
display: "flex",
|
|
2665
|
+
flexDirection: "column",
|
|
2666
|
+
gap: 2.5,
|
|
2667
|
+
p: "20px 12px 16px 8px",
|
|
2668
|
+
maxHeight: 400,
|
|
2669
|
+
overflow: "auto"
|
|
2670
|
+
},
|
|
2671
|
+
children: rows.map((filter_1, index) => {
|
|
2672
|
+
const column_1 = table.getColumn(filter_1.id);
|
|
2673
|
+
if (!column_1 || !filter_1.filterId) return null;
|
|
2674
|
+
const variant = column_1.columnDef.meta?.variant ?? "text";
|
|
2675
|
+
const operators = getFilterOperators(variant);
|
|
2676
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
2677
|
+
sx: {
|
|
2678
|
+
display: "flex",
|
|
2679
|
+
alignItems: "center",
|
|
2680
|
+
gap: 1.5
|
|
2681
|
+
},
|
|
2682
|
+
children: [
|
|
2683
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
2684
|
+
size: "small",
|
|
2685
|
+
"aria-label": t("Layout.Table.RemoveFilter"),
|
|
2686
|
+
sx: { flexShrink: 0 },
|
|
2687
|
+
onClick: () => remove(filter_1.filterId),
|
|
2688
|
+
children: /* @__PURE__ */ jsx(Close, { fontSize: "small" })
|
|
2689
|
+
}),
|
|
2690
|
+
/* @__PURE__ */ jsx(FormControl, {
|
|
2691
|
+
size: "small",
|
|
2692
|
+
sx: {
|
|
2693
|
+
width: LOGIC_WIDTH,
|
|
2694
|
+
flexShrink: 0,
|
|
2695
|
+
visibility: index === 0 ? "hidden" : "visible"
|
|
2696
|
+
},
|
|
2697
|
+
children: /* @__PURE__ */ jsxs(Select, {
|
|
2698
|
+
disabled: index > 1,
|
|
2699
|
+
value: filter_1.joinOperator ?? "and",
|
|
2700
|
+
inputProps: { "aria-label": t("Layout.Table.Operator") },
|
|
2701
|
+
onChange: (event_0) => setFilters(rows.map((item) => ({
|
|
2702
|
+
...item,
|
|
2703
|
+
joinOperator: event_0.target.value
|
|
2704
|
+
}))),
|
|
2705
|
+
children: [/* @__PURE__ */ jsx(MenuItem, {
|
|
2706
|
+
value: "and",
|
|
2707
|
+
children: t("Layout.Table.And")
|
|
2708
|
+
}), /* @__PURE__ */ jsx(MenuItem, {
|
|
2709
|
+
value: "or",
|
|
2710
|
+
children: t("Layout.Table.Or")
|
|
2711
|
+
})]
|
|
2712
|
+
})
|
|
2713
|
+
}),
|
|
2714
|
+
/* @__PURE__ */ jsx(Autocomplete, {
|
|
2715
|
+
size: "small",
|
|
2716
|
+
sx: {
|
|
2717
|
+
width: FIELD_WIDTH,
|
|
2718
|
+
flexShrink: 0
|
|
2719
|
+
},
|
|
2720
|
+
disableClearable: true,
|
|
2721
|
+
options: filterableColumns,
|
|
2722
|
+
value: column_1,
|
|
2723
|
+
isOptionEqualToValue: (option, selected) => option.id === selected.id,
|
|
2724
|
+
getOptionLabel: (option_0) => columnLabel(option_0),
|
|
2725
|
+
onChange: (_, next_0) => update(filter_1.filterId, {
|
|
2726
|
+
id: next_0.id,
|
|
2727
|
+
operator: getFilterOperators(next_0.columnDef.meta?.variant ?? "text")[0],
|
|
2728
|
+
value: ""
|
|
2729
|
+
}),
|
|
2730
|
+
renderInput: (params) => /* @__PURE__ */ jsx(TextField, {
|
|
2731
|
+
...params,
|
|
2732
|
+
size: "small",
|
|
2733
|
+
label: t("Layout.Table.Field")
|
|
2734
|
+
})
|
|
2735
|
+
}),
|
|
2736
|
+
/* @__PURE__ */ jsxs(FormControl, {
|
|
2737
|
+
size: "small",
|
|
2738
|
+
sx: {
|
|
2739
|
+
width: FIELD_WIDTH,
|
|
2740
|
+
flexShrink: 0
|
|
2741
|
+
},
|
|
2742
|
+
children: [/* @__PURE__ */ jsx(InputLabel, { children: t("Layout.Table.Operator") }), /* @__PURE__ */ jsx(Select, {
|
|
2743
|
+
label: t("Layout.Table.Operator"),
|
|
2744
|
+
value: filter_1.operator ?? operators[0],
|
|
2745
|
+
onChange: (event_1) => update(filter_1.filterId, {
|
|
2746
|
+
operator: event_1.target.value,
|
|
2747
|
+
value: ""
|
|
2748
|
+
}),
|
|
2749
|
+
children: operators.map((operator) => /* @__PURE__ */ jsx(MenuItem, {
|
|
2750
|
+
value: operator,
|
|
2751
|
+
children: variant === "date" && operator in DATE_OPERATOR_LABELS ? t(DATE_OPERATOR_LABELS[operator]) : t(`Layout.Table.Operators.${operator}`)
|
|
2752
|
+
}, operator))
|
|
2753
|
+
})]
|
|
2754
|
+
}),
|
|
2755
|
+
/* @__PURE__ */ jsx(Box, {
|
|
2756
|
+
sx: {
|
|
2757
|
+
width: VALUE_WIDTH,
|
|
2758
|
+
flexGrow: 1
|
|
2759
|
+
},
|
|
2760
|
+
children: /* @__PURE__ */ jsx(ColumnFilterField, {
|
|
2761
|
+
column: column_1,
|
|
2762
|
+
filter: filter_1,
|
|
2763
|
+
onChange: (value) => update(filter_1.filterId, { value })
|
|
2764
|
+
}, `${column_1.id}:${filter_1.operator}`)
|
|
2765
|
+
})
|
|
2766
|
+
]
|
|
2767
|
+
}, filter_1.filterId);
|
|
2768
|
+
})
|
|
2769
|
+
}), /* @__PURE__ */ jsxs(Box, {
|
|
2770
|
+
sx: {
|
|
2771
|
+
display: "flex",
|
|
2772
|
+
justifyContent: "space-between",
|
|
2773
|
+
gap: 1,
|
|
2774
|
+
p: 1,
|
|
2775
|
+
borderTop: 1,
|
|
2776
|
+
borderColor: "divider"
|
|
2777
|
+
},
|
|
2778
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
2779
|
+
size: "small",
|
|
2780
|
+
startIcon: /* @__PURE__ */ jsx(Add, {}),
|
|
2781
|
+
onClick: add,
|
|
2782
|
+
children: t("Layout.Table.AddFilter")
|
|
2783
|
+
}), columnFilters.length > 0 && /* @__PURE__ */ jsx(Button, {
|
|
2784
|
+
size: "small",
|
|
2785
|
+
color: "inherit",
|
|
2786
|
+
startIcon: /* @__PURE__ */ jsx(DeleteForever, {}),
|
|
2787
|
+
onClick: () => {
|
|
2788
|
+
placeholder.current = null;
|
|
2789
|
+
table.resetColumnFilters(true);
|
|
2790
|
+
},
|
|
2791
|
+
children: t("Layout.Table.ClearFilters")
|
|
2792
|
+
})]
|
|
2793
|
+
})]
|
|
2794
|
+
})] });
|
|
2795
|
+
}
|
|
2796
|
+
});
|
|
2797
|
+
};
|
|
2798
|
+
//#endregion
|
|
2799
|
+
//#region src/components/table/table/GlobalFilter.tsx
|
|
2800
|
+
const GlobalFilter = (t0) => {
|
|
2801
|
+
const $ = c(57);
|
|
2802
|
+
if ($[0] !== "fcd35c65e16f19ec02f235915ea90785448df1eaba0e2e257556e7ecf39f564f") {
|
|
2803
|
+
for (let $i = 0; $i < 57; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
2804
|
+
$[0] = "fcd35c65e16f19ec02f235915ea90785448df1eaba0e2e257556e7ecf39f564f";
|
|
2805
|
+
}
|
|
2806
|
+
const { defaultExpanded, debounce: t1 } = t0;
|
|
2807
|
+
const debounce = t1 === void 0 ? 300 : t1;
|
|
2808
|
+
const table = useTableContext();
|
|
2809
|
+
const { t } = useTranslation$1();
|
|
2810
|
+
const theme = useTheme();
|
|
2811
|
+
const inputRef = useRef(null);
|
|
2812
|
+
const [value, setValue] = useState(table.state.globalFilter ?? "");
|
|
2813
|
+
const [expanded, setExpanded] = useState(!!defaultExpanded);
|
|
2814
|
+
let t2;
|
|
2815
|
+
let t3;
|
|
2816
|
+
if ($[1] !== debounce || $[2] !== table || $[3] !== value) {
|
|
2817
|
+
t2 = () => {
|
|
2818
|
+
const id = setTimeout(() => table.setGlobalFilter(value), debounce);
|
|
2819
|
+
return () => clearTimeout(id);
|
|
2820
|
+
};
|
|
2821
|
+
t3 = [
|
|
2822
|
+
value,
|
|
2823
|
+
debounce,
|
|
2824
|
+
table
|
|
2825
|
+
];
|
|
2826
|
+
$[1] = debounce;
|
|
2827
|
+
$[2] = table;
|
|
2828
|
+
$[3] = value;
|
|
2829
|
+
$[4] = t2;
|
|
2830
|
+
$[5] = t3;
|
|
2831
|
+
} else {
|
|
2832
|
+
t2 = $[4];
|
|
2833
|
+
t3 = $[5];
|
|
2834
|
+
}
|
|
2835
|
+
useEffect(t2, t3);
|
|
2836
|
+
let t4;
|
|
2837
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2838
|
+
t4 = () => {
|
|
2839
|
+
setValue("");
|
|
2840
|
+
setExpanded(false);
|
|
2841
|
+
};
|
|
2842
|
+
$[6] = t4;
|
|
2843
|
+
} else t4 = $[6];
|
|
2844
|
+
const collapse = t4;
|
|
2845
|
+
let t5;
|
|
2846
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2847
|
+
t5 = () => {
|
|
2848
|
+
setExpanded(true);
|
|
2849
|
+
inputRef.current?.focus();
|
|
2850
|
+
};
|
|
2851
|
+
$[7] = t5;
|
|
2852
|
+
} else t5 = $[7];
|
|
2853
|
+
const expand = t5;
|
|
2854
|
+
useHotkey("Control+Q", expand);
|
|
2855
|
+
let t6;
|
|
2856
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2857
|
+
t6 = {
|
|
2858
|
+
display: "grid",
|
|
2859
|
+
alignItems: "center"
|
|
2860
|
+
};
|
|
2861
|
+
$[8] = t6;
|
|
2862
|
+
} else t6 = $[8];
|
|
2863
|
+
let t7;
|
|
2864
|
+
if ($[9] !== t) {
|
|
2865
|
+
t7 = shortcutLabel(t("Layout.Table.Search"), "Control+Q");
|
|
2866
|
+
$[9] = t;
|
|
2867
|
+
$[10] = t7;
|
|
2868
|
+
} else t7 = $[10];
|
|
2869
|
+
let t8;
|
|
2870
|
+
if ($[11] !== t) {
|
|
2871
|
+
t8 = t("Layout.Table.Search");
|
|
2872
|
+
$[11] = t;
|
|
2873
|
+
$[12] = t8;
|
|
2874
|
+
} else t8 = $[12];
|
|
2875
|
+
const t9 = expanded ? 0 : 1;
|
|
2876
|
+
const t10 = expanded ? "none" : "auto";
|
|
2877
|
+
let t11;
|
|
2878
|
+
if ($[13] !== theme.transitions) {
|
|
2879
|
+
t11 = theme.transitions.create(["opacity"]);
|
|
2880
|
+
$[13] = theme.transitions;
|
|
2881
|
+
$[14] = t11;
|
|
2882
|
+
} else t11 = $[14];
|
|
2883
|
+
let t12;
|
|
2884
|
+
if ($[15] !== t10 || $[16] !== t11 || $[17] !== t9) {
|
|
2885
|
+
t12 = {
|
|
2886
|
+
gridArea: "1 / 1",
|
|
2887
|
+
width: "min-content",
|
|
2888
|
+
height: "min-content",
|
|
2889
|
+
zIndex: 1,
|
|
2890
|
+
opacity: t9,
|
|
2891
|
+
pointerEvents: t10,
|
|
2892
|
+
transition: t11
|
|
2893
|
+
};
|
|
2894
|
+
$[15] = t10;
|
|
2895
|
+
$[16] = t11;
|
|
2896
|
+
$[17] = t9;
|
|
2897
|
+
$[18] = t12;
|
|
2898
|
+
} else t12 = $[18];
|
|
2899
|
+
let t13;
|
|
2900
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2901
|
+
t13 = /* @__PURE__ */ jsx(Search, { fontSize: "small" });
|
|
2902
|
+
$[19] = t13;
|
|
2903
|
+
} else t13 = $[19];
|
|
2904
|
+
let t14;
|
|
2905
|
+
if ($[20] !== expanded || $[21] !== t12 || $[22] !== t8) {
|
|
2906
|
+
t14 = /* @__PURE__ */ jsx(IconButton, {
|
|
2907
|
+
size: "small",
|
|
2908
|
+
"aria-label": t8,
|
|
2909
|
+
"aria-disabled": expanded,
|
|
2910
|
+
onClick: expand,
|
|
2911
|
+
sx: t12,
|
|
2912
|
+
children: t13
|
|
2913
|
+
});
|
|
2914
|
+
$[20] = expanded;
|
|
2915
|
+
$[21] = t12;
|
|
2916
|
+
$[22] = t8;
|
|
2917
|
+
$[23] = t14;
|
|
2918
|
+
} else t14 = $[23];
|
|
2919
|
+
let t15;
|
|
2920
|
+
if ($[24] !== t14 || $[25] !== t7) {
|
|
2921
|
+
t15 = /* @__PURE__ */ jsx(Tooltip, {
|
|
2922
|
+
title: t7,
|
|
2923
|
+
children: t14
|
|
2924
|
+
});
|
|
2925
|
+
$[24] = t14;
|
|
2926
|
+
$[25] = t7;
|
|
2927
|
+
$[26] = t15;
|
|
2928
|
+
} else t15 = $[26];
|
|
2929
|
+
let t16;
|
|
2930
|
+
if ($[27] !== t) {
|
|
2931
|
+
t16 = t("Layout.Table.Search");
|
|
2932
|
+
$[27] = t;
|
|
2933
|
+
$[28] = t16;
|
|
2934
|
+
} else t16 = $[28];
|
|
2935
|
+
let t17;
|
|
2936
|
+
let t18;
|
|
2937
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2938
|
+
t17 = (event) => setValue(event.target.value);
|
|
2939
|
+
t18 = (event_0) => event_0.key === "Escape" && collapse();
|
|
2940
|
+
$[29] = t17;
|
|
2941
|
+
$[30] = t18;
|
|
2942
|
+
} else {
|
|
2943
|
+
t17 = $[29];
|
|
2944
|
+
t18 = $[30];
|
|
2945
|
+
}
|
|
2946
|
+
let t19;
|
|
2947
|
+
if ($[31] !== defaultExpanded || $[32] !== value) {
|
|
2948
|
+
t19 = () => !value && !defaultExpanded && setExpanded(false);
|
|
2949
|
+
$[31] = defaultExpanded;
|
|
2950
|
+
$[32] = value;
|
|
2951
|
+
$[33] = t19;
|
|
2952
|
+
} else t19 = $[33];
|
|
2953
|
+
const t20 = expanded ? 260 : 40;
|
|
2954
|
+
const t21 = expanded ? 1 : 0;
|
|
2955
|
+
const t22 = expanded ? "auto" : "none";
|
|
2956
|
+
let t23;
|
|
2957
|
+
if ($[34] !== theme.transitions) {
|
|
2958
|
+
t23 = theme.transitions.create(["width", "opacity"]);
|
|
2959
|
+
$[34] = theme.transitions;
|
|
2960
|
+
$[35] = t23;
|
|
2961
|
+
} else t23 = $[35];
|
|
2962
|
+
let t24;
|
|
2963
|
+
if ($[36] !== t20 || $[37] !== t21 || $[38] !== t22 || $[39] !== t23) {
|
|
2964
|
+
t24 = {
|
|
2965
|
+
gridArea: "1 / 1",
|
|
2966
|
+
overflowX: "clip",
|
|
2967
|
+
width: t20,
|
|
2968
|
+
opacity: t21,
|
|
2969
|
+
pointerEvents: t22,
|
|
2970
|
+
transition: t23
|
|
2971
|
+
};
|
|
2972
|
+
$[36] = t20;
|
|
2973
|
+
$[37] = t21;
|
|
2974
|
+
$[38] = t22;
|
|
2975
|
+
$[39] = t23;
|
|
2976
|
+
$[40] = t24;
|
|
2977
|
+
} else t24 = $[40];
|
|
2978
|
+
let t25;
|
|
2979
|
+
if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2980
|
+
t25 = /* @__PURE__ */ jsx(InputAdornment, {
|
|
2981
|
+
position: "start",
|
|
2982
|
+
children: /* @__PURE__ */ jsx(Search, { fontSize: "small" })
|
|
2983
|
+
});
|
|
2984
|
+
$[41] = t25;
|
|
2985
|
+
} else t25 = $[41];
|
|
2986
|
+
let t26;
|
|
2987
|
+
if ($[42] !== t) {
|
|
2988
|
+
t26 = t("Layout.Table.ClearSearch");
|
|
2989
|
+
$[42] = t;
|
|
2990
|
+
$[43] = t26;
|
|
2991
|
+
} else t26 = $[43];
|
|
2992
|
+
let t27;
|
|
2993
|
+
let t28;
|
|
2994
|
+
if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2995
|
+
t27 = { mr: -.75 };
|
|
2996
|
+
t28 = /* @__PURE__ */ jsx(Close, { fontSize: "small" });
|
|
2997
|
+
$[44] = t27;
|
|
2998
|
+
$[45] = t28;
|
|
2999
|
+
} else {
|
|
3000
|
+
t27 = $[44];
|
|
3001
|
+
t28 = $[45];
|
|
3002
|
+
}
|
|
3003
|
+
let t29;
|
|
3004
|
+
if ($[46] !== t26) {
|
|
3005
|
+
t29 = { input: {
|
|
3006
|
+
startAdornment: t25,
|
|
3007
|
+
endAdornment: /* @__PURE__ */ jsx(InputAdornment, {
|
|
3008
|
+
position: "end",
|
|
3009
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
3010
|
+
edge: "end",
|
|
3011
|
+
size: "small",
|
|
3012
|
+
"aria-label": t26,
|
|
3013
|
+
onClick: collapse,
|
|
3014
|
+
sx: t27,
|
|
3015
|
+
children: t28
|
|
3016
|
+
})
|
|
3017
|
+
})
|
|
3018
|
+
} };
|
|
3019
|
+
$[46] = t26;
|
|
3020
|
+
$[47] = t29;
|
|
3021
|
+
} else t29 = $[47];
|
|
3022
|
+
let t30;
|
|
3023
|
+
if ($[48] !== t16 || $[49] !== t19 || $[50] !== t24 || $[51] !== t29 || $[52] !== value) {
|
|
3024
|
+
t30 = /* @__PURE__ */ jsx(TextField, {
|
|
3025
|
+
inputRef,
|
|
3026
|
+
size: "small",
|
|
3027
|
+
value,
|
|
3028
|
+
placeholder: t16,
|
|
3029
|
+
onChange: t17,
|
|
3030
|
+
onKeyDown: t18,
|
|
3031
|
+
onBlur: t19,
|
|
3032
|
+
sx: t24,
|
|
3033
|
+
slotProps: t29
|
|
3034
|
+
});
|
|
3035
|
+
$[48] = t16;
|
|
3036
|
+
$[49] = t19;
|
|
3037
|
+
$[50] = t24;
|
|
3038
|
+
$[51] = t29;
|
|
3039
|
+
$[52] = value;
|
|
3040
|
+
$[53] = t30;
|
|
3041
|
+
} else t30 = $[53];
|
|
3042
|
+
let t31;
|
|
3043
|
+
if ($[54] !== t15 || $[55] !== t30) {
|
|
3044
|
+
t31 = /* @__PURE__ */ jsxs(Box, {
|
|
3045
|
+
sx: t6,
|
|
3046
|
+
children: [t15, t30]
|
|
3047
|
+
});
|
|
3048
|
+
$[54] = t15;
|
|
3049
|
+
$[55] = t30;
|
|
3050
|
+
$[56] = t31;
|
|
3051
|
+
} else t31 = $[56];
|
|
3052
|
+
return t31;
|
|
3053
|
+
};
|
|
3054
|
+
//#endregion
|
|
3055
|
+
//#region src/components/table/table/Pagination.tsx
|
|
3056
|
+
const ALL = -1;
|
|
3057
|
+
const Pagination = (t0) => {
|
|
3058
|
+
const $ = c(16);
|
|
3059
|
+
if ($[0] !== "35f3e006007ae0e4ccbdd3e2e09ae9cbd9d16c7804126e9f3e24a96c2298d387") {
|
|
3060
|
+
for (let $i = 0; $i < 16; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
3061
|
+
$[0] = "35f3e006007ae0e4ccbdd3e2e09ae9cbd9d16c7804126e9f3e24a96c2298d387";
|
|
3062
|
+
}
|
|
3063
|
+
const { pageSizeOptions: t1, ...props } = t0;
|
|
3064
|
+
const pageSizeOptions = t1 === void 0 ? [
|
|
3065
|
+
10,
|
|
3066
|
+
25,
|
|
3067
|
+
50,
|
|
3068
|
+
100
|
|
3069
|
+
] : t1;
|
|
3070
|
+
const table = useTableContext();
|
|
3071
|
+
const { t } = useTranslation$1();
|
|
3072
|
+
const { pageIndex, pageSize } = table.state.pagination;
|
|
3073
|
+
const sizes = Number.isFinite(pageSize) && !pageSizeOptions.includes(pageSize) ? [...pageSizeOptions, pageSize].sort(_temp$1) : pageSizeOptions;
|
|
3074
|
+
let t2;
|
|
3075
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3076
|
+
t2 = {
|
|
3077
|
+
flexShrink: 0,
|
|
3078
|
+
minHeight: 52,
|
|
3079
|
+
borderTop: 1,
|
|
3080
|
+
borderColor: "divider"
|
|
3081
|
+
};
|
|
3082
|
+
$[1] = t2;
|
|
3083
|
+
} else t2 = $[1];
|
|
3084
|
+
let t3;
|
|
3085
|
+
if ($[2] !== t) {
|
|
3086
|
+
t3 = t("Layout.Table.All");
|
|
3087
|
+
$[2] = t;
|
|
3088
|
+
$[3] = t3;
|
|
3089
|
+
} else t3 = $[3];
|
|
3090
|
+
let t4;
|
|
3091
|
+
if ($[4] !== t3) {
|
|
3092
|
+
t4 = {
|
|
3093
|
+
label: t3,
|
|
3094
|
+
value: ALL
|
|
3095
|
+
};
|
|
3096
|
+
$[4] = t3;
|
|
3097
|
+
$[5] = t4;
|
|
3098
|
+
} else t4 = $[5];
|
|
3099
|
+
let t5;
|
|
3100
|
+
if ($[6] !== sizes || $[7] !== t4) {
|
|
3101
|
+
t5 = [...sizes, t4];
|
|
3102
|
+
$[6] = sizes;
|
|
3103
|
+
$[7] = t4;
|
|
3104
|
+
$[8] = t5;
|
|
3105
|
+
} else t5 = $[8];
|
|
3106
|
+
let t6;
|
|
3107
|
+
if ($[9] !== table) {
|
|
3108
|
+
t6 = table.getRowCount();
|
|
3109
|
+
$[9] = table;
|
|
3110
|
+
$[10] = t6;
|
|
3111
|
+
} else t6 = $[10];
|
|
3112
|
+
let t7;
|
|
3113
|
+
if ($[11] !== pageSize) {
|
|
3114
|
+
t7 = Number.isFinite(pageSize) ? pageSize : ALL;
|
|
3115
|
+
$[11] = pageSize;
|
|
3116
|
+
$[12] = t7;
|
|
3117
|
+
} else t7 = $[12];
|
|
3118
|
+
let t8;
|
|
3119
|
+
let t9;
|
|
3120
|
+
if ($[13] !== table) {
|
|
3121
|
+
t8 = (_, page) => table.setPageIndex(page);
|
|
3122
|
+
t9 = (event) => {
|
|
3123
|
+
const next = Number(event.target.value);
|
|
3124
|
+
table.setPageSize(next === ALL ? Infinity : next);
|
|
3125
|
+
table.setPageIndex(0);
|
|
3126
|
+
};
|
|
3127
|
+
$[13] = table;
|
|
3128
|
+
$[14] = t8;
|
|
3129
|
+
$[15] = t9;
|
|
3130
|
+
} else {
|
|
3131
|
+
t8 = $[14];
|
|
3132
|
+
t9 = $[15];
|
|
3133
|
+
}
|
|
3134
|
+
return /* @__PURE__ */ jsx(TablePagination, {
|
|
3135
|
+
component: "div",
|
|
3136
|
+
showFirstButton: true,
|
|
3137
|
+
showLastButton: true,
|
|
3138
|
+
...props,
|
|
3139
|
+
sx: [t2, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
|
|
3140
|
+
rowsPerPageOptions: t5,
|
|
3141
|
+
count: t6,
|
|
3142
|
+
page: pageIndex,
|
|
3143
|
+
rowsPerPage: t7,
|
|
3144
|
+
onPageChange: t8,
|
|
3145
|
+
onRowsPerPageChange: t9
|
|
3146
|
+
});
|
|
3147
|
+
};
|
|
3148
|
+
function _temp$1(a, b) {
|
|
3149
|
+
return a - b;
|
|
3150
|
+
}
|
|
3151
|
+
//#endregion
|
|
3152
|
+
//#region src/components/table/table/Skeleton.tsx
|
|
3153
|
+
const Skeleton$1 = (t0) => {
|
|
3154
|
+
const $ = c(10);
|
|
3155
|
+
if ($[0] !== "00bef53ed4714d4f0462a8803449e9eebc94975bf5c6ef2c15a2dac40876f4db") {
|
|
3156
|
+
for (let $i = 0; $i < 10; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
3157
|
+
$[0] = "00bef53ed4714d4f0462a8803449e9eebc94975bf5c6ef2c15a2dac40876f4db";
|
|
3158
|
+
}
|
|
3159
|
+
const { rowHeight } = t0;
|
|
3160
|
+
const table = useTableContext();
|
|
3161
|
+
const firstRow = useRef(null);
|
|
3162
|
+
let t1;
|
|
3163
|
+
if ($[1] !== table.state.pagination.pageSize) {
|
|
3164
|
+
t1 = () => Math.min(table.state.pagination.pageSize, 20);
|
|
3165
|
+
$[1] = table.state.pagination.pageSize;
|
|
3166
|
+
$[2] = t1;
|
|
3167
|
+
} else t1 = $[2];
|
|
3168
|
+
const [rowCount, setRowCount] = useState(t1);
|
|
3169
|
+
let t2;
|
|
3170
|
+
let t3;
|
|
3171
|
+
if ($[3] !== rowHeight) {
|
|
3172
|
+
t2 = () => {
|
|
3173
|
+
const container = firstRow.current?.closest(".MuiTableContainer-root");
|
|
3174
|
+
if (!container) return;
|
|
3175
|
+
const measure = () => {
|
|
3176
|
+
const spent = ["thead", "tfoot"].reduce((total, selector) => total + (container.querySelector(selector)?.getBoundingClientRect().height ?? 0), 0);
|
|
3177
|
+
setRowCount(Math.max(1, Math.floor((container.clientHeight - spent) / rowHeight)));
|
|
3178
|
+
};
|
|
3179
|
+
measure();
|
|
3180
|
+
const observer = new ResizeObserver(measure);
|
|
3181
|
+
observer.observe(container);
|
|
3182
|
+
return () => observer.disconnect();
|
|
3183
|
+
};
|
|
3184
|
+
t3 = [rowHeight];
|
|
3185
|
+
$[3] = rowHeight;
|
|
3186
|
+
$[4] = t2;
|
|
3187
|
+
$[5] = t3;
|
|
3188
|
+
} else {
|
|
3189
|
+
t2 = $[4];
|
|
3190
|
+
t3 = $[5];
|
|
3191
|
+
}
|
|
3192
|
+
useEffect(t2, t3);
|
|
3193
|
+
let t4;
|
|
3194
|
+
if ($[6] !== rowCount || $[7] !== rowHeight || $[8] !== table) {
|
|
3195
|
+
t4 = /* @__PURE__ */ jsx(Fragment$1, { children: Array.from({ length: rowCount }, (_, index) => /* @__PURE__ */ jsxs(TableRow, {
|
|
3196
|
+
ref: index === 0 ? firstRow : void 0,
|
|
3197
|
+
sx: { height: rowHeight },
|
|
3198
|
+
children: [table.getVisibleLeafColumns().map(_temp), /* @__PURE__ */ jsx(TableCell, {
|
|
3199
|
+
"aria-hidden": true,
|
|
3200
|
+
sx: { p: 0 }
|
|
3201
|
+
})]
|
|
3202
|
+
}, index)) });
|
|
3203
|
+
$[6] = rowCount;
|
|
3204
|
+
$[7] = rowHeight;
|
|
3205
|
+
$[8] = table;
|
|
3206
|
+
$[9] = t4;
|
|
3207
|
+
} else t4 = $[9];
|
|
3208
|
+
return t4;
|
|
3209
|
+
};
|
|
3210
|
+
function _temp(column) {
|
|
3211
|
+
return hasColumnLabel(column) ? /* @__PURE__ */ jsx(TableCell, {
|
|
3212
|
+
sx: {
|
|
3213
|
+
py: 0,
|
|
3214
|
+
px: "10px"
|
|
3215
|
+
},
|
|
3216
|
+
children: /* @__PURE__ */ jsx(Skeleton, { variant: "text" })
|
|
3217
|
+
}, column.id) : /* @__PURE__ */ jsx(TableCell, {
|
|
3218
|
+
align: "center",
|
|
3219
|
+
sx: {
|
|
3220
|
+
px: .5,
|
|
3221
|
+
py: 0
|
|
3222
|
+
},
|
|
3223
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
3224
|
+
variant: "circular",
|
|
3225
|
+
width: 22,
|
|
3226
|
+
height: 22,
|
|
3227
|
+
sx: { mx: "auto" }
|
|
3228
|
+
})
|
|
3229
|
+
}, column.id);
|
|
3230
|
+
}
|
|
3231
|
+
//#endregion
|
|
3232
|
+
//#region src/components/table/table/Toolbar.tsx
|
|
3233
|
+
/** Vertical rule with the MUI X toolbar proportions: half height, 4px gutters. */
|
|
3234
|
+
const ToolbarDivider = () => {
|
|
3235
|
+
const $ = c(2);
|
|
3236
|
+
if ($[0] !== "f0b66427050989a7d55e85e65bda2cbd8971c5fb24eadc65102729994051490d") {
|
|
3237
|
+
for (let $i = 0; $i < 2; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
3238
|
+
$[0] = "f0b66427050989a7d55e85e65bda2cbd8971c5fb24eadc65102729994051490d";
|
|
3239
|
+
}
|
|
3240
|
+
let t0;
|
|
3241
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3242
|
+
t0 = /* @__PURE__ */ jsx(Divider, {
|
|
3243
|
+
orientation: "vertical",
|
|
3244
|
+
sx: {
|
|
3245
|
+
height: "50%",
|
|
3246
|
+
alignSelf: "center",
|
|
3247
|
+
mx: .5
|
|
3248
|
+
}
|
|
3249
|
+
});
|
|
3250
|
+
$[1] = t0;
|
|
3251
|
+
} else t0 = $[1];
|
|
3252
|
+
return t0;
|
|
3253
|
+
};
|
|
3254
|
+
const Toolbar$1 = (t0) => {
|
|
3255
|
+
const $ = c(29);
|
|
3256
|
+
if ($[0] !== "f0b66427050989a7d55e85e65bda2cbd8971c5fb24eadc65102729994051490d") {
|
|
3257
|
+
for (let $i = 0; $i < 29; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
3258
|
+
$[0] = "f0b66427050989a7d55e85e65bda2cbd8971c5fb24eadc65102729994051490d";
|
|
3259
|
+
}
|
|
3260
|
+
const { title, actions, disableColumnFilter, disableColumnSelector, disableSearch } = t0;
|
|
3261
|
+
const table = useTableContext();
|
|
3262
|
+
const { t } = useTranslation$1();
|
|
3263
|
+
let t1;
|
|
3264
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3265
|
+
t1 = {
|
|
3266
|
+
flexShrink: 0,
|
|
3267
|
+
display: "flex",
|
|
3268
|
+
alignItems: "center",
|
|
3269
|
+
justifyContent: "end",
|
|
3270
|
+
minHeight: 52,
|
|
3271
|
+
gap: .25,
|
|
3272
|
+
p: .75,
|
|
3273
|
+
boxSizing: "border-box",
|
|
3274
|
+
borderBottom: 1,
|
|
3275
|
+
borderColor: "divider"
|
|
3276
|
+
};
|
|
3277
|
+
$[1] = t1;
|
|
3278
|
+
} else t1 = $[1];
|
|
3279
|
+
let t2;
|
|
3280
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3281
|
+
t2 = {
|
|
3282
|
+
flex: 1,
|
|
3283
|
+
minWidth: 0,
|
|
3284
|
+
display: "flex",
|
|
3285
|
+
alignItems: "center",
|
|
3286
|
+
gap: 1,
|
|
3287
|
+
mx: .5
|
|
3288
|
+
};
|
|
3289
|
+
$[2] = t2;
|
|
3290
|
+
} else t2 = $[2];
|
|
3291
|
+
let t3;
|
|
3292
|
+
if ($[3] !== title) {
|
|
3293
|
+
t3 = title && /* @__PURE__ */ jsx(Typography, {
|
|
3294
|
+
variant: "body1",
|
|
3295
|
+
noWrap: true,
|
|
3296
|
+
sx: { fontWeight: "medium" },
|
|
3297
|
+
children: title
|
|
3298
|
+
});
|
|
3299
|
+
$[3] = title;
|
|
3300
|
+
$[4] = t3;
|
|
3301
|
+
} else t3 = $[4];
|
|
3302
|
+
let t4;
|
|
3303
|
+
if ($[5] !== t || $[6] !== table) {
|
|
3304
|
+
t4 = () => {
|
|
3305
|
+
const count = table.getSelectedRowIds().length;
|
|
3306
|
+
if (!count) return null;
|
|
3307
|
+
return /* @__PURE__ */ jsx(Typography, {
|
|
3308
|
+
variant: "body2",
|
|
3309
|
+
noWrap: true,
|
|
3310
|
+
color: "primary",
|
|
3311
|
+
children: t("Layout.Table.SelectedCount", { count })
|
|
3312
|
+
});
|
|
3313
|
+
};
|
|
3314
|
+
$[5] = t;
|
|
3315
|
+
$[6] = table;
|
|
3316
|
+
$[7] = t4;
|
|
3317
|
+
} else t4 = $[7];
|
|
3318
|
+
let t5;
|
|
3319
|
+
if ($[8] !== t4 || $[9] !== table.atoms.rowSelection) {
|
|
3320
|
+
t5 = /* @__PURE__ */ jsx(Subscribe, {
|
|
3321
|
+
source: table.atoms.rowSelection,
|
|
3322
|
+
children: t4
|
|
3323
|
+
});
|
|
3324
|
+
$[8] = t4;
|
|
3325
|
+
$[9] = table.atoms.rowSelection;
|
|
3326
|
+
$[10] = t5;
|
|
3327
|
+
} else t5 = $[10];
|
|
3328
|
+
let t6;
|
|
3329
|
+
if ($[11] !== t3 || $[12] !== t5) {
|
|
3330
|
+
t6 = /* @__PURE__ */ jsxs(Box, {
|
|
3331
|
+
sx: t2,
|
|
3332
|
+
children: [t3, t5]
|
|
3333
|
+
});
|
|
3334
|
+
$[11] = t3;
|
|
3335
|
+
$[12] = t5;
|
|
3336
|
+
$[13] = t6;
|
|
3337
|
+
} else t6 = $[13];
|
|
3338
|
+
let t7;
|
|
3339
|
+
if ($[14] !== actions) {
|
|
3340
|
+
t7 = actions && /* @__PURE__ */ jsx(ToolbarDivider, {});
|
|
3341
|
+
$[14] = actions;
|
|
3342
|
+
$[15] = t7;
|
|
3343
|
+
} else t7 = $[15];
|
|
3344
|
+
let t8;
|
|
3345
|
+
if ($[16] !== disableColumnSelector) {
|
|
3346
|
+
t8 = !disableColumnSelector && /* @__PURE__ */ jsx(ColumnsPanel, {});
|
|
3347
|
+
$[16] = disableColumnSelector;
|
|
3348
|
+
$[17] = t8;
|
|
3349
|
+
} else t8 = $[17];
|
|
3350
|
+
let t9;
|
|
3351
|
+
if ($[18] !== disableColumnFilter) {
|
|
3352
|
+
t9 = !disableColumnFilter && /* @__PURE__ */ jsx(FiltersMenu, {});
|
|
3353
|
+
$[18] = disableColumnFilter;
|
|
3354
|
+
$[19] = t9;
|
|
3355
|
+
} else t9 = $[19];
|
|
3356
|
+
let t10;
|
|
3357
|
+
if ($[20] !== disableSearch) {
|
|
3358
|
+
t10 = !disableSearch && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ToolbarDivider, {}), /* @__PURE__ */ jsx(GlobalFilter, {})] });
|
|
3359
|
+
$[20] = disableSearch;
|
|
3360
|
+
$[21] = t10;
|
|
3361
|
+
} else t10 = $[21];
|
|
3362
|
+
let t11;
|
|
3363
|
+
if ($[22] !== actions || $[23] !== t10 || $[24] !== t6 || $[25] !== t7 || $[26] !== t8 || $[27] !== t9) {
|
|
3364
|
+
t11 = /* @__PURE__ */ jsxs(Box, {
|
|
3365
|
+
role: "toolbar",
|
|
3366
|
+
"aria-orientation": "horizontal",
|
|
3367
|
+
sx: t1,
|
|
3368
|
+
children: [
|
|
3369
|
+
t6,
|
|
3370
|
+
actions,
|
|
3371
|
+
t7,
|
|
3372
|
+
t8,
|
|
3373
|
+
t9,
|
|
3374
|
+
t10
|
|
3375
|
+
]
|
|
3376
|
+
});
|
|
3377
|
+
$[22] = actions;
|
|
3378
|
+
$[23] = t10;
|
|
3379
|
+
$[24] = t6;
|
|
3380
|
+
$[25] = t7;
|
|
3381
|
+
$[26] = t8;
|
|
3382
|
+
$[27] = t9;
|
|
3383
|
+
$[28] = t11;
|
|
3384
|
+
} else t11 = $[28];
|
|
3385
|
+
return t11;
|
|
3386
|
+
};
|
|
3387
|
+
//#endregion
|
|
3388
|
+
//#region src/hooks/useLayoutTable.tsx
|
|
3389
|
+
const { appFeatures, createAppColumnHelper: createLayoutColumnHelper, useAppTable: useLayoutTable } = createTableHook({
|
|
3390
|
+
features: layoutTableFeatures,
|
|
3391
|
+
tableContext,
|
|
3392
|
+
cellContext,
|
|
3393
|
+
headerContext,
|
|
3394
|
+
getRowId: (row) => row.id,
|
|
3395
|
+
defaultColumn: {
|
|
3396
|
+
filterFn: dynamicFilterFn,
|
|
3397
|
+
aggregatedCell: () => /* @__PURE__ */ jsx(AggregatedCell, {})
|
|
3398
|
+
},
|
|
3399
|
+
globalFilterFn,
|
|
3400
|
+
columnResizeMode: "onChange",
|
|
3401
|
+
isMultiSortEvent: (e) => {
|
|
3402
|
+
const { ctrlKey, metaKey, shiftKey } = e;
|
|
3403
|
+
return ctrlKey || metaKey || shiftKey;
|
|
3404
|
+
},
|
|
3405
|
+
tableComponents: {
|
|
3406
|
+
ColumnsPanel,
|
|
3407
|
+
FiltersMenu,
|
|
3408
|
+
GlobalFilter,
|
|
3409
|
+
Pagination,
|
|
3410
|
+
Skeleton: Skeleton$1,
|
|
3411
|
+
Toolbar: Toolbar$1
|
|
3412
|
+
},
|
|
3413
|
+
cellComponents: {
|
|
3414
|
+
ActionsCell,
|
|
3415
|
+
AggregatedCell,
|
|
3416
|
+
BooleanCell,
|
|
3417
|
+
DateCell,
|
|
3418
|
+
DateTimeCell,
|
|
3419
|
+
ExpandCell,
|
|
3420
|
+
GroupCell,
|
|
3421
|
+
NumberCell,
|
|
3422
|
+
PinRowCell,
|
|
3423
|
+
SelectCell,
|
|
3424
|
+
ValueCell
|
|
3425
|
+
},
|
|
3426
|
+
headerComponents: {
|
|
3427
|
+
AggregationFooter,
|
|
3428
|
+
ExpandAllCell,
|
|
3429
|
+
HeaderMenu,
|
|
3430
|
+
HeaderResizeHandle,
|
|
3431
|
+
HeaderSortLabel,
|
|
3432
|
+
SelectAllCell
|
|
3433
|
+
}
|
|
3434
|
+
});
|
|
3435
|
+
//#endregion
|
|
3436
|
+
export { createLayoutColumnHelper, layoutTableFeatures, useCellContext, useDialogs, useFieldContext, useFormContext, useHeaderContext, useInView, useLayoutForm, useLayoutTable, useScanDetection, useTableContext, useTranslation, withLayoutForm };
|
|
1089
3437
|
|
|
1090
3438
|
//# sourceMappingURL=hooks.mjs.map
|