Skip to content

Commit

Permalink
Merge branch 'master' into datasource-aggregation
Browse files Browse the repository at this point in the history
  • Loading branch information
MBilalShafi authored Dec 20, 2024
2 parents ee6b3c8 + 38eabdb commit 7610ea6
Show file tree
Hide file tree
Showing 149 changed files with 1,511 additions and 1,602 deletions.
103 changes: 103 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,108 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 8.0.0-alpha.5

_Dec 19, 2024_

We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:

- 🌍 Improve Korean (ko-KR) locale on the Data Grid
- 🐞 Bugfixes

Special thanks go out to the community contributors who have helped make this release possible:
@good-jinu, @k-rajat19.
Following are all team members who have contributed to this release:
@alexfauquette, @cherniavskii, @flaviendelangle, @KenanYusuf, @LukasTy, @MBilalShafi, @romgrk.

<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->

### Data Grid

#### Breaking changes

- Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`.

- For `.root` element, use `slotProps.root`.
- For `.main` element (the one with `role="grid"`), use `slotProps.main`.

- `detailPanelExpandedRowIds` and `onDetailPanelExpandedRowIdsChange` props use a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array:

```diff
-detailPanelExpandedRowIds?: GridRowId[];
+detailPanelExpandedRowIds?: Set<GridRowId>;

-onDetailPanelExpandedRowIdsChange?: (ids: GridRowId[], details: GridCallbackDetails) => void;
+onDetailPanelExpandedRowIdsChange?: (ids: Set<GridRowId>, details: GridCallbackDetails) => void;
```

- `apiRef.current.getExpandedDetailPanels` and `apiRef.current.setExpandedDetailPanels` methods receive and return a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array.
- `gridDetailPanelExpandedRowIdsSelector` returns a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array.
- `gridDetailPanelExpandedRowsHeightCacheSelector` was removed.

#### `@mui/[email protected]`

- [DataGrid] Consider `columnGroupHeaderHeight` prop in `getTotalHeaderHeight` method (#15915) @k-rajat19
- [DataGrid] Fix autosizing with virtualized columns (#15116) @k-rajat19
- [DataGrid] Move `<Badge />` to leaf import (#15879) @romgrk
- [DataGrid] Move `<ListItemText />` and `<ListItemIcon />` to leaf import (#15869) @romgrk
- [DataGrid] Remove the Joy UI demo (#15913) @romgrk
- [DataGrid] Update quick filter input variant (#15909) @KenanYusuf
- [DataGrid] Use `slotProps` to forward props to `.main` and `.root` elements (#15870) @MBilalShafi
- [l10n] Improve Korean(ko-KR) locale (#15878) @good-jinu

#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')

Same changes as in `@mui/[email protected]`, plus:

- [DataGridPro] Use `Set` for `detailPanelExpandedRowIds` (#15835) @cherniavskii

#### `@mui/[email protected]` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')

Same changes as in `@mui/[email protected]`.

### Date and Time Pickers

#### Breaking changes

- The `<PickersMonth />` component has been moved inside the Month Calendar component — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#month-calendar).

- The `<PickersYear />` component has been moved inside the Year Calendar component — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#year-calendar).

#### `@mui/[email protected]`

- [pickers] Add verification to disable skipped hours in spring forward DST (#15849) @flaviendelangle
- [pickers] Remove `PickersMonth` and `PickersYear` from the theme and remove the `div` wrapping each button (#15806) @flaviendelangle
- [pickers] Use the new `ownerState` object on the `<PickersTextField />` component (#15863) @flaviendelangle

#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')

Same changes as in `@mui/[email protected]`.

### Charts

#### `@mui/[email protected]`

- [charts] Fix `<ScatterChart />` value type if `null` (#15917) @alexfauquette

#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')

Same changes as in `@mui/[email protected]`.

### Tree View

#### `@mui/[email protected]`

No changes since `@mui/[email protected]`.

#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')

Same changes as in `@mui/[email protected]`.

### Core

- [code-infra] Remove `@mui/material-nextjs` dependency (#15925) @LukasTy

## 8.0.0-alpha.4

_Dec 13, 2024_
Expand Down Expand Up @@ -39,6 +141,7 @@ Following are all team members who have contributed to this release:
-const output = useGridSelector(apiRef, selector, equals)
+const output = useGridSelector(apiRef, selector, arguments, equals)
```

- The default variant for text fields and selects in the filter panel has been changed to `outlined`.
- The "row spanning" feature is now stable.
```diff
Expand Down
17 changes: 11 additions & 6 deletions docs/data/date-pickers/custom-components/ActionBarComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { StaticDatePicker } from '@mui/x-date-pickers/StaticDatePicker';

import { usePickerTranslations } from '@mui/x-date-pickers/hooks';
import {
usePickerActionsContext,
usePickerTranslations,
} from '@mui/x-date-pickers/hooks';

function CustomActionBar(props) {
const { onAccept, onClear, onCancel, onSetToday, actions, className } = props;
const { actions, className } = props;
const translations = usePickerTranslations();
const { clearValue, setValueToToday, acceptValueChanges, cancelValueChanges } =
usePickerActionsContext();
const [anchorEl, setAnchorEl] = React.useState(null);
const open = Boolean(anchorEl);
const id = useId();
Expand All @@ -28,7 +33,7 @@ function CustomActionBar(props) {
return (
<MenuItem
onClick={() => {
onClear();
clearValue();
setAnchorEl(null);
}}
key={actionType}
Expand All @@ -42,7 +47,7 @@ function CustomActionBar(props) {
<MenuItem
onClick={() => {
setAnchorEl(null);
onCancel();
cancelValueChanges();
}}
key={actionType}
>
Expand All @@ -55,7 +60,7 @@ function CustomActionBar(props) {
<MenuItem
onClick={() => {
setAnchorEl(null);
onAccept();
acceptValueChanges();
}}
key={actionType}
>
Expand All @@ -68,7 +73,7 @@ function CustomActionBar(props) {
<MenuItem
onClick={() => {
setAnchorEl(null);
onSetToday();
setValueToToday();
}}
key={actionType}
>
Expand Down
17 changes: 11 additions & 6 deletions docs/data/date-pickers/custom-components/ActionBarComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { StaticDatePicker } from '@mui/x-date-pickers/StaticDatePicker';
import { PickersActionBarProps } from '@mui/x-date-pickers/PickersActionBar';
import { usePickerTranslations } from '@mui/x-date-pickers/hooks';
import {
usePickerActionsContext,
usePickerTranslations,
} from '@mui/x-date-pickers/hooks';

function CustomActionBar(props: PickersActionBarProps) {
const { onAccept, onClear, onCancel, onSetToday, actions, className } = props;
const { actions, className } = props;
const translations = usePickerTranslations();
const { clearValue, setValueToToday, acceptValueChanges, cancelValueChanges } =
usePickerActionsContext();
const [anchorEl, setAnchorEl] = React.useState<HTMLButtonElement | null>(null);
const open = Boolean(anchorEl);
const id = useId();
Expand All @@ -28,7 +33,7 @@ function CustomActionBar(props: PickersActionBarProps) {
return (
<MenuItem
onClick={() => {
onClear();
clearValue();
setAnchorEl(null);
}}
key={actionType}
Expand All @@ -41,7 +46,7 @@ function CustomActionBar(props: PickersActionBarProps) {
<MenuItem
onClick={() => {
setAnchorEl(null);
onCancel();
cancelValueChanges();
}}
key={actionType}
>
Expand All @@ -53,7 +58,7 @@ function CustomActionBar(props: PickersActionBarProps) {
<MenuItem
onClick={() => {
setAnchorEl(null);
onAccept();
acceptValueChanges();
}}
key={actionType}
>
Expand All @@ -65,7 +70,7 @@ function CustomActionBar(props: PickersActionBarProps) {
<MenuItem
onClick={() => {
setAnchorEl(null);
onSetToday();
setValueToToday();
}}
key={actionType}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { DateCalendar } from '@mui/x-date-pickers/DateCalendar';

const CustomMonthButton = styled('button')({
margin: '8px 0',
height: 36,
width: 72,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { DateCalendar } from '@mui/x-date-pickers/DateCalendar';

const CustomMonthButton = styled('button')({
margin: '8px 0',
height: 36,
width: 72,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { DateCalendar } from '@mui/x-date-pickers/DateCalendar';

const CustomYearButton = styled('button')({
margin: '8px 0',
height: 36,
width: 72,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { DateCalendar } from '@mui/x-date-pickers/DateCalendar';

const CustomYearButton = styled('button')({
margin: '8px 0',
height: 36,
width: 72,
});
Expand Down
18 changes: 11 additions & 7 deletions docs/data/date-pickers/custom-layout/AddComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import ListItemText from '@mui/material/ListItemText';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { StaticDatePicker } from '@mui/x-date-pickers/StaticDatePicker';

import RestaurantIcon from '@mui/icons-material/Restaurant';
import {
usePickerLayout,
Expand All @@ -17,17 +16,22 @@ import {
PickersLayoutContentWrapper,
} from '@mui/x-date-pickers/PickersLayout';

import { usePickerActionsContext } from '@mui/x-date-pickers/hooks';

function ActionList(props) {
const { onAccept, onClear, onCancel, onSetToday } = props;
const { className } = props;
const { clearValue, setValueToToday, acceptValueChanges, cancelValueChanges } =
usePickerActionsContext();

const actions = [
{ text: 'Accept', method: onAccept },
{ text: 'Clear', method: onClear },
{ text: 'Cancel', method: onCancel },
{ text: 'Today', method: onSetToday },
{ text: 'Accept', method: acceptValueChanges },
{ text: 'Clear', method: clearValue },
{ text: 'Cancel', method: cancelValueChanges },
{ text: 'Today', method: setValueToToday },
];

return (
<List>
<List className={className}>
{actions.map(({ text, method }) => (
<ListItem key={text} disablePadding>
<ListItemButton onClick={method}>
Expand Down
22 changes: 13 additions & 9 deletions docs/data/date-pickers/custom-layout/AddComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import ListItemText from '@mui/material/ListItemText';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { StaticDatePicker } from '@mui/x-date-pickers/StaticDatePicker';
import { PickersActionBarProps } from '@mui/x-date-pickers/PickersActionBar';
import RestaurantIcon from '@mui/icons-material/Restaurant';
import {
PickersLayoutProps,
Expand All @@ -17,18 +16,23 @@ import {
PickersLayoutRoot,
PickersLayoutContentWrapper,
} from '@mui/x-date-pickers/PickersLayout';
import { DateView } from '@mui/x-date-pickers/models';
import { PickersActionBarProps } from '@mui/x-date-pickers/PickersActionBar';
import { usePickerActionsContext } from '@mui/x-date-pickers/hooks';

function ActionList(props: PickersActionBarProps) {
const { onAccept, onClear, onCancel, onSetToday } = props;
const { className } = props;
const { clearValue, setValueToToday, acceptValueChanges, cancelValueChanges } =
usePickerActionsContext();

const actions = [
{ text: 'Accept', method: onAccept },
{ text: 'Clear', method: onClear },
{ text: 'Cancel', method: onCancel },
{ text: 'Today', method: onSetToday },
{ text: 'Accept', method: acceptValueChanges },
{ text: 'Clear', method: clearValue },
{ text: 'Cancel', method: cancelValueChanges },
{ text: 'Today', method: setValueToToday },
];

return (
<List>
<List className={className}>
{actions.map(({ text, method }) => (
<ListItem key={text} disablePadding>
<ListItemButton onClick={method}>
Expand Down Expand Up @@ -58,7 +62,7 @@ function RestaurantHeader() {
);
}

function CustomLayout(props: PickersLayoutProps<Dayjs | null, DateView>) {
function CustomLayout(props: PickersLayoutProps<Dayjs | null>) {
const { toolbar, tabs, content, actionBar, ownerState } = usePickerLayout(props);

return (
Expand Down
15 changes: 10 additions & 5 deletions docs/data/date-pickers/custom-layout/MovingActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { pickersLayoutClasses } from '@mui/x-date-pickers/PickersLayout';
import { StaticDatePicker } from '@mui/x-date-pickers/StaticDatePicker';

import { usePickerActionsContext } from '@mui/x-date-pickers/hooks';

function ActionList(props) {
const { onAccept, onClear, onCancel, onSetToday, className } = props;
const { className } = props;
const { clearValue, setValueToToday, acceptValueChanges, cancelValueChanges } =
usePickerActionsContext();

const actions = [
{ text: 'Accept', method: onAccept },
{ text: 'Clear', method: onClear },
{ text: 'Cancel', method: onCancel },
{ text: 'Today', method: onSetToday },
{ text: 'Accept', method: acceptValueChanges },
{ text: 'Clear', method: clearValue },
{ text: 'Cancel', method: cancelValueChanges },
{ text: 'Today', method: setValueToToday },
];

return (
Expand Down
15 changes: 10 additions & 5 deletions docs/data/date-pickers/custom-layout/MovingActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { pickersLayoutClasses } from '@mui/x-date-pickers/PickersLayout';
import { StaticDatePicker } from '@mui/x-date-pickers/StaticDatePicker';
import { PickersActionBarProps } from '@mui/x-date-pickers/PickersActionBar';
import { usePickerActionsContext } from '@mui/x-date-pickers/hooks';

function ActionList(props: PickersActionBarProps) {
const { onAccept, onClear, onCancel, onSetToday, className } = props;
const { className } = props;
const { clearValue, setValueToToday, acceptValueChanges, cancelValueChanges } =
usePickerActionsContext();

const actions = [
{ text: 'Accept', method: onAccept },
{ text: 'Clear', method: onClear },
{ text: 'Cancel', method: onCancel },
{ text: 'Today', method: onSetToday },
{ text: 'Accept', method: acceptValueChanges },
{ text: 'Clear', method: clearValue },
{ text: 'Cancel', method: cancelValueChanges },
{ text: 'Today', method: setValueToToday },
];

return (
// Propagate the className such that CSS selectors can be applied
<List className={className}>
Expand Down
Loading

0 comments on commit 7610ea6

Please sign in to comment.