@gen-epix/ui-client-common 4.7.0 → 4.8.0

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