Skip to content

Commit

Permalink
Merges 'next' into 'hide-column-separator'
Browse files Browse the repository at this point in the history
  • Loading branch information
MBilalShafi committed Dec 18, 2022
2 parents 22d2c25 + 3f247e5 commit 80ebcb1
Show file tree
Hide file tree
Showing 676 changed files with 10,429 additions and 5,201 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297 # v2.1.35
uses: github/codeql-action/init@a669cc5936cc5e1b6a362ec1ff9e410dc570d190 # v2.1.36
with:
languages: typescript
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -29,4 +29,4 @@ jobs:
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297 # v2.1.35
uses: github/codeql-action/analyze@a669cc5936cc5e1b6a362ec1ff9e410dc570d190 # v2.1.36
2 changes: 1 addition & 1 deletion .github/workflows/l10n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
issues: write
steps:
- run: echo "${{ github.actor }}"
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
- name: Use Node.js 14.x
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
persist-credentials: false

Expand All @@ -44,6 +44,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297 # v2.1.35
uses: github/codeql-action/upload-sarif@a669cc5936cc5e1b6a362ec1ff9e410dc570d190 # v2.1.36
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/support-stackoverflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
contents: read
issues: write
steps:
- uses: dessant/support-requests@876a4de3922dd57434a451e58ad679f986c5da97 # v2.1.2
- uses: dessant/support-requests@b1303caf4438e66dea1130aa4c30189dc28e690d # v3.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# Label used to mark issues as support requests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vale-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
- uses: errata-ai/vale-action@c4213d4de3d5f718b8497bd86161531c78992084 # v2.0.1
with:
reporter: github-pr-review
Expand Down
241 changes: 241 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,193 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 6.0.0-alpha.12

_Dec 16, 2022_

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

- 🚀 The `apiRef` prop is now available in the `@mui/x-data-grid` package:

```tsx
const apiRef = useGridApiRef();

return (
<DataGrid apiRef={apiRef} {...other} />
)
```

See [the documentation](https://next.mui.com/x/react-data-grid/api-object/) for more information.

- 🎁 The `DataGridPremium` now supports cell selection:

```tsx
<DataGridPremium unstable_cellSelection />
```

See [the documentation](https://next.mui.com/x/react-data-grid/selection/#cell-selection) for more information

- 🌍 Support the Right To Left orientation on the fields components
- 📚 Documentation improvements
- 🐞 Bugfixes

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

#### Breaking changes

- The `showCellRightBorder` was renamed to `showCellVerticalBorder`
- The `showColumnRightBorder` was renamed to `showColumnVerticalBorder`
- The `.MuiDataGrid-withBorder` CSS class was renamed to `.MuiDataGrid-withBorderColor` and it only sets `border-color` CSS property now.
- The following undocumented properties from `apiRef` were removed: `footerRef`, `headerRef`, `columnHeadersElementRef`, `columnHeadersContainerElementRef`
- The `GridHeaderPlaceholder` component was removed.
- The `MAX_PAGE_SIZE` constant was removed.
- The `useGridScrollFn` hook was removed.

#### Changes

- [DataGrid] Display sort column menu items as per `sortingOrder` prop (#7180) @MBilalShafi
- [DataGrid] Support `apiRef` in Community package (#6773) @cherniavskii
- [DataGridPremium] Add support for cell selection (#6567) @m4theushw
- [DataGridPremium] Use separate cache for aggregation columns pre-processor (#7142) @m4theushw
- [DataGridPro] Fix missing border in right-pinned columns (#4197) @cherniavskii
- [DataGridPro] Fix wrong border color on skeleton cells (#7202) @cherniavskii

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

#### Changes

- [fields] Fix bug introduced by RTL in single input range fields (#7189) @alexfauquette
- [fields] Support RTL out of the box (#6715) @alexfauquette
- [pickers] Clean `autoFocus` behavior on fields and new pickers (#7153) @flaviendelangle
- [pickers] Fix label on the new range pickers (#7210) @flaviendelangle
- [pickers] Fix wrong component name on `StaticNextDateTime` (#7187) @flaviendelangle

### Docs

- [docs] Add docs section about field placeholders' localization (#7139) @flaviendelangle
- [docs] Create a `DemoGrid` component to unify demos with several components (#7057) @flaviendelangle
- [docs] Document aggregation selectors (#7148) @cherniavskii
- [docs] Fix 301 links to demo pages in API pages (#7197) @oliviertassinari
- [docs] Fix errors and warning in demos (#7209) @LukasTy
- [docs] Use `DemoContainer` and `DemoItem` on every picker demo (#7149) @flaviendelangle

### Core

- [core] Fix broken test (#7179) @flaviendelangle

## 6.0.0-alpha.11

_Dec 8, 2022_

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

- 🚀 Add dragging support for the new Date Range Picker (`NextDateRangePicker`) (#6763) @LukasTy
- ⚡️ Improve performance of the `day` view (#7066) @flaviendelangle
- ✨ Fix lazy-loading feature not working in `DataGridPremium` (#7124) @m4theushw
- 🐞 Bugfixes

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

#### Breaking changes

- The `filterPanelOperators` translation key was renamed to `filterPanelOperator` (#7062) @MBilalShafi
- The `components.Header` slot was removed. Use `components.Toolbar` slot instead (#6999) @cherniavskii

#### Changes

- [DataGrid] Fix rows not rendering properly after height change (#6892) @MBilalShafi
- [DataGrid] Remove `Header` slot (#6999) @cherniavskii
- [DataGrid] Rename `filterPanelOperators` -> `filterPanelOperator` (#7062) @MBilalShafi
- [DataGridPremium] Add support for lazy-loading (#7124) @m4theushw
- [DataGridPremium] Pass `groupId` to aggregation function (#7003) @m4theushw

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

#### Breaking changes

- Remove the callback version of the `action` prop on the `actionBar` slot (#7038) @flaviendelangle

The `action` prop of the `actionBar` slot is no longer supporting a callback.
Instead, you can pass a callback at the slot level:

```diff
<DatePicker
componentsProps={{
- actionBar: {
- actions: (variant) => (variant === 'desktop' ? [] : ['clear']),
- },
+ actionBar: ({ wrapperVariant }) => ({
+ actions: wrapperVariant === 'desktop' ? [] : ['clear'],
+ }),
}}
/>
```

- The `selectedDays` prop has been removed from the `Day` component (#7066) @flaviendelangle
If you need to access it, you can control the value and pass it to the slot using `componentsProps`:

```tsx
function CustomDay({ selectedDay, ...other }) {
// do something with 'selectedDay'
return <PickersDay {...other} />;
}
function App() {
const [value, setValue] = React.useState(null);
return (
<DatePicker
value={value}
onChange={(newValue) => setValue(newValue)}
components={{ Day: CustomDay }}
componentsProps={{
day: { selectedDay: value },
}}
/>
);
}
```

- The `currentlySelectingRangeEnd` / `setCurrentlySelectingRangeEnd` props on the Date Range Picker toolbar have been renamed to `rangePosition` / `onRangePositionChange` (#6989) @flaviendelangle

```diff
const CustomToolbarComponent = props => (
<div>
- <button onChange={() => props.setCurrentlySelectingRangeEnd('end')}>Edit end date</button>
+ <button onClick={() => props.onRangePositionChange('end')}>Edit end date</button>
- <div>Is editing end date: {props.currentlySelectingRangeEnd === 'end'}</div>
+ <div>Is editing end date: {props.rangePosition === 'end'}</div>
</div>
)
<DateRangePicker
components={{
Toolbar: CustomToolbarComponent
}}
/>
```

#### Changes

- [DateRangePicker] Add dragging support to edit range (#6763) @LukasTy
- [pickers] Fix lost props on Date Range Pickers (#7092) @flaviendelangle
- [pickers] Fix toolbar on the new range pickers (#6989) @flaviendelangle
- [pickers] Improve performance of `DayCalendar` (#7066) @flaviendelangle
- [pickers] Initialize date without time when selecting year or month (#7120) @LukasTy
- [pickers] Remove the callback version of the `action` prop in the `actionBar` component slot (#7038) @flaviendelangle

### Docs

- [docs] Add `GridCell` change in migration guide (#7087) @MBilalShafi
- [docs] Fix API page ad space regression (#7051) @oliviertassinari
- [docs] Update localization doc to use existing locale (#7102) @LukasTy

### Core

- [core] Add codemod to move l10n translation (#7027) @alexfauquette
- [core] Add notes to remove the legacy pickers internals (#7133) @flaviendelangle
- [core] Remove `internals-fields` imports (#7119) @flaviendelangle
- [core] Remove unused code (#7094) @flaviendelangle
- [core] Sync `ApiPage.js` with monorepo (#7073) @oliviertassinari
- [test] Fix karma-mocha assertion error messages (#7054) @cherniavskii

## 6.0.0-alpha.10

_Dec 1, 2022_
Expand Down Expand Up @@ -1188,6 +1375,60 @@ You can find more information about the new api, including how to set those tran
- [test] Skip tests for column pinning and dynamic row height (#5997) @m4theushw
- [website] Improve security header @oliviertassinari

## 5.17.16

_Dec 16, 2022_

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

- 🐞 Bugfixes

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

#### Changes

- [DataGrid] Display sort column menu items as per `sortingOrder` prop (#7125) @hanbin9775
- [DataGrid] Fix flickering on mount (#7155) @cherniavskii
- [DataGridPremium] Use separate cache for aggregation columns pre-processor (#7174) @m4theushw

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

#### Changes

- [DateTimePicker] Update export pattern (#7172) @kealjones-wk

### Docs

- [docs] Document aggregation selectors (#7151) @cherniavskii

## 5.17.15

_Dec 8, 2022_

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

- ✨ Fix lazy-loading not working in `DataGridPremium` (#7130) @m4theushw
- 🐞 Bugfixes

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

#### Changes

- [DataGridPremium] Add support for lazy-loading (#7130) @m4theushw
- [DataGridPremium] Pass `groupId` to the aggregation function (#7143) @m4theushw

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

#### Changes

- [pickers] Initialize date without time when selecting year or month (#7136) @LukasTy

### Docs

- [docs] Fix the nested import on the api pages (#7134) @flaviendelangle
- [docs] Keep track of the localization completion (#7099) @alexfauquette
- [docs] Update localization doc to use existing locale (#7104) @LukasTy

## 5.17.14

_Dec 1, 2022_
Expand Down
6 changes: 3 additions & 3 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"@emotion/styled": "^11.10.5",
"@material-ui/core": "^5.0.0-beta.5",
"@material-ui/icons": "^5.0.0-beta.5",
"@mui/material": "^5.10.14",
"@mui/material": "^5.10.17",
"@mui/x-data-grid": "^4.0.0",
"@visx/xychart": "^2.16.0",
"ag-grid-community": "^28.2.1",
"ag-grid-react": "^28.2.1",
"css-loader": "^6.7.1",
"css-loader": "^6.7.2",
"html-webpack-plugin": "^5.5.0",
"mui-plus": "^0.0.15",
"playwright": "^1.27.1",
Expand All @@ -26,6 +26,6 @@
"serve-handler": "^6.1.5",
"style-loader": "^3.3.1",
"webpack": "^5.75.0",
"webpack-cli": "^4.10.0"
"webpack-cli": "^5.0.1"
}
}
4 changes: 4 additions & 0 deletions docs/data/data-grid/aggregation/aggregation.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ In the example below, you can see that all the aggregation functions are rendere

{{"demo": "AggregationRenderCell.js", "bg": "inline", "defaultCodeOpen": false}}

## Selectors

{{"component": "modules/components/SelectorsDocs.js", "category": "Aggregation"}}

## API

- [DataGrid](/x/api/data-grid/data-grid/)
Expand Down
4 changes: 2 additions & 2 deletions docs/data/data-grid/api-object/UseGridApiRef.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import Button from '@mui/material/Button';
import Stack from '@mui/material/Stack';
import Box from '@mui/material/Box';
import { DataGridPro, useGridApiRef } from '@mui/x-data-grid-pro';
import { DataGrid, useGridApiRef } from '@mui/x-data-grid';
import { useDemoData } from '@mui/x-data-grid-generator';

export default function UseGridApiRef() {
Expand All @@ -20,7 +20,7 @@ export default function UseGridApiRef() {
<Stack spacing={1} sx={{ width: '100%' }} alignItems="flex-start">
<Button onClick={handleGoToPage1}>Go to page 1</Button>
<Box sx={{ height: 400, width: '100%' }}>
<DataGridPro {...data} apiRef={apiRef} pagination pageSize={10} />
<DataGrid {...data} apiRef={apiRef} pagination pageSize={10} />
</Box>
</Stack>
);
Expand Down
4 changes: 2 additions & 2 deletions docs/data/data-grid/api-object/UseGridApiRef.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import Button from '@mui/material/Button';
import Stack from '@mui/material/Stack';
import Box from '@mui/material/Box';
import { DataGridPro, useGridApiRef } from '@mui/x-data-grid-pro';
import { DataGrid, useGridApiRef } from '@mui/x-data-grid';
import { useDemoData } from '@mui/x-data-grid-generator';

export default function UseGridApiRef() {
Expand All @@ -20,7 +20,7 @@ export default function UseGridApiRef() {
<Stack spacing={1} sx={{ width: '100%' }} alignItems="flex-start">
<Button onClick={handleGoToPage1}>Go to page 1</Button>
<Box sx={{ height: 400, width: '100%' }}>
<DataGridPro {...data} apiRef={apiRef} pagination pageSize={10} />
<DataGrid {...data} apiRef={apiRef} pagination pageSize={10} />
</Box>
</Stack>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/data/data-grid/api-object/UseGridApiRef.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Button onClick={handleGoToPage1}>Go to page 1</Button>
<Box sx={{ height: 400, width: '100%' }}>
<DataGridPro {...data} apiRef={apiRef} pagination pageSize={10} />
<DataGrid {...data} apiRef={apiRef} pagination pageSize={10} />
</Box>
Loading

0 comments on commit 80ebcb1

Please sign in to comment.