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