material-react-table 1.11.0 → 1.11.2

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.
@@ -0,0 +1,2 @@
1
+ import type { MRT_Localization } from '../MaterialReactTable';
2
+ export declare const MRT_Localization_SK: MRT_Localization;
@@ -33,6 +33,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
33
33
  groupingColumnId?: string | undefined;
34
34
  groupingValue?: unknown;
35
35
  getIsGrouped: () => boolean;
36
+ getGroupingValue: (columnId: string) => unknown;
36
37
  _groupingValuesCache: Record<string, any>;
37
38
  getIsSelected: () => boolean;
38
39
  getIsSomeSelected: () => boolean;
@@ -79,6 +80,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
79
80
  groupingColumnId?: string | undefined;
80
81
  groupingValue?: unknown;
81
82
  getIsGrouped: () => boolean;
83
+ getGroupingValue: (columnId: string) => unknown;
82
84
  _groupingValuesCache: Record<string, any>;
83
85
  getIsSelected: () => boolean;
84
86
  getIsSomeSelected: () => boolean;
@@ -131,6 +133,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
131
133
  groupingColumnId?: string | undefined;
132
134
  groupingValue?: unknown;
133
135
  getIsGrouped: () => boolean;
136
+ getGroupingValue: (columnId: string) => unknown;
134
137
  _groupingValuesCache: Record<string, any>;
135
138
  getIsSelected: () => boolean;
136
139
  getIsSomeSelected: () => boolean;
@@ -174,6 +177,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
174
177
  groupingColumnId?: string | undefined;
175
178
  groupingValue?: unknown;
176
179
  getIsGrouped: () => boolean;
180
+ getGroupingValue: (columnId: string) => unknown;
177
181
  _groupingValuesCache: Record<string, any>;
178
182
  getIsSelected: () => boolean;
179
183
  getIsSomeSelected: () => boolean;
@@ -237,6 +241,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
237
241
  groupingColumnId?: string | undefined;
238
242
  groupingValue?: unknown;
239
243
  getIsGrouped: () => boolean;
244
+ getGroupingValue: (columnId: string) => unknown;
240
245
  _groupingValuesCache: Record<string, any>;
241
246
  getIsSelected: () => boolean;
242
247
  getIsSomeSelected: () => boolean;
@@ -283,6 +288,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
283
288
  groupingColumnId?: string | undefined;
284
289
  groupingValue?: unknown;
285
290
  getIsGrouped: () => boolean;
291
+ getGroupingValue: (columnId: string) => unknown;
286
292
  _groupingValuesCache: Record<string, any>;
287
293
  getIsSelected: () => boolean;
288
294
  getIsSomeSelected: () => boolean;
@@ -335,6 +341,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
335
341
  groupingColumnId?: string | undefined;
336
342
  groupingValue?: unknown;
337
343
  getIsGrouped: () => boolean;
344
+ getGroupingValue: (columnId: string) => unknown;
338
345
  _groupingValuesCache: Record<string, any>;
339
346
  getIsSelected: () => boolean;
340
347
  getIsSomeSelected: () => boolean;
@@ -378,6 +385,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
378
385
  groupingColumnId?: string | undefined;
379
386
  groupingValue?: unknown;
380
387
  getIsGrouped: () => boolean;
388
+ getGroupingValue: (columnId: string) => unknown;
381
389
  _groupingValuesCache: Record<string, any>;
382
390
  getIsSelected: () => boolean;
383
391
  getIsSomeSelected: () => boolean;
@@ -776,7 +776,9 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
776
776
  React.createElement(ListItemIcon, null,
777
777
  React.createElement(FilterListOffIcon, null)),
778
778
  localization.clearFilter)),
779
- React.createElement(MenuItem, { disabled: showColumnFilters && !enableColumnFilterModes, divider: enableGrouping || enableHiding, key: 1, onClick: handleFilterByColumn, sx: commonMenuItemStyles },
779
+ React.createElement(MenuItem, { disabled: showColumnFilters && !enableColumnFilterModes, divider: enableGrouping || enableHiding, key: 1, onClick: showColumnFilters
780
+ ? handleOpenFilterModeMenu
781
+ : handleFilterByColumn, sx: commonMenuItemStyles },
780
782
  React.createElement(Box, { sx: commonListItemStyles },
781
783
  React.createElement(ListItemIcon, null,
782
784
  React.createElement(FilterListIcon, null)), (_g = localization.filterByColumn) === null || _g === void 0 ? void 0 :
@@ -1922,7 +1924,7 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
1922
1924
  };
1923
1925
 
1924
1926
  const MRT_TableHeadCell = ({ header, table }) => {
1925
- var _a, _b, _c, _d;
1927
+ var _a, _b, _c, _d, _f, _g;
1926
1928
  const theme = useTheme();
1927
1929
  const { getState, options: { enableColumnActions, enableColumnDragging, enableColumnOrdering, enableGrouping, enableMultiSort, layoutMode, muiTableHeadCellProps, }, refs: { tableHeadCellRefs }, setHoveredColumn, } = table;
1928
1930
  const { density, draggingColumn, grouping, hoveredColumn, showColumnFilters, } = getState();
@@ -2038,10 +2040,10 @@ const MRT_TableHeadCell = ({ header, table }) => {
2038
2040
  : undefined,
2039
2041
  } },
2040
2042
  React.createElement(Box, { className: "Mui-TableHeadCell-Content-Wrapper", sx: {
2041
- minWidth: `${Math.min(columnDef.header.length, 5)}ch`,
2043
+ minWidth: `${Math.min((_d = (_c = columnDef.header) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0, 5)}ch`,
2042
2044
  overflow: columnDefType === 'data' ? 'hidden' : undefined,
2043
2045
  textOverflow: 'ellipsis',
2044
- whiteSpace: ((_d = (_c = columnDef.header) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) < 20 ? 'nowrap' : 'normal',
2046
+ whiteSpace: ((_g = (_f = columnDef.header) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0) < 20 ? 'nowrap' : 'normal',
2045
2047
  '&:hover': {
2046
2048
  textOverflow: 'clip',
2047
2049
  },
@@ -2440,7 +2442,12 @@ const MRT_TableDetailPanel = ({ parentRowRef, row, rowIndex, table, virtualRow,
2440
2442
  const { getVisibleLeafColumns, getState, options: { layoutMode, muiTableBodyRowProps, muiTableDetailPanelProps, renderDetailPanel, }, } = table;
2441
2443
  const { isLoading } = getState();
2442
2444
  const tableRowProps = muiTableBodyRowProps instanceof Function
2443
- ? muiTableBodyRowProps({ isDetailPanel: true, row, staticRowIndex: rowIndex, table })
2445
+ ? muiTableBodyRowProps({
2446
+ isDetailPanel: true,
2447
+ row,
2448
+ staticRowIndex: rowIndex,
2449
+ table,
2450
+ })
2444
2451
  : muiTableBodyRowProps;
2445
2452
  const tableCellProps = muiTableDetailPanelProps instanceof Function
2446
2453
  ? muiTableDetailPanelProps({ row, table })