Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into pointer-test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Aug 19, 2024
2 parents c0987f2 + b217a27 commit eae6485
Show file tree
Hide file tree
Showing 291 changed files with 14,250 additions and 1,993 deletions.
77 changes: 46 additions & 31 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ const addReactCompilerRule = (packagesNames, isEnabled) =>
},
}));

const RESTRICTED_TOP_LEVEL_IMPORTS = [
'@mui/material',
'@mui/x-charts',
'@mui/x-charts-pro',
'@mui/x-codemod',
'@mui/x-date-pickers',
'@mui/x-date-pickers-pro',
'@mui/x-tree-view',
'@mui/x-tree-view-pro',
];

// TODO move this helper to @mui/monorepo/.eslintrc
// It needs to know about the parent "no-restricted-imports" to not override them.
const buildPackageRestrictedImports = (packageName, root, allowRootImports = true) => [
Expand Down Expand Up @@ -85,43 +96,16 @@ const buildPackageRestrictedImports = (packageName, root, allowRootImports = tru
files: [
`packages/${root}/src/**/*.test{.ts,.tsx,.js}`,
`packages/${root}/src/**/*.spec{.ts,.tsx,.js}`,
'docs/data/**/*{.ts,.tsx,.js}',
],
excludedFiles: ['*.d.ts'],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@mui/x-charts',
message: 'Use deeper import instead',
},
{
name: '@mui/x-charts-pro',
message: 'Use deeper import instead',
},
{
name: '@mui/x-codemod',
message: 'Use deeper import instead',
},
{
name: '@mui/x-date-pickers',
message: 'Use deeper import instead',
},
{
name: '@mui/x-date-pickers-pro',
message: 'Use deeper import instead',
},
{
name: '@mui/x-tree-view',
message: 'Use deeper import instead',
},
{
name: '@mui/x-tree-view-pro',
message: 'Use deeper import instead',
},
],
paths: RESTRICTED_TOP_LEVEL_IMPORTS.map((name) => ({
name,
message: 'Use deeper import instead',
})),
},
],
},
Expand Down Expand Up @@ -269,6 +253,37 @@ module.exports = {
],
},
},
{
files: ['docs/**/*{.ts,.tsx,.js}'],
excludedFiles: ['*.d.ts'],
rules: {
'no-restricted-imports': [
'error',
{
paths: RESTRICTED_TOP_LEVEL_IMPORTS.map((name) => ({
name,
message: 'Use deeper import instead',
})),
patterns: [
{
group: [
'@mui/*/*/*',
// Allow any import depth with any internal packages
'!@mui/internal-*/**',

// Exceptions (QUESTION: Keep or remove?)
'!@mui/x-date-pickers/internals/demo',
'!@mui/x-tree-view/hooks/useTreeViewApiRef',
// TODO: export this from /ButtonBase in core. This will break after we move to package exports
'!@mui/material/ButtonBase/TouchRipple',
],
message: 'Use less deep import instead',
},
],
},
],
},
},
...buildPackageRestrictedImports('@mui/x-charts', 'x-charts', false),
...buildPackageRestrictedImports('@mui/x-charts-pro', 'x-charts-pro', false),
...buildPackageRestrictedImports('@mui/x-codemod', 'x-codemod', false),
Expand Down
81 changes: 81 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,87 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 7.13.0

_Aug 16, 2024_

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

- 💫 Allow to [edit the label](https://mui.com/x/react-tree-view/rich-tree-view/editing/) of Tree View's items.

<img width="344" src="https://github.com/user-attachments/assets/1a6cf765-2dc8-4906-bd93-139086eed148" alt="Item label editing" />

- 🔧 Improve rows accessibility on the Data Grid features "Tree Data" and "Row Grouping". Certain "Row Grouping" accessibility updates will only be applied if experimental feature flag is enabled. See the [documentation](https://mui.com/x/react-data-grid/row-grouping/#accessibility-changes-in-v8) for more information.
- 🌍 Improve Vietnamese (vi-VN) locale on the Data Grid
- 🐞 Bugfixes

<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->

### Data Grid

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

- [DataGrid] Fix CSV export for `null` and `undefined` values (#14166) @k-rajat19
- [DataGrid] Fix error logged during skeleton loading with nested data grid (#14186) @KenanYusuf
- [DataGrid] Remove needless check in `useGridStateInitialization` (#14181) @k-rajat19
- [DataGrid] Add recipe for persisting filters in local storage (#14208) @cherniavskii
- [l10n] Improve Vietnamese (vi-VN) locale (#14216) @hungnd-casso

#### `@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] Fix Tree Data and Row Grouping rows accessibility (#13623) @arminmeh

#### `@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

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

- [pickers] Fix date and time merging to retain milliseconds (#14173) @LukasTy

#### `@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] Add `baseline` property to the `LineChart` `series` (#14153) @JCQuintas
- [charts] Fix issue where tooltip would disappear on mouse click (#14187) @alexfauquette
- [charts] Rename `CartesianContextProvider` to `CartesianProvider` (#14102) @JCQuintas
- [charts] Support axis with the same value for all data points (#14191) @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]`

- [TreeView] Add label editing feature (#13388) @noraleonte
- [TreeView] Fix the parameters passed for the `canMoveItemToNewPosition` prop (#14176) @flaviendelangle

### Docs

- [docs] Extract dataset in the Line chart docs (#14034) @alexfauquette
- [docs] Remove redundant encoding in the mock data source server (#14185) @MBilalShafi
- [docs] Use Netflix financial results to document bar charts (#13991) @alexfauquette
- [docs] Remove relience of abbreviations (#14226) @oliviertassinari

### Core

- [core] Bump monorepo (#14141) @Janpot
- [core] Fix ESLint issue (#14207) @LukasTy
- [core] Fix Netlify build cache issue (#14182) @cherniavskii
- [code-infra] Refactor Netlify `cache-docs` plugin setup (#14105) @LukasTy
- [internals] Move utils needed for tree view virtualization to shared package (#14202) @flaviendelangle

## 7.12.1

_Aug 8, 2024_
Expand Down
11 changes: 6 additions & 5 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

The versions of the project that are currently supported with security updates.

| Version | Supported |
| ------: | :----------------- |
| 6.x | :white_check_mark: |
| 5.x | :white_check_mark: |
| < 5.0 | :x: |
| MUI X version | Release | Supported |
| ------------: | :--------- | :----------------------------------- |
| ^7.0.0 | 2024-03-23 | :white_check_mark: Stable major |
| ^6.0.0 | 2023-03-03 | :white_check_mark: Long-term support |
| ^5.0.0 | 2021-11-23 | :x: |
| ^4.0.0 | 2021-09-28 | :x: |

## Reporting a vulnerability

Expand Down
5 changes: 5 additions & 0 deletions docs/.link-check-errors.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
Broken links found by `docs:link-check` that exist:

- https://mui.com/material-ui/customization/css-theme-variables/configuration/#advanced-configuration
- https://mui.com/material-ui/customization/css-theme-variables/configuration/#changing-variable-prefixes
- https://mui.com/material-ui/customization/theme-components/#creating-new-component-variants
- https://mui.com/material-ui/customization/theme-components/#overrides-based-on-props
- https://mui.com/material-ui/react-grid2/#whats-changed
2 changes: 1 addition & 1 deletion docs/data/charts-component-api-pages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { MuiPage } from '@mui/monorepo/docs/src/MuiPage';
import type { MuiPage } from 'docs/src/MuiPage';

const apiPages: MuiPage[] = [
{
Expand Down
21 changes: 12 additions & 9 deletions docs/data/charts/bars/BarGapNoSnap.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as React from 'react';
import ChartsUsageDemo from 'docsx/src/modules/components/ChartsUsageDemo';
import { BarChart } from '@mui/x-charts/BarChart';
import { balanceSheet, addLabels } from './netflixsBalanceSheet';

const series = addLabels([
{ dataKey: 'totAss' },
{ dataKey: 'totLia', stack: 'passive' },
{ dataKey: 'totEq', stack: 'passive' },
]);

const series = [
{ data: [1, 5, 2], stack: 'a' },
{ data: [2, 3, 4], stack: 'a' },
{ data: [3, 2, 3], stack: 'b' },
{ data: [8, 3, 6], stack: 'b' },
{ data: [11, 6, 9] },
];
export default function BarGapNoSnap() {
return (
<ChartsUsageDemo
Expand All @@ -33,18 +33,21 @@ export default function BarGapNoSnap() {
]}
renderDemo={(props) => (
<BarChart
dataset={balanceSheet}
series={series}
width={500}
height={300}
margin={{ top: 5 }}
margin={{ top: 15 }}
xAxis={[
{
scaleType: 'band',
data: ['Page 1', 'Page 2', 'Page 3'],
dataKey: 'year',
categoryGapRatio: props.categoryGapRatio,
barGapRatio: props.barGapRatio,
},
]}
yAxis={[{ valueFormatter: (v) => `$ ${v / 1000000}B` }]}
slotProps={{ legend: { hidden: true } }}
/>
)}
getCode={({ props }) => {
Expand Down
20 changes: 13 additions & 7 deletions docs/data/charts/bars/StackBars.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
import * as React from 'react';
import { BarChart } from '@mui/x-charts/BarChart';
import { addLabels, balanceSheet } from './netflixsBalanceSheet';

export default function StackBars() {
return (
<BarChart
series={[
{ data: [3, 4, 1, 6, 5], stack: 'A', label: 'Series A1' },
{ data: [4, 3, 1, 5, 8], stack: 'A', label: 'Series A2' },
{ data: [4, 2, 5, 4, 1], stack: 'B', label: 'Series B1' },
{ data: [2, 8, 1, 3, 1], stack: 'B', label: 'Series B2' },
{ data: [10, 6, 5, 8, 9], label: 'Series C1' },
]}
dataset={balanceSheet}
series={addLabels([
{ dataKey: 'currAss', stack: 'assets' },
{ dataKey: 'nCurrAss', stack: 'assets' },
{ dataKey: 'curLia', stack: 'liability' },
{ dataKey: 'nCurLia', stack: 'liability' },
{ dataKey: 'capStock', stack: 'equity' },
{ dataKey: 'retEarn', stack: 'equity' },
{ dataKey: 'treas', stack: 'equity' },
])}
xAxis={[{ scaleType: 'band', dataKey: 'year' }]}
slotProps={{ legend: { hidden: true } }}
width={600}
height={350}
/>
Expand Down
20 changes: 13 additions & 7 deletions docs/data/charts/bars/StackBars.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
import * as React from 'react';
import { BarChart } from '@mui/x-charts/BarChart';
import { addLabels, balanceSheet } from './netflixsBalanceSheet';

export default function StackBars() {
return (
<BarChart
series={[
{ data: [3, 4, 1, 6, 5], stack: 'A', label: 'Series A1' },
{ data: [4, 3, 1, 5, 8], stack: 'A', label: 'Series A2' },
{ data: [4, 2, 5, 4, 1], stack: 'B', label: 'Series B1' },
{ data: [2, 8, 1, 3, 1], stack: 'B', label: 'Series B2' },
{ data: [10, 6, 5, 8, 9], label: 'Series C1' },
]}
dataset={balanceSheet}
series={addLabels([
{ dataKey: 'currAss', stack: 'assets' },
{ dataKey: 'nCurrAss', stack: 'assets' },
{ dataKey: 'curLia', stack: 'liability' },
{ dataKey: 'nCurLia', stack: 'liability' },
{ dataKey: 'capStock', stack: 'equity' },
{ dataKey: 'retEarn', stack: 'equity' },
{ dataKey: 'treas', stack: 'equity' },
])}
xAxis={[{ scaleType: 'band', dataKey: 'year' }]}
slotProps={{ legend: { hidden: true } }}
width={600}
height={350}
/>
Expand Down
19 changes: 12 additions & 7 deletions docs/data/charts/bars/StackBars.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
<BarChart
series={[
{ data: [3, 4, 1, 6, 5], stack: 'A', label: 'Series A1' },
{ data: [4, 3, 1, 5, 8], stack: 'A', label: 'Series A2' },
{ data: [4, 2, 5, 4, 1], stack: 'B', label: 'Series B1' },
{ data: [2, 8, 1, 3, 1], stack: 'B', label: 'Series B2' },
{ data: [10, 6, 5, 8, 9], label: 'Series C1' },
]}
dataset={balanceSheet}
series={addLabels([
{ dataKey: 'currAss', stack: 'assets' },
{ dataKey: 'nCurrAss', stack: 'assets' },
{ dataKey: 'curLia', stack: 'liability' },
{ dataKey: 'nCurLia', stack: 'liability' },
{ dataKey: 'capStock', stack: 'equity' },
{ dataKey: 'retEarn', stack: 'equity' },
{ dataKey: 'treas', stack: 'equity' },
])}
xAxis={[{ scaleType: 'band', dataKey: 'year' }]}
slotProps={{ legend: { hidden: true } }}
width={600}
height={350}
/>
Loading

0 comments on commit eae6485

Please sign in to comment.