@gen-epix/ui-client-common 4.9.0 → 4.10.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/@types/mui.d.ts +2 -0
- package/dist/_chunks/Table.js +609 -605
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/components/ui/Sidebar/index.js +1 -1
- package/dist/components/ui/Sidebar/index.js.map +1 -1
- package/dist/components/ui/Table/Table.d.ts +4 -0
- package/dist/theme/demoTheme/index.js +5 -1
- package/dist/theme/demoTheme/index.js.map +1 -1
- package/package.json +2 -2
package/dist/_chunks/Table.js
CHANGED
|
@@ -20,44 +20,44 @@ import { SidebarItem as O, SidebarMenu as ee, SidebarMenuItem as k } from "../co
|
|
|
20
20
|
import { container as te } from "tsyringe";
|
|
21
21
|
import { WindowService as ne } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
22
22
|
import { t as A } from "i18next";
|
|
23
|
-
import { Box as j, Button as
|
|
24
|
-
import * as
|
|
25
|
-
import
|
|
26
|
-
import { Fragment as
|
|
27
|
-
import { useTranslation as
|
|
28
|
-
import { TestIdUtil as
|
|
29
|
-
import { TableVirtuoso as
|
|
30
|
-
import { useScrollbarSize as
|
|
31
|
-
import { visuallyHidden as
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import { FormProvider as
|
|
35
|
-
import
|
|
36
|
-
import { withDialog as
|
|
37
|
-
import { DndContext as
|
|
38
|
-
import { SortableContext as
|
|
39
|
-
import { CSS as
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import { NestedDropdown as
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
23
|
+
import { Box as j, Button as M, Checkbox as re, Divider as ie, FormControlLabel as ae, IconButton as N, Link as P, Menu as F, Paper as oe, Popover as se, Tooltip as ce, Typography as I, darken as le, lighten as ue, styled as de, useTheme as fe } from "@mui/material";
|
|
24
|
+
import * as pe from "react";
|
|
25
|
+
import me, { Fragment as he, createContext as L, forwardRef as R, use as ge, useCallback as z, useEffect as B, useId as _e, useImperativeHandle as ve, useLayoutEffect as ye, useMemo as V, useRef as H, useState as U } from "react";
|
|
26
|
+
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
27
|
+
import { useTranslation as q } from "react-i18next";
|
|
28
|
+
import { TestIdUtil as J } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
29
|
+
import { TableVirtuoso as be } from "react-virtuoso";
|
|
30
|
+
import { useScrollbarSize as xe } from "@gen-epix/ui-core/hooks/useScrollbarSize";
|
|
31
|
+
import { visuallyHidden as Se } from "@mui/utils";
|
|
32
|
+
import Ce from "@mui/icons-material/ArrowDownward";
|
|
33
|
+
import we from "@mui/icons-material/FilterAlt";
|
|
34
|
+
import { FormProvider as Te, useController as Ee, useForm as De, useFormContext as Oe, useWatch as ke } from "react-hook-form";
|
|
35
|
+
import Ae from "@mui/icons-material/MoreVert";
|
|
36
|
+
import { withDialog as Y } from "@gen-epix/ui-core-components/hoc/withDialog";
|
|
37
|
+
import { DndContext as je, DragOverlay as Me, KeyboardSensor as Ne, PointerSensor as Pe, defaultDropAnimationSideEffects as Fe, useSensor as X, useSensors as Ie } from "@dnd-kit/core";
|
|
38
|
+
import { SortableContext as Le, arrayMove as Re, sortableKeyboardCoordinates as ze, useSortable as Be } from "@dnd-kit/sortable";
|
|
39
|
+
import { CSS as Ve } from "@dnd-kit/utilities";
|
|
40
|
+
import He from "@mui/icons-material/DragIndicator";
|
|
41
|
+
import Z from "@mui/icons-material/IndeterminateCheckBox";
|
|
42
|
+
import Ue from "@mui/icons-material/Check";
|
|
43
|
+
import We from "@mui/icons-material/RestartAlt";
|
|
44
|
+
import Ge from "@mui/icons-material/Close";
|
|
45
|
+
import { NestedDropdown as Ke } from "@gen-epix/ui-core-components/components/NestedMenu";
|
|
46
|
+
import qe from "@mui/icons-material/CheckBoxOutlined";
|
|
47
|
+
import Je from "@mui/icons-material/CheckBoxOutlineBlankOutlined";
|
|
48
|
+
import Ye from "@mui/icons-material/ToggleOffOutlined";
|
|
49
|
+
import Xe from "@mui/icons-material/ToggleOnOutlined";
|
|
50
|
+
import Ze from "@mui/icons-material/EditOutlined";
|
|
51
|
+
import Qe from "@mui/icons-material/Download";
|
|
52
52
|
// ../../node_modules/.pnpm/use-debounce@10.1.1_react@19.3.1/node_modules/use-debounce/dist/index.module.js
|
|
53
|
-
var
|
|
54
|
-
function
|
|
55
|
-
var i = this, a =
|
|
53
|
+
var $e = /* @__PURE__ */ e(d(), 1), et = /* @__PURE__ */ e(n(), 1), tt = /* @__PURE__ */ e(u(), 1), nt = /* @__PURE__ */ e(c(), 1);
|
|
54
|
+
function rt(e, t, n, r) {
|
|
55
|
+
var i = this, a = H(null), o = H(0), s = H(0), c = H(null), l = H([]), u = H(), d = H(), f = H(e), p = H(!0), m = H(), h = H();
|
|
56
56
|
f.current = e;
|
|
57
57
|
var g = typeof window < "u", _ = !t && t !== 0 && g;
|
|
58
58
|
if (typeof e != "function") throw TypeError("Expected a function");
|
|
59
59
|
t = +t || 0;
|
|
60
|
-
var v = !!(n ||= {}).leading, y = !("trailing" in n) || !!n.trailing, b = !!n.flushOnExit && y, x = "maxWait" in n, S = "debounceOnServer" in n && !!n.debounceOnServer, C = x ? Math.max(+n.maxWait || 0, t) : null, w =
|
|
60
|
+
var v = !!(n ||= {}).leading, y = !("trailing" in n) || !!n.trailing, b = !!n.flushOnExit && y, x = "maxWait" in n, S = "debounceOnServer" in n && !!n.debounceOnServer, C = x ? Math.max(+n.maxWait || 0, t) : null, w = V(function() {
|
|
61
61
|
var e = function(e) {
|
|
62
62
|
var t = l.current, n = u.current;
|
|
63
63
|
return l.current = u.current = null, o.current = e, s.current = s.current || e, d.current = f.current.apply(n, t);
|
|
@@ -110,7 +110,7 @@ function at(e, t, n, r) {
|
|
|
110
110
|
S,
|
|
111
111
|
r
|
|
112
112
|
]);
|
|
113
|
-
return h.current = w,
|
|
113
|
+
return h.current = w, B(function() {
|
|
114
114
|
return p.current = !0, function() {
|
|
115
115
|
var e;
|
|
116
116
|
b && h.current.flush(), m.current &&= ((e = globalThis.document) == null || e.removeEventListener == null || e.removeEventListener("visibilitychange", m.current), null), p.current = !1;
|
|
@@ -118,12 +118,12 @@ function at(e, t, n, r) {
|
|
|
118
118
|
}, [b]), w;
|
|
119
119
|
}
|
|
120
120
|
// ../../node_modules/.pnpm/zustand@5.1.0_@types+react@19.3.1_immer@11.2.10_react@19.3.1_use-sync-external-store@1.7.0_react@19.3.1_/node_modules/zustand/esm/vanilla/shallow.mjs
|
|
121
|
-
var
|
|
121
|
+
var it = (e) => Symbol.iterator in e, at = (e) => "entries" in e, ot = (e, t) => {
|
|
122
122
|
let n = e instanceof Map ? e : new Map(e.entries()), r = t instanceof Map ? t : new Map(t.entries());
|
|
123
123
|
if (n.size !== r.size) return !1;
|
|
124
124
|
for (let [e, t] of n) if (!r.has(e) || !Object.is(t, r.get(e))) return !1;
|
|
125
125
|
return !0;
|
|
126
|
-
},
|
|
126
|
+
}, st = (e, t) => {
|
|
127
127
|
let n = e[Symbol.iterator](), r = t[Symbol.iterator](), i = n.next(), a = r.next();
|
|
128
128
|
for (; !i.done && !a.done;) {
|
|
129
129
|
if (!Object.is(i.value, a.value)) return !1;
|
|
@@ -131,21 +131,21 @@ var ot = (e) => Symbol.iterator in e, st = (e) => "entries" in e, ct = (e, t) =>
|
|
|
131
131
|
}
|
|
132
132
|
return !!i.done && !!a.done;
|
|
133
133
|
};
|
|
134
|
-
function
|
|
135
|
-
return Object.is(e, t) ? !0 : typeof e != "object" || !e || typeof t != "object" || !t || Object.getPrototypeOf(e) !== Object.getPrototypeOf(t) ? !1 :
|
|
134
|
+
function ct(e, t) {
|
|
135
|
+
return Object.is(e, t) ? !0 : typeof e != "object" || !e || typeof t != "object" || !t || Object.getPrototypeOf(e) !== Object.getPrototypeOf(t) ? !1 : it(e) && it(t) ? at(e) && at(t) ? ot(e, t) : st(e, t) : ot({ entries: () => Object.entries(e) }, { entries: () => Object.entries(t) });
|
|
136
136
|
}
|
|
137
137
|
// ../../node_modules/.pnpm/zustand@5.1.0_@types+react@19.3.1_immer@11.2.10_react@19.3.1_use-sync-external-store@1.7.0_react@19.3.1_/node_modules/zustand/esm/react/shallow.mjs
|
|
138
|
-
function
|
|
139
|
-
let t =
|
|
138
|
+
function Q(e) {
|
|
139
|
+
let t = me.useRef(void 0);
|
|
140
140
|
return (n) => {
|
|
141
141
|
let r = e(n);
|
|
142
|
-
return
|
|
142
|
+
return ct(t.current, r) ? t.current : t.current = r;
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
// src/components/ui/Table/TableCellAsyncContent.tsx
|
|
146
|
-
var
|
|
147
|
-
let [t, n] =
|
|
148
|
-
return
|
|
146
|
+
var lt = ({ content: e }) => {
|
|
147
|
+
let [t, n] = U(null);
|
|
148
|
+
return B(() => {
|
|
149
149
|
let t = !0;
|
|
150
150
|
return (async () => {
|
|
151
151
|
let r = e instanceof Promise ? await e : e;
|
|
@@ -153,49 +153,49 @@ var dt = ({ content: e }) => {
|
|
|
153
153
|
})(), () => {
|
|
154
154
|
t = !1;
|
|
155
155
|
};
|
|
156
|
-
}, [e]), /* @__PURE__ */ W
|
|
156
|
+
}, [e]), /* @__PURE__ */ G(W, { children: t });
|
|
157
157
|
};
|
|
158
158
|
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
159
|
-
function
|
|
159
|
+
function ut(e) {
|
|
160
160
|
var t, n, r = "";
|
|
161
161
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
162
162
|
else if (typeof e == "object") {
|
|
163
163
|
if (Array.isArray(e)) {
|
|
164
164
|
var i = e.length;
|
|
165
|
-
for (t = 0; t < i; t++) e[t] && (n =
|
|
165
|
+
for (t = 0; t < i; t++) e[t] && (n = ut(e[t])) && (r && (r += " "), r += n);
|
|
166
166
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
167
167
|
}
|
|
168
168
|
return r;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
170
|
+
function dt() {
|
|
171
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = ut(e)) && (r && (r += " "), r += t);
|
|
172
172
|
return r;
|
|
173
173
|
}
|
|
174
174
|
// src/components/ui/Table/TableFilter.tsx
|
|
175
|
-
var
|
|
175
|
+
var ft = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
176
176
|
var n = f(), r = y();
|
|
177
177
|
function i(e) {
|
|
178
178
|
return e && e.length ? n(e, r) : 0;
|
|
179
179
|
}
|
|
180
180
|
t.exports = i;
|
|
181
|
-
})))(), 1),
|
|
182
|
-
let { field: t } =
|
|
181
|
+
})))(), 1), pt = ({ filter: e }) => {
|
|
182
|
+
let { field: t } = Ee({
|
|
183
183
|
defaultValue: e.includeMissingValues,
|
|
184
184
|
name: e.includeMissingValuesFormFieldName
|
|
185
|
-
}), { t: n } =
|
|
186
|
-
return /* @__PURE__ */
|
|
187
|
-
e instanceof s && /* @__PURE__ */
|
|
188
|
-
e instanceof o && /* @__PURE__ */
|
|
189
|
-
e instanceof r && /* @__PURE__ */
|
|
190
|
-
e instanceof a && /* @__PURE__ */
|
|
191
|
-
e instanceof b && /* @__PURE__ */
|
|
192
|
-
e instanceof i && /* @__PURE__ */
|
|
193
|
-
l && e.supportsMissingValuesFilter && /* @__PURE__ */
|
|
185
|
+
}), { t: n } = q(), c = v(), l = m(c, (e) => e.showMissingValuesFilter), u = ke({ name: e.id }), d = e.isInitialFilterValue(u), f = d ? n`Select missing values` : n`Include missing values`, p = d ? n`When enabled, select only items with missing values.` : n`When enabled, include items with missing values alongside items matching the selected values.`;
|
|
186
|
+
return /* @__PURE__ */ K(W, { children: [
|
|
187
|
+
e instanceof s && /* @__PURE__ */ G(E, { filter: e }),
|
|
188
|
+
e instanceof o && /* @__PURE__ */ G(x, { filter: e }),
|
|
189
|
+
e instanceof r && /* @__PURE__ */ G(T, { filter: e }),
|
|
190
|
+
e instanceof a && /* @__PURE__ */ G(w, { filter: e }),
|
|
191
|
+
e instanceof b && /* @__PURE__ */ G(C, { filter: e }),
|
|
192
|
+
e instanceof i && /* @__PURE__ */ G(S, { filter: e }),
|
|
193
|
+
l && e.supportsMissingValuesFilter && /* @__PURE__ */ G(ce, {
|
|
194
194
|
arrow: !0,
|
|
195
195
|
placement: "top",
|
|
196
196
|
title: p,
|
|
197
|
-
children: /* @__PURE__ */
|
|
198
|
-
control: /* @__PURE__ */
|
|
197
|
+
children: /* @__PURE__ */ G(ae, {
|
|
198
|
+
control: /* @__PURE__ */ G(re, {
|
|
199
199
|
checked: t.value === !0,
|
|
200
200
|
name: t.name,
|
|
201
201
|
onBlur: t.onBlur,
|
|
@@ -205,8 +205,8 @@ var mt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
205
205
|
})
|
|
206
206
|
})
|
|
207
207
|
] });
|
|
208
|
-
},
|
|
209
|
-
let n = v(), { t: r } =
|
|
208
|
+
}, mt = ({ filter: e, onFilterChange: t }) => {
|
|
209
|
+
let n = v(), { t: r } = q(), i = m(n, (e) => e.setFilterValue), a = m(n, (e) => e.showMissingValuesFilter), o = e.includeMissingValuesFormFieldName, s = V(() => ({
|
|
210
210
|
[e.id]: e.initialFilterValue,
|
|
211
211
|
...a ? { [o]: !1 } : {}
|
|
212
212
|
}), [
|
|
@@ -214,7 +214,7 @@ var mt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
214
214
|
e.initialFilterValue,
|
|
215
215
|
o,
|
|
216
216
|
a
|
|
217
|
-
]), c =
|
|
217
|
+
]), c = V(() => ({
|
|
218
218
|
[e.id]: e.filterValue ?? e.initialFilterValue,
|
|
219
219
|
...a ? { [o]: e.includeMissingValues } : {}
|
|
220
220
|
}), [
|
|
@@ -224,10 +224,10 @@ var mt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
224
224
|
e.initialFilterValue,
|
|
225
225
|
o,
|
|
226
226
|
a
|
|
227
|
-
]), l =
|
|
227
|
+
]), l = De({
|
|
228
228
|
defaultValues: s,
|
|
229
229
|
values: c
|
|
230
|
-
}), { formState: { isDirty: u }, handleSubmit: d } = l, f =
|
|
230
|
+
}), { formState: { isDirty: u }, handleSubmit: d } = l, f = z(async (n) => {
|
|
231
231
|
await i(e.id, n[e.id], a ? n[o] === !0 : void 0), t();
|
|
232
232
|
}, [
|
|
233
233
|
e.id,
|
|
@@ -235,7 +235,7 @@ var mt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
235
235
|
t,
|
|
236
236
|
i,
|
|
237
237
|
a
|
|
238
|
-
]), p =
|
|
238
|
+
]), p = z(async () => {
|
|
239
239
|
await i(e.id, e.initialFilterValue, !a && void 0), t();
|
|
240
240
|
}, [
|
|
241
241
|
e.id,
|
|
@@ -244,26 +244,26 @@ var mt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
244
244
|
i,
|
|
245
245
|
a
|
|
246
246
|
]);
|
|
247
|
-
return /* @__PURE__ */
|
|
247
|
+
return /* @__PURE__ */ G(Te, {
|
|
248
248
|
...l,
|
|
249
|
-
children: /* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ K(j, {
|
|
250
250
|
autoComplete: "off",
|
|
251
251
|
component: "form",
|
|
252
252
|
id: "Filters",
|
|
253
253
|
onSubmit: d(f),
|
|
254
254
|
sx: { minWidth: "400px" },
|
|
255
|
-
children: [/* @__PURE__ */
|
|
255
|
+
children: [/* @__PURE__ */ G(pt, { filter: e }), /* @__PURE__ */ K(j, {
|
|
256
256
|
sx: {
|
|
257
257
|
display: "flex",
|
|
258
258
|
gap: 1,
|
|
259
259
|
justifyContent: "flex-end"
|
|
260
260
|
},
|
|
261
|
-
children: [/* @__PURE__ */
|
|
261
|
+
children: [/* @__PURE__ */ G(M, {
|
|
262
262
|
disabled: !e.isFilterActive(),
|
|
263
263
|
onClick: p,
|
|
264
264
|
variant: "outlined",
|
|
265
265
|
children: r`Remove filter`
|
|
266
|
-
}), /* @__PURE__ */
|
|
266
|
+
}), /* @__PURE__ */ G(M, {
|
|
267
267
|
disabled: !u,
|
|
268
268
|
type: "submit",
|
|
269
269
|
variant: "contained",
|
|
@@ -272,8 +272,8 @@ var mt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
272
272
|
})]
|
|
273
273
|
})
|
|
274
274
|
});
|
|
275
|
-
},
|
|
276
|
-
let C =
|
|
275
|
+
}, ht = {}, gt = ({ ariaSort: e, backgroundColor: t, canDrag: n, children: r, className: i, column: a, columnIndex: o, enabled: s, height: c, onClick: l, onCustomDrag: u, order: d, ref: f, role: p, row: h, rowIndex: g, sx: _, tabIndex: y, title: b, width: x, xOffset: S }) => {
|
|
276
|
+
let C = fe(), w = v(), T = m(w, Q((e) => e.dataContext)), E = z((e) => {
|
|
277
277
|
l({
|
|
278
278
|
dataContext: T,
|
|
279
279
|
id: a.id,
|
|
@@ -286,7 +286,7 @@ var mt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
286
286
|
l,
|
|
287
287
|
h,
|
|
288
288
|
g
|
|
289
|
-
]), O =
|
|
289
|
+
]), O = H(null), ee = z((e) => {
|
|
290
290
|
if (!u || n && !n(e)) return;
|
|
291
291
|
let t = e.currentTarget, r = t.getBoundingClientRect().width, i = {
|
|
292
292
|
elementOffsetX: e.clientX - t.getBoundingClientRect().left,
|
|
@@ -333,9 +333,9 @@ var mt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
333
333
|
u,
|
|
334
334
|
n,
|
|
335
335
|
a
|
|
336
|
-
]), k = !a.frozen, te =
|
|
336
|
+
]), k = !a.frozen, te = z(() => {
|
|
337
337
|
let e = a.frozen === D.LEFT, n = a.frozen === D.RIGHT, r = e || n, i;
|
|
338
|
-
return t && (
|
|
338
|
+
return t && (ht[t] ? i = ht[t] : (i = C.palette.getContrastText(t), ht[t] = i)), {
|
|
339
339
|
"*": t ?? {
|
|
340
340
|
/* v8 ignore next -- color is only set when backgroundColor is set, and then this object is not used, so the truthy arm is unreachable */
|
|
341
341
|
color: i ? `${i} !important` : void 0 },
|
|
@@ -369,7 +369,7 @@ color: i ? `${i} !important` : void 0 },
|
|
|
369
369
|
x,
|
|
370
370
|
S
|
|
371
371
|
]);
|
|
372
|
-
return /* @__PURE__ */
|
|
372
|
+
return /* @__PURE__ */ G(j, {
|
|
373
373
|
"aria-sort": e,
|
|
374
374
|
className: i,
|
|
375
375
|
"data-column-index": o,
|
|
@@ -385,14 +385,14 @@ color: i ? `${i} !important` : void 0 },
|
|
|
385
385
|
title: b,
|
|
386
386
|
children: r
|
|
387
387
|
});
|
|
388
|
-
},
|
|
388
|
+
}, $ = {
|
|
389
389
|
columnDivider: "GENEPIX-TableHeaderCell-columnDivider",
|
|
390
390
|
content: "GENEPIX-TableHeaderCell-content",
|
|
391
391
|
customHeaderIcon: "GENEPIX-TableHeaderCell-customHeaderIcon",
|
|
392
392
|
filterLabelIcon: "GENEPIX-TableHeaderCell-filterLabelIcon",
|
|
393
393
|
root: "GENEPIX-TableHeaderCell",
|
|
394
394
|
sortLabelIcon: "GENEPIX-TableHeaderCell-sortLabelIcon"
|
|
395
|
-
},
|
|
395
|
+
}, _t = 18, vt = `${$.root}--focus`, yt = de(N, { name: "GENEPIX-TableSortLabelIcon" })(({ ownerState: e, theme: t }) => ({
|
|
396
396
|
"&:hover": {
|
|
397
397
|
color: t.palette.primary.main,
|
|
398
398
|
opacity: "1 !important"
|
|
@@ -403,78 +403,78 @@ color: i ? `${i} !important` : void 0 },
|
|
|
403
403
|
},
|
|
404
404
|
color: t.palette.text.primary,
|
|
405
405
|
display: "none",
|
|
406
|
-
fontSize:
|
|
407
|
-
height: `${
|
|
406
|
+
fontSize: _t,
|
|
407
|
+
height: `${_t}px`,
|
|
408
408
|
opacity: 0,
|
|
409
409
|
padding: 0,
|
|
410
410
|
userSelect: "none",
|
|
411
|
-
width: `${
|
|
412
|
-
})),
|
|
411
|
+
width: `${_t}px`
|
|
412
|
+
})), bt = de(N, { name: "GENEPIX-TableCustomHeaderIcon" })(({ theme: e }) => ({
|
|
413
413
|
"&:hover": {
|
|
414
414
|
color: e.palette.primary.main,
|
|
415
415
|
opacity: "1 !important"
|
|
416
416
|
},
|
|
417
417
|
display: "none",
|
|
418
|
-
fontSize:
|
|
419
|
-
height: `${
|
|
418
|
+
fontSize: _t,
|
|
419
|
+
height: `${_t}px`,
|
|
420
420
|
opacity: 0,
|
|
421
421
|
padding: 0,
|
|
422
422
|
userSelect: "none",
|
|
423
|
-
width: `${
|
|
424
|
-
})),
|
|
423
|
+
width: `${_t}px`
|
|
424
|
+
})), xt = de(N, { name: "GENEPIX-TableFilterLabelIcon" })(({ theme: e }) => ({
|
|
425
425
|
"&:hover": {
|
|
426
426
|
color: e.palette.primary.main,
|
|
427
427
|
opacity: "1 !important"
|
|
428
428
|
},
|
|
429
429
|
display: "none",
|
|
430
|
-
fontSize:
|
|
431
|
-
height: `${
|
|
430
|
+
fontSize: _t,
|
|
431
|
+
height: `${_t}px`,
|
|
432
432
|
opacity: 0,
|
|
433
433
|
padding: 0,
|
|
434
434
|
userSelect: "none",
|
|
435
|
-
width: `${
|
|
436
|
-
})),
|
|
437
|
-
let { t } =
|
|
435
|
+
width: `${_t}px`
|
|
436
|
+
})), St = (e) => {
|
|
437
|
+
let { t } = q(), n = fe(), r = v(), i = m(r, (e) => e.sortByField), a = m(r, (e) => e.dataContext), o = m(r, (e) => e.sortDirection), s = m(r, (e) => e.setSorting), c = m(r, (e) => e.filters), l = H(null), u = _e(), [d, f] = U(), p = H(null), h = H(null), { column: g, columnIndex: _, dividerColor: y, height: b, onColumnDividerKeyDown: x, onColumnDividerMouseDown: S, onCustomDrag: C, order: w, width: T, xOffset: E } = e, D = H(!1), O = z((e) => g.frozen || e.button !== 0 ? !1 : e.nativeEvent.target.classList.contains($.content), [g.frozen]), ee = z((e, t) => {
|
|
438
438
|
C && (e.type === "start" && (D.current = !0), C(e, t));
|
|
439
|
-
}, [C]), k =
|
|
439
|
+
}, [C]), k = z(async () => {
|
|
440
440
|
i === g.id ? await s(g.id, o === "asc" ? "desc" : "asc") : await s(g.id, "asc");
|
|
441
441
|
}, [
|
|
442
442
|
g.id,
|
|
443
443
|
s,
|
|
444
444
|
i,
|
|
445
445
|
o
|
|
446
|
-
]), te =
|
|
446
|
+
]), te = z(async (e) => {
|
|
447
447
|
D.current ? (e.preventDefault(), e.stopPropagation(), D.current = !1) : g.comparatorFactory && await k();
|
|
448
|
-
}, [g.comparatorFactory, k]), ne =
|
|
448
|
+
}, [g.comparatorFactory, k]), ne = z(async (e) => {
|
|
449
449
|
await k();
|
|
450
|
-
}, [k]), A =
|
|
450
|
+
}, [k]), A = z(() => {
|
|
451
451
|
f((e) => e ? null : p.current);
|
|
452
|
-
}, []),
|
|
452
|
+
}, []), M = z(() => {
|
|
453
453
|
f(null);
|
|
454
|
-
}, []),
|
|
454
|
+
}, []), re = z((e) => {
|
|
455
455
|
e.button === 0 && (e.preventDefault(), e.stopPropagation(), S(e, g));
|
|
456
|
-
}, [g, S]),
|
|
456
|
+
}, [g, S]), ie = z((e) => {
|
|
457
457
|
x(e, g);
|
|
458
|
-
}, [g, x]),
|
|
458
|
+
}, [g, x]), ae = V(() => c.find((e) => e.id === g.id), [g.id, c]), N = m(r, (e) => e.filters.find((e) => e.id === g.id)?.isFilterActive() ?? !1), P = z(() => {
|
|
459
459
|
g.customHeaderIcon?.onClick({
|
|
460
460
|
column: g,
|
|
461
461
|
dataContext: a
|
|
462
462
|
});
|
|
463
|
-
}, [g, a]),
|
|
463
|
+
}, [g, a]), F = z(() => {
|
|
464
464
|
f(null), setTimeout(() => {
|
|
465
|
-
p.current.classList.add(
|
|
465
|
+
p.current.classList.add(vt), p.current?.focus(), h.current?.focus();
|
|
466
466
|
});
|
|
467
|
-
}, []),
|
|
467
|
+
}, []), I = i === g.id, le = { direction: i === g.id ? o : "asc" }, ue = dt($.sortLabelIcon, { [`${$.sortLabelIcon}--active`]: I }), de = dt($.filterLabelIcon, { [`${$.filterLabelIcon}--active`]: N }), pe = !!g.customHeaderIcon, me = !!g.comparatorFactory, he = !!ae, L = me || he || pe ? 0 : -1, R = +n.spacing(2).replace("px", ""), ge = V(() => {
|
|
468
468
|
if (i === g.id) return o === "asc" ? "ascending" : "descending";
|
|
469
469
|
}, [
|
|
470
470
|
g.id,
|
|
471
471
|
i,
|
|
472
472
|
o
|
|
473
473
|
]);
|
|
474
|
-
return /* @__PURE__ */
|
|
475
|
-
ariaSort:
|
|
474
|
+
return /* @__PURE__ */ K(gt, {
|
|
475
|
+
ariaSort: ge,
|
|
476
476
|
canDrag: O,
|
|
477
|
-
className:
|
|
477
|
+
className: dt($.root, { [vt]: !!d }),
|
|
478
478
|
column: g,
|
|
479
479
|
columnIndex: _,
|
|
480
480
|
height: b,
|
|
@@ -483,15 +483,15 @@ color: i ? `${i} !important` : void 0 },
|
|
|
483
483
|
ref: p,
|
|
484
484
|
role: "columnheader",
|
|
485
485
|
sx: {
|
|
486
|
-
[`.${
|
|
487
|
-
[`.${
|
|
486
|
+
[`.${$.filterLabelIcon}--active`]: { color: n.palette.secondary.main },
|
|
487
|
+
[`.${$.sortLabelIcon}--active, .${$.filterLabelIcon}--active`]: {
|
|
488
488
|
display: "inline-block",
|
|
489
489
|
opacity: "1 !important"
|
|
490
490
|
},
|
|
491
|
-
[`.${
|
|
492
|
-
[`&:hover, &:focus-visible, &:focus, &:focus-within, &.${
|
|
493
|
-
[`.${
|
|
494
|
-
[`.${
|
|
491
|
+
[`.${$.sortLabelIcon}--active`]: { color: n.palette.text.secondary },
|
|
492
|
+
[`&:hover, &:focus-visible, &:focus, &:focus-within, &.${vt}`]: {
|
|
493
|
+
[`.${$.columnDivider}`]: { opacity: 1 },
|
|
494
|
+
[`.${$.sortLabelIcon}, .${$.filterLabelIcon}, .${$.customHeaderIcon}`]: {
|
|
495
495
|
display: "inline-block",
|
|
496
496
|
opacity: .5
|
|
497
497
|
}
|
|
@@ -502,44 +502,44 @@ color: i ? `${i} !important` : void 0 },
|
|
|
502
502
|
justifyContent: "flex-start",
|
|
503
503
|
textAlign: "left"
|
|
504
504
|
},
|
|
505
|
-
tabIndex:
|
|
505
|
+
tabIndex: L,
|
|
506
506
|
width: T,
|
|
507
507
|
xOffset: E,
|
|
508
|
-
children: [g.type === "actions" && /* @__PURE__ */
|
|
509
|
-
className:
|
|
510
|
-
sx:
|
|
508
|
+
children: [g.type === "actions" && /* @__PURE__ */ G(j, {
|
|
509
|
+
className: $.content,
|
|
510
|
+
sx: Se,
|
|
511
511
|
children: t`Actions`
|
|
512
|
-
}), g.type !== "actions" && /* @__PURE__ */
|
|
512
|
+
}), g.type !== "actions" && /* @__PURE__ */ K(j, {
|
|
513
513
|
sx: {
|
|
514
|
-
[`&:hover .${
|
|
515
|
-
pe ?
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
514
|
+
[`&:hover .${$.content}`]: { maxWidth: `calc(100% + 16px - ${(0, ft.default)([
|
|
515
|
+
pe ? R : 0,
|
|
516
|
+
he ? R : 0,
|
|
517
|
+
me ? R : 0,
|
|
518
|
+
R
|
|
519
519
|
])}px)` },
|
|
520
520
|
alignItems: "center",
|
|
521
521
|
display: "inline-flex",
|
|
522
522
|
width: "100%"
|
|
523
523
|
},
|
|
524
524
|
children: [
|
|
525
|
-
g.renderHeader ? /* @__PURE__ */ W
|
|
525
|
+
g.renderHeader ? /* @__PURE__ */ G(W, { children: g.renderHeader({
|
|
526
526
|
column: g,
|
|
527
527
|
dataContext: a
|
|
528
|
-
}) }) : /* @__PURE__ */
|
|
528
|
+
}) }) : /* @__PURE__ */ G(ce, {
|
|
529
529
|
arrow: !0,
|
|
530
530
|
placement: "top",
|
|
531
531
|
title: g.headerTooltipContent,
|
|
532
|
-
children: /* @__PURE__ */
|
|
533
|
-
className:
|
|
532
|
+
children: /* @__PURE__ */ G(j, {
|
|
533
|
+
className: $.content,
|
|
534
534
|
onClick: te,
|
|
535
535
|
ref: l,
|
|
536
536
|
sx: {
|
|
537
537
|
cursor: "pointer",
|
|
538
538
|
flexGrow: 1,
|
|
539
|
-
maxWidth: `calc(100% + 16px - ${(0,
|
|
540
|
-
|
|
541
|
-
N ?
|
|
542
|
-
|
|
539
|
+
maxWidth: `calc(100% + 16px - ${(0, ft.default)([
|
|
540
|
+
I ? R : 0,
|
|
541
|
+
N ? R : 0,
|
|
542
|
+
R
|
|
543
543
|
])}px)`,
|
|
544
544
|
overflow: "hidden",
|
|
545
545
|
textOverflow: "ellipsis",
|
|
@@ -551,57 +551,57 @@ color: i ? `${i} !important` : void 0 },
|
|
|
551
551
|
}) : g.headerName ?? ""
|
|
552
552
|
})
|
|
553
553
|
}),
|
|
554
|
-
pe && /* @__PURE__ */
|
|
555
|
-
className:
|
|
554
|
+
pe && /* @__PURE__ */ G(bt, {
|
|
555
|
+
className: $.customHeaderIcon,
|
|
556
556
|
onClick: P,
|
|
557
557
|
tabIndex: 0,
|
|
558
558
|
title: g.customHeaderIcon?.label,
|
|
559
559
|
children: g.customHeaderIcon?.iconElement
|
|
560
560
|
}),
|
|
561
|
-
|
|
562
|
-
className:
|
|
561
|
+
he && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(xt, {
|
|
562
|
+
className: de,
|
|
563
563
|
onClick: A,
|
|
564
564
|
ref: h,
|
|
565
565
|
tabIndex: 0,
|
|
566
566
|
title: t("Show filter for {{name}}", { name: g.headerName || t("unknown") }),
|
|
567
|
-
children: /* @__PURE__ */
|
|
568
|
-
}), /* @__PURE__ */
|
|
567
|
+
children: /* @__PURE__ */ G(we, { fontSize: "inherit" })
|
|
568
|
+
}), /* @__PURE__ */ G(se, {
|
|
569
569
|
anchorEl: d,
|
|
570
570
|
anchorOrigin: {
|
|
571
571
|
horizontal: "center",
|
|
572
572
|
vertical: "bottom"
|
|
573
573
|
},
|
|
574
574
|
id: u,
|
|
575
|
-
onClose:
|
|
575
|
+
onClose: F,
|
|
576
576
|
open: !!d,
|
|
577
577
|
sx: { zIndex: n.zIndex.appBar + 1 },
|
|
578
578
|
transformOrigin: {
|
|
579
579
|
horizontal: "center",
|
|
580
580
|
vertical: "top"
|
|
581
581
|
},
|
|
582
|
-
children: /* @__PURE__ */
|
|
582
|
+
children: /* @__PURE__ */ G(oe, {
|
|
583
583
|
elevation: 4,
|
|
584
584
|
square: !0,
|
|
585
585
|
sx: { padding: n.spacing(3) },
|
|
586
|
-
children: /* @__PURE__ */
|
|
587
|
-
filter:
|
|
588
|
-
onFilterChange:
|
|
586
|
+
children: /* @__PURE__ */ G(mt, {
|
|
587
|
+
filter: ae,
|
|
588
|
+
onFilterChange: M
|
|
589
589
|
})
|
|
590
590
|
})
|
|
591
591
|
})] }),
|
|
592
|
-
|
|
593
|
-
className:
|
|
592
|
+
me && /* @__PURE__ */ G(W, { children: /* @__PURE__ */ G(yt, {
|
|
593
|
+
className: ue,
|
|
594
594
|
onClick: ne,
|
|
595
|
-
ownerState:
|
|
595
|
+
ownerState: le,
|
|
596
596
|
tabIndex: 0,
|
|
597
597
|
title: t("Toggle sorting for {{name}}", { name: g.headerName || t("unknown") }),
|
|
598
|
-
children: /* @__PURE__ */
|
|
598
|
+
children: /* @__PURE__ */ G(Ce, { fontSize: "inherit" })
|
|
599
599
|
}) }),
|
|
600
|
-
g.resizable !== !1 && /* @__PURE__ */
|
|
600
|
+
g.resizable !== !1 && /* @__PURE__ */ G(j, {
|
|
601
601
|
"aria-label": t("Resize column {{name}}, use arrow keys to adjust the size.", { name: g.headerName || t("unknown") }),
|
|
602
|
-
className:
|
|
603
|
-
onKeyDown:
|
|
604
|
-
onMouseDown:
|
|
602
|
+
className: $.columnDivider,
|
|
603
|
+
onKeyDown: ie,
|
|
604
|
+
onMouseDown: re,
|
|
605
605
|
role: "separator",
|
|
606
606
|
sx: {
|
|
607
607
|
"&:focus-visible, &:focus, &:focus-within": {
|
|
@@ -626,12 +626,12 @@ color: i ? `${i} !important` : void 0 },
|
|
|
626
626
|
]
|
|
627
627
|
})]
|
|
628
628
|
}, g.id);
|
|
629
|
-
},
|
|
630
|
-
let t = v(), n = m(t,
|
|
629
|
+
}, Ct = (e) => {
|
|
630
|
+
let t = v(), n = m(t, Q((e) => e.dataContext)), [r, i] = U(null), { t: a } = q(), o = !!r, s = z((e) => {
|
|
631
631
|
i(e.currentTarget);
|
|
632
|
-
}, []), c =
|
|
632
|
+
}, []), c = z(() => {
|
|
633
633
|
i(null);
|
|
634
|
-
}, []), l =
|
|
634
|
+
}, []), l = V(() => e.column.getActions({
|
|
635
635
|
dataContext: n,
|
|
636
636
|
id: e.column.id,
|
|
637
637
|
row: e.row,
|
|
@@ -641,11 +641,11 @@ color: i ? `${i} !important` : void 0 },
|
|
|
641
641
|
e.column,
|
|
642
642
|
e.row,
|
|
643
643
|
e.rowIndex
|
|
644
|
-
]), u =
|
|
645
|
-
return /* @__PURE__ */
|
|
644
|
+
]), u = z(() => {}, []);
|
|
645
|
+
return /* @__PURE__ */ G(gt, {
|
|
646
646
|
...e,
|
|
647
647
|
onClick: u,
|
|
648
|
-
children: l.length > 0 && /* @__PURE__ */
|
|
648
|
+
children: l.length > 0 && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(N, {
|
|
649
649
|
"aria-label": a`Row actions`,
|
|
650
650
|
onClick: s,
|
|
651
651
|
sx: {
|
|
@@ -654,8 +654,8 @@ color: i ? `${i} !important` : void 0 },
|
|
|
654
654
|
top: "50%",
|
|
655
655
|
transform: "translateY(-50%)"
|
|
656
656
|
},
|
|
657
|
-
children: /* @__PURE__ */
|
|
658
|
-
}), /* @__PURE__ */
|
|
657
|
+
children: /* @__PURE__ */ G(Ae, {})
|
|
658
|
+
}), /* @__PURE__ */ G(F, {
|
|
659
659
|
anchorEl: r,
|
|
660
660
|
id: "basic-menu",
|
|
661
661
|
onClick: c,
|
|
@@ -665,27 +665,27 @@ color: i ? `${i} !important` : void 0 },
|
|
|
665
665
|
children: l
|
|
666
666
|
})] })
|
|
667
667
|
}, e.column.id);
|
|
668
|
-
},
|
|
669
|
-
let t =
|
|
670
|
-
return /* @__PURE__ */
|
|
671
|
-
...
|
|
668
|
+
}, wt = ({ children: e }) => {
|
|
669
|
+
let t = V(() => ({ sideEffects: Fe({ styles: { active: { opacity: "1" } } }) }), []);
|
|
670
|
+
return /* @__PURE__ */ G(Me, {
|
|
671
|
+
...J.createAttributes("SortableOverlay"),
|
|
672
672
|
dropAnimation: t,
|
|
673
673
|
style: { opacity: 1 },
|
|
674
674
|
zIndex: 1e3,
|
|
675
675
|
children: e
|
|
676
676
|
});
|
|
677
|
-
},
|
|
677
|
+
}, Tt = L({
|
|
678
678
|
attributes: void 0,
|
|
679
679
|
listeners: void 0,
|
|
680
680
|
ref: void 0
|
|
681
|
-
}),
|
|
681
|
+
}), Et = (e) => {
|
|
682
682
|
let { children: t, value: n } = e;
|
|
683
|
-
return /* @__PURE__ */
|
|
683
|
+
return /* @__PURE__ */ G(Tt, {
|
|
684
684
|
value: n,
|
|
685
685
|
children: t
|
|
686
686
|
});
|
|
687
|
-
},
|
|
688
|
-
let r =
|
|
687
|
+
}, Dt = ({ children: e, id: t, sx: n }) => {
|
|
688
|
+
let r = fe(), { attributes: i, isDragging: a, listeners: o, setActivatorNodeRef: s, setNodeRef: c, transform: l, transition: u } = Be({ id: t }), d = V(() => ({
|
|
689
689
|
attributes: i,
|
|
690
690
|
listeners: o,
|
|
691
691
|
ref: s
|
|
@@ -694,13 +694,13 @@ color: i ? `${i} !important` : void 0 },
|
|
|
694
694
|
o,
|
|
695
695
|
s
|
|
696
696
|
]), f = {
|
|
697
|
-
transform:
|
|
697
|
+
transform: Ve.Translate.toString(l),
|
|
698
698
|
transition: u
|
|
699
699
|
};
|
|
700
|
-
return /* @__PURE__ */
|
|
700
|
+
return /* @__PURE__ */ G(Et, {
|
|
701
701
|
value: d,
|
|
702
|
-
children: /* @__PURE__ */
|
|
703
|
-
...
|
|
702
|
+
children: /* @__PURE__ */ G(j, {
|
|
703
|
+
...J.createAttributes("SortableListItem", { id: t }),
|
|
704
704
|
component: "li",
|
|
705
705
|
ref: c,
|
|
706
706
|
role: "row",
|
|
@@ -725,10 +725,10 @@ color: i ? `${i} !important` : void 0 },
|
|
|
725
725
|
children: e
|
|
726
726
|
})
|
|
727
727
|
});
|
|
728
|
-
},
|
|
729
|
-
let t =
|
|
730
|
-
return /* @__PURE__ */
|
|
731
|
-
...
|
|
728
|
+
}, Ot = ({ name: e }) => {
|
|
729
|
+
let t = fe(), { attributes: n, listeners: r, ref: i } = ge(Tt);
|
|
730
|
+
return /* @__PURE__ */ G(j, {
|
|
731
|
+
...J.createAttributes("SortableListItemDragHandle"),
|
|
732
732
|
component: "button",
|
|
733
733
|
...n,
|
|
734
734
|
...r,
|
|
@@ -754,20 +754,20 @@ color: i ? `${i} !important` : void 0 },
|
|
|
754
754
|
touchAction: "none"
|
|
755
755
|
},
|
|
756
756
|
type: "button",
|
|
757
|
-
children: /* @__PURE__ */
|
|
757
|
+
children: /* @__PURE__ */ G(He, {})
|
|
758
758
|
});
|
|
759
|
-
},
|
|
760
|
-
let i =
|
|
759
|
+
}, kt = ({ items: e, onChange: t, renderHeaderContent: n, renderItemContent: r }) => {
|
|
760
|
+
let i = fe(), { t: a } = q(), [o, s] = U(null), c = V(() => e.find((e) => e.id === o?.id), [o, e]), l = z((t) => e.find((e) => e.id === t), [e]), u = z((t) => e.findIndex((e) => e.id === t) + 1, [e]), d = Ie(X(Pe), X(Ne, { coordinateGetter: ze })), f = z(() => {
|
|
761
761
|
s(null);
|
|
762
|
-
}, []), p =
|
|
762
|
+
}, []), p = z(({ active: n, over: r }) => {
|
|
763
763
|
if (r && n.id !== r?.id) {
|
|
764
764
|
let i = e.findIndex(({ id: e }) => e === n.id), a = e.findIndex(({ id: e }) => e === r.id);
|
|
765
|
-
t(
|
|
765
|
+
t(Re(e, i, a));
|
|
766
766
|
}
|
|
767
767
|
s(null);
|
|
768
|
-
}, [e, t]), m =
|
|
768
|
+
}, [e, t]), m = z(({ active: e }) => {
|
|
769
769
|
s(e);
|
|
770
|
-
}, []), h =
|
|
770
|
+
}, []), h = z((n) => {
|
|
771
771
|
let r = n.target.getAttribute("data-id");
|
|
772
772
|
/* v8 ignore next 3 -- the checkbox input always receives data-id from slotProps */
|
|
773
773
|
if (r === null) return;
|
|
@@ -776,13 +776,13 @@ color: i ? `${i} !important` : void 0 },
|
|
|
776
776
|
...e,
|
|
777
777
|
isSelected: i
|
|
778
778
|
} : e));
|
|
779
|
-
}, [t, e]), g =
|
|
779
|
+
}, [t, e]), g = z((e) => /* @__PURE__ */ K(Dt, {
|
|
780
780
|
id: e.id,
|
|
781
781
|
children: [
|
|
782
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ G(j, {
|
|
783
783
|
role: "cell",
|
|
784
|
-
children: /* @__PURE__ */
|
|
785
|
-
control: /* @__PURE__ */
|
|
784
|
+
children: /* @__PURE__ */ G(ae, {
|
|
785
|
+
control: /* @__PURE__ */ G(re, {
|
|
786
786
|
"aria-label": a("Visibility for {{label}}", { label: e.label }),
|
|
787
787
|
checked: e.isSelected,
|
|
788
788
|
name: e.label,
|
|
@@ -795,7 +795,7 @@ color: i ? `${i} !important` : void 0 },
|
|
|
795
795
|
})
|
|
796
796
|
}),
|
|
797
797
|
r(e),
|
|
798
|
-
/* @__PURE__ */
|
|
798
|
+
/* @__PURE__ */ G(j, {
|
|
799
799
|
role: "cell",
|
|
800
800
|
sx: {
|
|
801
801
|
alignItems: "center",
|
|
@@ -804,7 +804,7 @@ color: i ? `${i} !important` : void 0 },
|
|
|
804
804
|
paddingRight: i.spacing(1),
|
|
805
805
|
width: "100%"
|
|
806
806
|
},
|
|
807
|
-
children: /* @__PURE__ */
|
|
807
|
+
children: /* @__PURE__ */ G(Ot, { name: a("Drag handle for {{label}}", { label: e.label }) })
|
|
808
808
|
})
|
|
809
809
|
]
|
|
810
810
|
}, e.id), [
|
|
@@ -813,7 +813,7 @@ color: i ? `${i} !important` : void 0 },
|
|
|
813
813
|
a,
|
|
814
814
|
i
|
|
815
815
|
]);
|
|
816
|
-
return /* @__PURE__ */
|
|
816
|
+
return /* @__PURE__ */ K(je, {
|
|
817
817
|
accessibility: {
|
|
818
818
|
announcements: {
|
|
819
819
|
onDragCancel: ({ active: t }) => {
|
|
@@ -860,10 +860,10 @@ color: i ? `${i} !important` : void 0 },
|
|
|
860
860
|
onDragEnd: p,
|
|
861
861
|
onDragStart: m,
|
|
862
862
|
sensors: d,
|
|
863
|
-
children: [/* @__PURE__ */
|
|
863
|
+
children: [/* @__PURE__ */ K(j, {
|
|
864
864
|
"aria-label": a("Change column order and visibility"),
|
|
865
865
|
role: "table",
|
|
866
|
-
children: [/* @__PURE__ */
|
|
866
|
+
children: [/* @__PURE__ */ K(j, {
|
|
867
867
|
role: "row",
|
|
868
868
|
sx: {
|
|
869
869
|
alignItems: "center",
|
|
@@ -873,27 +873,27 @@ color: i ? `${i} !important` : void 0 },
|
|
|
873
873
|
height: i.spacing(5)
|
|
874
874
|
},
|
|
875
875
|
children: [
|
|
876
|
-
/* @__PURE__ */
|
|
876
|
+
/* @__PURE__ */ G(j, {
|
|
877
877
|
component: "div",
|
|
878
878
|
role: "columnheader",
|
|
879
879
|
sx: { fontWeight: "bold" },
|
|
880
880
|
children: a`Visible`
|
|
881
881
|
}),
|
|
882
|
-
n ? n() : /* @__PURE__ */
|
|
882
|
+
n ? n() : /* @__PURE__ */ G(j, {
|
|
883
883
|
component: "div",
|
|
884
884
|
role: "columnheader",
|
|
885
885
|
sx: { fontWeight: "bold" },
|
|
886
886
|
children: a`Column`
|
|
887
887
|
}),
|
|
888
|
-
/* @__PURE__ */
|
|
888
|
+
/* @__PURE__ */ G(j, {
|
|
889
889
|
"aria-label": a`Reorder`,
|
|
890
890
|
role: "columnheader"
|
|
891
891
|
})
|
|
892
892
|
]
|
|
893
|
-
}), /* @__PURE__ */
|
|
893
|
+
}), /* @__PURE__ */ G(Le, {
|
|
894
894
|
items: e,
|
|
895
|
-
children: /* @__PURE__ */
|
|
896
|
-
...
|
|
895
|
+
children: /* @__PURE__ */ G(j, {
|
|
896
|
+
...J.createAttributes("SortableList"),
|
|
897
897
|
component: "ul",
|
|
898
898
|
role: "rowgroup",
|
|
899
899
|
sx: {
|
|
@@ -905,15 +905,15 @@ color: i ? `${i} !important` : void 0 },
|
|
|
905
905
|
children: e.map((e) => g(e))
|
|
906
906
|
})
|
|
907
907
|
})]
|
|
908
|
-
}), /* @__PURE__ */
|
|
908
|
+
}), /* @__PURE__ */ G(wt, { children: c ? g(c) : null })]
|
|
909
909
|
});
|
|
910
|
-
},
|
|
911
|
-
let { t: o } =
|
|
910
|
+
}, At = Y(({ onActionsChange: e, onClose: t, onTitleChange: n, openProps: { hasCellData: r }, renderHeaderContent: i, renderItemContent: a }) => {
|
|
911
|
+
let { t: o } = q(), [s, c] = U([]), l = v(), u = m(l, Q((e) => e.emitEvent)), d = m(l, Q((e) => e.dataContext)), f = m(l, Q((e) => e.getCurrentColumnVisualSettings())), h = m(l, Q((e) => e.columns)), g = m(l, Q((e) => e.sortedData)), _ = V(() => {
|
|
912
912
|
let e = /* @__PURE__ */ new Map();
|
|
913
913
|
return h.forEach((t) => {
|
|
914
914
|
e.set(t.id, t);
|
|
915
915
|
}), e;
|
|
916
|
-
}, [h]), y =
|
|
916
|
+
}, [h]), y = z((e) => {
|
|
917
917
|
let t = [];
|
|
918
918
|
e.forEach((e) => {
|
|
919
919
|
let n = _.get(e.id);
|
|
@@ -926,16 +926,16 @@ color: i ? `${i} !important` : void 0 },
|
|
|
926
926
|
});
|
|
927
927
|
}), c(t);
|
|
928
928
|
}, [_]);
|
|
929
|
-
|
|
929
|
+
B(() => {
|
|
930
930
|
y(f);
|
|
931
931
|
}, [f, y]);
|
|
932
|
-
let b =
|
|
932
|
+
let b = z(() => {
|
|
933
933
|
y(p.createInitialVisualColumnSettings(h));
|
|
934
934
|
}, [h, y]);
|
|
935
|
-
|
|
935
|
+
B(() => {
|
|
936
936
|
n(o`Change column order and visibility`);
|
|
937
937
|
}, [n, o]);
|
|
938
|
-
let x =
|
|
938
|
+
let x = z(() => {
|
|
939
939
|
u("columnVisibilityChange", [...h.filter((e) => e.frozen).map((e) => e.id), ...s.filter((e) => e.isSelected).map((e) => e.id.toString())]);
|
|
940
940
|
let e = h.findIndex((e) => !e.frozen), n = h.slice(0, e), r = h.slice(e + s.length);
|
|
941
941
|
u("columnOrderChange", [
|
|
@@ -948,7 +948,7 @@ color: i ? `${i} !important` : void 0 },
|
|
|
948
948
|
u,
|
|
949
949
|
s,
|
|
950
950
|
t
|
|
951
|
-
]), S =
|
|
951
|
+
]), S = z((e) => {
|
|
952
952
|
let t = p.getColumnIdsWithData({
|
|
953
953
|
dataContext: d,
|
|
954
954
|
hasCellData: r,
|
|
@@ -966,25 +966,25 @@ color: i ? `${i} !important` : void 0 },
|
|
|
966
966
|
s,
|
|
967
967
|
g,
|
|
968
968
|
h
|
|
969
|
-
]), C =
|
|
969
|
+
]), C = z(() => {
|
|
970
970
|
S(() => !0);
|
|
971
|
-
}, [S]), w =
|
|
971
|
+
}, [S]), w = z(() => {
|
|
972
972
|
S((e) => e.isSelected);
|
|
973
|
-
}, [S]), T =
|
|
973
|
+
}, [S]), T = z(() => {
|
|
974
974
|
c((e) => e.map((e) => ({
|
|
975
975
|
...e,
|
|
976
976
|
isSelected: !0
|
|
977
977
|
})));
|
|
978
|
-
}, []), E =
|
|
978
|
+
}, []), E = z(() => {
|
|
979
979
|
c((e) => e.map((e) => ({
|
|
980
980
|
...e,
|
|
981
981
|
isSelected: !1
|
|
982
982
|
})));
|
|
983
983
|
}, []);
|
|
984
|
-
|
|
984
|
+
B(() => {
|
|
985
985
|
e([
|
|
986
986
|
{
|
|
987
|
-
...
|
|
987
|
+
...J.createAttributes("TableColumnOrderDialog-enable-all"),
|
|
988
988
|
autoFocus: !0,
|
|
989
989
|
color: "secondary",
|
|
990
990
|
label: o`Show all`,
|
|
@@ -992,7 +992,7 @@ color: i ? `${i} !important` : void 0 },
|
|
|
992
992
|
variant: "outlined"
|
|
993
993
|
},
|
|
994
994
|
{
|
|
995
|
-
...
|
|
995
|
+
...J.createAttributes("TableColumnOrderDialog-enable-all-with-data"),
|
|
996
996
|
autoFocus: !0,
|
|
997
997
|
color: "secondary",
|
|
998
998
|
label: o`Show all with data`,
|
|
@@ -1000,7 +1000,7 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1000
1000
|
variant: "outlined"
|
|
1001
1001
|
},
|
|
1002
1002
|
{
|
|
1003
|
-
...
|
|
1003
|
+
...J.createAttributes("TableColumnOrderDialog-disable-all"),
|
|
1004
1004
|
autoFocus: !0,
|
|
1005
1005
|
color: "secondary",
|
|
1006
1006
|
label: o`Hide all`,
|
|
@@ -1008,7 +1008,7 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1008
1008
|
variant: "outlined"
|
|
1009
1009
|
},
|
|
1010
1010
|
{
|
|
1011
|
-
...
|
|
1011
|
+
...J.createAttributes("TableColumnOrderDialog-disable-all-without-data"),
|
|
1012
1012
|
autoFocus: !0,
|
|
1013
1013
|
color: "secondary",
|
|
1014
1014
|
label: o`Hide all without data`,
|
|
@@ -1016,7 +1016,7 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1016
1016
|
variant: "outlined"
|
|
1017
1017
|
},
|
|
1018
1018
|
{
|
|
1019
|
-
...
|
|
1019
|
+
...J.createAttributes("TableColumnOrderDialog-reset"),
|
|
1020
1020
|
autoFocus: !0,
|
|
1021
1021
|
color: "secondary",
|
|
1022
1022
|
label: o`Reset to default`,
|
|
@@ -1024,7 +1024,7 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1024
1024
|
variant: "outlined"
|
|
1025
1025
|
},
|
|
1026
1026
|
{
|
|
1027
|
-
...
|
|
1027
|
+
...J.createAttributes("TableColumnOrderDialog-close"),
|
|
1028
1028
|
autoFocus: !0,
|
|
1029
1029
|
color: "primary",
|
|
1030
1030
|
label: o`Close`,
|
|
@@ -1032,7 +1032,7 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1032
1032
|
variant: "outlined"
|
|
1033
1033
|
},
|
|
1034
1034
|
{
|
|
1035
|
-
...
|
|
1035
|
+
...J.createAttributes("TableColumnOrderDialog-save"),
|
|
1036
1036
|
autoFocus: !0,
|
|
1037
1037
|
color: "secondary",
|
|
1038
1038
|
label: o`Apply`,
|
|
@@ -1051,15 +1051,15 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1051
1051
|
o,
|
|
1052
1052
|
w
|
|
1053
1053
|
]);
|
|
1054
|
-
let D =
|
|
1054
|
+
let D = z((e) => {
|
|
1055
1055
|
c(e);
|
|
1056
|
-
}, []), O =
|
|
1056
|
+
}, []), O = z((e) => /* @__PURE__ */ G(j, {
|
|
1057
1057
|
role: "cell",
|
|
1058
1058
|
children: e.label
|
|
1059
1059
|
}), []);
|
|
1060
|
-
return /* @__PURE__ */
|
|
1060
|
+
return /* @__PURE__ */ G(j, {
|
|
1061
1061
|
sx: {},
|
|
1062
|
-
children: /* @__PURE__ */
|
|
1062
|
+
children: /* @__PURE__ */ G(kt, {
|
|
1063
1063
|
items: s,
|
|
1064
1064
|
onChange: D,
|
|
1065
1065
|
renderHeaderContent: i,
|
|
@@ -1073,14 +1073,14 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1073
1073
|
maxWidth: "lg",
|
|
1074
1074
|
noCloseButton: !1,
|
|
1075
1075
|
testId: "TableColumnOrderDialog"
|
|
1076
|
-
}),
|
|
1077
|
-
let { t: r } =
|
|
1076
|
+
}), jt = ({ cell: e, onCheckBoxClick: t, tableColumn: n }) => {
|
|
1077
|
+
let { t: r } = q(), i = v(), a = m(i, Q((e) => e.idSelectorCallback)), o = m(i, Q((e) => e.selectedIds)), s = m(i, Q((e) => e.setSelectedIds)), c = a(e.row), l = z((e) => {
|
|
1078
1078
|
e.stopPropagation(), e.shiftKey && e.preventDefault(), t(e, c);
|
|
1079
|
-
}, [t, c]), u =
|
|
1079
|
+
}, [t, c]), u = z((e, t) => {
|
|
1080
1080
|
let n = e.target.getAttribute("name");
|
|
1081
1081
|
t && !o.includes(n) ? s([...o, n]) : t || s(o.filter((e) => e !== n));
|
|
1082
1082
|
}, [o, s]);
|
|
1083
|
-
return /* @__PURE__ */
|
|
1083
|
+
return /* @__PURE__ */ G(re, {
|
|
1084
1084
|
checked: o.includes(c),
|
|
1085
1085
|
disabled: n.isDisabled ? n.isDisabled(e) : !1,
|
|
1086
1086
|
name: a(e.row),
|
|
@@ -1092,15 +1092,15 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1092
1092
|
padding: 0
|
|
1093
1093
|
}
|
|
1094
1094
|
});
|
|
1095
|
-
},
|
|
1096
|
-
let { t } =
|
|
1095
|
+
}, Mt = /* @__PURE__ */ e(l(), 1), Nt = ({ tableColumnParams: e }) => {
|
|
1096
|
+
let { t } = q(), n = e.column, r = v(), i = m(r, Q((e) => e.dataContext)), a = m(r, Q((e) => e.idSelectorCallback)), o = m(r, Q((e) => e.selectedIds)), s = m(r, Q((e) => e.sortedData)), c = m(r, Q((e) => e.setSelectedIds)), l = n.isDisabled ? s.filter((e) => n.isDisabled({
|
|
1097
1097
|
dataContext: i,
|
|
1098
1098
|
id: a(e),
|
|
1099
1099
|
row: e,
|
|
1100
1100
|
rowIndex: s.indexOf(e)
|
|
1101
|
-
}) === !1) : s, u = l.every((e) => o.includes(a(e))), d = l.some((e) => o.includes(a(e))), f =
|
|
1101
|
+
}) === !1) : s, u = l.every((e) => o.includes(a(e))), d = l.some((e) => o.includes(a(e))), f = z((e) => {
|
|
1102
1102
|
let t = l.map((e) => a(e));
|
|
1103
|
-
c(u ? o.filter((e) => !t.includes(e)) : (0,
|
|
1103
|
+
c(u ? o.filter((e) => !t.includes(e)) : (0, Mt.default)([...o, ...t]));
|
|
1104
1104
|
}, [
|
|
1105
1105
|
l,
|
|
1106
1106
|
a,
|
|
@@ -1108,9 +1108,9 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1108
1108
|
o,
|
|
1109
1109
|
c
|
|
1110
1110
|
]);
|
|
1111
|
-
return /* @__PURE__ */
|
|
1111
|
+
return /* @__PURE__ */ G(re, {
|
|
1112
1112
|
checked: d,
|
|
1113
|
-
checkedIcon: u ? void 0 : /* @__PURE__ */
|
|
1113
|
+
checkedIcon: u ? void 0 : /* @__PURE__ */ G(Z, {}),
|
|
1114
1114
|
name: "select-all",
|
|
1115
1115
|
onChange: f,
|
|
1116
1116
|
slotProps: { input: { "aria-label": t`Select all` } },
|
|
@@ -1119,8 +1119,8 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1119
1119
|
padding: 0
|
|
1120
1120
|
}
|
|
1121
1121
|
});
|
|
1122
|
-
},
|
|
1123
|
-
let i = g(), a =
|
|
1122
|
+
}, Pt = ({ cell: e, getRowName: t, onReadableIndexClick: n, tableColumn: r }) => {
|
|
1123
|
+
let i = g(), a = z((r) => {
|
|
1124
1124
|
/* v8 ignore next -- onClick is only attached to the button rendered when onReadableIndexClick is set */
|
|
1125
1125
|
if (n) {
|
|
1126
1126
|
if (!t) throw Error("getRowName is required when onReadableIndexClick is provided");
|
|
@@ -1135,7 +1135,7 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1135
1135
|
n,
|
|
1136
1136
|
e.row
|
|
1137
1137
|
]);
|
|
1138
|
-
return n ? /* @__PURE__ */
|
|
1138
|
+
return n ? /* @__PURE__ */ G(M, {
|
|
1139
1139
|
"aria-label": r.getAriaLabel(e),
|
|
1140
1140
|
color: "primary",
|
|
1141
1141
|
onClick: a,
|
|
@@ -1149,155 +1149,159 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1149
1149
|
variant: "text",
|
|
1150
1150
|
children: e.rowIndex + 1
|
|
1151
1151
|
}) : e.rowIndex + 1;
|
|
1152
|
-
},
|
|
1153
|
-
let T =
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1152
|
+
}, Ft = ({ font: e, forceHorizontalOverflow: t, getRowName: n, headerHeight: r = 4, initialVisibleItemIndex: i, onRangeChanged: a = nt.default, onReadableIndexClick: o, onRowClick: s, onRowMouseEnter: c = nt.default, onRowMouseLeave: l = nt.default, onVerticalScrollPositionChange: u, onVisibleItemIndexChange: d, overscanMain: f, overscanReverse: _, ref: y, renderColumnsEditorHeaderContent: b, renderColumnsEditorItemContent: x, rowHeight: S = 4, rowHighlightingSubject: C, sx: w }) => {
|
|
1153
|
+
let T = fe(), E = V(() => ({
|
|
1154
|
+
headerDivider: le(T.palette.divider, .15),
|
|
1155
|
+
rowDivider: ue(T.palette.divider, .1),
|
|
1156
|
+
...T.components?.GenEpixUiClientCommonTable ?? {}
|
|
1157
|
+
}), [T]), D = T.spacing(S), O = +D.replace("px", ""), { t: ee } = q(), k = g(), A = te.resolve(ne), M = v(), { DEFAULT_OVERSCAN_MAIN: re, DEFAULT_OVERSCAN_REVERSE: ie } = k.table;
|
|
1158
|
+
m(M, Q((e) => e.getCurrentColumnVisualSettings().filter((e) => e.isVisible).map((e) => e.id)));
|
|
1159
|
+
let ae = m(M, Q((e) => e.setCurrentColumnVisualSettings)), N = m(M, Q((e) => e.sortedData)), P = m(M, Q((e) => e.idSelectorCallback)), F = m(M, Q((e) => e.columns)), oe = m(M, Q((e) => e.isInitialized)), se = m(M, Q((e) => e.isRowEnabledCallback)), ce = m(M, Q((e) => e.addEventListener)), I = m(M, Q((e) => e.dataContext)), de = m(M, Q((e) => e.isCondensed)), pe = m(M, Q((e) => e.setSelectedIds)), me = m(M, Q((e) => e.columnDimensions)), L = H(null), ge = H(nt.default), [_e, Se] = U(!1), Ce = H(null), we = xe(), Te = H(null), Ee = H(0), De = H(null), Oe = H(/* @__PURE__ */ new Set()), ke = H(!1), Ae = H(null), [Y, je] = U(), Me = H(null), Ne = H(null), Pe = H(null);
|
|
1160
|
+
m(M, (e) => JSON.stringify(e.filters.map((e) => [e.filterValue, e.includeMissingValues]))), m(M, Q((e) => e.sortByField)), m(M, Q((e) => e.sortDirection));
|
|
1161
|
+
let Fe = z((e, t) => {
|
|
1158
1162
|
if (s) {
|
|
1159
1163
|
if (!n) throw Error("getRowName is required when onRowClick is provided");
|
|
1160
|
-
|
|
1164
|
+
k.enablePageEvents && te.resolve(h).emit("click", {
|
|
1161
1165
|
label: n(e.row),
|
|
1162
1166
|
type: "table-row"
|
|
1163
1167
|
}), t.preventDefault(), t.stopPropagation(), s(e);
|
|
1164
1168
|
}
|
|
1165
1169
|
}, [
|
|
1166
|
-
|
|
1170
|
+
k.enablePageEvents,
|
|
1167
1171
|
n,
|
|
1168
1172
|
s
|
|
1169
|
-
]),
|
|
1173
|
+
]), X = z(() => L?.current?.filter((e) => e.isVisible) ?? [], []), Ie = V(() => {
|
|
1170
1174
|
let e = /* @__PURE__ */ new Map();
|
|
1171
|
-
return
|
|
1175
|
+
return F.forEach((t) => {
|
|
1172
1176
|
e.set(t.id, t);
|
|
1173
1177
|
}), e;
|
|
1174
|
-
}, [
|
|
1175
|
-
if (!
|
|
1176
|
-
let e = (0,
|
|
1177
|
-
|
|
1178
|
-
}, [
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
}, [
|
|
1182
|
-
let
|
|
1178
|
+
}, [F]), Le = z(() => {
|
|
1179
|
+
if (!L?.current?.length || !Y) return;
|
|
1180
|
+
let e = (0, $e.default)(X(), (e) => e.calculatedWidth), t = Y.querySelector("[role=table]");
|
|
1181
|
+
Ee.current = e, t && (t.style.width = `${e}px`);
|
|
1182
|
+
}, [X, Y]);
|
|
1183
|
+
ye(() => {
|
|
1184
|
+
Le();
|
|
1185
|
+
}, [Le]);
|
|
1186
|
+
let Re = z((e, t) => /* @__PURE__ */ G(Pt, {
|
|
1183
1187
|
cell: t,
|
|
1184
1188
|
getRowName: n,
|
|
1185
1189
|
onReadableIndexClick: o,
|
|
1186
1190
|
tableColumn: e
|
|
1187
|
-
}, t.id), [n, o]),
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
}, [
|
|
1191
|
-
let
|
|
1192
|
-
if (!e.shiftKey || !
|
|
1193
|
-
|
|
1191
|
+
}, t.id), [n, o]), ze = z((e) => /* @__PURE__ */ G(Nt, { tableColumnParams: e }), []);
|
|
1192
|
+
B(() => {
|
|
1193
|
+
Ne.current = null;
|
|
1194
|
+
}, [N]);
|
|
1195
|
+
let Be = z((e, t) => {
|
|
1196
|
+
if (!e.shiftKey || !Ne.current) {
|
|
1197
|
+
Ne.current = t;
|
|
1194
1198
|
return;
|
|
1195
1199
|
}
|
|
1196
|
-
let n =
|
|
1200
|
+
let n = N.findIndex((e) => P(e) === Ne.current), r = N.findIndex((e) => P(e) === t);
|
|
1197
1201
|
/* v8 ignore next 3 -- the reset effect on sortedData guarantees the last clicked row is in sortedData, and the clicked row comes from sortedData */
|
|
1198
1202
|
if (n === -1 || r === -1) return;
|
|
1199
|
-
let [i, a] = n < r ? [n, r] : [r, n], o =
|
|
1200
|
-
pe(c),
|
|
1203
|
+
let [i, a] = n < r ? [n, r] : [r, n], o = N.slice(i, a + 1).map((e) => P(e)), s = M.getState().selectedIds, c = M.getState().selectedIds.includes(t) ? s.filter((e) => !o.includes(e)) : Array.from(/* @__PURE__ */ new Set([...s, ...o]));
|
|
1204
|
+
pe(c), Ne.current = t;
|
|
1201
1205
|
}, [
|
|
1202
|
-
|
|
1206
|
+
P,
|
|
1203
1207
|
pe,
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
]),
|
|
1207
|
-
let n =
|
|
1208
|
-
return /* @__PURE__ */
|
|
1208
|
+
N,
|
|
1209
|
+
M
|
|
1210
|
+
]), Ve = z((e, t) => {
|
|
1211
|
+
let n = P(t.row);
|
|
1212
|
+
return /* @__PURE__ */ G(jt, {
|
|
1209
1213
|
cell: t,
|
|
1210
|
-
onCheckBoxClick:
|
|
1214
|
+
onCheckBoxClick: Be,
|
|
1211
1215
|
tableColumn: e
|
|
1212
1216
|
}, n);
|
|
1213
|
-
}, [
|
|
1214
|
-
if (!
|
|
1215
|
-
let e = p.updateColumnSizesInVisualSettings(
|
|
1216
|
-
|
|
1217
|
+
}, [P, Be]), He = z(() => {
|
|
1218
|
+
if (!F.length || !Y) return;
|
|
1219
|
+
let e = p.updateColumnSizesInVisualSettings(Y, we, N, F, L.current);
|
|
1220
|
+
_e && (Y.querySelectorAll("[data-column-index]").forEach((t) => {
|
|
1217
1221
|
let n = t.getAttribute("data-id");
|
|
1218
1222
|
t.style.width = `${e.get(n).calculatedWidth}px`;
|
|
1219
|
-
}),
|
|
1223
|
+
}), Le());
|
|
1220
1224
|
}, [
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1225
|
+
_e,
|
|
1226
|
+
we,
|
|
1227
|
+
N,
|
|
1228
|
+
F,
|
|
1229
|
+
Y,
|
|
1230
|
+
Le
|
|
1227
1231
|
]);
|
|
1228
|
-
|
|
1229
|
-
|
|
1232
|
+
B(() => {
|
|
1233
|
+
Y && !_e && oe && (L.current = M.getState().getCurrentColumnVisualSettings(), He(), Le(), Se(!0));
|
|
1230
1234
|
}, [
|
|
1231
|
-
|
|
1235
|
+
_e,
|
|
1232
1236
|
oe,
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
+
Y,
|
|
1238
|
+
M,
|
|
1239
|
+
He,
|
|
1240
|
+
Le
|
|
1237
1241
|
]);
|
|
1238
|
-
let
|
|
1239
|
-
ae(
|
|
1240
|
-
}, [ae]),
|
|
1241
|
-
|
|
1242
|
-
}, 500, { trailing: !0 }),
|
|
1243
|
-
e.calculatedWidth = t, e.widthPx = t, e.hasResized = !0,
|
|
1244
|
-
}, [
|
|
1242
|
+
let Z = z(() => Y?.querySelector("[data-virtuoso-scroller=true]"), [Y]), Ue = z(() => {
|
|
1243
|
+
ae(L.current.map((e) => ({ ...e })));
|
|
1244
|
+
}, [ae]), We = rt(() => {
|
|
1245
|
+
Ue();
|
|
1246
|
+
}, 500, { trailing: !0 }), Ge = z((e, t) => {
|
|
1247
|
+
e.calculatedWidth = t, e.widthPx = t, e.hasResized = !0, He(), We();
|
|
1248
|
+
}, [He, We]), Ke = z((e, t) => {
|
|
1245
1249
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
1246
1250
|
e.preventDefault();
|
|
1247
|
-
let n =
|
|
1248
|
-
|
|
1249
|
-
}, [
|
|
1251
|
+
let n = L.current.find((e) => e.id === t.id), r = n.calculatedWidth, i = e.key === "ArrowLeft" ? Math.max(50, r - 10) : r + 10;
|
|
1252
|
+
Ge(n, i);
|
|
1253
|
+
}, [Ge]), qe = z((e, t) => {
|
|
1250
1254
|
e.preventDefault();
|
|
1251
|
-
let n =
|
|
1255
|
+
let n = L.current.find((e) => e.id === t.id), r = e.clientX, i = n?.calculatedWidth, a = (e) => {
|
|
1252
1256
|
let t = e.clientX;
|
|
1253
1257
|
if (r === t) return;
|
|
1254
1258
|
let a = t - r, o = Math.max(50, i + a);
|
|
1255
|
-
i !== o &&
|
|
1259
|
+
i !== o && Ge(n, o);
|
|
1256
1260
|
}, o = (e) => {
|
|
1257
|
-
|
|
1261
|
+
ge.current(), ge.current = nt.default;
|
|
1258
1262
|
};
|
|
1259
|
-
document.addEventListener("mousemove", a), document.addEventListener("mouseup", o),
|
|
1263
|
+
document.addEventListener("mousemove", a), document.addEventListener("mouseup", o), ge.current = () => {
|
|
1260
1264
|
document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", o);
|
|
1261
1265
|
};
|
|
1262
|
-
}, [
|
|
1263
|
-
|
|
1264
|
-
|
|
1266
|
+
}, [Ge]);
|
|
1267
|
+
B(() => () => {
|
|
1268
|
+
ge.current();
|
|
1265
1269
|
}, []);
|
|
1266
|
-
let
|
|
1267
|
-
|
|
1270
|
+
let Je = z((e, t) => p.handleMoveColumn(me, L.current, F, e, t), [me, F]), Ye = z(() => {
|
|
1271
|
+
Y.querySelectorAll("[data-column-index]").forEach((e) => {
|
|
1268
1272
|
let t = e.getAttribute("data-id");
|
|
1269
|
-
e.style.order =
|
|
1273
|
+
e.style.order = L.current.findIndex((e) => e.id === t).toString();
|
|
1270
1274
|
});
|
|
1271
|
-
}, [
|
|
1272
|
-
|
|
1275
|
+
}, [Y]);
|
|
1276
|
+
B(() => {
|
|
1273
1277
|
let e = () => {
|
|
1274
|
-
|
|
1278
|
+
He(), Ye();
|
|
1275
1279
|
};
|
|
1276
|
-
return
|
|
1277
|
-
|
|
1280
|
+
return A.window.addEventListener("resize", e), () => {
|
|
1281
|
+
A.window.removeEventListener("resize", e);
|
|
1278
1282
|
};
|
|
1279
1283
|
}, [
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1284
|
+
Ye,
|
|
1285
|
+
He,
|
|
1286
|
+
A.window
|
|
1283
1287
|
]);
|
|
1284
|
-
let
|
|
1285
|
-
let t =
|
|
1288
|
+
let Xe = z((e) => {
|
|
1289
|
+
let t = X();
|
|
1286
1290
|
return {
|
|
1287
1291
|
elementIndex: t.findIndex((t) => t.id === e.id),
|
|
1288
1292
|
visibleTableSettingsColumns: t,
|
|
1289
1293
|
widths: t.map((e) => e.calculatedWidth)
|
|
1290
1294
|
};
|
|
1291
|
-
}, [
|
|
1292
|
-
let n =
|
|
1295
|
+
}, [X]), Ze = z((e, t) => {
|
|
1296
|
+
let n = A.body, r = A.document;
|
|
1293
1297
|
/* v8 ignore next 3 -- a browser window always has a document with a body, so this guard cannot be reached */
|
|
1294
1298
|
if (!n || !r) throw Error("Cannot handle table column dragging without a document body.");
|
|
1295
|
-
let i =
|
|
1296
|
-
if (e.type === "start" && (n.style.setProperty("overflow", "hidden"),
|
|
1299
|
+
let i = Xe(t);
|
|
1300
|
+
if (e.type === "start" && (n.style.setProperty("overflow", "hidden"), Y?.style.setProperty("--selection-background", "none"), e.target.style.setProperty("opacity", "0.3"), Pe.current = {
|
|
1297
1301
|
clonedElement: e.target.cloneNode(!0),
|
|
1298
1302
|
elementOffsetX: i.widths.slice(0, i.elementIndex).reduce((e, t) => e + t, 0) - 15,
|
|
1299
|
-
scrollPosition:
|
|
1300
|
-
},
|
|
1303
|
+
scrollPosition: Z().scrollLeft
|
|
1304
|
+
}, Pe.current.clonedElement.style.cssText = `
|
|
1301
1305
|
font-weight: bold;
|
|
1302
1306
|
position: absolute;
|
|
1303
1307
|
top: ${e.target.getBoundingClientRect().top}px;
|
|
@@ -1306,46 +1310,46 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1306
1310
|
pointer-events: none;
|
|
1307
1311
|
filter: blur(0.5px);
|
|
1308
1312
|
box-shadow: 1px 2px 3px 0px rgba(0,0,0,0.5);
|
|
1309
|
-
`, n.appendChild(
|
|
1310
|
-
|
|
1311
|
-
let n =
|
|
1312
|
-
(n < r &&
|
|
1313
|
+
`, n.appendChild(Pe.current.clonedElement), Ce.current?.style.setProperty("pointer-events", "none")), e.type === "end" && (Ce.current?.style.removeProperty("pointer-events"), n.style.removeProperty("overflow"), Y?.style.setProperty("--selection-background", "highlight"), r.getSelection().empty(), Pe.current.clonedElement.remove(), e.target.style.setProperty("opacity", "1")), e.type === "move") {
|
|
1314
|
+
Pe.current.clonedElement.style.setProperty("left", `${e.clientX - e.elementOffsetX}px`), Pe.current.clonedElement.style.setProperty("top", `${e.clientY}px`);
|
|
1315
|
+
let n = Pe.current.elementOffsetX + e.deltaX + e.elementOffsetX + (Z().scrollLeft - Pe.current.scrollPosition), r = i.widths.slice(0, i.elementIndex - 1).reduce((e, t) => e + t, 0) + Math.min(16, i.widths?.[i.elementIndex - 1] ?? Infinity), a = i.widths.slice(0, i.elementIndex + 1).reduce((e, t) => e + t, 0) + Math.min(16, i.widths?.[i.elementIndex + 1] ?? Infinity);
|
|
1316
|
+
(n < r && Je(t, -1) || n > a && Je(t, 1)) && (Ye(), Xe(t));
|
|
1313
1317
|
}
|
|
1314
1318
|
}, [
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
+
Xe,
|
|
1320
|
+
Z,
|
|
1321
|
+
Je,
|
|
1322
|
+
Y?.style,
|
|
1319
1323
|
T.zIndex.modal,
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
]),
|
|
1324
|
+
Ye,
|
|
1325
|
+
A.body,
|
|
1326
|
+
A.document
|
|
1327
|
+
]), Qe = z(() => /* @__PURE__ */ G(j, {
|
|
1324
1328
|
"aria-rowindex": 1,
|
|
1325
|
-
ref:
|
|
1329
|
+
ref: Ce,
|
|
1326
1330
|
role: "row",
|
|
1327
1331
|
sx: {
|
|
1328
|
-
[`&:hover .${
|
|
1332
|
+
[`&:hover .${$.columnDivider}`]: { opacity: 1 },
|
|
1329
1333
|
background: T.palette.background.paper,
|
|
1330
|
-
borderBottom: `1px solid ${
|
|
1334
|
+
borderBottom: `1px solid ${E.headerDivider}`,
|
|
1331
1335
|
display: "flex",
|
|
1332
1336
|
fontWeight: "bold",
|
|
1333
1337
|
height: T.spacing(r),
|
|
1334
1338
|
zIndex: 3
|
|
1335
1339
|
},
|
|
1336
|
-
children:
|
|
1337
|
-
let n =
|
|
1338
|
-
return n ? /* @__PURE__ */
|
|
1340
|
+
children: X().map((e, t) => {
|
|
1341
|
+
let n = Ie.get(e.id);
|
|
1342
|
+
return n ? /* @__PURE__ */ G(St, {
|
|
1339
1343
|
column: n.type === "selectable" ? {
|
|
1340
1344
|
...n,
|
|
1341
|
-
renderHeaderContent:
|
|
1345
|
+
renderHeaderContent: ze
|
|
1342
1346
|
} : n,
|
|
1343
1347
|
columnIndex: t,
|
|
1344
|
-
dividerColor:
|
|
1348
|
+
dividerColor: E.headerDivider,
|
|
1345
1349
|
height: T.spacing(r),
|
|
1346
|
-
onColumnDividerKeyDown:
|
|
1347
|
-
onColumnDividerMouseDown:
|
|
1348
|
-
onCustomDrag:
|
|
1350
|
+
onColumnDividerKeyDown: Ke,
|
|
1351
|
+
onColumnDividerMouseDown: qe,
|
|
1352
|
+
onCustomDrag: Ze,
|
|
1349
1353
|
order: t,
|
|
1350
1354
|
role: "columnheader",
|
|
1351
1355
|
width: e.calculatedWidth,
|
|
@@ -1355,70 +1359,70 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1355
1359
|
}), [
|
|
1356
1360
|
T,
|
|
1357
1361
|
r,
|
|
1358
|
-
|
|
1359
|
-
|
|
1362
|
+
E,
|
|
1363
|
+
X,
|
|
1364
|
+
Ie,
|
|
1360
1365
|
ze,
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
let a = ze.get(r.id);
|
|
1366
|
+
qe,
|
|
1367
|
+
Ke,
|
|
1368
|
+
Ze
|
|
1369
|
+
]), it = z((e, t) => {
|
|
1370
|
+
let n = !se || se(t, I);
|
|
1371
|
+
return /* @__PURE__ */ G(W, { children: X().map((r, i) => {
|
|
1372
|
+
let a = Ie.get(r.id);
|
|
1369
1373
|
if (!a) return null;
|
|
1370
1374
|
let o;
|
|
1371
1375
|
if (a.cellTitleGetter) o = a.cellTitleGetter({
|
|
1372
1376
|
column: a,
|
|
1373
|
-
dataContext:
|
|
1377
|
+
dataContext: I,
|
|
1374
1378
|
id: r.id,
|
|
1375
1379
|
row: t,
|
|
1376
1380
|
rowIndex: e
|
|
1377
1381
|
});
|
|
1378
1382
|
else if (a.type === "text") o = p.getTableTextCellValue({
|
|
1379
1383
|
column: a,
|
|
1380
|
-
dataContext:
|
|
1384
|
+
dataContext: I,
|
|
1381
1385
|
row: t,
|
|
1382
1386
|
rowIndex: e
|
|
1383
1387
|
});
|
|
1384
1388
|
else if (a.type === "boolean") o = p.getTableBooleanCellDisplayValue({
|
|
1385
1389
|
column: a,
|
|
1386
|
-
dataContext:
|
|
1390
|
+
dataContext: I,
|
|
1387
1391
|
row: t,
|
|
1388
1392
|
rowIndex: e,
|
|
1389
|
-
t:
|
|
1393
|
+
t: ee
|
|
1390
1394
|
});
|
|
1391
1395
|
else if (a.type === "number") {
|
|
1392
1396
|
let n = p.getTableNumberCellValue({
|
|
1393
1397
|
column: a,
|
|
1394
|
-
dataContext:
|
|
1398
|
+
dataContext: I,
|
|
1395
1399
|
row: t,
|
|
1396
1400
|
rowIndex: e
|
|
1397
1401
|
});
|
|
1398
|
-
o = (0,
|
|
1402
|
+
o = (0, et.default)(n) ? n.toString() : "";
|
|
1399
1403
|
} else a.type === "date" ? o = p.getTableDateCellValue({
|
|
1400
1404
|
column: a,
|
|
1401
|
-
dataContext:
|
|
1405
|
+
dataContext: I,
|
|
1402
1406
|
row: t,
|
|
1403
1407
|
rowIndex: e
|
|
1404
1408
|
}) : a.type === "options" && (o = p.getTableOptionsCellDisplayValue({
|
|
1405
1409
|
column: a,
|
|
1406
|
-
dataContext:
|
|
1410
|
+
dataContext: I,
|
|
1407
1411
|
row: t,
|
|
1408
1412
|
rowIndex: e
|
|
1409
1413
|
}));
|
|
1410
1414
|
let s = {
|
|
1411
|
-
backgroundColor:
|
|
1415
|
+
backgroundColor: de && a.cellColorGetter ? a.cellColorGetter({
|
|
1412
1416
|
column: a,
|
|
1413
|
-
dataContext:
|
|
1417
|
+
dataContext: I,
|
|
1414
1418
|
id: r.id,
|
|
1415
1419
|
row: t,
|
|
1416
1420
|
rowIndex: e
|
|
1417
1421
|
}) : void 0,
|
|
1418
1422
|
columnIndex: i,
|
|
1419
1423
|
enabled: n,
|
|
1420
|
-
height:
|
|
1421
|
-
onClick:
|
|
1424
|
+
height: D,
|
|
1425
|
+
onClick: Fe,
|
|
1422
1426
|
order: i,
|
|
1423
1427
|
row: t,
|
|
1424
1428
|
rowIndex: e,
|
|
@@ -1427,66 +1431,66 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1427
1431
|
width: r.calculatedWidth,
|
|
1428
1432
|
xOffset: r.offsetX
|
|
1429
1433
|
};
|
|
1430
|
-
return a.type === "actions" ? /* @__PURE__ */
|
|
1434
|
+
return a.type === "actions" ? /* @__PURE__ */ G(Ct, {
|
|
1431
1435
|
...s,
|
|
1432
1436
|
column: a
|
|
1433
|
-
}, r.id) : /* @__PURE__ */
|
|
1437
|
+
}, r.id) : /* @__PURE__ */ K(gt, {
|
|
1434
1438
|
...s,
|
|
1435
1439
|
column: a,
|
|
1436
1440
|
children: [
|
|
1437
|
-
!!a.renderCell && /* @__PURE__ */
|
|
1441
|
+
!!a.renderCell && /* @__PURE__ */ G(he, { children: a.renderCell({
|
|
1438
1442
|
column: a,
|
|
1439
|
-
dataContext:
|
|
1443
|
+
dataContext: I,
|
|
1440
1444
|
id: r.id,
|
|
1441
1445
|
row: t,
|
|
1442
1446
|
rowIndex: e
|
|
1443
1447
|
}) }, a.id),
|
|
1444
|
-
!a.renderCell && !!a.displayValueGetter && /* @__PURE__ */
|
|
1448
|
+
!a.renderCell && !!a.displayValueGetter && /* @__PURE__ */ G(he, { children: /* @__PURE__ */ G(lt, { content: a.displayValueGetter({
|
|
1445
1449
|
column: a,
|
|
1446
|
-
dataContext:
|
|
1450
|
+
dataContext: I,
|
|
1447
1451
|
id: r.id,
|
|
1448
1452
|
row: t,
|
|
1449
1453
|
rowIndex: e
|
|
1450
1454
|
}) }) }, a.id),
|
|
1451
1455
|
!a.displayValueGetter && !a.renderCell && a.type === "text" && p.getTableTextCellValue({
|
|
1452
1456
|
column: a,
|
|
1453
|
-
dataContext:
|
|
1457
|
+
dataContext: I,
|
|
1454
1458
|
row: t,
|
|
1455
1459
|
rowIndex: e
|
|
1456
1460
|
}),
|
|
1457
1461
|
!a.displayValueGetter && !a.renderCell && a.type === "boolean" && p.getTableBooleanCellDisplayValue({
|
|
1458
1462
|
column: a,
|
|
1459
|
-
dataContext:
|
|
1463
|
+
dataContext: I,
|
|
1460
1464
|
row: t,
|
|
1461
1465
|
rowIndex: e,
|
|
1462
|
-
t:
|
|
1466
|
+
t: ee
|
|
1463
1467
|
}),
|
|
1464
1468
|
!a.displayValueGetter && !a.renderCell && a.type === "number" && p.getTableNumberCellValue({
|
|
1465
1469
|
column: a,
|
|
1466
|
-
dataContext:
|
|
1470
|
+
dataContext: I,
|
|
1467
1471
|
row: t,
|
|
1468
1472
|
rowIndex: e
|
|
1469
1473
|
}),
|
|
1470
1474
|
!a.displayValueGetter && !a.renderCell && a.type === "date" && p.getTableDateCellValue({
|
|
1471
1475
|
column: a,
|
|
1472
|
-
dataContext:
|
|
1476
|
+
dataContext: I,
|
|
1473
1477
|
row: t,
|
|
1474
1478
|
rowIndex: e
|
|
1475
1479
|
}),
|
|
1476
1480
|
!a.displayValueGetter && !a.renderCell && a.type === "options" && p.getTableOptionsCellDisplayValue({
|
|
1477
1481
|
column: a,
|
|
1478
|
-
dataContext:
|
|
1482
|
+
dataContext: I,
|
|
1479
1483
|
row: t,
|
|
1480
1484
|
rowIndex: e
|
|
1481
1485
|
}),
|
|
1482
|
-
!a.displayValueGetter && !a.renderCell && a.type === "readableIndex" &&
|
|
1483
|
-
dataContext:
|
|
1486
|
+
!a.displayValueGetter && !a.renderCell && a.type === "readableIndex" && Re(a, {
|
|
1487
|
+
dataContext: I,
|
|
1484
1488
|
id: r.id,
|
|
1485
1489
|
row: t,
|
|
1486
1490
|
rowIndex: e
|
|
1487
1491
|
}),
|
|
1488
|
-
!a.displayValueGetter && !a.renderCell && a.type === "selectable" &&
|
|
1489
|
-
dataContext:
|
|
1492
|
+
!a.displayValueGetter && !a.renderCell && a.type === "selectable" && Ve(a, {
|
|
1493
|
+
dataContext: I,
|
|
1490
1494
|
id: r.id,
|
|
1491
1495
|
row: t,
|
|
1492
1496
|
rowIndex: e
|
|
@@ -1495,27 +1499,27 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1495
1499
|
}, r.id);
|
|
1496
1500
|
}) });
|
|
1497
1501
|
}, [
|
|
1498
|
-
|
|
1502
|
+
X,
|
|
1499
1503
|
se,
|
|
1500
|
-
|
|
1501
|
-
We,
|
|
1504
|
+
Fe,
|
|
1502
1505
|
Ve,
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1506
|
+
Re,
|
|
1507
|
+
D,
|
|
1508
|
+
ee,
|
|
1509
|
+
Ie,
|
|
1510
|
+
I,
|
|
1511
|
+
de
|
|
1512
|
+
]), at = z((e) => {
|
|
1509
1513
|
c(e);
|
|
1510
|
-
}, [c]),
|
|
1514
|
+
}, [c]), ot = z((e) => {
|
|
1511
1515
|
l(e);
|
|
1512
1516
|
}, [l]);
|
|
1513
|
-
|
|
1514
|
-
if (!C) return
|
|
1517
|
+
B(() => {
|
|
1518
|
+
if (!C) return nt.default;
|
|
1515
1519
|
let e = C.subscribe((e, t) => {
|
|
1516
1520
|
if (!e.length && !t.length) return;
|
|
1517
1521
|
let n = new Set(e), r = new Set(t);
|
|
1518
|
-
|
|
1522
|
+
Y.querySelectorAll("[data-testid=virtuoso-item-list] [data-id]").forEach((e) => {
|
|
1519
1523
|
let t = e.getAttribute("data-id");
|
|
1520
1524
|
/* v8 ignore next 3 -- the selector only matches elements that have a data-id attribute */
|
|
1521
1525
|
t !== null && (n.has(t) ? e.classList.add("highlighted") : r.has(t) && e.classList.remove("highlighted"));
|
|
@@ -1526,30 +1530,30 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1526
1530
|
};
|
|
1527
1531
|
}, [
|
|
1528
1532
|
C,
|
|
1529
|
-
|
|
1533
|
+
Y,
|
|
1530
1534
|
T.palette.action.hover,
|
|
1531
1535
|
T.palette.background.paper
|
|
1532
|
-
]),
|
|
1536
|
+
]), B(() => {
|
|
1533
1537
|
let e = () => {
|
|
1534
|
-
|
|
1538
|
+
He(), Ye(), Le(), Ue();
|
|
1535
1539
|
}, t = [
|
|
1536
1540
|
ce("condensedChange", (t) => {
|
|
1537
|
-
|
|
1541
|
+
M.getState().setIsCondensed(t), L.current = M.getState().getCurrentColumnVisualSettings(), e();
|
|
1538
1542
|
}),
|
|
1539
1543
|
ce("reset", () => {
|
|
1540
|
-
|
|
1544
|
+
M.getState().resetColumns(), L.current = M.getState().getCurrentColumnVisualSettings(), e();
|
|
1541
1545
|
}),
|
|
1542
1546
|
ce("columnVisibilityChange", (t) => {
|
|
1543
|
-
let n = new Set(
|
|
1544
|
-
|
|
1547
|
+
let n = new Set(M.getState().columns.filter((e) => e.frozen).map((e) => e.id));
|
|
1548
|
+
L.current.forEach((e) => {
|
|
1545
1549
|
e.isVisible = n.has(e.id) || t.includes(e.id);
|
|
1546
1550
|
}), e();
|
|
1547
1551
|
}),
|
|
1548
1552
|
ce("columnOrderChange", (t) => {
|
|
1549
|
-
|
|
1553
|
+
L.current.sort((e, n) => t.indexOf(e.id) - t.indexOf(n.id)), e();
|
|
1550
1554
|
}),
|
|
1551
1555
|
ce("openColumnsEditorDialog", (e) => {
|
|
1552
|
-
|
|
1556
|
+
Me.current.open({ hasCellData: e });
|
|
1553
1557
|
})
|
|
1554
1558
|
];
|
|
1555
1559
|
return () => {
|
|
@@ -1557,54 +1561,54 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1557
1561
|
};
|
|
1558
1562
|
}, [
|
|
1559
1563
|
ce,
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1564
|
+
Ue,
|
|
1565
|
+
F,
|
|
1566
|
+
M,
|
|
1567
|
+
Ye,
|
|
1568
|
+
He,
|
|
1569
|
+
Le
|
|
1566
1570
|
]);
|
|
1567
|
-
let
|
|
1568
|
-
let e =
|
|
1569
|
-
if (e && u && u(e.scrollTop),
|
|
1571
|
+
let st = z(() => {
|
|
1572
|
+
let e = Z();
|
|
1573
|
+
if (e && u && u(e.scrollTop), Te.current && d) {
|
|
1570
1574
|
let t = e.scrollTop;
|
|
1571
|
-
d(Math.floor(t /
|
|
1575
|
+
d(Math.floor(t / O));
|
|
1572
1576
|
}
|
|
1573
1577
|
}, [
|
|
1574
|
-
|
|
1578
|
+
Z,
|
|
1575
1579
|
u,
|
|
1576
1580
|
d,
|
|
1577
|
-
|
|
1578
|
-
]),
|
|
1579
|
-
let t =
|
|
1581
|
+
O
|
|
1582
|
+
]), ct = z(() => O, [O]), ut = z((e) => {
|
|
1583
|
+
let t = Z();
|
|
1580
1584
|
t && (t.scrollTop = e);
|
|
1581
|
-
}, [
|
|
1582
|
-
let e =
|
|
1583
|
-
e && !
|
|
1584
|
-
}, []),
|
|
1585
|
-
|
|
1586
|
-
hasRendered:
|
|
1585
|
+
}, [Z]), dt = z(() => {
|
|
1586
|
+
let e = Ae.current;
|
|
1587
|
+
e && !ke.current && e.hasRendered && (Ae.current = null, e.onScrolledToIndex());
|
|
1588
|
+
}, []), ft = z((e, t) => {
|
|
1589
|
+
Ae.current = t ? {
|
|
1590
|
+
hasRendered: Oe.current.has(e),
|
|
1587
1591
|
index: e,
|
|
1588
1592
|
onScrolledToIndex: t
|
|
1589
|
-
} : null,
|
|
1590
|
-
}, [
|
|
1591
|
-
|
|
1592
|
-
scrollToIndex:
|
|
1593
|
-
setVerticalScrollPosition:
|
|
1593
|
+
} : null, Te.current?.scrollToIndex(e), dt();
|
|
1594
|
+
}, [dt]);
|
|
1595
|
+
ve(y, () => ({
|
|
1596
|
+
scrollToIndex: ft,
|
|
1597
|
+
setVerticalScrollPosition: ut
|
|
1594
1598
|
}));
|
|
1595
|
-
let
|
|
1596
|
-
|
|
1597
|
-
}, [a]),
|
|
1598
|
-
|
|
1599
|
-
let t =
|
|
1600
|
-
t &&
|
|
1601
|
-
}, [
|
|
1602
|
-
|
|
1603
|
-
}, [
|
|
1604
|
-
return
|
|
1605
|
-
|
|
1606
|
-
}, [a,
|
|
1607
|
-
ref:
|
|
1599
|
+
let pt = z((e) => {
|
|
1600
|
+
De.current = e, a(e);
|
|
1601
|
+
}, [a]), mt = z((e) => {
|
|
1602
|
+
Oe.current = new Set(e.map((e) => e.index));
|
|
1603
|
+
let t = Ae.current;
|
|
1604
|
+
t && Oe.current.has(t.index) && (t.hasRendered = !0), dt();
|
|
1605
|
+
}, [dt]), ht = z((e) => {
|
|
1606
|
+
ke.current = e, dt();
|
|
1607
|
+
}, [dt]);
|
|
1608
|
+
return B(() => {
|
|
1609
|
+
De.current && a(De.current);
|
|
1610
|
+
}, [a, N]), /* @__PURE__ */ K(j, {
|
|
1611
|
+
ref: je,
|
|
1608
1612
|
style: { "--selection-background": "highlight" },
|
|
1609
1613
|
sx: {
|
|
1610
1614
|
"*::selection": { backgroundColor: "var(--selection-background) !important" },
|
|
@@ -1613,43 +1617,43 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1613
1617
|
width: "100%",
|
|
1614
1618
|
...w
|
|
1615
1619
|
},
|
|
1616
|
-
children: [
|
|
1617
|
-
...
|
|
1620
|
+
children: [_e && /* @__PURE__ */ G(be, {
|
|
1621
|
+
...J.createAttributes("Table"),
|
|
1618
1622
|
components: {
|
|
1619
|
-
EmptyPlaceholder:
|
|
1623
|
+
EmptyPlaceholder: R((e, t) => /* @__PURE__ */ G(j, {
|
|
1620
1624
|
...e,
|
|
1621
1625
|
ref: t
|
|
1622
1626
|
})),
|
|
1623
|
-
FillerRow:
|
|
1627
|
+
FillerRow: R((e, t) => /* @__PURE__ */ G(j, {
|
|
1624
1628
|
ref: t,
|
|
1625
1629
|
style: { height: e.height }
|
|
1626
1630
|
})),
|
|
1627
|
-
Table:
|
|
1631
|
+
Table: R((e, t) => /* @__PURE__ */ G(j, {
|
|
1628
1632
|
...e,
|
|
1629
|
-
"data-row-count":
|
|
1633
|
+
"data-row-count": N.length,
|
|
1630
1634
|
ref: t,
|
|
1631
1635
|
role: "table",
|
|
1632
1636
|
sx: {
|
|
1633
1637
|
minWidth: "100%",
|
|
1634
1638
|
position: "relative",
|
|
1635
|
-
width:
|
|
1639
|
+
width: Ee.current
|
|
1636
1640
|
}
|
|
1637
1641
|
})),
|
|
1638
|
-
TableBody:
|
|
1642
|
+
TableBody: R((t, n) => /* @__PURE__ */ G(j, {
|
|
1639
1643
|
...t,
|
|
1640
1644
|
ref: n,
|
|
1641
1645
|
sx: { font: e }
|
|
1642
1646
|
})),
|
|
1643
|
-
TableHead:
|
|
1647
|
+
TableHead: R((e, t) => /* @__PURE__ */ G(j, {
|
|
1644
1648
|
...e,
|
|
1645
1649
|
ref: t
|
|
1646
1650
|
})),
|
|
1647
|
-
TableRow:
|
|
1648
|
-
let n = !se || se(e.item,
|
|
1649
|
-
return /* @__PURE__ */
|
|
1650
|
-
"data-id":
|
|
1651
|
-
onMouseEnter: () =>
|
|
1652
|
-
onMouseLeave: () =>
|
|
1651
|
+
TableRow: R((e, t) => {
|
|
1652
|
+
let n = !se || se(e.item, I);
|
|
1653
|
+
return /* @__PURE__ */ G(j, {
|
|
1654
|
+
"data-id": P(e.item),
|
|
1655
|
+
onMouseEnter: () => at(e.item),
|
|
1656
|
+
onMouseLeave: () => ot(e.item),
|
|
1653
1657
|
ref: t,
|
|
1654
1658
|
role: "row",
|
|
1655
1659
|
sx: {
|
|
@@ -1663,48 +1667,48 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1663
1667
|
backgroundColor: T.palette.grey[100],
|
|
1664
1668
|
color: `${T.palette.text.primary} !important`
|
|
1665
1669
|
},
|
|
1666
|
-
borderBottom: `1px solid ${
|
|
1670
|
+
borderBottom: `1px solid ${E.rowDivider}`,
|
|
1667
1671
|
color: n ? void 0 : "text.disabled",
|
|
1668
1672
|
cursor: n && s ? "pointer" : void 0,
|
|
1669
1673
|
display: "flex",
|
|
1670
1674
|
height: T.spacing(S)
|
|
1671
1675
|
},
|
|
1672
|
-
...(0,
|
|
1676
|
+
...(0, tt.default)(e, "item")
|
|
1673
1677
|
});
|
|
1674
1678
|
})
|
|
1675
1679
|
},
|
|
1676
|
-
data:
|
|
1677
|
-
fixedHeaderContent:
|
|
1678
|
-
fixedItemHeight:
|
|
1680
|
+
data: N,
|
|
1681
|
+
fixedHeaderContent: Qe,
|
|
1682
|
+
fixedItemHeight: O,
|
|
1679
1683
|
initialTopMostItemIndex: i ?? 0,
|
|
1680
|
-
isScrolling:
|
|
1681
|
-
itemContent:
|
|
1682
|
-
itemSize:
|
|
1683
|
-
itemsRendered:
|
|
1684
|
-
onScroll:
|
|
1684
|
+
isScrolling: ht,
|
|
1685
|
+
itemContent: it,
|
|
1686
|
+
itemSize: ct,
|
|
1687
|
+
itemsRendered: mt,
|
|
1688
|
+
onScroll: st,
|
|
1685
1689
|
overscan: {
|
|
1686
1690
|
main: f ?? re,
|
|
1687
1691
|
reverse: _ ?? ie
|
|
1688
1692
|
},
|
|
1689
|
-
rangeChanged:
|
|
1690
|
-
ref:
|
|
1693
|
+
rangeChanged: pt,
|
|
1694
|
+
ref: Te,
|
|
1691
1695
|
style: {
|
|
1692
1696
|
height: "100%",
|
|
1693
1697
|
overflowX: t ? "scroll" : "auto"
|
|
1694
1698
|
},
|
|
1695
|
-
totalCount:
|
|
1696
|
-
}), /* @__PURE__ */
|
|
1697
|
-
ref:
|
|
1699
|
+
totalCount: N.length
|
|
1700
|
+
}), /* @__PURE__ */ G(At, {
|
|
1701
|
+
ref: Me,
|
|
1698
1702
|
renderHeaderContent: b,
|
|
1699
1703
|
renderItemContent: x
|
|
1700
1704
|
})]
|
|
1701
1705
|
});
|
|
1702
|
-
},
|
|
1703
|
-
let { t: r } =
|
|
1704
|
-
return /* @__PURE__ */
|
|
1706
|
+
}, It = ({ caption: e, component: t = "h2", variant: n = "h2" }) => {
|
|
1707
|
+
let { t: r } = q(), i = v(), a = m(i, (e) => e.baseData.length), o = m(i, Q((e) => e.sortedData.length));
|
|
1708
|
+
return /* @__PURE__ */ G(I, {
|
|
1705
1709
|
component: t,
|
|
1706
1710
|
variant: n,
|
|
1707
|
-
children: /* @__PURE__ */
|
|
1711
|
+
children: /* @__PURE__ */ K(W, { children: [
|
|
1708
1712
|
o === 0 && (e ?? r("Items")),
|
|
1709
1713
|
o > 0 && o === a && r("{{items}} ({{count}})", {
|
|
1710
1714
|
count: o,
|
|
@@ -1718,10 +1722,10 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1718
1722
|
})
|
|
1719
1723
|
] })
|
|
1720
1724
|
});
|
|
1721
|
-
},
|
|
1722
|
-
t.exports = Object.prototype.hasOwnProperty.call(
|
|
1723
|
-
})),
|
|
1724
|
-
var t =
|
|
1725
|
+
}, Lt = /* @__PURE__ */ t(((e, t) => {
|
|
1726
|
+
t.exports = Object.prototype.hasOwnProperty.call(pe, "module.exports") ? pe["module.exports"] : { ...pe };
|
|
1727
|
+
})), Rt = /* @__PURE__ */ t(((e) => {
|
|
1728
|
+
var t = Lt();
|
|
1725
1729
|
function n(e, t) {
|
|
1726
1730
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
1727
1731
|
}
|
|
@@ -1758,7 +1762,7 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1758
1762
|
}
|
|
1759
1763
|
var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? u : c;
|
|
1760
1764
|
e.useSyncExternalStore = t.useSyncExternalStore === void 0 ? d : t.useSyncExternalStore;
|
|
1761
|
-
})),
|
|
1765
|
+
})), zt = /* @__PURE__ */ t(((e) => {
|
|
1762
1766
|
process.env.NODE_ENV !== "production" && (function() {
|
|
1763
1767
|
function t(e, t) {
|
|
1764
1768
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
@@ -1801,13 +1805,13 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1801
1805
|
return t();
|
|
1802
1806
|
}
|
|
1803
1807
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1804
|
-
var a =
|
|
1808
|
+
var a = Lt(), o = typeof Object.is == "function" ? Object.is : t, s = a.useState, c = a.useEffect, l = a.useLayoutEffect, u = a.useDebugValue, d = !1, f = !1, p = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? i : n;
|
|
1805
1809
|
e.useSyncExternalStore = a.useSyncExternalStore === void 0 ? p : a.useSyncExternalStore, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1806
1810
|
})();
|
|
1807
|
-
})),
|
|
1808
|
-
t.exports = process.env.NODE_ENV === "production" ?
|
|
1809
|
-
})),
|
|
1810
|
-
var t =
|
|
1811
|
+
})), Bt = /* @__PURE__ */ t(((e, t) => {
|
|
1812
|
+
t.exports = process.env.NODE_ENV === "production" ? Rt() : zt();
|
|
1813
|
+
})), Vt = /* @__PURE__ */ t(((e) => {
|
|
1814
|
+
var t = Lt(), n = Bt();
|
|
1811
1815
|
function r(e, t) {
|
|
1812
1816
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
1813
1817
|
}
|
|
@@ -1851,13 +1855,13 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1851
1855
|
f.hasValue = !0, f.value = p;
|
|
1852
1856
|
}, [p]), l(p), p;
|
|
1853
1857
|
};
|
|
1854
|
-
})),
|
|
1858
|
+
})), Ht = /* @__PURE__ */ t(((e) => {
|
|
1855
1859
|
process.env.NODE_ENV !== "production" && (function() {
|
|
1856
1860
|
function t(e, t) {
|
|
1857
1861
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
1858
1862
|
}
|
|
1859
1863
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1860
|
-
var n =
|
|
1864
|
+
var n = Lt(), r = Bt(), i = typeof Object.is == "function" ? Object.is : t, a = r.useSyncExternalStore, o = n.useRef, s = n.useEffect, c = n.useMemo, l = n.useDebugValue;
|
|
1861
1865
|
e.useSyncExternalStoreWithSelector = function(e, t, n, r, u) {
|
|
1862
1866
|
var d = o(null);
|
|
1863
1867
|
if (d.current === null) {
|
|
@@ -1898,16 +1902,16 @@ color: i ? `${i} !important` : void 0 },
|
|
|
1898
1902
|
}, [p]), l(p), p;
|
|
1899
1903
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1900
1904
|
})();
|
|
1901
|
-
})), { useSyncExternalStoreWithSelector:
|
|
1902
|
-
t.exports = process.env.NODE_ENV === "production" ?
|
|
1903
|
-
})))(), 1)).default,
|
|
1904
|
-
function
|
|
1905
|
-
let r =
|
|
1906
|
-
return
|
|
1905
|
+
})), { useSyncExternalStoreWithSelector: Ut } = (/* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
1906
|
+
t.exports = process.env.NODE_ENV === "production" ? Vt() : Ht();
|
|
1907
|
+
})))(), 1)).default, Wt = (e) => e;
|
|
1908
|
+
function Gt(e, t = Wt, n) {
|
|
1909
|
+
let r = Ut(e.subscribe, e.getState, e.getInitialState, t, n);
|
|
1910
|
+
return me.useDebugValue(r), r;
|
|
1907
1911
|
}
|
|
1908
1912
|
// src/components/ui/Table/TableFiltersSidebarItem.tsx
|
|
1909
|
-
var
|
|
1910
|
-
let i =
|
|
1913
|
+
var Kt = we, qt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissingValuesFilter: n, visibleFilterWithinDimension: r }) => {
|
|
1914
|
+
let i = Gt(v(), (e) => e.filters, (e, t) => JSON.stringify(e.map((e) => [e.filterValue, e.includeMissingValues])) === JSON.stringify(t.map((e) => [e.filterValue, e.includeMissingValues]))), a = e.filterIds.map((e) => i.find((t) => t.id === e)), { setValue: o } = Oe(), s = V(() => {
|
|
1911
1915
|
if (e.allowOnlyPreferredFilter || e.filterIds.length === 1) return [a.find((t) => t?.id && t.id === e.preferredFilterId)].filter((e) => !!e);
|
|
1912
1916
|
if (!e.allowMultipleVisibleFilters) {
|
|
1913
1917
|
let t = r ?? e.preferredFilterId;
|
|
@@ -1921,11 +1925,11 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
1921
1925
|
e.filterIds.length,
|
|
1922
1926
|
e.preferredFilterId,
|
|
1923
1927
|
r
|
|
1924
|
-
]), c =
|
|
1928
|
+
]), c = V(() => a.length > 1 && !e.allowOnlyPreferredFilter && !e.allowMultipleVisibleFilters, [
|
|
1925
1929
|
a.length,
|
|
1926
1930
|
e.allowMultipleVisibleFilters,
|
|
1927
1931
|
e.allowOnlyPreferredFilter
|
|
1928
|
-
]), l =
|
|
1932
|
+
]), l = V(() => !(a.length === 1 || e.allowOnlyPreferredFilter), [a.length, e.allowOnlyPreferredFilter]), u = V(() => c && s.length ? {
|
|
1929
1933
|
items: a.map((r) => ({
|
|
1930
1934
|
active: r === s[0],
|
|
1931
1935
|
callback: () => {
|
|
@@ -1950,23 +1954,23 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
1950
1954
|
c,
|
|
1951
1955
|
n
|
|
1952
1956
|
]);
|
|
1953
|
-
return s.length ? /* @__PURE__ */
|
|
1957
|
+
return s.length ? /* @__PURE__ */ K(j, {
|
|
1954
1958
|
sx: { mb: 2 },
|
|
1955
1959
|
children: [
|
|
1956
|
-
l && /* @__PURE__ */
|
|
1960
|
+
l && /* @__PURE__ */ K(j, {
|
|
1957
1961
|
sx: {
|
|
1958
1962
|
alignItems: "center",
|
|
1959
1963
|
display: "flex",
|
|
1960
1964
|
justifyContent: "space-between"
|
|
1961
1965
|
},
|
|
1962
|
-
children: [/* @__PURE__ */
|
|
1966
|
+
children: [/* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(I, {
|
|
1963
1967
|
sx: {
|
|
1964
1968
|
margin: 0,
|
|
1965
1969
|
padding: 0
|
|
1966
1970
|
},
|
|
1967
1971
|
variant: "h6",
|
|
1968
1972
|
children: e.label
|
|
1969
|
-
}) }), c && /* @__PURE__ */
|
|
1973
|
+
}) }), c && /* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(Ke, {
|
|
1970
1974
|
ButtonProps: {
|
|
1971
1975
|
color: "inherit",
|
|
1972
1976
|
size: "small",
|
|
@@ -1982,40 +1986,40 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
1982
1986
|
menuItemsData: u
|
|
1983
1987
|
}) })]
|
|
1984
1988
|
}),
|
|
1985
|
-
s.map((e) => /* @__PURE__ */
|
|
1989
|
+
s.map((e) => /* @__PURE__ */ G(j, {
|
|
1986
1990
|
sx: { my: 1 },
|
|
1987
|
-
children: /* @__PURE__ */
|
|
1991
|
+
children: /* @__PURE__ */ G(pt, { filter: e })
|
|
1988
1992
|
}, e.id)),
|
|
1989
|
-
/* @__PURE__ */
|
|
1993
|
+
/* @__PURE__ */ G(ie, {})
|
|
1990
1994
|
]
|
|
1991
1995
|
}, e.id) : null;
|
|
1992
|
-
},
|
|
1993
|
-
let { t } =
|
|
1996
|
+
}, Jt = ({ onClose: e }) => {
|
|
1997
|
+
let { t } = q(), n = v(), r = m(n, (e) => e.setFilterValues), i = m(n, (e) => e.filterDimensions), a = Gt(n, (e) => e.filters, (e, t) => JSON.stringify(e.map((e) => [e.filterValue, e.includeMissingValues])) === JSON.stringify(t.map((e) => [e.filterValue, e.includeMissingValues]))), o = m(n, (e) => e.filters.some((e) => e.isFilterActive())), s = m(n, (e) => e.showMissingValuesFilter), c = m(n, (e) => e.resetFilters), l = m(n, (e) => e.visibleFilterWithinDimensions), u = m(n, (e) => e.setVisibleFilterWithinDimensions), [d, f] = U(l), p = V(() => {
|
|
1994
1998
|
let e = Object.fromEntries(a.map((e) => [e.id, e.initialFilterValue]));
|
|
1995
1999
|
return s && a.forEach((t) => {
|
|
1996
2000
|
e[t.includeMissingValuesFormFieldName] = !1;
|
|
1997
2001
|
}), e;
|
|
1998
|
-
}, [a, s]), h =
|
|
2002
|
+
}, [a, s]), h = V(() => {
|
|
1999
2003
|
let e = Object.fromEntries(a.map((e) => [e.id, e.filterValue ?? e.initialFilterValue]));
|
|
2000
2004
|
return s && a.forEach((t) => {
|
|
2001
2005
|
e[t.includeMissingValuesFormFieldName] = t.includeMissingValues;
|
|
2002
2006
|
}), e;
|
|
2003
|
-
}, [a, s]), g =
|
|
2007
|
+
}, [a, s]), g = De({
|
|
2004
2008
|
defaultValues: p,
|
|
2005
2009
|
values: h
|
|
2006
|
-
}), _ =
|
|
2010
|
+
}), _ = z((e, t) => {
|
|
2007
2011
|
f((n) => ({
|
|
2008
2012
|
...n,
|
|
2009
2013
|
[e]: t
|
|
2010
2014
|
}));
|
|
2011
|
-
}, []), { control: y, formState: { isDirty: b }, handleSubmit: x, reset: S, setValue: C } = g, w =
|
|
2015
|
+
}, []), { control: y, formState: { isDirty: b }, handleSubmit: x, reset: S, setValue: C } = g, w = ke({
|
|
2012
2016
|
control: y,
|
|
2013
2017
|
defaultValue: h
|
|
2014
|
-
}), T =
|
|
2018
|
+
}), T = V(() => a.some((e) => e.isFilterActive(w[e.id], s && w[e.includeMissingValuesFormFieldName] === !0)), [
|
|
2015
2019
|
a,
|
|
2016
2020
|
w,
|
|
2017
2021
|
s
|
|
2018
|
-
]), E =
|
|
2022
|
+
]), E = z(async (t) => {
|
|
2019
2023
|
await r(t), S(t), u(d), e();
|
|
2020
2024
|
}, [
|
|
2021
2025
|
d,
|
|
@@ -2023,7 +2027,7 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2023
2027
|
S,
|
|
2024
2028
|
r,
|
|
2025
2029
|
u
|
|
2026
|
-
]), D =
|
|
2030
|
+
]), D = z(async () => {
|
|
2027
2031
|
S(p), await c(), u(d), e();
|
|
2028
2032
|
}, [
|
|
2029
2033
|
p,
|
|
@@ -2032,17 +2036,17 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2032
2036
|
S,
|
|
2033
2037
|
c,
|
|
2034
2038
|
u
|
|
2035
|
-
]), O =
|
|
2039
|
+
]), O = z((e) => {
|
|
2036
2040
|
let t = a.find((t) => t.id === e);
|
|
2037
2041
|
C(e, t.initialFilterValue, { shouldDirty: !0 }), s && C(t.includeMissingValuesFormFieldName, !1, { shouldDirty: !0 });
|
|
2038
2042
|
}, [
|
|
2039
2043
|
a,
|
|
2040
2044
|
C,
|
|
2041
2045
|
s
|
|
2042
|
-
]), ee =
|
|
2043
|
-
return /* @__PURE__ */ W
|
|
2046
|
+
]), ee = V(() => a.filter((e) => e.showInSidebar), [a]);
|
|
2047
|
+
return /* @__PURE__ */ G(W, { children: !!a && !!h && !!p && /* @__PURE__ */ G(Te, {
|
|
2044
2048
|
...g,
|
|
2045
|
-
children: /* @__PURE__ */
|
|
2049
|
+
children: /* @__PURE__ */ K(j, {
|
|
2046
2050
|
autoComplete: "off",
|
|
2047
2051
|
component: "form",
|
|
2048
2052
|
id: "Filters",
|
|
@@ -2052,49 +2056,49 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2052
2056
|
gridTemplateRows: "max-content auto",
|
|
2053
2057
|
height: "100%"
|
|
2054
2058
|
},
|
|
2055
|
-
children: [/* @__PURE__ */
|
|
2056
|
-
b && o && !T && /* @__PURE__ */
|
|
2059
|
+
children: [/* @__PURE__ */ K(j, { children: [
|
|
2060
|
+
b && o && !T && /* @__PURE__ */ G(j, {
|
|
2057
2061
|
sx: { my: 1 },
|
|
2058
2062
|
children: t`All filters have been removed, but have not yet been applied.`
|
|
2059
2063
|
}),
|
|
2060
|
-
/* @__PURE__ */
|
|
2064
|
+
/* @__PURE__ */ G(j, { children: a.map((e) => {
|
|
2061
2065
|
let n = w[e.id], r = s && w[e.includeMissingValuesFormFieldName] === !0;
|
|
2062
2066
|
if (e.isFilterActive(n, r)) {
|
|
2063
2067
|
let i = [e.isInitialFilterValue(n) ? "" : e.getPresentationValue(n, t), r ? t`Missing` : ""].filter(Boolean).join(", ");
|
|
2064
|
-
return /* @__PURE__ */
|
|
2068
|
+
return /* @__PURE__ */ K(j, {
|
|
2065
2069
|
sx: {
|
|
2066
2070
|
alignItems: "center",
|
|
2067
2071
|
display: "grid",
|
|
2068
2072
|
gap: 1,
|
|
2069
2073
|
gridTemplateColumns: "auto max-content"
|
|
2070
2074
|
},
|
|
2071
|
-
children: [/* @__PURE__ */
|
|
2072
|
-
/* @__PURE__ */
|
|
2075
|
+
children: [/* @__PURE__ */ K(j, { children: [
|
|
2076
|
+
/* @__PURE__ */ G(j, {
|
|
2073
2077
|
component: "span",
|
|
2074
2078
|
children: e.label
|
|
2075
2079
|
}),
|
|
2076
|
-
/* @__PURE__ */
|
|
2080
|
+
/* @__PURE__ */ G(j, {
|
|
2077
2081
|
component: "span",
|
|
2078
2082
|
children: ": "
|
|
2079
2083
|
}),
|
|
2080
|
-
/* @__PURE__ */
|
|
2084
|
+
/* @__PURE__ */ G(j, {
|
|
2081
2085
|
component: "strong",
|
|
2082
2086
|
children: i
|
|
2083
2087
|
})
|
|
2084
|
-
] }), /* @__PURE__ */
|
|
2088
|
+
] }), /* @__PURE__ */ G(N, {
|
|
2085
2089
|
"aria-label": t("Remove filter with label {{filterLabel}} and value {{filterValue}}", {
|
|
2086
2090
|
filterLabel: e.label,
|
|
2087
2091
|
filterValue: i
|
|
2088
2092
|
}),
|
|
2089
2093
|
onClick: () => O(e.id),
|
|
2090
2094
|
size: "small",
|
|
2091
|
-
children: /* @__PURE__ */
|
|
2095
|
+
children: /* @__PURE__ */ G(Ge, {})
|
|
2092
2096
|
})]
|
|
2093
2097
|
}, e.id);
|
|
2094
2098
|
}
|
|
2095
2099
|
return null;
|
|
2096
2100
|
}) }),
|
|
2097
|
-
(o || b) && /* @__PURE__ */
|
|
2101
|
+
(o || b) && /* @__PURE__ */ K(j, {
|
|
2098
2102
|
sx: {
|
|
2099
2103
|
display: "flex",
|
|
2100
2104
|
gap: 1,
|
|
@@ -2102,65 +2106,65 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2102
2106
|
marginRight: 1,
|
|
2103
2107
|
my: 1
|
|
2104
2108
|
},
|
|
2105
|
-
children: [/* @__PURE__ */
|
|
2106
|
-
...
|
|
2109
|
+
children: [/* @__PURE__ */ G(M, {
|
|
2110
|
+
...J.createAttributes("TableFiltersSidebarItem-reset"),
|
|
2107
2111
|
color: "primary",
|
|
2108
2112
|
onClick: D,
|
|
2109
|
-
startIcon: /* @__PURE__ */
|
|
2113
|
+
startIcon: /* @__PURE__ */ G(We, {}),
|
|
2110
2114
|
variant: "outlined",
|
|
2111
2115
|
children: t`Reset`
|
|
2112
|
-
}), /* @__PURE__ */
|
|
2113
|
-
...
|
|
2116
|
+
}), /* @__PURE__ */ G(M, {
|
|
2117
|
+
...J.createAttributes("TableFiltersSidebarItem-apply"),
|
|
2114
2118
|
color: "secondary",
|
|
2115
|
-
startIcon: /* @__PURE__ */
|
|
2119
|
+
startIcon: /* @__PURE__ */ G(Ue, {}),
|
|
2116
2120
|
type: "submit",
|
|
2117
2121
|
children: t`Apply`
|
|
2118
2122
|
})]
|
|
2119
2123
|
})
|
|
2120
|
-
] }), /* @__PURE__ */
|
|
2124
|
+
] }), /* @__PURE__ */ K(j, {
|
|
2121
2125
|
sx: {
|
|
2122
2126
|
overflowY: "auto",
|
|
2123
2127
|
paddingRight: 1
|
|
2124
2128
|
},
|
|
2125
|
-
children: [i.length > 0 && /* @__PURE__ */ W
|
|
2129
|
+
children: [i.length > 0 && /* @__PURE__ */ G(W, { children: i.filter((e) => e.filterIds.length).map((e) => /* @__PURE__ */ G(qt, {
|
|
2126
2130
|
filterDimension: e,
|
|
2127
2131
|
onFilterVisibilityChange: _,
|
|
2128
2132
|
showMissingValuesFilter: s,
|
|
2129
2133
|
visibleFilterWithinDimension: d[e.id]
|
|
2130
|
-
}, e.id)) }), i.length === 0 && /* @__PURE__ */ W
|
|
2134
|
+
}, e.id)) }), i.length === 0 && /* @__PURE__ */ G(W, { children: ee.map((e) => /* @__PURE__ */ K(j, {
|
|
2131
2135
|
sx: { my: 2 },
|
|
2132
|
-
children: [/* @__PURE__ */
|
|
2136
|
+
children: [/* @__PURE__ */ G(j, {
|
|
2133
2137
|
sx: { my: 1 },
|
|
2134
|
-
children: /* @__PURE__ */
|
|
2135
|
-
}), /* @__PURE__ */
|
|
2138
|
+
children: /* @__PURE__ */ G(pt, { filter: e })
|
|
2139
|
+
}), /* @__PURE__ */ G(ie, {})]
|
|
2136
2140
|
}, e.id)) })]
|
|
2137
2141
|
})]
|
|
2138
2142
|
})
|
|
2139
2143
|
}) });
|
|
2140
|
-
},
|
|
2141
|
-
let { t: n } =
|
|
2142
|
-
return /* @__PURE__ */
|
|
2143
|
-
closeIcon: /* @__PURE__ */
|
|
2144
|
+
}, Yt = ({ onClose: e, open: t }) => {
|
|
2145
|
+
let { t: n } = q();
|
|
2146
|
+
return /* @__PURE__ */ G(O, {
|
|
2147
|
+
closeIcon: /* @__PURE__ */ G(Kt, {}),
|
|
2144
2148
|
closeIconTooltipText: n`Close filters`,
|
|
2145
2149
|
onClose: e,
|
|
2146
2150
|
open: t,
|
|
2147
2151
|
testIdAttributes: { name: "tableFiltersSidebarItem" },
|
|
2148
2152
|
title: n`Filters`,
|
|
2149
2153
|
width: 60,
|
|
2150
|
-
children: t && /* @__PURE__ */
|
|
2154
|
+
children: t && /* @__PURE__ */ G(Jt, { onClose: e })
|
|
2151
2155
|
});
|
|
2152
|
-
},
|
|
2153
|
-
let t = v(), n = m(t,
|
|
2156
|
+
}, Xt = ({ hasCellData: e }) => {
|
|
2157
|
+
let t = v(), n = m(t, Q((e) => e.emitEvent)), r = m(t, Q((e) => e.columns)), i = m(t, Q((e) => e.dataContext)), a = m(t, Q((e) => e.getCurrentColumnVisualSettings().filter((e) => e.isVisible).map((e) => e.id))), o = m(t, Q((e) => e.columnDimensions)), s = m(t, Q((e) => e.isCondensed)), c = m(t, Q((e) => e.sortedData)), { t: l } = q(), u = V(() => r.some((e) => e.cellColorGetter), [r]), d = z(() => {
|
|
2154
2158
|
n("openColumnsEditorDialog", e);
|
|
2155
|
-
}, [n, e]), f =
|
|
2159
|
+
}, [n, e]), f = z((e) => {
|
|
2156
2160
|
let t = _(a, (t) => t.includes(e) ? t.filter((t) => t !== e) : (t.push(e), t));
|
|
2157
2161
|
n("columnVisibilityChange", t);
|
|
2158
|
-
}, [n, a]), h =
|
|
2162
|
+
}, [n, a]), h = z((e) => {
|
|
2159
2163
|
let t = e.every((e) => a.includes(e)), r = _(a, (n) => t ? n.filter((t) => !e.includes(t)) : (e.forEach((e) => {
|
|
2160
2164
|
n.includes(e) || n.push(e);
|
|
2161
2165
|
}), n));
|
|
2162
2166
|
n("columnVisibilityChange", r);
|
|
2163
|
-
}, [n, a]), g =
|
|
2167
|
+
}, [n, a]), g = z(() => {
|
|
2164
2168
|
n("columnVisibilityChange", p.getColumnIdsWithData({
|
|
2165
2169
|
dataContext: i,
|
|
2166
2170
|
hasCellData: e,
|
|
@@ -2175,10 +2179,10 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2175
2179
|
r,
|
|
2176
2180
|
a,
|
|
2177
2181
|
i
|
|
2178
|
-
]), y =
|
|
2182
|
+
]), y = z(() => {
|
|
2179
2183
|
n("condensedChange", !s);
|
|
2180
2184
|
}, [n, s]);
|
|
2181
|
-
return
|
|
2185
|
+
return V(() => {
|
|
2182
2186
|
let e = [
|
|
2183
2187
|
u ? {
|
|
2184
2188
|
autoCloseDisabled: !0,
|
|
@@ -2186,13 +2190,13 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2186
2190
|
checked: s ? "true" : "false",
|
|
2187
2191
|
divider: !0,
|
|
2188
2192
|
label: l`Condensed`,
|
|
2189
|
-
rightIcon:
|
|
2193
|
+
rightIcon: G(s ? Xe : Ye, {})
|
|
2190
2194
|
} : void 0,
|
|
2191
2195
|
{
|
|
2192
2196
|
callback: () => d(),
|
|
2193
2197
|
divider: !0,
|
|
2194
2198
|
label: l`Column editor`,
|
|
2195
|
-
leftIcon: /* @__PURE__ */
|
|
2199
|
+
leftIcon: /* @__PURE__ */ G(Ze, { sx: { fontSize: "1.5rem" } })
|
|
2196
2200
|
},
|
|
2197
2201
|
{
|
|
2198
2202
|
autoCloseDisabled: !0,
|
|
@@ -2233,11 +2237,11 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2233
2237
|
callback: () => f(e),
|
|
2234
2238
|
checked: t ? "true" : "false",
|
|
2235
2239
|
label: r.find((t) => t.id === e)?.headerName ?? "",
|
|
2236
|
-
rightIcon:
|
|
2240
|
+
rightIcon: G(t ? qe : Je, {})
|
|
2237
2241
|
};
|
|
2238
2242
|
}),
|
|
2239
2243
|
label: t.label,
|
|
2240
|
-
rightIcon:
|
|
2244
|
+
rightIcon: G(n ? qe : i ? Z : Je, {})
|
|
2241
2245
|
});
|
|
2242
2246
|
}) : r.filter((e) => !e.frozen).forEach((t) => {
|
|
2243
2247
|
let n = a.includes(t.id);
|
|
@@ -2246,7 +2250,7 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2246
2250
|
callback: () => f(t.id),
|
|
2247
2251
|
checked: n ? "true" : "false",
|
|
2248
2252
|
label: t.headerName,
|
|
2249
|
-
rightIcon:
|
|
2253
|
+
rightIcon: G(n ? qe : Je, {})
|
|
2250
2254
|
});
|
|
2251
2255
|
}), {
|
|
2252
2256
|
items: e,
|
|
@@ -2266,9 +2270,9 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2266
2270
|
h,
|
|
2267
2271
|
f
|
|
2268
2272
|
]);
|
|
2269
|
-
},
|
|
2270
|
-
let t =
|
|
2271
|
-
return /* @__PURE__ */
|
|
2273
|
+
}, Zt = ({ ContainerProps: e }) => {
|
|
2274
|
+
let t = Xt({});
|
|
2275
|
+
return /* @__PURE__ */ G(Ke, {
|
|
2272
2276
|
ButtonProps: {
|
|
2273
2277
|
color: "primary",
|
|
2274
2278
|
size: "small",
|
|
@@ -2278,22 +2282,22 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2278
2282
|
menuItemsData: t,
|
|
2279
2283
|
MenuProps: { elevation: 3 }
|
|
2280
2284
|
});
|
|
2281
|
-
},
|
|
2285
|
+
}, Qt = ({ header: e, headerComponent: t = "h3", headerVariant: n = "h5", showTableMenu: r = !0 }) => /* @__PURE__ */ K(j, {
|
|
2282
2286
|
sx: {
|
|
2283
2287
|
alignItems: "center",
|
|
2284
2288
|
display: "flex",
|
|
2285
2289
|
justifyContent: e ? "space-between" : "flex-end"
|
|
2286
2290
|
},
|
|
2287
|
-
children: [e && /* @__PURE__ */
|
|
2291
|
+
children: [e && /* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(It, {
|
|
2288
2292
|
caption: e,
|
|
2289
2293
|
component: t,
|
|
2290
2294
|
variant: n
|
|
2291
|
-
}) }), r && /* @__PURE__ */
|
|
2292
|
-
}),
|
|
2293
|
-
let { t } =
|
|
2295
|
+
}) }), r && /* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(Zt, {}) })]
|
|
2296
|
+
}), $t = Qe, en = ({ downloadAsFileName: e }) => {
|
|
2297
|
+
let { t } = q(), n = v(), r = m(n, Q((e) => e.selectedIds.length > 0)), i = m(n, Q((e) => e.dataContext)), a = z(() => n.getState().getCurrentColumnVisualSettings().filter((e) => e.isVisible).map((e) => e.id), [n]), o = z(() => n.getState().columns, [n]), s = z(() => {
|
|
2294
2298
|
let { idSelectorCallback: e, selectedIds: t, sortedData: r } = n.getState();
|
|
2295
2299
|
return r.filter((n) => t.includes(e(n)));
|
|
2296
|
-
}, [n]), c =
|
|
2300
|
+
}, [n]), c = z(async () => {
|
|
2297
2301
|
await p.downloadAsExcel(n.getState().sortedData, a(), o(), e ? `${e}.xlsx` : "all_rows.xlsx", i);
|
|
2298
2302
|
}, [
|
|
2299
2303
|
i,
|
|
@@ -2301,7 +2305,7 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2301
2305
|
o,
|
|
2302
2306
|
a,
|
|
2303
2307
|
n
|
|
2304
|
-
]), l =
|
|
2308
|
+
]), l = z(() => {
|
|
2305
2309
|
p.downloadAsCSV(n.getState().sortedData, a(), o(), e ? `${e}.csv` : "all_rows.csv", i);
|
|
2306
2310
|
}, [
|
|
2307
2311
|
i,
|
|
@@ -2309,7 +2313,7 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2309
2313
|
o,
|
|
2310
2314
|
a,
|
|
2311
2315
|
n
|
|
2312
|
-
]), u =
|
|
2316
|
+
]), u = z(async () => {
|
|
2313
2317
|
await p.downloadAsExcel(s(), a(), o(), e ? `${e}__selected_rows.xlsx` : "selected_rows.xlsx", i);
|
|
2314
2318
|
}, [
|
|
2315
2319
|
i,
|
|
@@ -2317,7 +2321,7 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2317
2321
|
o,
|
|
2318
2322
|
s,
|
|
2319
2323
|
a
|
|
2320
|
-
]), d =
|
|
2324
|
+
]), d = z(() => {
|
|
2321
2325
|
p.downloadAsCSV(s(), a(), o(), e ? `${e}__selected_rows.csv` : "selected_rows.csv", i);
|
|
2322
2326
|
}, [
|
|
2323
2327
|
i,
|
|
@@ -2326,35 +2330,35 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2326
2330
|
s,
|
|
2327
2331
|
a
|
|
2328
2332
|
]);
|
|
2329
|
-
return /* @__PURE__ */
|
|
2333
|
+
return /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ K(j, { children: [/* @__PURE__ */ G(I, {
|
|
2330
2334
|
variant: "h6",
|
|
2331
2335
|
children: t`All rows`
|
|
2332
|
-
}), /* @__PURE__ */
|
|
2336
|
+
}), /* @__PURE__ */ K(j, {
|
|
2333
2337
|
sx: { marginLeft: 1 },
|
|
2334
|
-
children: [/* @__PURE__ */
|
|
2338
|
+
children: [/* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(P, {
|
|
2335
2339
|
component: "button",
|
|
2336
2340
|
onClick: c,
|
|
2337
2341
|
tabIndex: 0,
|
|
2338
2342
|
children: t`Download all rows as Excel`
|
|
2339
|
-
}) }), /* @__PURE__ */
|
|
2343
|
+
}) }), /* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(P, {
|
|
2340
2344
|
component: "button",
|
|
2341
2345
|
onClick: l,
|
|
2342
2346
|
tabIndex: 0,
|
|
2343
2347
|
children: t`Download all rows as CSV`
|
|
2344
2348
|
}) })]
|
|
2345
|
-
})] }), r && /* @__PURE__ */
|
|
2349
|
+
})] }), r && /* @__PURE__ */ K(j, {
|
|
2346
2350
|
sx: { my: 1 },
|
|
2347
|
-
children: [/* @__PURE__ */
|
|
2351
|
+
children: [/* @__PURE__ */ G(I, {
|
|
2348
2352
|
variant: "h6",
|
|
2349
2353
|
children: t`Selected rows`
|
|
2350
|
-
}), /* @__PURE__ */
|
|
2354
|
+
}), /* @__PURE__ */ K(j, {
|
|
2351
2355
|
sx: { marginLeft: 1 },
|
|
2352
|
-
children: [/* @__PURE__ */
|
|
2356
|
+
children: [/* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(P, {
|
|
2353
2357
|
component: "button",
|
|
2354
2358
|
onClick: u,
|
|
2355
2359
|
tabIndex: 0,
|
|
2356
2360
|
children: t`Download selected rows as Excel`
|
|
2357
|
-
}) }), /* @__PURE__ */
|
|
2361
|
+
}) }), /* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(P, {
|
|
2358
2362
|
component: "button",
|
|
2359
2363
|
onClick: d,
|
|
2360
2364
|
tabIndex: 0,
|
|
@@ -2362,59 +2366,59 @@ var qt = Ee, Jt = ({ filterDimension: e, onFilterVisibilityChange: t, showMissin
|
|
|
2362
2366
|
}) })]
|
|
2363
2367
|
})]
|
|
2364
2368
|
})] });
|
|
2365
|
-
},
|
|
2366
|
-
let { t: r } =
|
|
2367
|
-
return /* @__PURE__ */
|
|
2368
|
-
closeIcon: /* @__PURE__ */
|
|
2369
|
+
}, tn = ({ downloadAsFileName: e, onClose: t, open: n }) => {
|
|
2370
|
+
let { t: r } = q();
|
|
2371
|
+
return /* @__PURE__ */ G(O, {
|
|
2372
|
+
closeIcon: /* @__PURE__ */ G($t, {}),
|
|
2369
2373
|
closeIconTooltipText: r`Close download`,
|
|
2370
2374
|
onClose: t,
|
|
2371
2375
|
open: n,
|
|
2372
2376
|
testIdAttributes: { name: "tableDownloadSidebarItem" },
|
|
2373
2377
|
title: r`Download`,
|
|
2374
2378
|
width: 60,
|
|
2375
|
-
children: n && /* @__PURE__ */
|
|
2379
|
+
children: n && /* @__PURE__ */ G(en, { downloadAsFileName: e })
|
|
2376
2380
|
});
|
|
2377
|
-
},
|
|
2378
|
-
let n = v(), r = m(n, (e) => e.filters.filter((e) => e.isFilterActive()).length), [i, a] =
|
|
2381
|
+
}, nn = ({ downloadAsFileName: e, extraSidebarMenuItems: t }) => {
|
|
2382
|
+
let n = v(), r = m(n, (e) => e.filters.filter((e) => e.isFilterActive()).length), [i, a] = U(!1), [o, s] = U(!1), c = z(() => {
|
|
2379
2383
|
a(!1);
|
|
2380
|
-
}, []), l =
|
|
2384
|
+
}, []), l = z(() => {
|
|
2381
2385
|
s(!1);
|
|
2382
|
-
}, []), u =
|
|
2386
|
+
}, []), u = z(() => {
|
|
2383
2387
|
a(!0);
|
|
2384
|
-
}, []), d =
|
|
2388
|
+
}, []), d = z(() => {
|
|
2385
2389
|
s(!0);
|
|
2386
2390
|
}, []);
|
|
2387
|
-
return /* @__PURE__ */
|
|
2388
|
-
/* @__PURE__ */
|
|
2389
|
-
/* @__PURE__ */
|
|
2391
|
+
return /* @__PURE__ */ K(W, { children: [
|
|
2392
|
+
/* @__PURE__ */ K(ee, { children: [
|
|
2393
|
+
/* @__PURE__ */ G(k, {
|
|
2390
2394
|
badgeColor: "secondary",
|
|
2391
2395
|
badgeContent: r,
|
|
2392
2396
|
first: !0,
|
|
2393
|
-
icon: /* @__PURE__ */
|
|
2397
|
+
icon: /* @__PURE__ */ G(Kt, {}),
|
|
2394
2398
|
onClick: u,
|
|
2395
2399
|
testIdAttributes: { name: "filters" },
|
|
2396
2400
|
title: A`Open filters`
|
|
2397
2401
|
}),
|
|
2398
|
-
/* @__PURE__ */
|
|
2402
|
+
/* @__PURE__ */ G(k, {
|
|
2399
2403
|
badgeColor: "secondary",
|
|
2400
|
-
icon: /* @__PURE__ */
|
|
2404
|
+
icon: /* @__PURE__ */ G($t, {}),
|
|
2401
2405
|
onClick: d,
|
|
2402
2406
|
testIdAttributes: { name: "download" },
|
|
2403
2407
|
title: A`Open download`
|
|
2404
2408
|
}),
|
|
2405
2409
|
t
|
|
2406
2410
|
] }),
|
|
2407
|
-
/* @__PURE__ */
|
|
2411
|
+
/* @__PURE__ */ G(Yt, {
|
|
2408
2412
|
onClose: c,
|
|
2409
2413
|
open: i
|
|
2410
2414
|
}),
|
|
2411
|
-
/* @__PURE__ */
|
|
2415
|
+
/* @__PURE__ */ G(tn, {
|
|
2412
2416
|
downloadAsFileName: e,
|
|
2413
2417
|
onClose: l,
|
|
2414
2418
|
open: o
|
|
2415
2419
|
})
|
|
2416
2420
|
] });
|
|
2417
2421
|
};
|
|
2418
|
-
export {
|
|
2422
|
+
export { rt as _, Yt as a, It as c, Ct as d, St as f, lt as g, pt as h, Xt as i, Ft as l, mt as m, Qt as n, Jt as o, gt as p, Zt as r, Kt as s, nn as t, At as u };
|
|
2419
2423
|
|
|
2420
2424
|
//# sourceMappingURL=Table.js.map
|