@natoora-libs/core 0.1.2 → 0.1.4-dev-doug-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -863,6 +863,7 @@ type HeadCell = {
|
|
|
863
863
|
label?: string;
|
|
864
864
|
numeric?: boolean;
|
|
865
865
|
disablePadding?: boolean;
|
|
866
|
+
width?: number | string;
|
|
866
867
|
enabled?: boolean;
|
|
867
868
|
renderHeader?: ReactNode;
|
|
868
869
|
filterOptionsQuery?: UseQueryResult<unknown[], unknown>;
|
|
@@ -884,14 +885,17 @@ interface ITableDesktopProps {
|
|
|
884
885
|
handleClickOnClearFiltersButton?: () => void;
|
|
885
886
|
deleteItem?: (id: string) => void;
|
|
886
887
|
keyField?: string;
|
|
888
|
+
tableLayout?: 'fixed' | 'auto';
|
|
887
889
|
onApplyFilters?: (updatedFilters: HeaderFilters, shouldSave: boolean) => void;
|
|
890
|
+
shouldShowCheckOnFilter?: (columnId: string, filterOption: HeaderFilterObject) => boolean;
|
|
888
891
|
}
|
|
889
|
-
declare const TableDesktop: ({ data, headCells, RenderItem, appliedFilters, headerFilters, children, height, isLoading, rowsPerPage, enableCheckboxSelection, disableInternalSort, updateSort, showClearFilterButton, handleClickOnClearFiltersButton, deleteItem, keyField, onApplyFilters, }: ITableDesktopProps) => react_jsx_runtime.JSX.Element;
|
|
892
|
+
declare const TableDesktop: ({ data, headCells, RenderItem, appliedFilters, headerFilters, children, height, isLoading, rowsPerPage, enableCheckboxSelection, disableInternalSort, updateSort, showClearFilterButton, handleClickOnClearFiltersButton, deleteItem, keyField, tableLayout, onApplyFilters, shouldShowCheckOnFilter, }: ITableDesktopProps) => react_jsx_runtime.JSX.Element;
|
|
890
893
|
|
|
891
894
|
interface SmartTableHeaderFilterMenuProps {
|
|
892
895
|
headCell: HeadCell;
|
|
893
896
|
headerFilters: HeaderFilters;
|
|
894
|
-
|
|
897
|
+
numActiveFilters: number;
|
|
898
|
+
shouldShowCheckOnFilter?: (columnId: string, filterOption: HeaderFilterObject) => boolean;
|
|
895
899
|
onApplyFilters?: (...args: unknown[]) => void;
|
|
896
900
|
}
|
|
897
901
|
declare const _default$4: React__default.NamedExoticComponent<SmartTableHeaderFilterMenuProps>;
|
|
@@ -907,6 +911,7 @@ interface SmartTableHeaderProps {
|
|
|
907
911
|
onRequestSort: (event: MouseEvent<unknown>, property: string) => void;
|
|
908
912
|
onSelectAllClick: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
909
913
|
onApplyFilters?: (...args: unknown[]) => void;
|
|
914
|
+
shouldShowCheckOnFilter?: (columnId: string, filterOption: HeaderFilterObject) => boolean;
|
|
910
915
|
}
|
|
911
916
|
declare const _default$3: React.NamedExoticComponent<SmartTableHeaderProps>;
|
|
912
917
|
|
|
@@ -863,6 +863,7 @@ type HeadCell = {
|
|
|
863
863
|
label?: string;
|
|
864
864
|
numeric?: boolean;
|
|
865
865
|
disablePadding?: boolean;
|
|
866
|
+
width?: number | string;
|
|
866
867
|
enabled?: boolean;
|
|
867
868
|
renderHeader?: ReactNode;
|
|
868
869
|
filterOptionsQuery?: UseQueryResult<unknown[], unknown>;
|
|
@@ -884,14 +885,17 @@ interface ITableDesktopProps {
|
|
|
884
885
|
handleClickOnClearFiltersButton?: () => void;
|
|
885
886
|
deleteItem?: (id: string) => void;
|
|
886
887
|
keyField?: string;
|
|
888
|
+
tableLayout?: 'fixed' | 'auto';
|
|
887
889
|
onApplyFilters?: (updatedFilters: HeaderFilters, shouldSave: boolean) => void;
|
|
890
|
+
shouldShowCheckOnFilter?: (columnId: string, filterOption: HeaderFilterObject) => boolean;
|
|
888
891
|
}
|
|
889
|
-
declare const TableDesktop: ({ data, headCells, RenderItem, appliedFilters, headerFilters, children, height, isLoading, rowsPerPage, enableCheckboxSelection, disableInternalSort, updateSort, showClearFilterButton, handleClickOnClearFiltersButton, deleteItem, keyField, onApplyFilters, }: ITableDesktopProps) => react_jsx_runtime.JSX.Element;
|
|
892
|
+
declare const TableDesktop: ({ data, headCells, RenderItem, appliedFilters, headerFilters, children, height, isLoading, rowsPerPage, enableCheckboxSelection, disableInternalSort, updateSort, showClearFilterButton, handleClickOnClearFiltersButton, deleteItem, keyField, tableLayout, onApplyFilters, shouldShowCheckOnFilter, }: ITableDesktopProps) => react_jsx_runtime.JSX.Element;
|
|
890
893
|
|
|
891
894
|
interface SmartTableHeaderFilterMenuProps {
|
|
892
895
|
headCell: HeadCell;
|
|
893
896
|
headerFilters: HeaderFilters;
|
|
894
|
-
|
|
897
|
+
numActiveFilters: number;
|
|
898
|
+
shouldShowCheckOnFilter?: (columnId: string, filterOption: HeaderFilterObject) => boolean;
|
|
895
899
|
onApplyFilters?: (...args: unknown[]) => void;
|
|
896
900
|
}
|
|
897
901
|
declare const _default$4: React__default.NamedExoticComponent<SmartTableHeaderFilterMenuProps>;
|
|
@@ -907,6 +911,7 @@ interface SmartTableHeaderProps {
|
|
|
907
911
|
onRequestSort: (event: MouseEvent<unknown>, property: string) => void;
|
|
908
912
|
onSelectAllClick: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
909
913
|
onApplyFilters?: (...args: unknown[]) => void;
|
|
914
|
+
shouldShowCheckOnFilter?: (columnId: string, filterOption: HeaderFilterObject) => boolean;
|
|
910
915
|
}
|
|
911
916
|
declare const _default$3: React.NamedExoticComponent<SmartTableHeaderProps>;
|
|
912
917
|
|
package/dist/components/index.js
CHANGED
|
@@ -7053,16 +7053,15 @@ var LabelledSwitch = withStyles6(LSwitch, (theme) => ({
|
|
|
7053
7053
|
var Switch_default = memo20(LabelledSwitch);
|
|
7054
7054
|
|
|
7055
7055
|
// src/components/SmartTableHeaderFilterMenu/SmartTableHeaderFilterMenu.tsx
|
|
7056
|
-
import React4, { useState as useState15 } from "react";
|
|
7056
|
+
import React4, { useMemo as useMemo2, useState as useState15, useEffect as useEffect9 } from "react";
|
|
7057
7057
|
import { FilterList } from "@mui/icons-material";
|
|
7058
|
+
import CheckIcon from "@mui/icons-material/Check";
|
|
7058
7059
|
import {
|
|
7059
7060
|
Box as Box28,
|
|
7060
7061
|
Checkbox as Checkbox4,
|
|
7061
7062
|
Chip as Chip2,
|
|
7062
7063
|
Divider as Divider9,
|
|
7063
|
-
FormControl as FormControl5,
|
|
7064
7064
|
FormControlLabel as FormControlLabel3,
|
|
7065
|
-
FormHelperText as FormHelperText4,
|
|
7066
7065
|
IconButton as IconButton3,
|
|
7067
7066
|
Menu as Menu4
|
|
7068
7067
|
} from "@mui/material";
|
|
@@ -7075,14 +7074,18 @@ var useStyles44 = makeStyles44()((theme) => ({
|
|
|
7075
7074
|
flexDirection: "column",
|
|
7076
7075
|
gap: theme.spacing(0.5)
|
|
7077
7076
|
},
|
|
7078
|
-
|
|
7077
|
+
filter: {
|
|
7079
7078
|
display: "flex",
|
|
7080
|
-
|
|
7079
|
+
alignItems: "center",
|
|
7080
|
+
justifyContent: "space-between",
|
|
7081
7081
|
padding: theme.spacing(0, 3)
|
|
7082
7082
|
},
|
|
7083
7083
|
applyFilterButtonsContainer: {
|
|
7084
7084
|
display: "flex",
|
|
7085
7085
|
padding: theme.spacing(0, 1)
|
|
7086
|
+
},
|
|
7087
|
+
saveAsDefaultButton: {
|
|
7088
|
+
color: theme.palette.primary.main
|
|
7086
7089
|
}
|
|
7087
7090
|
}));
|
|
7088
7091
|
var resolveFilterOption = (filterOption) => {
|
|
@@ -7102,18 +7105,21 @@ var findFilterIndex = (filters, filterOption) => filters.findIndex((item) => {
|
|
|
7102
7105
|
});
|
|
7103
7106
|
var SmartTableHeaderFilterMenu = ({
|
|
7104
7107
|
headCell,
|
|
7105
|
-
|
|
7108
|
+
numActiveFilters,
|
|
7106
7109
|
headerFilters,
|
|
7110
|
+
shouldShowCheckOnFilter,
|
|
7107
7111
|
onApplyFilters
|
|
7108
7112
|
}) => {
|
|
7109
7113
|
const { classes } = useStyles44();
|
|
7110
7114
|
const [anchorEl, setAnchorEl] = useState15(null);
|
|
7111
|
-
const [shouldSave, setShouldSave] = useState15(false);
|
|
7112
7115
|
const [selectedFilters, setSelectedFilters] = useState15(
|
|
7113
7116
|
headerFilters[headCell.id] ?? []
|
|
7114
7117
|
);
|
|
7118
|
+
const filterOptions = headCell.filterOptionsQuery?.data ?? [];
|
|
7119
|
+
const numFilterOptions = filterOptions.length ?? 0;
|
|
7120
|
+
const numCurrentSelectedFilters = selectedFilters.length;
|
|
7115
7121
|
const handleFilterMenuOpen = (event) => {
|
|
7116
|
-
if (!
|
|
7122
|
+
if (!numFilterOptions) {
|
|
7117
7123
|
headCell.filterOptionsQuery?.refetch();
|
|
7118
7124
|
}
|
|
7119
7125
|
setAnchorEl(event.currentTarget);
|
|
@@ -7121,7 +7127,6 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
7121
7127
|
const handleFilterMenuClose = () => {
|
|
7122
7128
|
setSelectedFilters(headerFilters[headCell.id]);
|
|
7123
7129
|
setAnchorEl(null);
|
|
7124
|
-
setShouldSave(false);
|
|
7125
7130
|
};
|
|
7126
7131
|
const handleFilterOptionClick = (option) => {
|
|
7127
7132
|
const selectedIndex = findFilterIndex(selectedFilters, option);
|
|
@@ -7139,6 +7144,20 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
7139
7144
|
}
|
|
7140
7145
|
setSelectedFilters(newSelected);
|
|
7141
7146
|
};
|
|
7147
|
+
const handleApplyFilters = (shouldSave) => {
|
|
7148
|
+
const updatedFilters = {
|
|
7149
|
+
...headerFilters,
|
|
7150
|
+
[headCell.id]: [...selectedFilters]
|
|
7151
|
+
};
|
|
7152
|
+
onApplyFilters?.(updatedFilters, shouldSave);
|
|
7153
|
+
setAnchorEl(null);
|
|
7154
|
+
};
|
|
7155
|
+
useEffect9(() => {
|
|
7156
|
+
setSelectedFilters(headerFilters[headCell.id] ?? []);
|
|
7157
|
+
}, [headerFilters, headCell.id]);
|
|
7158
|
+
const isOptionChecked = useMemo2(() => (resolvedOption) => !!selectedFilters?.some(
|
|
7159
|
+
(value) => resolveFilterOption(value) === resolvedOption
|
|
7160
|
+
), [selectedFilters]);
|
|
7142
7161
|
return /* @__PURE__ */ jsxs74(Fragment12, { children: [
|
|
7143
7162
|
/* @__PURE__ */ jsx108(
|
|
7144
7163
|
IconButton3,
|
|
@@ -7148,13 +7167,13 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
7148
7167
|
"data-testid": "filter-menu-button",
|
|
7149
7168
|
style: { padding: 0 },
|
|
7150
7169
|
className: classNames3("filter-menu-trigger", {
|
|
7151
|
-
"has-active-filters":
|
|
7170
|
+
"has-active-filters": numActiveFilters
|
|
7152
7171
|
}),
|
|
7153
|
-
children:
|
|
7172
|
+
children: numActiveFilters ? /* @__PURE__ */ jsx108(
|
|
7154
7173
|
Chip2,
|
|
7155
7174
|
{
|
|
7156
7175
|
sx: { height: 24 },
|
|
7157
|
-
label:
|
|
7176
|
+
label: numActiveFilters,
|
|
7158
7177
|
icon: /* @__PURE__ */ jsx108(FilterList, { style: { fontSize: 18 }, color: "primary" })
|
|
7159
7178
|
}
|
|
7160
7179
|
) : /* @__PURE__ */ jsx108(FilterList, { style: { fontSize: 18 } })
|
|
@@ -7170,61 +7189,69 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
7170
7189
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
7171
7190
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
7172
7191
|
children: /* @__PURE__ */ jsxs74(Box28, { className: classes.filterMenu, children: [
|
|
7173
|
-
|
|
7192
|
+
/* @__PURE__ */ jsx108(Box28, { px: 3, children: /* @__PURE__ */ jsx108(
|
|
7193
|
+
FormControlLabel3,
|
|
7194
|
+
{
|
|
7195
|
+
label: "Select All",
|
|
7196
|
+
control: /* @__PURE__ */ jsx108(
|
|
7197
|
+
Checkbox4,
|
|
7198
|
+
{
|
|
7199
|
+
disableRipple: true,
|
|
7200
|
+
checked: numCurrentSelectedFilters === numFilterOptions,
|
|
7201
|
+
indeterminate: numCurrentSelectedFilters > 0 && numCurrentSelectedFilters < numFilterOptions,
|
|
7202
|
+
onChange: ({ target: { checked } }) => {
|
|
7203
|
+
if (checked) {
|
|
7204
|
+
setSelectedFilters([...filterOptions]);
|
|
7205
|
+
} else {
|
|
7206
|
+
setSelectedFilters([]);
|
|
7207
|
+
}
|
|
7208
|
+
}
|
|
7209
|
+
}
|
|
7210
|
+
)
|
|
7211
|
+
}
|
|
7212
|
+
) }),
|
|
7213
|
+
/* @__PURE__ */ jsx108(Divider9, {}),
|
|
7214
|
+
filterOptions.map(
|
|
7174
7215
|
(option) => {
|
|
7175
7216
|
const resolvedOption = resolveFilterOption(option);
|
|
7176
|
-
return /* @__PURE__ */
|
|
7177
|
-
|
|
7217
|
+
return /* @__PURE__ */ jsxs74(
|
|
7218
|
+
Box28,
|
|
7178
7219
|
{
|
|
7179
|
-
className: classes.
|
|
7180
|
-
children:
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7220
|
+
className: classes.filter,
|
|
7221
|
+
children: [
|
|
7222
|
+
/* @__PURE__ */ jsx108(
|
|
7223
|
+
FormControlLabel3,
|
|
7224
|
+
{
|
|
7225
|
+
label: resolvedOption,
|
|
7226
|
+
control: /* @__PURE__ */ jsx108(
|
|
7227
|
+
Checkbox4,
|
|
7228
|
+
{
|
|
7229
|
+
disableRipple: true,
|
|
7230
|
+
onChange: () => handleFilterOptionClick(option),
|
|
7231
|
+
checked: isOptionChecked(resolvedOption)
|
|
7232
|
+
}
|
|
7233
|
+
)
|
|
7234
|
+
},
|
|
7235
|
+
resolvedOption
|
|
7236
|
+
),
|
|
7237
|
+
shouldShowCheckOnFilter?.(headCell.id, option) ? /* @__PURE__ */ jsx108(CheckIcon, { fontSize: "small", color: "action" }) : null
|
|
7238
|
+
]
|
|
7196
7239
|
},
|
|
7197
7240
|
resolvedOption
|
|
7198
7241
|
);
|
|
7199
7242
|
}
|
|
7200
7243
|
),
|
|
7201
7244
|
/* @__PURE__ */ jsx108(Divider9, {}),
|
|
7202
|
-
/* @__PURE__ */ jsxs74(FormControl5, { className: classes.filterCheckboxDropdown, children: [
|
|
7203
|
-
/* @__PURE__ */ jsx108(
|
|
7204
|
-
FormControlLabel3,
|
|
7205
|
-
{
|
|
7206
|
-
label: "Save Filters",
|
|
7207
|
-
control: /* @__PURE__ */ jsx108(
|
|
7208
|
-
Checkbox4,
|
|
7209
|
-
{
|
|
7210
|
-
disableRipple: true,
|
|
7211
|
-
checked: shouldSave,
|
|
7212
|
-
onChange: (e) => setShouldSave(e.target.checked)
|
|
7213
|
-
}
|
|
7214
|
-
)
|
|
7215
|
-
}
|
|
7216
|
-
),
|
|
7217
|
-
/* @__PURE__ */ jsx108(FormHelperText4, { sx: { margin: 0 }, children: "Filters auto-apply on return." })
|
|
7218
|
-
] }),
|
|
7219
|
-
/* @__PURE__ */ jsx108(Divider9, {}),
|
|
7220
7245
|
/* @__PURE__ */ jsxs74(Box28, { className: classes.applyFilterButtonsContainer, children: [
|
|
7221
7246
|
/* @__PURE__ */ jsx108(
|
|
7222
7247
|
ExtendedButton_default,
|
|
7223
7248
|
{
|
|
7249
|
+
copy: "Save as Default",
|
|
7224
7250
|
buttonType: "button",
|
|
7225
|
-
copy: "Deselect All",
|
|
7226
7251
|
variant: "text",
|
|
7227
|
-
|
|
7252
|
+
tooltip: "Persists those filters for future visits",
|
|
7253
|
+
className: classes.saveAsDefaultButton,
|
|
7254
|
+
onClick: () => handleApplyFilters(true)
|
|
7228
7255
|
}
|
|
7229
7256
|
),
|
|
7230
7257
|
/* @__PURE__ */ jsx108(
|
|
@@ -7233,15 +7260,7 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
7233
7260
|
copy: "Apply",
|
|
7234
7261
|
color: "primary",
|
|
7235
7262
|
buttonType: "submit",
|
|
7236
|
-
onClick: () =>
|
|
7237
|
-
const updatedFilters = {
|
|
7238
|
-
...headerFilters,
|
|
7239
|
-
[headCell.id]: [...selectedFilters]
|
|
7240
|
-
};
|
|
7241
|
-
onApplyFilters?.(updatedFilters, shouldSave);
|
|
7242
|
-
setAnchorEl(null);
|
|
7243
|
-
setShouldSave(false);
|
|
7244
|
-
}
|
|
7263
|
+
onClick: () => handleApplyFilters(false)
|
|
7245
7264
|
}
|
|
7246
7265
|
)
|
|
7247
7266
|
] })
|
|
@@ -7327,7 +7346,8 @@ var SmartTableHeader = ({
|
|
|
7327
7346
|
headerFilters,
|
|
7328
7347
|
onRequestSort,
|
|
7329
7348
|
onSelectAllClick,
|
|
7330
|
-
onApplyFilters
|
|
7349
|
+
onApplyFilters,
|
|
7350
|
+
shouldShowCheckOnFilter
|
|
7331
7351
|
}) => {
|
|
7332
7352
|
const { classes } = useStyles45();
|
|
7333
7353
|
const createSortHandler = (property) => (event) => {
|
|
@@ -7349,6 +7369,7 @@ var SmartTableHeader = ({
|
|
|
7349
7369
|
{
|
|
7350
7370
|
className: classes.tableHeaderContent,
|
|
7351
7371
|
align: "left",
|
|
7372
|
+
sx: { width: headCell.width ?? "auto" },
|
|
7352
7373
|
sortDirection: orderBy === headCell.id ? order : false,
|
|
7353
7374
|
children: [
|
|
7354
7375
|
/* @__PURE__ */ jsxs75(
|
|
@@ -7369,8 +7390,9 @@ var SmartTableHeader = ({
|
|
|
7369
7390
|
{
|
|
7370
7391
|
headCell,
|
|
7371
7392
|
headerFilters,
|
|
7372
|
-
|
|
7373
|
-
onApplyFilters
|
|
7393
|
+
numActiveFilters: headerFilters[headCell.id]?.length ?? 0,
|
|
7394
|
+
onApplyFilters,
|
|
7395
|
+
shouldShowCheckOnFilter
|
|
7374
7396
|
}
|
|
7375
7397
|
) : null
|
|
7376
7398
|
]
|
|
@@ -7571,7 +7593,7 @@ var Table_default = Table;
|
|
|
7571
7593
|
// src/components/TableDesktop/TableDesktop.tsx
|
|
7572
7594
|
import {
|
|
7573
7595
|
useCallback as useCallback2,
|
|
7574
|
-
useMemo as
|
|
7596
|
+
useMemo as useMemo3,
|
|
7575
7597
|
useState as useState17
|
|
7576
7598
|
} from "react";
|
|
7577
7599
|
import {
|
|
@@ -7708,7 +7730,9 @@ var TableDesktop = ({
|
|
|
7708
7730
|
handleClickOnClearFiltersButton,
|
|
7709
7731
|
deleteItem,
|
|
7710
7732
|
keyField = "id",
|
|
7711
|
-
|
|
7733
|
+
tableLayout = "auto",
|
|
7734
|
+
onApplyFilters,
|
|
7735
|
+
shouldShowCheckOnFilter
|
|
7712
7736
|
}) => {
|
|
7713
7737
|
const [order, setOrder] = useState17(appliedFilters?.sortDir || "desc");
|
|
7714
7738
|
const [orderBy, setOrderBy] = useState17(
|
|
@@ -7718,11 +7742,11 @@ var TableDesktop = ({
|
|
|
7718
7742
|
const [page] = useState17(0);
|
|
7719
7743
|
const { classes } = useStyles48();
|
|
7720
7744
|
const rowHeight = 56;
|
|
7721
|
-
const emptyRows =
|
|
7745
|
+
const emptyRows = useMemo3(
|
|
7722
7746
|
() => rowsPerPage - data.length,
|
|
7723
7747
|
[rowsPerPage, data]
|
|
7724
7748
|
);
|
|
7725
|
-
const visibleHeadCells =
|
|
7749
|
+
const visibleHeadCells = useMemo3(
|
|
7726
7750
|
() => headCells.filter((headCell) => headCell?.enabled ?? true),
|
|
7727
7751
|
[headCells]
|
|
7728
7752
|
);
|
|
@@ -7766,7 +7790,7 @@ var TableDesktop = ({
|
|
|
7766
7790
|
},
|
|
7767
7791
|
[selected]
|
|
7768
7792
|
);
|
|
7769
|
-
const renderTableRows =
|
|
7793
|
+
const renderTableRows = useMemo3(() => {
|
|
7770
7794
|
const sortedData = disableInternalSort ? data : stableSort2(data, getComparator(order, orderBy));
|
|
7771
7795
|
return sortedData.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((row, index) => {
|
|
7772
7796
|
const isItemSelected = selected.includes(row[keyField]);
|
|
@@ -7819,6 +7843,7 @@ var TableDesktop = ({
|
|
|
7819
7843
|
"aria-labelledby": "tableTitle",
|
|
7820
7844
|
"aria-label": "sticky table",
|
|
7821
7845
|
stickyHeader: true,
|
|
7846
|
+
style: { tableLayout },
|
|
7822
7847
|
children: [
|
|
7823
7848
|
/* @__PURE__ */ jsx113(
|
|
7824
7849
|
SmartTableHeader_default,
|
|
@@ -7832,7 +7857,8 @@ var TableDesktop = ({
|
|
|
7832
7857
|
headerFilters: headerFilters ?? {},
|
|
7833
7858
|
onRequestSort: handleRequestSort,
|
|
7834
7859
|
onSelectAllClick: handleSelectAllClick,
|
|
7835
|
-
onApplyFilters
|
|
7860
|
+
onApplyFilters,
|
|
7861
|
+
shouldShowCheckOnFilter
|
|
7836
7862
|
}
|
|
7837
7863
|
),
|
|
7838
7864
|
/* @__PURE__ */ jsx113(TableBody2, { children: rowsPerPage !== emptyRows ? renderTableRows : /* @__PURE__ */ jsx113(
|
|
@@ -7852,7 +7878,7 @@ var TableDesktop = ({
|
|
|
7852
7878
|
var TableDesktop_default = TableDesktop;
|
|
7853
7879
|
|
|
7854
7880
|
// src/components/TableHeader/TableHeader.tsx
|
|
7855
|
-
import { memo as memo22, useEffect as
|
|
7881
|
+
import { memo as memo22, useEffect as useEffect10, useState as useState18 } from "react";
|
|
7856
7882
|
import { ImportExport as ImportExportIcon } from "@mui/icons-material";
|
|
7857
7883
|
import { TableCell as TableCell4, TableHead as TableHead3, TableRow as TableRow4, TableSortLabel as TableSortLabel3 } from "@mui/material";
|
|
7858
7884
|
import { makeStyles as makeStyles49 } from "tss-react/mui";
|
|
@@ -7867,7 +7893,7 @@ var useStyles49 = makeStyles49()(() => ({
|
|
|
7867
7893
|
var TableHeader = ({ cells, onSort = null }) => {
|
|
7868
7894
|
const [sortableCells, setSortableCells] = useState18([]);
|
|
7869
7895
|
const { classes } = useStyles49();
|
|
7870
|
-
|
|
7896
|
+
useEffect10(() => {
|
|
7871
7897
|
setSortableCells(cells);
|
|
7872
7898
|
}, []);
|
|
7873
7899
|
const getNewSortDirection = (direction) => {
|