@gen-epix/ui-client-common 4.6.1 → 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.
- package/README.md +2 -2
- package/dist/_chunks/Breadcrumbs.js +4 -4
- package/dist/_chunks/CrudPage.js +166 -166
- package/dist/_chunks/CrudPage.js.map +1 -1
- package/dist/_chunks/Notifications.js +16 -16
- package/dist/_chunks/QueryClientProvider.js +1 -1
- package/dist/_chunks/QueryClientProvider.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +73 -72
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Table.js +853 -744
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/TableUtil.js +38 -38
- package/dist/_chunks/TableUtil.js.map +1 -1
- package/dist/_chunks/UserInvitationsAdminPage.js +131 -131
- package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
- package/dist/_chunks/_baseFlatten.js +12 -12
- package/dist/_chunks/_baseFlatten.js.map +1 -1
- package/dist/_chunks/_baseIteratee.js +78 -78
- package/dist/_chunks/_baseIteratee.js.map +1 -1
- package/dist/_chunks/decorate.js +1 -1
- package/dist/_chunks/decorateParam.js +1 -1
- package/dist/_chunks/middleware.js +66 -70
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/omit.js +98 -98
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/query.js +108 -92
- package/dist/_chunks/query.js.map +1 -1
- package/dist/_chunks/react.js +1 -1
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/tableStore.js +61 -58
- package/dist/_chunks/tableStore.js.map +1 -1
- package/dist/_chunks/useColumnsMenu.js +73 -71
- package/dist/_chunks/useColumnsMenu.js.map +1 -1
- package/dist/_chunks/useMutation.js +2 -2
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +15 -16
- package/dist/_chunks/useQueryMemo.js.map +1 -1
- package/dist/_chunks/vanilla.js +1 -1
- package/dist/_chunks/vanilla.js.map +1 -1
- package/dist/_chunks/yup.js +2 -2
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/classes/services/AuthenticationService/index.js +8 -8
- package/dist/classes/services/AuthenticationService/index.js.map +1 -1
- package/dist/classes/services/AuthorizationService/index.js +4 -4
- package/dist/classes/services/AuthorizationService/index.js.map +1 -1
- package/dist/classes/services/BreadcrumbService/index.js +4 -4
- package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
- package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
- package/dist/classes/services/InactivityService/index.js +30 -30
- package/dist/classes/services/InactivityService/index.js.map +1 -1
- package/dist/classes/services/LogService/index.js +15 -15
- package/dist/classes/services/LogService/index.js.map +1 -1
- package/dist/classes/services/PageEventBusService/index.js.map +1 -1
- package/dist/components/app/App/index.js +26 -24
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +18 -18
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +18 -18
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
- package/dist/components/app/AuthenticationWrapper/index.js +15 -15
- package/dist/components/app/AuthorizationWrapper/index.js +16 -16
- package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
- package/dist/components/app/RouterRoot/index.js +33 -33
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/epi/EpiContactDetailsDialog/index.js +4 -4
- package/dist/components/epi/EpiContactDetailsDialog/index.js.map +1 -1
- package/dist/components/ui/ApplicationBar/index.js +234 -234
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js +13 -13
- package/dist/components/ui/LicensesDialog/index.js +6 -6
- package/dist/components/ui/OrganizationSwitcherDialog/index.js +11 -11
- package/dist/components/ui/OutagesDialog/index.js +4 -4
- package/dist/components/ui/OutagesDialog/index.js.map +1 -1
- package/dist/components/ui/PageContainer/index.js +5 -5
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/components/ui/ResponseHandler/index.js +4 -4
- package/dist/components/ui/SortableList/SortableList.d.ts +5 -3
- package/dist/components/ui/Table/Table.d.ts +5 -2
- package/dist/components/ui/Table/TableColumnsEditorDialog.d.ts +13 -2
- package/dist/components/ui/Table/index.d.ts +1 -0
- package/dist/components/ui/Table/index.js +1 -1
- package/dist/components/ui/UserFeedbackDialog/index.js +15 -15
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +12 -12
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js +11 -11
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +5 -5
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +15 -15
- package/dist/dataHooks/useOrganizationsQuery/index.js +7 -7
- package/dist/dataHooks/useUsersQuery/index.js +10 -10
- package/dist/hooks/useCreateMutation/index.js +14 -14
- package/dist/hooks/useCreateMutation/index.js.map +1 -1
- package/dist/hooks/useDeleteMutation/index.js +17 -17
- package/dist/hooks/useDeleteMutation/index.js.map +1 -1
- package/dist/hooks/useEditMutation/index.js +22 -22
- package/dist/hooks/useEditMutation/index.js.map +1 -1
- package/dist/hooks/useInitializeTableStore/index.js +6 -6
- package/dist/hooks/useInitializeTableStore/index.js.map +1 -1
- package/dist/locale/en.json +13 -5
- package/dist/locale/nl.json +13 -5
- package/dist/pages/AcceptInvitationPage/index.js +10 -10
- package/dist/pages/AdminPage/index.js +19 -19
- package/dist/pages/ChooseIdentityProviderPage/index.js +5 -5
- package/dist/pages/ErrorPage/index.js +4 -4
- package/dist/pages/IdentifierIssuersAdminPage/index.js +7 -7
- package/dist/pages/IdentifierIssuersAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +16 -16
- package/dist/pages/OrganizationContactsAdminPage/index.js +10 -10
- package/dist/pages/OrganizationContactsAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationSitesAdminPage/index.js +12 -12
- package/dist/pages/OrganizationSitesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationsAdminPage/index.js +20 -20
- package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
- package/dist/pages/OutagesAdminPage/index.js +11 -11
- package/dist/pages/OutagesAdminPage/index.js.map +1 -1
- package/dist/pages/RouterErrorPage/index.js +4 -4
- package/dist/pages/UsersAdminPage/index.js +34 -34
- package/dist/pages/UsersAdminPage/index.js.map +1 -1
- package/dist/setup/setup.js +4 -4
- package/dist/setup/setup.js.map +1 -1
- package/dist/stores/oidcStore/oidcStore.d.ts +1 -1
- package/dist/utils/StandardConfigUtil/index.js +2 -2
- package/dist/utils/StandardConfigUtil/index.js.map +1 -1
- package/package.json +33 -33
package/dist/_chunks/Table.js
CHANGED
|
@@ -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 {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { PageEventBusService as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { SidebarItem as k, SidebarMenu as ee, SidebarMenuItem as
|
|
21
|
-
import { container as
|
|
22
|
-
import { WindowService as
|
|
23
|
-
import { t as
|
|
24
|
-
import { Box as
|
|
25
|
-
import * as
|
|
26
|
-
import
|
|
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
|
|
31
|
-
import { useScrollbarSize as
|
|
32
|
-
import { visuallyHidden as
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import { FormProvider as
|
|
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
|
|
39
|
-
import { SortableContext as
|
|
40
|
-
import { CSS as
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import { NestedDropdown as
|
|
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
|
|
49
|
-
function
|
|
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
|
|
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
|
|
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 =
|
|
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
|
|
137
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (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
|
|
142
|
-
var n =
|
|
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),
|
|
148
|
-
e instanceof s && /* @__PURE__ */ G(
|
|
149
|
-
e instanceof o && /* @__PURE__ */ G(
|
|
150
|
-
e instanceof r && /* @__PURE__ */ G(
|
|
151
|
-
e instanceof a && /* @__PURE__ */ G(
|
|
152
|
-
e instanceof
|
|
153
|
-
e instanceof i && /* @__PURE__ */ G(
|
|
154
|
-
] }),
|
|
155
|
-
let n =
|
|
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 =
|
|
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(
|
|
176
|
+
return /* @__PURE__ */ G(Ee, {
|
|
177
177
|
...s,
|
|
178
|
-
children: /* @__PURE__ */ K(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
},
|
|
205
|
-
let
|
|
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:
|
|
207
|
+
dataContext: E,
|
|
208
208
|
id: a.id,
|
|
209
|
-
row:
|
|
210
|
-
rowIndex:
|
|
209
|
+
row: g,
|
|
210
|
+
rowIndex: _
|
|
211
211
|
}, e.nativeEvent);
|
|
212
212
|
}, [
|
|
213
213
|
a.id,
|
|
214
|
-
|
|
214
|
+
E,
|
|
215
215
|
l,
|
|
216
|
-
|
|
217
|
-
|
|
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
|
-
]),
|
|
266
|
-
let e = a.frozen ===
|
|
267
|
-
return t && (
|
|
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 ?
|
|
269
|
+
background: r ? w.palette.background.paper : t,
|
|
270
270
|
boxSizing: "border-box",
|
|
271
271
|
color: i,
|
|
272
|
-
left: e ? `${
|
|
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 ? `${
|
|
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: `${
|
|
283
|
+
width: `${S}px`,
|
|
284
284
|
zIndex: +!!r,
|
|
285
|
-
...
|
|
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
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
294
|
+
v,
|
|
295
|
+
w.palette,
|
|
296
|
+
S,
|
|
297
|
+
C
|
|
298
298
|
]);
|
|
299
|
-
return /* @__PURE__ */ G(
|
|
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":
|
|
306
|
-
onClick: l && s ?
|
|
307
|
-
onMouseDown:
|
|
308
|
-
ref:
|
|
309
|
-
role:
|
|
310
|
-
sx:
|
|
311
|
-
tabIndex:
|
|
312
|
-
title:
|
|
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,
|
|
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
|
-
})),
|
|
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
|
-
})),
|
|
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
|
-
})),
|
|
364
|
-
let { t } = q(), n =
|
|
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 ===
|
|
367
|
+
i === g.id ? await s(g.id, o === "asc" ? "desc" : "asc") : await s(g.id, "asc");
|
|
368
368
|
}, [
|
|
369
|
-
|
|
369
|
+
g.id,
|
|
370
370
|
s,
|
|
371
371
|
i,
|
|
372
372
|
o
|
|
373
|
-
]),
|
|
374
|
-
D.current ? (e.preventDefault(), e.stopPropagation(), D.current = !1) :
|
|
375
|
-
}, [
|
|
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]),
|
|
378
|
-
f((e) => e ? null :
|
|
379
|
-
}, []),
|
|
377
|
+
}, [ee]), ne = z(() => {
|
|
378
|
+
f((e) => e ? null : p.current);
|
|
379
|
+
}, []), j = z(() => {
|
|
380
380
|
f(null);
|
|
381
|
-
}, []),
|
|
382
|
-
e.button === 0 && (e.preventDefault(), e.stopPropagation(), S(e,
|
|
383
|
-
}, [
|
|
384
|
-
x(e,
|
|
385
|
-
}, [
|
|
386
|
-
|
|
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
|
-
}, [
|
|
390
|
+
}, [g, a]), I = z(() => {
|
|
391
391
|
f(null), setTimeout(() => {
|
|
392
|
-
|
|
392
|
+
p.current.classList.add(ot), p.current?.focus(), h.current?.focus();
|
|
393
393
|
});
|
|
394
|
-
}, []),
|
|
395
|
-
if (i ===
|
|
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
|
-
|
|
397
|
+
g.id,
|
|
398
398
|
i,
|
|
399
399
|
o
|
|
400
400
|
]);
|
|
401
|
-
return /* @__PURE__ */ K(
|
|
401
|
+
return /* @__PURE__ */ K(at, {
|
|
402
402
|
ariaSort: ge,
|
|
403
403
|
canDrag: O,
|
|
404
|
-
className:
|
|
405
|
-
column:
|
|
406
|
-
columnIndex:
|
|
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:
|
|
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, &.${
|
|
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: [
|
|
435
|
+
children: [g.type === "actions" && /* @__PURE__ */ G(M, {
|
|
436
436
|
className: Q.content,
|
|
437
|
-
sx:
|
|
437
|
+
sx: Ce,
|
|
438
438
|
children: t`Actions`
|
|
439
|
-
}),
|
|
439
|
+
}), g.type !== "actions" && /* @__PURE__ */ K(M, {
|
|
440
440
|
sx: {
|
|
441
|
-
[`&:hover .${Q.content}`]: { maxWidth: `calc(100% + 16px - ${(0,
|
|
442
|
-
|
|
441
|
+
[`&:hover .${Q.content}`]: { maxWidth: `calc(100% + 16px - ${(0, tt.default)([
|
|
442
|
+
de ? R : 0,
|
|
443
443
|
me ? R : 0,
|
|
444
|
-
|
|
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
|
-
|
|
453
|
-
column:
|
|
452
|
+
g.renderHeader ? /* @__PURE__ */ G(W, { children: g.renderHeader({
|
|
453
|
+
column: g,
|
|
454
454
|
dataContext: a
|
|
455
|
-
}) }) : /* @__PURE__ */ G(
|
|
455
|
+
}) }) : /* @__PURE__ */ G(se, {
|
|
456
456
|
arrow: !0,
|
|
457
457
|
placement: "top",
|
|
458
|
-
title:
|
|
459
|
-
children: /* @__PURE__ */ G(
|
|
458
|
+
title: g.headerTooltipContent,
|
|
459
|
+
children: /* @__PURE__ */ G(M, {
|
|
460
460
|
className: Q.content,
|
|
461
|
-
onClick:
|
|
461
|
+
onClick: A,
|
|
462
462
|
ref: l,
|
|
463
463
|
sx: {
|
|
464
464
|
cursor: "pointer",
|
|
465
465
|
flexGrow: 1,
|
|
466
|
-
maxWidth: `calc(100% + 16px - ${(0,
|
|
467
|
-
|
|
468
|
-
|
|
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:
|
|
476
|
-
column:
|
|
475
|
+
children: g.renderHeaderContent ? g.renderHeaderContent({
|
|
476
|
+
column: g,
|
|
477
477
|
dataContext: a
|
|
478
|
-
}) :
|
|
478
|
+
}) : g.headerName ?? ""
|
|
479
479
|
})
|
|
480
480
|
}),
|
|
481
|
-
|
|
481
|
+
de && /* @__PURE__ */ G(ct, {
|
|
482
482
|
className: Q.customHeaderIcon,
|
|
483
|
-
onClick:
|
|
483
|
+
onClick: F,
|
|
484
484
|
tabIndex: 0,
|
|
485
|
-
title:
|
|
486
|
-
children:
|
|
485
|
+
title: g.customHeaderIcon?.label,
|
|
486
|
+
children: g.customHeaderIcon?.iconElement
|
|
487
487
|
}),
|
|
488
|
-
me && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
489
|
-
className:
|
|
490
|
-
onClick:
|
|
491
|
-
ref:
|
|
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:
|
|
494
|
-
children: /* @__PURE__ */ G(
|
|
495
|
-
}), /* @__PURE__ */ G(
|
|
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:
|
|
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(
|
|
509
|
+
children: /* @__PURE__ */ G(ae, {
|
|
510
510
|
elevation: 4,
|
|
511
511
|
square: !0,
|
|
512
512
|
sx: { padding: n.spacing(3) },
|
|
513
|
-
children: /* @__PURE__ */ G(
|
|
514
|
-
filter:
|
|
515
|
-
onFilterChange:
|
|
513
|
+
children: /* @__PURE__ */ G(rt, {
|
|
514
|
+
filter: N,
|
|
515
|
+
onFilterChange: j
|
|
516
516
|
})
|
|
517
517
|
})
|
|
518
518
|
})] }),
|
|
519
|
-
|
|
520
|
-
className:
|
|
521
|
-
onClick:
|
|
522
|
-
ownerState:
|
|
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:
|
|
525
|
-
children: /* @__PURE__ */ G(
|
|
524
|
+
title: t("Toggle sorting for {{name}}", { name: g.headerName || t("unknown") }),
|
|
525
|
+
children: /* @__PURE__ */ G(we, { fontSize: "inherit" })
|
|
526
526
|
}) }),
|
|
527
|
-
|
|
528
|
-
"aria-label": t("Resize column {{name}}, use arrow keys to adjust the size.", { name:
|
|
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:
|
|
531
|
-
onMouseDown:
|
|
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 ${
|
|
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
|
-
},
|
|
556
|
-
},
|
|
557
|
-
let t =
|
|
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(
|
|
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(
|
|
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
|
-
},
|
|
596
|
-
let t = V(() => ({ sideEffects:
|
|
597
|
-
return /* @__PURE__ */ G(
|
|
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
|
-
},
|
|
604
|
+
}, pt = R({
|
|
604
605
|
attributes: void 0,
|
|
605
606
|
listeners: void 0,
|
|
606
607
|
ref: void 0
|
|
607
|
-
}),
|
|
608
|
+
}), mt = (e) => {
|
|
608
609
|
let { children: t, value: n } = e;
|
|
609
|
-
return /* @__PURE__ */ G(
|
|
610
|
+
return /* @__PURE__ */ G(pt, {
|
|
610
611
|
value: n,
|
|
611
612
|
children: t
|
|
612
613
|
});
|
|
613
|
-
},
|
|
614
|
-
let r =
|
|
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
|
-
|
|
624
|
-
transform: Ve.Translate.toString(l),
|
|
624
|
+
transform: Be.Translate.toString(l),
|
|
625
625
|
transition: u
|
|
626
626
|
};
|
|
627
|
-
return /* @__PURE__ */ G(
|
|
627
|
+
return /* @__PURE__ */ G(mt, {
|
|
628
628
|
value: d,
|
|
629
|
-
children: /* @__PURE__ */ G(
|
|
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
|
-
|
|
639
|
-
boxShadow:
|
|
640
|
+
borderBottom: `1px solid ${r.palette.divider}`,
|
|
641
|
+
boxShadow: a ? r.shadows[6] : void 0,
|
|
640
642
|
boxSizing: "border-box",
|
|
641
|
-
display: "
|
|
642
|
-
|
|
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
|
-
},
|
|
650
|
-
let t =
|
|
651
|
-
return /* @__PURE__ */ G(
|
|
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": {
|
|
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
|
-
|
|
683
|
+
type: "button",
|
|
684
|
+
children: /* @__PURE__ */ G(Ve, {})
|
|
675
685
|
});
|
|
676
|
-
},
|
|
677
|
-
let
|
|
678
|
-
|
|
679
|
-
}, []),
|
|
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(
|
|
692
|
+
t(Le(e, i, a));
|
|
683
693
|
}
|
|
684
|
-
|
|
685
|
-
}, [e, t]),
|
|
686
|
-
|
|
687
|
-
}, []),
|
|
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 (
|
|
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]),
|
|
705
|
+
}, [t, e]), g = z((e) => /* @__PURE__ */ K(ht, {
|
|
696
706
|
id: e.id,
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
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
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
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
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
737
|
+
h,
|
|
738
|
+
r,
|
|
739
|
+
a,
|
|
740
|
+
i
|
|
719
741
|
]);
|
|
720
|
-
return /* @__PURE__ */ K(
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
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
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
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:
|
|
738
|
-
|
|
739
|
-
|
|
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
|
-
},
|
|
742
|
-
let { t:
|
|
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
|
|
838
|
+
return g.forEach((t) => {
|
|
745
839
|
e.set(t.id, t);
|
|
746
840
|
}), e;
|
|
747
|
-
}, [
|
|
841
|
+
}, [g]), b = z((e) => {
|
|
748
842
|
let t = [];
|
|
749
843
|
e.forEach((e) => {
|
|
750
|
-
let n =
|
|
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
|
-
}),
|
|
757
|
-
}, [
|
|
852
|
+
}), c(t);
|
|
853
|
+
}, [v]);
|
|
758
854
|
B(() => {
|
|
759
|
-
|
|
760
|
-
}, [
|
|
761
|
-
let
|
|
762
|
-
|
|
763
|
-
}, [
|
|
855
|
+
b(f);
|
|
856
|
+
}, [f, b]);
|
|
857
|
+
let x = z(() => {
|
|
858
|
+
b(p.createInitialVisualColumnSettings(g));
|
|
859
|
+
}, [g, b]);
|
|
764
860
|
B(() => {
|
|
765
|
-
n(
|
|
766
|
-
}, [n,
|
|
767
|
-
let
|
|
768
|
-
|
|
769
|
-
let e =
|
|
770
|
-
|
|
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
|
-
...
|
|
868
|
+
...s.map((e) => e.id.toString()),
|
|
773
869
|
...r.map((e) => e.id)
|
|
774
870
|
]), t();
|
|
775
871
|
}, [
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
872
|
+
g,
|
|
873
|
+
u,
|
|
874
|
+
s,
|
|
779
875
|
t
|
|
780
|
-
]),
|
|
781
|
-
let t =
|
|
782
|
-
dataContext:
|
|
876
|
+
]), C = z((e) => {
|
|
877
|
+
let t = p.getColumnIdsWithData({
|
|
878
|
+
dataContext: d,
|
|
783
879
|
hasCellData: r,
|
|
784
|
-
sortedData:
|
|
785
|
-
tableColumns:
|
|
786
|
-
visibleColumnIds:
|
|
880
|
+
sortedData: _,
|
|
881
|
+
tableColumns: g,
|
|
882
|
+
visibleColumnIds: s.filter(e).map((e) => e.id.toString())
|
|
787
883
|
});
|
|
788
|
-
|
|
884
|
+
c((e) => e.map((e) => ({
|
|
789
885
|
...e,
|
|
790
886
|
isSelected: t.includes(e.id.toString())
|
|
791
887
|
})));
|
|
792
888
|
}, [
|
|
793
|
-
|
|
889
|
+
d,
|
|
794
890
|
r,
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
]),
|
|
799
|
-
|
|
800
|
-
}, [
|
|
801
|
-
|
|
802
|
-
}, [
|
|
803
|
-
|
|
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
|
-
}, []),
|
|
808
|
-
|
|
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:
|
|
820
|
-
onClick:
|
|
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:
|
|
828
|
-
onClick:
|
|
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:
|
|
836
|
-
onClick:
|
|
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:
|
|
844
|
-
onClick:
|
|
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:
|
|
852
|
-
onClick:
|
|
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:
|
|
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:
|
|
868
|
-
onClick:
|
|
963
|
+
label: o`Apply`,
|
|
964
|
+
onClick: S,
|
|
869
965
|
variant: "contained"
|
|
870
966
|
}
|
|
871
967
|
]);
|
|
872
968
|
}, [
|
|
873
969
|
e,
|
|
874
970
|
t,
|
|
875
|
-
|
|
876
|
-
S,
|
|
877
|
-
v,
|
|
878
|
-
y,
|
|
971
|
+
D,
|
|
879
972
|
w,
|
|
880
|
-
|
|
881
|
-
|
|
973
|
+
x,
|
|
974
|
+
S,
|
|
975
|
+
E,
|
|
976
|
+
o,
|
|
977
|
+
T
|
|
882
978
|
]);
|
|
883
|
-
let
|
|
884
|
-
|
|
885
|
-
}, []),
|
|
886
|
-
|
|
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(
|
|
889
|
-
items:
|
|
890
|
-
onChange:
|
|
891
|
-
|
|
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: "
|
|
998
|
+
maxWidth: "lg",
|
|
899
999
|
noCloseButton: !1,
|
|
900
1000
|
testId: "TableColumnOrderDialog"
|
|
901
|
-
}),
|
|
902
|
-
let { t: r } = q(), i =
|
|
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(
|
|
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
|
-
},
|
|
921
|
-
let { t } = q(), n = e.column, r =
|
|
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,
|
|
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(
|
|
1036
|
+
return /* @__PURE__ */ G(ie, {
|
|
937
1037
|
checked: d,
|
|
938
|
-
checkedIcon: u ? void 0 : /* @__PURE__ */ G(
|
|
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
|
-
},
|
|
948
|
-
let i =
|
|
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 &&
|
|
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(
|
|
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
|
-
},
|
|
977
|
-
let
|
|
978
|
-
|
|
979
|
-
let
|
|
980
|
-
|
|
981
|
-
let
|
|
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
|
-
|
|
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
|
-
|
|
1090
|
+
ee.enablePageEvents,
|
|
991
1091
|
n,
|
|
992
1092
|
s
|
|
993
|
-
]), Z = z(() =>
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
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
|
-
|
|
999
|
-
|
|
1000
|
-
}, [
|
|
1001
|
-
let
|
|
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]),
|
|
1111
|
+
}, t.id), [n, o]), Be = z((e) => /* @__PURE__ */ G(xt, { tableColumnParams: e }), []);
|
|
1007
1112
|
B(() => {
|
|
1008
|
-
|
|
1009
|
-
}, [
|
|
1010
|
-
let
|
|
1011
|
-
if (!e.shiftKey || !
|
|
1012
|
-
|
|
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 =
|
|
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 =
|
|
1018
|
-
|
|
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
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
]),
|
|
1025
|
-
let n =
|
|
1026
|
-
return /* @__PURE__ */ G(
|
|
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:
|
|
1133
|
+
onCheckBoxClick: Ve,
|
|
1029
1134
|
tableColumn: e
|
|
1030
1135
|
}, n);
|
|
1031
|
-
}, [
|
|
1032
|
-
if (!
|
|
1033
|
-
let e =
|
|
1034
|
-
|
|
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
|
-
}),
|
|
1142
|
+
}), Re());
|
|
1038
1143
|
}, [
|
|
1039
|
-
L,
|
|
1040
1144
|
ve,
|
|
1041
|
-
|
|
1042
|
-
|
|
1145
|
+
Ee,
|
|
1146
|
+
P,
|
|
1147
|
+
I,
|
|
1043
1148
|
Y,
|
|
1044
|
-
|
|
1149
|
+
Re
|
|
1045
1150
|
]);
|
|
1046
1151
|
B(() => {
|
|
1047
|
-
Y && !
|
|
1152
|
+
Y && !ve && ae && (R.current = j.getState().getCurrentColumnVisualSettings(), Ue(), Re(), Ce(!0));
|
|
1048
1153
|
}, [
|
|
1049
|
-
|
|
1050
|
-
|
|
1154
|
+
ve,
|
|
1155
|
+
ae,
|
|
1051
1156
|
Y,
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1157
|
+
j,
|
|
1158
|
+
Ue,
|
|
1159
|
+
Re
|
|
1055
1160
|
]);
|
|
1056
|
-
let
|
|
1057
|
-
|
|
1058
|
-
}, [
|
|
1059
|
-
|
|
1060
|
-
}, 500, { trailing: !0 }),
|
|
1061
|
-
e.calculatedWidth = t, e.widthPx = t, e.hasResized = !0,
|
|
1062
|
-
}, [
|
|
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 =
|
|
1066
|
-
|
|
1067
|
-
}, [
|
|
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 =
|
|
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 &&
|
|
1178
|
+
i !== o && $e(n, o);
|
|
1074
1179
|
}, o = (e) => {
|
|
1075
|
-
|
|
1180
|
+
_e.current(), _e.current = Xe.default;
|
|
1076
1181
|
};
|
|
1077
|
-
document.addEventListener("mousemove", a), document.addEventListener("mouseup", o),
|
|
1182
|
+
document.addEventListener("mousemove", a), document.addEventListener("mouseup", o), _e.current = () => {
|
|
1078
1183
|
document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", o);
|
|
1079
1184
|
};
|
|
1080
|
-
}, [
|
|
1185
|
+
}, [$e]);
|
|
1081
1186
|
B(() => () => {
|
|
1082
|
-
|
|
1187
|
+
_e.current();
|
|
1083
1188
|
}, []);
|
|
1084
|
-
let
|
|
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 =
|
|
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
|
-
|
|
1197
|
+
Ue(), rt();
|
|
1093
1198
|
};
|
|
1094
|
-
return
|
|
1095
|
-
|
|
1199
|
+
return A.window.addEventListener("resize", e), () => {
|
|
1200
|
+
A.window.removeEventListener("resize", e);
|
|
1096
1201
|
};
|
|
1097
1202
|
}, [
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1203
|
+
rt,
|
|
1204
|
+
Ue,
|
|
1205
|
+
A.window
|
|
1101
1206
|
]);
|
|
1102
|
-
let
|
|
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]),
|
|
1110
|
-
let n =
|
|
1111
|
-
if (e.type === "start" && (
|
|
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:
|
|
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: ${
|
|
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
|
-
`,
|
|
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 + (
|
|
1127
|
-
(r < i &&
|
|
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
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1235
|
+
it,
|
|
1236
|
+
We,
|
|
1237
|
+
nt,
|
|
1133
1238
|
Y?.style,
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
]),
|
|
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:
|
|
1144
|
-
borderBottom: `1px solid ${
|
|
1248
|
+
background: E.palette.background.paper,
|
|
1249
|
+
borderBottom: `1px solid ${Te}`,
|
|
1145
1250
|
display: "flex",
|
|
1146
1251
|
fontWeight: "bold",
|
|
1147
|
-
height:
|
|
1252
|
+
height: E.spacing(r),
|
|
1148
1253
|
zIndex: 3
|
|
1149
1254
|
},
|
|
1150
1255
|
children: Z().map((e, t) => {
|
|
1151
|
-
let n =
|
|
1152
|
-
return n ? /* @__PURE__ */ G(
|
|
1256
|
+
let n = Le.get(e.id);
|
|
1257
|
+
return n ? /* @__PURE__ */ G(ut, {
|
|
1153
1258
|
column: n.type === "selectable" ? {
|
|
1154
1259
|
...n,
|
|
1155
|
-
renderHeaderContent:
|
|
1260
|
+
renderHeaderContent: Be
|
|
1156
1261
|
} : n,
|
|
1157
1262
|
columnIndex: t,
|
|
1158
|
-
dividerColor:
|
|
1159
|
-
height:
|
|
1160
|
-
onColumnDividerKeyDown:
|
|
1161
|
-
onColumnDividerMouseDown:
|
|
1162
|
-
onCustomDrag:
|
|
1163
|
-
order:
|
|
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
|
-
|
|
1275
|
+
E,
|
|
1171
1276
|
r,
|
|
1172
|
-
|
|
1277
|
+
Te,
|
|
1173
1278
|
Z,
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
]),
|
|
1180
|
-
let
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
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
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
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
|
-
})
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
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
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1309
|
-
|
|
1418
|
+
oe,
|
|
1419
|
+
Ie,
|
|
1420
|
+
He,
|
|
1421
|
+
ze,
|
|
1422
|
+
D,
|
|
1423
|
+
k,
|
|
1310
1424
|
Le,
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
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]),
|
|
1429
|
+
}, [c]), lt = z((e) => {
|
|
1321
1430
|
l(e);
|
|
1322
1431
|
}, [l]);
|
|
1323
1432
|
B(() => {
|
|
1324
|
-
if (!
|
|
1325
|
-
let e =
|
|
1326
|
-
t.
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
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
|
-
|
|
1446
|
+
w,
|
|
1341
1447
|
Y,
|
|
1342
|
-
|
|
1343
|
-
|
|
1448
|
+
E.palette.action.hover,
|
|
1449
|
+
E.palette.background.paper
|
|
1344
1450
|
]), B(() => {
|
|
1345
1451
|
let e = () => {
|
|
1346
|
-
|
|
1452
|
+
Ue(), rt(), Re(), Ge();
|
|
1347
1453
|
}, t = [
|
|
1348
|
-
|
|
1349
|
-
|
|
1454
|
+
se("condensedChange", (t) => {
|
|
1455
|
+
j.getState().setIsCondensed(t), R.current = j.getState().getCurrentColumnVisualSettings(), e();
|
|
1350
1456
|
}),
|
|
1351
|
-
|
|
1352
|
-
|
|
1457
|
+
se("reset", () => {
|
|
1458
|
+
j.getState().resetColumns(), R.current = j.getState().getCurrentColumnVisualSettings(), e();
|
|
1353
1459
|
}),
|
|
1354
|
-
|
|
1355
|
-
|
|
1460
|
+
se("columnVisibilityChange", (t) => {
|
|
1461
|
+
R.current.forEach((e) => {
|
|
1356
1462
|
e.isVisible = t.includes(e.id);
|
|
1357
1463
|
}), e();
|
|
1358
1464
|
}),
|
|
1359
|
-
|
|
1360
|
-
|
|
1465
|
+
se("columnOrderChange", (t) => {
|
|
1466
|
+
R.current.sort((e, n) => t.indexOf(e.id) - t.indexOf(n.id)), e();
|
|
1361
1467
|
}),
|
|
1362
|
-
|
|
1363
|
-
|
|
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
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1476
|
+
se,
|
|
1477
|
+
Ge,
|
|
1478
|
+
I,
|
|
1479
|
+
j,
|
|
1480
|
+
rt,
|
|
1481
|
+
Ue,
|
|
1482
|
+
Re
|
|
1377
1483
|
]);
|
|
1378
|
-
let
|
|
1379
|
-
let e =
|
|
1380
|
-
if (e &&
|
|
1381
|
-
let t = e.scrollTop
|
|
1382
|
-
|
|
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
|
-
|
|
1491
|
+
We,
|
|
1492
|
+
u,
|
|
1386
1493
|
d,
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
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
|
-
}, [
|
|
1394
|
-
let e =
|
|
1395
|
-
e && !
|
|
1396
|
-
}, []),
|
|
1397
|
-
|
|
1398
|
-
hasRendered:
|
|
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,
|
|
1402
|
-
}, [
|
|
1403
|
-
|
|
1404
|
-
scrollToIndex:
|
|
1405
|
-
setVerticalScrollPosition:
|
|
1506
|
+
} : null, De.current?.scrollToIndex(e), ht();
|
|
1507
|
+
}, [ht]);
|
|
1508
|
+
ye(b, () => ({
|
|
1509
|
+
scrollToIndex: gt,
|
|
1510
|
+
setVerticalScrollPosition: mt
|
|
1406
1511
|
}));
|
|
1407
|
-
let
|
|
1408
|
-
|
|
1409
|
-
}, [a]),
|
|
1410
|
-
|
|
1411
|
-
let t =
|
|
1412
|
-
t &&
|
|
1413
|
-
}, [
|
|
1414
|
-
|
|
1415
|
-
}, [
|
|
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
|
-
|
|
1418
|
-
}, [a,
|
|
1419
|
-
ref:
|
|
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
|
-
...
|
|
1531
|
+
...T
|
|
1427
1532
|
},
|
|
1428
|
-
children: [
|
|
1533
|
+
children: [ve && /* @__PURE__ */ G(xe, {
|
|
1429
1534
|
...J.createAttributes("Table"),
|
|
1430
1535
|
components: {
|
|
1431
|
-
EmptyPlaceholder:
|
|
1536
|
+
EmptyPlaceholder: ge((e, t) => /* @__PURE__ */ G(M, {
|
|
1432
1537
|
...e,
|
|
1433
1538
|
ref: t
|
|
1434
1539
|
})),
|
|
1435
|
-
FillerRow:
|
|
1540
|
+
FillerRow: ge((e, t) => /* @__PURE__ */ G(M, {
|
|
1436
1541
|
ref: t,
|
|
1437
1542
|
style: { height: e.height }
|
|
1438
1543
|
})),
|
|
1439
|
-
Table:
|
|
1544
|
+
Table: ge((e, t) => /* @__PURE__ */ G(M, {
|
|
1440
1545
|
...e,
|
|
1441
|
-
"data-row-count":
|
|
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:
|
|
1552
|
+
width: Oe.current
|
|
1448
1553
|
}
|
|
1449
1554
|
})),
|
|
1450
|
-
TableBody:
|
|
1555
|
+
TableBody: ge((t, n) => /* @__PURE__ */ G(M, {
|
|
1451
1556
|
...t,
|
|
1452
1557
|
ref: n,
|
|
1453
1558
|
sx: { font: e }
|
|
1454
1559
|
})),
|
|
1455
|
-
TableHead:
|
|
1560
|
+
TableHead: ge((e, t) => /* @__PURE__ */ G(M, {
|
|
1456
1561
|
...e,
|
|
1457
1562
|
ref: t
|
|
1458
1563
|
})),
|
|
1459
|
-
TableRow:
|
|
1460
|
-
let n = !
|
|
1461
|
-
return /* @__PURE__ */ G(
|
|
1462
|
-
"data-id":
|
|
1463
|
-
onMouseEnter: () =>
|
|
1464
|
-
onMouseLeave: () =>
|
|
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: `${
|
|
1574
|
+
"*": { color: `${E.palette.text.primary} !important` },
|
|
1470
1575
|
"& [role=cell]": {
|
|
1471
|
-
"*": { color: `${
|
|
1472
|
-
backgroundColor:
|
|
1473
|
-
color: `${
|
|
1576
|
+
"*": { color: `${E.palette.text.primary} !important` },
|
|
1577
|
+
backgroundColor: E.palette.grey[100],
|
|
1578
|
+
color: `${E.palette.text.primary} !important`
|
|
1474
1579
|
},
|
|
1475
|
-
backgroundColor:
|
|
1476
|
-
color: `${
|
|
1580
|
+
backgroundColor: E.palette.grey[100],
|
|
1581
|
+
color: `${E.palette.text.primary} !important`
|
|
1477
1582
|
},
|
|
1478
|
-
borderBottom: `1px solid ${
|
|
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:
|
|
1587
|
+
height: E.spacing(C)
|
|
1483
1588
|
},
|
|
1484
|
-
...(0,
|
|
1589
|
+
...(0, Ye.default)(e, "item")
|
|
1485
1590
|
});
|
|
1486
1591
|
})
|
|
1487
1592
|
},
|
|
1488
|
-
data:
|
|
1489
|
-
fixedHeaderContent:
|
|
1490
|
-
fixedItemHeight:
|
|
1593
|
+
data: P,
|
|
1594
|
+
fixedHeaderContent: ot,
|
|
1595
|
+
fixedItemHeight: O,
|
|
1491
1596
|
initialTopMostItemIndex: i ?? 0,
|
|
1492
|
-
isScrolling:
|
|
1493
|
-
itemContent:
|
|
1494
|
-
itemSize:
|
|
1495
|
-
itemsRendered:
|
|
1496
|
-
onScroll:
|
|
1597
|
+
isScrolling: Ct,
|
|
1598
|
+
itemContent: st,
|
|
1599
|
+
itemSize: pt,
|
|
1600
|
+
itemsRendered: bt,
|
|
1601
|
+
onScroll: ft,
|
|
1497
1602
|
overscan: {
|
|
1498
|
-
main:
|
|
1499
|
-
reverse:
|
|
1603
|
+
main: f ?? re,
|
|
1604
|
+
reverse: g ?? ie
|
|
1500
1605
|
},
|
|
1501
|
-
rangeChanged:
|
|
1502
|
-
ref:
|
|
1606
|
+
rangeChanged: _t,
|
|
1607
|
+
ref: De,
|
|
1503
1608
|
style: {
|
|
1504
1609
|
height: "100%",
|
|
1505
1610
|
overflowX: t ? "scroll" : "auto"
|
|
1506
1611
|
},
|
|
1507
|
-
totalCount:
|
|
1508
|
-
}), /* @__PURE__ */ G(
|
|
1612
|
+
totalCount: P.length
|
|
1613
|
+
}), /* @__PURE__ */ G(vt, {
|
|
1614
|
+
ref: Pe,
|
|
1615
|
+
renderHeaderContent: x,
|
|
1616
|
+
renderItemContent: S
|
|
1617
|
+
})]
|
|
1509
1618
|
});
|
|
1510
|
-
},
|
|
1511
|
-
let { t: r } = q(), i =
|
|
1512
|
-
return /* @__PURE__ */ G(
|
|
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
|
-
},
|
|
1530
|
-
t.exports = Object.prototype.hasOwnProperty.call(
|
|
1531
|
-
})),
|
|
1532
|
-
var t =
|
|
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
|
-
})),
|
|
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 =
|
|
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
|
-
})),
|
|
1616
|
-
t.exports = process.env.NODE_ENV === "production" ?
|
|
1617
|
-
})),
|
|
1618
|
-
var t =
|
|
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
|
-
})),
|
|
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 =
|
|
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:
|
|
1710
|
-
t.exports = process.env.NODE_ENV === "production" ?
|
|
1711
|
-
})))(), 1)).default,
|
|
1712
|
-
function
|
|
1713
|
-
let r =
|
|
1714
|
-
return
|
|
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
|
|
1718
|
-
let r =
|
|
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(
|
|
1866
|
+
return o.length ? /* @__PURE__ */ K(M, {
|
|
1758
1867
|
sx: { mb: 2 },
|
|
1759
1868
|
children: [
|
|
1760
|
-
c && /* @__PURE__ */ K(
|
|
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(
|
|
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(
|
|
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(
|
|
1898
|
+
o.map((e) => /* @__PURE__ */ G(M, {
|
|
1790
1899
|
sx: { my: 1 },
|
|
1791
|
-
children: /* @__PURE__ */ G(
|
|
1900
|
+
children: /* @__PURE__ */ G(nt, { filter: e })
|
|
1792
1901
|
}, e.id)),
|
|
1793
|
-
/* @__PURE__ */ G(
|
|
1902
|
+
/* @__PURE__ */ G(N, {})
|
|
1794
1903
|
]
|
|
1795
1904
|
}, e.id) : null;
|
|
1796
|
-
},
|
|
1797
|
-
let { t } = q(), n =
|
|
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:
|
|
1800
|
-
}),
|
|
1908
|
+
values: p
|
|
1909
|
+
}), g = z((e, t) => {
|
|
1801
1910
|
d((n) => ({
|
|
1802
1911
|
...n,
|
|
1803
1912
|
[e]: t
|
|
1804
1913
|
}));
|
|
1805
|
-
}, []), { control:
|
|
1806
|
-
control:
|
|
1807
|
-
defaultValue:
|
|
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 && !!
|
|
1830
|
-
...
|
|
1831
|
-
children: /* @__PURE__ */ K(
|
|
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(
|
|
1842
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
1856
|
-
/* @__PURE__ */ G(
|
|
1964
|
+
children: [/* @__PURE__ */ K(M, { children: [
|
|
1965
|
+
/* @__PURE__ */ G(M, {
|
|
1857
1966
|
component: "span",
|
|
1858
1967
|
children: r.label
|
|
1859
1968
|
}),
|
|
1860
|
-
/* @__PURE__ */ G(
|
|
1969
|
+
/* @__PURE__ */ G(M, {
|
|
1861
1970
|
component: "span",
|
|
1862
1971
|
children: ": "
|
|
1863
1972
|
}),
|
|
1864
|
-
/* @__PURE__ */ G(
|
|
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(
|
|
1984
|
+
children: /* @__PURE__ */ G(Ge, {})
|
|
1876
1985
|
})]
|
|
1877
1986
|
}, e);
|
|
1878
1987
|
}) }),
|
|
1879
|
-
(o ||
|
|
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(
|
|
1996
|
+
children: [/* @__PURE__ */ G(re, {
|
|
1888
1997
|
...J.createAttributes("TableFiltersSidebarItem-reset"),
|
|
1889
1998
|
color: "primary",
|
|
1890
1999
|
onClick: E,
|
|
1891
|
-
startIcon: /* @__PURE__ */ G(
|
|
2000
|
+
startIcon: /* @__PURE__ */ G(We, {}),
|
|
1892
2001
|
variant: "outlined",
|
|
1893
2002
|
children: t`Reset`
|
|
1894
|
-
}), /* @__PURE__ */ G(
|
|
2003
|
+
}), /* @__PURE__ */ G(re, {
|
|
1895
2004
|
...J.createAttributes("TableFiltersSidebarItem-apply"),
|
|
1896
2005
|
color: "secondary",
|
|
1897
|
-
startIcon: /* @__PURE__ */ G(
|
|
2006
|
+
startIcon: /* @__PURE__ */ G(Ue, {}),
|
|
1898
2007
|
type: "submit",
|
|
1899
2008
|
children: t`Apply`
|
|
1900
2009
|
})]
|
|
1901
2010
|
})
|
|
1902
|
-
] }), /* @__PURE__ */ K(
|
|
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(
|
|
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(
|
|
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(
|
|
2022
|
+
children: [/* @__PURE__ */ G(M, {
|
|
1914
2023
|
sx: { my: 1 },
|
|
1915
|
-
children: /* @__PURE__ */ G(
|
|
1916
|
-
}), /* @__PURE__ */ G(
|
|
2024
|
+
children: /* @__PURE__ */ G(nt, { filter: e })
|
|
2025
|
+
}), /* @__PURE__ */ G(N, {})]
|
|
1917
2026
|
}, e.id)) })]
|
|
1918
2027
|
})]
|
|
1919
2028
|
})
|
|
1920
2029
|
}) });
|
|
1921
|
-
},
|
|
2030
|
+
}, Lt = ({ onClose: e, open: t }) => {
|
|
1922
2031
|
let { t: n } = q();
|
|
1923
2032
|
return /* @__PURE__ */ G(k, {
|
|
1924
|
-
closeIcon: /* @__PURE__ */ G(
|
|
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(
|
|
2040
|
+
children: t && /* @__PURE__ */ G(It, { onClose: e })
|
|
1932
2041
|
});
|
|
1933
|
-
},
|
|
1934
|
-
let t =
|
|
1935
|
-
return /* @__PURE__ */ G(
|
|
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
|
-
},
|
|
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(
|
|
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(
|
|
1956
|
-
}),
|
|
1957
|
-
let t =
|
|
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(
|
|
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(
|
|
2075
|
+
icon: /* @__PURE__ */ G(Pt, {}),
|
|
1967
2076
|
onClick: o,
|
|
1968
2077
|
testIdAttributes: { name: "filters" },
|
|
1969
|
-
title:
|
|
1970
|
-
}), e] }), /* @__PURE__ */ G(
|
|
2078
|
+
title: j`Open filters`
|
|
2079
|
+
}), e] }), /* @__PURE__ */ G(Lt, {
|
|
1971
2080
|
onClose: a,
|
|
1972
2081
|
open: r
|
|
1973
2082
|
})] });
|
|
1974
2083
|
};
|
|
1975
|
-
export {
|
|
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
|