Skip to content

Commit

Permalink
package upgrades excluding mui v6 and rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Aug 30, 2024
1 parent 0c573a2 commit dbcf553
Show file tree
Hide file tree
Showing 19 changed files with 1,219 additions and 1,253 deletions.
32 changes: 16 additions & 16 deletions apps/material-react-table-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@docsearch/js": "3.6.1",
"@emotion/react": "^11.13.0",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@faker-js/faker": "^8.4.1",
"@fortawesome/fontawesome-svg-core": "^6.6.0",
Expand All @@ -26,32 +26,32 @@
"@mui/material": "^5.16.5",
"@mui/x-charts": "^7.11.1",
"@mui/x-date-pickers": "^7.11.1",
"@next/mdx": "^14.2.5",
"@tanstack/react-query": "^5.51.15",
"@tanstack/react-table-devtools": "^8.19.3",
"@next/mdx": "^14.2.7",
"@tanstack/react-query": "^5.53.1",
"@tanstack/react-table-devtools": "^8.20.5",
"@types/mdx": "^2.0.13",
"dayjs": "^1.11.12",
"dayjs": "^1.11.13",
"export-to-csv": "^1.3.0",
"jspdf": "^2.5.1",
"jspdf-autotable": "^3.8.2",
"jspdf-autotable": "^3.8.3",
"material-react-table": "workspace:*",
"next": "14.2.5",
"next": "14.2.7",
"next-sitemap": "^4.2.3",
"prism-react-renderer": "^2.3.1",
"prism-react-renderer": "^2.4.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"zod": "^3.23.8"
},
"devDependencies": {
"@tanstack/eslint-plugin-query": "^5.51.15",
"@types/node": "^22.0.0",
"@types/react": "^18.3.3",
"@tanstack/eslint-plugin-query": "^5.53.0",
"@types/node": "^22.5.1",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"eslint": "9.8.0",
"eslint-config-next": "14.2.5",
"next-plausible": "^3.12.0",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"eslint": "9.9.1",
"eslint-config-next": "14.2.7",
"next-plausible": "^3.12.2",
"raw-loader": "^4.0.2",
"typescript": "5.5.4"
}
Expand Down
6 changes: 3 additions & 3 deletions apps/test-cra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.13.0",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mui/icons-material": "^5.16.5",
"@mui/material": "^5.16.5",
"@mui/x-date-pickers": "^7.11.1",
"@testing-library/jest-dom": "^6.4.8",
"@testing-library/react": "^16.0.0",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^14.5.2",
"material-react-table": "workspace:*",
"react": "^18.3.1",
Expand Down
20 changes: 10 additions & 10 deletions apps/test-remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@
"typecheck": "tsc"
},
"dependencies": {
"@emotion/react": "^11.13.0",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mui/icons-material": "^5.16.5",
"@mui/material": "^5.16.5",
"@mui/x-date-pickers": "^7.11.1",
"@remix-run/css-bundle": "^2.10.3",
"@remix-run/node": "^2.10.3",
"@remix-run/react": "^2.10.3",
"@remix-run/serve": "^2.10.3",
"isbot": "^5.1.13",
"@remix-run/css-bundle": "^2.11.2",
"@remix-run/node": "^2.11.2",
"@remix-run/react": "^2.11.2",
"@remix-run/serve": "^2.11.2",
"isbot": "^5.1.17",
"material-react-table": "workspace:*",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@remix-run/dev": "^2.10.3",
"@remix-run/eslint-config": "^2.10.3",
"@types/react": "^18.3.3",
"@remix-run/dev": "^2.11.2",
"@remix-run/eslint-config": "^2.11.2",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"eslint": "^9.8.0",
"eslint": "^9.9.1",
"typescript": "^5.5.4"
},
"engines": {
Expand Down
14 changes: 7 additions & 7 deletions apps/test-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"@emotion/react": "^11.13.0",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mui/icons-material": "^5.16.5",
"@mui/material": "^5.16.5",
Expand All @@ -20,15 +20,15 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^9.8.0",
"eslint": "^9.9.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.9",
"eslint-plugin-react-refresh": "^0.4.11",
"typescript": "^5.5.4",
"vite": "^5.3.5"
"vite": "^5.4.2"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"devDependencies": {
"prettier": "^3.3.3",
"turbo": "^2.0.9"
"turbo": "^2.1.1"
},
"engines": {
"node": ">=16.0.0"
Expand Down
42 changes: 21 additions & 21 deletions packages/material-react-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,31 +62,31 @@
"build-storybook": "storybook build"
},
"devDependencies": {
"@emotion/react": "^11.13.0",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@faker-js/faker": "^8.4.1",
"@mui/icons-material": "^5.16.5",
"@mui/material": "^5.16.5",
"@mui/x-date-pickers": "^7.11.1",
"@rollup/plugin-typescript": "^11.1.6",
"@size-limit/preset-small-lib": "^11.1.4",
"@storybook/addon-a11y": "^8.2.6",
"@storybook/addon-essentials": "^8.2.6",
"@storybook/addon-links": "^8.2.6",
"@storybook/addon-storysource": "^8.2.6",
"@storybook/blocks": "^8.2.6",
"@storybook/preview-api": "^8.2.6",
"@storybook/react": "^8.2.6",
"@storybook/react-vite": "^8.2.6",
"@types/node": "^22.0.0",
"@types/react": "^18.3.3",
"@storybook/addon-a11y": "^8.2.9",
"@storybook/addon-essentials": "^8.2.9",
"@storybook/addon-links": "^8.2.9",
"@storybook/addon-storysource": "^8.2.9",
"@storybook/blocks": "^8.2.9",
"@storybook/preview-api": "^8.2.9",
"@storybook/react": "^8.2.9",
"@storybook/react-vite": "^8.2.9",
"@types/node": "^22.5.1",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^9.8.0",
"eslint": "^9.9.1",
"eslint-plugin-mui-path-imports": "^0.0.15",
"eslint-plugin-perfectionist": "^3.0.0",
"eslint-plugin-perfectionist": "^3.3.0",
"eslint-plugin-storybook": "^0.8.0",
"prop-types": "^15.8.1",
"react": "^18.3.1",
Expand All @@ -98,11 +98,11 @@
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-peer-deps-external": "^2.2.4",
"size-limit": "^11.1.4",
"storybook": "^8.2.6",
"storybook": "^8.2.9",
"storybook-dark-mode": "^4.0.2",
"tslib": "^2.6.3",
"tslib": "^2.7.0",
"typescript": "^5.5.4",
"vite": "^5.3.5"
"vite": "^5.4.2"
},
"peerDependencies": {
"@emotion/react": ">=11.11",
Expand All @@ -114,9 +114,9 @@
"react-dom": ">=17.0"
},
"dependencies": {
"@tanstack/match-sorter-utils": "8.15.1",
"@tanstack/react-table": "8.19.3",
"@tanstack/react-virtual": "3.8.3",
"@tanstack/match-sorter-utils": "8.19.4",
"@tanstack/react-table": "8.20.5",
"@tanstack/react-virtual": "3.10.6",
"highlight-words": "1.2.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const MRT_TableBody = <TData extends MRT_RowData>({
rowVirtualizer,
staticRowIndex,
virtualRow: rowVirtualizer
? (rowOrVirtualRow as VirtualItem<HTMLTableRowElement>)
? (rowOrVirtualRow as VirtualItem)
: undefined,
};
const key = `${row.id}-${row.index}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
{tableCellProps.children ?? (
<>
{cell.getIsPlaceholder() ? (
columnDef.PlaceholderCell?.({ cell, column, row, table }) ?? null
(columnDef.PlaceholderCell?.({ cell, column, row, table }) ?? null)
) : showSkeletons !== false && (isLoading || showSkeletons) ? (
<Skeleton
animation="wave"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface MRT_TableBodyRowProps<TData extends MRT_RowData>
rowVirtualizer?: MRT_RowVirtualizer;
staticRowIndex: number;
table: MRT_TableInstance<TData>;
virtualRow?: VirtualItem<HTMLTableRowElement>;
virtualRow?: VirtualItem;
}

export const MRT_TableBodyRow = <TData extends MRT_RowData>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface MRT_TableDetailPanelProps<TData extends MRT_RowData>
rowVirtualizer?: MRT_RowVirtualizer;
staticRowIndex: number;
table: MRT_TableInstance<TData>;
virtualRow?: MRT_VirtualItem<HTMLTableRowElement>;
virtualRow?: MRT_VirtualItem;
}

export const MRT_TableDetailPanel = <TData extends MRT_RowData>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ export const MRT_TableFooterCell = <TData extends MRT_RowData>({
{tableCellProps.children ??
(footer.isPlaceholder
? null
: parseFromValuesOrFunc(columnDef.Footer, {
: (parseFromValuesOrFunc(columnDef.Footer, {
column,
footer,
table,
}) ??
columnDef.footer ??
null)}
null))}
</TableCell>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const MRT_FilterRangeSlider = <TData extends MRT_RowData>({
let [min, max] =
sliderProps.min !== undefined && sliderProps.max !== undefined
? [sliderProps.min, sliderProps.max]
: column.getFacetedMinMaxValues() ?? [0, 1];
: (column.getFacetedMinMaxValues() ?? [0, 1]);

//fix potential TanStack Table bugs where min or max is an array
if (Array.isArray(min)) min = min[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,11 @@ export const MRT_FilterTextField = <TData extends MRT_RowData>({
: '';

const filterPlaceholder = !isRangeFilter
? textFieldProps?.placeholder ??
localization.filterByColumn?.replace('{column}', String(columnDef.header))
? (textFieldProps?.placeholder ??
localization.filterByColumn?.replace(
'{column}',
String(columnDef.header),
))
: rangeFilterIndex === 0
? localization.min
: rangeFilterIndex === 1
Expand All @@ -141,7 +144,7 @@ export const MRT_FilterTextField = <TData extends MRT_RowData>({
? (column.getFilterValue() as [string, string])?.[
rangeFilterIndex as number
] || ''
: (column.getFilterValue() as string) ?? '',
: ((column.getFilterValue() as string) ?? ''),
);
const [autocompleteValue, setAutocompleteValue] =
useState<DropdownOption | null>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export const MRT_FilterOptionMenu = <TData extends MRT_RowData>({
{...rest}
>
{(header && column && columnDef
? columnDef.renderColumnFilterModeMenuItems?.({
? (columnDef.renderColumnFilterModeMenuItems?.({
column: column as any,
internalFilterOptions,
onSelectFilterMode: handleSelectFilterMode,
Expand All @@ -265,7 +265,7 @@ export const MRT_FilterOptionMenu = <TData extends MRT_RowData>({
internalFilterOptions,
onSelectFilterMode: handleSelectFilterMode,
table,
})
}))
: renderGlobalFilterModeMenuItems?.({
internalFilterOptions,
onSelectFilterMode: handleSelectFilterMode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ export const MRT_TableContainer = <TData extends MRT_RowData>({
useIsomorphicLayoutEffect(() => {
const topToolbarHeight =
typeof document !== 'undefined'
? topToolbarRef.current?.offsetHeight ?? 0
? (topToolbarRef.current?.offsetHeight ?? 0)
: 0;

const bottomToolbarHeight =
typeof document !== 'undefined'
? bottomToolbarRef?.current?.offsetHeight ?? 0
? (bottomToolbarRef?.current?.offsetHeight ?? 0)
: 0;

setTotalToolbarHeight(topToolbarHeight + bottomToolbarHeight);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const getMRT_RowExpandColumnDef = <TData extends MRT_RowData>(
id: 'mrt-row-expand',
size:
groupedColumnMode === 'remove'
? defaultColumn?.size ?? 180
? (defaultColumn?.size ?? 180)
: renderDetailPanel
? enableExpandAll
? 60
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ export const useMRT_TableInstance = <TData extends MRT_RowData>(
).map((col) => ({
[getColumnId(col)]:
col.filterFn instanceof Function
? col.filterFn.name ?? 'custom'
: col.filterFn ??
? (col.filterFn.name ?? 'custom')
: (col.filterFn ??
initialState?.columnFilterFns?.[getColumnId(col)] ??
getDefaultColumnFilterFn(col),
getDefaultColumnFilterFn(col)),
})),
),
);
Expand Down
2 changes: 1 addition & 1 deletion packages/material-react-table/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export type MRT_PaginationState = PaginationState;
export type MRT_RowSelectionState = RowSelectionState;
export type MRT_SortingState = SortingState;
export type MRT_Updater<T> = Updater<T>;
export type MRT_VirtualItem<T extends Element = Element> = VirtualItem<T>;
export type MRT_VirtualItem = VirtualItem;
export type MRT_VisibilityState = VisibilityState;

export type MRT_VirtualizerOptions<
Expand Down
Loading

0 comments on commit dbcf553

Please sign in to comment.