diff --git a/.circleci/config.yml b/.circleci/config.yml
index 7c86ac5d08a22..75d18f04b5514 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -193,7 +193,7 @@ jobs:
test_browser:
<<: *defaults
docker:
- - image: mcr.microsoft.com/playwright:v1.41.1-focal
+ - image: mcr.microsoft.com/playwright:v1.41.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -226,7 +226,7 @@ jobs:
test_e2e:
<<: *defaults
docker:
- - image: mcr.microsoft.com/playwright:v1.41.1-focal
+ - image: mcr.microsoft.com/playwright:v1.41.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -239,7 +239,7 @@ jobs:
test_e2e_website:
<<: *defaults
docker:
- - image: mcr.microsoft.com/playwright:v1.41.1-focal
+ - image: mcr.microsoft.com/playwright:v1.41.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -254,7 +254,7 @@ jobs:
test_regressions:
<<: *defaults
docker:
- - image: mcr.microsoft.com/playwright:v1.41.1-focal
+ - image: mcr.microsoft.com/playwright:v1.41.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
@@ -270,7 +270,7 @@ jobs:
run_danger:
<<: *defaults
docker:
- - image: mcr.microsoft.com/playwright:v1.41.1-focal
+ - image: mcr.microsoft.com/playwright:v1.41.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json
index f067fef9c95ec..3990a65673943 100644
--- a/.codesandbox/ci.json
+++ b/.codesandbox/ci.json
@@ -3,31 +3,29 @@
"installCommand": "install:codesandbox",
"node": "18",
"packages": [
- "packages/x-license-pro",
- "packages/grid/x-data-grid",
- "packages/grid/x-data-grid-pro",
- "packages/grid/x-data-grid-premium",
- "packages/grid/x-data-grid-generator",
+ "packages/x-license",
+ "packages/x-data-grid",
+ "packages/x-data-grid-pro",
+ "packages/x-data-grid-premium",
+ "packages/x-data-grid-generator",
"packages/x-date-pickers",
"packages/x-date-pickers-pro",
"packages/x-charts",
"packages/x-tree-view"
],
"publishDirectory": {
- "@mui/x-license-pro": "packages/x-license-pro/build",
- "@mui/x-data-grid": "packages/grid/x-data-grid/build",
- "@mui/x-data-grid-pro": "packages/grid/x-data-grid-pro/build",
- "@mui/x-data-grid-premium": "packages/grid/x-data-grid-premium/build",
- "@mui/x-data-grid-generator": "packages/grid/x-data-grid-generator/build",
+ "@mui/x-license": "packages/x-license/build",
+ "@mui/x-data-grid": "packages/x-data-grid/build",
+ "@mui/x-data-grid-pro": "packages/x-data-grid-pro/build",
+ "@mui/x-data-grid-premium": "packages/x-data-grid-premium/build",
+ "@mui/x-data-grid-generator": "packages/x-data-grid-generator/build",
"@mui/x-date-pickers": "packages/x-date-pickers/build",
"@mui/x-date-pickers-pro": "packages/x-date-pickers-pro/build",
"@mui/x-charts": "packages/x-charts/build",
"@mui/x-tree-view": "packages/x-tree-view/build"
},
"sandboxes": [
- "new",
- "github/mui/material-ui/tree/master/examples/create-react-app",
- "github/mui/material-ui/tree/master/examples/create-react-app-with-typescript"
+ "/bug-reproductions/x-data-grid"
],
"silent": true
}
diff --git a/.eslintignore b/.eslintignore
index 332d95470b5e1..828357acf4a92 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -3,7 +3,6 @@
/docs/export
/docs/pages/playground/
/lerna.json
-/packages/grid/x-data-grid/src/lib
/packages/x-codemod/src/**/*.spec.js
build
CHANGELOG.md
diff --git a/.eslintrc.js b/.eslintrc.js
index 823e51ac43da9..cfd1113f822de 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -98,11 +98,16 @@ module.exports = {
},
},
{
- files: ['packages/grid/**/*.ts', 'packages/grid/**/*.js', 'docs/src/pages/**/*.tsx'],
+ files: [
+ 'packages/x-data-grid/**/*{.tsx,.ts,.js}',
+ 'packages/x-data-grid-pro/**/*{.tsx,.ts,.js}',
+ 'packages/x-data-grid-premium/**/*{.tsx,.ts,.js}',
+ 'docs/src/pages/**/*.tsx',
+ ],
excludedFiles: [
- 'packages/grid/x-data-grid/src/themeAugmentation/index.js', // TypeScript ignores JS files with the same name as the TS file
- 'packages/grid/x-data-grid-pro/src/themeAugmentation/index.js',
- 'packages/grid/x-data-grid-premium/src/themeAugmentation/index.js',
+ 'packages/x-data-grid/src/themeAugmentation/index.js', // TypeScript ignores JS files with the same name as the TS file
+ 'packages/x-data-grid-pro/src/themeAugmentation/index.js',
+ 'packages/x-data-grid-premium/src/themeAugmentation/index.js',
],
rules: {
'material-ui/no-direct-state-access': 'error',
@@ -158,6 +163,6 @@ module.exports = {
buildPackageRestrictedImports('@mui/x-data-grid-generator', 'grid/x-data-grid-generator'),
buildPackageRestrictedImports('@mui/x-pickers', 'x-pickers'),
buildPackageRestrictedImports('@mui/x-pickers-pro', 'x-pickers-pro'),
- buildPackageRestrictedImports('@mui/x-license-pro', 'x-license-pro'),
+ buildPackageRestrictedImports('@mui/x-license', 'x-license'),
],
};
diff --git a/.github/ISSUE_TEMPLATE/1.bug.yml b/.github/ISSUE_TEMPLATE/1.bug.yml
index 61517d69ed6e6..24e3b54a8b5a3 100644
--- a/.github/ISSUE_TEMPLATE/1.bug.yml
+++ b/.github/ISSUE_TEMPLATE/1.bug.yml
@@ -26,9 +26,7 @@ body:
description: |
**β οΈ Issues that we can't reproduce can't be fixed.**
- If you don't have one, you can use one of these options:
- - [DataGrid codesandbox template](https://codesandbox.io/s/github/mui/mui-x/tree/master/templates/x-data-grid?file=/src/demo.tsx)
- - Fork any of the examples in our [documentation](https://mui.com/x/introduction/) by [clicking on the codesandbox or stackblitz icon](https://mui.com/static/docs/forking-an-example.png)
+ Please provide a link to a live example and an unambiguous set of steps to reproduce this bug. See our [documentation](https://mui.com/x/introduction/support/#bug-reproductions) on how to build a reproduction case.
value: |
Link to live example: (required)
diff --git a/.github/ISSUE_TEMPLATE/3.pro-support.yml b/.github/ISSUE_TEMPLATE/3.pro-support.yml
index 3e20ea94fc921..c3ef5d1a3e07c 100644
--- a/.github/ISSUE_TEMPLATE/3.pro-support.yml
+++ b/.github/ISSUE_TEMPLATE/3.pro-support.yml
@@ -36,10 +36,7 @@ body:
attributes:
label: The problem in depth
description: |
- **If applicable, please provide a live example to explain your problem.**
- If you don't have one, you can use one of these options:
- - [DataGrid codesandbox template](https://codesandbox.io/s/github/mui/mui-x/tree/master/templates/x-data-grid?file=/src/demo.tsx)
- - Fork any of the examples in our [documentation](https://mui.com/x/introduction/) by [clicking on the codesandbox or stackblitz icon](https://mui.com/static/docs/forking-an-example.png)
+ Please provide a link to a live example and an unambiguous set of steps to reproduce this bug. See our [documentation](https://mui.com/x/introduction/support/#bug-reproductions) on how to build a reproduction case.
- type: textarea
attributes:
label: Your environment
diff --git a/.github/ISSUE_TEMPLATE/4.premium-support.yml b/.github/ISSUE_TEMPLATE/4.premium-support.yml
index 106fabecf04d0..fb927c7619ebc 100644
--- a/.github/ISSUE_TEMPLATE/4.premium-support.yml
+++ b/.github/ISSUE_TEMPLATE/4.premium-support.yml
@@ -36,10 +36,7 @@ body:
attributes:
label: The problem in depth
description: |
- **If applicable, please provide a live example to explain your problem.**
- If you don't have one, you can use one of these options:
- - [DataGrid codesandbox template](https://codesandbox.io/s/github/mui/mui-x/tree/master/templates/x-data-grid?file=/src/demo.tsx)
- - Fork any of the examples in our [documentation](https://mui.com/x/introduction/) by [clicking on the codesandbox or stackblitz icon](https://mui.com/static/docs/forking-an-example.png)
+ Please provide a link to a live example and an unambiguous set of steps to reproduce this bug. See our [documentation](https://mui.com/x/introduction/support/#bug-reproductions) on how to build a reproduction case.
- type: textarea
attributes:
label: Your environment
diff --git a/.github/ISSUE_TEMPLATE/5.priority-support.yml b/.github/ISSUE_TEMPLATE/5.priority-support.yml
index d7f67770bd6c5..f902b8ed2f407 100644
--- a/.github/ISSUE_TEMPLATE/5.priority-support.yml
+++ b/.github/ISSUE_TEMPLATE/5.priority-support.yml
@@ -26,10 +26,7 @@ body:
attributes:
label: The problem in depth
description: |
- **If you're reporting a bug, please provide a live example for your report.**
- If you don't have one, you can use one of these options:
- - [DataGrid codesandbox template](https://codesandbox.io/s/github/mui/mui-x/tree/master/templates/x-data-grid?file=/src/demo.tsx)
- - Fork any of the examples in our [documentation](https://mui.com/x/introduction/) by [clicking on the codesandbox or stackblitz icon](https://mui.com/static/docs/forking-an-example.png)
+ Please provide a link to a live example and an unambiguous set of steps to reproduce this bug. See our [documentation](https://mui.com/x/introduction/support/#bug-reproductions) on how to build a reproduction case.
- type: textarea
attributes:
label: Your environment
diff --git a/.github/styles/Blog/ComposedWords.yml b/.github/styles/Blog/ComposedWords.yml
index 149dc0bd6ab30..1d931388bee34 100644
--- a/.github/styles/Blog/ComposedWords.yml
+++ b/.github/styles/Blog/ComposedWords.yml
@@ -11,3 +11,5 @@ swap:
'sub components': subcomponents
'use-case': 'use case'
'usecase': 'use case'
+ "can't": 'cannot'
+ 'can not': 'cannot'
diff --git a/.github/workflows/closed-issue-message.yaml b/.github/workflows/closed-issue-message.yaml
new file mode 100644
index 0000000000000..a14afd879f116
--- /dev/null
+++ b/.github/workflows/closed-issue-message.yaml
@@ -0,0 +1,31 @@
+name: Add comment
+on:
+ issues:
+ types:
+ - closed
+env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GH_REPO: ${{ github.repository }}
+ NUMBER: ${{ github.event.issue.number }}
+ BODY: |
+ :warning: **This issue has been closed.**
+ If you have a similar problem, please open a [new issue](https://github.com/mui/mui-x/issues/new/choose) and provide details about your specific problem.
+ If you can provide additional information related to this topic that could help future readers, please feel free to leave a comment.
+ APPENDIX: |
+
+ **How did we do @${{ github.event.issue.user.login }}?**
+ Your experience with our support team matters to us. If you have a moment, please share your thoughts through our [brief survey](https://tally.so/r/w4r5Mk?issue=${{ github.event.issue.number }}).
+
+jobs:
+ add-comment:
+ if: github.event.issue.state_reason != 'inactivity'
+ runs-on: ubuntu-latest
+ permissions:
+ issues: write
+ steps:
+ - name: Add comment for outside contributors
+ if: github.event.issue.author_association != 'MEMBER' && github.event.issue.author_association != 'OWNER'
+ run: gh issue comment "$NUMBER" --body "$BODY $APPENDIX"
+ - name: Add comment for maintainers
+ if: github.event.issue.author_association == 'MEMBER' || github.event.issue.author_association == 'OWNER'
+ run: gh issue comment "$NUMBER" --body "$BODY"
diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml
index aabc9edc6f073..a12c61a4a79ed 100644
--- a/.github/workflows/no-response.yml
+++ b/.github/workflows/no-response.yml
@@ -32,4 +32,3 @@ jobs:
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
The issue has been inactive for 7 days and has been automatically closed.
- If you think that it has been incorrectly closed, please reopen it and provide missing information (if any) or continue the last discussion.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9a1706e2d9d50..beb6954c41b6d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,108 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## v7.0.0-beta.2
+
+_Feb 9, 2024_
+
+We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights β¨:
+
+- π Add slot typings on the Data Grid components (#11795) @romgrk
+- π Support UTC date formatting in Charts tooltip (#11943) @shaharyar-shamshi
+- π Improve Danish (da-DK) locale Data Grid (#11877) @ShahrazH
+- π Bugfixes
+- π Documentation improvements
+
+### Data Grid
+
+#### `@mui/x-data-grid@v7.0.0-beta.2`
+
+- [DataGrid] Add `removeAllFilterItems` as a reason of `onFilterModelChange` callback (#11911) @shaharyar-shamshi
+- [DataGrid] Add slot typings (#11795) @romgrk
+- [DataGrid] Add support for dialogs in menu actions (#11909) @cherniavskii
+- [DataGrid] Allow passing readonly arrays to `pageSizeOptions` prop (#11609) @pcorpet
+- [DataGrid] Fix incorrect computation of `lastPage` in `GridPagination` (#11958) @MBilalShafi
+- [DataGrid] Improve vertical scrolling performance (#11924) @romgrk
+- [l10n] Improve Danish (da-DK) locale (#11877) @ShahrazH
+
+#### `@mui/x-data-grid-pro@v7.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
+
+Same changes as in `@mui/x-data-grid@v7.0.0-beta.2`.
+
+#### `@mui/x-data-grid-premium@v7.0.0-beta.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
+
+Same changes as in `@mui/x-data-grid-pro@v7.0.0-beta.2`, plus:
+
+- [DataGridPremium] Fix autosize grouping cell (#11870) @romgrk
+- [DataGridPremium] Fix clipboard paste not working with Caps Lock enabled (#11965) @shaharyar-shamshi
+
+### Date Pickers
+
+#### `@mui/x-date-pickers@v7.0.0-beta.2`
+
+- [pickers] Avoid relying on locale in Luxon `isWithinRange` method (#11936) @LukasTy
+- [pickers] Limit the valid values of `TDate` (#11791) @flaviendelangle
+
+#### `@mui/x-date-pickers-pro@v7.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
+
+Same changes as in `@mui/x-date-pickers@v7.0.0-beta.2`.
+
+### Charts / `@mui/x-charts@v7.0.0-beta.2`
+
+- [charts] Add `reverse` property to axes (#11899) @alexfauquette
+- [charts] Allow series ids to be numbers (#11941) @alexfauquette
+- [charts] Support UTC date formatting in tooltip (#11943) @shaharyar-shamshi
+
+### Tree View / `@mui/x-tree-view@v7.0.0-beta.2`
+
+- [TreeView] Correctly detect if an item is expandable (#11963) @swalker326
+- [TreeView] Polish the default design & revise the simple version pages (#11529) @danilo-leal
+
+### License
+
+#### Breaking changes
+
+- If you're using the [commercial license](https://next.mui.com/x/introduction/licensing), you need to update the import path:
+
+ ```diff
+ -import { LicenseInfo } from '@mui/x-license-pro';
+ +import { LicenseInfo } from '@mui/x-license';
+ ```
+
+`@mui/x-license@v7.0.0-beta.2`
+
+- [license] Rename `@mui/x-license-pro` to `@mui/x-license` (#11938) @cherniavskii
+
+### Docs
+
+- [docs] Add a note about `AdapterDateFnsV3` on the Getting Started page (#11985) @flaviendelangle
+- [docs] Add missing `Charts` breaking change steps (#11971) @alexfauquette
+- [docs] Fix `ChartsTooltip` typo (#11961) @thisisharsh7
+- [docs] Refactor `Localization` documentation sections (#11989) @LukasTy
+- [docs] Use "cannot" instead of "can't" or "can not" (#11986) @flaviendelangle
+- [docs] Add quick fixes to the migration guide (#11806) @danilo-leal
+- [docs] Avoid use of shorthand (#12000) @oliviertassinari
+- [docs] Avoid the use of MUIΒ Core @oliviertassinari
+- [docs] Fix image size and dark mode @oliviertassinari
+- [docs] Follow blank line convention with use client @oliviertassinari
+- [docs] Stable layout between light and dark mode @oliviertassinari
+
+### Core
+
+- [core] Add `docs:serve` script (#11935) @cherniavskii
+- [core] Bump monorepo (#12001) @cherniavskii
+- [core] Deprecate `LicenseInfo` re-exports (#11956) @cherniavskii
+- [core] Fix `test_types` failing on the `next` branch (#11944) @cherniavskii
+- [core] Fix failing `test_static` on the next branch (#11977) @cherniavskii
+- [core] Flatten grid packages folder (#11946) @cherniavskii
+- [core] Improve license info deprecation message (#11974) @cherniavskii
+- [core] Integrate changes from Core #40842 PR (#11801) @michaldudak
+- [core] Move next config to ESM (#11882) @Janpot
+- [core] Add auto-message on closed issues (#11805) @michelengelen
+- [core] Simplify bug reproduction (#11849) @oliviertassinari
+- [core] Fix npm reference @oliviertassinari
+- [core] Normalize issue template @oliviertassinari
+
## 7.0.0-beta.1
_Feb 1, 2024_
@@ -2036,6 +2138,62 @@ Here is an example of the renaming for the `
Tooltip provides extra data on charts item.
In all charts components, you can pass props to the tooltip by using `tooltip={{...}}`. -If you are using composition, you can add the `A Tree View widget presents a hierarchical list.
- -Tree views can be used to represent a file system navigator displaying folders and files, an item representing a folder can be expanded to reveal the contents of the folder, which may be files, folders, or both. +The Tree View component lets users navigate hierarchical lists of data with nested levels that can be expanded and collapsed.
{{"component": "modules/components/ComponentLinkHeader.js"}} ## Available components -There are two versions of the Tree View available. +The MUI X Tree View package exposes two different versions of the component: + +### Simple Tree View -### SimpleTreeView +```jsx +import { SimpleTreeView } from '@mui/x-tree-view/SimpleTreeView'; +``` -The `SimpleTreeView` component receives its items as JSX children. -It is designed for simple use-cases where the items are hardcoded. +The simple version of the Tree View component receives its items as JSX children. +This is the recommended version for hardcoded items. {{"demo": "BasicSimpleTreeView.js"}} -:::warning -Most new advanced features won't be available on this component. -If you are waiting for features like editing or virtualization, you should use `RichTreeView` instead. -::: +### Rich Tree View -### RichTreeView +```jsx +import { RichTreeView } from '@mui/x-tree-view/RichTreeView'; +``` -The `RichTreeView` component receives its items through the `items` prop. -It is designed for more advanced use-cases where the items are dynamically loaded from a data source. +The rich version of the Tree View component receives its items dynamically from an external data source. +This is the recommended version for larger trees, as well as those that require more advanced features like editing and virtualization. {{"demo": "BasicRichTreeView.js"}} + +:::info +At the moment, the Simple and Rich Tree Views are similar in terms of feature support. But as the component grows, you can expect to see the more advanced ones appear primarily on the Rich Tree View. +::: diff --git a/docs/data/tree-view/rich-tree-view/items/items.md b/docs/data/tree-view/rich-tree-view/items/items.md index 04469b2a06dec..e85d35328c698 100644 --- a/docs/data/tree-view/rich-tree-view/items/items.md +++ b/docs/data/tree-view/rich-tree-view/items/items.md @@ -95,12 +95,12 @@ It could be achieved by either defining the prop outside the component scope or ::: :::warning -Unlike the `SimpleTreeView` component, the `RichTreeView` component only supports string labels, you can't pass React nodes to it. +Unlike the `SimpleTreeView` component, the `RichTreeView` component only supports string labels, you cannot pass React nodes to it. ::: ## Disabled items -You can disable some of the items using the `isItemDisabled` prop on the `RichTreeView` component: +Use the `isItemDisabled` prop on the Rich Tree View to disable interaction and focus on a Tree Item: ```tsx function isItemDisabled(item) { @@ -116,29 +116,27 @@ function isItemDisabled(item) { Just like the `items` prop, the `isItemDisabled` function should keep the same JavaScript reference between two renders. Otherwise, the Tree View will re-generate its entire structure. -It could be achieved by either defining the prop outside the component scope or by memoizing using the `React.useCallback` hook if the function reuses something from the component scope. +This can be achieved by either defining the prop outside the component scope or by memoizing using the `React.useCallback` hook if the function reuses something from the component scope. ::: -### Interact with disabled items +### The disabledItemsFocusable prop -The behavior of disabled tree items depends on the `disabledItemsFocusable` prop. +Use the `disabledItemsFocusable` prop to control whether or not a disabled Tree Item can be focused. -If it is false: +When this prop is set to false: -- Arrow keys will not focus disabled items, and the next non-disabled item will be focused. -- Typing the first character of a disabled item's label will not focus the item. +- Navigating with keyboard arrow keys will not focus the disabled items, and the next non-disabled item will be focused instead. +- Typing the first character of a disabled item's label will not move the focus to it. - Mouse or keyboard interaction will not expand/collapse disabled items. - Mouse or keyboard interaction will not select disabled items. -- Shift + arrow keys will skip disabled items, and the next non-disabled item will be selected. +- Shift + arrow keys will skip disabled items, and the next non-disabled item will be selected instead. - Programmatic focus will not focus disabled items. -If it is true: +When it's set to true: -- Arrow keys will focus disabled items. -- Typing the first character of a disabled item's label will focus the item. +- Navigating with keyboard arrow keys will focus disabled items. +- Typing the first character of a disabled item's label will move focus to it. - Mouse or keyboard interaction will not expand/collapse disabled items. - Mouse or keyboard interaction will not select disabled items. -- Shift + arrow keys will not skip disabled items but, the disabled item will not be selected. +- Shift + arrow keys will not skip disabled items, but the disabled item will not be selected. - Programmatic focus will focus disabled items. - -{{"demo": "DisabledItemsFocusable.js", "defaultCodeOpen": false}} diff --git a/docs/data/tree-view/simple-tree-view/customization/CustomContentTreeView.js b/docs/data/tree-view/simple-tree-view/customization/CustomContentTreeView.js index bb582b7ff1176..c0286f0f82529 100644 --- a/docs/data/tree-view/simple-tree-view/customization/CustomContentTreeView.js +++ b/docs/data/tree-view/simple-tree-view/customization/CustomContentTreeView.js @@ -56,7 +56,7 @@ const CustomContent = React.forwardRef(function CustomContent(props, ref) { ref={ref} >Handle how users can expand items.
+Learn how to handle expanding and collapsing Tree View items.
## Controlled expansion Use the `expandedNodes` prop to control the expanded items. - -You can use the `onExpandedNodesChange` prop to listen to changes in the expanded items and update the prop accordingly. +You can also use the `onExpandedNodesChange` prop to listen to changes in the expanded items and update the prop accordingly. {{"demo": "ControlledExpansion.js"}} @@ -29,6 +28,6 @@ Learn more about the _Controlled and uncontrolled_ pattern in the [React documen ## Track node expansion change -Use the `onNodeExpansionToggle` prop if you want to react to a node expansion change: +Use the `onNodeExpansionToggle` prop to trigger an action upon a node being expanded. {{"demo": "TrackNodeExpansionToggle.js"}} diff --git a/docs/data/tree-view/simple-tree-view/items/items.md b/docs/data/tree-view/simple-tree-view/items/items.md index b30d217b9b19e..a8b34551b20fe 100644 --- a/docs/data/tree-view/simple-tree-view/items/items.md +++ b/docs/data/tree-view/simple-tree-view/items/items.md @@ -9,68 +9,65 @@ waiAria: https://www.w3.org/WAI/ARIA/apg/patterns/treeview/ # Simple Tree View - Items -Pass data to your Tree View.
+Learn how to add simple data to the Tree View component.
-## Basic usage +## Basics -The items can be defined as JSX children of the `SimpleTreeView` component: +```jsx +import { SimpleTreeView } from '@mui/x-tree-view/SimpleTreeView'; +import { TreeItem } from '@mui/x-tree-view/TreeItem'; +``` -{{"demo": "BasicSimpleTreeView.js"}} +The Simple Tree View component receives its items directly as JSX children. -## Item identifier +{{"demo": "BasicSimpleTreeView.js"}} -Each `TreeItem` must have a unique `nodeId`. +### Item identifier -This identifier is used internally to identify the item in the various models and to track the item across updates. +Each Tree Item must have a unique `nodeId`. +This is used internally to identify the item in the various models, and to track it across updates. ```tsxHandle how users can select items.
+Learn how to enable item selection for the Tree View component.
## Multi selection -The Tree View also supports multi-selection: +Apply the `multiSelect` prop on the Tree View to let users select multiple items. {{"demo": "MultiSelectTreeView.js"}} @@ -25,9 +25,8 @@ Use the `disableSelection` prop if you don't want your items to be selectable: ## Controlled selection -Use the `selectedNodes` prop to control the selected items. - -You can use the `onSelectedNodesChange` prop to listen to changes in the selected items and update the prop accordingly. +Use the `selectedNodes` prop to control selected Tree View items. +You can also use the `onSelectedNodesChange` prop to listen to changes in the selected items and update the prop accordingly. {{"demo": "ControlledSelection.js"}} diff --git a/docs/next.config.mjs b/docs/next.config.mjs index a613274fae7dd..f2c9f2e325d05 100644 --- a/docs/next.config.mjs +++ b/docs/next.config.mjs @@ -26,7 +26,7 @@ function loadPkg(pkgPath) { } const pkg = loadPkg('.'); -const dataGridPkg = loadPkg('./packages/grid/x-data-grid'); +const dataGridPkg = loadPkg('./packages/x-data-grid'); const datePickersPkg = loadPkg('./packages/x-date-pickers'); const chartsPkg = loadPkg('./packages/x-charts'); const treeViewPkg = loadPkg('./packages/x-tree-view'); diff --git a/docs/package.json b/docs/package.json index baa9269d03f51..5571de6fa8cb2 100644 --- a/docs/package.json +++ b/docs/package.json @@ -5,13 +5,13 @@ "author": "MUI Team", "license": "MIT", "scripts": { - "build": "rimraf docs/export && cross-env NODE_ENV=production next build --profile && yarn build-sw", + "build": "rimraf ./export && cross-env NODE_ENV=production next build --profile && yarn build-sw", "build:clean": "rimraf .next && yarn build", "build-sw": "node ./scripts/buildServiceWorker.js", "dev": "next dev --port 3001", "deploy": "git push -f upstream next:docs-next", "icons": "rimraf public/static/icons/* && node ./scripts/buildIcons.js", - "start": "next start", + "serve": "serve ./export -l 3010", "create-playground": "cpy --cwd=scripts playground.template.tsx ../../pages/playground --rename=index.tsx", "typescript": "tsc -p tsconfig.json", "typescript:transpile": "cross-env BABEL_ENV=development babel-node --extensions \".tsx,.ts,.js\" scripts/formattedTSDemos", @@ -27,17 +27,17 @@ "@emotion/react": "^11.11.3", "@emotion/server": "^11.11.0", "@emotion/styled": "^11.11.0", - "@mui/icons-material": "^5.15.7", - "@mui/joy": "^5.0.0-beta.25", - "@mui/lab": "^5.0.0-alpha.163", - "@mui/material": "^5.15.7", - "@mui/styles": "^5.15.7", - "@mui/utils": "^5.15.7", + "@mui/icons-material": "^5.15.9", + "@mui/joy": "^5.0.0-beta.27", + "@mui/lab": "^5.0.0-alpha.165", + "@mui/material": "^5.15.9", + "@mui/styles": "^5.15.9", + "@mui/utils": "^5.15.9", "@react-spring/web": "^9.7.3", "@trendmicro/react-interpolate": "^0.5.5", "@types/lodash": "^4.14.202", "@types/moment-hijri": "^2.1.4", - "@types/react-dom": "^18.2.18", + "@types/react-dom": "^18.2.19", "@types/react-router-dom": "^5.3.3", "ast-types": "^0.14.2", "autoprefixer": "^10.4.17", @@ -52,8 +52,8 @@ "core-js": "^2.6.12", "cross-env": "^7.0.3", "date-fns": "^2.30.0", - "date-fns-v3": "https://registry.npmjs.org/date-fns/-/date-fns-3.2.0.tgz", "date-fns-jalali": "^2.21.3-1", + "date-fns-v3": "https://registry.npmjs.org/date-fns/-/date-fns-3.2.0.tgz", "dayjs": "^1.11.10", "doctrine": "^3.0.0", "exceljs": "^4.4.0", @@ -67,20 +67,20 @@ "marked": "^5.1.2", "moment": "^2.30.1", "moment-hijri": "^2.1.2", - "moment-timezone": "^0.5.44", + "moment-timezone": "^0.5.45", "next": "^14.1.0", "nprogress": "^0.2.0", - "postcss": "^8.4.33", + "postcss": "^8.4.35", "prismjs": "^1.29.0", "prop-types": "^15.8.1", "raw-loader": "^1.0.0", "react": "^18.2.0", "react-docgen": "^5.4.3", "react-dom": "^18.2.0", - "react-hook-form": "^7.49.3", + "react-hook-form": "^7.50.1", "react-is": "^18.2.0", - "react-router": "^6.21.3", - "react-router-dom": "^6.21.3", + "react-router": "^6.22.0", + "react-router-dom": "^6.22.0", "react-runner": "^1.0.3", "react-simple-code-editor": "^0.13.1", "recast": "^0.23.4", @@ -98,6 +98,7 @@ "@types/stylis": "^4.2.5", "@types/webpack-bundle-analyzer": "^4.6.3", "cpy-cli": "^5.0.0", - "gm": "^1.25.0" + "gm": "^1.25.0", + "serve": "^14.2.1" } } diff --git a/docs/pages/_app.js b/docs/pages/_app.js index 56aaa444f278f..514da6bb6e2f1 100644 --- a/docs/pages/_app.js +++ b/docs/pages/_app.js @@ -18,7 +18,7 @@ import DocsStyledEngineProvider from 'docs/src/modules/utils/StyledEngineProvide import { pathnameToLanguage } from 'docs/src/modules/utils/helpers'; import createEmotionCache from 'docs/src/createEmotionCache'; import findActivePage from 'docs/src/modules/utils/findActivePage'; -import { LicenseInfo } from '@mui/x-license-pro'; +import { LicenseInfo } from '@mui/x-license'; import getProductInfoFromUrl from 'docs/src/modules/utils/getProductInfoFromUrl'; // Remove the license warning from demonstration purposes diff --git a/docs/pages/x/api/charts/bar-chart.json b/docs/pages/x/api/charts/bar-chart.json index ee0ee516ffb94..99c7c29a8f49a 100644 --- a/docs/pages/x/api/charts/bar-chart.json +++ b/docs/pages/x/api/charts/bar-chart.json @@ -9,7 +9,7 @@ "bottomAxis": { "type": { "name": "union", - "description": "{ axisId?: string, classes?: object, disableLine?: bool, disableTicks?: bool, fill?: string, label?: string, labelFontSize?: number, labelStyle?: object, position?: 'bottom'true
, a loading overlay is displayed." },
"localeText": {
- "description": "Set the locale text of the Data Grid. You can find all the translation keys supported in the source in the GitHub repository."
+ "description": "Set the locale text of the Data Grid. You can find all the translation keys supported in the source in the GitHub repository."
},
"logger": {
"description": "Pass a custom logger in the components that implements the Logger interface."
diff --git a/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json b/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json
index d16d75277d3dc..80d95b46ddb16 100644
--- a/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json
+++ b/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json
@@ -214,7 +214,7 @@
},
"loading": { "description": "If true
, a loading overlay is displayed." },
"localeText": {
- "description": "Set the locale text of the Data Grid. You can find all the translation keys supported in the source in the GitHub repository."
+ "description": "Set the locale text of the Data Grid. You can find all the translation keys supported in the source in the GitHub repository."
},
"logger": {
"description": "Pass a custom logger in the components that implements the Logger interface."
diff --git a/docs/translations/api-docs/data-grid/data-grid/data-grid.json b/docs/translations/api-docs/data-grid/data-grid/data-grid.json
index feed9462a9c07..e39db6e5df53a 100644
--- a/docs/translations/api-docs/data-grid/data-grid/data-grid.json
+++ b/docs/translations/api-docs/data-grid/data-grid/data-grid.json
@@ -150,7 +150,7 @@
},
"loading": { "description": "If true
, a loading overlay is displayed." },
"localeText": {
- "description": "Set the locale text of the Data Grid. You can find all the translation keys supported in the source in the GitHub repository."
+ "description": "Set the locale text of the Data Grid. You can find all the translation keys supported in the source in the GitHub repository."
},
"logger": {
"description": "Pass a custom logger in the components that implements the Logger interface."
diff --git a/package.json b/package.json
index f5a396e92adae..c7538e6268933 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,10 @@
{
- "version": "7.0.0-beta.1",
+ "version": "7.0.0-beta.2",
"private": true,
"scripts": {
"start": "yarn && yarn docs:dev",
"docs:dev": "yarn workspace docs dev",
- "docs:start": "yarn workspace docs start",
+ "docs:serve": "yarn workspace docs serve",
"docs:create-playground": "yarn workspace docs create-playground",
"docs:api": "NODE_OPTIONS=--max-old-space-size=4096 yarn docs:api:build && yarn docs:api:buildX",
"docs:api:build": "cross-env BABEL_ENV=development babel-node -i \"/node_modules/(?!@mui)/\" -x .ts,.tsx,.js ./scripts/buildApiDocs/index.ts",
@@ -84,14 +84,14 @@
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mnajdova/enzyme-adapter-react-18": "^0.2.0",
- "@mui/icons-material": "^5.15.7",
- "@mui/material": "^5.15.7",
+ "@mui/icons-material": "^5.15.9",
+ "@mui/material": "^5.15.9",
"@mui/monorepo": "https://github.com/mui/material-ui.git#master",
- "@mui/utils": "^5.15.7",
+ "@mui/utils": "^5.15.9",
"@next/eslint-plugin-next": "14.0.4",
"@octokit/plugin-retry": "^6.0.1",
"@octokit/rest": "^20.0.2",
- "@playwright/test": "1.41.1",
+ "@playwright/test": "1.41.2",
"@testing-library/react": "^14.2.1",
"@types/babel__core": "^7.20.5",
"@types/chai": "^4.3.11",
@@ -100,8 +100,8 @@
"@types/mocha": "^10.0.6",
"@types/node": "^18.19.10",
"@types/prettier": "^2.7.3",
- "@types/react": "^18.2.48",
- "@types/react-dom": "^18.2.18",
+ "@types/react": "^18.2.55",
+ "@types/react-dom": "^18.2.19",
"@types/react-test-renderer": "^18.0.7",
"@types/requestidlecallback": "^0.3.7",
"@types/sinon": "^10.0.20",
@@ -109,7 +109,7 @@
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"autoprefixer": "^10.4.17",
- "axe-core": "4.8.3",
+ "axe-core": "4.8.4",
"babel-loader": "^9.1.3",
"babel-plugin-istanbul": "^6.1.1",
"babel-plugin-module-resolver": "^5.0.0",
@@ -171,7 +171,7 @@
"typescript": "^5.3.3",
"unist-util-visit": "^2.0.3",
"util": "^0.12.5",
- "webpack": "^5.90.0",
+ "webpack": "^5.90.1",
"webpack-cli": "^5.1.4",
"yargs": "^17.7.2",
"yarn-deduplicate": "^6.0.2"
@@ -182,8 +182,6 @@
"workspaces": {
"packages": [
"packages/*",
- "!packages/grid",
- "packages/grid/*",
"docs"
],
"nohoist": [
diff --git a/packages/grid/x-data-grid-generator/tsconfig.json b/packages/grid/x-data-grid-generator/tsconfig.json
deleted file mode 100644
index 4477ca841852a..0000000000000
--- a/packages/grid/x-data-grid-generator/tsconfig.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "../../../tsconfig.json",
- "compilerOptions": {
- "types": ["react", "mocha", "node"]
- },
- "include": ["src/**/*", "../../../node_modules/@mui/material/themeCssVarsAugmentation"]
-}
diff --git a/packages/grid/x-data-grid/src/models/gridSlotsComponentsProps.ts b/packages/grid/x-data-grid/src/models/gridSlotsComponentsProps.ts
deleted file mode 100644
index b22b600d1c4cc..0000000000000
--- a/packages/grid/x-data-grid/src/models/gridSlotsComponentsProps.ts
+++ /dev/null
@@ -1,95 +0,0 @@
-import * as React from 'react';
-import { CheckboxProps } from '@mui/material/Checkbox';
-import { TextFieldProps } from '@mui/material/TextField';
-import { FormControlProps } from '@mui/material/FormControl';
-import { SelectProps } from '@mui/material/Select';
-import { SwitchProps } from '@mui/material/Switch';
-import { ButtonProps } from '@mui/material/Button';
-import { IconButtonProps } from '@mui/material/IconButton';
-import { TooltipProps } from '@mui/material/Tooltip';
-import type { InputLabelProps } from '@mui/material/InputLabel';
-import { PopperProps } from '@mui/material/Popper';
-import { TablePaginationProps } from '@mui/material/TablePagination';
-import { ChipProps } from '@mui/material/Chip';
-import { GridToolbarProps } from '../components/toolbar/GridToolbar';
-import { ColumnHeaderFilterIconButtonProps } from '../components/columnHeaders/GridColumnHeaderFilterIconButton';
-import { GridColumnMenuProps } from '../components/menu/columnMenu/GridColumnMenuProps';
-import { GridColumnsPanelProps } from '../components/panel/GridColumnsPanel';
-import { GridFilterPanelProps } from '../components/panel/filterPanel/GridFilterPanel';
-import { GridFooterContainerProps } from '../components/containers/GridFooterContainer';
-import { GridOverlayProps } from '../components/containers/GridOverlay';
-import { GridPanelProps } from '../components/panel/GridPanel';
-import type { GridRowProps } from '../components/GridRow';
-import type { GridCellProps } from '../components/cell/GridCell';
-import type { GridColumnsManagementProps } from '../components/columnsManagement/GridColumnsManagement';
-import type { GridRowCountProps } from '../components';
-
-// Overrides for module augmentation
-export interface BaseCheckboxPropsOverrides {}
-export interface BaseTextFieldPropsOverrides {}
-export interface BaseFormControlPropsOverrides {}
-export interface BaseSelectPropsOverrides {}
-export interface BaseSwitchPropsOverrides {}
-export interface BaseButtonPropsOverrides {}
-export interface BaseIconButtonPropsOverrides {}
-export interface BaseTooltipPropsOverrides {}
-export interface BasePopperPropsOverrides {}
-export interface BaseInputLabelPropsOverrides {}
-export interface BaseSelectOptionPropsOverrides {}
-export interface BaseChipPropsOverrides {}
-export interface CellPropsOverrides {}
-export interface ToolbarPropsOverrides {}
-export interface ColumnHeaderFilterIconButtonPropsOverrides {}
-export interface ColumnMenuPropsOverrides {}
-export interface ColumnsPanelPropsOverrides {}
-export interface ColumnsManagementPropsOverrides {}
-export interface FilterPanelPropsOverrides {}
-export interface FooterPropsOverrides {}
-export interface FooterRowCountOverrides {}
-export interface PaginationPropsOverrides {}
-export interface LoadingOverlayPropsOverrides {}
-export interface NoResultsOverlayPropsOverrides {}
-export interface NoRowsOverlayPropsOverrides {}
-export interface PanelPropsOverrides {}
-export interface RowPropsOverrides {}
-
-type SlotProps