Skip to content

Commit b538087

Browse files
authored
Merge branch 'master' into fix/19340
2 parents e2ebd21 + a192707 commit b538087

File tree

67 files changed

+3384
-627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+3384
-627
lines changed

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2020
# Initializes the CodeQL tools for scanning.
2121
- name: Initialize CodeQL
22-
uses: github/codeql-action/init@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4.31.7
22+
uses: github/codeql-action/init@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8
2323
with:
2424
languages: typescript
2525
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -29,4 +29,4 @@ jobs:
2929
# 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
3030
# queries: security-extended,security-and-quality
3131
- name: Perform CodeQL Analysis
32-
uses: github/codeql-action/analyze@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4.31.7
32+
uses: github/codeql-action/analyze@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8

.github/workflows/scorecards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ jobs:
4040
publish_results: true
4141
# Upload the results to GitHub's code scanning dashboard.
4242
- name: Upload to code-scanning
43-
uses: github/codeql-action/upload-sarif@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4.31.7
43+
uses: github/codeql-action/upload-sarif@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8
4444
with:
4545
sarif_file: results.sarif

docs/data/charts/accessibility/accessibility.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ When focused, the chart highlights a value item that can be modified with arrow
8686
The focus highlight is done with a dedicated SVG element.
8787
When using composition, you've to add this component to make the focus visible.
8888

89-
Each series type has its own component.
90-
Exception for the pie chart that has the focus directly managed in the `<PieArcPlot />`.
89+
Each series type has its own component:
9190

9291
```js
9392
import { FocusedBar } from '@mui/x-charts/BarChart';
93+
import { FocusedPieArc } from '@mui/x-charts/BarChart';
9494
import { FocusedLineMark } from '@mui/x-charts/LineChart';
9595
import { FocusedScatterMark } from '@mui/x-charts/ScatterChart';
9696
```

docs/data/data-grid/api-object/api-object.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,44 @@
44

55
The API object is an interface containing the state and all the methods available to programmatically interact with the Data Grid.
66

7-
You can find the list of all the API methods on the [GridApi page](/x/api/data-grid/grid-api/).
7+
You can find the list of all the API methods on the [`GridApi` page](/x/api/data-grid/grid-api/).
88

99
:::warning
10-
All methods prefixed by `unstable_` are related to experimental features and may be removed, renamed, or reworked at any time.
10+
New and experimental features are prefixed with `unstable_` and may be removed, renamed, or reworked at any time.
1111
:::
1212

1313
## How to use the API object
1414

1515
The API object is accessible through the `apiRef` variable.
16-
To access this variable, use `useGridApiContext` (inside the Data Grid) or `useGridApiRef` (outside the Data Grid).
16+
To access this variable, use `useGridApiContext` (inside `DataGrid`) or `useGridApiRef` (outside `DataGrid`).
1717

1818
### Inside the Data Grid
1919

20-
To access the API object inside component slots or inside renders (for instance, `renderCell` or `renderHeader`), use the `useGridApiContext` hook:
20+
To access the API object inside component slots or inside renders (for instance, `renderCell` or `renderHeader`), use the `useGridApiContext` hook.
21+
The snippet below renders `Button` inside the Grid's `GridToolbarContainer`:
2122

2223
```tsx
23-
function CustomFooter() {
24+
function CustomToolbar() {
2425
const apiRef = useGridApiContext();
2526

26-
return <Button onClick={() => apiRef.current.setPage(1)}>Go to page 1</Button>;
27+
return (
28+
<GridToolbarContainer>
29+
<Button onClick={() => apiRef.current.setPage(1)}>Go to page 1</Button>
30+
</GridToolbarContainer>
31+
);
2732
}
2833
```
2934

3035
:::info
31-
You don't need to initialize the API object using `useGridApiRef` to be able to use it inside the Data Grid components.
36+
You don't need to initialize the API object using `useGridApiRef` to be able to use it inside Data Grid components.
3237
:::
3338

3439
{{"demo": "UseGridApiContext.js", "bg": "inline", "defaultCodeOpen": false}}
3540

3641
### Outside the Data Grid
3742

38-
When using the API object outside the Data Grid components, you need to initialize it using the `useGridApiRef` hook.
39-
You can then pass it to the Data Grid's `apiRef` prop:
43+
When using the API object outside Data Grid components, you must initialize it using the `useGridApiRef` hook.
44+
You can then pass it to the `apiRef` prop on the `DataGrid`:
4045

4146
```tsx
4247
function CustomDataGrid(props) {
@@ -52,7 +57,7 @@ function CustomDataGrid(props) {
5257
```
5358

5459
:::warning
55-
The API object is populated by the Data Grid's various plugins during the first render of the component.
60+
The API object is populated by the `DataGrid`'s various plugins during the first render of the component.
5661
If you try to use it in the first render of the component, it will crash because not all methods are registered yet.
5762
:::
5863

@@ -64,7 +69,7 @@ If you try to use it in the first render of the component, it will crash because
6469

6570
You can control the disabled features of a column (for example hiding, sorting, filtering, pinning, grouping, etc) programmatically using `initialState`, controlled models, or the API object.
6671

67-
In the example below, API object is used to build a custom sorting for the _firstName_ column which is not sortable by the default grid UI (using the `colDef.sortable` property set to `false`).
72+
In the example below, the API object is used to build a custom sorting for the `firstName` column which is not sortable by the default grid UI (using the `colDef.sortable` property set to `false`).
6873

6974
```tsx
7075
const columns = [{ field: 'rating', sortable: false }, ...otherColumns];
@@ -93,15 +98,15 @@ function CustomDataGrid(props) {
9398

9499
### Retrieve data from the state
95100

96-
You can find a detailed example on the [State page](/x/react-data-grid/state/#access-the-state).
101+
See [State—Access the state](/x/react-data-grid/state/#access-the-state) for a detailed example.
97102

98103
### Listen to grid events
99104

100-
You can find a detailed example on the [Events page](/x/react-data-grid/events/#subscribing-to-events).
105+
See [Events—Subscribing to events](/x/react-data-grid/events/#subscribing-to-events) for a detailed example.
101106

102107
## API
103108

104-
- [GridApi](/x/api/data-grid/grid-api/)
105-
- [DataGrid](/x/api/data-grid/data-grid/)
106-
- [DataGridPro](/x/api/data-grid/data-grid-pro/)
107-
- [DataGridPremium](/x/api/data-grid/data-grid-premium/)
109+
- [`GridApi`](/x/api/data-grid/grid-api/)
110+
- [`DataGrid`](/x/api/data-grid/data-grid/)
111+
- [`DataGridPro`](/x/api/data-grid/data-grid-pro/)
112+
- [`DataGridPremium`](/x/api/data-grid/data-grid-premium/)

docs/data/scheduler/timezone-support/TimezoneDataset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default function TimezoneDataset() {
6363
defaultVisibleDate={defaultVisibleDate}
6464
onEventsChange={setEvents}
6565
defaultPreferences={{ isSidePanelOpen: false }}
66-
timezone="Europe/Paris"
66+
displayTimezone="Europe/Paris"
6767
areEventsDraggable
6868
areEventsResizable
6969
eventModelStructure={eventModelStructure}

docs/data/scheduler/timezone-support/TimezoneDataset.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default function TimezoneDataset() {
6464
defaultVisibleDate={defaultVisibleDate}
6565
onEventsChange={setEvents}
6666
defaultPreferences={{ isSidePanelOpen: false }}
67-
timezone="Europe/Paris"
67+
displayTimezone="Europe/Paris"
6868
areEventsDraggable
6969
areEventsResizable
7070
eventModelStructure={eventModelStructure}

docs/data/scheduler/timezone-support/TimezoneDataset.tsx.preview

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
defaultVisibleDate={defaultVisibleDate}
55
onEventsChange={setEvents}
66
defaultPreferences={{ isSidePanelOpen: false }}
7-
timezone="Europe/Paris"
7+
displayTimezone="Europe/Paris"
88
areEventsDraggable
99
areEventsResizable
1010
eventModelStructure={eventModelStructure}

docs/src/modules/components/ChartComponentsUpcoming.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ function getComponents() {
1616
title: 'Bubble Chart',
1717
href: 'https://github.com/mui/mui-x/issues/17275',
1818
},
19+
{
20+
title: 'Range Bar',
21+
href: 'https://github.com/mui/mui-x/issues/20350',
22+
premium: true,
23+
},
24+
{
25+
title: 'Range Area',
26+
href: 'https://github.com/mui/mui-x/issues/13988',
27+
premium: true,
28+
},
1929
{
2030
title: 'Treemap',
2131
href: '/x/react-charts/treemap/',
@@ -37,13 +47,13 @@ function getComponents() {
3747
pro: true,
3848
},
3949
{
40-
title: 'Gantt Chart',
41-
href: '/x/react-charts/gantt/',
50+
title: 'Waterfall Chart',
51+
href: 'https://github.com/mui/mui-x/issues/11318',
4252
premium: true,
4353
},
4454
{
45-
title: 'Waterfall Chart',
46-
href: 'https://github.com/mui/mui-x/issues/11318',
55+
title: 'Gantt Chart',
56+
href: '/x/react-charts/gantt/',
4757
premium: true,
4858
},
4959
{

docs/src/modules/components/demos/data-grid/DemoContainer.tsx

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
import * as React from 'react';
22
import { Theme, ThemeProvider, useTheme } from '@mui/material/styles';
33
import Box from '@mui/material/Box';
4+
import Stack from '@mui/material/Stack';
5+
import Button from '@mui/material/Button';
6+
import GitHubIcon from '@mui/icons-material/GitHub';
47

5-
function DemoContainer({ theme, children }: { theme: Theme; children: React.ReactNode }) {
8+
function DemoContainer({
9+
theme,
10+
children,
11+
href,
12+
}: {
13+
theme: Theme;
14+
children: React.ReactNode;
15+
href: string;
16+
}) {
617
const docsTheme = useTheme();
718
const docsMode = docsTheme?.palette?.mode;
819

@@ -15,6 +26,37 @@ function DemoContainer({ theme, children }: { theme: Theme; children: React.Reac
1526

1627
return (
1728
<ThemeProvider theme={modifiedTheme}>
29+
<Stack direction="row" spacing={2} sx={{ mb: 2, justifyContent: 'end' }}>
30+
<Button
31+
startIcon={<GitHubIcon />}
32+
sx={(containerTheme) => ({
33+
padding: '5px 12px',
34+
background: '#fff',
35+
borderRadius: '10px',
36+
whiteSpace: 'nowrap',
37+
textTransform: 'none',
38+
color: 'primary.main',
39+
fontFamily: 'IBM Plex Sans, sans-serif',
40+
border: '1px solid',
41+
letterSpacing: '0.01em',
42+
borderColor: 'divider',
43+
boxShadow: '1px 1px 2px rgba(0, 0, 0, 0.1)',
44+
...containerTheme.applyStyles('dark', {
45+
color: '#f2eff3',
46+
background: '#1d2329',
47+
}),
48+
'&:hover': {
49+
backgroundColor: '#faf8ff',
50+
...containerTheme.applyStyles('dark', {
51+
backgroundColor: '#252d34',
52+
}),
53+
},
54+
})}
55+
href={href}
56+
>
57+
See on GitHub
58+
</Button>
59+
</Stack>
1860
<Box
1961
sx={{
2062
height: { xs: 'calc(100vh - 300px)', md: 'calc(100vh - 250px)' }, // TODO: Find a way to fill height without magic number,

docs/src/modules/components/demos/data-grid/Inventory/InventoryDashboard.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,10 @@ function InventoryDashboard() {
236236
);
237237

238238
return (
239-
<DemoContainer theme={inventoryTheme}>
239+
<DemoContainer
240+
theme={inventoryTheme}
241+
href="https://github.com/mui/mui-x/tree/master/docs/src/modules/components/demos/data-grid/Inventory"
242+
>
240243
<ThemeProvider theme={inventoryTheme}>
241244
<Box
242245
sx={{

0 commit comments

Comments
 (0)