diff --git a/.circleci/config.yml b/.circleci/config.yml index 7db19933a6e7..86a47dd04d85 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,6 +13,14 @@ parameters: description: The name of the workflow to run type: string default: pipeline + with-material-ui-6: + description: Use material-ui v6 for additional checks and tests + type: boolean + default: false + with-react-version: + description: The version of react to be used for the additional tests + type: string + default: stable e2e-base-url: description: The base url for running end-to-end test type: string @@ -90,11 +98,10 @@ commands: git --no-pager diff HEAD - when: - condition: - equal: [material-ui-v6, << pipeline.parameters.workflow >>] + condition: << pipeline.parameters.with-material-ui-6 >> steps: - run: - name: Install @mui/material@next + name: Install @mui/material v6 command: pnpm use-material-ui-v6 jobs: @@ -338,50 +345,38 @@ workflows: requires: - checkout - react-next: + additional-tests: when: - equal: [react-next, << pipeline.parameters.workflow >>] - # triggers: - # - schedule: - # cron: '0 0 * * *' - # filters: - # branches: - # only: - # - master + and: + - equal: [additional, << pipeline.parameters.workflow >>] + - or: + - equal: [true, << pipeline.parameters.with-material-ui-6 >>] + - not: + equal: ['stable', << pipeline.parameters.with-react-version >>] jobs: - test_unit: <<: *default-context - react-version: next - name: test_unit-react@next + name: test_unit_additional + react-version: << pipeline.parameters.with-react-version >> - test_browser: <<: *default-context - react-version: next - name: test_browser-react@next + name: test_browser_additional + react-version: << pipeline.parameters.with-react-version >> - test_regressions: <<: *default-context - react-version: next - name: test_regressions-react@next + name: test_regressions_additional + react-version: << pipeline.parameters.with-react-version >> - test_e2e: <<: *default-context - react-version: next - name: test_e2e-react@next + name: test_e2e_additional + react-version: << pipeline.parameters.with-react-version >> - material-ui-v6: + additional-checks: when: - equal: [material-ui-v6, << pipeline.parameters.workflow >>] + and: + - equal: [additional, << pipeline.parameters.workflow >>] + - equal: [true, << pipeline.parameters.with-material-ui-6 >>] jobs: - - test_unit: - <<: *default-context - name: test_unit-material@next - - test_browser: - <<: *default-context - name: test_browser-material@next - - test_regressions: - <<: *default-context - name: test_regressions-material@next - - test_e2e: - <<: *default-context - name: test_e2e-material@next - test_types: <<: *default-context - name: test_types-material@next + name: test_types_additional diff --git a/docs/data/charts/getting-started/getting-started.md b/docs/data/charts/getting-started/getting-started.md index 6c6057abfc00..004f99b50e1c 100644 --- a/docs/data/charts/getting-started/getting-started.md +++ b/docs/data/charts/getting-started/getting-started.md @@ -41,8 +41,8 @@ Please note that [react](https://www.npmjs.com/package/react) and [react-dom](ht ```json "peerDependencies": { - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, ``` diff --git a/docs/data/charts-component-api-pages.ts b/docs/data/chartsApiPages.ts similarity index 98% rename from docs/data/charts-component-api-pages.ts rename to docs/data/chartsApiPages.ts index 2e1ad7d8eb6f..a7a3c216e1e8 100644 --- a/docs/data/charts-component-api-pages.ts +++ b/docs/data/chartsApiPages.ts @@ -1,6 +1,6 @@ import type { MuiPage } from 'docs/src/MuiPage'; -const apiPages: MuiPage[] = [ +const chartsApiPages: MuiPage[] = [ { pathname: '/x/api/charts/animated-area', title: 'AnimatedArea', @@ -230,4 +230,4 @@ const apiPages: MuiPage[] = [ title: 'SparkLineChart', }, ]; -export default apiPages; +export default chartsApiPages; diff --git a/docs/data/data-grid/custom-columns/cell-renderers/rating.tsx b/docs/data/data-grid/custom-columns/cell-renderers/rating.tsx index 9eb9c68ce767..56160cf6caf6 100644 --- a/docs/data/data-grid/custom-columns/cell-renderers/rating.tsx +++ b/docs/data/data-grid/custom-columns/cell-renderers/rating.tsx @@ -46,7 +46,7 @@ function EditRating(props: GridRenderEditCellParams) { changedThroughKeyboard.current = false; }; - const handleRef = (element: HTMLElement | undefined) => { + const handleRef = (element: HTMLElement | null) => { if (element) { if (value !== 0) { element.querySelector(`input[value="${value}"]`)!.focus(); diff --git a/docs/data/data-grid/getting-started/getting-started.md b/docs/data/data-grid/getting-started/getting-started.md index 2b77ca3b6ee8..a7e2494e3083 100644 --- a/docs/data/data-grid/getting-started/getting-started.md +++ b/docs/data/data-grid/getting-started/getting-started.md @@ -35,8 +35,8 @@ Please note that [react](https://www.npmjs.com/package/react) and [react-dom](ht ```json "peerDependencies": { - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, ``` diff --git a/docs/data/data-grid-component-api-pages.ts b/docs/data/dataGridApiPages.ts similarity index 89% rename from docs/data/data-grid-component-api-pages.ts rename to docs/data/dataGridApiPages.ts index 5aed416321e1..37479bd4801b 100644 --- a/docs/data/data-grid-component-api-pages.ts +++ b/docs/data/dataGridApiPages.ts @@ -1,6 +1,6 @@ import type { MuiPage } from 'docs/src/MuiPage'; -const apiPages: MuiPage[] = [ +const dataGridApiPages: MuiPage[] = [ { pathname: '/x/api/data-grid/data-grid', title: 'DataGrid', @@ -28,4 +28,4 @@ const apiPages: MuiPage[] = [ title: 'GridToolbarQuickFilter', }, ]; -export default apiPages; +export default dataGridApiPages; diff --git a/docs/data/date-pickers/getting-started/getting-started.md b/docs/data/date-pickers/getting-started/getting-started.md index e57e07a9de80..c3a703efd7b4 100644 --- a/docs/data/date-pickers/getting-started/getting-started.md +++ b/docs/data/date-pickers/getting-started/getting-started.md @@ -58,8 +58,8 @@ yarn add @mui/material @emotion/react @emotion/styled ```json "peerDependencies": { - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, ``` diff --git a/docs/data/date-pickers-component-api-pages.ts b/docs/data/datePickersApiPages.ts similarity index 98% rename from docs/data/date-pickers-component-api-pages.ts rename to docs/data/datePickersApiPages.ts index f7d4b339ac4f..339472cbea73 100644 --- a/docs/data/date-pickers-component-api-pages.ts +++ b/docs/data/datePickersApiPages.ts @@ -1,6 +1,6 @@ import type { MuiPage } from 'docs/src/MuiPage'; -const apiPages: MuiPage[] = [ +const datePickersApiPages: MuiPage[] = [ { pathname: '/x/api/date-pickers/date-calendar', title: 'DateCalendar', @@ -233,4 +233,4 @@ const apiPages: MuiPage[] = [ title: 'YearCalendar', }, ]; -export default apiPages; +export default datePickersApiPages; diff --git a/docs/data/pages.ts b/docs/data/pages.ts index 5692afc3f704..7d373c9e2b9a 100644 --- a/docs/data/pages.ts +++ b/docs/data/pages.ts @@ -1,8 +1,8 @@ import type { MuiPage } from 'docs/src/MuiPage'; -import chartsComponentApi from './charts-component-api-pages'; -import dataGridComponentApi from './data-grid-component-api-pages'; -import pickersComponentApi from './date-pickers-component-api-pages'; -import treeViewComponentApi from './tree-view-component-api-pages'; +import chartsComponentApi from './chartsApiPages'; +import dataGridComponentApi from './dataGridApiPages'; +import pickersComponentApi from './datePickersApiPages'; +import treeViewComponentApi from './treeViewApiPages'; const pages: MuiPage[] = [ { diff --git a/docs/data/tree-view/getting-started/getting-started.md b/docs/data/tree-view/getting-started/getting-started.md index 6acc9e5382c1..bc146ab1f18f 100644 --- a/docs/data/tree-view/getting-started/getting-started.md +++ b/docs/data/tree-view/getting-started/getting-started.md @@ -44,8 +44,8 @@ Please note that [react](https://www.npmjs.com/package/react) and [react-dom](ht ```json "peerDependencies": { - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, ``` diff --git a/docs/data/tree-view-component-api-pages.ts b/docs/data/treeViewApiPages.ts similarity index 88% rename from docs/data/tree-view-component-api-pages.ts rename to docs/data/treeViewApiPages.ts index c46698f0ed3d..91480e701ee1 100644 --- a/docs/data/tree-view-component-api-pages.ts +++ b/docs/data/treeViewApiPages.ts @@ -1,6 +1,6 @@ import type { MuiPage } from 'docs/src/MuiPage'; -const apiPages: MuiPage[] = [ +const treeViewApiPages: MuiPage[] = [ { pathname: '/x/api/tree-view/rich-tree-view', title: 'RichTreeView', @@ -27,4 +27,4 @@ const apiPages: MuiPage[] = [ title: 'TreeView', }, ]; -export default apiPages; +export default treeViewApiPages; diff --git a/package.json b/package.json index 0727b017902e..41973fe6ad85 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "@mui/internal-markdown": "^1.0.17", "@mui/internal-test-utils": "^1.0.17", "@mui/material": "^5.16.7", - "@mui/monorepo": "github:mui/material-ui#010de4505361345951824d905d1508d6f258ba67", + "@mui/monorepo": "github:mui/material-ui#7aa841466a01b745012e59e9d201ed50807a022e", "@mui/utils": "^5.16.6", "@next/eslint-plugin-next": "14.2.15", "@octokit/plugin-retry": "^7.1.2", diff --git a/packages/x-charts-pro/README.md b/packages/x-charts-pro/README.md index f65d2f65836b..600694c6c2ba 100644 --- a/packages/x-charts-pro/README.md +++ b/packages/x-charts-pro/README.md @@ -15,9 +15,9 @@ This component has the following peer dependencies that you will need to install ```json "peerDependencies": { - "@mui/material": "^5.15.14", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "@mui/material": "^5.15.14 || ^6.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, ``` diff --git a/packages/x-charts-pro/package.json b/packages/x-charts-pro/package.json index 73c250e6f1a3..94d14d1ab15e 100644 --- a/packages/x-charts-pro/package.json +++ b/packages/x-charts-pro/package.json @@ -55,8 +55,8 @@ "@emotion/styled": "^11.8.1", "@mui/material": "^5.15.14 || ^6.0.0", "@mui/system": "^5.15.14 || ^6.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { diff --git a/packages/x-charts/README.md b/packages/x-charts/README.md index babe6333320c..7660f5479a2a 100644 --- a/packages/x-charts/README.md +++ b/packages/x-charts/README.md @@ -15,9 +15,9 @@ This component has the following peer dependencies that you will need to install ```json "peerDependencies": { - "@mui/material": "^5.15.14", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "@mui/material": "^5.15.14 || ^6.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, ``` diff --git a/packages/x-charts/package.json b/packages/x-charts/package.json index f801917b2cd6..27eb6a52ce14 100644 --- a/packages/x-charts/package.json +++ b/packages/x-charts/package.json @@ -53,8 +53,8 @@ "@emotion/styled": "^11.8.1", "@mui/material": "^5.15.14 || ^6.0.0", "@mui/system": "^5.15.14 || ^6.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { diff --git a/packages/x-charts/src/context/AnimationProvider/useSkipAnimation.test.tsx b/packages/x-charts/src/context/AnimationProvider/useSkipAnimation.test.tsx index 997cdbd30429..bb0f82706104 100644 --- a/packages/x-charts/src/context/AnimationProvider/useSkipAnimation.test.tsx +++ b/packages/x-charts/src/context/AnimationProvider/useSkipAnimation.test.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { ErrorBoundary, createRenderer, screen } from '@mui/internal-test-utils'; +import { ErrorBoundary, createRenderer, screen, reactMajor } from '@mui/internal-test-utils'; import { useSkipAnimation } from './useSkipAnimation'; import { AnimationProvider } from './AnimationProvider'; @@ -37,17 +37,22 @@ describe('useSkipAnimation', () => { const errorRef = React.createRef(); + const errorMessage1 = 'MUI X: Could not find the animation ref context.'; + const errorMessage2 = + 'It looks like you rendered your component outside of a ChartsContainer parent component.'; + const errorMessage3 = 'The above error occurred in the component:'; + const expextedError = + reactMajor < 19 + ? [errorMessage1, errorMessage2, errorMessage3] + : `${errorMessage1}\n${errorMessage2}`; + expect(() => render( , ), - ).toErrorDev([ - 'MUI X: Could not find the animation ref context.', - 'It looks like you rendered your component outside of a ChartsContainer parent component.', - 'The above error occurred in the component:', - ]); + ).toErrorDev(expextedError); expect((errorRef.current as any).errors).to.have.length(1); expect((errorRef.current as any).errors[0].toString()).to.include( diff --git a/packages/x-charts/src/context/HighlightedProvider/useHighlighted.test.tsx b/packages/x-charts/src/context/HighlightedProvider/useHighlighted.test.tsx index 29337e8d7191..fb17106413fd 100644 --- a/packages/x-charts/src/context/HighlightedProvider/useHighlighted.test.tsx +++ b/packages/x-charts/src/context/HighlightedProvider/useHighlighted.test.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { ErrorBoundary, createRenderer, screen } from '@mui/internal-test-utils'; +import { ErrorBoundary, createRenderer, screen, reactMajor } from '@mui/internal-test-utils'; import { useHighlighted } from './useHighlighted'; import { HighlightedProvider } from './HighlightedProvider'; import { SeriesProvider } from '../SeriesProvider'; @@ -23,17 +23,22 @@ describe('useHighlighted', () => { const errorRef = React.createRef(); + const errorMessage1 = 'MUI X: Could not find the highlighted ref context.'; + const errorMessage2 = + 'It looks like you rendered your component outside of a ChartsContainer parent component.'; + const errorMessage3 = 'The above error occurred in the component:'; + const expextedError = + reactMajor < 19 + ? [errorMessage1, errorMessage2, errorMessage3] + : `${errorMessage1}\n${errorMessage2}`; + expect(() => render( , ), - ).toErrorDev([ - 'MUI X: Could not find the highlighted ref context.', - 'It looks like you rendered your component outside of a ChartsContainer parent component.', - 'The above error occurred in the component:', - ]); + ).toErrorDev(expextedError); expect((errorRef.current as any).errors).to.have.length(1); expect((errorRef.current as any).errors[0].toString()).to.include( diff --git a/packages/x-charts/src/hooks/useSeries.test.tsx b/packages/x-charts/src/hooks/useSeries.test.tsx index 4bbe16ff5cb6..8bc52cb6c2e3 100644 --- a/packages/x-charts/src/hooks/useSeries.test.tsx +++ b/packages/x-charts/src/hooks/useSeries.test.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { ErrorBoundary, createRenderer, screen } from '@mui/internal-test-utils'; +import { ErrorBoundary, createRenderer, reactMajor, screen } from '@mui/internal-test-utils'; import { useSeries } from './useSeries'; import { SeriesProvider } from '../context/SeriesProvider'; import { PluginProvider } from '../internals'; @@ -22,17 +22,22 @@ describe('useSeries', () => { const errorRef = React.createRef(); + const errorMessage1 = 'MUI X: Could not find the series ref context.'; + const errorMessage2 = + 'It looks like you rendered your component outside of a ChartsContainer parent component.'; + const errorMessage3 = 'The above error occurred in the component:'; + const expextedError = + reactMajor < 19 + ? [errorMessage1, errorMessage2, errorMessage3] + : `${errorMessage1}\n${errorMessage2}`; + expect(() => render( , ), - ).toErrorDev([ - 'MUI X: Could not find the series ref context.', - 'It looks like you rendered your component outside of a ChartsContainer parent component.', - 'The above error occurred in the component:', - ]); + ).toErrorDev(expextedError); expect((errorRef.current as any).errors).to.have.length(1); expect((errorRef.current as any).errors[0].toString()).to.include( diff --git a/packages/x-charts/src/hooks/useSvgRef.test.tsx b/packages/x-charts/src/hooks/useSvgRef.test.tsx index ed345538cc14..ac447050ea37 100644 --- a/packages/x-charts/src/hooks/useSvgRef.test.tsx +++ b/packages/x-charts/src/hooks/useSvgRef.test.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { ErrorBoundary, createRenderer, screen } from '@mui/internal-test-utils'; +import { ErrorBoundary, createRenderer, reactMajor, screen } from '@mui/internal-test-utils'; import { useSvgRef } from './useSvgRef'; import { DrawingProvider } from '../context/DrawingProvider'; @@ -21,17 +21,22 @@ describe('useSvgRef', () => { const errorRef = React.createRef(); + const errorMessage1 = 'MUI X: Could not find the svg ref context.'; + const errorMessage2 = + 'It looks like you rendered your component outside of a ChartsContainer parent component.'; + const errorMessage3 = 'The above error occurred in the component:'; + const expextedError = + reactMajor < 19 + ? [errorMessage1, errorMessage2, errorMessage3] + : `${errorMessage1}\n${errorMessage2}`; + expect(() => render( , ), - ).toErrorDev([ - 'MUI X: Could not find the svg ref context.', - 'It looks like you rendered your component outside of a ChartsContainer parent component.', - 'The above error occurred in the component:', - ]); + ).toErrorDev(expextedError); expect((errorRef.current as any).errors).to.have.length(1); expect((errorRef.current as any).errors[0].toString()).to.include( diff --git a/packages/x-data-grid-generator/package.json b/packages/x-data-grid-generator/package.json index 722753c85833..56c2ec168ca9 100644 --- a/packages/x-data-grid-generator/package.json +++ b/packages/x-data-grid-generator/package.json @@ -50,7 +50,7 @@ "@emotion/styled": "^11.8.1", "@mui/icons-material": "^5.4.1 || ^6.0.0", "@mui/material": "^5.15.14 || ^6.0.0", - "react": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { diff --git a/packages/x-data-grid-generator/src/renderer/renderEditRating.tsx b/packages/x-data-grid-generator/src/renderer/renderEditRating.tsx index 4caf314b9a85..fcd8aa855c50 100644 --- a/packages/x-data-grid-generator/src/renderer/renderEditRating.tsx +++ b/packages/x-data-grid-generator/src/renderer/renderEditRating.tsx @@ -18,7 +18,7 @@ function EditRating(props: GridRenderEditCellParams) { changedThroughKeyboard.current = false; }; - const handleRef = (element: HTMLElement | undefined) => { + const handleRef = (element: HTMLElement | null) => { if (element) { if (value !== 0) { element.querySelector(`input[value="${value}"]`)!.focus(); diff --git a/packages/x-data-grid-premium/README.md b/packages/x-data-grid-premium/README.md index c8527da8ec8b..a578b5c362e4 100644 --- a/packages/x-data-grid-premium/README.md +++ b/packages/x-data-grid-premium/README.md @@ -15,9 +15,9 @@ This component has the following peer dependencies that you will need to install ```json "peerDependencies": { - "@mui/material": "^5.15.14", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "@mui/material": "^5.15.14 || ^6.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, ``` diff --git a/packages/x-data-grid-premium/package.json b/packages/x-data-grid-premium/package.json index 4934928cfc91..cbea611b95b5 100644 --- a/packages/x-data-grid-premium/package.json +++ b/packages/x-data-grid-premium/package.json @@ -60,8 +60,8 @@ "@emotion/styled": "^11.8.1", "@mui/material": "^5.15.14 || ^6.0.0", "@mui/system": "^5.15.14 || ^6.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { diff --git a/packages/x-data-grid-premium/src/tests/rowGrouping.DataGridPremium.test.tsx b/packages/x-data-grid-premium/src/tests/rowGrouping.DataGridPremium.test.tsx index 9f60eb3694cf..f956007843f7 100644 --- a/packages/x-data-grid-premium/src/tests/rowGrouping.DataGridPremium.test.tsx +++ b/packages/x-data-grid-premium/src/tests/rowGrouping.DataGridPremium.test.tsx @@ -1,5 +1,12 @@ import * as React from 'react'; -import { createRenderer, fireEvent, screen, act, waitFor } from '@mui/internal-test-utils'; +import { + createRenderer, + fireEvent, + screen, + act, + waitFor, + reactMajor, +} from '@mui/internal-test-utils'; import { microtasks, getColumnHeaderCell, @@ -666,7 +673,7 @@ describe(' - Row grouping', () => { isGroupExpandedByDefault={isGroupExpandedByDefault} />, ); - expect(isGroupExpandedByDefault.callCount).to.equal(12); // Should not be called on leaves + expect(isGroupExpandedByDefault.callCount).to.equal(reactMajor >= 19 ? 6 : 12); // Should not be called on leaves const { childrenExpanded, ...node } = apiRef.current.state.rows.tree.A as GridGroupNode; const callForNodeA = isGroupExpandedByDefault .getCalls() diff --git a/packages/x-data-grid-pro/README.md b/packages/x-data-grid-pro/README.md index 25a3704effd4..77a9ce4dd629 100644 --- a/packages/x-data-grid-pro/README.md +++ b/packages/x-data-grid-pro/README.md @@ -15,9 +15,9 @@ This component has the following peer dependencies that you will need to install ```json "peerDependencies": { - "@mui/material": "^5.15.14", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "@mui/material": "^5.15.14 || ^6.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, ``` diff --git a/packages/x-data-grid-pro/package.json b/packages/x-data-grid-pro/package.json index 0ecf26914d48..d43020a31a59 100644 --- a/packages/x-data-grid-pro/package.json +++ b/packages/x-data-grid-pro/package.json @@ -58,8 +58,8 @@ "@emotion/styled": "^11.8.1", "@mui/material": "^5.15.14 || ^6.0.0", "@mui/system": "^5.15.14 || ^6.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { diff --git a/packages/x-data-grid-pro/src/tests/detailPanel.DataGridPro.test.tsx b/packages/x-data-grid-pro/src/tests/detailPanel.DataGridPro.test.tsx index b8e38ff9df4a..115a7b69feeb 100644 --- a/packages/x-data-grid-pro/src/tests/detailPanel.DataGridPro.test.tsx +++ b/packages/x-data-grid-pro/src/tests/detailPanel.DataGridPro.test.tsx @@ -11,7 +11,14 @@ import { GRID_DETAIL_PANEL_TOGGLE_FIELD, } from '@mui/x-data-grid-pro'; import { useBasicDemoData } from '@mui/x-data-grid-generator'; -import { createRenderer, fireEvent, screen, waitFor, act } from '@mui/internal-test-utils'; +import { + createRenderer, + fireEvent, + screen, + waitFor, + act, + reactMajor, +} from '@mui/internal-test-utils'; import { $, $$, grid, getRow, getCell, getColumnValues, microtasks } from 'test/utils/helperFn'; import { fireUserEvent } from 'test/utils/fireUserEvent'; @@ -311,12 +318,18 @@ describe(' - Detail panel', () => { // + 2x during state initialization (StrictMode) // + 2x when sortedRowsSet is fired // + 2x when sortedRowsSet is fired (StrictMode) = 8x - expect(getDetailPanelContent.callCount).to.equal(8); + // Because of https://react.dev/blog/2024/04/25/react-19-upgrade-guide#strict-mode-improvements + // from React 19 it is: + // 2x during state initialization + // + 2x when sortedRowsSet is fired + const expectedCallCount = reactMajor >= 19 ? 4 : 8; + + expect(getDetailPanelContent.callCount).to.equal(expectedCallCount); fireEvent.click(screen.getByRole('button', { name: 'Expand' })); - expect(getDetailPanelContent.callCount).to.equal(8); + expect(getDetailPanelContent.callCount).to.equal(expectedCallCount); fireEvent.click(screen.getByRole('button', { name: /next page/i })); - expect(getDetailPanelContent.callCount).to.equal(8); + expect(getDetailPanelContent.callCount).to.equal(expectedCallCount); const getDetailPanelContent2 = spy(() =>
Detail
); setProps({ getDetailPanelContent: getDetailPanelContent2 }); @@ -342,16 +355,23 @@ describe(' - Detail panel', () => { initialState={{ pagination: { paginationModel: { pageSize: 1 } } }} />, ); + // 2x during state initialization // + 2x during state initialization (StrictMode) // + 2x when sortedRowsSet is fired // + 2x when sortedRowsSet is fired (StrictMode) = 8x - expect(getDetailPanelHeight.callCount).to.equal(8); + // Because of https://react.dev/blog/2024/04/25/react-19-upgrade-guide#strict-mode-improvements + // from React 19 it is: + // 2x during state initialization + // + 2x when sortedRowsSet is fired + const expectedCallCount = reactMajor >= 19 ? 4 : 8; + + expect(getDetailPanelHeight.callCount).to.equal(expectedCallCount); fireEvent.click(screen.getByRole('button', { name: 'Expand' })); - expect(getDetailPanelHeight.callCount).to.equal(8); + expect(getDetailPanelHeight.callCount).to.equal(expectedCallCount); fireEvent.click(screen.getByRole('button', { name: /next page/i })); - expect(getDetailPanelHeight.callCount).to.equal(8); + expect(getDetailPanelHeight.callCount).to.equal(expectedCallCount); const getDetailPanelHeight2 = spy(() => 200); setProps({ getDetailPanelHeight: getDetailPanelHeight2 }); @@ -413,7 +433,13 @@ describe(' - Detail panel', () => { // + 1x during state initialization (StrictMode) // + 1x when sortedRowsSet is fired // + 1x when sortedRowsSet is fired (StrictMode) = 4x - expect(getDetailPanelHeight.callCount).to.equal(4); + // Because of https://react.dev/blog/2024/04/25/react-19-upgrade-guide#strict-mode-improvements + // from React 19 it is: + // 1x during state initialization + // + 1x when sortedRowsSet is fired + const expectedCallCount = reactMajor >= 19 ? 2 : 4; + + expect(getDetailPanelHeight.callCount).to.equal(expectedCallCount); expect(getDetailPanelHeight.lastCall.args[0].id).to.equal(0); }); @@ -478,8 +504,8 @@ describe(' - Detail panel', () => { it('should not reuse detail panel components', () => { let counter = 0; function DetailPanel() { - const [number] = React.useState((counter += 1)); - return
{number}
; + counter += 1; + return
{counter}
; } const { setProps } = render( } detailPanelExpandedRowIds={[0]} />, diff --git a/packages/x-data-grid-pro/src/tests/infiniteLoader.DataGridPro.test.tsx b/packages/x-data-grid-pro/src/tests/infiniteLoader.DataGridPro.test.tsx index 350aa89568c4..5f8b9422490b 100644 --- a/packages/x-data-grid-pro/src/tests/infiniteLoader.DataGridPro.test.tsx +++ b/packages/x-data-grid-pro/src/tests/infiniteLoader.DataGridPro.test.tsx @@ -108,7 +108,6 @@ describe(' - Infnite loader', () => { const [loading, setLoading] = React.useState(false); const handleRowsScrollEnd = React.useCallback(async () => { setLoading(true); - await sleep(50); setRows((prevRows) => { const lastRowId = prevRows[prevRows.length - 1].id; const nextRow = getRow(lastRowId + 1); @@ -137,45 +136,20 @@ describe(' - Infnite loader', () => { // 1 initial row // 5 rows loaded one by one through `onRowsScrollEnd` callback - expect(getColumnValues(0)).to.deep.equal(['0']); + const multiplier = 2; // `setRows` is called twice for each `handleRowsScrollEnd` call await waitFor(() => { - expect(getRow.callCount).to.equal(1); - }); - await waitFor(() => { - expect(getColumnValues(0)).to.deep.equal(['0', '1']); - }); - - await waitFor(() => { - expect(getRow.callCount).to.equal(2); - }); - await waitFor(() => { - expect(getColumnValues(0)).to.deep.equal(['0', '1', '2']); - }); - - await waitFor(() => { - expect(getRow.callCount).to.equal(3); - }); - await waitFor(() => { - expect(getColumnValues(0)).to.deep.equal(['0', '1', '2', '3']); + expect(getRow.callCount).to.equal(5 * multiplier); }); - await waitFor(() => { - expect(getRow.callCount).to.equal(4); - }); - await waitFor(() => { - expect(getColumnValues(0)).to.deep.equal(['0', '1', '2', '3', '4']); - }); + const getRowCalls = getRow.getCalls(); + for (let callIndex = 0; callIndex < getRowCalls.length; callIndex += multiplier) { + const call = getRowCalls[callIndex]; + expect(call.returnValue?.id).to.equal(callIndex / multiplier + 1); + } - await waitFor(() => { - expect(getRow.callCount).to.equal(5); - }); await waitFor(() => { expect(getColumnValues(0)).to.deep.equal(['0', '1', '2', '3', '4', '5']); }); - - await sleep(200); - // should not load more rows because the threshold is not reached - expect(getRow.callCount).to.equal(5); }); it('should not observe intersections with the rows pinned to the bottom', async function test() { diff --git a/packages/x-data-grid-pro/src/tests/treeData.DataGridPro.test.tsx b/packages/x-data-grid-pro/src/tests/treeData.DataGridPro.test.tsx index 61a722c634f8..8ba96004f225 100644 --- a/packages/x-data-grid-pro/src/tests/treeData.DataGridPro.test.tsx +++ b/packages/x-data-grid-pro/src/tests/treeData.DataGridPro.test.tsx @@ -1,4 +1,4 @@ -import { createRenderer, fireEvent, screen, act } from '@mui/internal-test-utils'; +import { createRenderer, fireEvent, screen, act, reactMajor } from '@mui/internal-test-utils'; import { getCell, getColumnHeaderCell, @@ -286,7 +286,7 @@ describe(' - Tree data', () => { const isGroupExpandedByDefault = spy((node: GridGroupNode) => node.id === 'A'); render(); - expect(isGroupExpandedByDefault.callCount).to.equal(8); // Should not be called on leaves + expect(isGroupExpandedByDefault.callCount).to.equal(reactMajor >= 19 ? 4 : 8); // Should not be called on leaves const { childrenExpanded, children, childrenFromPath, ...node } = apiRef.current.state.rows .tree.A as GridGroupNode; const callForNodeA = isGroupExpandedByDefault diff --git a/packages/x-data-grid/README.md b/packages/x-data-grid/README.md index 25de6af92b19..62b13cce4e92 100644 --- a/packages/x-data-grid/README.md +++ b/packages/x-data-grid/README.md @@ -15,9 +15,9 @@ This component has the following peer dependencies that you will need to install ```json "peerDependencies": { - "@mui/material": "^5.15.14", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "@mui/material": "^5.15.14 || ^6.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, ``` diff --git a/packages/x-data-grid/package.json b/packages/x-data-grid/package.json index d7b56140fc12..a7e24276e9d0 100644 --- a/packages/x-data-grid/package.json +++ b/packages/x-data-grid/package.json @@ -59,8 +59,8 @@ "@emotion/styled": "^11.8.1", "@mui/material": "^5.15.14 || ^6.0.0", "@mui/system": "^5.15.14 || ^6.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { diff --git a/packages/x-data-grid/src/hooks/core/useGridRefs.ts b/packages/x-data-grid/src/hooks/core/useGridRefs.ts index 815c7f56e328..98e266fda316 100644 --- a/packages/x-data-grid/src/hooks/core/useGridRefs.ts +++ b/packages/x-data-grid/src/hooks/core/useGridRefs.ts @@ -5,7 +5,7 @@ export const useGridRefs = ( apiRef: React.MutableRefObject, ) => { const rootElementRef = React.useRef(null); - const mainElementRef = React.useRef(null); + const mainElementRef = React.useRef(null); const virtualScrollerRef = React.useRef(null); const virtualScrollbarVerticalRef = React.useRef(null); const virtualScrollbarHorizontalRef = React.useRef(null); diff --git a/packages/x-data-grid/src/hooks/features/virtualization/useGridVirtualScroller.tsx b/packages/x-data-grid/src/hooks/features/virtualization/useGridVirtualScroller.tsx index ccd1707d75e6..679b05f8bbbb 100644 --- a/packages/x-data-grid/src/hooks/features/virtualization/useGridVirtualScroller.tsx +++ b/packages/x-data-grid/src/hooks/features/virtualization/useGridVirtualScroller.tsx @@ -6,8 +6,8 @@ import { } from '@mui/utils'; import useLazyRef from '@mui/utils/useLazyRef'; import useTimeout from '@mui/utils/useTimeout'; -import { useResizeObserver } from '@mui/x-internals/useResizeObserver'; import { useRtl } from '@mui/system/RtlProvider'; +import reactMajor from '@mui/x-internals/reactMajor'; import type { GridPrivateApiCommunity } from '../../../models/api/gridApiCommunity'; import { useGridPrivateApiContext } from '../../utils/useGridPrivateApiContext'; import { useGridRootProps } from '../../utils/useGridRootProps'; @@ -136,7 +136,57 @@ export const useGridVirtualScroller = () => { const columnsTotalWidth = dimensions.columnsTotalWidth; const hasColSpan = useGridSelector(apiRef, gridHasColSpanSelector); - useResizeObserver(mainRef, () => apiRef.current.resize()); + const mainRefCallback = React.useCallback( + (node: HTMLDivElement | null) => { + mainRef.current = node; + + if (!node) { + return undefined; + } + + const initialRect = node.getBoundingClientRect(); + let lastSize = { + width: initialRect.width, + height: initialRect.height, + }; + + apiRef.current.publishEvent('resize', lastSize); + + if (typeof ResizeObserver === 'undefined') { + return undefined; + } + + const observer = new ResizeObserver((entries) => { + const entry = entries[0]; + if (!entry) { + return; + } + + const newSize = { + width: entry.contentRect.width, + height: entry.contentRect.height, + }; + + if (newSize.width === lastSize.width && newSize.height === lastSize.height) { + return; + } + + apiRef.current.publishEvent('resize', newSize); + lastSize = newSize; + }); + + observer.observe(node); + + if (reactMajor >= 19) { + return () => { + mainRef.current = null; + observer.disconnect(); + }; + } + return undefined; + }, + [apiRef, mainRef], + ); /* * Scroll context logic @@ -550,11 +600,6 @@ export const useGridVirtualScroller = () => { apiRef.current.publishEvent('virtualScrollerContentSizeChange'); }, [apiRef, contentSize]); - useEnhancedEffect(() => { - // FIXME: Is this really necessary? - apiRef.current.resize(); - }, [apiRef, rowsMeta.currentPageTotalHeight]); - useEnhancedEffect(() => { // TODO a scroll reset should not be necessary if (enabledForColumns) { @@ -597,7 +642,7 @@ export const useGridVirtualScroller = () => { setPanels, getRows, getContainerProps: () => ({ - ref: mainRef, + ref: mainRefCallback, }), getScrollerProps: () => ({ ref: scrollerRef, diff --git a/packages/x-data-grid/src/hooks/utils/useGridApiEventHandler.test.tsx b/packages/x-data-grid/src/hooks/utils/useGridApiEventHandler.test.tsx index 1ee0bd2c105f..35df8e23d954 100644 --- a/packages/x-data-grid/src/hooks/utils/useGridApiEventHandler.test.tsx +++ b/packages/x-data-grid/src/hooks/utils/useGridApiEventHandler.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { spy } from 'sinon'; import { expect } from 'chai'; -import { createRenderer } from '@mui/internal-test-utils'; +import { createRenderer, reactMajor } from '@mui/internal-test-utils'; import { sleep } from 'test/utils/helperFn'; import { createUseGridApiEventHandler } from './useGridApiEventHandler'; import { FinalizationRegistryBasedCleanupTracking } from '../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking'; @@ -42,14 +42,17 @@ describe('useGridApiEventHandler', () => { // which makes 2 event listeners to be registered. Since the second render is never // committed (to simulate a trashed render in React 18), the effects also don't run, so we're // unable to unsubscribe the last listener using the cleanup function. - expect(apiRef.current.subscribeEvent.callCount).to.equal(3); + // Since React 19, StrictMode works differently + // https://react.dev/blog/2024/04/25/react-19-upgrade-guide#strict-mode-improvements + const expectedCallCount = reactMajor >= 19 ? 1 : 3; + expect(apiRef.current.subscribeEvent.callCount).to.equal(expectedCallCount); unmount(); global.gc(); // Triggers garbage collector await sleep(50); // Ensure that both event listeners were unsubscribed - expect(unsubscribe.callCount).to.equal(3); + expect(unsubscribe.callCount).to.equal(expectedCallCount); }); }); @@ -74,13 +77,16 @@ describe('useGridApiEventHandler', () => { // which makes 2 event listeners to be registered. Since the second render is never // committed (to simulate a trashed render in React 18), the effects also don't run, so we're // unable to unsubscribe the last listener using the cleanup function. - expect(apiRef.current.subscribeEvent.callCount).to.equal(3); + // Since React 19, StrictMode works differently + // https://react.dev/blog/2024/04/25/react-19-upgrade-guide#strict-mode-improvements + const expectedCallCount = reactMajor >= 19 ? 1 : 3; + expect(apiRef.current.subscribeEvent.callCount).to.equal(expectedCallCount); unmount(); await sleep(60); - // Ensure that both event listeners were unsubscribed - expect(unsubscribe.callCount).to.equal(3); + // Ensure that all event listeners were unsubscribed + expect(unsubscribe.callCount).to.equal(expectedCallCount); }); }); }); diff --git a/packages/x-data-grid/src/joy/joySlots.tsx b/packages/x-data-grid/src/joy/joySlots.tsx index a5645d892066..a4baffb0dabf 100644 --- a/packages/x-data-grid/src/joy/joySlots.tsx +++ b/packages/x-data-grid/src/joy/joySlots.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { SxProps } from '@mui/system'; import { ColorPaletteProp, Theme, VariantProp } from '@mui/joy/styles'; -import JoyBadge from '@mui/joy/Badge'; +import JoyBadge, { BadgeOrigin } from '@mui/joy/Badge'; import JoyCheckbox from '@mui/joy/Checkbox'; import JoyDivider from '@mui/joy/Divider'; import JoyInput from '@mui/joy/Input'; @@ -72,10 +72,15 @@ function convertVariant>( - ({ slotProps, variant, color, sx, ...props }, ref) => { + ({ slotProps, variant, color, sx, anchorOrigin, ...props }, ref) => { return ( } diff --git a/packages/x-data-grid/src/models/api/gridCoreApi.ts b/packages/x-data-grid/src/models/api/gridCoreApi.ts index 1dfaf2834b59..c5d7be49b1fd 100644 --- a/packages/x-data-grid/src/models/api/gridCoreApi.ts +++ b/packages/x-data-grid/src/models/api/gridCoreApi.ts @@ -67,7 +67,7 @@ export interface GridCorePrivateApi< /** * The React ref of the grid main container div element. */ - mainElementRef: React.RefObject; + mainElementRef: React.MutableRefObject; /** * The React ref of the grid's virtual scroller container element. */ diff --git a/packages/x-data-grid/src/tests/layout.DataGrid.test.tsx b/packages/x-data-grid/src/tests/layout.DataGrid.test.tsx index f92b82e0dc2f..cd4d6d324bb5 100644 --- a/packages/x-data-grid/src/tests/layout.DataGrid.test.tsx +++ b/packages/x-data-grid/src/tests/layout.DataGrid.test.tsx @@ -1,5 +1,11 @@ import * as React from 'react'; -import { createRenderer, screen, ErrorBoundary, waitFor } from '@mui/internal-test-utils'; +import { + createRenderer, + screen, + ErrorBoundary, + waitFor, + reactMajor, +} from '@mui/internal-test-utils'; import { stub, spy } from 'sinon'; import { expect } from 'chai'; import { @@ -960,8 +966,9 @@ describe(' - Layout & warnings', () => { ); }).toErrorDev([ 'The Data Grid component requires all rows to have a unique `id` property', - 'The Data Grid component requires all rows to have a unique `id` property', - 'The above error occurred in the component', + reactMajor < 19 && + 'The Data Grid component requires all rows to have a unique `id` property', + reactMajor < 19 && 'The above error occurred in the component', ]); expect((errorRef.current as any).errors).to.have.length(1); expect((errorRef.current as any).errors[0].toString()).to.include( @@ -1283,8 +1290,8 @@ describe(' - Layout & warnings', () => { , ); }).toErrorDev([ - 'Warning: Encountered two children with the same key, `id`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.', - 'Warning: Encountered two children with the same key, `id`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.', + 'Encountered two children with the same key, `id`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.', + 'Encountered two children with the same key, `id`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.', ]); }); diff --git a/packages/x-data-grid/src/tests/pagination.DataGrid.test.tsx b/packages/x-data-grid/src/tests/pagination.DataGrid.test.tsx index 94421d70f768..002a0d18ccad 100644 --- a/packages/x-data-grid/src/tests/pagination.DataGrid.test.tsx +++ b/packages/x-data-grid/src/tests/pagination.DataGrid.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { spy, stub, SinonStub, SinonSpy } from 'sinon'; import { expect } from 'chai'; -import { createRenderer, fireEvent, screen, waitFor } from '@mui/internal-test-utils'; +import { createRenderer, fireEvent, reactMajor, screen, waitFor } from '@mui/internal-test-utils'; import { DataGrid, DataGridProps, @@ -324,7 +324,8 @@ describe(' - Pagination', () => { ); }).toWarnDev([ `MUI X: The page size \`${pageSize}\` is not present in the \`pageSizeOptions\``, - `MUI X: The page size \`${pageSize}\` is not present in the \`pageSizeOptions\``, + reactMajor < 19 && + `MUI X: The page size \`${pageSize}\` is not present in the \`pageSizeOptions\``, ]); }); @@ -352,7 +353,8 @@ describe(' - Pagination', () => { render(); }).toWarnDev([ `MUI X: The page size \`${pageSize}\` is not present in the \`pageSizeOptions\``, - `MUI X: The page size \`${pageSize}\` is not present in the \`pageSizeOptions\``, + reactMajor < 19 && + `MUI X: The page size \`${pageSize}\` is not present in the \`pageSizeOptions\``, ]); }); @@ -361,7 +363,7 @@ describe(' - Pagination', () => { render(); }).toWarnDev([ `MUI X: The page size \`100\` is not present in the \`pageSizeOptions\``, - `MUI X: The page size \`100\` is not present in the \`pageSizeOptions\``, + reactMajor < 19 && `MUI X: The page size \`100\` is not present in the \`pageSizeOptions\``, ]); }); diff --git a/packages/x-data-grid/src/tests/quickFiltering.DataGrid.test.tsx b/packages/x-data-grid/src/tests/quickFiltering.DataGrid.test.tsx index 44d608d5602f..8f1153174c38 100644 --- a/packages/x-data-grid/src/tests/quickFiltering.DataGrid.test.tsx +++ b/packages/x-data-grid/src/tests/quickFiltering.DataGrid.test.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { createRenderer, screen, fireEvent } from '@mui/internal-test-utils'; +import { createRenderer, screen, fireEvent, reactMajor } from '@mui/internal-test-utils'; import { expect } from 'chai'; import { spy } from 'sinon'; import { @@ -313,18 +313,21 @@ describe(' - Quick filter', () => { />, ); + // Because of https://react.dev/blog/2024/04/25/react-19-upgrade-guide#strict-mode-improvements + const initialCallCount = reactMajor >= 19 ? 1 : 2; + expect(getColumnValues(0)).to.deep.equal(['1']); - expect(getApplyQuickFilterFnSpy.callCount).to.equal(2); + expect(getApplyQuickFilterFnSpy.callCount).to.equal(initialCallCount); setProps({ columnVisibilityModel: { brand: false } }); clock.runToLast(); expect(getColumnValues(0)).to.deep.equal([]); - expect(getApplyQuickFilterFnSpy.callCount).to.equal(3); + expect(getApplyQuickFilterFnSpy.callCount).to.equal(initialCallCount + 1); setProps({ columnVisibilityModel: { brand: true } }); clock.runToLast(); expect(getColumnValues(0)).to.deep.equal(['1']); - expect(getApplyQuickFilterFnSpy.callCount).to.equal(4); + expect(getApplyQuickFilterFnSpy.callCount).to.equal(initialCallCount + 2); }); it('should not apply filters on column visibility change when quickFilterExcludeHiddenColumns=true but no quick filter values', () => { @@ -380,18 +383,21 @@ describe(' - Quick filter', () => { />, ); + // Because of https://react.dev/blog/2024/04/25/react-19-upgrade-guide#strict-mode-improvements + const initialCallCount = reactMajor >= 19 ? 1 : 2; + expect(getColumnValues(0)).to.deep.equal(['1']); - expect(getApplyQuickFilterFnSpy.callCount).to.equal(2); + expect(getApplyQuickFilterFnSpy.callCount).to.equal(initialCallCount); setProps({ columnVisibilityModel: { brand: false } }); clock.runToLast(); expect(getColumnValues(0)).to.deep.equal(['1']); - expect(getApplyQuickFilterFnSpy.callCount).to.equal(2); + expect(getApplyQuickFilterFnSpy.callCount).to.equal(initialCallCount); setProps({ columnVisibilityModel: { brand: true } }); clock.runToLast(); expect(getColumnValues(0)).to.deep.equal(['1']); - expect(getApplyQuickFilterFnSpy.callCount).to.equal(2); + expect(getApplyQuickFilterFnSpy.callCount).to.equal(initialCallCount); }); }); diff --git a/packages/x-data-grid/src/tests/rows.DataGrid.test.tsx b/packages/x-data-grid/src/tests/rows.DataGrid.test.tsx index 095292926198..2c859d30fccb 100644 --- a/packages/x-data-grid/src/tests/rows.DataGrid.test.tsx +++ b/packages/x-data-grid/src/tests/rows.DataGrid.test.tsx @@ -6,6 +6,7 @@ import { act, ErrorBoundary, waitFor, + reactMajor, } from '@mui/internal-test-utils'; import clsx from 'clsx'; import { expect } from 'chai'; @@ -252,8 +253,8 @@ describe(' - Rows', () => { ); }).toErrorDev([ 'MUI X: Missing the `getActions` property in the `GridColDef`.', - 'MUI X: Missing the `getActions` property in the `GridColDef`.', - 'The above error occurred in the component', + reactMajor < 19 && 'MUI X: Missing the `getActions` property in the `GridColDef`.', + reactMajor < 19 && 'The above error occurred in the component', ]); }); diff --git a/packages/x-data-grid/src/tests/slots.DataGrid.test.tsx b/packages/x-data-grid/src/tests/slots.DataGrid.test.tsx index 0aa832db0d5f..055f24b47059 100644 --- a/packages/x-data-grid/src/tests/slots.DataGrid.test.tsx +++ b/packages/x-data-grid/src/tests/slots.DataGrid.test.tsx @@ -1,5 +1,11 @@ import * as React from 'react'; -import { createRenderer, ErrorBoundary, fireEvent, screen } from '@mui/internal-test-utils'; +import { + createRenderer, + ErrorBoundary, + fireEvent, + reactMajor, + screen, +} from '@mui/internal-test-utils'; import { expect } from 'chai'; import { spy } from 'sinon'; import { DataGrid, DataGridProps, GridOverlay } from '@mui/x-data-grid'; @@ -169,8 +175,9 @@ describe(' - Slots', () => { ); }).toErrorDev([ 'MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.', - 'MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.', - 'The above error occurred in the component', + reactMajor < 19 && + 'MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.', + reactMajor < 19 && 'The above error occurred in the component', ]); }); diff --git a/packages/x-date-pickers-pro/README.md b/packages/x-date-pickers-pro/README.md index 8a5f497bc1aa..22274f718010 100644 --- a/packages/x-date-pickers-pro/README.md +++ b/packages/x-date-pickers-pro/README.md @@ -34,9 +34,9 @@ This component has the following peer dependencies that you will need to install ```json "peerDependencies": { - "@mui/material": "^5.15.14", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "@mui/material": "^5.15.14 || ^6.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, ``` diff --git a/packages/x-date-pickers-pro/package.json b/packages/x-date-pickers-pro/package.json index ecd6412064f6..d0e3a5f14b5b 100644 --- a/packages/x-date-pickers-pro/package.json +++ b/packages/x-date-pickers-pro/package.json @@ -63,8 +63,8 @@ "moment": "^2.29.4", "moment-hijri": "^2.1.2 || ^3.0.0", "moment-jalaali": "^0.7.4 || ^0.8.0 || ^0.9.0 || ^0.10.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { diff --git a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx index f4c4ba2bf64d..be7fe1d16317 100644 --- a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx +++ b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx @@ -208,13 +208,14 @@ const DateRangeCalendar = React.forwardRef(function DateRangeCalendar< } = props; const { value, handleValueChange, timezone } = useControlledValueWithTimezone< - TDate, DateRange, + TDate, NonNullable >({ name: 'DateRangeCalendar', timezone: timezoneProp, value: valueProp, + referenceDate, defaultValue, onChange, valueManager: rangeValueManager, diff --git a/packages/x-date-pickers-pro/src/MobileDateRangePicker/tests/describes.MobileDateRangePicker.test.tsx b/packages/x-date-pickers-pro/src/MobileDateRangePicker/tests/describes.MobileDateRangePicker.test.tsx index 3410aec62f20..a8b9fc59c4c9 100644 --- a/packages/x-date-pickers-pro/src/MobileDateRangePicker/tests/describes.MobileDateRangePicker.test.tsx +++ b/packages/x-date-pickers-pro/src/MobileDateRangePicker/tests/describes.MobileDateRangePicker.test.tsx @@ -87,9 +87,9 @@ describe(' - Describes', () => { } fireEvent.click( - screen.getAllByRole('gridcell', { + screen.getByRole('gridcell', { name: adapterToUse.getDate(newValue[setEndDate ? 1 : 0]).toString(), - })[0], + }), ); // Close the picker diff --git a/packages/x-date-pickers-pro/src/internals/hooks/useEnrichedRangePickerFieldProps.ts b/packages/x-date-pickers-pro/src/internals/hooks/useEnrichedRangePickerFieldProps.ts index 9c0bde6d9d5b..aa1862e0f49a 100644 --- a/packages/x-date-pickers-pro/src/internals/hooks/useEnrichedRangePickerFieldProps.ts +++ b/packages/x-date-pickers-pro/src/internals/hooks/useEnrichedRangePickerFieldProps.ts @@ -189,7 +189,7 @@ const useMultiInputFieldSlotProps = < const previousRangePosition = React.useRef(rangePosition); React.useEffect(() => { - if (!open) { + if (!open || wrapperVariant === 'mobile') { return; } @@ -207,7 +207,7 @@ const useMultiInputFieldSlotProps = < previousRangePosition.current === rangePosition ? currentView : 0, ); previousRangePosition.current = rangePosition; - }, [rangePosition, open, currentView, startFieldRef, endFieldRef]); + }, [rangePosition, open, currentView, startFieldRef, endFieldRef, wrapperVariant]); const openRangeStartSelection: React.UIEventHandler = (event) => { event.stopPropagation(); @@ -364,7 +364,7 @@ const useSingleInputFieldSlotProps = < const handleFieldRef = useForkRef(fieldProps.unstableFieldRef, startFieldRef, endFieldRef); React.useEffect(() => { - if (!open || !startFieldRef.current) { + if (!open || !startFieldRef.current || wrapperVariant === 'mobile') { return; } @@ -381,7 +381,7 @@ const useSingleInputFieldSlotProps = < : sections.lastIndexOf(currentView); startFieldRef.current?.focusField(newSelectedSection); } - }, [rangePosition, open, currentView, startFieldRef]); + }, [rangePosition, open, currentView, startFieldRef, wrapperVariant]); const updateRangePosition = () => { if (!startFieldRef.current?.isFieldFocused()) { diff --git a/packages/x-date-pickers-pro/src/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.ts b/packages/x-date-pickers-pro/src/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.ts index f89396ebc68b..5e2cf61c67ee 100644 --- a/packages/x-date-pickers-pro/src/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.ts +++ b/packages/x-date-pickers-pro/src/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.ts @@ -47,6 +47,7 @@ export const useMultiInputDateRangeField = < const { value: valueProp, defaultValue, + referenceDate, format, formatDensity, shouldRespectLeadingZeros, @@ -65,6 +66,7 @@ export const useMultiInputDateRangeField = < timezone: timezoneProp, value: valueProp, defaultValue, + referenceDate, onChange, valueManager: rangeValueManager, }); diff --git a/packages/x-date-pickers-pro/src/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.ts b/packages/x-date-pickers-pro/src/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.ts index 60efbe608a10..1d7e44ce0b65 100644 --- a/packages/x-date-pickers-pro/src/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.ts +++ b/packages/x-date-pickers-pro/src/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.ts @@ -47,6 +47,7 @@ export const useMultiInputDateTimeRangeField = < const { value: valueProp, defaultValue, + referenceDate, format, formatDensity, shouldRespectLeadingZeros, @@ -65,6 +66,7 @@ export const useMultiInputDateTimeRangeField = < timezone: timezoneProp, value: valueProp, defaultValue, + referenceDate, onChange, valueManager: rangeValueManager, }); diff --git a/packages/x-date-pickers-pro/src/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.ts b/packages/x-date-pickers-pro/src/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.ts index 86db843894f5..a5947805371f 100644 --- a/packages/x-date-pickers-pro/src/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.ts +++ b/packages/x-date-pickers-pro/src/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.ts @@ -47,6 +47,7 @@ export const useMultiInputTimeRangeField = < const { value: valueProp, defaultValue, + referenceDate, format, formatDensity, shouldRespectLeadingZeros, @@ -67,6 +68,7 @@ export const useMultiInputTimeRangeField = < defaultValue, onChange, valueManager: rangeValueManager, + referenceDate, }); const { validationError, getValidationErrorForNewValue } = useValidation({ diff --git a/packages/x-date-pickers/README.md b/packages/x-date-pickers/README.md index aa2376eac454..a094a44ef58f 100644 --- a/packages/x-date-pickers/README.md +++ b/packages/x-date-pickers/README.md @@ -34,9 +34,9 @@ This component has the following peer dependencies that you will need to install ```json "peerDependencies": { - "@mui/material": "^5.15.14", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "@mui/material": "^5.15.14 || ^6.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, ``` diff --git a/packages/x-date-pickers/package.json b/packages/x-date-pickers/package.json index 7ffe54b91874..1e6f78678547 100644 --- a/packages/x-date-pickers/package.json +++ b/packages/x-date-pickers/package.json @@ -65,8 +65,8 @@ "moment": "^2.29.4", "moment-hijri": "^2.1.2 || ^3.0.0", "moment-jalaali": "^0.7.4 || ^0.8.0 || ^0.9.0 || ^0.10.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { diff --git a/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx b/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx index 77af1660e28f..a009d7afa816 100644 --- a/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx +++ b/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx @@ -154,6 +154,7 @@ export const DateCalendar = React.forwardRef(function DateCalendar void, + referenceDate: referenceDateProp, + onChange, valueManager: singleItemValueManager, }); diff --git a/packages/x-date-pickers/src/MultiSectionDigitalClock/MultiSectionDigitalClock.tsx b/packages/x-date-pickers/src/MultiSectionDigitalClock/MultiSectionDigitalClock.tsx index f9db7217d238..228a0d365317 100644 --- a/packages/x-date-pickers/src/MultiSectionDigitalClock/MultiSectionDigitalClock.tsx +++ b/packages/x-date-pickers/src/MultiSectionDigitalClock/MultiSectionDigitalClock.tsx @@ -112,6 +112,7 @@ export const MultiSectionDigitalClock = React.forwardRef(function MultiSectionDi timezone: timezoneProp, value: valueProp, defaultValue, + referenceDate: referenceDateProp, onChange, valueManager: singleItemValueManager, }); diff --git a/packages/x-date-pickers/src/TimeClock/TimeClock.tsx b/packages/x-date-pickers/src/TimeClock/TimeClock.tsx index df5213454067..e7740592ce1d 100644 --- a/packages/x-date-pickers/src/TimeClock/TimeClock.tsx +++ b/packages/x-date-pickers/src/TimeClock/TimeClock.tsx @@ -114,6 +114,7 @@ export const TimeClock = React.forwardRef(function TimeClock void, + referenceDate: referenceDateProp, + onChange, valueManager: singleItemValueManager, }); diff --git a/packages/x-date-pickers/src/internals/hooks/useField/useFieldState.ts b/packages/x-date-pickers/src/internals/hooks/useField/useFieldState.ts index 0e87524ab21e..874f1685761b 100644 --- a/packages/x-date-pickers/src/internals/hooks/useField/useFieldState.ts +++ b/packages/x-date-pickers/src/internals/hooks/useField/useFieldState.ts @@ -120,6 +120,7 @@ export const useFieldState = < timezone: timezoneProp, value: valueProp, defaultValue, + referenceDate: referenceDateProp, onChange, valueManager, }); diff --git a/packages/x-date-pickers/src/internals/hooks/usePicker/usePicker.types.ts b/packages/x-date-pickers/src/internals/hooks/usePicker/usePicker.types.ts index 5bc23631a90d..fabcdead5264 100644 --- a/packages/x-date-pickers/src/internals/hooks/usePicker/usePicker.types.ts +++ b/packages/x-date-pickers/src/internals/hooks/usePicker/usePicker.types.ts @@ -35,7 +35,7 @@ export interface UsePickerProps< TError, TExternalProps extends UsePickerViewsProps, TAdditionalProps extends {}, -> extends UsePickerValueProps, +> extends UsePickerValueProps, UsePickerViewsProps, UsePickerLayoutProps {} diff --git a/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.ts b/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.ts index 5c22920d367d..b904e7d3db60 100644 --- a/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.ts +++ b/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.ts @@ -154,7 +154,7 @@ export const usePickerValue = < TValue, TDate extends PickerValidDate, TSection extends FieldSection, - TExternalProps extends UsePickerValueProps, + TExternalProps extends UsePickerValueProps, >({ props, valueManager, @@ -175,6 +175,7 @@ export const usePickerValue = < defaultValue: inDefaultValue, closeOnSelect = wrapperVariant === 'desktop', timezone: timezoneProp, + referenceDate, } = props; const { current: defaultValue } = React.useRef(inDefaultValue); @@ -225,6 +226,7 @@ export const usePickerValue = < timezone: timezoneProp, value: inValueWithoutRenderTimezone, defaultValue, + referenceDate, onChange, valueManager, }); diff --git a/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.types.ts b/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.types.ts index c01be0eaefd3..8199914e8f1a 100644 --- a/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.types.ts +++ b/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.types.ts @@ -267,15 +267,18 @@ export interface UsePickerValueNonStaticProps { /** * Props used to handle the value of the pickers. */ -export interface UsePickerValueProps +export interface UsePickerValueProps extends UsePickerValueBaseProps, UsePickerValueNonStaticProps, - TimezoneProps {} + TimezoneProps { + // We don't add JSDoc here because we want the `referenceDate` JSDoc to be the one from the view which has more context. + referenceDate?: TDate; +} export interface UsePickerValueParams< TValue, TDate extends PickerValidDate, - TExternalProps extends UsePickerValueProps, + TExternalProps extends UsePickerValueProps, > { props: TExternalProps; valueManager: PickerValueManager>; diff --git a/packages/x-date-pickers/src/internals/hooks/useValueWithTimezone.test.tsx b/packages/x-date-pickers/src/internals/hooks/useValueWithTimezone.test.tsx new file mode 100644 index 000000000000..b74ec03b2dee --- /dev/null +++ b/packages/x-date-pickers/src/internals/hooks/useValueWithTimezone.test.tsx @@ -0,0 +1,108 @@ +import * as React from 'react'; +import { expect } from 'chai'; +import { screen } from '@mui/internal-test-utils'; +import { PickersTimezone, PickerValidDate } from '@mui/x-date-pickers/models'; +import { createPickerRenderer } from 'test/utils/pickers'; +import { useValueWithTimezone } from './useValueWithTimezone'; +import { singleItemValueManager } from '../utils/valueManagers'; + +describe('useValueWithTimezone', () => { + const { render, adapter } = createPickerRenderer({ + clock: 'fake', + adapterName: 'luxon', + }); + + function runTest(params: { + timezone: PickersTimezone | undefined; + value: PickerValidDate | null | undefined; + defaultValue: PickerValidDate | null | undefined; + referenceDate: PickerValidDate | undefined; + expectedTimezone: PickersTimezone; + }) { + const { expectedTimezone, ...other } = params; + + function TestComponent(props: typeof other) { + const { timezone } = useValueWithTimezone({ + ...props, + valueManager: singleItemValueManager, + onChange: () => {}, + }); + + return
{timezone}
; + } + + render(); + + expect(screen.getByTestId('result').textContent).to.equal(expectedTimezone); + } + + it('should use the timezone parameter when provided', () => { + runTest({ + timezone: 'America/New_York', + value: undefined, + defaultValue: undefined, + referenceDate: undefined, + expectedTimezone: 'America/New_York', + }); + }); + + it('should use the timezone parameter over the value parameter when both are provided', () => { + runTest({ + timezone: 'America/New_York', + value: adapter.date(undefined, 'Europe/Paris'), + defaultValue: undefined, + referenceDate: undefined, + expectedTimezone: 'America/New_York', + }); + }); + + it('should use the value parameter when provided', () => { + runTest({ + timezone: undefined, + value: adapter.date(undefined, 'America/New_York'), + defaultValue: undefined, + referenceDate: undefined, + expectedTimezone: 'America/New_York', + }); + }); + + it('should use the value parameter over the defaultValue parameter when both are provided', () => { + runTest({ + timezone: undefined, + value: adapter.date(undefined, 'America/New_York'), + defaultValue: adapter.date(undefined, 'Europe/Paris'), + referenceDate: undefined, + expectedTimezone: 'America/New_York', + }); + }); + + it('should use the defaultValue parameter when provided', () => { + runTest({ + timezone: undefined, + value: undefined, + defaultValue: adapter.date(undefined, 'America/New_York'), + referenceDate: undefined, + expectedTimezone: 'America/New_York', + }); + }); + + it('should use the referenceDate parameter when provided', () => { + runTest({ + timezone: undefined, + value: undefined, + defaultValue: undefined, + referenceDate: adapter.date(undefined, 'America/New_York'), + expectedTimezone: 'America/New_York', + }); + }); + + it('should use the "default" timezone is there is no way to deduce the user timezone', () => { + runTest({ + timezone: undefined, + value: undefined, + defaultValue: undefined, + referenceDate: undefined, + expectedTimezone: 'default', + }); + }); +}); diff --git a/packages/x-date-pickers/src/internals/hooks/useValueWithTimezone.ts b/packages/x-date-pickers/src/internals/hooks/useValueWithTimezone.ts index dd892c5d1c9d..7d91a6ac5cfb 100644 --- a/packages/x-date-pickers/src/internals/hooks/useValueWithTimezone.ts +++ b/packages/x-date-pickers/src/internals/hooks/useValueWithTimezone.ts @@ -11,22 +11,17 @@ import { PickersTimezone, PickerValidDate } from '../../models'; * - The value rendered is always the one from `props.timezone` if defined */ export const useValueWithTimezone = < - TDate extends PickerValidDate, TValue, + TDate extends PickerValidDate, TChange extends (...params: any[]) => void, >({ timezone: timezoneProp, value: valueProp, defaultValue, + referenceDate, onChange, valueManager, -}: { - timezone: PickersTimezone | undefined; - value: TValue | undefined; - defaultValue: TValue | undefined; - onChange: TChange | undefined; - valueManager: PickerValueManager; -}) => { +}: UseValueWithTimezoneParameters) => { const utils = useUtils(); const firstDefaultValue = React.useRef(defaultValue); @@ -45,7 +40,16 @@ export const useValueWithTimezone = < return valueManager.setTimezone(utils, inputTimezone, newValue); }); - const timezoneToRender = timezoneProp ?? inputTimezone ?? 'default'; + let timezoneToRender: PickersTimezone; + if (timezoneProp) { + timezoneToRender = timezoneProp; + } else if (inputTimezone) { + timezoneToRender = inputTimezone; + } else if (referenceDate) { + timezoneToRender = utils.getTimezone(referenceDate); + } else { + timezoneToRender = 'default'; + } const valueWithTimezoneToRender = React.useMemo( () => valueManager.setTimezone(utils, timezoneToRender, inputValue), @@ -64,24 +68,18 @@ export const useValueWithTimezone = < * Wrapper around `useControlled` and `useValueWithTimezone` */ export const useControlledValueWithTimezone = < - TDate extends PickerValidDate, TValue, + TDate extends PickerValidDate, TChange extends (...params: any[]) => void, >({ name, timezone: timezoneProp, value: valueProp, defaultValue, + referenceDate, onChange: onChangeProp, valueManager, -}: { - name: string; - timezone: PickersTimezone | undefined; - value: TValue | undefined; - defaultValue: TValue | undefined; - onChange: TChange | undefined; - valueManager: PickerValueManager; -}) => { +}: UseControlledValueWithTimezoneParameters) => { const [valueWithInputTimezone, setValue] = useControlled({ name, state: 'value', @@ -98,7 +96,34 @@ export const useControlledValueWithTimezone = < timezone: timezoneProp, value: valueWithInputTimezone, defaultValue: undefined, + referenceDate, onChange, valueManager, }); }; + +interface UseValueWithTimezoneParameters< + TValue, + TDate extends PickerValidDate, + TChange extends (...params: any[]) => void, +> { + timezone: PickersTimezone | undefined; + value: TValue | undefined; + defaultValue: TValue | undefined; + /** + * The reference date as passed to `props.referenceDate`. + * It does not need to have its default value. + * This is only used to determine the timezone to use when `props.value` and `props.defaultValue` are not defined. + */ + referenceDate: TDate | undefined; + onChange: TChange | undefined; + valueManager: PickerValueManager; +} + +interface UseControlledValueWithTimezoneParameters< + TValue, + TDate extends PickerValidDate, + TChange extends (...params: any[]) => void, +> extends UseValueWithTimezoneParameters { + name: string; +} diff --git a/packages/x-internals/package.json b/packages/x-internals/package.json index 148ed86ce6e9..1569494e29ff 100644 --- a/packages/x-internals/package.json +++ b/packages/x-internals/package.json @@ -45,7 +45,7 @@ "@mui/utils": "^5.16.6 || ^6.0.0" }, "peerDependencies": { - "react": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "devDependencies": { "@mui/internal-test-utils": "^1.0.17", diff --git a/packages/x-internals/src/reactMajor.ts b/packages/x-internals/src/reactMajor.ts new file mode 100644 index 000000000000..2028b806152d --- /dev/null +++ b/packages/x-internals/src/reactMajor.ts @@ -0,0 +1,3 @@ +import * as React from 'react'; + +export default parseInt(React.version, 10); diff --git a/packages/x-license/package.json b/packages/x-license/package.json index 8dc6070e560a..89d0e70b6137 100644 --- a/packages/x-license/package.json +++ b/packages/x-license/package.json @@ -38,7 +38,7 @@ "@mui/utils": "^5.16.6 || ^6.0.0" }, "peerDependencies": { - "react": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "devDependencies": { "@mui/internal-test-utils": "^1.0.17", diff --git a/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.test.tsx b/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.test.tsx index 7605292c6acd..1cfd9ab49dd6 100644 --- a/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.test.tsx +++ b/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.test.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createRenderer, screen } from '@mui/internal-test-utils'; +import { createRenderer, ErrorBoundary, reactMajor, screen } from '@mui/internal-test-utils'; import { useLicenseVerifier, LicenseInfo, @@ -94,19 +94,20 @@ describe('useLicenseVerifier', function test() { }); LicenseInfo.setLicenseKey(expiredLicenseKey); - let actualErrorMsg; + const errorRef = React.createRef(); + expect(() => { - try { - render(); - } catch (error: any) { - actualErrorMsg = error.message; - } + render( + + + , + ); }).to.toErrorDev([ 'MUI X: Expired license key', - 'MUI X: Expired license key', - 'The above error occurred in the component', + reactMajor < 19 && 'MUI X: Expired license key', + reactMajor < 19 && 'The above error occurred in the component', ]); - expect(actualErrorMsg).to.match(/MUI X: Expired license key/); + expect((errorRef.current as any).errors[0].toString()).to.match(/MUI X: Expired license key/); }); it('should throw if the license is not covering charts and tree-view', () => { diff --git a/packages/x-tree-view-pro/README.md b/packages/x-tree-view-pro/README.md index 9d9bfe64f275..a324f7ac0284 100644 --- a/packages/x-tree-view-pro/README.md +++ b/packages/x-tree-view-pro/README.md @@ -15,9 +15,9 @@ This component has the following peer dependencies that you will need to install ```json "peerDependencies": { - "@mui/material": "^5.15.14", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "@mui/material": "^5.15.14 || ^6.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, ``` diff --git a/packages/x-tree-view-pro/package.json b/packages/x-tree-view-pro/package.json index 05656fb77def..e2eb33a8aee8 100644 --- a/packages/x-tree-view-pro/package.json +++ b/packages/x-tree-view-pro/package.json @@ -58,8 +58,8 @@ "@emotion/styled": "^11.8.1", "@mui/material": "^5.15.14 || ^6.0.0", "@mui/system": "^5.15.14 || ^6.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { diff --git a/packages/x-tree-view/README.md b/packages/x-tree-view/README.md index 567adb406dfb..ff4816b596bb 100644 --- a/packages/x-tree-view/README.md +++ b/packages/x-tree-view/README.md @@ -15,9 +15,9 @@ This component has the following peer dependencies that you will need to install ```json "peerDependencies": { - "@mui/material": "^5.15.14", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "@mui/material": "^5.15.14 || ^6.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, ``` diff --git a/packages/x-tree-view/package.json b/packages/x-tree-view/package.json index 2f479f2652a7..f6ce9f354a09 100644 --- a/packages/x-tree-view/package.json +++ b/packages/x-tree-view/package.json @@ -56,8 +56,8 @@ "@emotion/styled": "^11.8.1", "@mui/material": "^5.15.14 || ^6.0.0", "@mui/system": "^5.15.14 || ^6.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { diff --git a/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.test.tsx b/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.test.tsx index 1fda8500521e..7dc729dad6d4 100644 --- a/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.test.tsx +++ b/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { fireEvent } from '@mui/internal-test-utils'; +import { fireEvent, reactMajor } from '@mui/internal-test-utils'; import { describeTreeView } from 'test/utils/tree-view/describeTreeView'; import { UseTreeViewExpansionSignature, @@ -22,16 +22,28 @@ describeTreeView< this.skip(); } - expect(() => - render({ items: [{ id: '1' }, { id: '1' }], withErrorBoundary: true }), - ).toErrorDev([ - ...(treeViewComponentName === 'SimpleTreeView' - ? ['Encountered two children with the same key'] - : []), - 'MUI X: The Tree View component requires all items to have a unique `id` property.', - 'MUI X: The Tree View component requires all items to have a unique `id` property.', - `The above error occurred in the component`, - ]); + if (treeViewComponentName === 'SimpleTreeView') { + expect(() => + render({ items: [{ id: '1' }, { id: '1' }], withErrorBoundary: true }), + ).toErrorDev([ + 'Encountered two children with the same key, `1`', + 'MUI X: The Tree View component requires all items to have a unique `id` property.', + reactMajor < 19 && + 'MUI X: The Tree View component requires all items to have a unique `id` property.', + reactMajor < 19 && + `The above error occurred in the component`, + ]); + } else { + expect(() => + render({ items: [{ id: '1' }, { id: '1' }], withErrorBoundary: true }), + ).toErrorDev([ + 'MUI X: The Tree View component requires all items to have a unique `id` property.', + reactMajor < 19 && + 'MUI X: The Tree View component requires all items to have a unique `id` property.', + reactMajor < 19 && + `The above error occurred in the component`, + ]); + } }); it('should be able to use a custom id attribute', function test() { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 095dcbb3da83..6a16a0039cf6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -99,8 +99,8 @@ importers: specifier: ^5.16.7 version: 5.16.7(@emotion/react@11.13.3(@types/react@18.3.12)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.12)(react@18.3.1))(@types/react@18.3.12)(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/monorepo': - specifier: github:mui/material-ui#010de4505361345951824d905d1508d6f258ba67 - version: https://codeload.github.com/mui/material-ui/tar.gz/010de4505361345951824d905d1508d6f258ba67(encoding@0.1.13) + specifier: github:mui/material-ui#7aa841466a01b745012e59e9d201ed50807a022e + version: https://codeload.github.com/mui/material-ui/tar.gz/7aa841466a01b745012e59e9d201ed50807a022e(encoding@0.1.13) '@mui/utils': specifier: ^5.16.6 version: 5.16.6(@types/react@18.3.12)(react@18.3.1) @@ -761,10 +761,10 @@ importers: specifier: ^15.8.1 version: 15.8.1 react: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1 react-dom: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1(react@18.3.1) devDependencies: '@mui/internal-test-utils': @@ -832,10 +832,10 @@ importers: specifier: ^15.8.1 version: 15.8.1 react: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1 react-dom: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1(react@18.3.1) devDependencies: '@mui/material': @@ -938,7 +938,7 @@ importers: version: 4.1.0 execa: specifier: ^9.4.0 - version: 9.4.0 + version: 9.5.1 internmap: specifier: ^2.0.3 version: 2.0.3 @@ -1002,10 +1002,10 @@ importers: specifier: ^15.8.1 version: 15.8.1 react: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1 react-dom: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1(react@18.3.1) reselect: specifier: ^5.1.1 @@ -1058,7 +1058,7 @@ importers: specifier: ^11.0.1 version: 11.0.1 react: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1 devDependencies: '@mui/icons-material': @@ -1114,10 +1114,10 @@ importers: specifier: ^15.8.1 version: 15.8.1 react: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1 react-dom: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1(react@18.3.1) reselect: specifier: ^5.1.1 @@ -1176,10 +1176,10 @@ importers: specifier: ^15.8.1 version: 15.8.1 react: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1 react-dom: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1(react@18.3.1) reselect: specifier: ^5.1.1 @@ -1229,10 +1229,10 @@ importers: specifier: ^15.8.1 version: 15.8.1 react: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1 react-dom: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1(react@18.3.1) react-transition-group: specifier: ^4.4.5 @@ -1324,10 +1324,10 @@ importers: specifier: ^15.8.1 version: 15.8.1 react: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1 react-dom: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1(react@18.3.1) react-transition-group: specifier: ^4.4.5 @@ -1377,7 +1377,7 @@ importers: specifier: ^5.16.6 || ^6.0.0 version: 5.16.6(@types/react@18.3.12)(react@18.3.1) react: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1 devDependencies: '@mui/internal-test-utils': @@ -1397,7 +1397,7 @@ importers: specifier: ^5.16.6 || ^6.0.0 version: 5.16.6(@types/react@18.3.12)(react@18.3.1) react: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1 devDependencies: '@mui/internal-test-utils': @@ -1435,10 +1435,10 @@ importers: specifier: ^15.8.1 version: 15.8.1 react: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1 react-dom: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1(react@18.3.1) react-transition-group: specifier: ^4.4.5 @@ -1494,10 +1494,10 @@ importers: specifier: ^15.8.1 version: 15.8.1 react: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1 react-dom: - specifier: ^17.0.0 || ^18.0.0 + specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 18.3.1(react@18.3.1) react-transition-group: specifier: ^4.4.5 @@ -3143,10 +3143,10 @@ packages: '@types/react': optional: true - '@mui/monorepo@https://codeload.github.com/mui/material-ui/tar.gz/010de4505361345951824d905d1508d6f258ba67': - resolution: {tarball: https://codeload.github.com/mui/material-ui/tar.gz/010de4505361345951824d905d1508d6f258ba67} - version: 6.1.4 - engines: {pnpm: 9.12.1} + '@mui/monorepo@https://codeload.github.com/mui/material-ui/tar.gz/7aa841466a01b745012e59e9d201ed50807a022e': + resolution: {tarball: https://codeload.github.com/mui/material-ui/tar.gz/7aa841466a01b745012e59e9d201ed50807a022e} + version: 6.1.8 + engines: {pnpm: 9.13.2} '@mui/private-theming@5.16.6': resolution: {integrity: sha512-rAk+Rh8Clg7Cd7shZhyt2HGTTE5wYKNSJ5sspf28Fqm/PZ69Er9o6KX25g03/FG2dfpg5GCwZh/xOojiTfm3hw==} @@ -3819,33 +3819,29 @@ packages: '@sinonjs/text-encoding@0.7.2': resolution: {integrity: sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==} - '@slack/bolt@3.22.0': - resolution: {integrity: sha512-iKDqGPEJDnrVwxSVlFW6OKTkijd7s4qLBeSufoBsTM0reTyfdp/5izIQVkxNfzjHi3o6qjdYbRXkYad5HBsBog==} - engines: {node: '>=14.21.3', npm: '>=6.14.18'} - - '@slack/logger@3.0.0': - resolution: {integrity: sha512-DTuBFbqu4gGfajREEMrkq5jBhcnskinhr4+AnfJEk48zhVeEv3XnUKGIX98B74kxhYsIMfApGGySTn7V3b5yBA==} - engines: {node: '>= 12.13.0', npm: '>= 6.12.0'} + '@slack/bolt@4.1.0': + resolution: {integrity: sha512-7XlTziPVLQn8RXNuOTzsJh/wrkX4YUZr1UpX25MpfDdMpp28Y4TrtIvYDh6GV90uNscdHJhOJcpqLq6ibqfGfg==} + engines: {node: '>=18', npm: '>=8.6.0'} '@slack/logger@4.0.0': resolution: {integrity: sha512-Wz7QYfPAlG/DR+DfABddUZeNgoeY7d1J39OCR2jR+v7VBsB8ezulDK5szTnDDPDwLH5IWhLvXIHlCFZV7MSKgA==} engines: {node: '>= 18', npm: '>= 8.6.0'} - '@slack/oauth@2.6.3': - resolution: {integrity: sha512-1amXs6xRkJpoH6zSgjVPgGEJXCibKNff9WNDijcejIuVy1HFAl1adh7lehaGNiHhTWfQkfKxBiF+BGn56kvoFw==} - engines: {node: '>=12.13.0', npm: '>=6.12.0'} + '@slack/oauth@3.0.1': + resolution: {integrity: sha512-TuR9PI6bYKX6qHC7FQI4keMnhj45TNfSNQtTU3mtnHUX4XLM2dYLvRkUNADyiLTle2qu2rsOQtCIsZJw6H0sDA==} + engines: {node: '>=18', npm: '>=8.6.0'} - '@slack/socket-mode@1.3.6': - resolution: {integrity: sha512-G+im7OP7jVqHhiNSdHgv2VVrnN5U7KY845/5EZimZkrD4ZmtV0P3BiWkgeJhPtdLuM7C7i6+M6h6Bh+S4OOalA==} - engines: {node: '>=12.13.0', npm: '>=6.12.0'} + '@slack/socket-mode@2.0.2': + resolution: {integrity: sha512-WSLBnGY9eE19jx6QLIP78oFpxNVU74soDIP0dupi35MFY6WfLBAikbuy4Y/rR4v9eJ7MNnd5/BdQNETgv32F8Q==} + engines: {node: '>= 18', npm: '>= 8.6.0'} '@slack/types@2.13.0': resolution: {integrity: sha512-OAQVtKYIgBVNRmgIoiTjorGPTlgfcfstU3XYYCBA+czlB9aGcKb9MQc+6Jovi4gq3S98yP/GPBZsJSI/2mHKDQ==} engines: {node: '>= 12.13.0', npm: '>= 6.12.0'} - '@slack/web-api@6.13.0': - resolution: {integrity: sha512-dv65crIgdh9ZYHrevLU6XFHTQwTyDmNqEqzuIrV+Vqe/vgiG6w37oex5ePDU1RGm2IJ90H8iOvHFvzdEO/vB+g==} - engines: {node: '>= 12.13.0', npm: '>= 6.12.0'} + '@slack/web-api@7.7.0': + resolution: {integrity: sha512-DtRyjgQi0mObA2uC6H8nL2OhAISKDhvtOXgRjGRBnBhiaWb6df5vPmKHsOHjpweYALBMHtiqE5ajZFkDW/ag8Q==} + engines: {node: '>= 18', npm: '>= 8.6.0'} '@socket.io/component-emitter@3.1.0': resolution: {integrity: sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==} @@ -4077,9 +4073,6 @@ packages: '@types/http-errors@2.0.4': resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} - '@types/is-stream@1.1.0': - resolution: {integrity: sha512-jkZatu4QVbR60mpIzjINmtS1ZF4a/FqdTUTBeQDVOQ2PYyidtwFKr0B5G6ERukKwliq+7mIXvxyppwzG5EgRYg==} - '@types/istanbul-lib-coverage@2.0.6': resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} @@ -4095,8 +4088,8 @@ packages: '@types/jsonfile@6.1.4': resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} - '@types/jsonwebtoken@8.5.9': - resolution: {integrity: sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==} + '@types/jsonwebtoken@9.0.7': + resolution: {integrity: sha512-ugo316mmTYBl2g81zDFnZ7cfxlut3o+/EQdaP7J8QN2kY6lJ22hmQYCK5EHcJHbrW+dkCGSCPgbG8JtYj6qSrg==} '@types/karma@6.3.8': resolution: {integrity: sha512-+QGoOPhb1f6Oli8pG+hxdnGDzVhIrpsHaFSJ4UJg15Xj+QBtluKELkJY+L4Li532HmT3l5K5o1FoUZHRQeOOaQ==} @@ -4143,9 +4136,6 @@ packages: '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} - '@types/promise.allsettled@1.0.6': - resolution: {integrity: sha512-wA0UT0HeT2fGHzIFV9kWpYz5mdoyLxKrTgMdZQM++5h6pYAFH73HXcQhefg24nD1yivUFEn5KU+EF4b+CXJ4Wg==} - '@types/prop-types@15.7.13': resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} @@ -4200,17 +4190,14 @@ packages: '@types/stylis@4.2.6': resolution: {integrity: sha512-4nebF2ZJGzQk0ka0O6+FZUWceyFv4vWq/0dXBMmrSeAwzOuOd/GxE5Pa64d/ndeNLG73dXoBsRzvtsVsYUv6Uw==} - '@types/tsscmp@1.0.2': - resolution: {integrity: sha512-cy7BRSU8GYYgxjcx0Py+8lo5MthuDhlyu076KUcYzVNXL23luYgRHkMG2fIFEc6neckeh/ntP82mw+U4QjZq+g==} - '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} '@types/webpack-bundle-analyzer@4.7.0': resolution: {integrity: sha512-c5i2ThslSNSG8W891BRvOd/RoCjI2zwph8maD22b1adtSns20j+0azDDMCK06DiVrzTgnwiDl5Ntmu1YRJw8Sg==} - '@types/ws@7.4.7': - resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} + '@types/ws@8.5.13': + resolution: {integrity: sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==} '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -4460,6 +4447,10 @@ packages: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} + accepts@2.0.0: + resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} + engines: {node: '>= 0.6'} + acorn-import-attributes@1.9.5: resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} peerDependencies: @@ -4623,8 +4614,8 @@ packages: resolution: {integrity: sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==} engines: {node: '>=8'} - array-flatten@1.1.1: - resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} + array-flatten@3.0.0: + resolution: {integrity: sha512-zPMVc3ZYlGLNk4mpK1NzP2wg0ml9t7fUgDsayR5Y5rSzxQilzR9FGu/EH2jQOcKSAeAfWeylyW8juy3OkWRvNA==} array-ify@1.0.0: resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} @@ -4659,10 +4650,6 @@ packages: resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} engines: {node: '>= 0.4'} - array.prototype.map@1.0.6: - resolution: {integrity: sha512-nK1psgF2cXqP3wSyCSq0Hc7zwNq3sfljQqaG27r/7a7ooNUnn5nGq6yYWyks9jMO5EoFQ0ax80hSg6oXSRNXaw==} - engines: {node: '>= 0.4'} - array.prototype.reduce@1.0.6: resolution: {integrity: sha512-UW+Mz8LG/sPSU8jRDCjVr6J/ZKAGpHfwrZ6kWTG5qCxIEiXdVshqGnu5vEZA8S1y6X4aCSbQZ0/EEsfvEvBiSg==} engines: {node: '>= 0.4'} @@ -4841,6 +4828,10 @@ packages: resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + body-parser@2.0.2: + resolution: {integrity: sha512-SNMk0OONlQ01uk8EPeiBvTW7W4ovpL5b1O3t1sjpPgfxOQ6BqQJ6XjxinDPR79Z6HdcD5zBBwr5ssiTlgdNztQ==} + engines: {node: '>=18'} + boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} @@ -5229,8 +5220,8 @@ packages: resolution: {integrity: sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==} engines: {node: '>= 0.6'} - content-disposition@0.5.4: - resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} + content-disposition@1.0.0: + resolution: {integrity: sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==} engines: {node: '>= 0.6'} content-type@1.0.5: @@ -5278,15 +5269,16 @@ packages: resolution: {integrity: sha512-qN60BAwdMVdofckX7AlohVJ2x9UvjTNoKVXCL2LxFk1l7757EJqf1nySdMkPQer0bt8kQ5lQiyZ9/2NvrFBuwQ==} engines: {node: '>=6'} - cookie-signature@1.0.6: - resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} + cookie-signature@1.2.2: + resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} + engines: {node: '>=6.6.0'} cookie@0.4.2: resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} engines: {node: '>= 0.6'} - cookie@0.6.0: - resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} + cookie@0.7.1: + resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} core-js-compat@3.38.1: @@ -5499,6 +5491,14 @@ packages: supports-color: optional: true + debug@3.1.0: + resolution: {integrity: sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -6068,9 +6068,6 @@ packages: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} - eventemitter3@3.1.2: - resolution: {integrity: sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==} - eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} @@ -6093,8 +6090,8 @@ packages: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} - execa@9.4.0: - resolution: {integrity: sha512-yKHlle2YGxZE842MERVIplWwNH5VYmqqcPFgtnlU//K8gxuFFXu0pwd/CrfXTumFpeEiufsP7+opT/bPJa1yVw==} + execa@9.5.1: + resolution: {integrity: sha512-QY5PPtSonnGwhhHDNI7+3RvY285c7iuJFFB+lU+oEzMY/gEGJ808owqJsrr8Otd1E/x07po1LkUBmdAc5duPAg==} engines: {node: ^18.19.0 || >=20.5.0} expand-tilde@2.0.2: @@ -6104,9 +6101,9 @@ packages: exponential-backoff@3.1.1: resolution: {integrity: sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==} - express@4.21.0: - resolution: {integrity: sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==} - engines: {node: '>= 0.10.0'} + express@5.0.1: + resolution: {integrity: sha512-ORF7g6qGnD+YtUG9yx4DFoqCShNMmUKiXuT5oWMHiOvt/4WFbHC6yCwQMTSBMno7AqntNCAzzcnnjowRkTL9eQ==} + engines: {node: '>= 18'} extend-shallow@2.0.1: resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} @@ -6190,8 +6187,8 @@ packages: resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} engines: {node: '>= 0.8'} - finalhandler@1.3.1: - resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==} + finalhandler@2.0.0: + resolution: {integrity: sha512-MX6Zo2adDViYh+GcxxB1dpO43eypOGUOL12rLCOTMQv/DfIbpSJUy4oQIIZhVZkH9e+bZWKMon0XHFEju16tkQ==} engines: {node: '>= 0.8'} find-babel-config@2.1.1: @@ -6232,9 +6229,6 @@ packages: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - finity@0.5.4: - resolution: {integrity: sha512-3l+5/1tuw616Lgb0QBimxfdd2TqaDGpfCBpfX6EqtFmqUV3FtQnVEX4Aa62DagYEqnsTIjZcTfbq9msDbXYgyA==} - flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} @@ -6270,10 +6264,6 @@ packages: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} - form-data@2.5.1: - resolution: {integrity: sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==} - engines: {node: '>= 0.12'} - form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} @@ -6292,6 +6282,10 @@ packages: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} + fresh@2.0.0: + resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} + engines: {node: '>= 0.8'} + fromentries@1.3.2: resolution: {integrity: sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==} @@ -6505,8 +6499,8 @@ packages: resolution: {integrity: sha512-4kKdWXTtgQ4biIo7hZA396HT062nDVVHPjQcurNZ3o/voYN+o5FUC5kOwuORbpExp3XbTJ3SU7iRipiIhQtovw==} engines: {node: '>=14'} - google-auth-library@9.14.2: - resolution: {integrity: sha512-R+FRIfk1GBo3RdlRYWPdwk8nmtVUOn6+BkDomAC46KoU8kzXzE1HLmOasSCbWUByMMAGkknVF0G5kQ69Vj7dlA==} + google-auth-library@9.15.0: + resolution: {integrity: sha512-7ccSEJFDFO7exFbO6NRyC+xH8/mZ1GZGG2xxx9iHxZWcjUjJpjWxIMw3cofAKcueZ6DATiukmmprD7yavQHOyQ==} engines: {node: '>=14'} googleapis-common@7.0.1: @@ -6689,6 +6683,10 @@ packages: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} + iconv-lite@0.5.2: + resolution: {integrity: sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag==} + engines: {node: '>=0.10.0'} + iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} @@ -6909,6 +6907,9 @@ packages: is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} + is-promise@4.0.0: + resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} + is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -6923,10 +6924,6 @@ packages: is-ssh@1.4.0: resolution: {integrity: sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==} - is-stream@1.1.0: - resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} - engines: {node: '>=0.10.0'} - is-stream@2.0.0: resolution: {integrity: sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==} engines: {node: '>=8'} @@ -7043,12 +7040,6 @@ packages: Visit https://istanbul.js.org/integrations for other alternatives. hasBin: true - iterate-iterator@1.0.2: - resolution: {integrity: sha512-t91HubM4ZDQ70M9wqp+pcNpu8OyJ9UAtXntT/Bcsvp5tZMnz9vRa+IunKXeI8AnfZMTv0jNuVEmGeLSMjVvfPw==} - - iterate-value@1.0.2: - resolution: {integrity: sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==} - iterator.prototype@1.1.2: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} @@ -7604,6 +7595,10 @@ packages: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} + media-typer@1.1.0: + resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==} + engines: {node: '>= 0.8'} + memfs-or-file-map-to-github-branch@1.2.1: resolution: {integrity: sha512-I/hQzJ2a/pCGR8fkSQ9l5Yx+FQ4e7X6blNHyWBm2ojeFLT3GVzGkTj7xnyWpdclrr7Nq4dmx3xrvu70m3ypzAQ==} @@ -7618,8 +7613,9 @@ packages: resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==} engines: {node: '>=10'} - merge-descriptors@1.0.3: - resolution: {integrity: sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==} + merge-descriptors@2.0.0: + resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} + engines: {node: '>=18'} merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -7707,6 +7703,10 @@ packages: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} + mime-db@1.53.0: + resolution: {integrity: sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg==} + engines: {node: '>= 0.6'} + mime-types@2.1.18: resolution: {integrity: sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==} engines: {node: '>= 0.6'} @@ -7715,10 +7715,9 @@ packages: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} - mime@1.6.0: - resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} - engines: {node: '>=4'} - hasBin: true + mime-types@3.0.0: + resolution: {integrity: sha512-XqoSHeCGjVClAmoGFG3lVFqQFRIrTVw2OH3axRqAcfaw+gHWIfnASS92AV+Rl/mk0MupgZTRHQOjxY6YVnzK5w==} + engines: {node: '>= 0.6'} mime@2.6.0: resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} @@ -7882,6 +7881,10 @@ packages: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} + negotiator@1.0.0: + resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} + engines: {node: '>= 0.6'} + neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} @@ -8370,9 +8373,6 @@ packages: resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} engines: {node: 20 || >=22} - path-to-regexp@0.1.10: - resolution: {integrity: sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==} - path-to-regexp@2.2.1: resolution: {integrity: sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==} @@ -8590,10 +8590,6 @@ packages: resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} engines: {node: '>=10'} - promise.allsettled@1.0.7: - resolution: {integrity: sha512-hezvKvQQmsFkOdrZfYxUxkyxl8mgFQeT259Ajj9PXdbg9VzBCWrItOev72JyWxkCD5VSSqAeHmlN3tWx4DlmsA==} - engines: {node: '>= 0.4'} - promzard@1.0.0: resolution: {integrity: sha512-KQVDEubSUHGSt5xLakaToDFrSoZhStB8dXLzk2xvwR67gJktrHFvpR63oZgHyK19WKbHFLXJqCPXdVR3aBP8Ig==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -8664,6 +8660,10 @@ packages: resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} engines: {node: '>= 0.8'} + raw-body@3.0.0: + resolution: {integrity: sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==} + engines: {node: '>= 0.8'} + rc@1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true @@ -8955,6 +8955,10 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + router@2.0.0: + resolution: {integrity: sha512-dIM5zVoG8xhC6rnSN8uoAgFARwTE7BQs8YwHEvK0VCmfxQXMaOuA1uiR1IPwsW7JyK5iTt7Od/TC9StasS2NPQ==} + engines: {node: '>= 0.10'} + rrweb-cssom@0.6.0: resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} @@ -9031,9 +9035,9 @@ packages: engines: {node: '>=10'} hasBin: true - send@0.19.0: - resolution: {integrity: sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==} - engines: {node: '>= 0.8.0'} + send@1.1.0: + resolution: {integrity: sha512-v67WcEouB5GxbTWL/4NeToqcZiAWEq90N888fczVArY8A79J0L4FD7vj5hm3eUMua5EpoQ59wa/oovY6TLvRUA==} + engines: {node: '>= 18'} serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} @@ -9041,9 +9045,9 @@ packages: serve-handler@6.1.5: resolution: {integrity: sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==} - serve-static@1.16.2: - resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==} - engines: {node: '>= 0.8.0'} + serve-static@2.1.0: + resolution: {integrity: sha512-A3We5UfEjG8Z7VkDv6uItWw6HY2bBSBJT1KtVESn6EOoOr2jAxNhxWCLY3jDE2WcuHXByWju74ck3ZgLwL8xmA==} + engines: {node: '>= 18'} serve@14.2.3: resolution: {integrity: sha512-VqUFMC7K3LDGeGnJM9h56D3XGKb6KGgOw0cVNtA26yYXHCcpxf3xwCTUaQoWlVS7i8Jdh3GjQkOB23qsXyjoyQ==} @@ -9643,6 +9647,10 @@ packages: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} + type-is@2.0.0: + resolution: {integrity: sha512-gd0sGezQYCbWSbkZr75mln4YBidWUN60+devscpLF5mtRDUpiaTvKpBNrdaCvel1NdR2k6vclXybU5fBd2i+nw==} + engines: {node: '>= 0.6'} + typed-array-buffer@1.0.2: resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} engines: {node: '>= 0.4'} @@ -11940,13 +11948,13 @@ snapshots: '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.12)(react@18.3.1))(@types/react@18.3.12)(react@18.3.1) '@types/react': 18.3.12 - '@mui/monorepo@https://codeload.github.com/mui/material-ui/tar.gz/010de4505361345951824d905d1508d6f258ba67(encoding@0.1.13)': + '@mui/monorepo@https://codeload.github.com/mui/material-ui/tar.gz/7aa841466a01b745012e59e9d201ed50807a022e(encoding@0.1.13)': dependencies: '@googleapis/sheets': 9.3.1(encoding@0.1.13) '@netlify/functions': 2.8.2 - '@slack/bolt': 3.22.0 - execa: 9.4.0 - google-auth-library: 9.14.2(encoding@0.1.13) + '@slack/bolt': 4.1.0 + execa: 9.5.1 + google-auth-library: 9.15.0(encoding@0.1.13) transitivePeerDependencies: - bufferutil - debug @@ -12712,21 +12720,18 @@ snapshots: '@sinonjs/text-encoding@0.7.2': {} - '@slack/bolt@3.22.0': + '@slack/bolt@4.1.0': dependencies: '@slack/logger': 4.0.0 - '@slack/oauth': 2.6.3 - '@slack/socket-mode': 1.3.6 + '@slack/oauth': 3.0.1 + '@slack/socket-mode': 2.0.2 '@slack/types': 2.13.0 - '@slack/web-api': 6.13.0 + '@slack/web-api': 7.7.0 '@types/express': 4.17.21 - '@types/promise.allsettled': 1.0.6 - '@types/tsscmp': 1.0.2 axios: 1.7.5(debug@4.3.6) - express: 4.21.0 + express: 5.0.1 path-to-regexp: 8.1.0 - promise.allsettled: 1.0.7 - raw-body: 2.5.2 + raw-body: 3.0.0 tsscmp: 1.0.6 transitivePeerDependencies: - bufferutil @@ -12734,34 +12739,29 @@ snapshots: - supports-color - utf-8-validate - '@slack/logger@3.0.0': - dependencies: - '@types/node': 20.16.11 - '@slack/logger@4.0.0': dependencies: '@types/node': 20.16.11 - '@slack/oauth@2.6.3': + '@slack/oauth@3.0.1': dependencies: - '@slack/logger': 3.0.0 - '@slack/web-api': 6.13.0 - '@types/jsonwebtoken': 8.5.9 + '@slack/logger': 4.0.0 + '@slack/web-api': 7.7.0 + '@types/jsonwebtoken': 9.0.7 '@types/node': 20.16.11 jsonwebtoken: 9.0.2 lodash.isstring: 4.0.1 transitivePeerDependencies: - debug - '@slack/socket-mode@1.3.6': + '@slack/socket-mode@2.0.2': dependencies: - '@slack/logger': 3.0.0 - '@slack/web-api': 6.13.0 + '@slack/logger': 4.0.0 + '@slack/web-api': 7.7.0 '@types/node': 20.16.11 - '@types/ws': 7.4.7 + '@types/ws': 8.5.13 eventemitter3: 5.0.1 - finity: 0.5.4 - ws: 7.5.9 + ws: 8.18.0 transitivePeerDependencies: - bufferutil - debug @@ -12769,19 +12769,20 @@ snapshots: '@slack/types@2.13.0': {} - '@slack/web-api@6.13.0': + '@slack/web-api@7.7.0': dependencies: - '@slack/logger': 3.0.0 + '@slack/logger': 4.0.0 '@slack/types': 2.13.0 - '@types/is-stream': 1.1.0 '@types/node': 20.16.11 + '@types/retry': 0.12.0 axios: 1.7.5(debug@4.3.6) - eventemitter3: 3.1.2 - form-data: 2.5.1 + eventemitter3: 5.0.1 + form-data: 4.0.0 is-electron: 2.2.2 - is-stream: 1.1.0 + is-stream: 2.0.1 p-queue: 6.6.2 p-retry: 4.6.2 + retry: 0.13.1 transitivePeerDependencies: - debug @@ -13007,10 +13008,6 @@ snapshots: '@types/http-errors@2.0.4': {} - '@types/is-stream@1.1.0': - dependencies: - '@types/node': 20.16.11 - '@types/istanbul-lib-coverage@2.0.6': {} '@types/jscodeshift@0.12.0': @@ -13026,7 +13023,7 @@ snapshots: dependencies: '@types/node': 20.16.11 - '@types/jsonwebtoken@8.5.9': + '@types/jsonwebtoken@9.0.7': dependencies: '@types/node': 20.16.11 @@ -13073,8 +13070,6 @@ snapshots: '@types/parse-json@4.0.2': {} - '@types/promise.allsettled@1.0.6': {} - '@types/prop-types@15.7.13': {} '@types/qs@6.9.11': {} @@ -13136,8 +13131,6 @@ snapshots: '@types/stylis@4.2.6': {} - '@types/tsscmp@1.0.2': {} - '@types/unist@3.0.3': {} '@types/webpack-bundle-analyzer@4.7.0(@swc/core@1.7.35(@swc/helpers@0.5.5))(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.95.0))': @@ -13151,7 +13144,7 @@ snapshots: - uglify-js - webpack-cli - '@types/ws@7.4.7': + '@types/ws@8.5.13': dependencies: '@types/node': 20.16.11 @@ -13478,6 +13471,11 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 + accepts@2.0.0: + dependencies: + mime-types: 3.0.0 + negotiator: 1.0.0 + acorn-import-attributes@1.9.5(acorn@8.12.1): dependencies: acorn: 8.12.1 @@ -13665,7 +13663,7 @@ snapshots: array-differ@3.0.0: {} - array-flatten@1.1.1: {} + array-flatten@3.0.0: {} array-ify@1.0.0: {} @@ -13716,14 +13714,6 @@ snapshots: es-abstract: 1.23.3 es-shim-unscopables: 1.0.2 - array.prototype.map@1.0.6: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-array-method-boxes-properly: 1.0.0 - is-string: 1.0.7 - array.prototype.reduce@1.0.6: dependencies: call-bind: 1.0.7 @@ -13949,6 +13939,21 @@ snapshots: transitivePeerDependencies: - supports-color + body-parser@2.0.2: + dependencies: + bytes: 3.1.2 + content-type: 1.0.5 + debug: 3.1.0 + destroy: 1.2.0 + http-errors: 2.0.0 + iconv-lite: 0.5.2 + on-finished: 2.4.1 + qs: 6.13.0 + raw-body: 3.0.0 + type-is: 1.6.18 + transitivePeerDependencies: + - supports-color + boolbase@1.0.0: {} bottleneck@2.19.5: {} @@ -14303,7 +14308,7 @@ snapshots: compressible@2.0.18: dependencies: - mime-db: 1.52.0 + mime-db: 1.53.0 compression-webpack-plugin@11.1.0(webpack@5.95.0): dependencies: @@ -14357,7 +14362,7 @@ snapshots: content-disposition@0.5.2: {} - content-disposition@0.5.4: + content-disposition@1.0.0: dependencies: safe-buffer: 5.2.1 @@ -14424,11 +14429,11 @@ snapshots: lodash.clonedeep: 4.5.0 yargs-parser: 20.2.9 - cookie-signature@1.0.6: {} + cookie-signature@1.2.2: {} cookie@0.4.2: {} - cookie@0.6.0: {} + cookie@0.7.1: {} core-js-compat@3.38.1: dependencies: @@ -14680,6 +14685,10 @@ snapshots: dependencies: ms: 2.0.0 + debug@3.1.0: + dependencies: + ms: 2.0.0 + debug@3.2.7: dependencies: ms: 2.1.3 @@ -15442,8 +15451,6 @@ snapshots: etag@1.8.1: {} - eventemitter3@3.1.2: {} - eventemitter3@4.0.7: {} eventemitter3@5.0.1: {} @@ -15486,7 +15493,7 @@ snapshots: signal-exit: 3.0.7 strip-final-newline: 2.0.0 - execa@9.4.0: + execa@9.5.1: dependencies: '@sindresorhus/merge-streams': 4.0.0 cross-spawn: 7.0.3 @@ -15507,37 +15514,38 @@ snapshots: exponential-backoff@3.1.1: {} - express@4.21.0: + express@5.0.1: dependencies: - accepts: 1.3.8 - array-flatten: 1.1.1 - body-parser: 1.20.3 - content-disposition: 0.5.4 + accepts: 2.0.0 + body-parser: 2.0.2 + content-disposition: 1.0.0 content-type: 1.0.5 - cookie: 0.6.0 - cookie-signature: 1.0.6 - debug: 2.6.9 + cookie: 0.7.1 + cookie-signature: 1.2.2 + debug: 4.3.6(supports-color@8.1.1) depd: 2.0.0 encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - finalhandler: 1.3.1 - fresh: 0.5.2 + finalhandler: 2.0.0 + fresh: 2.0.0 http-errors: 2.0.0 - merge-descriptors: 1.0.3 + merge-descriptors: 2.0.0 methods: 1.1.2 + mime-types: 3.0.0 on-finished: 2.4.1 + once: 1.4.0 parseurl: 1.3.3 - path-to-regexp: 0.1.10 proxy-addr: 2.0.7 qs: 6.13.0 range-parser: 1.2.1 + router: 2.0.0 safe-buffer: 5.2.1 - send: 0.19.0 - serve-static: 1.16.2 + send: 1.1.0 + serve-static: 2.1.0 setprototypeof: 1.2.0 statuses: 2.0.1 - type-is: 1.6.18 + type-is: 2.0.0 utils-merge: 1.0.1 vary: 1.1.2 transitivePeerDependencies: @@ -15628,10 +15636,10 @@ snapshots: transitivePeerDependencies: - supports-color - finalhandler@1.3.1: + finalhandler@2.0.0: dependencies: debug: 2.6.9 - encodeurl: 2.0.0 + encodeurl: 1.0.2 escape-html: 1.0.3 on-finished: 2.4.1 parseurl: 1.3.3 @@ -15687,8 +15695,6 @@ snapshots: locate-path: 7.2.0 path-exists: 5.0.0 - finity@0.5.4: {} - flat-cache@3.2.0: dependencies: flatted: 3.3.1 @@ -15719,12 +15725,6 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 - form-data@2.5.1: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - form-data@4.0.0: dependencies: asynckit: 0.4.0 @@ -15739,6 +15739,8 @@ snapshots: fresh@0.5.2: {} + fresh@2.0.0: {} + fromentries@1.3.2: {} fs-constants@1.0.0: {} @@ -16004,7 +16006,7 @@ snapshots: transitivePeerDependencies: - supports-color - google-auth-library@9.14.2(encoding@0.1.13): + google-auth-library@9.15.0(encoding@0.1.13): dependencies: base64-js: 1.5.1 ecdsa-sig-formatter: 1.0.11 @@ -16020,7 +16022,7 @@ snapshots: dependencies: extend: 3.0.2 gaxios: 6.1.1(encoding@0.1.13) - google-auth-library: 9.14.2(encoding@0.1.13) + google-auth-library: 9.15.0(encoding@0.1.13) qs: 6.13.0 url-template: 2.0.8 uuid: 9.0.1 @@ -16218,6 +16220,10 @@ snapshots: dependencies: safer-buffer: 2.1.2 + iconv-lite@0.5.2: + dependencies: + safer-buffer: 2.1.2 + iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2 @@ -16410,6 +16416,8 @@ snapshots: is-potential-custom-element-name@1.0.1: {} + is-promise@4.0.0: {} + is-regex@1.1.4: dependencies: call-bind: 1.0.7 @@ -16425,8 +16433,6 @@ snapshots: dependencies: protocols: 2.0.1 - is-stream@1.1.0: {} - is-stream@2.0.0: {} is-stream@2.0.1: {} @@ -16547,13 +16553,6 @@ snapshots: which: 1.3.1 wordwrap: 1.0.0 - iterate-iterator@1.0.2: {} - - iterate-value@1.0.2: - dependencies: - es-get-iterator: 1.1.3 - iterate-iterator: 1.0.2 - iterator.prototype@1.1.2: dependencies: define-properties: 1.2.1 @@ -17320,6 +17319,8 @@ snapshots: media-typer@0.3.0: {} + media-typer@1.1.0: {} + memfs-or-file-map-to-github-branch@1.2.1(encoding@0.1.13): dependencies: '@octokit/rest': 18.12.0(encoding@0.1.13) @@ -17344,7 +17345,7 @@ snapshots: type-fest: 0.18.1 yargs-parser: 20.2.9 - merge-descriptors@1.0.3: {} + merge-descriptors@2.0.0: {} merge-stream@2.0.0: {} @@ -17494,6 +17495,8 @@ snapshots: mime-db@1.52.0: {} + mime-db@1.53.0: {} + mime-types@2.1.18: dependencies: mime-db: 1.33.0 @@ -17502,7 +17505,9 @@ snapshots: dependencies: mime-db: 1.52.0 - mime@1.6.0: {} + mime-types@3.0.0: + dependencies: + mime-db: 1.53.0 mime@2.6.0: {} @@ -17672,6 +17677,8 @@ snapshots: negotiator@0.6.3: {} + negotiator@1.0.0: {} + neo-async@2.6.2: {} nested-error-stacks@2.1.1: {} @@ -18288,8 +18295,6 @@ snapshots: lru-cache: 11.0.1 minipass: 7.1.2 - path-to-regexp@0.1.10: {} - path-to-regexp@2.2.1: {} path-to-regexp@6.2.1: {} @@ -18463,15 +18468,6 @@ snapshots: err-code: 2.0.3 retry: 0.12.0 - promise.allsettled@1.0.7: - dependencies: - array.prototype.map: 1.0.6 - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - get-intrinsic: 1.2.4 - iterate-value: 1.0.2 - promzard@1.0.0: dependencies: read: 2.1.0 @@ -18530,6 +18526,13 @@ snapshots: iconv-lite: 0.4.24 unpipe: 1.0.0 + raw-body@3.0.0: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.6.3 + unpipe: 1.0.0 + rc@1.2.8: dependencies: deep-extend: 0.6.0 @@ -18884,6 +18887,16 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.18.1 fsevents: 2.3.3 + router@2.0.0: + dependencies: + array-flatten: 3.0.0 + is-promise: 4.0.0 + methods: 1.1.2 + parseurl: 1.3.3 + path-to-regexp: 8.1.0 + setprototypeof: 1.2.0 + utils-merge: 1.0.1 + rrweb-cssom@0.6.0: {} rrweb-cssom@0.7.1: {} @@ -18958,17 +18971,16 @@ snapshots: semver@7.6.3: {} - send@0.19.0: + send@1.1.0: dependencies: - debug: 2.6.9 - depd: 2.0.0 + debug: 4.3.6(supports-color@8.1.1) destroy: 1.2.0 - encodeurl: 1.0.2 + encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 fresh: 0.5.2 http-errors: 2.0.0 - mime: 1.6.0 + mime-types: 2.1.35 ms: 2.1.3 on-finished: 2.4.1 range-parser: 1.2.1 @@ -18991,12 +19003,12 @@ snapshots: path-to-regexp: 2.2.1 range-parser: 1.2.0 - serve-static@1.16.2: + serve-static@2.1.0: dependencies: encodeurl: 2.0.0 escape-html: 1.0.3 parseurl: 1.3.3 - send: 0.19.0 + send: 1.1.0 transitivePeerDependencies: - supports-color @@ -19650,6 +19662,12 @@ snapshots: media-typer: 0.3.0 mime-types: 2.1.35 + type-is@2.0.0: + dependencies: + content-type: 1.0.5 + media-typer: 1.1.0 + mime-types: 3.0.0 + typed-array-buffer@1.0.2: dependencies: call-bind: 1.0.7 diff --git a/scripts/buildApiDocs/chartsSettings/index.ts b/scripts/buildApiDocs/chartsSettings/index.ts index 90479273d2a4..30c812c5182d 100644 --- a/scripts/buildApiDocs/chartsSettings/index.ts +++ b/scripts/buildApiDocs/chartsSettings/index.ts @@ -9,7 +9,7 @@ type PageType = { pathname: string; title: string; plan?: 'community' | 'pro' | export const projectChartsSettings: ProjectSettings = { output: { - apiManifestPath: path.join(process.cwd(), 'docs/data/charts-component-api-pages.ts'), + apiManifestPath: path.join(process.cwd(), 'docs/data/chartsApiPages.ts'), }, onWritingManifestFile: ( builds: PromiseSettledResult[], @@ -33,8 +33,8 @@ export const projectChartsSettings: ProjectSettings = { return `import type { MuiPage } from 'docs/src/MuiPage'; -const apiPages: MuiPage[] = ${JSON.stringify(pages, null, 2)}; -export default apiPages; +const chartsApiPages: MuiPage[] = ${JSON.stringify(pages, null, 2)}; +export default chartsApiPages; `; }, typeScriptProjects: [ diff --git a/scripts/buildApiDocs/gridSettings/index.ts b/scripts/buildApiDocs/gridSettings/index.ts index b5890318ade6..2da34675345f 100644 --- a/scripts/buildApiDocs/gridSettings/index.ts +++ b/scripts/buildApiDocs/gridSettings/index.ts @@ -9,7 +9,7 @@ type PageType = { pathname: string; title: string; plan?: 'community' | 'pro' | export const projectGridSettings: ProjectSettings = { output: { - apiManifestPath: path.join(process.cwd(), 'docs/data/data-grid-component-api-pages.ts'), + apiManifestPath: path.join(process.cwd(), 'docs/data/dataGridApiPages.ts'), }, onWritingManifestFile: ( builds: PromiseSettledResult[], @@ -33,8 +33,8 @@ export const projectGridSettings: ProjectSettings = { return `import type { MuiPage } from 'docs/src/MuiPage'; -const apiPages: MuiPage[] = ${JSON.stringify(pages, null, 2)}; -export default apiPages; +const dataGridApiPages: MuiPage[] = ${JSON.stringify(pages, null, 2)}; +export default dataGridApiPages; `; }, typeScriptProjects: [ diff --git a/scripts/buildApiDocs/pickersSettings/index.ts b/scripts/buildApiDocs/pickersSettings/index.ts index e34ef1e9057e..f40aa1ca068b 100644 --- a/scripts/buildApiDocs/pickersSettings/index.ts +++ b/scripts/buildApiDocs/pickersSettings/index.ts @@ -9,7 +9,7 @@ type PageType = { pathname: string; title: string; plan?: 'community' | 'pro' | export const projectPickersSettings: ProjectSettings = { output: { - apiManifestPath: path.join(process.cwd(), 'docs/data/date-pickers-component-api-pages.ts'), + apiManifestPath: path.join(process.cwd(), 'docs/data/datePickersApiPages.ts'), }, onWritingManifestFile: ( builds: PromiseSettledResult[], @@ -33,8 +33,8 @@ export const projectPickersSettings: ProjectSettings = { return `import type { MuiPage } from 'docs/src/MuiPage'; -const apiPages: MuiPage[] = ${JSON.stringify(pages, null, 2)}; -export default apiPages; +const datePickersApiPages: MuiPage[] = ${JSON.stringify(pages, null, 2)}; +export default datePickersApiPages; `; }, typeScriptProjects: [ diff --git a/scripts/buildApiDocs/treeViewSettings/index.ts b/scripts/buildApiDocs/treeViewSettings/index.ts index d0202935db0e..d2dda4d0879f 100644 --- a/scripts/buildApiDocs/treeViewSettings/index.ts +++ b/scripts/buildApiDocs/treeViewSettings/index.ts @@ -9,7 +9,7 @@ type PageType = { pathname: string; title: string; plan?: 'community' | 'pro' | export const projectTreeSettings: ProjectSettings = { output: { - apiManifestPath: path.join(process.cwd(), 'docs/data/tree-view-component-api-pages.ts'), + apiManifestPath: path.join(process.cwd(), 'docs/data/treeViewApiPages.ts'), }, onWritingManifestFile: ( builds: PromiseSettledResult[], @@ -33,8 +33,8 @@ export const projectTreeSettings: ProjectSettings = { return `import type { MuiPage } from 'docs/src/MuiPage'; -const apiPages: MuiPage[] = ${JSON.stringify(pages, null, 2)}; -export default apiPages; +const treeViewApiPages: MuiPage[] = ${JSON.stringify(pages, null, 2)}; +export default treeViewApiPages; `; }, typeScriptProjects: [ diff --git a/scripts/useMaterialUIv6.mjs b/scripts/useMaterialUIv6.mjs index 07f2aed4e3ab..abc2fe55845b 100644 --- a/scripts/useMaterialUIv6.mjs +++ b/scripts/useMaterialUIv6.mjs @@ -9,6 +9,9 @@ const pnpmUpdate = childProcess.spawnSync( '@mui/system@6.x', '@mui/icons-material@6.x', '@mui/utils@6.x', + '@mui/material-nextjs@6.x', + '@mui/styles@6.x', + '@mui/lab@latest', ], { shell: true, diff --git a/test/README.md b/test/README.md index 5bb982bb61ca..594badd07c28 100644 --- a/test/README.md +++ b/test/README.md @@ -12,57 +12,43 @@ Possible values for `version`: - a tag on npm, for example `next`, `experimental` or `latest` - an older version, for example `^17.0.0` -### CI +## Testing multiple versions of Material UI + +Currently, we use `@mui/material` v5 in the MUI X repo and all tests are run against it. +But MUI X packages are compatible with v5 and v6. +You can run the tests against `@mui/material` v6 by running the following command: -#### `next` version +`pnpm use-material-ui-v6` -For `react@next` specifically, there's a `react-next` workflow in our CircleCI pipeline that you can trigger in CircleCI on the PR you want to test: +## CI -1. Go to https://app.circleci.com/pipelines/github/mui/mui-x?branch=pull/PR_NUMBER and replace `PR_NUMBER` with the PR number you want to test. -2. Click `Trigger Pipeline` button. -3. Expand `Add parameters (optional)` and add the following parameter: +To execute additional jobs for custom versions of React/Material UI, you can use an `additional` workflow. In combination with `with-react-version` and/or `with-material-ui-6` parameters, it executes those jobs with dependency versions different from the main `pipeline` workflow. - | Parameter type | Name | Value | - | :------------- | :--------- | :----------- | - | `string` | `workflow` | `react-next` | +| Parameter type | Name | Value | +| :------------- | :------------------- | :------------------- | +| `string` | `workflow` | `additional` | +| `string` | `with-react-version` | `` | +| `boolean` | `with-material-ui-6` | `true` or `false` | +1. Go to https://app.circleci.com/pipelines/github/mui/mui-x?branch=pull/PR_NUMBER and replace `PR_NUMBER` with the PR number you want to test. +2. Click `Trigger Pipeline` button. +3. Go to the `Parameters` section and update the `workflow` parameter in combination with the version parameter(s). + You can leave the rest of the parameters with their default values. 4. Click `Trigger Pipeline` button. -#### Other versions +![CircleCI workflow](./circleci-workflow.png) + +### API -You can pass the same `version` to our CircleCI pipeline as well: +You can pass the same to our CircleCI pipeline through API as well: -With the following API request we're triggering a run of the default workflow in -PR #24289 for `react@next` +With the following API request we're triggering a run of the `additional` workflow in +PR #24289 for `react@rc` and `@mui/material-ui@6` ```bash curl --request POST \ --url https://circleci.com/api/v2/project/gh/mui/mui-x/pipeline \ --header 'content-type: application/json' \ --header 'Circle-Token: $CIRCLE_TOKEN' \ - --data-raw '{"branch":"pull/24289/head","parameters":{"react-version":"next"}}' + --data-raw '{"branch":"pull/24289/head","parameters":{"workflow":"additional","with-react-version":"rc","with-material-ui-6":true}}' ``` - -## Testing multiple versions of Material UI - -Currently, we use `@mui/material` v5 in the MUI X repo and all tests are run against it. -But MUI X packages are compatible with v5 and v6. -You can run the tests against `@mui/material` v6 by running the following command: - -`pnpm use-material-ui-v6` - -### CI - -There's a `material-ui-v6` workflow in our CircleCI pipeline that you can trigger in CircleCI on the PR you want to test: - -1. Go to https://app.circleci.com/pipelines/github/mui/mui-x?branch=pull/PR_NUMBER and replace `PR_NUMBER` with the PR number you want to test. -2. Click `Trigger Pipeline` button. -3. Expand `Add parameters (optional)` and add the following parameter: - - | Parameter type | Name | Value | - | :------------- | :--------- | :--------------- | - | `string` | `workflow` | `material-ui-v6` | - -4. Click `Trigger Pipeline` button. - -![CircleCI workflow](./circleci-workflow.png) diff --git a/test/circleci-workflow.png b/test/circleci-workflow.png index de549e5eef46..a7db4008e51e 100644 Binary files a/test/circleci-workflow.png and b/test/circleci-workflow.png differ