@gen-epix/ui-client-common 4.6.0 → 4.7.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 (137) hide show
  1. package/README.md +2 -2
  2. package/dist/@types/mui.d.ts +13 -11
  3. package/dist/_chunks/ApplicationFooter.js +31 -21
  4. package/dist/_chunks/ApplicationFooter.js.map +1 -1
  5. package/dist/_chunks/Breadcrumbs.js +4 -4
  6. package/dist/_chunks/CrudPage.js +332 -336
  7. package/dist/_chunks/CrudPage.js.map +1 -1
  8. package/dist/_chunks/Notifications.js +16 -16
  9. package/dist/_chunks/QueryClientProvider.js +1 -1
  10. package/dist/_chunks/QueryClientProvider.js.map +1 -1
  11. package/dist/_chunks/QueryClientService.js +73 -72
  12. package/dist/_chunks/QueryClientService.js.map +1 -1
  13. package/dist/_chunks/Table.js +853 -744
  14. package/dist/_chunks/Table.js.map +1 -1
  15. package/dist/_chunks/TableUtil.js +38 -38
  16. package/dist/_chunks/TableUtil.js.map +1 -1
  17. package/dist/_chunks/UserInvitationsAdminPage.js +131 -131
  18. package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
  19. package/dist/_chunks/_baseFlatten.js +12 -12
  20. package/dist/_chunks/_baseFlatten.js.map +1 -1
  21. package/dist/_chunks/_baseIteratee.js +78 -78
  22. package/dist/_chunks/_baseIteratee.js.map +1 -1
  23. package/dist/_chunks/decorate.js +1 -1
  24. package/dist/_chunks/decorateParam.js +1 -1
  25. package/dist/_chunks/middleware.js +66 -70
  26. package/dist/_chunks/middleware.js.map +1 -1
  27. package/dist/_chunks/omit.js +98 -98
  28. package/dist/_chunks/omit.js.map +1 -1
  29. package/dist/_chunks/query.js +108 -92
  30. package/dist/_chunks/query.js.map +1 -1
  31. package/dist/_chunks/react.js +1 -1
  32. package/dist/_chunks/react.js.map +1 -1
  33. package/dist/_chunks/tableStore.js +61 -58
  34. package/dist/_chunks/tableStore.js.map +1 -1
  35. package/dist/_chunks/useColumnsMenu.js +73 -71
  36. package/dist/_chunks/useColumnsMenu.js.map +1 -1
  37. package/dist/_chunks/useMutation.js +2 -2
  38. package/dist/_chunks/useMutation.js.map +1 -1
  39. package/dist/_chunks/useQueryMemo.js +15 -16
  40. package/dist/_chunks/useQueryMemo.js.map +1 -1
  41. package/dist/_chunks/vanilla.js +1 -1
  42. package/dist/_chunks/vanilla.js.map +1 -1
  43. package/dist/_chunks/yup.js +2 -2
  44. package/dist/_chunks/yup.js.map +1 -1
  45. package/dist/classes/services/AuthenticationService/index.js +8 -8
  46. package/dist/classes/services/AuthenticationService/index.js.map +1 -1
  47. package/dist/classes/services/AuthorizationService/index.js +4 -4
  48. package/dist/classes/services/AuthorizationService/index.js.map +1 -1
  49. package/dist/classes/services/BreadcrumbService/index.js +4 -4
  50. package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
  51. package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
  52. package/dist/classes/services/InactivityService/index.js +30 -30
  53. package/dist/classes/services/InactivityService/index.js.map +1 -1
  54. package/dist/classes/services/LogService/index.js +15 -15
  55. package/dist/classes/services/LogService/index.js.map +1 -1
  56. package/dist/classes/services/PageEventBusService/index.js.map +1 -1
  57. package/dist/components/app/App/index.js +26 -24
  58. package/dist/components/app/App/index.js.map +1 -1
  59. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +18 -18
  60. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
  61. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +18 -18
  62. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
  63. package/dist/components/app/AuthenticationWrapper/index.js +15 -15
  64. package/dist/components/app/AuthorizationWrapper/index.js +16 -16
  65. package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
  66. package/dist/components/app/RouterRoot/index.js +33 -33
  67. package/dist/components/app/RouterRoot/index.js.map +1 -1
  68. package/dist/components/epi/EpiContactDetailsDialog/index.js +4 -4
  69. package/dist/components/epi/EpiContactDetailsDialog/index.js.map +1 -1
  70. package/dist/components/ui/ApplicationBar/ApplicationBar.d.ts +4 -0
  71. package/dist/components/ui/ApplicationBar/ApplicationBarActions.d.ts +5 -0
  72. package/dist/components/ui/ApplicationBar/ApplicationBarNavigationMenu.d.ts +6 -0
  73. package/dist/components/ui/ApplicationBar/index.js +281 -266
  74. package/dist/components/ui/ApplicationBar/index.js.map +1 -1
  75. package/dist/components/ui/ApplicationFooter/ApplicationFooter.d.ts +3 -0
  76. package/dist/components/ui/ApplicationFooter/ApplicationFooterLink.d.ts +3 -0
  77. package/dist/components/ui/ApplicationFooter/ApplicationFooterLinkSection.d.ts +4 -0
  78. package/dist/components/ui/GenericErrorMessage/index.js +13 -13
  79. package/dist/components/ui/LicensesDialog/index.js +6 -6
  80. package/dist/components/ui/OrganizationSwitcherDialog/index.js +11 -11
  81. package/dist/components/ui/OutagesDialog/index.js +4 -4
  82. package/dist/components/ui/OutagesDialog/index.js.map +1 -1
  83. package/dist/components/ui/PageContainer/index.js +5 -5
  84. package/dist/components/ui/PageContainer/index.js.map +1 -1
  85. package/dist/components/ui/ResponseHandler/index.js +4 -4
  86. package/dist/components/ui/SortableList/SortableList.d.ts +5 -3
  87. package/dist/components/ui/Table/Table.d.ts +5 -2
  88. package/dist/components/ui/Table/TableColumnsEditorDialog.d.ts +13 -2
  89. package/dist/components/ui/Table/index.d.ts +1 -0
  90. package/dist/components/ui/Table/index.js +1 -1
  91. package/dist/components/ui/UserFeedbackDialog/index.js +15 -15
  92. package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +12 -12
  93. package/dist/dataHooks/useIdentifierIssuerQuery/index.js +11 -11
  94. package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +5 -5
  95. package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
  96. package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +15 -15
  97. package/dist/dataHooks/useOrganizationsQuery/index.js +7 -7
  98. package/dist/dataHooks/useUsersQuery/index.js +10 -10
  99. package/dist/hooks/useCreateMutation/index.js +14 -14
  100. package/dist/hooks/useCreateMutation/index.js.map +1 -1
  101. package/dist/hooks/useDeleteMutation/index.js +17 -17
  102. package/dist/hooks/useDeleteMutation/index.js.map +1 -1
  103. package/dist/hooks/useEditMutation/index.js +47 -51
  104. package/dist/hooks/useEditMutation/index.js.map +1 -1
  105. package/dist/hooks/useEditMutation/useEditMutation.d.ts +1 -2
  106. package/dist/hooks/useInitializeTableStore/index.js +6 -6
  107. package/dist/hooks/useInitializeTableStore/index.js.map +1 -1
  108. package/dist/locale/en.json +13 -5
  109. package/dist/locale/nl.json +13 -5
  110. package/dist/pages/AcceptInvitationPage/index.js +10 -10
  111. package/dist/pages/AdminPage/index.js +19 -19
  112. package/dist/pages/ChooseIdentityProviderPage/index.js +5 -5
  113. package/dist/pages/ErrorPage/index.js +4 -4
  114. package/dist/pages/IdentifierIssuersAdminPage/index.js +7 -7
  115. package/dist/pages/IdentifierIssuersAdminPage/index.js.map +1 -1
  116. package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +16 -16
  117. package/dist/pages/OrganizationContactsAdminPage/index.js +10 -10
  118. package/dist/pages/OrganizationContactsAdminPage/index.js.map +1 -1
  119. package/dist/pages/OrganizationSitesAdminPage/index.js +12 -12
  120. package/dist/pages/OrganizationSitesAdminPage/index.js.map +1 -1
  121. package/dist/pages/OrganizationsAdminPage/index.js +20 -20
  122. package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
  123. package/dist/pages/OutagesAdminPage/index.js +11 -11
  124. package/dist/pages/OutagesAdminPage/index.js.map +1 -1
  125. package/dist/pages/RouterErrorPage/index.js +4 -4
  126. package/dist/pages/UsersAdminPage/index.js +34 -34
  127. package/dist/pages/UsersAdminPage/index.js.map +1 -1
  128. package/dist/setup/setup.js +4 -4
  129. package/dist/setup/setup.js.map +1 -1
  130. package/dist/stores/oidcStore/oidcStore.d.ts +1 -1
  131. package/dist/theme/demoTheme/index.js +15 -7
  132. package/dist/theme/demoTheme/index.js.map +1 -1
  133. package/dist/utils/StandardConfigUtil/index.js +2 -2
  134. package/dist/utils/StandardConfigUtil/index.js.map +1 -1
  135. package/package.json +33 -37
  136. package/dist/models/theme.models.d.ts +0 -20
  137. package/dist/models/theme.models.js +0 -0
@@ -1,52 +1,52 @@
1
1
  import { n as e, t } from "./rolldown-runtime.js";
2
2
  import { i as n, n as r, o as i, r as a, s as o, t as s } from "./TextFilter.js";
3
- import { n as c, r as l, t as u } from "./TableUtil.js";
4
- import { f as d } from "./isArrayLike.js";
5
- import { TABLE_COLUMN_FROZEN as f } from "../models/table.models.js";
6
- import { t as p } from "./react.js";
7
- import { t as m } from "./tableStore.js";
8
- import { PageEventBusService as h } from "../classes/services/PageEventBusService/index.js";
9
- import { t as g } from "./omit.js";
10
- import { useConfig as _ } from "../hooks/useConfig/index.js";
11
- import { r as v, t as y } from "./uniq.js";
12
- import { n as b, t as x } from "./useColumnsMenu.js";
13
- import { t as S } from "./GeoFilter.js";
14
- import { BooleanFilterField as C } from "../components/filters/BooleanFilterField/index.js";
15
- import { DateFilterField as w } from "../components/filters/DateFilterField/index.js";
16
- import { GeoFilterField as T } from "../components/filters/GeoFilterField/index.js";
17
- import { MultiSelectFilterField as E } from "../components/filters/MultiSelectFilterField/index.js";
18
- import { NumberRangeFilterField as D } from "../components/filters/NumberRangeFilterField/index.js";
19
- import { TextFilterField as O } from "../components/filters/TextFilterField/index.js";
20
- import { SidebarItem as k, SidebarMenu as ee, SidebarMenuItem as te } from "../components/ui/Sidebar/index.js";
21
- import { container as ne } from "tsyringe";
22
- import { WindowService as re } from "@gen-epix/ui-core/classes/services/WindowService";
23
- import { t as A } from "i18next";
24
- import { Box as j, Button as M, Checkbox as N, Divider as P, FormControlLabel as ie, FormGroup as ae, IconButton as F, Menu as oe, Paper as se, Popover as ce, Tooltip as I, Typography as le, alpha as ue, darken as de, lighten as fe, styled as L, useTheme as pe } from "@mui/material";
25
- import * as me from "react";
26
- import he, { Fragment as R, createContext as ge, forwardRef as _e, use as ve, useCallback as z, useEffect as B, useId as ye, useImperativeHandle as be, useLayoutEffect as xe, useMemo as V, useRef as H, useState as U } from "react";
3
+ import { r as c, t as l } from "./uniq.js";
4
+ import { t as u } from "./omit.js";
5
+ import { n as d, r as f, t as p } from "./TableUtil.js";
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";
21
+ import { container as te } from "tsyringe";
22
+ 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
27
  import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
28
28
  import { useTranslation as q } from "react-i18next";
29
29
  import { TestIdUtil as J } from "@gen-epix/ui-core/utils/TestIdUtil";
30
- import { TableVirtuoso as Se } from "react-virtuoso";
31
- import { useScrollbarSize as Ce } from "@gen-epix/ui-core/hooks/useScrollbarSize";
32
- import { visuallyHidden as we } from "@mui/utils";
33
- import Te from "@mui/icons-material/ArrowDownward";
34
- import Ee from "@mui/icons-material/FilterAlt";
35
- import { FormProvider as De, useForm as Oe, useFormContext as Y, useWatch as ke } from "react-hook-form";
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
36
  import Ae from "@mui/icons-material/MoreVert";
37
37
  import { withDialog as je } from "@gen-epix/ui-core-components/hoc/withDialog";
38
- import { DndContext as X, DragOverlay as Me, KeyboardSensor as Z, PointerSensor as Ne, defaultDropAnimationSideEffects as Pe, useSensor as Fe, useSensors as Ie } from "@dnd-kit/core";
39
- import { SortableContext as Le, arrayMove as Re, sortableKeyboardCoordinates as ze, useSortable as Be } from "@dnd-kit/sortable";
40
- import { CSS as Ve } from "@dnd-kit/utilities";
41
- import He from "@mui/icons-material/DragIndicator";
42
- import Ue from "@mui/icons-material/IndeterminateCheckBox";
43
- import We from "@mui/icons-material/Check";
44
- import Ge from "@mui/icons-material/RestartAlt";
45
- import Ke from "@mui/icons-material/Close";
46
- import { NestedDropdown as qe } from "@gen-epix/ui-core-components/components/NestedMenu";
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";
47
47
  // ../../node_modules/.pnpm/use-debounce@10.1.1_react@19.3.1/node_modules/use-debounce/dist/index.module.js
48
- var Je = /* @__PURE__ */ e(c(), 1), Ye = /* @__PURE__ */ e(n(), 1), Xe = /* @__PURE__ */ e(g(), 1), Ze = /* @__PURE__ */ e(v(), 1);
49
- function Qe(e, t, n, r) {
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
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();
51
51
  f.current = e;
52
52
  var g = typeof window < "u", _ = !t && t !== 0 && g;
@@ -113,7 +113,7 @@ function Qe(e, t, n, r) {
113
113
  }, [b]), w;
114
114
  }
115
115
  // src/components/ui/Table/TableCellAsyncContent.tsx
116
- var $e = ({ content: e }) => {
116
+ var Qe = ({ content: e }) => {
117
117
  let [t, n] = U(null);
118
118
  return B(() => {
119
119
  (async () => {
@@ -122,41 +122,41 @@ var $e = ({ content: e }) => {
122
122
  }, [e]), /* @__PURE__ */ G(W, { children: t });
123
123
  };
124
124
  // ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
125
- function et(e) {
125
+ function $e(e) {
126
126
  var t, n, r = "";
127
127
  if (typeof e == "string" || typeof e == "number") r += e;
128
128
  else if (typeof e == "object") {
129
129
  if (Array.isArray(e)) {
130
130
  var i = e.length;
131
- for (t = 0; t < i; t++) e[t] && (n = et(e[t])) && (r && (r += " "), r += n);
131
+ for (t = 0; t < i; t++) e[t] && (n = $e(e[t])) && (r && (r += " "), r += n);
132
132
  } else for (n in e) e[n] && (r && (r += " "), r += n);
133
133
  }
134
134
  return r;
135
135
  }
136
- function tt() {
137
- for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = et(e)) && (r && (r += " "), r += t);
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);
138
138
  return r;
139
139
  }
140
140
  // src/components/ui/Table/TableFilter.tsx
141
- var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
142
- var n = l(), r = d();
141
+ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
142
+ var n = f(), r = b();
143
143
  function i(e) {
144
144
  return e && e.length ? n(e, r) : 0;
145
145
  }
146
146
  t.exports = i;
147
- })))(), 1), rt = ({ filter: e }) => /* @__PURE__ */ K(W, { children: [
148
- e instanceof s && /* @__PURE__ */ G(O, { filter: e }),
149
- e instanceof o && /* @__PURE__ */ G(C, { filter: e }),
150
- e instanceof r && /* @__PURE__ */ G(D, { filter: e }),
151
- e instanceof a && /* @__PURE__ */ G(E, { filter: e }),
152
- e instanceof S && /* @__PURE__ */ G(T, { filter: e }),
153
- e instanceof i && /* @__PURE__ */ G(w, { filter: e })
154
- ] }), it = ({ filter: e, onFilterChange: t }) => {
155
- let n = m(), { t: r } = q(), i = p(n, (e) => e.setFilterValue), a = V(() => ({ [e.id]: e.initialFilterValue }), [e.id, e.initialFilterValue]), o = V(() => ({ [e.id]: e.filterValue ?? e.initialFilterValue }), [
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 }), [
156
156
  e.id,
157
157
  e.filterValue,
158
158
  e.initialFilterValue
159
- ]), s = Oe({
159
+ ]), s = De({
160
160
  defaultValues: a,
161
161
  values: o
162
162
  }), { formState: { isDirty: c }, handleSubmit: l } = s, u = z(async (n) => {
@@ -173,26 +173,26 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
173
173
  t,
174
174
  i
175
175
  ]);
176
- return /* @__PURE__ */ G(De, {
176
+ return /* @__PURE__ */ G(Ee, {
177
177
  ...s,
178
- children: /* @__PURE__ */ K(j, {
178
+ children: /* @__PURE__ */ K(M, {
179
179
  autoComplete: "off",
180
180
  component: "form",
181
181
  id: "Filters",
182
182
  onSubmit: l(u),
183
183
  sx: { minWidth: "400px" },
184
- children: [/* @__PURE__ */ G(rt, { filter: e }), /* @__PURE__ */ K(j, {
184
+ children: [/* @__PURE__ */ G(nt, { filter: e }), /* @__PURE__ */ K(M, {
185
185
  sx: {
186
186
  display: "flex",
187
187
  gap: 1,
188
188
  justifyContent: "flex-end"
189
189
  },
190
- children: [/* @__PURE__ */ G(M, {
190
+ children: [/* @__PURE__ */ G(re, {
191
191
  disabled: e.isInitialFilterValue(),
192
192
  onClick: d,
193
193
  variant: "outlined",
194
194
  children: r`Remove filter`
195
- }), /* @__PURE__ */ G(M, {
195
+ }), /* @__PURE__ */ G(re, {
196
196
  disabled: !c,
197
197
  type: "submit",
198
198
  variant: "contained",
@@ -201,20 +201,20 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
201
201
  })]
202
202
  })
203
203
  });
204
- }, at = {}, ot = ({ 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: h, role: g, row: _, rowIndex: v, sx: y, tabIndex: x, title: S, width: C, xOffset: w }) => {
205
- let T = pe(), E = m(), D = p(E, b((e) => e.dataContext)), O = z((e) => {
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) => {
206
206
  l({
207
- dataContext: D,
207
+ dataContext: E,
208
208
  id: a.id,
209
- row: _,
210
- rowIndex: v
209
+ row: g,
210
+ rowIndex: _
211
211
  }, e.nativeEvent);
212
212
  }, [
213
213
  a.id,
214
- D,
214
+ E,
215
215
  l,
216
- _,
217
- v
216
+ g,
217
+ _
218
218
  ]), k = H(null), ee = z((e) => {
219
219
  if (!u || n && !n(e)) return;
220
220
  let t = e.currentTarget, r = t.getBoundingClientRect().width, i = {
@@ -262,27 +262,27 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
262
262
  u,
263
263
  n,
264
264
  a
265
- ]), te = !a.frozen, ne = z(() => {
266
- let e = a.frozen === f.LEFT, n = a.frozen === f.RIGHT, r = e || n, i;
267
- return t && (at[t] ? i = at[t] : (i = T.palette.getContrastText(t), at[t] = i)), {
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)), {
268
268
  "*": t ?? { color: i ? `${i} !important` : void 0 },
269
- background: r ? T.palette.background.paper : t,
269
+ background: r ? w.palette.background.paper : t,
270
270
  boxSizing: "border-box",
271
271
  color: i,
272
- left: e ? `${w ?? 0}px` : void 0,
272
+ left: e ? `${C ?? 0}px` : void 0,
273
273
  lineHeight: c,
274
274
  order: d,
275
275
  overflow: "hidden",
276
276
  paddingLeft: "8px",
277
277
  paddingRight: "8px",
278
278
  position: r ? "sticky" : "relative",
279
- right: n ? `${w ?? 0}px` : void 0,
279
+ right: n ? `${C ?? 0}px` : void 0,
280
280
  textAlign: a.textAlign ?? "left",
281
281
  textOverflow: a.disableEllipsis ? void 0 : "ellipsis",
282
282
  whiteSpace: a.disableEllipsis ? void 0 : "nowrap",
283
- width: `${C}px`,
283
+ width: `${S}px`,
284
284
  zIndex: +!!r,
285
- ...y
285
+ ...v
286
286
  };
287
287
  }, [
288
288
  t,
@@ -291,25 +291,25 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
291
291
  a.textAlign,
292
292
  c,
293
293
  d,
294
- y,
295
- T.palette,
296
- C,
297
- w
294
+ v,
295
+ w.palette,
296
+ S,
297
+ C
298
298
  ]);
299
- return /* @__PURE__ */ G(j, {
299
+ return /* @__PURE__ */ G(M, {
300
300
  "aria-sort": e,
301
301
  className: i,
302
302
  "data-column-index": o,
303
303
  "data-frozen": +!!a.frozen,
304
304
  "data-id": a.id,
305
- "data-row-index": v ?? "",
306
- onClick: l && s ? O : void 0,
307
- onMouseDown: te && u ? ee : void 0,
308
- ref: h,
309
- role: g ?? "cell",
310
- sx: ne(),
311
- tabIndex: x,
312
- title: S,
305
+ "data-row-index": _ ?? "",
306
+ onClick: l && s ? D : void 0,
307
+ onMouseDown: A && u ? ee : void 0,
308
+ ref: f,
309
+ role: p ?? "cell",
310
+ sx: te(),
311
+ tabIndex: b,
312
+ title: x,
313
313
  children: r
314
314
  });
315
315
  }, Q = {
@@ -319,7 +319,7 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
319
319
  filterLabelIcon: "GENEPIX-TableHeaderCell-filterLabelIcon",
320
320
  root: "GENEPIX-TableHeaderCell",
321
321
  sortLabelIcon: "GENEPIX-TableHeaderCell-sortLabelIcon"
322
- }, $ = 18, st = `${Q.root}--focus`, ct = L(F, { name: "GENEPIX-TableSortLabelIcon" })(({ ownerState: e, theme: t }) => ({
322
+ }, $ = 18, ot = `${Q.root}--focus`, st = de(F, { name: "GENEPIX-TableSortLabelIcon" })(({ ownerState: e, theme: t }) => ({
323
323
  "&:hover": {
324
324
  color: t.palette.primary.main,
325
325
  opacity: "1 !important"
@@ -336,7 +336,7 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
336
336
  padding: 0,
337
337
  userSelect: "none",
338
338
  width: `${$}px`
339
- })), lt = L(F, { name: "GENEPIX-TableCustomHeaderIcon" })(({ theme: e }) => ({
339
+ })), ct = de(F, { name: "GENEPIX-TableCustomHeaderIcon" })(({ theme: e }) => ({
340
340
  "&:hover": {
341
341
  color: e.palette.primary.main,
342
342
  opacity: "1 !important"
@@ -348,7 +348,7 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
348
348
  padding: 0,
349
349
  userSelect: "none",
350
350
  width: `${$}px`
351
- })), ut = L(F, { name: "GENEPIX-TableFilterLabelIcon" })(({ theme: e }) => ({
351
+ })), lt = de(F, { name: "GENEPIX-TableFilterLabelIcon" })(({ theme: e }) => ({
352
352
  "&:hover": {
353
353
  color: e.palette.primary.main,
354
354
  opacity: "1 !important"
@@ -360,54 +360,54 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
360
360
  padding: 0,
361
361
  userSelect: "none",
362
362
  width: `${$}px`
363
- })), dt = (e) => {
364
- let { t } = q(), n = pe(), r = m(), i = p(r, (e) => e.sortByField), a = p(r, (e) => e.dataContext), o = p(r, (e) => e.sortDirection), s = p(r, (e) => e.setSorting), c = p(r, (e) => e.filters), l = H(null), u = ye(), [d, f] = U(), h = H(null), g = H(null), { column: _, columnIndex: v, dividerColor: y, height: b, onColumnDividerKeyDown: x, onColumnDividerMouseDown: S, onCustomDrag: C, order: w, width: T, xOffset: E } = e, D = H(!1), O = z((e) => _.frozen || e.button !== 0 ? !1 : e.nativeEvent.target.classList.contains(Q.content), [_.frozen]), k = z((e, t) => {
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) => {
365
365
  C && (e.type === "start" && (D.current = !0), C(e, t));
366
366
  }, [C]), ee = z(async () => {
367
- i === _.id ? await s(_.id, o === "asc" ? "desc" : "asc") : await s(_.id, "asc");
367
+ i === g.id ? await s(g.id, o === "asc" ? "desc" : "asc") : await s(g.id, "asc");
368
368
  }, [
369
- _.id,
369
+ g.id,
370
370
  s,
371
371
  i,
372
372
  o
373
- ]), te = z(async (e) => {
374
- D.current ? (e.preventDefault(), e.stopPropagation(), D.current = !1) : _.comparatorFactory && await ee();
375
- }, [_.comparatorFactory, ee]), ne = z(async (e) => {
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
376
  await ee();
377
- }, [ee]), re = z(() => {
378
- f((e) => e ? null : h.current);
379
- }, []), A = z(() => {
377
+ }, [ee]), ne = z(() => {
378
+ f((e) => e ? null : p.current);
379
+ }, []), j = z(() => {
380
380
  f(null);
381
- }, []), M = z((e) => {
382
- e.button === 0 && (e.preventDefault(), e.stopPropagation(), S(e, _));
383
- }, [_, S]), N = z((e) => {
384
- x(e, _);
385
- }, [_, x]), P = V(() => c.find((e) => e.id === _.id), [_.id, c]), ie = V(() => !!P && !P.isInitialFilterValue(), [P]), ae = z(() => {
386
- _.customHeaderIcon?.onClick({
387
- column: _,
381
+ }, []), re = z((e) => {
382
+ e.button === 0 && (e.preventDefault(), e.stopPropagation(), S(e, g));
383
+ }, [g, S]), ie = z((e) => {
384
+ 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(() => {
386
+ g.customHeaderIcon?.onClick({
387
+ column: g,
388
388
  dataContext: a
389
389
  });
390
- }, [_, a]), F = z(() => {
390
+ }, [g, a]), I = z(() => {
391
391
  f(null), setTimeout(() => {
392
- h.current.classList.add(st), h.current?.focus(), g.current?.focus();
392
+ p.current.classList.add(ot), p.current?.focus(), h.current?.focus();
393
393
  });
394
- }, []), oe = i === _.id, le = { direction: i === _.id ? o : "asc" }, ue = tt(Q.sortLabelIcon, { [`${Q.sortLabelIcon}--active`]: oe }), de = tt(Q.filterLabelIcon, { [`${Q.filterLabelIcon}--active`]: ie }), fe = !!_.customHeaderIcon, L = !!_.comparatorFactory, me = !!P, he = L || me || fe ? 0 : -1, R = +n.spacing(2).replace("px", ""), ge = V(() => {
395
- if (i === _.id) return o === "asc" ? "ascending" : "descending";
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(() => {
395
+ if (i === g.id) return o === "asc" ? "ascending" : "descending";
396
396
  }, [
397
- _.id,
397
+ g.id,
398
398
  i,
399
399
  o
400
400
  ]);
401
- return /* @__PURE__ */ K(ot, {
401
+ return /* @__PURE__ */ K(at, {
402
402
  ariaSort: ge,
403
403
  canDrag: O,
404
- className: tt(Q.root, { [st]: !!d }),
405
- column: _,
406
- columnIndex: v,
404
+ className: et(Q.root, { [ot]: !!d }),
405
+ column: g,
406
+ columnIndex: _,
407
407
  height: b,
408
408
  onCustomDrag: k,
409
409
  order: w,
410
- ref: h,
410
+ ref: p,
411
411
  role: "columnheader",
412
412
  sx: {
413
413
  [`.${Q.filterLabelIcon}--active`]: { color: n.palette.secondary.main },
@@ -416,7 +416,7 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
416
416
  opacity: "1 !important"
417
417
  },
418
418
  [`.${Q.sortLabelIcon}--active`]: { color: n.palette.text.secondary },
419
- [`&:hover, &:focus-visible, &:focus, &:focus-within, &.${st}`]: {
419
+ [`&:hover, &:focus-visible, &:focus, &:focus-within, &.${ot}`]: {
420
420
  [`.${Q.columnDivider}`]: { opacity: 1 },
421
421
  [`.${Q.sortLabelIcon}, .${Q.filterLabelIcon}, .${Q.customHeaderIcon}`]: {
422
422
  display: "inline-block",
@@ -432,16 +432,16 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
432
432
  tabIndex: he,
433
433
  width: T,
434
434
  xOffset: E,
435
- children: [_.type === "actions" && /* @__PURE__ */ G(j, {
435
+ children: [g.type === "actions" && /* @__PURE__ */ G(M, {
436
436
  className: Q.content,
437
- sx: we,
437
+ sx: Ce,
438
438
  children: t`Actions`
439
- }), _.type !== "actions" && /* @__PURE__ */ K(j, {
439
+ }), g.type !== "actions" && /* @__PURE__ */ K(M, {
440
440
  sx: {
441
- [`&:hover .${Q.content}`]: { maxWidth: `calc(100% + 16px - ${(0, nt.default)([
442
- fe ? R : 0,
441
+ [`&:hover .${Q.content}`]: { maxWidth: `calc(100% + 16px - ${(0, tt.default)([
442
+ de ? R : 0,
443
443
  me ? R : 0,
444
- L ? R : 0,
444
+ pe ? R : 0,
445
445
  R
446
446
  ])}px)` },
447
447
  alignItems: "center",
@@ -449,86 +449,86 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
449
449
  width: "100%"
450
450
  },
451
451
  children: [
452
- _.renderHeader ? /* @__PURE__ */ G(W, { children: _.renderHeader({
453
- column: _,
452
+ g.renderHeader ? /* @__PURE__ */ G(W, { children: g.renderHeader({
453
+ column: g,
454
454
  dataContext: a
455
- }) }) : /* @__PURE__ */ G(I, {
455
+ }) }) : /* @__PURE__ */ G(se, {
456
456
  arrow: !0,
457
457
  placement: "top",
458
- title: _.headerTooltipContent,
459
- children: /* @__PURE__ */ G(j, {
458
+ title: g.headerTooltipContent,
459
+ children: /* @__PURE__ */ G(M, {
460
460
  className: Q.content,
461
- onClick: te,
461
+ onClick: A,
462
462
  ref: l,
463
463
  sx: {
464
464
  cursor: "pointer",
465
465
  flexGrow: 1,
466
- maxWidth: `calc(100% + 16px - ${(0, nt.default)([
467
- oe ? R : 0,
468
- ie ? R : 0,
466
+ maxWidth: `calc(100% + 16px - ${(0, tt.default)([
467
+ L ? R : 0,
468
+ P ? R : 0,
469
469
  R
470
470
  ])}px)`,
471
471
  overflow: "hidden",
472
472
  textOverflow: "ellipsis",
473
473
  whiteSpace: "nowrap"
474
474
  },
475
- children: _.renderHeaderContent ? _.renderHeaderContent({
476
- column: _,
475
+ children: g.renderHeaderContent ? g.renderHeaderContent({
476
+ column: g,
477
477
  dataContext: a
478
- }) : _.headerName ?? ""
478
+ }) : g.headerName ?? ""
479
479
  })
480
480
  }),
481
- fe && /* @__PURE__ */ G(lt, {
481
+ de && /* @__PURE__ */ G(ct, {
482
482
  className: Q.customHeaderIcon,
483
- onClick: ae,
483
+ onClick: F,
484
484
  tabIndex: 0,
485
- title: _.customHeaderIcon?.label,
486
- children: _.customHeaderIcon?.iconElement
485
+ title: g.customHeaderIcon?.label,
486
+ children: g.customHeaderIcon?.iconElement
487
487
  }),
488
- me && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(ut, {
489
- className: de,
490
- onClick: re,
491
- ref: g,
488
+ me && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(lt, {
489
+ className: ue,
490
+ onClick: ne,
491
+ ref: h,
492
492
  tabIndex: 0,
493
- title: t("Show filter for {{name}}", { name: _.headerName || t("unknown") }),
494
- children: /* @__PURE__ */ G(Ee, { fontSize: "inherit" })
495
- }), /* @__PURE__ */ G(ce, {
493
+ title: t("Show filter for {{name}}", { name: g.headerName || t("unknown") }),
494
+ children: /* @__PURE__ */ G(Te, { fontSize: "inherit" })
495
+ }), /* @__PURE__ */ G(oe, {
496
496
  anchorEl: d,
497
497
  anchorOrigin: {
498
498
  horizontal: "center",
499
499
  vertical: "bottom"
500
500
  },
501
501
  id: u,
502
- onClose: F,
502
+ onClose: I,
503
503
  open: !!d,
504
504
  sx: { zIndex: n.zIndex.appBar + 1 },
505
505
  transformOrigin: {
506
506
  horizontal: "center",
507
507
  vertical: "top"
508
508
  },
509
- children: /* @__PURE__ */ G(se, {
509
+ children: /* @__PURE__ */ G(ae, {
510
510
  elevation: 4,
511
511
  square: !0,
512
512
  sx: { padding: n.spacing(3) },
513
- children: /* @__PURE__ */ G(it, {
514
- filter: P,
515
- onFilterChange: A
513
+ children: /* @__PURE__ */ G(rt, {
514
+ filter: N,
515
+ onFilterChange: j
516
516
  })
517
517
  })
518
518
  })] }),
519
- L && /* @__PURE__ */ G(W, { children: /* @__PURE__ */ G(ct, {
520
- className: ue,
521
- onClick: ne,
522
- ownerState: le,
519
+ pe && /* @__PURE__ */ G(W, { children: /* @__PURE__ */ G(st, {
520
+ className: le,
521
+ onClick: te,
522
+ ownerState: ce,
523
523
  tabIndex: 0,
524
- title: t("Toggle sorting for {{name}}", { name: _.headerName || t("unknown") }),
525
- children: /* @__PURE__ */ G(Te, { fontSize: "inherit" })
524
+ title: t("Toggle sorting for {{name}}", { name: g.headerName || t("unknown") }),
525
+ children: /* @__PURE__ */ G(we, { fontSize: "inherit" })
526
526
  }) }),
527
- _.resizable !== !1 && /* @__PURE__ */ G(j, {
528
- "aria-label": t("Resize column {{name}}, use arrow keys to adjust the size.", { name: _.headerName || t("unknown") }),
527
+ g.resizable !== !1 && /* @__PURE__ */ G(M, {
528
+ "aria-label": t("Resize column {{name}}, use arrow keys to adjust the size.", { name: g.headerName || t("unknown") }),
529
529
  className: Q.columnDivider,
530
- onKeyDown: N,
531
- onMouseDown: M,
530
+ onKeyDown: ie,
531
+ onMouseDown: re,
532
532
  role: "separator",
533
533
  sx: {
534
534
  "&:focus-visible, &:focus, &:focus-within": {
@@ -539,7 +539,7 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
539
539
  borderColor: n.palette.primary.main,
540
540
  opacity: 1
541
541
  },
542
- borderRight: `1px solid ${y}`,
542
+ borderRight: `1px solid ${v}`,
543
543
  boxSizing: "border-box",
544
544
  cursor: "col-resize",
545
545
  height: "18px",
@@ -552,9 +552,9 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
552
552
  })
553
553
  ]
554
554
  })]
555
- }, _.id);
556
- }, ft = (e) => {
557
- let t = m(), n = p(t, b((e) => e.dataContext)), [r, i] = U(null), { t: a } = q(), o = !!r, s = z((e) => {
555
+ }, 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) => {
558
558
  i(e.currentTarget);
559
559
  }, []), c = z(() => {
560
560
  i(null);
@@ -569,7 +569,7 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
569
569
  e.row,
570
570
  e.rowIndex
571
571
  ]), u = z(() => {}, []);
572
- return /* @__PURE__ */ G(ot, {
572
+ return /* @__PURE__ */ G(at, {
573
573
  ...e,
574
574
  onClick: u,
575
575
  children: l.length > 0 && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(F, {
@@ -582,7 +582,7 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
582
582
  transform: "translateY(-50%)"
583
583
  },
584
584
  children: /* @__PURE__ */ G(Ae, {})
585
- }), /* @__PURE__ */ G(oe, {
585
+ }), /* @__PURE__ */ G(I, {
586
586
  anchorEl: r,
587
587
  id: "basic-menu",
588
588
  onClick: c,
@@ -592,26 +592,27 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
592
592
  children: l
593
593
  })] })
594
594
  }, e.column.id);
595
- }, pt = ({ children: e }) => {
596
- let t = V(() => ({ sideEffects: Pe({ styles: { active: { opacity: "0.6" } } }) }), []);
597
- return /* @__PURE__ */ G(Me, {
595
+ }, ft = ({ children: e }) => {
596
+ let t = V(() => ({ sideEffects: Fe({ styles: { active: { opacity: "1" } } }) }), []);
597
+ return /* @__PURE__ */ G(Y, {
598
598
  ...J.createAttributes("SortableOverlay"),
599
599
  dropAnimation: t,
600
+ style: { opacity: 1 },
600
601
  zIndex: 1e3,
601
602
  children: e
602
603
  });
603
- }, mt = ge({
604
+ }, pt = R({
604
605
  attributes: void 0,
605
606
  listeners: void 0,
606
607
  ref: void 0
607
- }), ht = (e) => {
608
+ }), mt = (e) => {
608
609
  let { children: t, value: n } = e;
609
- return /* @__PURE__ */ G(mt, {
610
+ return /* @__PURE__ */ G(pt, {
610
611
  value: n,
611
612
  children: t
612
613
  });
613
- }, gt = ({ children: e, id: t, sx: n }) => {
614
- let r = pe(), { attributes: i, isDragging: a, listeners: o, setActivatorNodeRef: s, setNodeRef: c, transform: l, transition: u } = Be({ id: t }), d = V(() => ({
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(() => ({
615
616
  attributes: i,
616
617
  listeners: o,
617
618
  ref: s
@@ -620,35 +621,40 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
620
621
  o,
621
622
  s
622
623
  ]), f = {
623
- backgroundColor: a ? r.palette.secondary.main : r.palette.background.paper,
624
- transform: Ve.Translate.toString(l),
624
+ transform: Be.Translate.toString(l),
625
625
  transition: u
626
626
  };
627
- return /* @__PURE__ */ G(ht, {
627
+ return /* @__PURE__ */ G(mt, {
628
628
  value: d,
629
- children: /* @__PURE__ */ G(j, {
629
+ children: /* @__PURE__ */ G(M, {
630
630
  ...J.createAttributes("SortableListItem", { id: t }),
631
631
  component: "li",
632
632
  ref: c,
633
+ role: "row",
633
634
  style: f,
634
635
  sx: {
635
636
  ...n ?? {},
637
+ "&:hover": { backgroundColor: a ? r.palette.background.paper : r.palette.action.hover },
636
638
  alignItems: "center",
637
639
  backgroundColor: r.palette.background.paper,
638
- borderRadius: `${r.shape.borderRadius}px`,
639
- boxShadow: 1,
640
+ borderBottom: `1px solid ${r.palette.divider}`,
641
+ boxShadow: a ? r.shadows[6] : void 0,
640
642
  boxSizing: "border-box",
641
- display: "flex",
642
- flexGrow: 1,
643
+ display: "grid",
644
+ gridTemplateColumns: "100px 1fr 100px",
643
645
  justifyContent: "space-between",
644
- listStyle: "none"
646
+ listStyle: "none",
647
+ outline: a ? `2px solid ${r.palette.primary.main}` : void 0,
648
+ outlineOffset: a ? "-2px" : void 0,
649
+ position: a ? "relative" : void 0,
650
+ zIndex: a ? 1 : void 0
645
651
  },
646
652
  children: e
647
653
  })
648
654
  });
649
- }, _t = ({ name: e }) => {
650
- let t = pe(), { attributes: n, listeners: r, ref: i } = ve(mt);
651
- return /* @__PURE__ */ G(j, {
655
+ }, gt = ({ name: e }) => {
656
+ let t = fe(), { attributes: n, listeners: r, ref: i } = _e(pt);
657
+ return /* @__PURE__ */ G(M, {
652
658
  ...J.createAttributes("SortableListItemDragHandle"),
653
659
  component: "button",
654
660
  ...n,
@@ -657,7 +663,10 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
657
663
  name: e,
658
664
  ref: i,
659
665
  sx: {
660
- "&:focus-visible": { boxShadow: `0 0px 0px 2px ${t.palette.primary.main}` },
666
+ "&:focus-visible": {
667
+ outline: `2px solid ${t.palette.primary.main}`,
668
+ outlineOffset: 2
669
+ },
661
670
  "&:hover": { backgroundColor: t.palette.action.hover },
662
671
  alignItems: "center",
663
672
  appearance: "none",
@@ -671,141 +680,228 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
671
680
  outline: "none",
672
681
  touchAction: "none"
673
682
  },
674
- children: /* @__PURE__ */ G(He, {})
683
+ type: "button",
684
+ children: /* @__PURE__ */ G(Ve, {})
675
685
  });
676
- }, vt = ({ items: e, onChange: t, renderItemContent: n }) => {
677
- let r = pe(), { t: i } = q(), [a, o] = U(null), s = V(() => e.find((e) => e.id === a?.id), [a, e]), c = Ie(Fe(Ne), Fe(Z, { coordinateGetter: ze })), l = z(() => {
678
- o(null);
679
- }, []), u = z(({ active: n, over: r }) => {
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(() => {
688
+ s(null);
689
+ }, []), p = z(({ active: n, over: r }) => {
680
690
  if (r && n.id !== r?.id) {
681
691
  let i = e.findIndex(({ id: e }) => e === n.id), a = e.findIndex(({ id: e }) => e === r.id);
682
- t(Re(e, i, a));
692
+ t(Le(e, i, a));
683
693
  }
684
- o(null);
685
- }, [e, t]), d = z(({ active: e }) => {
686
- o(e);
687
- }, []), f = z((n) => {
694
+ s(null);
695
+ }, [e, t]), m = z(({ active: e }) => {
696
+ s(e);
697
+ }, []), h = z((n) => {
688
698
  let r = n.target.getAttribute("data-id");
689
- if (!r) return;
699
+ if (r === null) return;
690
700
  let i = n.target.checked;
691
- t(e.map((e) => e.id === r ? {
701
+ t(e.map((e) => String(e.id) === r ? {
692
702
  ...e,
693
703
  isSelected: i
694
704
  } : e));
695
- }, [t, e]), p = z((e) => /* @__PURE__ */ K(gt, {
705
+ }, [t, e]), g = z((e) => /* @__PURE__ */ K(ht, {
696
706
  id: e.id,
697
- sx: {
698
- "&:hover": { backgroundColor: r.palette.action.hover },
699
- backgroundColor: r.palette.background.paper
700
- },
701
- children: [/* @__PURE__ */ G(ie, {
702
- control: /* @__PURE__ */ G(N, {
703
- checked: e.isSelected,
704
- onChange: f,
705
- size: "small",
706
- slotProps: { input: { "data-id": e.id } }
707
+ children: [
708
+ /* @__PURE__ */ G(M, {
709
+ role: "cell",
710
+ children: /* @__PURE__ */ G(P, {
711
+ control: /* @__PURE__ */ G(ie, {
712
+ "aria-label": a("Visibility for {{label}}", { label: e.label }),
713
+ checked: e.isSelected,
714
+ name: e.label,
715
+ onChange: h,
716
+ size: "small",
717
+ slotProps: { input: { "data-id": e.id } }
718
+ }),
719
+ label: "",
720
+ sx: { paddingLeft: i.spacing(1) }
721
+ })
707
722
  }),
708
- label: n(e),
709
- sx: {
710
- flexGrow: 1,
711
- paddingLeft: r.spacing(1)
712
- }
713
- }), /* @__PURE__ */ G(_t, { name: i("Drag handle for {{label}}", { label: e.label }) })]
723
+ r(e),
724
+ /* @__PURE__ */ G(M, {
725
+ role: "cell",
726
+ sx: {
727
+ alignItems: "center",
728
+ display: "flex",
729
+ justifyContent: "flex-end",
730
+ paddingRight: i.spacing(1),
731
+ width: "100%"
732
+ },
733
+ children: /* @__PURE__ */ G(gt, { name: a("Drag handle for {{label}}", { label: e.label }) })
734
+ })
735
+ ]
714
736
  }, e.id), [
715
- f,
716
- n,
717
- i,
718
- r
737
+ h,
738
+ r,
739
+ a,
740
+ i
719
741
  ]);
720
- return /* @__PURE__ */ K(X, {
721
- onDragCancel: l,
722
- onDragEnd: u,
723
- onDragStart: d,
724
- sensors: c,
725
- children: [/* @__PURE__ */ G(Le, {
726
- items: e,
727
- children: /* @__PURE__ */ G(ae, { children: /* @__PURE__ */ G(j, {
728
- ...J.createAttributes("SortableList"),
729
- component: "ul",
742
+ return /* @__PURE__ */ K(Me, {
743
+ accessibility: {
744
+ announcements: {
745
+ onDragCancel: ({ active: t }) => {
746
+ let n = l(t.id);
747
+ if (n) return a("Reordering {{label}} cancelled. {{label}} returned to position {{position}} of {{count}}.", {
748
+ count: e.length,
749
+ label: n.label,
750
+ position: u(t.id)
751
+ });
752
+ },
753
+ onDragEnd: ({ active: t, over: n }) => {
754
+ let r = l(t.id);
755
+ if (r) return n ? a("{{label}} dropped at position {{position}} of {{count}}.", {
756
+ count: e.length,
757
+ label: r.label,
758
+ position: u(n.id)
759
+ }) : a("{{label}} returned to position {{position}} of {{count}}.", {
760
+ count: e.length,
761
+ label: r.label,
762
+ position: u(t.id)
763
+ });
764
+ },
765
+ onDragOver: ({ active: t, over: n }) => {
766
+ let r = l(t.id);
767
+ if (r && n) return a("{{label}} moved to position {{position}} of {{count}}.", {
768
+ count: e.length,
769
+ label: r.label,
770
+ position: u(n.id)
771
+ });
772
+ },
773
+ onDragStart: ({ active: t }) => {
774
+ let n = l(t.id);
775
+ if (n) return a("Picked up {{label}}. Position {{position}} of {{count}}.", {
776
+ count: e.length,
777
+ label: n.label,
778
+ position: u(t.id)
779
+ });
780
+ }
781
+ },
782
+ screenReaderInstructions: { draggable: a("To reorder an item, focus its drag handle and press Space. Use arrow keys to move it. Press Space to drop, or Escape to cancel.") }
783
+ },
784
+ onDragCancel: f,
785
+ onDragEnd: p,
786
+ onDragStart: m,
787
+ sensors: d,
788
+ children: [/* @__PURE__ */ K(M, {
789
+ "aria-label": a("Change column order and visibility"),
790
+ role: "table",
791
+ children: [/* @__PURE__ */ K(M, {
792
+ role: "row",
730
793
  sx: {
731
- display: "flex",
732
- flexDirection: "column",
733
- gap: r.spacing(.5),
734
- listStyle: "none",
735
- padding: 0
794
+ alignItems: "center",
795
+ borderBottom: `1px solid ${i.palette.divider}`,
796
+ display: "grid",
797
+ gridTemplateColumns: "100px 1fr 100px",
798
+ height: i.spacing(5)
736
799
  },
737
- children: e.map((e) => p(e))
738
- }) })
739
- }), /* @__PURE__ */ G(pt, { children: s ? p(s) : null })]
800
+ children: [
801
+ /* @__PURE__ */ G(M, {
802
+ component: "div",
803
+ role: "columnheader",
804
+ sx: { fontWeight: "bold" },
805
+ children: a`Visible`
806
+ }),
807
+ n ? n() : /* @__PURE__ */ G(M, {
808
+ component: "div",
809
+ role: "columnheader",
810
+ sx: { fontWeight: "bold" },
811
+ children: a`Column`
812
+ }),
813
+ /* @__PURE__ */ G(M, {
814
+ "aria-label": a`Reorder`,
815
+ role: "columnheader"
816
+ })
817
+ ]
818
+ }), /* @__PURE__ */ G(Z, {
819
+ items: e,
820
+ children: /* @__PURE__ */ G(M, {
821
+ ...J.createAttributes("SortableList"),
822
+ component: "ul",
823
+ role: "rowgroup",
824
+ sx: {
825
+ gap: i.spacing(.5),
826
+ listStyle: "none",
827
+ margin: 0,
828
+ padding: 0
829
+ },
830
+ children: e.map((e) => g(e))
831
+ })
832
+ })]
833
+ }), /* @__PURE__ */ G(ft, { children: c ? g(c) : null })]
740
834
  });
741
- }, yt = je(({ onActionsChange: e, onClose: t, onTitleChange: n, openProps: { hasCellData: r } }) => {
742
- let { t: i } = q(), [a, o] = U([]), s = m(), c = p(s, b((e) => e.emitEvent)), l = p(s, b((e) => e.dataContext)), d = p(s, b((e) => e.getCurrentColumnVisualSettings())), f = p(s, b((e) => e.columns)), h = p(s, b((e) => e.sortedData)), g = V(() => {
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(() => {
743
837
  let e = /* @__PURE__ */ new Map();
744
- return f.forEach((t) => {
838
+ return g.forEach((t) => {
745
839
  e.set(t.id, t);
746
840
  }), e;
747
- }, [f]), _ = z((e) => {
841
+ }, [g]), b = z((e) => {
748
842
  let t = [];
749
843
  e.forEach((e) => {
750
- let n = g.get(e.id);
844
+ let n = v.get(e.id);
751
845
  n && !n.frozen && t.push({
846
+ column: n,
752
847
  id: n.id,
753
848
  isSelected: e.isVisible,
849
+ itemContent: n.headerName,
754
850
  label: n.headerName
755
851
  });
756
- }), o(t);
757
- }, [g]);
852
+ }), c(t);
853
+ }, [v]);
758
854
  B(() => {
759
- _(d);
760
- }, [d, _]);
761
- let v = z(() => {
762
- _(u.createInitialVisualColumnSettings(f));
763
- }, [f, _]);
855
+ b(f);
856
+ }, [f, b]);
857
+ let x = z(() => {
858
+ b(p.createInitialVisualColumnSettings(g));
859
+ }, [g, b]);
764
860
  B(() => {
765
- n(i`Change column order and visibility`);
766
- }, [n, i]);
767
- let y = z(() => {
768
- c("columnVisibilityChange", [...f.filter((e) => e.frozen).map((e) => e.id), ...a.filter((e) => e.isSelected).map((e) => e.id.toString())]);
769
- let e = f.findIndex((e) => !e.frozen), n = f.slice(0, e), r = f.slice(e + a.length);
770
- c("columnOrderChange", [
861
+ n(o`Change column order and visibility`);
862
+ }, [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);
866
+ u("columnOrderChange", [
771
867
  ...n.map((e) => e.id),
772
- ...a.map((e) => e.id.toString()),
868
+ ...s.map((e) => e.id.toString()),
773
869
  ...r.map((e) => e.id)
774
870
  ]), t();
775
871
  }, [
776
- f,
777
- c,
778
- a,
872
+ g,
873
+ u,
874
+ s,
779
875
  t
780
- ]), x = z((e) => {
781
- let t = u.getColumnIdsWithData({
782
- dataContext: l,
876
+ ]), C = z((e) => {
877
+ let t = p.getColumnIdsWithData({
878
+ dataContext: d,
783
879
  hasCellData: r,
784
- sortedData: h,
785
- tableColumns: f,
786
- visibleColumnIds: a.filter(e).map((e) => e.id.toString())
880
+ sortedData: _,
881
+ tableColumns: g,
882
+ visibleColumnIds: s.filter(e).map((e) => e.id.toString())
787
883
  });
788
- o((e) => e.map((e) => ({
884
+ c((e) => e.map((e) => ({
789
885
  ...e,
790
886
  isSelected: t.includes(e.id.toString())
791
887
  })));
792
888
  }, [
793
- l,
889
+ d,
794
890
  r,
795
- a,
796
- h,
797
- f
798
- ]), S = z(() => {
799
- x(() => !0);
800
- }, [x]), C = z(() => {
801
- x((e) => e.isSelected);
802
- }, [x]), w = z(() => {
803
- o((e) => e.map((e) => ({
891
+ s,
892
+ _,
893
+ g
894
+ ]), w = z(() => {
895
+ C(() => !0);
896
+ }, [C]), T = z(() => {
897
+ C((e) => e.isSelected);
898
+ }, [C]), E = z(() => {
899
+ c((e) => e.map((e) => ({
804
900
  ...e,
805
901
  isSelected: !0
806
902
  })));
807
- }, []), T = z(() => {
808
- o((e) => e.map((e) => ({
903
+ }, []), D = z(() => {
904
+ c((e) => e.map((e) => ({
809
905
  ...e,
810
906
  isSelected: !1
811
907
  })));
@@ -816,47 +912,47 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
816
912
  ...J.createAttributes("TableColumnOrderDialog-enable-all"),
817
913
  autoFocus: !0,
818
914
  color: "secondary",
819
- label: i`Enable all`,
820
- onClick: w,
915
+ label: o`Show all`,
916
+ onClick: E,
821
917
  variant: "outlined"
822
918
  },
823
919
  {
824
920
  ...J.createAttributes("TableColumnOrderDialog-enable-all-with-data"),
825
921
  autoFocus: !0,
826
922
  color: "secondary",
827
- label: i`Enable all with data`,
828
- onClick: S,
923
+ label: o`Show all with data`,
924
+ onClick: w,
829
925
  variant: "outlined"
830
926
  },
831
927
  {
832
928
  ...J.createAttributes("TableColumnOrderDialog-disable-all"),
833
929
  autoFocus: !0,
834
930
  color: "secondary",
835
- label: i`Disable all`,
836
- onClick: T,
931
+ label: o`Hide all`,
932
+ onClick: D,
837
933
  variant: "outlined"
838
934
  },
839
935
  {
840
936
  ...J.createAttributes("TableColumnOrderDialog-disable-all-without-data"),
841
937
  autoFocus: !0,
842
938
  color: "secondary",
843
- label: i`Disable all without data`,
844
- onClick: C,
939
+ label: o`Hide all without data`,
940
+ onClick: T,
845
941
  variant: "outlined"
846
942
  },
847
943
  {
848
944
  ...J.createAttributes("TableColumnOrderDialog-reset"),
849
945
  autoFocus: !0,
850
946
  color: "secondary",
851
- label: i`Reset to default`,
852
- onClick: v,
947
+ label: o`Reset to default`,
948
+ onClick: x,
853
949
  variant: "outlined"
854
950
  },
855
951
  {
856
952
  ...J.createAttributes("TableColumnOrderDialog-close"),
857
953
  autoFocus: !0,
858
954
  color: "primary",
859
- label: i`Close`,
955
+ label: o`Close`,
860
956
  onClick: t,
861
957
  variant: "outlined"
862
958
  },
@@ -864,48 +960,52 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
864
960
  ...J.createAttributes("TableColumnOrderDialog-save"),
865
961
  autoFocus: !0,
866
962
  color: "secondary",
867
- label: i`Apply`,
868
- onClick: y,
963
+ label: o`Apply`,
964
+ onClick: S,
869
965
  variant: "contained"
870
966
  }
871
967
  ]);
872
968
  }, [
873
969
  e,
874
970
  t,
875
- T,
876
- S,
877
- v,
878
- y,
971
+ D,
879
972
  w,
880
- i,
881
- C
973
+ x,
974
+ S,
975
+ E,
976
+ o,
977
+ T
882
978
  ]);
883
- let E = z((e) => {
884
- o(e);
885
- }, []), D = z((e) => e.label, []);
886
- return /* @__PURE__ */ G(j, {
979
+ let O = z((e) => {
980
+ c(e);
981
+ }, []), k = z((e) => /* @__PURE__ */ G(M, {
982
+ role: "cell",
983
+ children: e.label
984
+ }), []);
985
+ return /* @__PURE__ */ G(M, {
887
986
  sx: {},
888
- children: /* @__PURE__ */ G(vt, {
889
- items: a,
890
- onChange: E,
891
- renderItemContent: D
987
+ children: /* @__PURE__ */ G(_t, {
988
+ items: s,
989
+ onChange: O,
990
+ renderHeaderContent: i,
991
+ renderItemContent: a ?? k
892
992
  })
893
993
  });
894
994
  }, {
895
995
  defaultTitle: "",
896
996
  disableBackdropClick: !1,
897
997
  fullWidth: !0,
898
- maxWidth: "md",
998
+ maxWidth: "lg",
899
999
  noCloseButton: !1,
900
1000
  testId: "TableColumnOrderDialog"
901
- }), bt = ({ cell: e, onCheckBoxClick: t, tableColumn: n }) => {
902
- let { t: r } = q(), i = m(), a = p(i, b((e) => e.idSelectorCallback)), o = p(i, b((e) => e.selectedIds)), s = p(i, b((e) => e.setSelectedIds)), c = a(e.row), l = z((e) => {
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) => {
903
1003
  e.stopPropagation(), e.shiftKey && e.preventDefault(), t(e, c);
904
1004
  }, [t, c]), u = z((e, t) => {
905
1005
  let n = e.target.getAttribute("name");
906
1006
  t && !o.includes(n) ? s([...o, n]) : t || s(o.filter((e) => e !== n));
907
1007
  }, [o, s]);
908
- return /* @__PURE__ */ G(N, {
1008
+ return /* @__PURE__ */ G(ie, {
909
1009
  checked: o.includes(c),
910
1010
  disabled: n.isDisabled ? n.isDisabled(e) : !1,
911
1011
  name: a(e.row),
@@ -917,15 +1017,15 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
917
1017
  padding: 0
918
1018
  }
919
1019
  });
920
- }, xt = /* @__PURE__ */ e(y(), 1), St = ({ tableColumnParams: e }) => {
921
- let { t } = q(), n = e.column, r = m(), i = p(r, b((e) => e.dataContext)), a = p(r, b((e) => e.idSelectorCallback)), o = p(r, b((e) => e.selectedIds)), s = p(r, b((e) => e.sortedData)), c = p(r, b((e) => e.setSelectedIds)), l = n.isDisabled ? s.filter((e) => n.isDisabled({
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({
922
1022
  dataContext: i,
923
1023
  id: a(e),
924
1024
  row: e,
925
1025
  rowIndex: s.indexOf(e)
926
1026
  }) === !1) : s, u = l.every((e) => o.includes(a(e))), d = l.some((e) => o.includes(a(e))), f = z((e) => {
927
1027
  let t = l.map((e) => a(e));
928
- c(u ? o.filter((e) => !t.includes(e)) : (0, xt.default)([...o, ...t]));
1028
+ c(u ? o.filter((e) => !t.includes(e)) : (0, bt.default)([...o, ...t]));
929
1029
  }, [
930
1030
  l,
931
1031
  a,
@@ -933,9 +1033,9 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
933
1033
  o,
934
1034
  c
935
1035
  ]);
936
- return /* @__PURE__ */ G(N, {
1036
+ return /* @__PURE__ */ G(ie, {
937
1037
  checked: d,
938
- checkedIcon: u ? void 0 : /* @__PURE__ */ G(Ue, {}),
1038
+ checkedIcon: u ? void 0 : /* @__PURE__ */ G(He, {}),
939
1039
  name: "select-all",
940
1040
  onChange: f,
941
1041
  slotProps: { input: { "aria-label": t`Select all` } },
@@ -944,11 +1044,11 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
944
1044
  padding: 0
945
1045
  }
946
1046
  });
947
- }, Ct = ({ cell: e, getRowName: t, onReadableIndexClick: n, tableColumn: r }) => {
948
- let i = _(), a = z((r) => {
1047
+ }, St = ({ cell: e, getRowName: t, onReadableIndexClick: n, tableColumn: r }) => {
1048
+ let i = v(), a = z((r) => {
949
1049
  if (n) {
950
1050
  if (!t) throw Error("getRowName is required when onReadableIndexClick is provided");
951
- i.enablePageEvents && ne.resolve(h).emit("click", {
1051
+ i.enablePageEvents && te.resolve(_).emit("click", {
952
1052
  label: t(e.row),
953
1053
  type: "table-row-index"
954
1054
  }), r.preventDefault(), r.stopPropagation(), n(e.row);
@@ -959,7 +1059,7 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
959
1059
  n,
960
1060
  e.row
961
1061
  ]);
962
- return n ? /* @__PURE__ */ G(M, {
1062
+ return n ? /* @__PURE__ */ G(re, {
963
1063
  "aria-label": r.getAriaLabel(e),
964
1064
  color: "primary",
965
1065
  onClick: a,
@@ -973,543 +1073,552 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
973
1073
  variant: "text",
974
1074
  children: e.rowIndex + 1
975
1075
  }) : e.rowIndex + 1;
976
- }, wt = ({ font: e, forceHorizontalOverflow: t, getRowName: n, headerHeight: r = 4, initialVisibleItemIndex: i, onRangeChanged: a = Ze.default, onReadableIndexClick: o, onRowClick: s, onRowMouseEnter: c = Ze.default, onRowMouseLeave: l = Ze.default, onVerticalScrollPositionChange: d, onVisibleItemIndexChange: f, overscanMain: g, overscanReverse: v, ref: y, rowHeight: x = 4, rowHighlightingSubject: S, sx: C }) => {
977
- let w = pe(), { t: T } = q(), E = _(), D = ne.resolve(re), O = m(), { DEFAULT_OVERSCAN_MAIN: k, DEFAULT_OVERSCAN_REVERSE: ee } = E.table;
978
- p(O, b((e) => e.getCurrentColumnVisualSettings().filter((e) => e.isVisible).map((e) => e.id)));
979
- let te = p(O, b((e) => e.setCurrentColumnVisualSettings)), A = p(O, b((e) => e.sortedData)), M = p(O, b((e) => e.idSelectorCallback)), N = p(O, b((e) => e.columns)), P = p(O, b((e) => e.isInitialized)), ie = p(O, b((e) => e.isRowEnabledCallback)), ae = p(O, b((e) => e.addEventListener)), F = p(O, b((e) => e.dataContext)), oe = p(O, b((e) => e.isCondensed)), se = p(O, b((e) => e.setSelectedIds)), ce = p(O, b((e) => e.columnDimensions)), I = H(null), le = H(Ze.default), [L, me] = U(!1), he = V(() => fe(ue(w.palette.divider, 1), .1), [w.palette.divider]), ge = V(() => de(ue(w.palette.divider, 1), .15), [w.palette.divider]), ve = Ce(), ye = H(null), we = H(0), Te = H(null), Ee = H(/* @__PURE__ */ new Set()), De = H(!1), Oe = H(null), [Y, ke] = U(), Ae = H(null), je = H(null), X = H(null);
980
- p(O, (e) => JSON.stringify(e.filters.map((e) => e.filterValue))), p(O, b((e) => e.sortByField)), p(O, b((e) => e.sortDirection));
981
- let Me = z((e, t) => {
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) => {
982
1082
  if (s) {
983
1083
  if (!n) throw Error("getRowName is required when onRowClick is provided");
984
- E.enablePageEvents && ne.resolve(h).emit("click", {
1084
+ ee.enablePageEvents && te.resolve(_).emit("click", {
985
1085
  label: n(e.row),
986
1086
  type: "table-row"
987
1087
  }), t.preventDefault(), t.stopPropagation(), s(e);
988
1088
  }
989
1089
  }, [
990
- E.enablePageEvents,
1090
+ ee.enablePageEvents,
991
1091
  n,
992
1092
  s
993
- ]), Z = z(() => I?.current?.filter((e) => e.isVisible) ?? [], []), Ne = z(() => {
994
- if (!I?.current?.length || !Y) return;
995
- let e = (0, Je.default)(Z(), (e) => e.calculatedWidth), t = Y.querySelector("[role=table]");
996
- we.current = e, t && (t.style.width = `${e}px`);
1093
+ ]), Z = z(() => R?.current?.filter((e) => e.isVisible) ?? [], []), Le = V(() => {
1094
+ let e = /* @__PURE__ */ new Map();
1095
+ return I.forEach((t) => {
1096
+ e.set(t.id, t);
1097
+ }), 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]");
1101
+ Oe.current = e, t && (t.style.width = `${e}px`);
997
1102
  }, [Z, Y]);
998
- xe(() => {
999
- Ne();
1000
- }, [Ne]);
1001
- let Pe = z((e, t) => /* @__PURE__ */ G(Ct, {
1103
+ be(() => {
1104
+ Re();
1105
+ }, [Re]);
1106
+ let ze = z((e, t) => /* @__PURE__ */ G(St, {
1002
1107
  cell: t,
1003
1108
  getRowName: n,
1004
1109
  onReadableIndexClick: o,
1005
1110
  tableColumn: e
1006
- }, t.id), [n, o]), Fe = z((e) => /* @__PURE__ */ G(St, { tableColumnParams: e }), []);
1111
+ }, t.id), [n, o]), Be = z((e) => /* @__PURE__ */ G(xt, { tableColumnParams: e }), []);
1007
1112
  B(() => {
1008
- je.current = null;
1009
- }, [A]);
1010
- let Ie = z((e, t) => {
1011
- if (!e.shiftKey || !je.current) {
1012
- je.current = t;
1113
+ Fe.current = null;
1114
+ }, [P]);
1115
+ let Ve = z((e, t) => {
1116
+ if (!e.shiftKey || !Fe.current) {
1117
+ Fe.current = t;
1013
1118
  return;
1014
1119
  }
1015
- let n = A.findIndex((e) => M(e) === je.current), r = A.findIndex((e) => M(e) === t);
1120
+ let n = P.findIndex((e) => F(e) === Fe.current), r = P.findIndex((e) => F(e) === t);
1016
1121
  if (n === -1 || r === -1) return;
1017
- let [i, a] = n < r ? [n, r] : [r, n], o = A.slice(i, a + 1).map((e) => M(e)), s = O.getState().selectedIds, c = O.getState().selectedIds.includes(t) ? s.filter((e) => !o.includes(e)) : Array.from(/* @__PURE__ */ new Set([...s, ...o]));
1018
- se(c), je.current = t;
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]));
1123
+ pe(c), Fe.current = t;
1019
1124
  }, [
1020
- M,
1021
- se,
1022
- A,
1023
- O
1024
- ]), Le = z((e, t) => {
1025
- let n = M(t.row);
1026
- return /* @__PURE__ */ G(bt, {
1125
+ F,
1126
+ pe,
1127
+ P,
1128
+ j
1129
+ ]), He = z((e, t) => {
1130
+ let n = F(t.row);
1131
+ return /* @__PURE__ */ G(yt, {
1027
1132
  cell: t,
1028
- onCheckBoxClick: Ie,
1133
+ onCheckBoxClick: Ve,
1029
1134
  tableColumn: e
1030
1135
  }, n);
1031
- }, [M, Ie]), Re = z(() => {
1032
- if (!N.length || !Y) return;
1033
- let e = u.updateColumnSizesInVisualSettings(Y, ve, A, N, I.current);
1034
- L && (Y.querySelectorAll("[data-column-index]").forEach((t) => {
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) => {
1035
1140
  let n = t.getAttribute("data-id");
1036
1141
  t.style.width = `${e.get(n).calculatedWidth}px`;
1037
- }), Ne());
1142
+ }), Re());
1038
1143
  }, [
1039
- L,
1040
1144
  ve,
1041
- A,
1042
- N,
1145
+ Ee,
1146
+ P,
1147
+ I,
1043
1148
  Y,
1044
- Ne
1149
+ Re
1045
1150
  ]);
1046
1151
  B(() => {
1047
- Y && !L && P && (I.current = O.getState().getCurrentColumnVisualSettings(), Re(), Ne(), me(!0));
1152
+ Y && !ve && ae && (R.current = j.getState().getCurrentColumnVisualSettings(), Ue(), Re(), Ce(!0));
1048
1153
  }, [
1049
- L,
1050
- P,
1154
+ ve,
1155
+ ae,
1051
1156
  Y,
1052
- O,
1053
- Re,
1054
- Ne
1157
+ j,
1158
+ Ue,
1159
+ Re
1055
1160
  ]);
1056
- let ze = z(() => Y?.querySelector("[data-virtuoso-scroller=true]"), [Y]), Be = z(() => {
1057
- te(I.current);
1058
- }, [te]), Ve = Qe(() => {
1059
- Be();
1060
- }, 500, { trailing: !0 }), He = z((e, t) => {
1061
- e.calculatedWidth = t, e.widthPx = t, e.hasResized = !0, Re(), Ve();
1062
- }, [Re, Ve]), Ue = z((e, t) => {
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) => {
1063
1168
  if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
1064
1169
  e.preventDefault();
1065
- let n = I.current.find((e) => e.id === t.id), r = n.calculatedWidth, i = e.key === "ArrowLeft" ? Math.max(50, r - 10) : r + 10;
1066
- He(n, i);
1067
- }, [He]), We = z((e, t) => {
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) => {
1068
1173
  e.preventDefault();
1069
- let n = I.current.find((e) => e.id === t.id), r = e.clientX, i = n?.calculatedWidth, a = (e) => {
1174
+ let n = R.current.find((e) => e.id === t.id), r = e.clientX, i = n?.calculatedWidth, a = (e) => {
1070
1175
  let t = e.clientX;
1071
1176
  if (r === t) return;
1072
1177
  let a = t - r, o = Math.max(50, i + a);
1073
- i !== o && He(n, o);
1178
+ i !== o && $e(n, o);
1074
1179
  }, o = (e) => {
1075
- le.current(), le.current = Ze.default;
1180
+ _e.current(), _e.current = Xe.default;
1076
1181
  };
1077
- document.addEventListener("mousemove", a), document.addEventListener("mouseup", o), le.current = () => {
1182
+ document.addEventListener("mousemove", a), document.addEventListener("mouseup", o), _e.current = () => {
1078
1183
  document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", o);
1079
1184
  };
1080
- }, [He]);
1185
+ }, [$e]);
1081
1186
  B(() => () => {
1082
- le.current();
1187
+ _e.current();
1083
1188
  }, []);
1084
- let Ge = z((e, t) => u.handleMoveColumn(ce, I.current, N, e, t), [ce, N]), Ke = z(() => {
1189
+ let nt = z((e, t) => p.handleMoveColumn(me, R.current, I, e, t), [me, I]), rt = z(() => {
1085
1190
  Y.querySelectorAll("[data-column-index]").forEach((e) => {
1086
1191
  let t = e.getAttribute("data-id");
1087
- e.style.order = I.current.findIndex((e) => e.id === t).toString();
1192
+ e.style.order = R.current.findIndex((e) => e.id === t).toString();
1088
1193
  });
1089
1194
  }, [Y]);
1090
1195
  B(() => {
1091
1196
  let e = () => {
1092
- Re(), Ke();
1197
+ Ue(), rt();
1093
1198
  };
1094
- return D.window.addEventListener("resize", e), () => {
1095
- D.window.removeEventListener("resize", e);
1199
+ return A.window.addEventListener("resize", e), () => {
1200
+ A.window.removeEventListener("resize", e);
1096
1201
  };
1097
1202
  }, [
1098
- Ke,
1099
- Re,
1100
- D.window
1203
+ rt,
1204
+ Ue,
1205
+ A.window
1101
1206
  ]);
1102
- let qe = z((e) => {
1207
+ let it = z((e) => {
1103
1208
  let t = Z();
1104
1209
  return {
1105
1210
  elementIndex: t.findIndex((t) => t.id === e.id),
1106
1211
  visibleTableSettingsColumns: t,
1107
1212
  widths: t.map((e) => e.calculatedWidth)
1108
1213
  };
1109
- }, [Z]), et = z((e, t) => {
1110
- let n = qe(t);
1111
- if (e.type === "start" && (D.body.style.setProperty("overflow", "hidden"), Y?.style.setProperty("--selection-background", "none"), e.target.style.setProperty("opacity", "0.3"), X.current = {
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 = {
1112
1217
  clonedElement: e.target.cloneNode(!0),
1113
1218
  elementOffsetX: n.widths.slice(0, n.elementIndex).reduce((e, t) => e + t, 0) - 15,
1114
- scrollPosition: ze().scrollLeft
1219
+ scrollPosition: We().scrollLeft
1115
1220
  }, X.current.clonedElement.style.cssText = `
1116
1221
  font-weight: bold;
1117
1222
  position: absolute;
1118
1223
  top: ${e.target.getBoundingClientRect().top}px;
1119
1224
  left: ${e.clientX - e.elementOffsetX}px;
1120
- z-index: ${w.zIndex.modal.toString()};
1225
+ z-index: ${E.zIndex.modal.toString()};
1121
1226
  pointer-events: none;
1122
1227
  filter: blur(0.5px);
1123
1228
  box-shadow: 1px 2px 3px 0px rgba(0,0,0,0.5);
1124
- `, D.body.appendChild(X.current.clonedElement)), e.type === "end" && (D.body.style.removeProperty("overflow"), Y?.style.setProperty("--selection-background", "highlight"), D.document.getSelection().empty(), X.current.clonedElement.remove(), e.target.style.setProperty("opacity", "1")), e.type === "move") {
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") {
1125
1230
  X.current.clonedElement.style.setProperty("left", `${e.clientX - e.elementOffsetX}px`), X.current.clonedElement.style.setProperty("top", `${e.clientY}px`);
1126
- let r = X.current.elementOffsetX + e.deltaX + e.elementOffsetX + (ze().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);
1127
- (r < i && Ge(t, -1) || r > a && Ge(t, 1)) && (Ke(), qe(t));
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));
1128
1233
  }
1129
1234
  }, [
1130
- qe,
1131
- ze,
1132
- Ge,
1235
+ it,
1236
+ We,
1237
+ nt,
1133
1238
  Y?.style,
1134
- w.zIndex.modal,
1135
- Ke,
1136
- D.body,
1137
- D.document
1138
- ]), tt = z(() => /* @__PURE__ */ G(j, {
1239
+ E.zIndex.modal,
1240
+ rt,
1241
+ A.body,
1242
+ A.document
1243
+ ]), ot = z(() => /* @__PURE__ */ G(M, {
1139
1244
  "aria-rowindex": 1,
1140
1245
  role: "row",
1141
1246
  sx: {
1142
1247
  [`&:hover .${Q.columnDivider}`]: { opacity: 1 },
1143
- background: w.palette.background.paper,
1144
- borderBottom: `1px solid ${ge}`,
1248
+ background: E.palette.background.paper,
1249
+ borderBottom: `1px solid ${Te}`,
1145
1250
  display: "flex",
1146
1251
  fontWeight: "bold",
1147
- height: w.spacing(r),
1252
+ height: E.spacing(r),
1148
1253
  zIndex: 3
1149
1254
  },
1150
1255
  children: Z().map((e, t) => {
1151
- let n = N.find((t) => t.id === e.id);
1152
- return n ? /* @__PURE__ */ G(dt, {
1256
+ let n = Le.get(e.id);
1257
+ return n ? /* @__PURE__ */ G(ut, {
1153
1258
  column: n.type === "selectable" ? {
1154
1259
  ...n,
1155
- renderHeaderContent: Fe
1260
+ renderHeaderContent: Be
1156
1261
  } : n,
1157
1262
  columnIndex: t,
1158
- dividerColor: ge,
1159
- height: w.spacing(r),
1160
- onColumnDividerKeyDown: Ue,
1161
- onColumnDividerMouseDown: We,
1162
- onCustomDrag: et,
1163
- order: I.current.findIndex((t) => t.id === e.id),
1263
+ dividerColor: Te,
1264
+ height: E.spacing(r),
1265
+ onColumnDividerKeyDown: et,
1266
+ onColumnDividerMouseDown: tt,
1267
+ onCustomDrag: $,
1268
+ order: t,
1164
1269
  role: "columnheader",
1165
1270
  width: e.calculatedWidth,
1166
1271
  xOffset: e.offsetX
1167
1272
  }, e.id) : null;
1168
1273
  })
1169
1274
  }), [
1170
- w,
1275
+ E,
1171
1276
  r,
1172
- ge,
1277
+ Te,
1173
1278
  Z,
1174
- N,
1175
- Fe,
1176
- We,
1177
- Ue,
1178
- et
1179
- ]), nt = z((e, t) => /* @__PURE__ */ G(W, { children: Z().map((n, r) => {
1180
- let i = N.find((e) => e.id === n.id), a;
1181
- if (i.cellTitleGetter) a = i.cellTitleGetter({
1182
- column: i,
1183
- dataContext: F,
1184
- id: n.id,
1185
- row: t,
1186
- rowIndex: e
1187
- });
1188
- else if (i.type === "text") a = u.getTableTextCellValue({
1189
- column: i,
1190
- dataContext: F,
1191
- row: t,
1192
- rowIndex: e
1193
- });
1194
- else if (i.type === "boolean") a = u.getTableBooleanCellDisplayValue({
1195
- column: i,
1196
- dataContext: F,
1197
- row: t,
1198
- rowIndex: e,
1199
- t: T
1200
- });
1201
- else if (i.type === "number") {
1202
- let n = u.getTableNumberCellValue({
1203
- column: i,
1204
- dataContext: F,
1279
+ 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) => {
1287
+ let a = Le.get(r.id);
1288
+ if (!a) return null;
1289
+ let o;
1290
+ if (a.cellTitleGetter) o = a.cellTitleGetter({
1291
+ column: a,
1292
+ dataContext: L,
1293
+ id: r.id,
1205
1294
  row: t,
1206
1295
  rowIndex: e
1207
1296
  });
1208
- a = (0, Ye.default)(n) ? n.toString() : "";
1209
- } else i.type === "date" ? a = u.getTableDateCellValue({
1210
- column: i,
1211
- dataContext: F,
1212
- row: t,
1213
- rowIndex: e
1214
- }) : i.type === "options" && (a = u.getTableOptionsCellDisplayValue({
1215
- column: i,
1216
- dataContext: F,
1217
- row: t,
1218
- rowIndex: e
1219
- }));
1220
- let o = {
1221
- backgroundColor: oe && i.cellColorGetter ? i.cellColorGetter({
1222
- column: i,
1223
- dataContext: F,
1224
- id: n.id,
1297
+ else if (a.type === "text") o = p.getTableTextCellValue({
1298
+ column: a,
1299
+ dataContext: L,
1225
1300
  row: t,
1226
1301
  rowIndex: e
1227
- }) : void 0,
1228
- columnIndex: r,
1229
- enabled: !ie || ie(t, F),
1230
- height: w.spacing(x),
1231
- onClick: Me,
1232
- order: I.current.findIndex((e) => e.id === n.id),
1233
- row: t,
1234
- rowIndex: e,
1235
- sx: i.sx,
1236
- title: a,
1237
- width: n.calculatedWidth,
1238
- xOffset: n.offsetX
1239
- };
1240
- return i.type === "actions" ? /* @__PURE__ */ G(ft, {
1241
- ...o,
1242
- column: i
1243
- }, n.id) : /* @__PURE__ */ K(ot, {
1244
- ...o,
1245
- column: i,
1246
- children: [
1247
- !!i.renderCell && /* @__PURE__ */ G(R, { children: i.renderCell({
1248
- column: i,
1249
- dataContext: F,
1250
- id: n.id,
1251
- row: t,
1252
- rowIndex: e
1253
- }) }, i.id),
1254
- !i.renderCell && !!i.displayValueGetter && /* @__PURE__ */ G(R, { children: /* @__PURE__ */ G($e, { content: i.displayValueGetter({
1255
- column: i,
1256
- dataContext: F,
1257
- id: n.id,
1258
- row: t,
1259
- rowIndex: e
1260
- }) }) }, i.id),
1261
- !i.displayValueGetter && !i.renderCell && i.type === "text" && u.getTableTextCellValue({
1262
- column: i,
1263
- dataContext: F,
1264
- row: t,
1265
- rowIndex: e
1266
- }),
1267
- !i.displayValueGetter && !i.renderCell && i.type === "boolean" && u.getTableBooleanCellDisplayValue({
1268
- column: i,
1269
- dataContext: F,
1270
- row: t,
1271
- rowIndex: e,
1272
- t: T
1273
- }),
1274
- !i.displayValueGetter && !i.renderCell && i.type === "number" && u.getTableNumberCellValue({
1275
- column: i,
1276
- dataContext: F,
1277
- row: t,
1278
- rowIndex: e
1279
- }),
1280
- !i.displayValueGetter && !i.renderCell && i.type === "date" && u.getTableDateCellValue({
1281
- column: i,
1282
- dataContext: F,
1283
- row: t,
1284
- rowIndex: e
1285
- }),
1286
- !i.displayValueGetter && !i.renderCell && i.type === "options" && u.getTableOptionsCellDisplayValue({
1287
- column: i,
1288
- dataContext: F,
1289
- row: t,
1290
- rowIndex: e
1291
- }),
1292
- !i.displayValueGetter && !i.renderCell && i.type === "readableIndex" && Pe(i, {
1293
- dataContext: F,
1294
- id: n.id,
1302
+ });
1303
+ else if (a.type === "boolean") o = p.getTableBooleanCellDisplayValue({
1304
+ column: a,
1305
+ dataContext: L,
1306
+ row: t,
1307
+ rowIndex: e,
1308
+ t: k
1309
+ });
1310
+ else if (a.type === "number") {
1311
+ let n = p.getTableNumberCellValue({
1312
+ column: a,
1313
+ dataContext: L,
1295
1314
  row: t,
1296
1315
  rowIndex: e
1297
- }),
1298
- !i.displayValueGetter && !i.renderCell && i.type === "selectable" && Le(i, {
1299
- dataContext: F,
1300
- id: n.id,
1316
+ });
1317
+ o = (0, Je.default)(n) ? n.toString() : "";
1318
+ } else a.type === "date" ? o = p.getTableDateCellValue({
1319
+ column: a,
1320
+ dataContext: L,
1321
+ row: t,
1322
+ rowIndex: e
1323
+ }) : a.type === "options" && (o = p.getTableOptionsCellDisplayValue({
1324
+ column: a,
1325
+ dataContext: L,
1326
+ row: t,
1327
+ rowIndex: e
1328
+ }));
1329
+ let s = {
1330
+ backgroundColor: de && a.cellColorGetter ? a.cellColorGetter({
1331
+ column: a,
1332
+ dataContext: L,
1333
+ id: r.id,
1301
1334
  row: t,
1302
1335
  rowIndex: e
1303
- })
1304
- ]
1305
- }, n.id);
1306
- }) }), [
1336
+ }) : void 0,
1337
+ columnIndex: i,
1338
+ enabled: n,
1339
+ height: D,
1340
+ onClick: Ie,
1341
+ order: i,
1342
+ row: t,
1343
+ rowIndex: e,
1344
+ sx: a.sx,
1345
+ title: o,
1346
+ width: r.calculatedWidth,
1347
+ xOffset: r.offsetX
1348
+ };
1349
+ return a.type === "actions" ? /* @__PURE__ */ G(dt, {
1350
+ ...s,
1351
+ column: a
1352
+ }, r.id) : /* @__PURE__ */ K(at, {
1353
+ ...s,
1354
+ column: a,
1355
+ children: [
1356
+ !!a.renderCell && /* @__PURE__ */ G(he, { children: a.renderCell({
1357
+ column: a,
1358
+ dataContext: L,
1359
+ id: r.id,
1360
+ row: t,
1361
+ rowIndex: e
1362
+ }) }, a.id),
1363
+ !a.renderCell && !!a.displayValueGetter && /* @__PURE__ */ G(he, { children: /* @__PURE__ */ G(Qe, { content: a.displayValueGetter({
1364
+ column: a,
1365
+ dataContext: L,
1366
+ id: r.id,
1367
+ row: t,
1368
+ rowIndex: e
1369
+ }) }) }, a.id),
1370
+ !a.displayValueGetter && !a.renderCell && a.type === "text" && p.getTableTextCellValue({
1371
+ column: a,
1372
+ dataContext: L,
1373
+ row: t,
1374
+ rowIndex: e
1375
+ }),
1376
+ !a.displayValueGetter && !a.renderCell && a.type === "boolean" && p.getTableBooleanCellDisplayValue({
1377
+ column: a,
1378
+ dataContext: L,
1379
+ row: t,
1380
+ rowIndex: e,
1381
+ t: k
1382
+ }),
1383
+ !a.displayValueGetter && !a.renderCell && a.type === "number" && p.getTableNumberCellValue({
1384
+ column: a,
1385
+ dataContext: L,
1386
+ row: t,
1387
+ rowIndex: e
1388
+ }),
1389
+ !a.displayValueGetter && !a.renderCell && a.type === "date" && p.getTableDateCellValue({
1390
+ column: a,
1391
+ dataContext: L,
1392
+ row: t,
1393
+ rowIndex: e
1394
+ }),
1395
+ !a.displayValueGetter && !a.renderCell && a.type === "options" && p.getTableOptionsCellDisplayValue({
1396
+ column: a,
1397
+ dataContext: L,
1398
+ row: t,
1399
+ rowIndex: e
1400
+ }),
1401
+ !a.displayValueGetter && !a.renderCell && a.type === "readableIndex" && ze(a, {
1402
+ dataContext: L,
1403
+ id: r.id,
1404
+ row: t,
1405
+ rowIndex: e
1406
+ }),
1407
+ !a.displayValueGetter && !a.renderCell && a.type === "selectable" && He(a, {
1408
+ dataContext: L,
1409
+ id: r.id,
1410
+ row: t,
1411
+ rowIndex: e
1412
+ })
1413
+ ]
1414
+ }, r.id);
1415
+ }) });
1416
+ }, [
1307
1417
  Z,
1308
- ie,
1309
- Me,
1418
+ oe,
1419
+ Ie,
1420
+ He,
1421
+ ze,
1422
+ D,
1423
+ k,
1310
1424
  Le,
1311
- Pe,
1312
- x,
1313
- T,
1314
- N,
1315
- w,
1316
- F,
1317
- oe
1318
- ]), rt = z((e) => {
1425
+ L,
1426
+ de
1427
+ ]), ct = z((e) => {
1319
1428
  c(e);
1320
- }, [c]), it = z((e) => {
1429
+ }, [c]), lt = z((e) => {
1321
1430
  l(e);
1322
1431
  }, [l]);
1323
1432
  B(() => {
1324
- if (!S) return Ze.default;
1325
- let e = S.subscribe((e, t) => {
1326
- t.forEach((e) => {
1327
- Y.querySelectorAll(`[data-testid=virtuoso-item-list] [data-id='${e}']`).forEach((e) => {
1328
- e.classList.remove("highlighted");
1329
- });
1330
- }), e.forEach((e) => {
1331
- Y.querySelectorAll(`[data-testid=virtuoso-item-list] [data-id='${e}']`).forEach((e) => {
1332
- e.classList.add("highlighted");
1333
- });
1433
+ if (!w) return Xe.default;
1434
+ let e = w.subscribe((e, t) => {
1435
+ if (!e.length && !t.length) return;
1436
+ let n = new Set(e), r = new Set(t);
1437
+ Y.querySelectorAll("[data-testid=virtuoso-item-list] [data-id]").forEach((e) => {
1438
+ let t = e.getAttribute("data-id");
1439
+ t !== null && (n.has(t) ? e.classList.add("highlighted") : r.has(t) && e.classList.remove("highlighted"));
1334
1440
  });
1335
1441
  });
1336
1442
  return () => {
1337
1443
  e();
1338
1444
  };
1339
1445
  }, [
1340
- S,
1446
+ w,
1341
1447
  Y,
1342
- w.palette.action.hover,
1343
- w.palette.background.paper
1448
+ E.palette.action.hover,
1449
+ E.palette.background.paper
1344
1450
  ]), B(() => {
1345
1451
  let e = () => {
1346
- Re(), Ke(), Ne(), Be();
1452
+ Ue(), rt(), Re(), Ge();
1347
1453
  }, t = [
1348
- ae("condensedChange", (t) => {
1349
- O.getState().setIsCondensed(t), I.current = O.getState().getCurrentColumnVisualSettings(), e();
1454
+ se("condensedChange", (t) => {
1455
+ j.getState().setIsCondensed(t), R.current = j.getState().getCurrentColumnVisualSettings(), e();
1350
1456
  }),
1351
- ae("reset", () => {
1352
- O.getState().resetColumns(), I.current = O.getState().getCurrentColumnVisualSettings(), e();
1457
+ se("reset", () => {
1458
+ j.getState().resetColumns(), R.current = j.getState().getCurrentColumnVisualSettings(), e();
1353
1459
  }),
1354
- ae("columnVisibilityChange", (t) => {
1355
- I.current.forEach((e) => {
1460
+ se("columnVisibilityChange", (t) => {
1461
+ R.current.forEach((e) => {
1356
1462
  e.isVisible = t.includes(e.id);
1357
1463
  }), e();
1358
1464
  }),
1359
- ae("columnOrderChange", (t) => {
1360
- I.current.sort((e, n) => t.indexOf(e.id) - t.indexOf(n.id)), e();
1465
+ se("columnOrderChange", (t) => {
1466
+ R.current.sort((e, n) => t.indexOf(e.id) - t.indexOf(n.id)), e();
1361
1467
  }),
1362
- ae("openColumnsEditorDialog", (e) => {
1363
- Ae.current.open({ hasCellData: e });
1468
+ se("openColumnsEditorDialog", (e) => {
1469
+ Pe.current.open({ hasCellData: e });
1364
1470
  })
1365
1471
  ];
1366
1472
  return () => {
1367
1473
  t.forEach((e) => e());
1368
1474
  };
1369
1475
  }, [
1370
- ae,
1371
- Be,
1372
- N,
1373
- O,
1374
- Ke,
1375
- Re,
1376
- Ne
1476
+ se,
1477
+ Ge,
1478
+ I,
1479
+ j,
1480
+ rt,
1481
+ Ue,
1482
+ Re
1377
1483
  ]);
1378
- let at = z(() => {
1379
- let e = ze();
1380
- if (e && d && d(e.scrollTop), ye.current && f) {
1381
- let t = e.scrollTop, n = +w.spacing(x).replace("px", "");
1382
- f(Math.floor(t / n));
1484
+ let ft = z(() => {
1485
+ let e = We();
1486
+ if (e && u && u(e.scrollTop), De.current && d) {
1487
+ let t = e.scrollTop;
1488
+ d(Math.floor(t / O));
1383
1489
  }
1384
1490
  }, [
1385
- ze,
1491
+ We,
1492
+ u,
1386
1493
  d,
1387
- f,
1388
- w,
1389
- x
1390
- ]), $ = z(() => +w.spacing(x).replace("px", ""), [x, w]), st = z((e) => {
1391
- let t = ze();
1494
+ O
1495
+ ]), pt = z(() => O, [O]), mt = z((e) => {
1496
+ let t = We();
1392
1497
  t && (t.scrollTop = e);
1393
- }, [ze]), ct = z(() => {
1394
- let e = Oe.current;
1395
- e && !De.current && e.hasRendered && (Oe.current = null, e.onScrolledToIndex());
1396
- }, []), lt = z((e, t) => {
1397
- Oe.current = t ? {
1398
- hasRendered: Ee.current.has(e),
1498
+ }, [We]), ht = z(() => {
1499
+ let e = Me.current;
1500
+ e && !je.current && e.hasRendered && (Me.current = null, e.onScrolledToIndex());
1501
+ }, []), gt = z((e, t) => {
1502
+ Me.current = t ? {
1503
+ hasRendered: Ae.current.has(e),
1399
1504
  index: e,
1400
1505
  onScrolledToIndex: t
1401
- } : null, ye.current?.scrollToIndex(e), ct();
1402
- }, [ct]);
1403
- be(y, () => ({
1404
- scrollToIndex: lt,
1405
- setVerticalScrollPosition: st
1506
+ } : null, De.current?.scrollToIndex(e), ht();
1507
+ }, [ht]);
1508
+ ye(b, () => ({
1509
+ scrollToIndex: gt,
1510
+ setVerticalScrollPosition: mt
1406
1511
  }));
1407
- let ut = z((e) => {
1408
- Te.current = e, a(e);
1409
- }, [a]), pt = z((e) => {
1410
- Ee.current = new Set(e.map((e) => e.index));
1411
- let t = Oe.current;
1412
- t && Ee.current.has(t.index) && (t.hasRendered = !0), ct();
1413
- }, [ct]), mt = z((e) => {
1414
- De.current = e, ct();
1415
- }, [ct]);
1512
+ let _t = z((e) => {
1513
+ ke.current = e, a(e);
1514
+ }, [a]), bt = z((e) => {
1515
+ Ae.current = new Set(e.map((e) => e.index));
1516
+ 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]);
1416
1521
  return B(() => {
1417
- Te.current && a(Te.current);
1418
- }, [a, A]), /* @__PURE__ */ K(j, {
1419
- ref: ke,
1522
+ ke.current && a(ke.current);
1523
+ }, [a, P]), /* @__PURE__ */ K(M, {
1524
+ ref: Ne,
1420
1525
  style: { "--selection-background": "highlight" },
1421
1526
  sx: {
1422
1527
  "*::selection": { backgroundColor: "var(--selection-background) !important" },
1423
1528
  height: "100%",
1424
1529
  position: "relative",
1425
1530
  width: "100%",
1426
- ...C
1531
+ ...T
1427
1532
  },
1428
- children: [L && /* @__PURE__ */ G(Se, {
1533
+ children: [ve && /* @__PURE__ */ G(xe, {
1429
1534
  ...J.createAttributes("Table"),
1430
1535
  components: {
1431
- EmptyPlaceholder: _e((e, t) => /* @__PURE__ */ G(j, {
1536
+ EmptyPlaceholder: ge((e, t) => /* @__PURE__ */ G(M, {
1432
1537
  ...e,
1433
1538
  ref: t
1434
1539
  })),
1435
- FillerRow: _e((e, t) => /* @__PURE__ */ G(j, {
1540
+ FillerRow: ge((e, t) => /* @__PURE__ */ G(M, {
1436
1541
  ref: t,
1437
1542
  style: { height: e.height }
1438
1543
  })),
1439
- Table: _e((e, t) => /* @__PURE__ */ G(j, {
1544
+ Table: ge((e, t) => /* @__PURE__ */ G(M, {
1440
1545
  ...e,
1441
- "data-row-count": A.length,
1546
+ "data-row-count": P.length,
1442
1547
  ref: t,
1443
1548
  role: "table",
1444
1549
  sx: {
1445
1550
  minWidth: "100%",
1446
1551
  position: "relative",
1447
- width: we.current
1552
+ width: Oe.current
1448
1553
  }
1449
1554
  })),
1450
- TableBody: _e((t, n) => /* @__PURE__ */ G(j, {
1555
+ TableBody: ge((t, n) => /* @__PURE__ */ G(M, {
1451
1556
  ...t,
1452
1557
  ref: n,
1453
1558
  sx: { font: e }
1454
1559
  })),
1455
- TableHead: _e((e, t) => /* @__PURE__ */ G(j, {
1560
+ TableHead: ge((e, t) => /* @__PURE__ */ G(M, {
1456
1561
  ...e,
1457
1562
  ref: t
1458
1563
  })),
1459
- TableRow: _e((e, t) => {
1460
- let n = !ie || ie(e.item, F);
1461
- return /* @__PURE__ */ G(j, {
1462
- "data-id": M(e.item),
1463
- onMouseEnter: () => rt(e.item),
1464
- onMouseLeave: () => it(e.item),
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),
1465
1570
  ref: t,
1466
1571
  role: "row",
1467
1572
  sx: {
1468
1573
  "&:hover, &.highlighted": {
1469
- "*": { color: `${w.palette.text.primary} !important` },
1574
+ "*": { color: `${E.palette.text.primary} !important` },
1470
1575
  "& [role=cell]": {
1471
- "*": { color: `${w.palette.text.primary} !important` },
1472
- backgroundColor: w.palette.grey[100],
1473
- color: `${w.palette.text.primary} !important`
1576
+ "*": { color: `${E.palette.text.primary} !important` },
1577
+ backgroundColor: E.palette.grey[100],
1578
+ color: `${E.palette.text.primary} !important`
1474
1579
  },
1475
- backgroundColor: w.palette.grey[100],
1476
- color: `${w.palette.text.primary} !important`
1580
+ backgroundColor: E.palette.grey[100],
1581
+ color: `${E.palette.text.primary} !important`
1477
1582
  },
1478
- borderBottom: `1px solid ${he}`,
1583
+ borderBottom: `1px solid ${we}`,
1479
1584
  color: n ? void 0 : "text.disabled",
1480
1585
  cursor: n && s ? "pointer" : void 0,
1481
1586
  display: "flex",
1482
- height: w.spacing(x)
1587
+ height: E.spacing(C)
1483
1588
  },
1484
- ...(0, Xe.default)(e, "item")
1589
+ ...(0, Ye.default)(e, "item")
1485
1590
  });
1486
1591
  })
1487
1592
  },
1488
- data: A,
1489
- fixedHeaderContent: tt,
1490
- fixedItemHeight: +w.spacing(x).replace("px", ""),
1593
+ data: P,
1594
+ fixedHeaderContent: ot,
1595
+ fixedItemHeight: O,
1491
1596
  initialTopMostItemIndex: i ?? 0,
1492
- isScrolling: mt,
1493
- itemContent: nt,
1494
- itemSize: $,
1495
- itemsRendered: pt,
1496
- onScroll: at,
1597
+ isScrolling: Ct,
1598
+ itemContent: st,
1599
+ itemSize: pt,
1600
+ itemsRendered: bt,
1601
+ onScroll: ft,
1497
1602
  overscan: {
1498
- main: g ?? k,
1499
- reverse: v ?? ee
1603
+ main: f ?? re,
1604
+ reverse: g ?? ie
1500
1605
  },
1501
- rangeChanged: ut,
1502
- ref: ye,
1606
+ rangeChanged: _t,
1607
+ ref: De,
1503
1608
  style: {
1504
1609
  height: "100%",
1505
1610
  overflowX: t ? "scroll" : "auto"
1506
1611
  },
1507
- totalCount: A.length
1508
- }), /* @__PURE__ */ G(yt, { ref: Ae })]
1612
+ totalCount: P.length
1613
+ }), /* @__PURE__ */ G(vt, {
1614
+ ref: Pe,
1615
+ renderHeaderContent: x,
1616
+ renderItemContent: S
1617
+ })]
1509
1618
  });
1510
- }, Tt = ({ caption: e, component: t = "h2", variant: n = "h2" }) => {
1511
- let { t: r } = q(), i = m(), a = p(i, (e) => e.baseData.length), o = p(i, b((e) => e.sortedData.length));
1512
- return /* @__PURE__ */ G(le, {
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, {
1513
1622
  component: t,
1514
1623
  variant: n,
1515
1624
  children: /* @__PURE__ */ K(W, { children: [
@@ -1526,10 +1635,10 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1526
1635
  })
1527
1636
  ] })
1528
1637
  });
1529
- }, Et = /* @__PURE__ */ t(((e, t) => {
1530
- t.exports = Object.prototype.hasOwnProperty.call(me, "module.exports") ? me["module.exports"] : { ...me };
1531
- })), Dt = /* @__PURE__ */ t(((e) => {
1532
- var t = Et();
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();
1533
1642
  function n(e, t) {
1534
1643
  return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
1535
1644
  }
@@ -1566,7 +1675,7 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1566
1675
  }
1567
1676
  var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? u : c;
1568
1677
  e.useSyncExternalStore = t.useSyncExternalStore === void 0 ? d : t.useSyncExternalStore;
1569
- })), Ot = /* @__PURE__ */ t(((e) => {
1678
+ })), Dt = /* @__PURE__ */ t(((e) => {
1570
1679
  process.env.NODE_ENV !== "production" && (function() {
1571
1680
  function t(e, t) {
1572
1681
  return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
@@ -1609,13 +1718,13 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1609
1718
  return t();
1610
1719
  }
1611
1720
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
1612
- var a = Et(), 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;
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;
1613
1722
  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());
1614
1723
  })();
1615
- })), kt = /* @__PURE__ */ t(((e, t) => {
1616
- t.exports = process.env.NODE_ENV === "production" ? Dt() : Ot();
1617
- })), At = /* @__PURE__ */ t(((e) => {
1618
- var t = Et(), n = kt();
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();
1619
1728
  function r(e, t) {
1620
1729
  return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
1621
1730
  }
@@ -1659,13 +1768,13 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1659
1768
  f.hasValue = !0, f.value = p;
1660
1769
  }, [p]), l(p), p;
1661
1770
  };
1662
- })), jt = /* @__PURE__ */ t(((e) => {
1771
+ })), At = /* @__PURE__ */ t(((e) => {
1663
1772
  process.env.NODE_ENV !== "production" && (function() {
1664
1773
  function t(e, t) {
1665
1774
  return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
1666
1775
  }
1667
1776
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
1668
- var n = Et(), r = kt(), i = typeof Object.is == "function" ? Object.is : t, a = r.useSyncExternalStore, o = n.useRef, s = n.useEffect, c = n.useMemo, l = n.useDebugValue;
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;
1669
1778
  e.useSyncExternalStoreWithSelector = function(e, t, n, r, u) {
1670
1779
  var d = o(null);
1671
1780
  if (d.current === null) {
@@ -1706,16 +1815,16 @@ var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1706
1815
  }, [p]), l(p), p;
1707
1816
  }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1708
1817
  })();
1709
- })), { useSyncExternalStoreWithSelector: Mt } = (/* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1710
- t.exports = process.env.NODE_ENV === "production" ? At() : jt();
1711
- })))(), 1)).default, Nt = (e) => e;
1712
- function Pt(e, t = Nt, n) {
1713
- let r = Mt(e.subscribe, e.getState, e.getInitialState, t, n);
1714
- return he.useDebugValue(r), r;
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;
1715
1824
  }
1716
1825
  // src/components/ui/Table/TableFiltersSidebarItem.tsx
1717
- var Ft = Ee, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFilterWithinDimension: n }) => {
1718
- let r = Pt(m(), (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 } = Y(), o = V(() => {
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(() => {
1719
1828
  if (e.allowOnlyPreferredFilter || e.filterIds.length === 1) return [i.find((t) => t?.id && t.id === e.preferredFilterId)].filter((e) => !!e);
1720
1829
  if (!e.allowMultipleVisibleFilters) {
1721
1830
  let t = n ?? e.preferredFilterId;
@@ -1754,23 +1863,23 @@ var Ft = Ee, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
1754
1863
  t,
1755
1864
  s
1756
1865
  ]);
1757
- return o.length ? /* @__PURE__ */ K(j, {
1866
+ return o.length ? /* @__PURE__ */ K(M, {
1758
1867
  sx: { mb: 2 },
1759
1868
  children: [
1760
- c && /* @__PURE__ */ K(j, {
1869
+ c && /* @__PURE__ */ K(M, {
1761
1870
  sx: {
1762
1871
  alignItems: "center",
1763
1872
  display: "flex",
1764
1873
  justifyContent: "space-between"
1765
1874
  },
1766
- children: [/* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(le, {
1875
+ children: [/* @__PURE__ */ G(M, { children: /* @__PURE__ */ G(L, {
1767
1876
  sx: {
1768
1877
  margin: 0,
1769
1878
  padding: 0
1770
1879
  },
1771
1880
  variant: "h6",
1772
1881
  children: e.label
1773
- }) }), s && /* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(qe, {
1882
+ }) }), s && /* @__PURE__ */ G(M, { children: /* @__PURE__ */ G(Ke, {
1774
1883
  ButtonProps: {
1775
1884
  color: "inherit",
1776
1885
  size: "small",
@@ -1786,25 +1895,25 @@ var Ft = Ee, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
1786
1895
  menuItemsData: l
1787
1896
  }) })]
1788
1897
  }),
1789
- o.map((e) => /* @__PURE__ */ G(j, {
1898
+ o.map((e) => /* @__PURE__ */ G(M, {
1790
1899
  sx: { my: 1 },
1791
- children: /* @__PURE__ */ G(rt, { filter: e })
1900
+ children: /* @__PURE__ */ G(nt, { filter: e })
1792
1901
  }, e.id)),
1793
- /* @__PURE__ */ G(P, {})
1902
+ /* @__PURE__ */ G(N, {})
1794
1903
  ]
1795
1904
  }, e.id) : null;
1796
- }, Lt = ({ onClose: e }) => {
1797
- let { t } = q(), n = m(), r = p(n, (e) => e.setFilterValues), i = p(n, (e) => e.filterDimensions), a = Pt(n, (e) => e.filters, (e, t) => JSON.stringify(e.map((e) => e.filterValue)) === JSON.stringify(t.map((e) => e.filterValue))), o = p(n, (e) => e.filters.some((e) => !e.isInitialFilterValue(e.filterValue))), s = p(n, (e) => e.resetFilters), c = p(n, (e) => e.visibleFilterWithinDimensions), l = p(n, (e) => e.setVisibleFilterWithinDimensions), [u, d] = U(c), f = V(() => Object.fromEntries(a.map((e) => [e.id, e.initialFilterValue])), [a]), h = V(() => Object.fromEntries(a.map((e) => [e.id, e.filterValue ?? e.initialFilterValue])), [a]), g = Oe({
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({
1798
1907
  defaultValues: f,
1799
- values: h
1800
- }), _ = z((e, t) => {
1908
+ values: p
1909
+ }), g = z((e, t) => {
1801
1910
  d((n) => ({
1802
1911
  ...n,
1803
1912
  [e]: t
1804
1913
  }));
1805
- }, []), { control: v, formState: { isDirty: y }, handleSubmit: b, reset: x, setValue: S } = g, C = ke({
1806
- control: v,
1807
- defaultValue: h
1914
+ }, []), { control: _, formState: { isDirty: v }, handleSubmit: b, reset: x, setValue: S } = h, C = ke({
1915
+ control: _,
1916
+ defaultValue: p
1808
1917
  }), w = V(() => Object.entries(C).some(([e, t]) => !a.find((t) => t.id === e).isInitialFilterValue(t)), [a, C]), T = z(async (t) => {
1809
1918
  await r(t), x(t), l(u), e();
1810
1919
  }, [
@@ -1826,9 +1935,9 @@ var Ft = Ee, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
1826
1935
  let t = a.find((t) => t.id === e);
1827
1936
  S(e, t.initialFilterValue, { shouldDirty: !0 });
1828
1937
  }, [a, S]), O = V(() => a.filter((e) => e.showInSidebar), [a]);
1829
- return /* @__PURE__ */ G(W, { children: !!a && !!h && !!f && /* @__PURE__ */ G(De, {
1830
- ...g,
1831
- children: /* @__PURE__ */ K(j, {
1938
+ return /* @__PURE__ */ G(W, { children: !!a && !!p && !!f && /* @__PURE__ */ G(Ee, {
1939
+ ...h,
1940
+ children: /* @__PURE__ */ K(M, {
1832
1941
  autoComplete: "off",
1833
1942
  component: "form",
1834
1943
  id: "Filters",
@@ -1838,30 +1947,30 @@ var Ft = Ee, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
1838
1947
  gridTemplateRows: "max-content auto",
1839
1948
  height: "100%"
1840
1949
  },
1841
- children: [/* @__PURE__ */ K(j, { children: [
1842
- y && o && !w && /* @__PURE__ */ G(j, {
1950
+ children: [/* @__PURE__ */ K(M, { children: [
1951
+ v && o && !w && /* @__PURE__ */ G(M, {
1843
1952
  sx: { my: 1 },
1844
1953
  children: t`All filters have been removed, but have not yet been applied.`
1845
1954
  }),
1846
- /* @__PURE__ */ G(j, { children: Object.entries(C).map(([e, n]) => {
1955
+ /* @__PURE__ */ G(M, { children: Object.entries(C).map(([e, n]) => {
1847
1956
  let r = a.find((t) => t.id === e);
1848
- return r.isInitialFilterValue(C[e]) ? null : /* @__PURE__ */ K(j, {
1957
+ return r.isInitialFilterValue(C[e]) ? null : /* @__PURE__ */ K(M, {
1849
1958
  sx: {
1850
1959
  alignItems: "center",
1851
1960
  display: "grid",
1852
1961
  gap: 1,
1853
1962
  gridTemplateColumns: "auto max-content"
1854
1963
  },
1855
- children: [/* @__PURE__ */ K(j, { children: [
1856
- /* @__PURE__ */ G(j, {
1964
+ children: [/* @__PURE__ */ K(M, { children: [
1965
+ /* @__PURE__ */ G(M, {
1857
1966
  component: "span",
1858
1967
  children: r.label
1859
1968
  }),
1860
- /* @__PURE__ */ G(j, {
1969
+ /* @__PURE__ */ G(M, {
1861
1970
  component: "span",
1862
1971
  children: ": "
1863
1972
  }),
1864
- /* @__PURE__ */ G(j, {
1973
+ /* @__PURE__ */ G(M, {
1865
1974
  component: "strong",
1866
1975
  children: r.getPresentationValue(n, t)
1867
1976
  })
@@ -1872,11 +1981,11 @@ var Ft = Ee, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
1872
1981
  }),
1873
1982
  onClick: () => D(e),
1874
1983
  size: "small",
1875
- children: /* @__PURE__ */ G(Ke, {})
1984
+ children: /* @__PURE__ */ G(Ge, {})
1876
1985
  })]
1877
1986
  }, e);
1878
1987
  }) }),
1879
- (o || y) && /* @__PURE__ */ K(j, {
1988
+ (o || v) && /* @__PURE__ */ K(M, {
1880
1989
  sx: {
1881
1990
  display: "flex",
1882
1991
  gap: 1,
@@ -1884,55 +1993,55 @@ var Ft = Ee, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
1884
1993
  marginRight: 1,
1885
1994
  my: 1
1886
1995
  },
1887
- children: [/* @__PURE__ */ G(M, {
1996
+ children: [/* @__PURE__ */ G(re, {
1888
1997
  ...J.createAttributes("TableFiltersSidebarItem-reset"),
1889
1998
  color: "primary",
1890
1999
  onClick: E,
1891
- startIcon: /* @__PURE__ */ G(Ge, {}),
2000
+ startIcon: /* @__PURE__ */ G(We, {}),
1892
2001
  variant: "outlined",
1893
2002
  children: t`Reset`
1894
- }), /* @__PURE__ */ G(M, {
2003
+ }), /* @__PURE__ */ G(re, {
1895
2004
  ...J.createAttributes("TableFiltersSidebarItem-apply"),
1896
2005
  color: "secondary",
1897
- startIcon: /* @__PURE__ */ G(We, {}),
2006
+ startIcon: /* @__PURE__ */ G(Ue, {}),
1898
2007
  type: "submit",
1899
2008
  children: t`Apply`
1900
2009
  })]
1901
2010
  })
1902
- ] }), /* @__PURE__ */ K(j, {
2011
+ ] }), /* @__PURE__ */ K(M, {
1903
2012
  sx: {
1904
2013
  overflowY: "auto",
1905
2014
  paddingRight: 1
1906
2015
  },
1907
- children: [i.length > 0 && /* @__PURE__ */ G(W, { children: i.filter((e) => e.filterIds.length).map((e) => /* @__PURE__ */ G(It, {
2016
+ children: [i.length > 0 && /* @__PURE__ */ G(W, { children: i.filter((e) => e.filterIds.length).map((e) => /* @__PURE__ */ G(Ft, {
1908
2017
  filterDimension: e,
1909
- onFilterVisibilityChange: _,
2018
+ onFilterVisibilityChange: g,
1910
2019
  visibleFilterWithinDimension: u[e.id]
1911
- }, e.id)) }), i.length === 0 && /* @__PURE__ */ G(W, { children: O.map((e) => /* @__PURE__ */ K(j, {
2020
+ }, e.id)) }), i.length === 0 && /* @__PURE__ */ G(W, { children: O.map((e) => /* @__PURE__ */ K(M, {
1912
2021
  sx: { my: 2 },
1913
- children: [/* @__PURE__ */ G(j, {
2022
+ children: [/* @__PURE__ */ G(M, {
1914
2023
  sx: { my: 1 },
1915
- children: /* @__PURE__ */ G(rt, { filter: e })
1916
- }), /* @__PURE__ */ G(P, {})]
2024
+ children: /* @__PURE__ */ G(nt, { filter: e })
2025
+ }), /* @__PURE__ */ G(N, {})]
1917
2026
  }, e.id)) })]
1918
2027
  })]
1919
2028
  })
1920
2029
  }) });
1921
- }, Rt = ({ onClose: e, open: t }) => {
2030
+ }, Lt = ({ onClose: e, open: t }) => {
1922
2031
  let { t: n } = q();
1923
2032
  return /* @__PURE__ */ G(k, {
1924
- closeIcon: /* @__PURE__ */ G(Ft, {}),
2033
+ closeIcon: /* @__PURE__ */ G(Pt, {}),
1925
2034
  closeIconTooltipText: n`Close filters`,
1926
2035
  onClose: e,
1927
2036
  open: t,
1928
2037
  testIdAttributes: { name: "tableFiltersSidebarItem" },
1929
2038
  title: n`Filters`,
1930
2039
  width: 60,
1931
- children: t && /* @__PURE__ */ G(Lt, { onClose: e })
2040
+ children: t && /* @__PURE__ */ G(It, { onClose: e })
1932
2041
  });
1933
- }, zt = ({ ContainerProps: e }) => {
1934
- let t = x({});
1935
- return /* @__PURE__ */ G(qe, {
2042
+ }, Rt = ({ ContainerProps: e }) => {
2043
+ let t = g({});
2044
+ return /* @__PURE__ */ G(Ke, {
1936
2045
  ButtonProps: {
1937
2046
  color: "primary",
1938
2047
  size: "small",
@@ -1942,36 +2051,36 @@ var Ft = Ee, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
1942
2051
  menuItemsData: t,
1943
2052
  MenuProps: { elevation: 3 }
1944
2053
  });
1945
- }, Bt = ({ header: e, headerComponent: t = "h3", headerVariant: n = "h5", showTableMenu: r = !0 }) => /* @__PURE__ */ K(j, {
2054
+ }, zt = ({ header: e, headerComponent: t = "h3", headerVariant: n = "h5", showTableMenu: r = !0 }) => /* @__PURE__ */ K(M, {
1946
2055
  sx: {
1947
2056
  alignItems: "center",
1948
2057
  display: "flex",
1949
2058
  justifyContent: e ? "space-between" : "flex-end"
1950
2059
  },
1951
- children: [e && /* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(Tt, {
2060
+ children: [e && /* @__PURE__ */ G(M, { children: /* @__PURE__ */ G(wt, {
1952
2061
  caption: e,
1953
2062
  component: t,
1954
2063
  variant: n
1955
- }) }), r && /* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(zt, {}) })]
1956
- }), Vt = ({ extraSidebarMenuItems: e }) => {
1957
- let t = m(), n = p(t, (e) => e.filters.filter((e) => !e.isInitialFilterValue()).length), [r, i] = U(!1), a = z(() => {
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(() => {
1958
2067
  i(!1);
1959
2068
  }, []), o = z(() => {
1960
2069
  i(!0);
1961
2070
  }, []);
1962
- return /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ K(ee, { children: [/* @__PURE__ */ G(te, {
2071
+ return /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ K(ee, { children: [/* @__PURE__ */ G(A, {
1963
2072
  badgeColor: "secondary",
1964
2073
  badgeContent: n,
1965
2074
  first: !0,
1966
- icon: /* @__PURE__ */ G(Ft, {}),
2075
+ icon: /* @__PURE__ */ G(Pt, {}),
1967
2076
  onClick: o,
1968
2077
  testIdAttributes: { name: "filters" },
1969
- title: A`Open filters`
1970
- }), e] }), /* @__PURE__ */ G(Rt, {
2078
+ title: j`Open filters`
2079
+ }), e] }), /* @__PURE__ */ G(Lt, {
1971
2080
  onClose: a,
1972
2081
  open: r
1973
2082
  })] });
1974
2083
  };
1975
- export { Lt as a, wt as c, ot as d, it as f, Qe as h, Rt as i, ft as l, $e as m, Bt as n, Ft as o, rt as p, zt as r, Tt as s, Vt as t, dt as u };
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 };
1976
2085
 
1977
2086
  //# sourceMappingURL=Table.js.map