@gen-epix/ui-client-common 4.5.0 → 4.5.1
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 +5 -4
- package/dist/@types/mui.d.ts +13 -5
- package/dist/@types/ui-client-common.d.ts +1 -0
- package/dist/_chunks/ApplicationFooter.js +44 -44
- package/dist/_chunks/ApplicationFooter.js.map +1 -1
- package/dist/_chunks/Breadcrumbs.js +13 -13
- package/dist/_chunks/CrudPage.js +300 -300
- package/dist/_chunks/CrudPage.js.map +1 -1
- package/dist/_chunks/Notifications.js +51 -51
- package/dist/_chunks/OutageList.js +29 -29
- package/dist/_chunks/OutageUtil.js +1 -2
- package/dist/_chunks/OutageUtil.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +96 -388
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Table.js +518 -512
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/TableUtil.js +8 -16
- package/dist/_chunks/TableUtil.js.map +1 -1
- package/dist/_chunks/TextFilter.js +14 -12
- package/dist/_chunks/TextFilter.js.map +1 -1
- package/dist/_chunks/UserInvitationsAdminPage.js +77 -77
- package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
- package/dist/_chunks/UserManagerUtil.js +210 -209
- package/dist/_chunks/UserManagerUtil.js.map +1 -1
- package/dist/_chunks/_baseFlatten.js +8 -8
- package/dist/_chunks/_baseFlatten.js.map +1 -1
- package/dist/_chunks/_baseGet.js +280 -0
- package/dist/_chunks/_baseGet.js.map +1 -0
- package/dist/_chunks/_baseIteratee.js +274 -0
- package/dist/_chunks/_baseIteratee.js.map +1 -0
- package/dist/_chunks/_baseUnset.js +22 -299
- package/dist/_chunks/_baseUnset.js.map +1 -1
- package/dist/_chunks/last.js +13 -0
- package/dist/_chunks/last.js.map +1 -0
- package/dist/_chunks/omit.js +41 -40
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/tableStore.js +190 -183
- package/dist/_chunks/tableStore.js.map +1 -1
- package/dist/_chunks/uniq.js +44 -0
- package/dist/_chunks/uniq.js.map +1 -0
- package/dist/_chunks/useMutation.js +22 -22
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +25 -8
- package/dist/_chunks/useQueryMemo.js.map +1 -1
- package/dist/classes/abstracts/FilterAbstract/index.js +3 -1
- package/dist/classes/abstracts/FilterAbstract/index.js.map +1 -1
- package/dist/classes/filters/MultiSelectFilter.d.ts +1 -1
- package/dist/classes/services/AuthenticationService/AuthenticationService.d.ts +1 -1
- package/dist/classes/services/AuthenticationService/index.js +15 -15
- 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/BackendVersionService/index.js +3 -2
- package/dist/classes/services/BackendVersionService/index.js.map +1 -1
- package/dist/classes/services/BreadcrumbService/index.js +16 -38
- package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
- package/dist/classes/services/EmotionCacheService/index.js +9 -8
- package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
- package/dist/classes/services/I18nService/index.js +11 -10
- package/dist/classes/services/I18nService/index.js.map +1 -1
- package/dist/classes/services/InactivityService/index.js +12 -12
- package/dist/classes/services/InactivityService/index.js.map +1 -1
- package/dist/classes/services/LogService/index.js +39 -33
- package/dist/classes/services/LogService/index.js.map +1 -1
- package/dist/classes/services/NotificationService/index.js +8 -8
- package/dist/classes/services/NotificationService/index.js.map +1 -1
- package/dist/classes/services/PageEventBusService/index.js +13 -9
- package/dist/classes/services/PageEventBusService/index.js.map +1 -1
- package/dist/classes/services/RouterService/index.js +3 -6
- package/dist/classes/services/RouterService/index.js.map +1 -1
- package/dist/components/app/App/App.d.ts +1 -1
- package/dist/components/app/App/index.js +34 -38
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +28 -28
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +47 -45
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
- package/dist/components/app/AuthenticationWrapper/index.js +35 -35
- package/dist/components/app/AuthenticationWrapper/index.js.map +1 -1
- package/dist/components/app/AuthorizationWrapper/index.js +19 -19
- package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
- package/dist/components/app/RouterRoot/index.js +52 -50
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/epi/EpiContactDetailsDialog/index.js +21 -21
- package/dist/components/filters/BooleanFilterField/index.js +5 -5
- package/dist/components/filters/DateFilterField/index.js +3 -3
- package/dist/components/filters/GeoFilterField/index.js +4 -4
- package/dist/components/filters/MultiSelectFilterField/index.js +4 -4
- package/dist/components/filters/NumberRangeFilterField/index.js +3 -3
- package/dist/components/filters/TextFilterField/index.js +3 -3
- package/dist/components/ui/ApplicationBar/index.js +188 -188
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js +29 -29
- package/dist/components/ui/LicensesDialog/index.js +38 -38
- package/dist/components/ui/LicensesDialog/index.js.map +1 -1
- package/dist/components/ui/MyPermissionsDialog/index.js +16 -16
- package/dist/components/ui/NavLink/index.js +6 -6
- package/dist/components/ui/OrganizationSwitcherDialog/index.js +21 -21
- package/dist/components/ui/OrganizationSwitcherDialog/index.js.map +1 -1
- package/dist/components/ui/PageContainer/index.js +24 -24
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/components/ui/Sidebar/index.js +30 -30
- package/dist/components/ui/UserFeedbackDialog/index.js +12 -12
- package/dist/constants/config.constants.d.ts +0 -2
- package/dist/constants/config.constants.js +2 -2
- package/dist/constants/config.constants.js.map +1 -1
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +12 -12
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js.map +1 -1
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js +14 -14
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js.map +1 -1
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +12 -12
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +13 -13
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +4 -4
- package/dist/dataHooks/useOrganizationsQuery/index.js +13 -13
- package/dist/dataHooks/useOrganizationsQuery/index.js.map +1 -1
- package/dist/dataHooks/useUsersQuery/index.js +10 -10
- package/dist/dataHooks/useUsersQuery/index.js.map +1 -1
- package/dist/hooks/useConfig/index.js +2 -2
- package/dist/hooks/useConfig/index.js.map +1 -1
- package/dist/hooks/useCreateMutation/index.js +12 -12
- package/dist/hooks/useCreateMutation/index.js.map +1 -1
- package/dist/hooks/useDeleteMutation/index.js +16 -9
- package/dist/hooks/useDeleteMutation/index.js.map +1 -1
- package/dist/hooks/useEditMutation/index.js +48 -33
- package/dist/hooks/useEditMutation/index.js.map +1 -1
- package/dist/hooks/useItemQuery/index.js +4 -4
- package/dist/hooks/useItemQuery/index.js.map +1 -1
- package/dist/locale/en.json +1 -0
- package/dist/locale/nl.json +1 -0
- package/dist/models/config.models.d.ts +1 -5
- package/dist/models/theme.models.d.ts +19 -16
- package/dist/pages/AcceptInvitationPage/index.js +25 -25
- package/dist/pages/AcceptInvitationPage/index.js.map +1 -1
- package/dist/pages/AdminPage/index.js +16 -16
- package/dist/pages/ChooseIdentityProviderPage/index.js +21 -21
- package/dist/pages/IdentifierIssuersAdminPage/index.js +5 -5
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +5 -5
- package/dist/pages/OrganizationContactsAdminPage/index.js +6 -6
- package/dist/pages/OrganizationSitesAdminPage/index.js +9 -9
- package/dist/pages/OrganizationsAdminPage/index.js +13 -13
- package/dist/pages/OutagesAdminPage/index.js +20 -20
- package/dist/pages/PostLoginPage/index.js +6 -6
- package/dist/pages/PostLogoutPage/index.js +8 -8
- package/dist/pages/UsersAdminPage/index.js +39 -39
- package/dist/pages/UsersAdminPage/index.js.map +1 -1
- package/dist/setup/setup.js +11 -4
- package/dist/setup/setup.js.map +1 -1
- package/dist/theme/demoTheme/index.js +17 -15
- package/dist/theme/demoTheme/index.js.map +1 -1
- package/dist/utils/DataHookUtil/index.js +1 -1
- package/dist/utils/DataHookUtil/index.js.map +1 -1
- package/dist/utils/DependencyContainerUtil/DependencyContainerUtil.d.ts +2 -3
- package/dist/utils/DependencyContainerUtil/index.js +10 -15
- package/dist/utils/DependencyContainerUtil/index.js.map +1 -1
- package/dist/utils/MenuDataUtil/index.js +1 -1
- package/dist/utils/MenuDataUtil/index.js.map +1 -1
- package/dist/utils/StandardConfigUtil/index.js +0 -4
- package/dist/utils/StandardConfigUtil/index.js.map +1 -1
- package/dist/utils/TimeUtil/index.js +1 -1
- package/dist/utils/TimeUtil/index.js.map +1 -1
- package/package.json +10 -13
- package/dist/context/ClientCommonConfigContext/ClientCommonConfigContext.d.ts +0 -9
- package/dist/context/ClientCommonConfigContext/ClientCommonConfigContextProvider.d.ts +0 -6
- package/dist/context/ClientCommonConfigContext/index.d.ts +0 -3
- package/dist/context/ClientCommonConfigContext/index.js +0 -34
- package/dist/context/ClientCommonConfigContext/index.js.map +0 -1
- package/dist/context/ClientCommonConfigContext/useClientCommonConfigContext.d.ts +0 -3
package/dist/_chunks/Table.js
CHANGED
|
@@ -2,13 +2,13 @@ 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
3
|
import { n as c, r as l, t as u } from "./TableUtil.js";
|
|
4
4
|
import { f as d } from "./isArrayLike.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { TABLE_COLUMN_FROZEN as f } from "../models/table.models.js";
|
|
6
|
+
import { t as p } from "./react.js";
|
|
7
|
+
import { t as m } from "./tableStore.js";
|
|
8
|
+
import { PageEventBusService as h } from "../classes/services/PageEventBusService/index.js";
|
|
9
|
+
import { t as g } from "./omit.js";
|
|
10
|
+
import { useConfig as _ } from "../hooks/useConfig/index.js";
|
|
11
|
+
import { r as v, t as y } from "./uniq.js";
|
|
12
12
|
import { n as b, t as x } from "./useColumnsMenu.js";
|
|
13
13
|
import { t as S } from "./GeoFilter.js";
|
|
14
14
|
import { BooleanFilterField as C } from "../components/filters/BooleanFilterField/index.js";
|
|
@@ -16,43 +16,43 @@ import { DateFilterField as w } from "../components/filters/DateFilterField/inde
|
|
|
16
16
|
import { GeoFilterField as T } from "../components/filters/GeoFilterField/index.js";
|
|
17
17
|
import { MultiSelectFilterField as E } from "../components/filters/MultiSelectFilterField/index.js";
|
|
18
18
|
import { NumberRangeFilterField as D } from "../components/filters/NumberRangeFilterField/index.js";
|
|
19
|
-
import { TextFilterField as
|
|
20
|
-
import { SidebarItem as
|
|
21
|
-
import {
|
|
19
|
+
import { TextFilterField as O } from "../components/filters/TextFilterField/index.js";
|
|
20
|
+
import { SidebarItem as k, SidebarMenu as ee, SidebarMenuItem as te } from "../components/ui/Sidebar/index.js";
|
|
21
|
+
import { container as ne } from "tsyringe";
|
|
22
|
+
import { WindowService as re } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
22
23
|
import { t as A } from "i18next";
|
|
23
|
-
import {
|
|
24
|
-
import * as
|
|
25
|
-
import
|
|
26
|
-
import { Fragment as
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import ke from "
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import
|
|
41
|
-
import Ue from "@mui/icons-material/
|
|
42
|
-
import We from "@mui/icons-material/
|
|
43
|
-
import Ge from "@mui/icons-material/
|
|
44
|
-
import Ke from "@mui/icons-material/
|
|
45
|
-
import qe from "@
|
|
46
|
-
import { NestedDropdown as Je } from "@gen-epix/ui-core-components/components/NestedMenu";
|
|
24
|
+
import { Box as j, Button as M, Checkbox as N, Divider as P, FormControlLabel as ie, FormGroup as ae, IconButton as F, Menu as oe, Paper as se, Popover as ce, Tooltip as I, Typography as le, alpha as ue, darken as de, lighten as fe, styled as L, useTheme as pe } from "@mui/material";
|
|
25
|
+
import * as me from "react";
|
|
26
|
+
import he, { Fragment as R, createContext as ge, forwardRef as _e, use as ve, useCallback as z, useEffect as B, useId as ye, useImperativeHandle as be, useLayoutEffect as xe, useMemo as V, useRef as H, useState as U } from "react";
|
|
27
|
+
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
28
|
+
import { useTranslation as q } from "react-i18next";
|
|
29
|
+
import { TestIdUtil as J } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
30
|
+
import { TableVirtuoso as Se } from "react-virtuoso";
|
|
31
|
+
import { useScrollbarSize as Ce } from "@gen-epix/ui-core/hooks/useScrollbarSize";
|
|
32
|
+
import { visuallyHidden as we } from "@mui/utils";
|
|
33
|
+
import Te from "@mui/icons-material/ArrowDownward";
|
|
34
|
+
import Ee from "@mui/icons-material/FilterAlt";
|
|
35
|
+
import { FormProvider as De, useForm as Oe, useFormContext as Y, useWatch as ke } from "react-hook-form";
|
|
36
|
+
import Ae from "@mui/icons-material/MoreVert";
|
|
37
|
+
import { withDialog as je } from "@gen-epix/ui-core-components/hoc/withDialog";
|
|
38
|
+
import { DndContext as X, DragOverlay as Me, KeyboardSensor as Z, PointerSensor as Ne, defaultDropAnimationSideEffects as Pe, useSensor as Fe, useSensors as Ie } from "@dnd-kit/core";
|
|
39
|
+
import { SortableContext as Le, arrayMove as Re, sortableKeyboardCoordinates as ze, useSortable as Be } from "@dnd-kit/sortable";
|
|
40
|
+
import { CSS as Ve } from "@dnd-kit/utilities";
|
|
41
|
+
import He from "@mui/icons-material/DragIndicator";
|
|
42
|
+
import Ue from "@mui/icons-material/IndeterminateCheckBox";
|
|
43
|
+
import We from "@mui/icons-material/Check";
|
|
44
|
+
import Ge from "@mui/icons-material/RestartAlt";
|
|
45
|
+
import Ke from "@mui/icons-material/Close";
|
|
46
|
+
import { NestedDropdown as qe } from "@gen-epix/ui-core-components/components/NestedMenu";
|
|
47
47
|
//#region ../../node_modules/.pnpm/use-debounce@10.1.1_react@19.3.1/node_modules/use-debounce/dist/index.module.js
|
|
48
|
-
var
|
|
49
|
-
function
|
|
50
|
-
var i = this, a =
|
|
48
|
+
var Je = /* @__PURE__ */ e(c(), 1), Ye = /* @__PURE__ */ e(n(), 1), Xe = /* @__PURE__ */ e(g(), 1), Ze = /* @__PURE__ */ e(v(), 1);
|
|
49
|
+
function Qe(e, t, n, r) {
|
|
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;
|
|
53
53
|
if (typeof e != "function") throw TypeError("Expected a function");
|
|
54
54
|
t = +t || 0;
|
|
55
|
-
var v = !!(n ||= {}).leading, y = !("trailing" in n) || !!n.trailing, b = !!n.flushOnExit && y, x = "maxWait" in n, S = "debounceOnServer" in n && !!n.debounceOnServer, C = x ? Math.max(+n.maxWait || 0, t) : null, w =
|
|
55
|
+
var v = !!(n ||= {}).leading, y = !("trailing" in n) || !!n.trailing, b = !!n.flushOnExit && y, x = "maxWait" in n, S = "debounceOnServer" in n && !!n.debounceOnServer, C = x ? Math.max(+n.maxWait || 0, t) : null, w = V(function() {
|
|
56
56
|
var e = function(e) {
|
|
57
57
|
var t = l.current, n = u.current;
|
|
58
58
|
return l.current = u.current = null, o.current = e, s.current = s.current || e, d.current = f.current.apply(n, t);
|
|
@@ -73,7 +73,7 @@ function $e(e, t, n, r) {
|
|
|
73
73
|
}
|
|
74
74
|
}, D = function() {
|
|
75
75
|
r && r({});
|
|
76
|
-
},
|
|
76
|
+
}, O = function() {
|
|
77
77
|
if (g || S) {
|
|
78
78
|
var r, s = Date.now(), f = w(s);
|
|
79
79
|
if (l.current = [].slice.call(arguments), u.current = i, a.current = s, b && !m.current && (m.current = function() {
|
|
@@ -85,14 +85,14 @@ function $e(e, t, n, r) {
|
|
|
85
85
|
return c.current || n(E, t), d.current;
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
return
|
|
88
|
+
return O.cancel = function() {
|
|
89
89
|
var e = c.current;
|
|
90
90
|
e && (_ ? cancelAnimationFrame(c.current) : clearTimeout(c.current)), o.current = 0, l.current = a.current = u.current = c.current = null, e && r && r({});
|
|
91
|
-
},
|
|
91
|
+
}, O.isPending = function() {
|
|
92
92
|
return !!c.current;
|
|
93
|
-
},
|
|
93
|
+
}, O.flush = function() {
|
|
94
94
|
return c.current ? T(Date.now()) : d.current;
|
|
95
|
-
},
|
|
95
|
+
}, O;
|
|
96
96
|
}, [
|
|
97
97
|
v,
|
|
98
98
|
x,
|
|
@@ -105,7 +105,7 @@ function $e(e, t, n, r) {
|
|
|
105
105
|
S,
|
|
106
106
|
r
|
|
107
107
|
]);
|
|
108
|
-
return h.current = w,
|
|
108
|
+
return h.current = w, B(function() {
|
|
109
109
|
return p.current = !0, function() {
|
|
110
110
|
var e;
|
|
111
111
|
b && h.current.flush(), m.current &&= ((e = globalThis.document) == null || e.removeEventListener == null || e.removeEventListener("visibilitychange", m.current), null), p.current = !1;
|
|
@@ -114,61 +114,61 @@ function $e(e, t, n, r) {
|
|
|
114
114
|
}
|
|
115
115
|
//#endregion
|
|
116
116
|
//#region src/components/ui/Table/TableCellAsyncContent.tsx
|
|
117
|
-
var
|
|
118
|
-
let [t, n] =
|
|
119
|
-
return
|
|
117
|
+
var $e = ({ content: e }) => {
|
|
118
|
+
let [t, n] = U(null);
|
|
119
|
+
return B(() => {
|
|
120
120
|
(async () => {
|
|
121
121
|
e instanceof Promise ? n(await e) : n(e);
|
|
122
122
|
})();
|
|
123
|
-
}, [e]), /* @__PURE__ */
|
|
123
|
+
}, [e]), /* @__PURE__ */ G(W, { children: t });
|
|
124
124
|
};
|
|
125
125
|
//#endregion
|
|
126
126
|
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
127
|
-
function
|
|
127
|
+
function et(e) {
|
|
128
128
|
var t, n, r = "";
|
|
129
129
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
130
130
|
else if (typeof e == "object") {
|
|
131
131
|
if (Array.isArray(e)) {
|
|
132
132
|
var i = e.length;
|
|
133
|
-
for (t = 0; t < i; t++) e[t] && (n =
|
|
133
|
+
for (t = 0; t < i; t++) e[t] && (n = et(e[t])) && (r && (r += " "), r += n);
|
|
134
134
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
135
135
|
}
|
|
136
136
|
return r;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
138
|
+
function tt() {
|
|
139
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = et(e)) && (r && (r += " "), r += t);
|
|
140
140
|
return r;
|
|
141
141
|
}
|
|
142
142
|
//#endregion
|
|
143
143
|
//#region src/components/ui/Table/TableFilter.tsx
|
|
144
|
-
var
|
|
144
|
+
var nt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
145
145
|
var n = l(), r = d();
|
|
146
146
|
function i(e) {
|
|
147
147
|
return e && e.length ? n(e, r) : 0;
|
|
148
148
|
}
|
|
149
149
|
t.exports = i;
|
|
150
|
-
})))(), 1),
|
|
151
|
-
e instanceof s && /* @__PURE__ */
|
|
152
|
-
e instanceof o && /* @__PURE__ */
|
|
153
|
-
e instanceof r && /* @__PURE__ */
|
|
154
|
-
e instanceof a && /* @__PURE__ */
|
|
155
|
-
e instanceof S && /* @__PURE__ */
|
|
156
|
-
e instanceof i && /* @__PURE__ */
|
|
157
|
-
] }),
|
|
158
|
-
let n =
|
|
150
|
+
})))(), 1), rt = ({ filter: e }) => /* @__PURE__ */ K(W, { children: [
|
|
151
|
+
e instanceof s && /* @__PURE__ */ G(O, { filter: e }),
|
|
152
|
+
e instanceof o && /* @__PURE__ */ G(C, { filter: e }),
|
|
153
|
+
e instanceof r && /* @__PURE__ */ G(D, { filter: e }),
|
|
154
|
+
e instanceof a && /* @__PURE__ */ G(E, { filter: e }),
|
|
155
|
+
e instanceof S && /* @__PURE__ */ G(T, { filter: e }),
|
|
156
|
+
e instanceof i && /* @__PURE__ */ G(w, { filter: e })
|
|
157
|
+
] }), it = ({ filter: e, onFilterChange: t }) => {
|
|
158
|
+
let n = m(), { t: r } = q(), i = p(n, (e) => e.setFilterValue), a = V(() => ({ [e.id]: e.initialFilterValue }), [e.id, e.initialFilterValue]), o = V(() => ({ [e.id]: e.filterValue ?? e.initialFilterValue }), [
|
|
159
159
|
e.id,
|
|
160
160
|
e.filterValue,
|
|
161
161
|
e.initialFilterValue
|
|
162
|
-
]), s =
|
|
162
|
+
]), s = Oe({
|
|
163
163
|
defaultValues: a,
|
|
164
164
|
values: o
|
|
165
|
-
}), { formState: { isDirty: c }, handleSubmit: l } = s, u =
|
|
165
|
+
}), { formState: { isDirty: c }, handleSubmit: l } = s, u = z(async (n) => {
|
|
166
166
|
await i(e.id, n[e.id]), t();
|
|
167
167
|
}, [
|
|
168
168
|
e.id,
|
|
169
169
|
t,
|
|
170
170
|
i
|
|
171
|
-
]), d =
|
|
171
|
+
]), d = z(async () => {
|
|
172
172
|
await i(e.id, e.initialFilterValue), t();
|
|
173
173
|
}, [
|
|
174
174
|
e.id,
|
|
@@ -176,26 +176,26 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
176
176
|
t,
|
|
177
177
|
i
|
|
178
178
|
]);
|
|
179
|
-
return /* @__PURE__ */
|
|
179
|
+
return /* @__PURE__ */ G(De, {
|
|
180
180
|
...s,
|
|
181
|
-
children: /* @__PURE__ */
|
|
181
|
+
children: /* @__PURE__ */ K(j, {
|
|
182
182
|
autoComplete: "off",
|
|
183
183
|
component: "form",
|
|
184
184
|
id: "Filters",
|
|
185
185
|
onSubmit: l(u),
|
|
186
186
|
sx: { minWidth: "400px" },
|
|
187
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ G(rt, { filter: e }), /* @__PURE__ */ K(j, {
|
|
188
188
|
sx: {
|
|
189
189
|
display: "flex",
|
|
190
190
|
gap: 1,
|
|
191
191
|
justifyContent: "flex-end"
|
|
192
192
|
},
|
|
193
|
-
children: [/* @__PURE__ */
|
|
193
|
+
children: [/* @__PURE__ */ G(M, {
|
|
194
194
|
disabled: e.isInitialFilterValue(),
|
|
195
195
|
onClick: d,
|
|
196
196
|
variant: "outlined",
|
|
197
197
|
children: r`Remove filter`
|
|
198
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ G(M, {
|
|
199
199
|
disabled: !c,
|
|
200
200
|
type: "submit",
|
|
201
201
|
variant: "contained",
|
|
@@ -204,8 +204,8 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
204
204
|
})]
|
|
205
205
|
})
|
|
206
206
|
});
|
|
207
|
-
},
|
|
208
|
-
let T =
|
|
207
|
+
}, at = {}, ot = ({ ariaSort: e, backgroundColor: t, canDrag: n, children: r, className: i, column: a, columnIndex: o, enabled: s, height: c, onClick: l, onCustomDrag: u, order: d, ref: h, role: g, row: _, rowIndex: v, sx: y, tabIndex: x, title: S, width: C, xOffset: w }) => {
|
|
208
|
+
let T = pe(), E = m(), D = p(E, b((e) => e.dataContext)), O = z((e) => {
|
|
209
209
|
l({
|
|
210
210
|
dataContext: D,
|
|
211
211
|
id: a.id,
|
|
@@ -218,14 +218,14 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
218
218
|
l,
|
|
219
219
|
_,
|
|
220
220
|
v
|
|
221
|
-
]),
|
|
221
|
+
]), k = H(null), ee = z((e) => {
|
|
222
222
|
if (!u || n && !n(e)) return;
|
|
223
223
|
let t = e.currentTarget, r = t.getBoundingClientRect().width, i = {
|
|
224
224
|
elementOffsetX: e.clientX - t.getBoundingClientRect().left,
|
|
225
225
|
elementWidth: r,
|
|
226
226
|
target: t
|
|
227
227
|
}, o = (n) => {
|
|
228
|
-
|
|
228
|
+
k.current || (k.current = {
|
|
229
229
|
target: t,
|
|
230
230
|
x: e.clientX,
|
|
231
231
|
y: e.clientY
|
|
@@ -237,7 +237,7 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
237
237
|
type: "start",
|
|
238
238
|
...i
|
|
239
239
|
}, a));
|
|
240
|
-
let r = n.clientX -
|
|
240
|
+
let r = n.clientX - k.current.x, o = n.clientY - k.current.y;
|
|
241
241
|
u({
|
|
242
242
|
clientX: n.clientX,
|
|
243
243
|
clientY: n.clientY,
|
|
@@ -247,8 +247,8 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
247
247
|
...i
|
|
248
248
|
}, a);
|
|
249
249
|
}, s = (e) => {
|
|
250
|
-
if (e.preventDefault(),
|
|
251
|
-
let t = e.clientX -
|
|
250
|
+
if (e.preventDefault(), k.current) {
|
|
251
|
+
let t = e.clientX - k.current.x, n = e.clientY - k.current.y;
|
|
252
252
|
u({
|
|
253
253
|
clientX: e.clientX,
|
|
254
254
|
clientY: e.clientY,
|
|
@@ -258,16 +258,16 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
258
258
|
...i
|
|
259
259
|
}, a);
|
|
260
260
|
}
|
|
261
|
-
|
|
261
|
+
k.current = null, document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", s);
|
|
262
262
|
};
|
|
263
263
|
document.addEventListener("mouseup", s, { once: !0 }), document.addEventListener("mousemove", o);
|
|
264
264
|
}, [
|
|
265
265
|
u,
|
|
266
266
|
n,
|
|
267
267
|
a
|
|
268
|
-
]),
|
|
269
|
-
let e = a.frozen ===
|
|
270
|
-
return t && (
|
|
268
|
+
]), te = !a.frozen, ne = z(() => {
|
|
269
|
+
let e = a.frozen === f.LEFT, n = a.frozen === f.RIGHT, r = e || n, i;
|
|
270
|
+
return t && (at[t] ? i = at[t] : (i = T.palette.getContrastText(t), at[t] = i)), {
|
|
271
271
|
"*": t ?? { color: i ? `${i} !important` : void 0 },
|
|
272
272
|
background: r ? T.palette.background.paper : t,
|
|
273
273
|
boxSizing: "border-box",
|
|
@@ -299,30 +299,30 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
299
299
|
C,
|
|
300
300
|
w
|
|
301
301
|
]);
|
|
302
|
-
return /* @__PURE__ */
|
|
302
|
+
return /* @__PURE__ */ G(j, {
|
|
303
303
|
"aria-sort": e,
|
|
304
304
|
className: i,
|
|
305
305
|
"data-column-index": o,
|
|
306
306
|
"data-frozen": +!!a.frozen,
|
|
307
307
|
"data-id": a.id,
|
|
308
308
|
"data-row-index": v ?? "",
|
|
309
|
-
onClick: l && s ?
|
|
310
|
-
onMouseDown:
|
|
311
|
-
ref:
|
|
312
|
-
role:
|
|
309
|
+
onClick: l && s ? O : void 0,
|
|
310
|
+
onMouseDown: te && u ? ee : void 0,
|
|
311
|
+
ref: h,
|
|
312
|
+
role: g ?? "cell",
|
|
313
313
|
sx: ne(),
|
|
314
314
|
tabIndex: x,
|
|
315
315
|
title: S,
|
|
316
316
|
children: r
|
|
317
317
|
});
|
|
318
|
-
},
|
|
318
|
+
}, Q = {
|
|
319
319
|
columnDivider: "GENEPIX-TableHeaderCell-columnDivider",
|
|
320
320
|
content: "GENEPIX-TableHeaderCell-content",
|
|
321
321
|
customHeaderIcon: "GENEPIX-TableHeaderCell-customHeaderIcon",
|
|
322
322
|
filterLabelIcon: "GENEPIX-TableHeaderCell-filterLabelIcon",
|
|
323
323
|
root: "GENEPIX-TableHeaderCell",
|
|
324
324
|
sortLabelIcon: "GENEPIX-TableHeaderCell-sortLabelIcon"
|
|
325
|
-
},
|
|
325
|
+
}, $ = 18, st = `${Q.root}--focus`, ct = L(F, { name: "GENEPIX-TableSortLabelIcon" })(({ ownerState: e, theme: t }) => ({
|
|
326
326
|
"&:hover": {
|
|
327
327
|
color: t.palette.primary.main,
|
|
328
328
|
opacity: "1 !important"
|
|
@@ -333,95 +333,95 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
333
333
|
},
|
|
334
334
|
color: t.palette.text.primary,
|
|
335
335
|
display: "none",
|
|
336
|
-
fontSize:
|
|
337
|
-
height: `${
|
|
336
|
+
fontSize: $,
|
|
337
|
+
height: `${$}px`,
|
|
338
338
|
opacity: 0,
|
|
339
339
|
padding: 0,
|
|
340
340
|
userSelect: "none",
|
|
341
|
-
width: `${
|
|
342
|
-
})), lt =
|
|
341
|
+
width: `${$}px`
|
|
342
|
+
})), lt = L(F, { name: "GENEPIX-TableCustomHeaderIcon" })(({ theme: e }) => ({
|
|
343
343
|
"&:hover": {
|
|
344
344
|
color: e.palette.primary.main,
|
|
345
345
|
opacity: "1 !important"
|
|
346
346
|
},
|
|
347
347
|
display: "none",
|
|
348
|
-
fontSize:
|
|
349
|
-
height: `${
|
|
348
|
+
fontSize: $,
|
|
349
|
+
height: `${$}px`,
|
|
350
350
|
opacity: 0,
|
|
351
351
|
padding: 0,
|
|
352
352
|
userSelect: "none",
|
|
353
|
-
width: `${
|
|
354
|
-
})), ut =
|
|
353
|
+
width: `${$}px`
|
|
354
|
+
})), ut = L(F, { name: "GENEPIX-TableFilterLabelIcon" })(({ theme: e }) => ({
|
|
355
355
|
"&:hover": {
|
|
356
356
|
color: e.palette.primary.main,
|
|
357
357
|
opacity: "1 !important"
|
|
358
358
|
},
|
|
359
359
|
display: "none",
|
|
360
|
-
fontSize:
|
|
361
|
-
height: `${
|
|
360
|
+
fontSize: $,
|
|
361
|
+
height: `${$}px`,
|
|
362
362
|
opacity: 0,
|
|
363
363
|
padding: 0,
|
|
364
364
|
userSelect: "none",
|
|
365
|
-
width: `${
|
|
365
|
+
width: `${$}px`
|
|
366
366
|
})), dt = (e) => {
|
|
367
|
-
let { t } =
|
|
367
|
+
let { t } = q(), n = pe(), r = m(), i = p(r, (e) => e.sortByField), a = p(r, (e) => e.dataContext), o = p(r, (e) => e.sortDirection), s = p(r, (e) => e.setSorting), c = p(r, (e) => e.filters), l = H(null), u = ye(), [d, f] = U(), h = H(null), g = H(null), { column: _, columnIndex: v, dividerColor: y, height: b, onColumnDividerKeyDown: x, onColumnDividerMouseDown: S, onCustomDrag: C, order: w, width: T, xOffset: E } = e, D = H(!1), O = z((e) => _.frozen || e.button !== 0 ? !1 : e.nativeEvent.target.classList.contains(Q.content), [_.frozen]), k = z((e, t) => {
|
|
368
368
|
C && (e.type === "start" && (D.current = !0), C(e, t));
|
|
369
|
-
}, [C]),
|
|
369
|
+
}, [C]), ee = z(async () => {
|
|
370
370
|
i === _.id ? await s(_.id, o === "asc" ? "desc" : "asc") : await s(_.id, "asc");
|
|
371
371
|
}, [
|
|
372
372
|
_.id,
|
|
373
373
|
s,
|
|
374
374
|
i,
|
|
375
375
|
o
|
|
376
|
-
]),
|
|
377
|
-
D.current ? (e.preventDefault(), e.stopPropagation(), D.current = !1) : _.comparatorFactory && await
|
|
378
|
-
}, [_.comparatorFactory,
|
|
379
|
-
await
|
|
380
|
-
}, [
|
|
381
|
-
f((e) => e ? null :
|
|
382
|
-
}, []),
|
|
376
|
+
]), te = z(async (e) => {
|
|
377
|
+
D.current ? (e.preventDefault(), e.stopPropagation(), D.current = !1) : _.comparatorFactory && await ee();
|
|
378
|
+
}, [_.comparatorFactory, ee]), ne = z(async (e) => {
|
|
379
|
+
await ee();
|
|
380
|
+
}, [ee]), re = z(() => {
|
|
381
|
+
f((e) => e ? null : h.current);
|
|
382
|
+
}, []), A = z(() => {
|
|
383
383
|
f(null);
|
|
384
|
-
}, []),
|
|
384
|
+
}, []), M = z((e) => {
|
|
385
385
|
e.button === 0 && (e.preventDefault(), e.stopPropagation(), S(e, _));
|
|
386
|
-
}, [_, S]),
|
|
386
|
+
}, [_, S]), N = z((e) => {
|
|
387
387
|
x(e, _);
|
|
388
|
-
}, [_, x]),
|
|
388
|
+
}, [_, x]), P = V(() => c.find((e) => e.id === _.id), [_.id, c]), ie = V(() => !!P && !P.isInitialFilterValue(), [P]), ae = z(() => {
|
|
389
389
|
_.customHeaderIcon?.onClick({
|
|
390
390
|
column: _,
|
|
391
391
|
dataContext: a
|
|
392
392
|
});
|
|
393
|
-
}, [_, a]),
|
|
393
|
+
}, [_, a]), F = z(() => {
|
|
394
394
|
f(null), setTimeout(() => {
|
|
395
|
-
|
|
395
|
+
h.current.classList.add(st), h.current?.focus(), g.current?.focus();
|
|
396
396
|
});
|
|
397
|
-
}, []),
|
|
397
|
+
}, []), oe = i === _.id, le = { direction: i === _.id ? o : "asc" }, ue = tt(Q.sortLabelIcon, { [`${Q.sortLabelIcon}--active`]: oe }), de = tt(Q.filterLabelIcon, { [`${Q.filterLabelIcon}--active`]: ie }), fe = !!_.customHeaderIcon, L = !!_.comparatorFactory, me = !!P, he = L || me || fe ? 0 : -1, R = +n.spacing(2).replace("px", ""), ge = V(() => {
|
|
398
398
|
if (i === _.id) return o === "asc" ? "ascending" : "descending";
|
|
399
399
|
}, [
|
|
400
400
|
_.id,
|
|
401
401
|
i,
|
|
402
402
|
o
|
|
403
403
|
]);
|
|
404
|
-
return /* @__PURE__ */
|
|
405
|
-
ariaSort:
|
|
406
|
-
canDrag:
|
|
407
|
-
className:
|
|
404
|
+
return /* @__PURE__ */ K(ot, {
|
|
405
|
+
ariaSort: ge,
|
|
406
|
+
canDrag: O,
|
|
407
|
+
className: tt(Q.root, { [st]: !!d }),
|
|
408
408
|
column: _,
|
|
409
409
|
columnIndex: v,
|
|
410
410
|
height: b,
|
|
411
|
-
onCustomDrag:
|
|
411
|
+
onCustomDrag: k,
|
|
412
412
|
order: w,
|
|
413
|
-
ref:
|
|
413
|
+
ref: h,
|
|
414
414
|
role: "columnheader",
|
|
415
415
|
sx: {
|
|
416
|
-
[`.${
|
|
417
|
-
[`.${
|
|
416
|
+
[`.${Q.filterLabelIcon}--active`]: { color: n.palette.secondary.main },
|
|
417
|
+
[`.${Q.sortLabelIcon}--active, .${Q.filterLabelIcon}--active`]: {
|
|
418
418
|
display: "inline-block",
|
|
419
419
|
opacity: "1 !important"
|
|
420
420
|
},
|
|
421
|
-
[`.${
|
|
422
|
-
[`&:hover, &:focus-visible, &:focus, &:focus-within, &.${
|
|
423
|
-
[`.${
|
|
424
|
-
[`.${
|
|
421
|
+
[`.${Q.sortLabelIcon}--active`]: { color: n.palette.text.secondary },
|
|
422
|
+
[`&:hover, &:focus-visible, &:focus, &:focus-within, &.${st}`]: {
|
|
423
|
+
[`.${Q.columnDivider}`]: { opacity: 1 },
|
|
424
|
+
[`.${Q.sortLabelIcon}, .${Q.filterLabelIcon}, .${Q.customHeaderIcon}`]: {
|
|
425
425
|
display: "inline-block",
|
|
426
426
|
opacity: .5
|
|
427
427
|
}
|
|
@@ -432,44 +432,44 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
432
432
|
justifyContent: "flex-start",
|
|
433
433
|
textAlign: "left"
|
|
434
434
|
},
|
|
435
|
-
tabIndex:
|
|
435
|
+
tabIndex: he,
|
|
436
436
|
width: T,
|
|
437
437
|
xOffset: E,
|
|
438
|
-
children: [_.type === "actions" && /* @__PURE__ */
|
|
439
|
-
className:
|
|
440
|
-
sx:
|
|
438
|
+
children: [_.type === "actions" && /* @__PURE__ */ G(j, {
|
|
439
|
+
className: Q.content,
|
|
440
|
+
sx: we,
|
|
441
441
|
children: t`Actions`
|
|
442
|
-
}), _.type !== "actions" && /* @__PURE__ */
|
|
442
|
+
}), _.type !== "actions" && /* @__PURE__ */ K(j, {
|
|
443
443
|
sx: {
|
|
444
|
-
[`&:hover .${
|
|
445
|
-
fe ?
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
444
|
+
[`&:hover .${Q.content}`]: { maxWidth: `calc(100% + 16px - ${(0, nt.default)([
|
|
445
|
+
fe ? R : 0,
|
|
446
|
+
me ? R : 0,
|
|
447
|
+
L ? R : 0,
|
|
448
|
+
R
|
|
449
449
|
])}px)` },
|
|
450
450
|
alignItems: "center",
|
|
451
451
|
display: "inline-flex",
|
|
452
452
|
width: "100%"
|
|
453
453
|
},
|
|
454
454
|
children: [
|
|
455
|
-
_.renderHeader ? /* @__PURE__ */
|
|
455
|
+
_.renderHeader ? /* @__PURE__ */ G(W, { children: _.renderHeader({
|
|
456
456
|
column: _,
|
|
457
457
|
dataContext: a
|
|
458
|
-
}) }) : /* @__PURE__ */
|
|
458
|
+
}) }) : /* @__PURE__ */ G(I, {
|
|
459
459
|
arrow: !0,
|
|
460
460
|
placement: "top",
|
|
461
461
|
title: _.headerTooltipContent,
|
|
462
|
-
children: /* @__PURE__ */
|
|
463
|
-
className:
|
|
464
|
-
onClick:
|
|
462
|
+
children: /* @__PURE__ */ G(j, {
|
|
463
|
+
className: Q.content,
|
|
464
|
+
onClick: te,
|
|
465
465
|
ref: l,
|
|
466
466
|
sx: {
|
|
467
467
|
cursor: "pointer",
|
|
468
468
|
flexGrow: 1,
|
|
469
|
-
maxWidth: `calc(100% + 16px - ${(0,
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
469
|
+
maxWidth: `calc(100% + 16px - ${(0, nt.default)([
|
|
470
|
+
oe ? R : 0,
|
|
471
|
+
ie ? R : 0,
|
|
472
|
+
R
|
|
473
473
|
])}px)`,
|
|
474
474
|
overflow: "hidden",
|
|
475
475
|
textOverflow: "ellipsis",
|
|
@@ -481,57 +481,57 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
481
481
|
}) : _.headerName ?? ""
|
|
482
482
|
})
|
|
483
483
|
}),
|
|
484
|
-
fe && /* @__PURE__ */
|
|
485
|
-
className:
|
|
486
|
-
onClick:
|
|
484
|
+
fe && /* @__PURE__ */ G(lt, {
|
|
485
|
+
className: Q.customHeaderIcon,
|
|
486
|
+
onClick: ae,
|
|
487
487
|
tabIndex: 0,
|
|
488
488
|
title: _.customHeaderIcon?.label,
|
|
489
489
|
children: _.customHeaderIcon?.iconElement
|
|
490
490
|
}),
|
|
491
|
-
|
|
491
|
+
me && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(ut, {
|
|
492
492
|
className: de,
|
|
493
|
-
onClick:
|
|
494
|
-
ref:
|
|
493
|
+
onClick: re,
|
|
494
|
+
ref: g,
|
|
495
495
|
tabIndex: 0,
|
|
496
496
|
title: t("Show filter for {{name}}", { name: _.headerName || t("unknown") }),
|
|
497
|
-
children: /* @__PURE__ */
|
|
498
|
-
}), /* @__PURE__ */
|
|
497
|
+
children: /* @__PURE__ */ G(Ee, { fontSize: "inherit" })
|
|
498
|
+
}), /* @__PURE__ */ G(ce, {
|
|
499
499
|
anchorEl: d,
|
|
500
500
|
anchorOrigin: {
|
|
501
501
|
horizontal: "center",
|
|
502
502
|
vertical: "bottom"
|
|
503
503
|
},
|
|
504
504
|
id: u,
|
|
505
|
-
onClose:
|
|
505
|
+
onClose: F,
|
|
506
506
|
open: !!d,
|
|
507
507
|
sx: { zIndex: n.zIndex.appBar + 1 },
|
|
508
508
|
transformOrigin: {
|
|
509
509
|
horizontal: "center",
|
|
510
510
|
vertical: "top"
|
|
511
511
|
},
|
|
512
|
-
children: /* @__PURE__ */
|
|
512
|
+
children: /* @__PURE__ */ G(se, {
|
|
513
513
|
elevation: 4,
|
|
514
514
|
square: !0,
|
|
515
515
|
sx: { padding: n.spacing(3) },
|
|
516
|
-
children: /* @__PURE__ */
|
|
517
|
-
filter:
|
|
518
|
-
onFilterChange:
|
|
516
|
+
children: /* @__PURE__ */ G(it, {
|
|
517
|
+
filter: P,
|
|
518
|
+
onFilterChange: A
|
|
519
519
|
})
|
|
520
520
|
})
|
|
521
521
|
})] }),
|
|
522
|
-
|
|
522
|
+
L && /* @__PURE__ */ G(W, { children: /* @__PURE__ */ G(ct, {
|
|
523
523
|
className: ue,
|
|
524
524
|
onClick: ne,
|
|
525
525
|
ownerState: le,
|
|
526
526
|
tabIndex: 0,
|
|
527
527
|
title: t("Toggle sorting for {{name}}", { name: _.headerName || t("unknown") }),
|
|
528
|
-
children: /* @__PURE__ */
|
|
528
|
+
children: /* @__PURE__ */ G(Te, { fontSize: "inherit" })
|
|
529
529
|
}) }),
|
|
530
|
-
_.resizable !== !1 && /* @__PURE__ */
|
|
530
|
+
_.resizable !== !1 && /* @__PURE__ */ G(j, {
|
|
531
531
|
"aria-label": t("Resize column {{name}}, use arrow keys to adjust the size.", { name: _.headerName || t("unknown") }),
|
|
532
|
-
className:
|
|
533
|
-
onKeyDown:
|
|
534
|
-
onMouseDown:
|
|
532
|
+
className: Q.columnDivider,
|
|
533
|
+
onKeyDown: N,
|
|
534
|
+
onMouseDown: M,
|
|
535
535
|
role: "separator",
|
|
536
536
|
sx: {
|
|
537
537
|
"&:focus-visible, &:focus, &:focus-within": {
|
|
@@ -557,11 +557,11 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
557
557
|
})]
|
|
558
558
|
}, _.id);
|
|
559
559
|
}, ft = (e) => {
|
|
560
|
-
let t =
|
|
560
|
+
let t = m(), n = p(t, b((e) => e.dataContext)), [r, i] = U(null), { t: a } = q(), o = !!r, s = z((e) => {
|
|
561
561
|
i(e.currentTarget);
|
|
562
|
-
}, []), c =
|
|
562
|
+
}, []), c = z(() => {
|
|
563
563
|
i(null);
|
|
564
|
-
}, []), l =
|
|
564
|
+
}, []), l = V(() => e.column.getActions({
|
|
565
565
|
dataContext: n,
|
|
566
566
|
id: e.column.id,
|
|
567
567
|
row: e.row,
|
|
@@ -571,11 +571,11 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
571
571
|
e.column,
|
|
572
572
|
e.row,
|
|
573
573
|
e.rowIndex
|
|
574
|
-
]), u =
|
|
575
|
-
return /* @__PURE__ */
|
|
574
|
+
]), u = z(() => {}, []);
|
|
575
|
+
return /* @__PURE__ */ G(ot, {
|
|
576
576
|
...e,
|
|
577
577
|
onClick: u,
|
|
578
|
-
children: l.length > 0 && /* @__PURE__ */
|
|
578
|
+
children: l.length > 0 && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(F, {
|
|
579
579
|
"aria-label": a`Row actions`,
|
|
580
580
|
onClick: s,
|
|
581
581
|
sx: {
|
|
@@ -584,8 +584,8 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
584
584
|
top: "50%",
|
|
585
585
|
transform: "translateY(-50%)"
|
|
586
586
|
},
|
|
587
|
-
children: /* @__PURE__ */
|
|
588
|
-
}), /* @__PURE__ */
|
|
587
|
+
children: /* @__PURE__ */ G(Ae, {})
|
|
588
|
+
}), /* @__PURE__ */ G(oe, {
|
|
589
589
|
anchorEl: r,
|
|
590
590
|
id: "basic-menu",
|
|
591
591
|
onClick: c,
|
|
@@ -596,25 +596,25 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
596
596
|
})] })
|
|
597
597
|
}, e.column.id);
|
|
598
598
|
}, pt = ({ children: e }) => {
|
|
599
|
-
let t =
|
|
600
|
-
return /* @__PURE__ */
|
|
601
|
-
...
|
|
599
|
+
let t = V(() => ({ sideEffects: Pe({ styles: { active: { opacity: "0.6" } } }) }), []);
|
|
600
|
+
return /* @__PURE__ */ G(Me, {
|
|
601
|
+
...J.createAttributes("SortableOverlay"),
|
|
602
602
|
dropAnimation: t,
|
|
603
603
|
zIndex: 1e3,
|
|
604
604
|
children: e
|
|
605
605
|
});
|
|
606
|
-
}, mt =
|
|
606
|
+
}, mt = ge({
|
|
607
607
|
attributes: void 0,
|
|
608
608
|
listeners: void 0,
|
|
609
609
|
ref: void 0
|
|
610
610
|
}), ht = (e) => {
|
|
611
611
|
let { children: t, value: n } = e;
|
|
612
|
-
return /* @__PURE__ */
|
|
612
|
+
return /* @__PURE__ */ G(mt, {
|
|
613
613
|
value: n,
|
|
614
614
|
children: t
|
|
615
615
|
});
|
|
616
616
|
}, gt = ({ children: e, id: t, sx: n }) => {
|
|
617
|
-
let r =
|
|
617
|
+
let r = pe(), { attributes: i, isDragging: a, listeners: o, setActivatorNodeRef: s, setNodeRef: c, transform: l, transition: u } = Be({ id: t }), d = V(() => ({
|
|
618
618
|
attributes: i,
|
|
619
619
|
listeners: o,
|
|
620
620
|
ref: s
|
|
@@ -624,13 +624,13 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
624
624
|
s
|
|
625
625
|
]), f = {
|
|
626
626
|
backgroundColor: a ? r.palette.secondary.main : r.palette.background.paper,
|
|
627
|
-
transform:
|
|
627
|
+
transform: Ve.Translate.toString(l),
|
|
628
628
|
transition: u
|
|
629
629
|
};
|
|
630
|
-
return /* @__PURE__ */
|
|
630
|
+
return /* @__PURE__ */ G(ht, {
|
|
631
631
|
value: d,
|
|
632
|
-
children: /* @__PURE__ */
|
|
633
|
-
...
|
|
632
|
+
children: /* @__PURE__ */ G(j, {
|
|
633
|
+
...J.createAttributes("SortableListItem", { id: t }),
|
|
634
634
|
component: "li",
|
|
635
635
|
ref: c,
|
|
636
636
|
style: f,
|
|
@@ -650,9 +650,9 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
650
650
|
})
|
|
651
651
|
});
|
|
652
652
|
}, _t = ({ name: e }) => {
|
|
653
|
-
let t =
|
|
654
|
-
return /* @__PURE__ */
|
|
655
|
-
...
|
|
653
|
+
let t = pe(), { attributes: n, listeners: r, ref: i } = ve(mt);
|
|
654
|
+
return /* @__PURE__ */ G(j, {
|
|
655
|
+
...J.createAttributes("SortableListItemDragHandle"),
|
|
656
656
|
component: "button",
|
|
657
657
|
...n,
|
|
658
658
|
...r,
|
|
@@ -674,20 +674,20 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
674
674
|
outline: "none",
|
|
675
675
|
touchAction: "none"
|
|
676
676
|
},
|
|
677
|
-
children: /* @__PURE__ */
|
|
677
|
+
children: /* @__PURE__ */ G(He, {})
|
|
678
678
|
});
|
|
679
679
|
}, vt = ({ items: e, onChange: t, renderItemContent: n }) => {
|
|
680
|
-
let r =
|
|
680
|
+
let r = pe(), { t: i } = q(), [a, o] = U(null), s = V(() => e.find((e) => e.id === a?.id), [a, e]), c = Ie(Fe(Ne), Fe(Z, { coordinateGetter: ze })), l = z(() => {
|
|
681
681
|
o(null);
|
|
682
|
-
}, []), u =
|
|
682
|
+
}, []), u = z(({ active: n, over: r }) => {
|
|
683
683
|
if (r && n.id !== r?.id) {
|
|
684
684
|
let i = e.findIndex(({ id: e }) => e === n.id), a = e.findIndex(({ id: e }) => e === r.id);
|
|
685
|
-
t(
|
|
685
|
+
t(Re(e, i, a));
|
|
686
686
|
}
|
|
687
687
|
o(null);
|
|
688
|
-
}, [e, t]), d =
|
|
688
|
+
}, [e, t]), d = z(({ active: e }) => {
|
|
689
689
|
o(e);
|
|
690
|
-
}, []), f =
|
|
690
|
+
}, []), f = z((n) => {
|
|
691
691
|
let r = n.target.getAttribute("data-id");
|
|
692
692
|
if (!r) return;
|
|
693
693
|
let i = n.target.checked;
|
|
@@ -695,14 +695,14 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
695
695
|
...e,
|
|
696
696
|
isSelected: i
|
|
697
697
|
} : e));
|
|
698
|
-
}, [t, e]), p =
|
|
698
|
+
}, [t, e]), p = z((e) => /* @__PURE__ */ K(gt, {
|
|
699
699
|
id: e.id,
|
|
700
700
|
sx: {
|
|
701
701
|
"&:hover": { backgroundColor: r.palette.action.hover },
|
|
702
702
|
backgroundColor: r.palette.background.paper
|
|
703
703
|
},
|
|
704
|
-
children: [/* @__PURE__ */
|
|
705
|
-
control: /* @__PURE__ */
|
|
704
|
+
children: [/* @__PURE__ */ G(ie, {
|
|
705
|
+
control: /* @__PURE__ */ G(N, {
|
|
706
706
|
checked: e.isSelected,
|
|
707
707
|
onChange: f,
|
|
708
708
|
size: "small",
|
|
@@ -713,22 +713,22 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
713
713
|
flexGrow: 1,
|
|
714
714
|
paddingLeft: r.spacing(1)
|
|
715
715
|
}
|
|
716
|
-
}), /* @__PURE__ */
|
|
716
|
+
}), /* @__PURE__ */ G(_t, { name: i("Drag handle for {{label}}", { label: e.label }) })]
|
|
717
717
|
}, e.id), [
|
|
718
718
|
f,
|
|
719
719
|
n,
|
|
720
720
|
i,
|
|
721
721
|
r
|
|
722
722
|
]);
|
|
723
|
-
return /* @__PURE__ */
|
|
723
|
+
return /* @__PURE__ */ K(X, {
|
|
724
724
|
onDragCancel: l,
|
|
725
725
|
onDragEnd: u,
|
|
726
726
|
onDragStart: d,
|
|
727
727
|
sensors: c,
|
|
728
|
-
children: [/* @__PURE__ */
|
|
728
|
+
children: [/* @__PURE__ */ G(Le, {
|
|
729
729
|
items: e,
|
|
730
|
-
children: /* @__PURE__ */
|
|
731
|
-
...
|
|
730
|
+
children: /* @__PURE__ */ G(ae, { children: /* @__PURE__ */ G(j, {
|
|
731
|
+
...J.createAttributes("SortableList"),
|
|
732
732
|
component: "ul",
|
|
733
733
|
sx: {
|
|
734
734
|
display: "flex",
|
|
@@ -739,35 +739,35 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
739
739
|
},
|
|
740
740
|
children: e.map((e) => p(e))
|
|
741
741
|
}) })
|
|
742
|
-
}), /* @__PURE__ */
|
|
742
|
+
}), /* @__PURE__ */ G(pt, { children: s ? p(s) : null })]
|
|
743
743
|
});
|
|
744
|
-
}, yt =
|
|
745
|
-
let { t: i } =
|
|
744
|
+
}, yt = je(({ onActionsChange: e, onClose: t, onTitleChange: n, openProps: { hasCellData: r } }) => {
|
|
745
|
+
let { t: i } = q(), [a, o] = U([]), s = m(), c = p(s, b((e) => e.emitEvent)), l = p(s, b((e) => e.dataContext)), d = p(s, b((e) => e.getCurrentColumnVisualSettings())), f = p(s, b((e) => e.columns)), h = p(s, b((e) => e.sortedData)), g = V(() => {
|
|
746
746
|
let e = /* @__PURE__ */ new Map();
|
|
747
747
|
return f.forEach((t) => {
|
|
748
748
|
e.set(t.id, t);
|
|
749
749
|
}), e;
|
|
750
|
-
}, [f]), _ =
|
|
750
|
+
}, [f]), _ = z((e) => {
|
|
751
751
|
let t = [];
|
|
752
752
|
e.forEach((e) => {
|
|
753
|
-
let n =
|
|
753
|
+
let n = g.get(e.id);
|
|
754
754
|
n && !n.frozen && t.push({
|
|
755
755
|
id: n.id,
|
|
756
756
|
isSelected: e.isVisible,
|
|
757
757
|
label: n.headerName
|
|
758
758
|
});
|
|
759
759
|
}), o(t);
|
|
760
|
-
}, [
|
|
761
|
-
|
|
760
|
+
}, [g]);
|
|
761
|
+
B(() => {
|
|
762
762
|
_(d);
|
|
763
763
|
}, [d, _]);
|
|
764
|
-
let v =
|
|
764
|
+
let v = z(() => {
|
|
765
765
|
_(u.createInitialVisualColumnSettings(f));
|
|
766
766
|
}, [f, _]);
|
|
767
|
-
|
|
767
|
+
B(() => {
|
|
768
768
|
n(i`Change column order and visibility`);
|
|
769
769
|
}, [n, i]);
|
|
770
|
-
let y =
|
|
770
|
+
let y = z(() => {
|
|
771
771
|
c("columnVisibilityChange", [...f.filter((e) => e.frozen).map((e) => e.id), ...a.filter((e) => e.isSelected).map((e) => e.id.toString())]);
|
|
772
772
|
let e = f.findIndex((e) => !e.frozen), n = f.slice(0, e), r = f.slice(e + a.length);
|
|
773
773
|
c("columnOrderChange", [
|
|
@@ -780,11 +780,11 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
780
780
|
c,
|
|
781
781
|
a,
|
|
782
782
|
t
|
|
783
|
-
]), x =
|
|
783
|
+
]), x = z((e) => {
|
|
784
784
|
let t = u.getColumnIdsWithData({
|
|
785
785
|
dataContext: l,
|
|
786
786
|
hasCellData: r,
|
|
787
|
-
sortedData:
|
|
787
|
+
sortedData: h,
|
|
788
788
|
tableColumns: f,
|
|
789
789
|
visibleColumnIds: a.filter(e).map((e) => e.id.toString())
|
|
790
790
|
});
|
|
@@ -796,27 +796,27 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
796
796
|
l,
|
|
797
797
|
r,
|
|
798
798
|
a,
|
|
799
|
-
|
|
799
|
+
h,
|
|
800
800
|
f
|
|
801
|
-
]), S =
|
|
801
|
+
]), S = z(() => {
|
|
802
802
|
x(() => !0);
|
|
803
|
-
}, [x]), C =
|
|
803
|
+
}, [x]), C = z(() => {
|
|
804
804
|
x((e) => e.isSelected);
|
|
805
|
-
}, [x]), w =
|
|
805
|
+
}, [x]), w = z(() => {
|
|
806
806
|
o((e) => e.map((e) => ({
|
|
807
807
|
...e,
|
|
808
808
|
isSelected: !0
|
|
809
809
|
})));
|
|
810
|
-
}, []), T =
|
|
810
|
+
}, []), T = z(() => {
|
|
811
811
|
o((e) => e.map((e) => ({
|
|
812
812
|
...e,
|
|
813
813
|
isSelected: !1
|
|
814
814
|
})));
|
|
815
815
|
}, []);
|
|
816
|
-
|
|
816
|
+
B(() => {
|
|
817
817
|
e([
|
|
818
818
|
{
|
|
819
|
-
...
|
|
819
|
+
...J.createAttributes("TableColumnOrderDialog-enable-all"),
|
|
820
820
|
autoFocus: !0,
|
|
821
821
|
color: "secondary",
|
|
822
822
|
label: i`Enable all`,
|
|
@@ -824,7 +824,7 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
824
824
|
variant: "outlined"
|
|
825
825
|
},
|
|
826
826
|
{
|
|
827
|
-
...
|
|
827
|
+
...J.createAttributes("TableColumnOrderDialog-enable-all-with-data"),
|
|
828
828
|
autoFocus: !0,
|
|
829
829
|
color: "secondary",
|
|
830
830
|
label: i`Enable all with data`,
|
|
@@ -832,7 +832,7 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
832
832
|
variant: "outlined"
|
|
833
833
|
},
|
|
834
834
|
{
|
|
835
|
-
...
|
|
835
|
+
...J.createAttributes("TableColumnOrderDialog-disable-all"),
|
|
836
836
|
autoFocus: !0,
|
|
837
837
|
color: "secondary",
|
|
838
838
|
label: i`Disable all`,
|
|
@@ -840,7 +840,7 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
840
840
|
variant: "outlined"
|
|
841
841
|
},
|
|
842
842
|
{
|
|
843
|
-
...
|
|
843
|
+
...J.createAttributes("TableColumnOrderDialog-disable-all-without-data"),
|
|
844
844
|
autoFocus: !0,
|
|
845
845
|
color: "secondary",
|
|
846
846
|
label: i`Disable all without data`,
|
|
@@ -848,7 +848,7 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
848
848
|
variant: "outlined"
|
|
849
849
|
},
|
|
850
850
|
{
|
|
851
|
-
...
|
|
851
|
+
...J.createAttributes("TableColumnOrderDialog-reset"),
|
|
852
852
|
autoFocus: !0,
|
|
853
853
|
color: "secondary",
|
|
854
854
|
label: i`Reset to default`,
|
|
@@ -856,7 +856,7 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
856
856
|
variant: "outlined"
|
|
857
857
|
},
|
|
858
858
|
{
|
|
859
|
-
...
|
|
859
|
+
...J.createAttributes("TableColumnOrderDialog-close"),
|
|
860
860
|
autoFocus: !0,
|
|
861
861
|
color: "primary",
|
|
862
862
|
label: i`Close`,
|
|
@@ -864,7 +864,7 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
864
864
|
variant: "outlined"
|
|
865
865
|
},
|
|
866
866
|
{
|
|
867
|
-
...
|
|
867
|
+
...J.createAttributes("TableColumnOrderDialog-save"),
|
|
868
868
|
autoFocus: !0,
|
|
869
869
|
color: "secondary",
|
|
870
870
|
label: i`Apply`,
|
|
@@ -883,12 +883,12 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
883
883
|
i,
|
|
884
884
|
C
|
|
885
885
|
]);
|
|
886
|
-
let E =
|
|
886
|
+
let E = z((e) => {
|
|
887
887
|
o(e);
|
|
888
|
-
}, []), D =
|
|
889
|
-
return /* @__PURE__ */
|
|
888
|
+
}, []), D = z((e) => e.label, []);
|
|
889
|
+
return /* @__PURE__ */ G(j, {
|
|
890
890
|
sx: {},
|
|
891
|
-
children: /* @__PURE__ */
|
|
891
|
+
children: /* @__PURE__ */ G(vt, {
|
|
892
892
|
items: a,
|
|
893
893
|
onChange: E,
|
|
894
894
|
renderItemContent: D
|
|
@@ -902,13 +902,13 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
902
902
|
noCloseButton: !1,
|
|
903
903
|
testId: "TableColumnOrderDialog"
|
|
904
904
|
}), bt = ({ cell: e, onCheckBoxClick: t, tableColumn: n }) => {
|
|
905
|
-
let { t: r } =
|
|
905
|
+
let { t: r } = q(), i = m(), a = p(i, b((e) => e.idSelectorCallback)), o = p(i, b((e) => e.selectedIds)), s = p(i, b((e) => e.setSelectedIds)), c = a(e.row), l = z((e) => {
|
|
906
906
|
e.stopPropagation(), e.shiftKey && e.preventDefault(), t(e, c);
|
|
907
|
-
}, [t, c]), u =
|
|
907
|
+
}, [t, c]), u = z((e, t) => {
|
|
908
908
|
let n = e.target.getAttribute("name");
|
|
909
909
|
t && !o.includes(n) ? s([...o, n]) : t || s(o.filter((e) => e !== n));
|
|
910
910
|
}, [o, s]);
|
|
911
|
-
return /* @__PURE__ */
|
|
911
|
+
return /* @__PURE__ */ G(N, {
|
|
912
912
|
checked: o.includes(c),
|
|
913
913
|
disabled: n.isDisabled ? n.isDisabled(e) : !1,
|
|
914
914
|
name: a(e.row),
|
|
@@ -920,13 +920,13 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
920
920
|
padding: 0
|
|
921
921
|
}
|
|
922
922
|
});
|
|
923
|
-
}, xt = /* @__PURE__ */ e(
|
|
924
|
-
let { t } =
|
|
923
|
+
}, xt = /* @__PURE__ */ e(y(), 1), St = ({ tableColumnParams: e }) => {
|
|
924
|
+
let { t } = q(), n = e.column, r = m(), i = p(r, b((e) => e.dataContext)), a = p(r, b((e) => e.idSelectorCallback)), o = p(r, b((e) => e.selectedIds)), s = p(r, b((e) => e.sortedData)), c = p(r, b((e) => e.setSelectedIds)), l = n.isDisabled ? s.filter((e) => n.isDisabled({
|
|
925
925
|
dataContext: i,
|
|
926
926
|
id: a(e),
|
|
927
927
|
row: e,
|
|
928
928
|
rowIndex: s.indexOf(e)
|
|
929
|
-
}) === !1) : s, u = l.every((e) => o.includes(a(e))), d = l.some((e) => o.includes(a(e))), f =
|
|
929
|
+
}) === !1) : s, u = l.every((e) => o.includes(a(e))), d = l.some((e) => o.includes(a(e))), f = z((e) => {
|
|
930
930
|
let t = l.map((e) => a(e));
|
|
931
931
|
c(u ? o.filter((e) => !t.includes(e)) : (0, xt.default)([...o, ...t]));
|
|
932
932
|
}, [
|
|
@@ -936,9 +936,9 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
936
936
|
o,
|
|
937
937
|
c
|
|
938
938
|
]);
|
|
939
|
-
return /* @__PURE__ */
|
|
939
|
+
return /* @__PURE__ */ G(N, {
|
|
940
940
|
checked: d,
|
|
941
|
-
checkedIcon: u ? void 0 : /* @__PURE__ */
|
|
941
|
+
checkedIcon: u ? void 0 : /* @__PURE__ */ G(Ue, {}),
|
|
942
942
|
name: "select-all",
|
|
943
943
|
onChange: f,
|
|
944
944
|
slotProps: { input: { "aria-label": t`Select all` } },
|
|
@@ -948,10 +948,10 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
948
948
|
}
|
|
949
949
|
});
|
|
950
950
|
}, Ct = ({ cell: e, getRowName: t, onReadableIndexClick: n, tableColumn: r }) => {
|
|
951
|
-
let i =
|
|
951
|
+
let i = _(), a = z((r) => {
|
|
952
952
|
if (n) {
|
|
953
953
|
if (!t) throw Error("getRowName is required when onReadableIndexClick is provided");
|
|
954
|
-
i.enablePageEvents &&
|
|
954
|
+
i.enablePageEvents && ne.resolve(h).emit("click", {
|
|
955
955
|
label: t(e.row),
|
|
956
956
|
type: "table-row-index"
|
|
957
957
|
}), r.preventDefault(), r.stopPropagation(), n(e.row);
|
|
@@ -962,7 +962,7 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
962
962
|
n,
|
|
963
963
|
e.row
|
|
964
964
|
]);
|
|
965
|
-
return n ? /* @__PURE__ */
|
|
965
|
+
return n ? /* @__PURE__ */ G(M, {
|
|
966
966
|
"aria-label": r.getAriaLabel(e),
|
|
967
967
|
color: "primary",
|
|
968
968
|
onClick: a,
|
|
@@ -976,15 +976,15 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
976
976
|
variant: "text",
|
|
977
977
|
children: e.rowIndex + 1
|
|
978
978
|
}) : e.rowIndex + 1;
|
|
979
|
-
}, wt = ({ font: e, forceHorizontalOverflow: t, getRowName: n, headerHeight: r = 4, initialVisibleItemIndex: i, onRangeChanged: a = Ze.default, onReadableIndexClick: o, onRowClick: s, onRowMouseEnter: c = Ze.default, onRowMouseLeave: l = Ze.default, onVerticalScrollPositionChange: d, onVisibleItemIndexChange: f, overscanMain:
|
|
980
|
-
let w =
|
|
981
|
-
|
|
982
|
-
let te =
|
|
983
|
-
|
|
984
|
-
let
|
|
979
|
+
}, wt = ({ font: e, forceHorizontalOverflow: t, getRowName: n, headerHeight: r = 4, initialVisibleItemIndex: i, onRangeChanged: a = Ze.default, onReadableIndexClick: o, onRowClick: s, onRowMouseEnter: c = Ze.default, onRowMouseLeave: l = Ze.default, onVerticalScrollPositionChange: d, onVisibleItemIndexChange: f, overscanMain: g, overscanReverse: v, ref: y, rowHeight: x = 4, rowHighlightingSubject: S, sx: C }) => {
|
|
980
|
+
let w = pe(), { t: T } = q(), E = _(), D = ne.resolve(re), O = m(), { DEFAULT_OVERSCAN_MAIN: k, DEFAULT_OVERSCAN_REVERSE: ee } = E.table;
|
|
981
|
+
p(O, b((e) => e.getCurrentColumnVisualSettings().filter((e) => e.isVisible).map((e) => e.id)));
|
|
982
|
+
let te = p(O, b((e) => e.setCurrentColumnVisualSettings)), A = p(O, b((e) => e.sortedData)), M = p(O, b((e) => e.idSelectorCallback)), N = p(O, b((e) => e.columns)), P = p(O, b((e) => e.isInitialized)), ie = p(O, b((e) => e.isRowEnabledCallback)), ae = p(O, b((e) => e.addEventListener)), F = p(O, b((e) => e.dataContext)), oe = p(O, b((e) => e.isCondensed)), se = p(O, b((e) => e.setSelectedIds)), ce = p(O, b((e) => e.columnDimensions)), I = H(null), le = H(Ze.default), [L, me] = U(!1), he = V(() => fe(ue(w.palette.divider, 1), .1), [w.palette.divider]), ge = V(() => de(ue(w.palette.divider, 1), .15), [w.palette.divider]), ve = Ce(), ye = H(null), we = H(0), Te = H(null), Ee = H(/* @__PURE__ */ new Set()), De = H(!1), Oe = H(null), [Y, ke] = U(), Ae = H(null), je = H(null), X = H(null);
|
|
983
|
+
p(O, (e) => JSON.stringify(e.filters.map((e) => e.filterValue))), p(O, b((e) => e.sortByField)), p(O, b((e) => e.sortDirection));
|
|
984
|
+
let Me = z((e, t) => {
|
|
985
985
|
if (s) {
|
|
986
986
|
if (!n) throw Error("getRowName is required when onRowClick is provided");
|
|
987
|
-
E.enablePageEvents &&
|
|
987
|
+
E.enablePageEvents && ne.resolve(h).emit("click", {
|
|
988
988
|
label: n(e.row),
|
|
989
989
|
type: "table-row"
|
|
990
990
|
}), t.preventDefault(), t.stopPropagation(), s(e);
|
|
@@ -993,125 +993,129 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
993
993
|
E.enablePageEvents,
|
|
994
994
|
n,
|
|
995
995
|
s
|
|
996
|
-
]),
|
|
997
|
-
if (!
|
|
998
|
-
let e = (0,
|
|
999
|
-
|
|
1000
|
-
}, [
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
}, [
|
|
1004
|
-
let
|
|
996
|
+
]), Z = z(() => I?.current?.filter((e) => e.isVisible) ?? [], []), Ne = z(() => {
|
|
997
|
+
if (!I?.current?.length || !Y) return;
|
|
998
|
+
let e = (0, Je.default)(Z(), (e) => e.calculatedWidth), t = Y.querySelector("[role=table]");
|
|
999
|
+
we.current = e, t && (t.style.width = `${e}px`);
|
|
1000
|
+
}, [Z, Y]);
|
|
1001
|
+
xe(() => {
|
|
1002
|
+
Ne();
|
|
1003
|
+
}, [Ne]);
|
|
1004
|
+
let Pe = z((e, t) => /* @__PURE__ */ G(Ct, {
|
|
1005
1005
|
cell: t,
|
|
1006
1006
|
getRowName: n,
|
|
1007
1007
|
onReadableIndexClick: o,
|
|
1008
1008
|
tableColumn: e
|
|
1009
|
-
}, t.id), [n, o]),
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
}, [
|
|
1013
|
-
let
|
|
1014
|
-
if (!e.shiftKey || !
|
|
1015
|
-
|
|
1009
|
+
}, t.id), [n, o]), Fe = z((e) => /* @__PURE__ */ G(St, { tableColumnParams: e }), []);
|
|
1010
|
+
B(() => {
|
|
1011
|
+
je.current = null;
|
|
1012
|
+
}, [A]);
|
|
1013
|
+
let Ie = z((e, t) => {
|
|
1014
|
+
if (!e.shiftKey || !je.current) {
|
|
1015
|
+
je.current = t;
|
|
1016
1016
|
return;
|
|
1017
1017
|
}
|
|
1018
|
-
let n =
|
|
1018
|
+
let n = A.findIndex((e) => M(e) === je.current), r = A.findIndex((e) => M(e) === t);
|
|
1019
1019
|
if (n === -1 || r === -1) return;
|
|
1020
|
-
let [i, a] = n < r ? [n, r] : [r, n], o =
|
|
1021
|
-
|
|
1020
|
+
let [i, a] = n < r ? [n, r] : [r, n], o = A.slice(i, a + 1).map((e) => M(e)), s = O.getState().selectedIds, c = O.getState().selectedIds.includes(t) ? s.filter((e) => !o.includes(e)) : Array.from(/* @__PURE__ */ new Set([...s, ...o]));
|
|
1021
|
+
se(c), je.current = t;
|
|
1022
1022
|
}, [
|
|
1023
|
+
M,
|
|
1024
|
+
se,
|
|
1023
1025
|
A,
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
let n = A(t.row);
|
|
1029
|
-
return /* @__PURE__ */ z(bt, {
|
|
1026
|
+
O
|
|
1027
|
+
]), Le = z((e, t) => {
|
|
1028
|
+
let n = M(t.row);
|
|
1029
|
+
return /* @__PURE__ */ G(bt, {
|
|
1030
1030
|
cell: t,
|
|
1031
|
-
onCheckBoxClick:
|
|
1031
|
+
onCheckBoxClick: Ie,
|
|
1032
1032
|
tableColumn: e
|
|
1033
1033
|
}, n);
|
|
1034
|
-
}, [
|
|
1035
|
-
if (!
|
|
1036
|
-
let e = u.updateColumnSizesInVisualSettings(
|
|
1037
|
-
|
|
1034
|
+
}, [M, Ie]), Re = z(() => {
|
|
1035
|
+
if (!N.length || !Y) return;
|
|
1036
|
+
let e = u.updateColumnSizesInVisualSettings(Y, ve, A, N, I.current);
|
|
1037
|
+
L && (Y.querySelectorAll("[data-column-index]").forEach((t) => {
|
|
1038
1038
|
let n = t.getAttribute("data-id");
|
|
1039
1039
|
t.style.width = `${e.get(n).calculatedWidth}px`;
|
|
1040
|
-
}),
|
|
1040
|
+
}), Ne());
|
|
1041
1041
|
}, [
|
|
1042
|
-
|
|
1042
|
+
L,
|
|
1043
1043
|
ve,
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1044
|
+
A,
|
|
1045
|
+
N,
|
|
1046
|
+
Y,
|
|
1047
|
+
Ne
|
|
1048
1048
|
]);
|
|
1049
|
-
|
|
1050
|
-
|
|
1049
|
+
B(() => {
|
|
1050
|
+
Y && !L && P && (I.current = O.getState().getCurrentColumnVisualSettings(), Re(), Ne(), me(!0));
|
|
1051
1051
|
}, [
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1052
|
+
L,
|
|
1053
|
+
P,
|
|
1054
|
+
Y,
|
|
1055
|
+
O,
|
|
1056
|
+
Re,
|
|
1057
|
+
Ne
|
|
1058
1058
|
]);
|
|
1059
|
-
let ze =
|
|
1060
|
-
te(
|
|
1061
|
-
}, [te]), Ve =
|
|
1059
|
+
let ze = z(() => Y?.querySelector("[data-virtuoso-scroller=true]"), [Y]), Be = z(() => {
|
|
1060
|
+
te(I.current);
|
|
1061
|
+
}, [te]), Ve = Qe(() => {
|
|
1062
1062
|
Be();
|
|
1063
|
-
}, 500, { trailing: !0 }), He =
|
|
1064
|
-
e.calculatedWidth = t, e.widthPx = t, e.hasResized = !0,
|
|
1065
|
-
}, [
|
|
1063
|
+
}, 500, { trailing: !0 }), He = z((e, t) => {
|
|
1064
|
+
e.calculatedWidth = t, e.widthPx = t, e.hasResized = !0, Re(), Ve();
|
|
1065
|
+
}, [Re, Ve]), Ue = z((e, t) => {
|
|
1066
1066
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
1067
1067
|
e.preventDefault();
|
|
1068
|
-
let n =
|
|
1068
|
+
let n = I.current.find((e) => e.id === t.id), r = n.calculatedWidth, i = e.key === "ArrowLeft" ? Math.max(50, r - 10) : r + 10;
|
|
1069
1069
|
He(n, i);
|
|
1070
|
-
}, [He]), We =
|
|
1070
|
+
}, [He]), We = z((e, t) => {
|
|
1071
1071
|
e.preventDefault();
|
|
1072
|
-
let n =
|
|
1072
|
+
let n = I.current.find((e) => e.id === t.id), r = e.clientX, i = n?.calculatedWidth, a = (e) => {
|
|
1073
1073
|
let t = e.clientX;
|
|
1074
1074
|
if (r === t) return;
|
|
1075
1075
|
let a = t - r, o = Math.max(50, i + a);
|
|
1076
1076
|
i !== o && He(n, o);
|
|
1077
1077
|
}, o = (e) => {
|
|
1078
|
-
|
|
1078
|
+
le.current(), le.current = Ze.default;
|
|
1079
1079
|
};
|
|
1080
|
-
document.addEventListener("mousemove", a), document.addEventListener("mouseup", o),
|
|
1080
|
+
document.addEventListener("mousemove", a), document.addEventListener("mouseup", o), le.current = () => {
|
|
1081
1081
|
document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", o);
|
|
1082
1082
|
};
|
|
1083
1083
|
}, [He]);
|
|
1084
|
-
|
|
1085
|
-
|
|
1084
|
+
B(() => () => {
|
|
1085
|
+
le.current();
|
|
1086
1086
|
}, []);
|
|
1087
|
-
let Ge =
|
|
1088
|
-
|
|
1087
|
+
let Ge = z((e, t) => u.handleMoveColumn(ce, I.current, N, e, t), [ce, N]), Ke = z(() => {
|
|
1088
|
+
Y.querySelectorAll("[data-column-index]").forEach((e) => {
|
|
1089
1089
|
let t = e.getAttribute("data-id");
|
|
1090
|
-
e.style.order =
|
|
1090
|
+
e.style.order = I.current.findIndex((e) => e.id === t).toString();
|
|
1091
1091
|
});
|
|
1092
|
-
}, [
|
|
1093
|
-
|
|
1092
|
+
}, [Y]);
|
|
1093
|
+
B(() => {
|
|
1094
1094
|
let e = () => {
|
|
1095
|
-
|
|
1096
|
-
}
|
|
1097
|
-
return
|
|
1098
|
-
|
|
1095
|
+
Re(), Ke();
|
|
1096
|
+
};
|
|
1097
|
+
return D.window.addEventListener("resize", e), () => {
|
|
1098
|
+
D.window.removeEventListener("resize", e);
|
|
1099
1099
|
};
|
|
1100
|
-
}, [
|
|
1101
|
-
|
|
1102
|
-
|
|
1100
|
+
}, [
|
|
1101
|
+
Ke,
|
|
1102
|
+
Re,
|
|
1103
|
+
D.window
|
|
1104
|
+
]);
|
|
1105
|
+
let qe = z((e) => {
|
|
1106
|
+
let t = Z();
|
|
1103
1107
|
return {
|
|
1104
1108
|
elementIndex: t.findIndex((t) => t.id === e.id),
|
|
1105
1109
|
visibleTableSettingsColumns: t,
|
|
1106
1110
|
widths: t.map((e) => e.calculatedWidth)
|
|
1107
1111
|
};
|
|
1108
|
-
}, [
|
|
1112
|
+
}, [Z]), et = z((e, t) => {
|
|
1109
1113
|
let n = qe(t);
|
|
1110
|
-
if (e.type === "start" && (
|
|
1114
|
+
if (e.type === "start" && (D.body.style.setProperty("overflow", "hidden"), Y?.style.setProperty("--selection-background", "none"), e.target.style.setProperty("opacity", "0.3"), X.current = {
|
|
1111
1115
|
clonedElement: e.target.cloneNode(!0),
|
|
1112
1116
|
elementOffsetX: n.widths.slice(0, n.elementIndex).reduce((e, t) => e + t, 0) - 15,
|
|
1113
1117
|
scrollPosition: ze().scrollLeft
|
|
1114
|
-
},
|
|
1118
|
+
}, X.current.clonedElement.style.cssText = `
|
|
1115
1119
|
font-weight: bold;
|
|
1116
1120
|
position: absolute;
|
|
1117
1121
|
top: ${e.target.getBoundingClientRect().top}px;
|
|
@@ -1120,44 +1124,46 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1120
1124
|
pointer-events: none;
|
|
1121
1125
|
filter: blur(0.5px);
|
|
1122
1126
|
box-shadow: 1px 2px 3px 0px rgba(0,0,0,0.5);
|
|
1123
|
-
`,
|
|
1124
|
-
|
|
1125
|
-
let r =
|
|
1127
|
+
`, D.body.appendChild(X.current.clonedElement)), e.type === "end" && (D.body.style.removeProperty("overflow"), Y?.style.setProperty("--selection-background", "highlight"), D.document.getSelection().empty(), X.current.clonedElement.remove(), e.target.style.setProperty("opacity", "1")), e.type === "move") {
|
|
1128
|
+
X.current.clonedElement.style.setProperty("left", `${e.clientX - e.elementOffsetX}px`), X.current.clonedElement.style.setProperty("top", `${e.clientY}px`);
|
|
1129
|
+
let r = X.current.elementOffsetX + e.deltaX + e.elementOffsetX + (ze().scrollLeft - X.current.scrollPosition), i = n.widths.slice(0, n.elementIndex - 1).reduce((e, t) => e + t, 0) + Math.min(16, n.widths?.[n.elementIndex - 1] ?? Infinity), a = n.widths.slice(0, n.elementIndex + 1).reduce((e, t) => e + t, 0) + Math.min(16, n.widths?.[n.elementIndex + 1] ?? Infinity);
|
|
1126
1130
|
(r < i && Ge(t, -1) || r > a && Ge(t, 1)) && (Ke(), qe(t));
|
|
1127
1131
|
}
|
|
1128
1132
|
}, [
|
|
1129
1133
|
qe,
|
|
1130
1134
|
ze,
|
|
1131
1135
|
Ge,
|
|
1132
|
-
|
|
1136
|
+
Y?.style,
|
|
1133
1137
|
w.zIndex.modal,
|
|
1134
|
-
Ke
|
|
1135
|
-
|
|
1138
|
+
Ke,
|
|
1139
|
+
D.body,
|
|
1140
|
+
D.document
|
|
1141
|
+
]), tt = z(() => /* @__PURE__ */ G(j, {
|
|
1136
1142
|
"aria-rowindex": 1,
|
|
1137
1143
|
role: "row",
|
|
1138
1144
|
sx: {
|
|
1139
|
-
[`&:hover .${
|
|
1145
|
+
[`&:hover .${Q.columnDivider}`]: { opacity: 1 },
|
|
1140
1146
|
background: w.palette.background.paper,
|
|
1141
|
-
borderBottom: `1px solid ${
|
|
1147
|
+
borderBottom: `1px solid ${ge}`,
|
|
1142
1148
|
display: "flex",
|
|
1143
1149
|
fontWeight: "bold",
|
|
1144
1150
|
height: w.spacing(r),
|
|
1145
1151
|
zIndex: 3
|
|
1146
1152
|
},
|
|
1147
|
-
children:
|
|
1148
|
-
let n =
|
|
1149
|
-
return n ? /* @__PURE__ */
|
|
1153
|
+
children: Z().map((e, t) => {
|
|
1154
|
+
let n = N.find((t) => t.id === e.id);
|
|
1155
|
+
return n ? /* @__PURE__ */ G(dt, {
|
|
1150
1156
|
column: n.type === "selectable" ? {
|
|
1151
1157
|
...n,
|
|
1152
|
-
renderHeaderContent:
|
|
1158
|
+
renderHeaderContent: Fe
|
|
1153
1159
|
} : n,
|
|
1154
1160
|
columnIndex: t,
|
|
1155
|
-
dividerColor:
|
|
1161
|
+
dividerColor: ge,
|
|
1156
1162
|
height: w.spacing(r),
|
|
1157
1163
|
onColumnDividerKeyDown: Ue,
|
|
1158
1164
|
onColumnDividerMouseDown: We,
|
|
1159
|
-
onCustomDrag:
|
|
1160
|
-
order:
|
|
1165
|
+
onCustomDrag: et,
|
|
1166
|
+
order: I.current.findIndex((t) => t.id === e.id),
|
|
1161
1167
|
role: "columnheader",
|
|
1162
1168
|
width: e.calculatedWidth,
|
|
1163
1169
|
xOffset: e.offsetX
|
|
@@ -1166,31 +1172,31 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1166
1172
|
}), [
|
|
1167
1173
|
w,
|
|
1168
1174
|
r,
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1175
|
+
ge,
|
|
1176
|
+
Z,
|
|
1177
|
+
N,
|
|
1178
|
+
Fe,
|
|
1173
1179
|
We,
|
|
1174
1180
|
Ue,
|
|
1175
|
-
|
|
1176
|
-
]), nt =
|
|
1177
|
-
let i =
|
|
1181
|
+
et
|
|
1182
|
+
]), nt = z((e, t) => /* @__PURE__ */ G(W, { children: Z().map((n, r) => {
|
|
1183
|
+
let i = N.find((e) => e.id === n.id), a;
|
|
1178
1184
|
if (i.cellTitleGetter) a = i.cellTitleGetter({
|
|
1179
1185
|
column: i,
|
|
1180
|
-
dataContext:
|
|
1186
|
+
dataContext: F,
|
|
1181
1187
|
id: n.id,
|
|
1182
1188
|
row: t,
|
|
1183
1189
|
rowIndex: e
|
|
1184
1190
|
});
|
|
1185
1191
|
else if (i.type === "text") a = u.getTableTextCellValue({
|
|
1186
1192
|
column: i,
|
|
1187
|
-
dataContext:
|
|
1193
|
+
dataContext: F,
|
|
1188
1194
|
row: t,
|
|
1189
1195
|
rowIndex: e
|
|
1190
1196
|
});
|
|
1191
1197
|
else if (i.type === "boolean") a = u.getTableBooleanCellDisplayValue({
|
|
1192
1198
|
column: i,
|
|
1193
|
-
dataContext:
|
|
1199
|
+
dataContext: F,
|
|
1194
1200
|
row: t,
|
|
1195
1201
|
rowIndex: e,
|
|
1196
1202
|
t: T
|
|
@@ -1198,35 +1204,35 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1198
1204
|
else if (i.type === "number") {
|
|
1199
1205
|
let n = u.getTableNumberCellValue({
|
|
1200
1206
|
column: i,
|
|
1201
|
-
dataContext:
|
|
1207
|
+
dataContext: F,
|
|
1202
1208
|
row: t,
|
|
1203
1209
|
rowIndex: e
|
|
1204
1210
|
});
|
|
1205
|
-
a = (0,
|
|
1211
|
+
a = (0, Ye.default)(n) ? n.toString() : "";
|
|
1206
1212
|
} else i.type === "date" ? a = u.getTableDateCellValue({
|
|
1207
1213
|
column: i,
|
|
1208
|
-
dataContext:
|
|
1214
|
+
dataContext: F,
|
|
1209
1215
|
row: t,
|
|
1210
1216
|
rowIndex: e
|
|
1211
1217
|
}) : i.type === "options" && (a = u.getTableOptionsCellDisplayValue({
|
|
1212
1218
|
column: i,
|
|
1213
|
-
dataContext:
|
|
1219
|
+
dataContext: F,
|
|
1214
1220
|
row: t,
|
|
1215
1221
|
rowIndex: e
|
|
1216
1222
|
}));
|
|
1217
1223
|
let o = {
|
|
1218
|
-
backgroundColor:
|
|
1224
|
+
backgroundColor: oe && i.cellColorGetter ? i.cellColorGetter({
|
|
1219
1225
|
column: i,
|
|
1220
|
-
dataContext:
|
|
1226
|
+
dataContext: F,
|
|
1221
1227
|
id: n.id,
|
|
1222
1228
|
row: t,
|
|
1223
1229
|
rowIndex: e
|
|
1224
1230
|
}) : void 0,
|
|
1225
1231
|
columnIndex: r,
|
|
1226
|
-
enabled: !
|
|
1232
|
+
enabled: !ie || ie(t, F),
|
|
1227
1233
|
height: w.spacing(x),
|
|
1228
|
-
onClick:
|
|
1229
|
-
order:
|
|
1234
|
+
onClick: Me,
|
|
1235
|
+
order: I.current.findIndex((e) => e.id === n.id),
|
|
1230
1236
|
row: t,
|
|
1231
1237
|
rowIndex: e,
|
|
1232
1238
|
sx: i.sx,
|
|
@@ -1234,66 +1240,66 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1234
1240
|
width: n.calculatedWidth,
|
|
1235
1241
|
xOffset: n.offsetX
|
|
1236
1242
|
};
|
|
1237
|
-
return i.type === "actions" ? /* @__PURE__ */
|
|
1243
|
+
return i.type === "actions" ? /* @__PURE__ */ G(ft, {
|
|
1238
1244
|
...o,
|
|
1239
1245
|
column: i
|
|
1240
|
-
}, n.id) : /* @__PURE__ */
|
|
1246
|
+
}, n.id) : /* @__PURE__ */ K(ot, {
|
|
1241
1247
|
...o,
|
|
1242
1248
|
column: i,
|
|
1243
1249
|
children: [
|
|
1244
|
-
!!i.renderCell && /* @__PURE__ */
|
|
1250
|
+
!!i.renderCell && /* @__PURE__ */ G(R, { children: i.renderCell({
|
|
1245
1251
|
column: i,
|
|
1246
|
-
dataContext:
|
|
1252
|
+
dataContext: F,
|
|
1247
1253
|
id: n.id,
|
|
1248
1254
|
row: t,
|
|
1249
1255
|
rowIndex: e
|
|
1250
1256
|
}) }, i.id),
|
|
1251
|
-
!i.renderCell && !!i.displayValueGetter && /* @__PURE__ */
|
|
1257
|
+
!i.renderCell && !!i.displayValueGetter && /* @__PURE__ */ G(R, { children: /* @__PURE__ */ G($e, { content: i.displayValueGetter({
|
|
1252
1258
|
column: i,
|
|
1253
|
-
dataContext:
|
|
1259
|
+
dataContext: F,
|
|
1254
1260
|
id: n.id,
|
|
1255
1261
|
row: t,
|
|
1256
1262
|
rowIndex: e
|
|
1257
1263
|
}) }) }, i.id),
|
|
1258
1264
|
!i.displayValueGetter && !i.renderCell && i.type === "text" && u.getTableTextCellValue({
|
|
1259
1265
|
column: i,
|
|
1260
|
-
dataContext:
|
|
1266
|
+
dataContext: F,
|
|
1261
1267
|
row: t,
|
|
1262
1268
|
rowIndex: e
|
|
1263
1269
|
}),
|
|
1264
1270
|
!i.displayValueGetter && !i.renderCell && i.type === "boolean" && u.getTableBooleanCellDisplayValue({
|
|
1265
1271
|
column: i,
|
|
1266
|
-
dataContext:
|
|
1272
|
+
dataContext: F,
|
|
1267
1273
|
row: t,
|
|
1268
1274
|
rowIndex: e,
|
|
1269
1275
|
t: T
|
|
1270
1276
|
}),
|
|
1271
1277
|
!i.displayValueGetter && !i.renderCell && i.type === "number" && u.getTableNumberCellValue({
|
|
1272
1278
|
column: i,
|
|
1273
|
-
dataContext:
|
|
1279
|
+
dataContext: F,
|
|
1274
1280
|
row: t,
|
|
1275
1281
|
rowIndex: e
|
|
1276
1282
|
}),
|
|
1277
1283
|
!i.displayValueGetter && !i.renderCell && i.type === "date" && u.getTableDateCellValue({
|
|
1278
1284
|
column: i,
|
|
1279
|
-
dataContext:
|
|
1285
|
+
dataContext: F,
|
|
1280
1286
|
row: t,
|
|
1281
1287
|
rowIndex: e
|
|
1282
1288
|
}),
|
|
1283
1289
|
!i.displayValueGetter && !i.renderCell && i.type === "options" && u.getTableOptionsCellDisplayValue({
|
|
1284
1290
|
column: i,
|
|
1285
|
-
dataContext:
|
|
1291
|
+
dataContext: F,
|
|
1286
1292
|
row: t,
|
|
1287
1293
|
rowIndex: e
|
|
1288
1294
|
}),
|
|
1289
|
-
!i.displayValueGetter && !i.renderCell && i.type === "readableIndex" &&
|
|
1290
|
-
dataContext:
|
|
1295
|
+
!i.displayValueGetter && !i.renderCell && i.type === "readableIndex" && Pe(i, {
|
|
1296
|
+
dataContext: F,
|
|
1291
1297
|
id: n.id,
|
|
1292
1298
|
row: t,
|
|
1293
1299
|
rowIndex: e
|
|
1294
1300
|
}),
|
|
1295
|
-
!i.displayValueGetter && !i.renderCell && i.type === "selectable" &&
|
|
1296
|
-
dataContext:
|
|
1301
|
+
!i.displayValueGetter && !i.renderCell && i.type === "selectable" && Le(i, {
|
|
1302
|
+
dataContext: F,
|
|
1297
1303
|
id: n.id,
|
|
1298
1304
|
row: t,
|
|
1299
1305
|
rowIndex: e
|
|
@@ -1301,31 +1307,31 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1301
1307
|
]
|
|
1302
1308
|
}, n.id);
|
|
1303
1309
|
}) }), [
|
|
1304
|
-
|
|
1305
|
-
|
|
1310
|
+
Z,
|
|
1311
|
+
ie,
|
|
1312
|
+
Me,
|
|
1313
|
+
Le,
|
|
1306
1314
|
Pe,
|
|
1307
|
-
Re,
|
|
1308
|
-
Fe,
|
|
1309
1315
|
x,
|
|
1310
1316
|
T,
|
|
1311
|
-
|
|
1317
|
+
N,
|
|
1312
1318
|
w,
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
]), rt =
|
|
1319
|
+
F,
|
|
1320
|
+
oe
|
|
1321
|
+
]), rt = z((e) => {
|
|
1316
1322
|
c(e);
|
|
1317
|
-
}, [c]), it =
|
|
1323
|
+
}, [c]), it = z((e) => {
|
|
1318
1324
|
l(e);
|
|
1319
1325
|
}, [l]);
|
|
1320
|
-
|
|
1326
|
+
B(() => {
|
|
1321
1327
|
if (!S) return Ze.default;
|
|
1322
1328
|
let e = S.subscribe((e, t) => {
|
|
1323
1329
|
t.forEach((e) => {
|
|
1324
|
-
|
|
1330
|
+
Y.querySelectorAll(`[data-testid=virtuoso-item-list] [data-id='${e}']`).forEach((e) => {
|
|
1325
1331
|
e.classList.remove("highlighted");
|
|
1326
1332
|
});
|
|
1327
1333
|
}), e.forEach((e) => {
|
|
1328
|
-
|
|
1334
|
+
Y.querySelectorAll(`[data-testid=virtuoso-item-list] [data-id='${e}']`).forEach((e) => {
|
|
1329
1335
|
e.classList.add("highlighted");
|
|
1330
1336
|
});
|
|
1331
1337
|
});
|
|
@@ -1335,44 +1341,44 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1335
1341
|
};
|
|
1336
1342
|
}, [
|
|
1337
1343
|
S,
|
|
1338
|
-
|
|
1344
|
+
Y,
|
|
1339
1345
|
w.palette.action.hover,
|
|
1340
1346
|
w.palette.background.paper
|
|
1341
|
-
]),
|
|
1347
|
+
]), B(() => {
|
|
1342
1348
|
let e = () => {
|
|
1343
|
-
|
|
1349
|
+
Re(), Ke(), Ne(), Be();
|
|
1344
1350
|
}, t = [
|
|
1345
|
-
|
|
1346
|
-
|
|
1351
|
+
ae("condensedChange", (t) => {
|
|
1352
|
+
O.getState().setIsCondensed(t), I.current = O.getState().getCurrentColumnVisualSettings(), e();
|
|
1347
1353
|
}),
|
|
1348
|
-
|
|
1349
|
-
|
|
1354
|
+
ae("reset", () => {
|
|
1355
|
+
O.getState().resetColumns(), I.current = O.getState().getCurrentColumnVisualSettings(), e();
|
|
1350
1356
|
}),
|
|
1351
|
-
|
|
1352
|
-
|
|
1357
|
+
ae("columnVisibilityChange", (t) => {
|
|
1358
|
+
I.current.forEach((e) => {
|
|
1353
1359
|
e.isVisible = t.includes(e.id);
|
|
1354
1360
|
}), e();
|
|
1355
1361
|
}),
|
|
1356
|
-
|
|
1357
|
-
|
|
1362
|
+
ae("columnOrderChange", (t) => {
|
|
1363
|
+
I.current.sort((e, n) => t.indexOf(e.id) - t.indexOf(n.id)), e();
|
|
1358
1364
|
}),
|
|
1359
|
-
|
|
1360
|
-
|
|
1365
|
+
ae("openColumnsEditorDialog", (e) => {
|
|
1366
|
+
Ae.current.open({ hasCellData: e });
|
|
1361
1367
|
})
|
|
1362
1368
|
];
|
|
1363
1369
|
return () => {
|
|
1364
1370
|
t.forEach((e) => e());
|
|
1365
1371
|
};
|
|
1366
1372
|
}, [
|
|
1367
|
-
|
|
1373
|
+
ae,
|
|
1368
1374
|
Be,
|
|
1369
|
-
|
|
1370
|
-
|
|
1375
|
+
N,
|
|
1376
|
+
O,
|
|
1371
1377
|
Ke,
|
|
1372
|
-
|
|
1373
|
-
|
|
1378
|
+
Re,
|
|
1379
|
+
Ne
|
|
1374
1380
|
]);
|
|
1375
|
-
let at =
|
|
1381
|
+
let at = z(() => {
|
|
1376
1382
|
let e = ze();
|
|
1377
1383
|
if (e && d && d(e.scrollTop), ye.current && f) {
|
|
1378
1384
|
let t = e.scrollTop, n = +w.spacing(x).replace("px", "");
|
|
@@ -1384,36 +1390,36 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1384
1390
|
f,
|
|
1385
1391
|
w,
|
|
1386
1392
|
x
|
|
1387
|
-
]),
|
|
1393
|
+
]), $ = z(() => +w.spacing(x).replace("px", ""), [x, w]), st = z((e) => {
|
|
1388
1394
|
let t = ze();
|
|
1389
1395
|
t && (t.scrollTop = e);
|
|
1390
|
-
}, [ze]),
|
|
1391
|
-
let e =
|
|
1392
|
-
e && !
|
|
1393
|
-
}, []),
|
|
1394
|
-
|
|
1395
|
-
hasRendered:
|
|
1396
|
+
}, [ze]), ct = z(() => {
|
|
1397
|
+
let e = Oe.current;
|
|
1398
|
+
e && !De.current && e.hasRendered && (Oe.current = null, e.onScrolledToIndex());
|
|
1399
|
+
}, []), lt = z((e, t) => {
|
|
1400
|
+
Oe.current = t ? {
|
|
1401
|
+
hasRendered: Ee.current.has(e),
|
|
1396
1402
|
index: e,
|
|
1397
1403
|
onScrolledToIndex: t
|
|
1398
|
-
} : null, ye.current?.scrollToIndex(e),
|
|
1399
|
-
}, [
|
|
1400
|
-
|
|
1401
|
-
scrollToIndex:
|
|
1402
|
-
setVerticalScrollPosition:
|
|
1404
|
+
} : null, ye.current?.scrollToIndex(e), ct();
|
|
1405
|
+
}, [ct]);
|
|
1406
|
+
be(y, () => ({
|
|
1407
|
+
scrollToIndex: lt,
|
|
1408
|
+
setVerticalScrollPosition: st
|
|
1403
1409
|
}));
|
|
1404
|
-
let
|
|
1405
|
-
|
|
1406
|
-
}, [a]),
|
|
1407
|
-
|
|
1408
|
-
let t =
|
|
1409
|
-
t &&
|
|
1410
|
-
}, [
|
|
1411
|
-
|
|
1412
|
-
}, [
|
|
1413
|
-
return
|
|
1414
|
-
|
|
1415
|
-
}, [a,
|
|
1416
|
-
ref:
|
|
1410
|
+
let ut = z((e) => {
|
|
1411
|
+
Te.current = e, a(e);
|
|
1412
|
+
}, [a]), pt = z((e) => {
|
|
1413
|
+
Ee.current = new Set(e.map((e) => e.index));
|
|
1414
|
+
let t = Oe.current;
|
|
1415
|
+
t && Ee.current.has(t.index) && (t.hasRendered = !0), ct();
|
|
1416
|
+
}, [ct]), mt = z((e) => {
|
|
1417
|
+
De.current = e, ct();
|
|
1418
|
+
}, [ct]);
|
|
1419
|
+
return B(() => {
|
|
1420
|
+
Te.current && a(Te.current);
|
|
1421
|
+
}, [a, A]), /* @__PURE__ */ K(j, {
|
|
1422
|
+
ref: ke,
|
|
1417
1423
|
style: { "--selection-background": "highlight" },
|
|
1418
1424
|
sx: {
|
|
1419
1425
|
"*::selection": { backgroundColor: "var(--selection-background) !important" },
|
|
@@ -1422,41 +1428,41 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1422
1428
|
width: "100%",
|
|
1423
1429
|
...C
|
|
1424
1430
|
},
|
|
1425
|
-
children: [
|
|
1426
|
-
...
|
|
1431
|
+
children: [L && /* @__PURE__ */ G(Se, {
|
|
1432
|
+
...J.createAttributes("Table"),
|
|
1427
1433
|
components: {
|
|
1428
|
-
EmptyPlaceholder:
|
|
1434
|
+
EmptyPlaceholder: _e((e, t) => /* @__PURE__ */ G(j, {
|
|
1429
1435
|
...e,
|
|
1430
1436
|
ref: t
|
|
1431
1437
|
})),
|
|
1432
|
-
FillerRow:
|
|
1438
|
+
FillerRow: _e((e, t) => /* @__PURE__ */ G(j, {
|
|
1433
1439
|
ref: t,
|
|
1434
1440
|
style: { height: e.height }
|
|
1435
1441
|
})),
|
|
1436
|
-
Table:
|
|
1442
|
+
Table: _e((e, t) => /* @__PURE__ */ G(j, {
|
|
1437
1443
|
...e,
|
|
1438
|
-
"data-row-count":
|
|
1444
|
+
"data-row-count": A.length,
|
|
1439
1445
|
ref: t,
|
|
1440
1446
|
role: "table",
|
|
1441
1447
|
sx: {
|
|
1442
1448
|
minWidth: "100%",
|
|
1443
1449
|
position: "relative",
|
|
1444
|
-
width:
|
|
1450
|
+
width: we.current
|
|
1445
1451
|
}
|
|
1446
1452
|
})),
|
|
1447
|
-
TableBody:
|
|
1453
|
+
TableBody: _e((t, n) => /* @__PURE__ */ G(j, {
|
|
1448
1454
|
...t,
|
|
1449
1455
|
ref: n,
|
|
1450
1456
|
sx: { font: e }
|
|
1451
1457
|
})),
|
|
1452
|
-
TableHead:
|
|
1458
|
+
TableHead: _e((e, t) => /* @__PURE__ */ G(j, {
|
|
1453
1459
|
...e,
|
|
1454
1460
|
ref: t
|
|
1455
1461
|
})),
|
|
1456
|
-
TableRow:
|
|
1457
|
-
let n = !
|
|
1458
|
-
return /* @__PURE__ */
|
|
1459
|
-
"data-id":
|
|
1462
|
+
TableRow: _e((e, t) => {
|
|
1463
|
+
let n = !ie || ie(e.item, F);
|
|
1464
|
+
return /* @__PURE__ */ G(j, {
|
|
1465
|
+
"data-id": M(e.item),
|
|
1460
1466
|
onMouseEnter: () => rt(e.item),
|
|
1461
1467
|
onMouseLeave: () => it(e.item),
|
|
1462
1468
|
ref: t,
|
|
@@ -1472,44 +1478,44 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1472
1478
|
backgroundColor: w.palette.grey[100],
|
|
1473
1479
|
color: `${w.palette.text.primary} !important`
|
|
1474
1480
|
},
|
|
1475
|
-
borderBottom: `1px solid ${
|
|
1481
|
+
borderBottom: `1px solid ${he}`,
|
|
1476
1482
|
color: n ? void 0 : "text.disabled",
|
|
1477
1483
|
cursor: n && s ? "pointer" : void 0,
|
|
1478
1484
|
display: "flex",
|
|
1479
1485
|
height: w.spacing(x)
|
|
1480
1486
|
},
|
|
1481
|
-
...(0,
|
|
1487
|
+
...(0, Xe.default)(e, "item")
|
|
1482
1488
|
});
|
|
1483
1489
|
})
|
|
1484
1490
|
},
|
|
1485
|
-
data:
|
|
1491
|
+
data: A,
|
|
1486
1492
|
fixedHeaderContent: tt,
|
|
1487
1493
|
fixedItemHeight: +w.spacing(x).replace("px", ""),
|
|
1488
1494
|
initialTopMostItemIndex: i ?? 0,
|
|
1489
|
-
isScrolling:
|
|
1495
|
+
isScrolling: mt,
|
|
1490
1496
|
itemContent: nt,
|
|
1491
|
-
itemSize:
|
|
1492
|
-
itemsRendered:
|
|
1497
|
+
itemSize: $,
|
|
1498
|
+
itemsRendered: pt,
|
|
1493
1499
|
onScroll: at,
|
|
1494
1500
|
overscan: {
|
|
1495
|
-
main:
|
|
1496
|
-
reverse:
|
|
1501
|
+
main: g ?? k,
|
|
1502
|
+
reverse: v ?? ee
|
|
1497
1503
|
},
|
|
1498
|
-
rangeChanged:
|
|
1504
|
+
rangeChanged: ut,
|
|
1499
1505
|
ref: ye,
|
|
1500
1506
|
style: {
|
|
1501
1507
|
height: "100%",
|
|
1502
1508
|
overflowX: t ? "scroll" : "auto"
|
|
1503
1509
|
},
|
|
1504
|
-
totalCount:
|
|
1505
|
-
}), /* @__PURE__ */
|
|
1510
|
+
totalCount: A.length
|
|
1511
|
+
}), /* @__PURE__ */ G(yt, { ref: Ae })]
|
|
1506
1512
|
});
|
|
1507
1513
|
}, Tt = ({ caption: e, component: t = "h2", variant: n = "h2" }) => {
|
|
1508
|
-
let { t: r } =
|
|
1509
|
-
return /* @__PURE__ */
|
|
1514
|
+
let { t: r } = q(), i = m(), a = p(i, (e) => e.baseData.length), o = p(i, b((e) => e.sortedData.length));
|
|
1515
|
+
return /* @__PURE__ */ G(le, {
|
|
1510
1516
|
component: t,
|
|
1511
1517
|
variant: n,
|
|
1512
|
-
children: /* @__PURE__ */
|
|
1518
|
+
children: /* @__PURE__ */ K(W, { children: [
|
|
1513
1519
|
o === 0 && (e ?? r("Items")),
|
|
1514
1520
|
o > 0 && o === a && r("{{items}} ({{count}})", {
|
|
1515
1521
|
count: o,
|
|
@@ -1524,7 +1530,7 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1524
1530
|
] })
|
|
1525
1531
|
});
|
|
1526
1532
|
}, Et = /* @__PURE__ */ t(((e, t) => {
|
|
1527
|
-
t.exports = Object.prototype.hasOwnProperty.call(
|
|
1533
|
+
t.exports = Object.prototype.hasOwnProperty.call(me, "module.exports") ? me["module.exports"] : { ...me };
|
|
1528
1534
|
})), Dt = /* @__PURE__ */ t(((e) => {
|
|
1529
1535
|
var t = Et();
|
|
1530
1536
|
function n(e, t) {
|
|
@@ -1708,12 +1714,12 @@ var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1708
1714
|
})))(), 1)).default, Nt = (e) => e;
|
|
1709
1715
|
function Pt(e, t = Nt, n) {
|
|
1710
1716
|
let r = Mt(e.subscribe, e.getState, e.getInitialState, t, n);
|
|
1711
|
-
return
|
|
1717
|
+
return he.useDebugValue(r), r;
|
|
1712
1718
|
}
|
|
1713
1719
|
//#endregion
|
|
1714
1720
|
//#region src/components/ui/Table/TableFiltersSidebarItem.tsx
|
|
1715
|
-
var Ft =
|
|
1716
|
-
let r = Pt(
|
|
1721
|
+
var Ft = Ee, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFilterWithinDimension: n }) => {
|
|
1722
|
+
let r = Pt(m(), (e) => e.filters, (e, t) => JSON.stringify(e.map((e) => e.filterValue)) === JSON.stringify(t.map((e) => e.filterValue))), i = e.filterIds.map((e) => r.find((t) => t.id === e)), { setValue: a } = Y(), o = V(() => {
|
|
1717
1723
|
if (e.allowOnlyPreferredFilter || e.filterIds.length === 1) return [i.find((t) => t?.id && t.id === e.preferredFilterId)].filter((e) => !!e);
|
|
1718
1724
|
if (!e.allowMultipleVisibleFilters) {
|
|
1719
1725
|
let t = n ?? e.preferredFilterId;
|
|
@@ -1727,11 +1733,11 @@ var Ft = ke, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1727
1733
|
e.filterIds.length,
|
|
1728
1734
|
e.preferredFilterId,
|
|
1729
1735
|
n
|
|
1730
|
-
]), s =
|
|
1736
|
+
]), s = V(() => i.length > 1 && !e.allowOnlyPreferredFilter && !e.allowMultipleVisibleFilters, [
|
|
1731
1737
|
i.length,
|
|
1732
1738
|
e.allowMultipleVisibleFilters,
|
|
1733
1739
|
e.allowOnlyPreferredFilter
|
|
1734
|
-
]), c =
|
|
1740
|
+
]), c = V(() => !(i.length === 1 || e.allowOnlyPreferredFilter), [i.length, e.allowOnlyPreferredFilter]), l = V(() => s ? {
|
|
1735
1741
|
items: i.map((n) => ({
|
|
1736
1742
|
active: n === o[0],
|
|
1737
1743
|
callback: () => {
|
|
@@ -1752,23 +1758,23 @@ var Ft = ke, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1752
1758
|
t,
|
|
1753
1759
|
s
|
|
1754
1760
|
]);
|
|
1755
|
-
return o.length ? /* @__PURE__ */
|
|
1761
|
+
return o.length ? /* @__PURE__ */ K(j, {
|
|
1756
1762
|
sx: { mb: 2 },
|
|
1757
1763
|
children: [
|
|
1758
|
-
c && /* @__PURE__ */
|
|
1764
|
+
c && /* @__PURE__ */ K(j, {
|
|
1759
1765
|
sx: {
|
|
1760
1766
|
alignItems: "center",
|
|
1761
1767
|
display: "flex",
|
|
1762
1768
|
justifyContent: "space-between"
|
|
1763
1769
|
},
|
|
1764
|
-
children: [/* @__PURE__ */
|
|
1770
|
+
children: [/* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(le, {
|
|
1765
1771
|
sx: {
|
|
1766
1772
|
margin: 0,
|
|
1767
1773
|
padding: 0
|
|
1768
1774
|
},
|
|
1769
1775
|
variant: "h6",
|
|
1770
1776
|
children: e.label
|
|
1771
|
-
}) }), s && /* @__PURE__ */
|
|
1777
|
+
}) }), s && /* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(qe, {
|
|
1772
1778
|
ButtonProps: {
|
|
1773
1779
|
color: "inherit",
|
|
1774
1780
|
size: "small",
|
|
@@ -1784,26 +1790,26 @@ var Ft = ke, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1784
1790
|
menuItemsData: l
|
|
1785
1791
|
}) })]
|
|
1786
1792
|
}),
|
|
1787
|
-
o.map((e) => /* @__PURE__ */
|
|
1793
|
+
o.map((e) => /* @__PURE__ */ G(j, {
|
|
1788
1794
|
sx: { my: 1 },
|
|
1789
|
-
children: /* @__PURE__ */
|
|
1795
|
+
children: /* @__PURE__ */ G(rt, { filter: e })
|
|
1790
1796
|
}, e.id)),
|
|
1791
|
-
/* @__PURE__ */
|
|
1797
|
+
/* @__PURE__ */ G(P, {})
|
|
1792
1798
|
]
|
|
1793
1799
|
}, e.id) : null;
|
|
1794
1800
|
}, Lt = ({ onClose: e }) => {
|
|
1795
|
-
let { t } =
|
|
1801
|
+
let { t } = q(), n = m(), r = p(n, (e) => e.setFilterValues), i = p(n, (e) => e.filterDimensions), a = Pt(n, (e) => e.filters, (e, t) => JSON.stringify(e.map((e) => e.filterValue)) === JSON.stringify(t.map((e) => e.filterValue))), o = p(n, (e) => e.filters.some((e) => !e.isInitialFilterValue(e.filterValue))), s = p(n, (e) => e.resetFilters), c = p(n, (e) => e.visibleFilterWithinDimensions), l = p(n, (e) => e.setVisibleFilterWithinDimensions), [u, d] = U(c), f = V(() => Object.fromEntries(a.map((e) => [e.id, e.initialFilterValue])), [a]), h = V(() => Object.fromEntries(a.map((e) => [e.id, e.filterValue ?? e.initialFilterValue])), [a]), g = Oe({
|
|
1796
1802
|
defaultValues: f,
|
|
1797
|
-
values:
|
|
1798
|
-
}), _ =
|
|
1803
|
+
values: h
|
|
1804
|
+
}), _ = z((e, t) => {
|
|
1799
1805
|
d((n) => ({
|
|
1800
1806
|
...n,
|
|
1801
1807
|
[e]: t
|
|
1802
1808
|
}));
|
|
1803
|
-
}, []), { control: v, formState: { isDirty: y }, handleSubmit: b, reset: x, setValue: S } =
|
|
1809
|
+
}, []), { control: v, formState: { isDirty: y }, handleSubmit: b, reset: x, setValue: S } = g, C = ke({
|
|
1804
1810
|
control: v,
|
|
1805
|
-
defaultValue:
|
|
1806
|
-
}), w =
|
|
1811
|
+
defaultValue: h
|
|
1812
|
+
}), w = V(() => Object.entries(C).some(([e, t]) => !a.find((t) => t.id === e).isInitialFilterValue(t)), [a, C]), T = z(async (t) => {
|
|
1807
1813
|
await r(t), x(t), l(u), e();
|
|
1808
1814
|
}, [
|
|
1809
1815
|
u,
|
|
@@ -1811,7 +1817,7 @@ var Ft = ke, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1811
1817
|
x,
|
|
1812
1818
|
r,
|
|
1813
1819
|
l
|
|
1814
|
-
]), E =
|
|
1820
|
+
]), E = z(async () => {
|
|
1815
1821
|
x(f), await s(), l(u), e();
|
|
1816
1822
|
}, [
|
|
1817
1823
|
f,
|
|
@@ -1820,13 +1826,13 @@ var Ft = ke, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1820
1826
|
x,
|
|
1821
1827
|
s,
|
|
1822
1828
|
l
|
|
1823
|
-
]), D =
|
|
1829
|
+
]), D = z((e) => {
|
|
1824
1830
|
let t = a.find((t) => t.id === e);
|
|
1825
1831
|
S(e, t.initialFilterValue, { shouldDirty: !0 });
|
|
1826
|
-
}, [a, S]),
|
|
1827
|
-
return /* @__PURE__ */
|
|
1828
|
-
...
|
|
1829
|
-
children: /* @__PURE__ */
|
|
1832
|
+
}, [a, S]), O = V(() => a.filter((e) => e.showInSidebar), [a]);
|
|
1833
|
+
return /* @__PURE__ */ G(W, { children: !!a && !!h && !!f && /* @__PURE__ */ G(De, {
|
|
1834
|
+
...g,
|
|
1835
|
+
children: /* @__PURE__ */ K(j, {
|
|
1830
1836
|
autoComplete: "off",
|
|
1831
1837
|
component: "form",
|
|
1832
1838
|
id: "Filters",
|
|
@@ -1836,45 +1842,45 @@ var Ft = ke, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1836
1842
|
gridTemplateRows: "max-content auto",
|
|
1837
1843
|
height: "100%"
|
|
1838
1844
|
},
|
|
1839
|
-
children: [/* @__PURE__ */
|
|
1840
|
-
y && o && !w && /* @__PURE__ */
|
|
1845
|
+
children: [/* @__PURE__ */ K(j, { children: [
|
|
1846
|
+
y && o && !w && /* @__PURE__ */ G(j, {
|
|
1841
1847
|
sx: { my: 1 },
|
|
1842
1848
|
children: t`All filters have been removed, but have not yet been applied.`
|
|
1843
1849
|
}),
|
|
1844
|
-
/* @__PURE__ */
|
|
1850
|
+
/* @__PURE__ */ G(j, { children: Object.entries(C).map(([e, n]) => {
|
|
1845
1851
|
let r = a.find((t) => t.id === e);
|
|
1846
|
-
return r.isInitialFilterValue(C[e]) ? null : /* @__PURE__ */
|
|
1852
|
+
return r.isInitialFilterValue(C[e]) ? null : /* @__PURE__ */ K(j, {
|
|
1847
1853
|
sx: {
|
|
1848
1854
|
alignItems: "center",
|
|
1849
1855
|
display: "grid",
|
|
1850
1856
|
gap: 1,
|
|
1851
1857
|
gridTemplateColumns: "auto max-content"
|
|
1852
1858
|
},
|
|
1853
|
-
children: [/* @__PURE__ */
|
|
1854
|
-
/* @__PURE__ */
|
|
1859
|
+
children: [/* @__PURE__ */ K(j, { children: [
|
|
1860
|
+
/* @__PURE__ */ G(j, {
|
|
1855
1861
|
component: "span",
|
|
1856
1862
|
children: r.label
|
|
1857
1863
|
}),
|
|
1858
|
-
/* @__PURE__ */
|
|
1864
|
+
/* @__PURE__ */ G(j, {
|
|
1859
1865
|
component: "span",
|
|
1860
1866
|
children: ": "
|
|
1861
1867
|
}),
|
|
1862
|
-
/* @__PURE__ */
|
|
1868
|
+
/* @__PURE__ */ G(j, {
|
|
1863
1869
|
component: "strong",
|
|
1864
1870
|
children: r.getPresentationValue(n, t)
|
|
1865
1871
|
})
|
|
1866
|
-
] }), /* @__PURE__ */
|
|
1872
|
+
] }), /* @__PURE__ */ G(F, {
|
|
1867
1873
|
"aria-label": t("Remove filter with label {{filterLabel}} and value {{filterValue}}", {
|
|
1868
1874
|
filterLabel: r.label,
|
|
1869
1875
|
filterValue: r.getPresentationValue(n, t)
|
|
1870
1876
|
}),
|
|
1871
1877
|
onClick: () => D(e),
|
|
1872
1878
|
size: "small",
|
|
1873
|
-
children: /* @__PURE__ */
|
|
1879
|
+
children: /* @__PURE__ */ G(Ke, {})
|
|
1874
1880
|
})]
|
|
1875
1881
|
}, e);
|
|
1876
1882
|
}) }),
|
|
1877
|
-
(o || y) && /* @__PURE__ */
|
|
1883
|
+
(o || y) && /* @__PURE__ */ K(j, {
|
|
1878
1884
|
sx: {
|
|
1879
1885
|
display: "flex",
|
|
1880
1886
|
gap: 1,
|
|
@@ -1882,55 +1888,55 @@ var Ft = ke, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1882
1888
|
marginRight: 1,
|
|
1883
1889
|
my: 1
|
|
1884
1890
|
},
|
|
1885
|
-
children: [/* @__PURE__ */
|
|
1886
|
-
...
|
|
1891
|
+
children: [/* @__PURE__ */ G(M, {
|
|
1892
|
+
...J.createAttributes("TableFiltersSidebarItem-reset"),
|
|
1887
1893
|
color: "primary",
|
|
1888
1894
|
onClick: E,
|
|
1889
|
-
startIcon: /* @__PURE__ */
|
|
1895
|
+
startIcon: /* @__PURE__ */ G(Ge, {}),
|
|
1890
1896
|
variant: "outlined",
|
|
1891
1897
|
children: t`Reset`
|
|
1892
|
-
}), /* @__PURE__ */
|
|
1893
|
-
...
|
|
1898
|
+
}), /* @__PURE__ */ G(M, {
|
|
1899
|
+
...J.createAttributes("TableFiltersSidebarItem-apply"),
|
|
1894
1900
|
color: "secondary",
|
|
1895
|
-
startIcon: /* @__PURE__ */
|
|
1901
|
+
startIcon: /* @__PURE__ */ G(We, {}),
|
|
1896
1902
|
type: "submit",
|
|
1897
1903
|
children: t`Apply`
|
|
1898
1904
|
})]
|
|
1899
1905
|
})
|
|
1900
|
-
] }), /* @__PURE__ */
|
|
1906
|
+
] }), /* @__PURE__ */ K(j, {
|
|
1901
1907
|
sx: {
|
|
1902
1908
|
overflowY: "auto",
|
|
1903
1909
|
paddingRight: 1
|
|
1904
1910
|
},
|
|
1905
|
-
children: [i.length > 0 && /* @__PURE__ */
|
|
1911
|
+
children: [i.length > 0 && /* @__PURE__ */ G(W, { children: i.filter((e) => e.filterIds.length).map((e) => /* @__PURE__ */ G(It, {
|
|
1906
1912
|
filterDimension: e,
|
|
1907
1913
|
onFilterVisibilityChange: _,
|
|
1908
1914
|
visibleFilterWithinDimension: u[e.id]
|
|
1909
|
-
}, e.id)) }), i.length === 0 && /* @__PURE__ */
|
|
1915
|
+
}, e.id)) }), i.length === 0 && /* @__PURE__ */ G(W, { children: O.map((e) => /* @__PURE__ */ K(j, {
|
|
1910
1916
|
sx: { my: 2 },
|
|
1911
|
-
children: [/* @__PURE__ */
|
|
1917
|
+
children: [/* @__PURE__ */ G(j, {
|
|
1912
1918
|
sx: { my: 1 },
|
|
1913
|
-
children: /* @__PURE__ */
|
|
1914
|
-
}), /* @__PURE__ */
|
|
1919
|
+
children: /* @__PURE__ */ G(rt, { filter: e })
|
|
1920
|
+
}), /* @__PURE__ */ G(P, {})]
|
|
1915
1921
|
}, e.id)) })]
|
|
1916
1922
|
})]
|
|
1917
1923
|
})
|
|
1918
1924
|
}) });
|
|
1919
1925
|
}, Rt = ({ onClose: e, open: t }) => {
|
|
1920
|
-
let { t: n } =
|
|
1921
|
-
return /* @__PURE__ */
|
|
1922
|
-
closeIcon: /* @__PURE__ */
|
|
1926
|
+
let { t: n } = q();
|
|
1927
|
+
return /* @__PURE__ */ G(k, {
|
|
1928
|
+
closeIcon: /* @__PURE__ */ G(Ft, {}),
|
|
1923
1929
|
closeIconTooltipText: n`Close filters`,
|
|
1924
1930
|
onClose: e,
|
|
1925
1931
|
open: t,
|
|
1926
1932
|
testIdAttributes: { name: "tableFiltersSidebarItem" },
|
|
1927
1933
|
title: n`Filters`,
|
|
1928
1934
|
width: 60,
|
|
1929
|
-
children: t && /* @__PURE__ */
|
|
1935
|
+
children: t && /* @__PURE__ */ G(Lt, { onClose: e })
|
|
1930
1936
|
});
|
|
1931
1937
|
}, zt = ({ ContainerProps: e }) => {
|
|
1932
1938
|
let t = x({});
|
|
1933
|
-
return /* @__PURE__ */
|
|
1939
|
+
return /* @__PURE__ */ G(qe, {
|
|
1934
1940
|
ButtonProps: {
|
|
1935
1941
|
color: "primary",
|
|
1936
1942
|
size: "small",
|
|
@@ -1940,37 +1946,37 @@ var Ft = ke, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1940
1946
|
menuItemsData: t,
|
|
1941
1947
|
MenuProps: { elevation: 3 }
|
|
1942
1948
|
});
|
|
1943
|
-
}, Bt = ({ header: e, headerComponent: t = "h3", headerVariant: n = "h5", showTableMenu: r = !0 }) => /* @__PURE__ */
|
|
1949
|
+
}, Bt = ({ header: e, headerComponent: t = "h3", headerVariant: n = "h5", showTableMenu: r = !0 }) => /* @__PURE__ */ K(j, {
|
|
1944
1950
|
sx: {
|
|
1945
1951
|
alignItems: "center",
|
|
1946
1952
|
display: "flex",
|
|
1947
1953
|
justifyContent: e ? "space-between" : "flex-end"
|
|
1948
1954
|
},
|
|
1949
|
-
children: [e && /* @__PURE__ */
|
|
1955
|
+
children: [e && /* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(Tt, {
|
|
1950
1956
|
caption: e,
|
|
1951
1957
|
component: t,
|
|
1952
1958
|
variant: n
|
|
1953
|
-
}) }), r && /* @__PURE__ */
|
|
1959
|
+
}) }), r && /* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(zt, {}) })]
|
|
1954
1960
|
}), Vt = ({ extraSidebarMenuItems: e }) => {
|
|
1955
|
-
let t =
|
|
1961
|
+
let t = m(), n = p(t, (e) => e.filters.filter((e) => !e.isInitialFilterValue()).length), [r, i] = U(!1), a = z(() => {
|
|
1956
1962
|
i(!1);
|
|
1957
|
-
}, []), o =
|
|
1963
|
+
}, []), o = z(() => {
|
|
1958
1964
|
i(!0);
|
|
1959
1965
|
}, []);
|
|
1960
|
-
return /* @__PURE__ */
|
|
1966
|
+
return /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ K(ee, { children: [/* @__PURE__ */ G(te, {
|
|
1961
1967
|
badgeColor: "secondary",
|
|
1962
1968
|
badgeContent: n,
|
|
1963
1969
|
first: !0,
|
|
1964
|
-
icon: /* @__PURE__ */
|
|
1970
|
+
icon: /* @__PURE__ */ G(Ft, {}),
|
|
1965
1971
|
onClick: o,
|
|
1966
1972
|
testIdAttributes: { name: "filters" },
|
|
1967
1973
|
title: A`Open filters`
|
|
1968
|
-
}), e] }), /* @__PURE__ */
|
|
1974
|
+
}), e] }), /* @__PURE__ */ G(Rt, {
|
|
1969
1975
|
onClose: a,
|
|
1970
1976
|
open: r
|
|
1971
1977
|
})] });
|
|
1972
1978
|
};
|
|
1973
1979
|
//#endregion
|
|
1974
|
-
export { Lt as a, wt as c,
|
|
1980
|
+
export { Lt as a, wt as c, ot as d, it as f, Qe as h, Rt as i, ft as l, $e as m, Bt as n, Ft as o, rt as p, zt as r, Tt as s, Vt as t, dt as u };
|
|
1975
1981
|
|
|
1976
1982
|
//# sourceMappingURL=Table.js.map
|