diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index e08318b0ba92c..cadf03b4f49f2 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -22,7 +22,8 @@ "@mui/x-date-pickers": "packages/x-date-pickers/build", "@mui/x-date-pickers-pro": "packages/x-date-pickers-pro/build", "@mui/x-charts": "packages/x-charts/build", - "@mui/x-tree-view": "packages/x-tree-view/build" + "@mui/x-tree-view": "packages/x-tree-view/build", + "@mui/x-tree-view-pro": "packages/x-tree-view-pro/build" }, "sandboxes": ["/bug-reproductions/x-data-grid"], "silent": true diff --git a/.eslintrc.js b/.eslintrc.js index 99d1462f8f7d4..c2de50d965d78 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -163,6 +163,8 @@ module.exports = { buildPackageRestrictedImports('@mui/x-data-grid-generator', 'x-data-grid-generator'), buildPackageRestrictedImports('@mui/x-pickers', 'x-pickers'), buildPackageRestrictedImports('@mui/x-pickers-pro', 'x-pickers-pro'), + buildPackageRestrictedImports('@mui/x-tree-view', 'x-tree-view'), + buildPackageRestrictedImports('@mui/x-tree-view-pro', 'x-tree-view-pro'), buildPackageRestrictedImports('@mui/x-license', 'x-license'), ], }; diff --git a/babel.config.js b/babel.config.js index e57e327f19eea..cffee2bfde9e9 100644 --- a/babel.config.js +++ b/babel.config.js @@ -16,6 +16,7 @@ const defaultAlias = { '@mui/x-date-pickers-pro': resolveAliasPath('./packages/x-date-pickers-pro/src'), '@mui/x-charts': resolveAliasPath('./packages/x-charts/src'), '@mui/x-tree-view': resolveAliasPath('./packages/x-tree-view/src'), + '@mui/x-tree-view-pro': resolveAliasPath('./packages/x-tree-view-pro/src'), '@mui/material-nextjs': '@mui/monorepo/packages/mui-material-nextjs/src', '@mui-internal/api-docs-builder': resolveAliasPath( './node_modules/@mui/monorepo/packages/api-docs-builder', diff --git a/docs/babel.config.js b/docs/babel.config.js index 4523a10447b15..939795a4f573d 100644 --- a/docs/babel.config.js +++ b/docs/babel.config.js @@ -10,6 +10,7 @@ const alias = { '@mui/x-date-pickers-pro': '../packages/x-date-pickers-pro/src', '@mui/x-charts': '../packages/x-charts/src', '@mui/x-tree-view': '../packages/x-tree-view/src', + '@mui/x-tree-view-pro': '../packages/x-tree-view-pro/src', '@mui/x-license': '../packages/x-license/src', '@mui/docs': '../node_modules/@mui/monorepo/packages/mui-docs/src', '@mui/monorepo': '../node_modules/@mui/monorepo', diff --git a/docs/scripts/createXTypeScriptProjects.ts b/docs/scripts/createXTypeScriptProjects.ts index b5bc86f9850a1..a997d7689b421 100644 --- a/docs/scripts/createXTypeScriptProjects.ts +++ b/docs/scripts/createXTypeScriptProjects.ts @@ -37,7 +37,8 @@ export type XProjectNames = | 'x-date-pickers' | 'x-date-pickers-pro' | 'x-charts' - | 'x-tree-view'; + | 'x-tree-view' + | 'x-tree-view-pro'; export type XTypeScriptProjects = Map; @@ -264,5 +265,24 @@ export const createXTypeScriptProjects = () => { }), ); + // TODO x-tree-view-pro uncomment when making the package public + // projects.set( + // 'x-tree-view-pro', + // createXTypeScriptProject({ + // name: 'x-tree-view-pro', + // rootPath: path.join(workspaceRoot, 'packages/x-tree-view-pro'), + // entryPointPath: 'src/index.ts', + // documentationFolderName: 'tree-view', + // getComponentsWithPropTypes: getComponentPaths({ + // folders: ['src'], + // includeUnstableComponents: true, + // }), + // getComponentsWithApiDoc: getComponentPaths({ + // folders: ['src'], + // includeUnstableComponents: true, + // }), + // }), + // ); + return projects; }; diff --git a/packages/x-charts/package.json b/packages/x-charts/package.json index 10834c1fb58b9..2538e10728530 100644 --- a/packages/x-charts/package.json +++ b/packages/x-charts/package.json @@ -1,7 +1,7 @@ { "name": "@mui/x-charts", "version": "7.1.0", - "description": "The community edition of the charts components (MUI X).", + "description": "The community edition of the Charts components (MUI X).", "author": "MUI Team", "main": "./src/index.js", "license": "MIT", diff --git a/packages/x-data-grid-premium/README.md b/packages/x-data-grid-premium/README.md index 34036ebef3d5a..c8527da8ec8b6 100644 --- a/packages/x-data-grid-premium/README.md +++ b/packages/x-data-grid-premium/README.md @@ -1,6 +1,6 @@ # MUI X Data Grid Premium -This package is the Premium plan edition of the data grid component. +This package is the Premium plan edition of the Data Grid components. It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components. ## Installation diff --git a/packages/x-data-grid-premium/package.json b/packages/x-data-grid-premium/package.json index 2885218e39a56..21a3a670cd7b5 100644 --- a/packages/x-data-grid-premium/package.json +++ b/packages/x-data-grid-premium/package.json @@ -1,7 +1,7 @@ { "name": "@mui/x-data-grid-premium", "version": "7.1.0", - "description": "The Premium plan edition of the data grid component (MUI X).", + "description": "The Premium plan edition of the Data Grid Components (MUI X).", "author": "MUI Team", "main": "src/index.ts", "license": "SEE LICENSE IN LICENSE", diff --git a/packages/x-data-grid-pro/README.md b/packages/x-data-grid-pro/README.md index 5f3ae959ca011..25a3704effd43 100644 --- a/packages/x-data-grid-pro/README.md +++ b/packages/x-data-grid-pro/README.md @@ -1,6 +1,6 @@ # MUI X Data Grid Pro -This package is the Pro plan edition of the data grid component. +This package is the Pro plan edition of the Data Grid component. It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components. ## Installation diff --git a/packages/x-data-grid-pro/package.json b/packages/x-data-grid-pro/package.json index 0fca8b43f4c4a..cb657f877a220 100644 --- a/packages/x-data-grid-pro/package.json +++ b/packages/x-data-grid-pro/package.json @@ -1,7 +1,7 @@ { "name": "@mui/x-data-grid-pro", "version": "7.1.0", - "description": "The Pro plan edition of the data grid component (MUI X).", + "description": "The Pro plan edition of the Data Grid components (MUI X).", "author": "MUI Team", "main": "src/index.ts", "license": "SEE LICENSE IN LICENSE", diff --git a/packages/x-data-grid/README.md b/packages/x-data-grid/README.md index ceb7180a626f3..25de6af92b191 100644 --- a/packages/x-data-grid/README.md +++ b/packages/x-data-grid/README.md @@ -1,6 +1,6 @@ # MUI X Data Grid -This package is the Community plan edition of the data grid component. +This package is the Community plan edition of the Data Grid components. It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components. ## Installation diff --git a/packages/x-data-grid/package.json b/packages/x-data-grid/package.json index 6dac6546e6662..328047af2423d 100644 --- a/packages/x-data-grid/package.json +++ b/packages/x-data-grid/package.json @@ -1,7 +1,7 @@ { "name": "@mui/x-data-grid", "version": "7.1.0", - "description": "The community edition of the data grid component (MUI X).", + "description": "The Community plan edition of the Data Grid components (MUI X).", "author": "MUI Team", "main": "src/index.ts", "license": "MIT", diff --git a/packages/x-date-pickers-pro/README.md b/packages/x-date-pickers-pro/README.md index cfd0faf15fa0c..8a5f497bc1aaa 100644 --- a/packages/x-date-pickers-pro/README.md +++ b/packages/x-date-pickers-pro/README.md @@ -1,6 +1,6 @@ # MUI X Date Pickers Pro -This package is the commercial edition of the date and time picker components. +This package is the Pro plan edition of the Date and Time Picker Components. It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components. ## Installation diff --git a/packages/x-date-pickers-pro/package.json b/packages/x-date-pickers-pro/package.json index e3a1e0c951960..d19dd4687345b 100644 --- a/packages/x-date-pickers-pro/package.json +++ b/packages/x-date-pickers-pro/package.json @@ -1,7 +1,7 @@ { "name": "@mui/x-date-pickers-pro", "version": "7.1.0", - "description": "The commercial edition of the date picker components (MUI X).", + "description": "The Pro plan edition of the Date and Time Picker components (MUI X).", "author": "MUI Team", "main": "src/index.ts", "license": "SEE LICENSE IN LICENSE", diff --git a/packages/x-date-pickers/README.md b/packages/x-date-pickers/README.md index 1bbd97b617314..aa2376eac454f 100644 --- a/packages/x-date-pickers/README.md +++ b/packages/x-date-pickers/README.md @@ -1,6 +1,6 @@ # MUI X Date Pickers -This package is the community edition of the date and time picker components. +This package is the Community plan edition of the Date and Time Picker components. It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components. ## Installation diff --git a/packages/x-date-pickers/package.json b/packages/x-date-pickers/package.json index 4e7f731b83199..4a02d63182b37 100644 --- a/packages/x-date-pickers/package.json +++ b/packages/x-date-pickers/package.json @@ -1,7 +1,7 @@ { "name": "@mui/x-date-pickers", "version": "7.1.0", - "description": "The community edition of the date picker components (MUI X).", + "description": "The community edition of the Date and Time Picker components (MUI X).", "author": "MUI Team", "main": "src/index.ts", "license": "MIT", diff --git a/packages/x-tree-view-pro/LICENSE b/packages/x-tree-view-pro/LICENSE new file mode 100644 index 0000000000000..bda47bde65477 --- /dev/null +++ b/packages/x-tree-view-pro/LICENSE @@ -0,0 +1,11 @@ +Commercial License + +Copyright (c) 2020 Material-UI SAS + +MUI X Pro (https://mui.com/pricing/) is commercial software. You MUST agree to the +End User License Agreement (EULA: https://mui.com/r/x-license-eula) to be able to +use the software. + +This means that you either need to purchase a commercial license at +https://mui.com/r/x-get-license?scope=pro or be eligible for the Evaluation (trial) +licenses detailed at https://mui.com/r/x-license-trial. diff --git a/packages/x-tree-view-pro/README.md b/packages/x-tree-view-pro/README.md new file mode 100644 index 0000000000000..7f48bdf17d354 --- /dev/null +++ b/packages/x-tree-view-pro/README.md @@ -0,0 +1,26 @@ +# MUI X Tree View + +This package is the Pro plan edition of the Tree View components. +It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components. + +## Installation + +Install the package in your project directory with: + +```bash +npm install @mui/x-tree-view-pro +``` + +This component has the following peer dependencies that you will need to install as well. + +```json +"peerDependencies": { + "@mui/material": "^5.15.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" +}, +``` + +## Documentation + +Visit [https://mui.com/x/react-tree-view/](https://mui.com/x/react-tree-view/) to view the full documentation. diff --git a/packages/x-tree-view-pro/package.json b/packages/x-tree-view-pro/package.json new file mode 100644 index 0000000000000..1f463cbdd5312 --- /dev/null +++ b/packages/x-tree-view-pro/package.json @@ -0,0 +1,70 @@ +{ + "name": "@mui/x-tree-view-pro", + "version": "7.0.1", + "private": true, + "description": "The Pro plan edition of the Tree View components (MUI X).", + "author": "MUI Team", + "main": "src/index.ts", + "license": "SEE LICENSE IN LICENSE", + "bugs": { + "url": "https://github.com/mui/mui-x/issues" + }, + "homepage": "https://mui.com/x/react-tree-view/", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "keywords": [ + "react", + "react-component", + "mui", + "mui-x", + "material-ui", + "material design", + "treeview" + ], + "scripts": { + "typescript": "tsc -p tsconfig.json", + "build": "yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ", + "build:modern": "node ../../scripts/build.mjs modern", + "build:node": "node ../../scripts/build.mjs node", + "build:stable": "node ../../scripts/build.mjs stable", + "build:copy-files": "node ../../scripts/copyFiles.mjs", + "build:types": "node ../../scripts/buildTypes.mjs", + "prebuild": "rimraf build tsconfig.build.tsbuildinfo" + }, + "repository": { + "type": "git", + "url": "https://github.com/mui/mui-x.git", + "directory": "packages/x-tree-view-pro" + }, + "dependencies": { + "@babel/runtime": "^7.24.0", + "@mui/base": "^5.0.0-beta.40", + "@mui/system": "^5.15.14", + "@mui/utils": "^5.15.14", + "@mui/x-license": "7.0.0", + "@mui/x-tree-view-pro": "7.0.1", + "@types/react-transition-group": "^4.4.10", + "clsx": "^2.1.0", + "prop-types": "^15.8.1", + "react-transition-group": "^4.4.5" + }, + "peerDependencies": { + "@emotion/react": "^11.9.0", + "@emotion/styled": "^11.8.1", + "@mui/material": "^5.15.14", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "setupFiles": [ + "/src/setupTests.js" + ], + "engines": { + "node": ">=14.0.0" + } +} diff --git a/packages/x-tree-view-pro/src/index.ts b/packages/x-tree-view-pro/src/index.ts new file mode 100644 index 0000000000000..a6b680db412a3 --- /dev/null +++ b/packages/x-tree-view-pro/src/index.ts @@ -0,0 +1 @@ +export * from '@mui/x-tree-view'; diff --git a/packages/x-tree-view-pro/tsconfig.build.json b/packages/x-tree-view-pro/tsconfig.build.json new file mode 100644 index 0000000000000..58dc0f54afd0a --- /dev/null +++ b/packages/x-tree-view-pro/tsconfig.build.json @@ -0,0 +1,19 @@ +{ + // This config is for emitting declarations (.d.ts) only + // Actual .ts source files are transpiled via babel + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "noEmit": false, + "emitDeclarationOnly": true, + "outDir": "build", + "rootDir": "./src" + }, + "references": [ + { "path": "../x-tree-view/tsconfig.build.json" }, + { "path": "../x-license/tsconfig.build.json" } + ], + "include": ["src/**/*.ts*", "../../node_modules/@mui/material/themeCssVarsAugmentation"], + "exclude": ["src/**/*.spec.ts*", "src/**/*.test.ts*", "src/tests/**/*"] +} diff --git a/packages/x-tree-view-pro/tsconfig.json b/packages/x-tree-view-pro/tsconfig.json new file mode 100644 index 0000000000000..b615deabf7972 --- /dev/null +++ b/packages/x-tree-view-pro/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "types": ["react", "mocha", "node"], + "noImplicitAny": false + }, + "include": [ + "src/**/*", + "../../test/utils/addChaiAssertions.ts", + "../../node_modules/@mui/monorepo/packages/test-utils/src/initMatchers.ts", + "../../node_modules/@mui/material/themeCssVarsAugmentation" + ] +} diff --git a/packages/x-tree-view/README.md b/packages/x-tree-view/README.md index 370fb4971362d..567adb406dfb2 100644 --- a/packages/x-tree-view/README.md +++ b/packages/x-tree-view/README.md @@ -1,6 +1,6 @@ # MUI X Tree View -This package is the community edition of the tree view components. +This package is the Community plan edition of the Tree View components. It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components. ## Installation diff --git a/packages/x-tree-view/package.json b/packages/x-tree-view/package.json index 3e742b593dba9..00f469bfc5f3f 100644 --- a/packages/x-tree-view/package.json +++ b/packages/x-tree-view/package.json @@ -1,7 +1,7 @@ { "name": "@mui/x-tree-view", "version": "7.1.0", - "description": "The community edition of the tree view components (MUI X).", + "description": "The community edition of the Tree View components (MUI X).", "author": "MUI Team", "main": "src/index.ts", "license": "MIT", diff --git a/scripts/buildApiDocs/treeViewSettings/getComponentInfo.ts b/scripts/buildApiDocs/treeViewSettings/getComponentInfo.ts index a26a5287af449..395c5ed628228 100644 --- a/scripts/buildApiDocs/treeViewSettings/getComponentInfo.ts +++ b/scripts/buildApiDocs/treeViewSettings/getComponentInfo.ts @@ -75,7 +75,7 @@ export function getComponentImports(name: string, filename: string) { const reExportPackage = [rootImportPath]; - // TODO: uncomment when releasing the pro package + // TODO x-tree-view-pro uncomment when making the package public // if (rootImportPath === '@mui/x-tree-view') { // reExportPackage.push('@mui/x-tree-view-pro'); // } diff --git a/tsconfig.json b/tsconfig.json index 941074723d1c6..60fb7c569b555 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,6 +24,8 @@ "@mui/x-charts/*": ["./packages/x-charts/src/*"], "@mui/x-tree-view": ["./packages/x-tree-view/src"], "@mui/x-tree-view/*": ["./packages/x-tree-view/src/*"], + "@mui/x-tree-view-pro": ["./packages/x-tree-view-pro/src"], + "@mui/x-tree-view-pro/*": ["./packages/x-tree-view-pro/src/*"], "@mui/x-license": ["./packages/x-license/src"], "@mui/x-license/*": ["./packages/x-license/src/*"], "@mui-internal/test-utils": ["./node_modules/@mui/monorepo/packages/test-utils/src"], diff --git a/webpackBaseConfig.js b/webpackBaseConfig.js index 6549bda5c809e..d881a90743e72 100644 --- a/webpackBaseConfig.js +++ b/webpackBaseConfig.js @@ -16,6 +16,7 @@ module.exports = { '@mui/x-date-pickers-pro': path.resolve(__dirname, './packages/x-date-pickers-pro/src'), '@mui/x-charts': path.resolve(__dirname, './packages/x-charts/src'), '@mui/x-tree-view': path.resolve(__dirname, './packages/x-tree-view/src'), + '@mui/x-tree-view-pro': path.resolve(__dirname, './packages/x-tree-view-pro/src'), '@mui/x-license': path.resolve(__dirname, './packages/x-license/src'), '@mui/material-nextjs': path.resolve( __dirname,