Skip to content

Commit 0e635f8

Browse files
committed
package and lint upgrades
1 parent 5e036c2 commit 0e635f8

22 files changed

+1839
-3098
lines changed

apps/mantine-react-table-docs/examples/aggregation-multi/sandbox/src/TS.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const localeStringOptions = {
1111
currency: 'USD',
1212
minimumFractionDigits: 0,
1313
maximumFractionDigits: 0,
14-
};
14+
} as const;
1515

1616
const Example = () => {
1717
const columns = useMemo<MRT_ColumnDef<Person>[]>(

apps/mantine-react-table-docs/package.json

+20-20
Original file line numberDiff line numberDiff line change
@@ -13,46 +13,46 @@
1313
"sitemap": "pnpm docs:sitemap"
1414
},
1515
"dependencies": {
16-
"@docsearch/js": "3.6.0",
16+
"@docsearch/js": "3.6.1",
1717
"@faker-js/faker": "^8.4.1",
18-
"@fortawesome/fontawesome-svg-core": "^6.5.2",
19-
"@fortawesome/free-solid-svg-icons": "^6.5.2",
18+
"@fortawesome/fontawesome-svg-core": "^6.6.0",
19+
"@fortawesome/free-solid-svg-icons": "^6.6.0",
2020
"@fortawesome/react-fontawesome": "^0.2.2",
21-
"@mantine/code-highlight": "7.10.1",
22-
"@mantine/core": "7.10.1",
23-
"@mantine/dates": "7.10.1",
24-
"@mantine/hooks": "7.10.1",
25-
"@mantine/modals": "7.10.1",
21+
"@mantine/code-highlight": "7.11.2",
22+
"@mantine/core": "7.11.2",
23+
"@mantine/dates": "7.11.2",
24+
"@mantine/hooks": "7.11.2",
25+
"@mantine/modals": "7.11.2",
2626
"@mdx-js/loader": "^3.0.1",
2727
"@mdx-js/react": "^3.0.1",
28-
"@next/mdx": "^14.2.4",
29-
"@tabler/icons-react": "3.5.0",
30-
"@tanstack/react-query": "^5.45.0",
28+
"@next/mdx": "^14.2.5",
29+
"@tabler/icons-react": "3.11.0",
30+
"@tanstack/react-query": "^5.51.5",
3131
"@types/mdx": "^2.0.13",
3232
"clsx": "^2.1.1",
3333
"dayjs": "^1.11.11",
3434
"export-to-csv": "^1.3.0",
3535
"jspdf": "^2.5.1",
3636
"jspdf-autotable": "^3.8.2",
3737
"mantine-react-table": "workspace:*",
38-
"next": "14.2.4",
38+
"next": "14.2.5",
3939
"next-sitemap": "^4.2.3",
4040
"react": "18.3.1",
4141
"react-dom": "18.3.1"
4242
},
4343
"devDependencies": {
44-
"@types/node": "^20.14.2",
44+
"@types/node": "^20.14.11",
4545
"@types/react": "^18.3.3",
4646
"@types/react-dom": "^18.3.0",
47-
"@typescript-eslint/eslint-plugin": "^7.13.0",
48-
"@typescript-eslint/parser": "^7.13.0",
49-
"eslint": "9.4.0",
50-
"eslint-config-next": "14.2.4",
47+
"@typescript-eslint/eslint-plugin": "^7.16.1",
48+
"@typescript-eslint/parser": "^7.16.1",
49+
"eslint": "9.7.0",
50+
"eslint-config-next": "14.2.5",
5151
"next-plausible": "^3.12.0",
52-
"postcss": "^8.4.38",
53-
"postcss-preset-mantine": "^1.15.0",
52+
"postcss": "^8.4.39",
53+
"postcss-preset-mantine": "^1.16.0",
5454
"postcss-simple-vars": "^7.0.1",
5555
"raw-loader": "^4.0.2",
56-
"typescript": "5.4.5"
56+
"typescript": "5.5.3"
5757
}
5858
}

apps/mantine-react-table-docs/public/sitemap-0.xml

+100-100
Large diffs are not rendered by default.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"storybook:dev": "turbo run storybook"
2828
},
2929
"devDependencies": {
30-
"prettier": "^3.3.2",
31-
"turbo": "^2.0.3"
30+
"prettier": "^3.3.3",
31+
"turbo": "^2.0.7"
3232
},
3333
"engines": {
3434
"node": ">=16.0.0"

packages/mantine-react-table/package.json

+28-28
Original file line numberDiff line numberDiff line change
@@ -79,63 +79,63 @@
7979
"storybook:dev": "storybook dev -p 6007"
8080
},
8181
"devDependencies": {
82-
"@babel/core": "^7.24.7",
82+
"@babel/core": "^7.24.9",
8383
"@babel/preset-react": "^7.24.7",
8484
"@faker-js/faker": "^8.4.1",
85-
"@mantine/core": "7.10.1",
86-
"@mantine/dates": "7.10.1",
87-
"@mantine/hooks": "7.10.1",
85+
"@mantine/core": "7.11.2",
86+
"@mantine/dates": "7.11.2",
87+
"@mantine/hooks": "7.11.2",
8888
"@rollup/plugin-babel": "^6.0.4",
8989
"@rollup/plugin-node-resolve": "^15.2.3",
9090
"@rollup/plugin-typescript": "^11.1.6",
9191
"@size-limit/preset-small-lib": "^11.1.4",
92-
"@storybook/addon-a11y": "^8.1.7",
93-
"@storybook/addon-essentials": "^8.1.7",
94-
"@storybook/addon-interactions": "^8.1.7",
95-
"@storybook/addon-links": "^8.1.7",
96-
"@storybook/addon-storysource": "^8.1.7",
97-
"@storybook/blocks": "^8.1.7",
98-
"@storybook/preview-api": "^8.1.7",
99-
"@storybook/react": "^8.1.7",
100-
"@storybook/react-vite": "^8.1.7",
92+
"@storybook/addon-a11y": "^8.2.4",
93+
"@storybook/addon-essentials": "^8.2.4",
94+
"@storybook/addon-interactions": "^8.2.4",
95+
"@storybook/addon-links": "^8.2.4",
96+
"@storybook/addon-storysource": "^8.2.4",
97+
"@storybook/blocks": "^8.2.4",
98+
"@storybook/preview-api": "^8.2.4",
99+
"@storybook/react": "^8.2.4",
100+
"@storybook/react-vite": "^8.2.4",
101101
"@storybook/testing-library": "^0.2.2",
102-
"@tabler/icons-react": "3.5.0",
103-
"@types/node": "^20.14.2",
102+
"@tabler/icons-react": "3.11.0",
103+
"@types/node": "^20.14.11",
104104
"@types/react": "^18.3.3",
105105
"@types/react-dom": "^18.3.0",
106-
"@typescript-eslint/eslint-plugin": "^7.13.0",
107-
"@typescript-eslint/parser": "^7.13.0",
106+
"@typescript-eslint/eslint-plugin": "^7.16.1",
107+
"@typescript-eslint/parser": "^7.16.1",
108108
"@vitejs/plugin-react": "^4.3.1",
109109
"clsx": "^2.1.1",
110110
"dayjs": "^1.11.11",
111-
"eslint": "^9.4.0",
111+
"eslint": "^9.7.0",
112112
"eslint-plugin-perfectionist": "^2.11.0",
113-
"mantine-contextmenu": "^7.10.1",
114-
"postcss": "^8.4.38",
115-
"postcss-preset-mantine": "^1.15.0",
113+
"mantine-contextmenu": "^7.11.2",
114+
"postcss": "^8.4.39",
115+
"postcss-preset-mantine": "^1.16.0",
116116
"postcss-simple-vars": "^7.0.1",
117117
"prop-types": "^15.8.1",
118118
"react": "^18.3.1",
119119
"react-dom": "^18.3.1",
120120
"react-is": "^18.3.1",
121-
"rollup": "^4.18.0",
121+
"rollup": "^4.18.1",
122122
"rollup-plugin-copy": "^3.5.0",
123123
"rollup-plugin-delete": "^2.0.0",
124124
"rollup-plugin-dts": "^6.1.1",
125125
"rollup-plugin-peer-deps-external": "^2.2.4",
126126
"rollup-plugin-postcss": "^4.0.2",
127127
"size-limit": "^11.1.4",
128-
"storybook": "^8.1.7",
129-
"storybook-dark-mode": "^4.0.1",
128+
"storybook": "^8.2.4",
129+
"storybook-dark-mode": "^4.0.2",
130130
"tslib": "^2.6.3",
131-
"typescript": "^5.4.5",
131+
"typescript": "^5.5.3",
132132
"typescript-plugin-css-modules": "^5.1.0",
133-
"vite": "^5.2.13"
133+
"vite": "^5.3.4"
134134
},
135135
"dependencies": {
136136
"@tanstack/match-sorter-utils": "8.15.1",
137-
"@tanstack/react-table": "8.17.3",
138-
"@tanstack/react-virtual": "3.5.1"
137+
"@tanstack/react-table": "8.19.3",
138+
"@tanstack/react-virtual": "3.8.3"
139139
},
140140
"peerDependencies": {
141141
"@mantine/core": "^7.9",

packages/mantine-react-table/src/components/body/MRT_TableBodyCell.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
250250
{tableCellProps.children ?? (
251251
<>
252252
{cell.getIsPlaceholder() ? (
253-
columnDef.PlaceholderCell?.({ cell, column, row, table }) ?? null
253+
(columnDef.PlaceholderCell?.({ cell, column, row, table }) ?? null)
254254
) : showSkeletons !== false && (isLoading || showSkeletons) ? (
255255
<Skeleton height={20} width={skeletonWidth} {...skeletonProps} />
256256
) : columnDefType === 'display' &&

packages/mantine-react-table/src/components/buttons/MRT_ExpandAllButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const MRT_ExpandAllButton = <TData extends MRT_RowData>({
3939
return (
4040
<Tooltip
4141
label={
42-
actionIconProps?.title ?? isAllRowsExpanded
42+
(actionIconProps?.title ?? isAllRowsExpanded)
4343
? localization.collapseAll
4444
: localization.expandAll
4545
}

packages/mantine-react-table/src/components/buttons/MRT_ExpandButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const MRT_ExpandButton = <TData extends MRT_RowData>({
5959
<Tooltip
6060
disabled={!canExpand && !DetailPanel}
6161
label={
62-
actionIconProps?.title ?? isExpanded
62+
(actionIconProps?.title ?? isExpanded)
6363
? localization.collapse
6464
: localization.expand
6565
}

packages/mantine-react-table/src/components/footer/MRT_TableFooterCell.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ export const MRT_TableFooterCell = <TData extends MRT_RowData>({
105105
{tableCellProps.children ??
106106
(footer.isPlaceholder
107107
? null
108-
: parseFromValuesOrFunc(columnDef.Footer, {
108+
: (parseFromValuesOrFunc(columnDef.Footer, {
109109
column,
110110
footer,
111111
table,
112112
}) ??
113113
columnDef.footer ??
114-
null)}
114+
null))}
115115
</TableTh>
116116
);
117117
};

packages/mantine-react-table/src/components/head/MRT_TableHeadCell.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
147147
header,
148148
table,
149149
})
150-
: columnDef?.Header ?? (columnDef.header as ReactNode);
150+
: (columnDef?.Header ?? (columnDef.header as ReactNode));
151151

152152
return (
153153
<TableTh
@@ -215,7 +215,7 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
215215
>
216216
{header.isPlaceholder
217217
? null
218-
: tableCellProps.children ?? (
218+
: (tableCellProps.children ?? (
219219
<Flex
220220
className={clsx(
221221
'mrt-table-head-cell-content',
@@ -299,7 +299,7 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
299299
<MRT_TableHeadCellResizeHandle header={header} table={table} />
300300
)}
301301
</Flex>
302-
)}
302+
))}
303303
{columnFilterDisplayMode === 'subheader' && column.getCanFilter() && (
304304
<MRT_TableHeadCellFilterContainer header={header} table={table} />
305305
)}

packages/mantine-react-table/src/components/inputs/MRT_EditCellTextInput.tsx

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { type FocusEvent, type KeyboardEvent, useState } from 'react';
2-
import {
2+
import {
33
MultiSelect,
44
Select,
55
TextInput,
66
type TextInputProps,
77
type SelectProps,
8-
type MultiSelectProps
8+
type MultiSelectProps,
99
} from '@mantine/core';
1010
import {
1111
type HTMLPropsRef,
@@ -16,7 +16,6 @@ import {
1616
} from '../../types';
1717
import { parseFromValuesOrFunc } from '../../utils/utils';
1818

19-
2019
interface PropsTextInput<TData extends MRT_RowData, TValue = MRT_CellValue>
2120
extends TextInputProps {
2221
cell: MRT_Cell<TData, TValue>;
@@ -35,9 +34,9 @@ interface PropsMultiSelect<TData extends MRT_RowData, TValue = MRT_CellValue>
3534
table: MRT_TableInstance<TData>;
3635
}
3736

38-
type MRT_TextInputProps = TextInputProps & HTMLPropsRef<HTMLInputElement>
39-
type MRT_SelectProps = SelectProps & HTMLPropsRef<HTMLInputElement>
40-
type MRT_MultiSelectProps = MultiSelectProps & HTMLPropsRef<HTMLInputElement>
37+
type MRT_TextInputProps = TextInputProps & HTMLPropsRef<HTMLInputElement>;
38+
type MRT_SelectProps = SelectProps & HTMLPropsRef<HTMLInputElement>;
39+
type MRT_MultiSelectProps = MultiSelectProps & HTMLPropsRef<HTMLInputElement>;
4140

4241
export const MRT_EditCellTextInput = <TData extends MRT_RowData>({
4342
cell,

packages/mantine-react-table/src/components/inputs/MRT_FilterRangeSlider.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const MRT_FilterRangeSlider = <TData extends MRT_RowData>({
3636
let [min, max] =
3737
rangeSliderProps.min !== undefined && rangeSliderProps.max !== undefined
3838
? [rangeSliderProps.min, rangeSliderProps.max]
39-
: column.getFacetedMinMaxValues() ?? [0, 1];
39+
: (column.getFacetedMinMaxValues() ?? [0, 1]);
4040

4141
//fix potential TanStack Table bugs where min or max is an array
4242
if (Array.isArray(min)) min = min[0];

packages/mantine-react-table/src/components/inputs/MRT_FilterTextInput.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,11 @@ export const MRT_FilterTextInput = <TData extends MRT_RowData>({
9999
? localizedFilterOption(localization, currentFilterOption)
100100
: '';
101101
const filterPlaceholder = !isRangeFilter
102-
? textInputProps?.placeholder ??
103-
localization.filterByColumn?.replace('{column}', String(columnDef.header))
102+
? (textInputProps?.placeholder ??
103+
localization.filterByColumn?.replace(
104+
'{column}',
105+
String(columnDef.header),
106+
))
104107
: rangeFilterIndex === 0
105108
? localization.min
106109
: rangeFilterIndex === 1
@@ -144,7 +147,7 @@ export const MRT_FilterTextInput = <TData extends MRT_RowData>({
144147
? (column.getFilterValue() as [string, string])?.[
145148
rangeFilterIndex as number
146149
] || ''
147-
: (column.getFilterValue() as string) ?? '',
150+
: ((column.getFilterValue() as string) ?? ''),
148151
);
149152

150153
const [debouncedFilterValue] = useDebouncedValue(

packages/mantine-react-table/src/components/menus/MRT_FilterOptionMenu.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export const MRT_FilterOptionMenu = <TData extends MRT_RowData>({
228228
return (
229229
<Menu.Dropdown>
230230
{(header && column && columnDef
231-
? columnDef.renderColumnFilterModeMenuItems?.({
231+
? (columnDef.renderColumnFilterModeMenuItems?.({
232232
column: column as any,
233233
internalFilterOptions,
234234
onSelectFilterMode: handleSelectFilterMode,
@@ -239,7 +239,7 @@ export const MRT_FilterOptionMenu = <TData extends MRT_RowData>({
239239
internalFilterOptions,
240240
onSelectFilterMode: handleSelectFilterMode,
241241
table,
242-
})
242+
}))
243243
: renderGlobalFilterModeMenuItems?.({
244244
internalFilterOptions,
245245
onSelectFilterMode: handleSelectFilterMode,

packages/mantine-react-table/src/components/table/MRT_TableContainer.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ export const MRT_TableContainer = <TData extends MRT_RowData>({
5151
useIsomorphicLayoutEffect(() => {
5252
const topToolbarHeight =
5353
typeof document !== 'undefined'
54-
? topToolbarRef.current?.offsetHeight ?? 0
54+
? (topToolbarRef.current?.offsetHeight ?? 0)
5555
: 0;
5656

5757
const bottomToolbarHeight =
5858
typeof document !== 'undefined'
59-
? bottomToolbarRef?.current?.offsetHeight ?? 0
59+
? (bottomToolbarRef?.current?.offsetHeight ?? 0)
6060
: 0;
6161

6262
setTotalToolbarHeight(topToolbarHeight + bottomToolbarHeight);

packages/mantine-react-table/src/hooks/display-columns/getMRT_RowExpandColumnDef.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const getMRT_RowExpandColumnDef = <TData extends MRT_RowData>(
7878
id: 'mrt-row-expand',
7979
size:
8080
groupedColumnMode === 'remove'
81-
? defaultColumn?.size ?? 180
81+
? (defaultColumn?.size ?? 180)
8282
: renderDetailPanel
8383
? enableExpandAll
8484
? 60

packages/mantine-react-table/src/hooks/useMRT_ColumnVirtualizer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const useMRT_ColumnVirtualizer = <
9393
}) as unknown as MRT_ColumnVirtualizer<TScrollElement, TItemElement>;
9494

9595
const virtualColumns = columnVirtualizer.getVirtualItems();
96-
columnVirtualizer.virtualColumns = virtualColumns;
96+
columnVirtualizer.virtualColumns = virtualColumns as any;
9797
const numColumns = virtualColumns.length;
9898

9999
if (numColumns) {

packages/mantine-react-table/src/hooks/useMRT_RowVirtualizer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const useMRT_RowVirtualizer = <
6565
...rowVirtualizerProps,
6666
}) as unknown as MRT_RowVirtualizer<TScrollElement, TItemElement>;
6767

68-
rowVirtualizer.virtualRows = rowVirtualizer.getVirtualItems();
68+
rowVirtualizer.virtualRows = rowVirtualizer.getVirtualItems() as any;
6969

7070
if (rowVirtualizerInstanceRef) {
7171
//@ts-ignore

packages/mantine-react-table/src/hooks/useMRT_TableInstance.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ export const useMRT_TableInstance = <TData extends MRT_RowData>(
9595
).map((col) => ({
9696
[getColumnId(col)]:
9797
col.filterFn instanceof Function
98-
? col.filterFn.name ?? 'custom'
99-
: col.filterFn ??
98+
? (col.filterFn.name ?? 'custom')
99+
: (col.filterFn ??
100100
initialState?.columnFilterFns?.[getColumnId(col)] ??
101-
getDefaultColumnFilterFn(col),
101+
getDefaultColumnFilterFn(col)),
102102
})),
103103
),
104104
);

packages/mantine-react-table/src/types.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ export type MRT_PaginationState = PaginationState;
121121
export type MRT_RowSelectionState = RowSelectionState;
122122
export type MRT_SortingState = SortingState;
123123
export type MRT_Updater<T> = Updater<T>;
124-
export type MRT_VirtualItem = VirtualItem;
124+
export type MRT_VirtualItem<T extends Element = HTMLTableRowElement> =
125+
VirtualItem<T>;
125126
export type MRT_VisibilityState = VisibilityState;
126127

127128
export type MRT_VirtualizerOptions<

0 commit comments

Comments
 (0)