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