From 4c09093cf95e2d24b6e2926cd01d739af83304a8 Mon Sep 17 00:00:00 2001 From: ct-vrushti Date: Sat, 19 Jul 2025 13:50:22 +0530 Subject: [PATCH 1/3] free version update --- .env | 5 +- .prettierrc | 3 +- eslint.config.mjs | 48 +- index.html | 29 +- package.json | 34 +- src/components/MainCard.jsx | 4 +- src/components/logo/LogoIcon.jsx | 4 +- src/components/logo/LogoMain.jsx | 8 +- src/components/third-party/SimpleBar.jsx | 4 +- .../DrawerContent/Navigation/NavGroup.jsx | 2 + .../Dashboard/Drawer/MiniDrawerStyled.js | 10 +- .../HeaderContent/Profile/ProfileTab.jsx | 1 - .../HeaderContent/Profile/SettingTab.jsx | 24 +- src/layout/Dashboard/index.jsx | 2 +- src/pages/auth/Login.jsx | 2 +- src/routes/LoginRoutes.jsx | 2 - src/sections/auth/AuthRegister.jsx | 5 +- src/themes/overrides/TableCell.js | 3 + src/themes/palette.js | 2 +- stats.html | 4949 +++++++++++++++++ vite.config.mjs | 72 +- yarn.lock | 1488 +++-- 22 files changed, 5797 insertions(+), 904 deletions(-) create mode 100644 stats.html diff --git a/.env b/.env index 30c0f66e9..b3ec09bde 100644 --- a/.env +++ b/.env @@ -1,7 +1,6 @@ -VITE_APP_VERSION = v1.5.0 +VITE_APP_VERSION = v3.5.1 GENERATE_SOURCEMAP = false ## Public URL PUBLIC_URL = https://mantisdashboard.io -VITE_APP_BASE_NAME = /free - +VITE_APP_BASE_NAME = /free \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index d5fba07c1..b5cde330e 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,5 +4,6 @@ "singleQuote": true, "trailingComma": "none", "tabWidth": 2, - "useTabs": false + "useTabs": false, + "endOfLine": "lf" } diff --git a/eslint.config.mjs b/eslint.config.mjs index 51aacd5e6..5730906ca 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -32,42 +32,58 @@ export default [ sourceType: 'module', parserOptions: { ecmaFeatures: { - jsx: true // ✅ Enable JSX parsing + jsx: true } } }, settings: { react: { - version: 'detect' // ✅ Detect the installed React version + version: 'detect' } }, rules: { - 'react/jsx-filename-extension': ['error', { extensions: ['.js', '.jsx'] }], - 'react/react-in-jsx-scope': 'off', + 'react/jsx-filename-extension': 'off', + 'no-param-reassign': 'off', 'react/prop-types': 'off', + 'react/require-default-props': 'off', + 'react/no-array-index-key': 'off', + 'react/react-in-jsx-scope': 'off', 'react/jsx-props-no-spreading': 'off', - 'react-hooks/rules-of-hooks': 'error', - 'react-hooks/exhaustive-deps': 'warn', + 'import/order': 'off', + 'no-console': 'off', + 'no-shadow': 'off', + 'import/no-cycle': 'off', + 'import/no-extraneous-dependencies': 'off', 'jsx-a11y/label-has-associated-control': 'off', 'jsx-a11y/no-autofocus': 'off', + 'react/jsx-uses-react': 'off', + 'react/jsx-uses-vars': 'error', + 'react-hooks/rules-of-hooks': 'error', + 'react-hooks/exhaustive-deps': 'warn', + 'no-unused-vars': 'off', - 'prettier/prettier': [ - 'warn', + 'no-restricted-imports': [ + 'error', { - bracketSpacing: true, - printWidth: 140, - singleQuote: true, - trailingComma: 'none', - tabWidth: 2, - useTabs: false + patterns: ['@mui/*/*/*', '!@mui/material/test-utils/*'] } - ] + ], + + 'no-unused-vars': [ + 'error', + { + vars: 'all', + args: 'none' + } + ], + + 'prettier/prettier': 'warn' } }, { ignores: ['node_modules/**'], files: ['src/**/*.{js,jsx}'] } -]; +]; \ No newline at end of file diff --git a/index.html b/index.html index fc631ec92..abd64fb66 100644 --- a/index.html +++ b/index.html @@ -1,18 +1,35 @@ - + Mantis React Admin Dashboard + + + - - + + + + + - Mantis React Free Admin Dashboard + + + + + + + + - - diff --git a/package.json b/package.json index 4185fc123..4fa79d933 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mantis-material-free-react", - "version": "1.5.0", + "version": "3.5.1", "homepage": "https://mantisdashboard.io/free", "author": { "name": "CodedThemes", @@ -22,11 +22,11 @@ "@ant-design/icons": "6.0.0", "@emotion/cache": "11.14.0", "@emotion/react": "11.14.0", - "@emotion/styled": "11.14.0", - "@fontsource/inter": "5.2.5", - "@fontsource/poppins": "5.2.5", - "@fontsource/public-sans": "5.2.5", - "@fontsource/roboto": "5.2.5", + "@emotion/styled": "11.14.1", + "@fontsource/inter": "5.2.6", + "@fontsource/poppins": "5.2.6", + "@fontsource/public-sans": "5.2.6", + "@fontsource/roboto": "5.2.6", "@mui/base": "5.0.0-beta.70", "@mui/lab": "7.0.0-beta.10", "@mui/material": "7.0.2", @@ -40,11 +40,11 @@ "react-device-detect": "2.2.3", "react-dom": "19.1.0", "react-number-format": "5.4.4", - "react-router": "7.5.1", - "react-router-dom": "7.5.1", - "simplebar-react": "3.3.0", - "swr": "2.3.3", - "vite": "6.3.1", + "react-router": "7.6.3", + "react-router-dom": "7.6.3", + "simplebar-react": "3.3.2", + "swr": "2.3.4", + "vite": "7.0.4", "vite-jsconfig-paths": "2.0.1", "web-vitals": "4.2.4", "yup": "1.6.1" @@ -68,19 +68,19 @@ ] }, "devDependencies": { - "@eslint/compat": "1.2.8", + "@eslint/compat": "1.3.1", "@eslint/eslintrc": "3.3.1", - "@eslint/js": "9.25.1", + "@eslint/js": "9.31.0", "eslint": "9.25.1", "eslint-config-prettier": "10.1.2", "eslint-plugin-jsx-a11y": "6.10.2", "eslint-plugin-prettier": "5.2.6", - "eslint-plugin-react": "7.37.4", + "eslint-plugin-react": "7.37.5", "eslint-plugin-react-hooks": "5.2.0", "immutable": "4.3.7", - "knip": "5.45.0", - "prettier": "3.5.3", - "prettier-eslint-cli": "8.0.1" + "prettier": "3.6.2", + "prettier-eslint-cli": "8.0.1", + "rollup-plugin-visualizer": "6.0.3" }, "packageManager": "yarn@4.9.1" } diff --git a/src/components/MainCard.jsx b/src/components/MainCard.jsx index 702f8998c..0c9abe33a 100644 --- a/src/components/MainCard.jsx +++ b/src/components/MainCard.jsx @@ -77,7 +77,7 @@ MainCard.propTypes = { border: PropTypes.bool, boxShadow: PropTypes.bool, children: PropTypes.node, - subheader: PropTypes.oneOfType([PropTypes.node, PropTypes.string]), + subheader: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), content: PropTypes.bool, contentSX: PropTypes.object, darkTitle: PropTypes.bool, @@ -86,7 +86,7 @@ MainCard.propTypes = { secondary: PropTypes.any, shadow: PropTypes.string, sx: PropTypes.object, - title: PropTypes.oneOfType([PropTypes.node, PropTypes.string]), + title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), modal: PropTypes.bool, ref: PropTypes.object, others: PropTypes.any diff --git a/src/components/logo/LogoIcon.jsx b/src/components/logo/LogoIcon.jsx index 023431048..2ce43b823 100644 --- a/src/components/logo/LogoIcon.jsx +++ b/src/components/logo/LogoIcon.jsx @@ -4,9 +4,7 @@ import { useTheme } from '@mui/material/styles'; /** * if you want to use image instead of uncomment following. * - * import logoIconDark from 'assets/images/logo-icon-dark.svg'; * import logoIcon from 'assets/images/logo-icon.svg'; - * import { ThemeMode } from 'config'; * */ @@ -19,7 +17,7 @@ export default function LogoIcon() { /** * if you want to use image instead of svg uncomment following, and comment out element. * - * Mantis + * Mantis * */ diff --git a/src/components/logo/LogoMain.jsx b/src/components/logo/LogoMain.jsx index 7eb13047e..4f6c39057 100644 --- a/src/components/logo/LogoMain.jsx +++ b/src/components/logo/LogoMain.jsx @@ -1,23 +1,23 @@ +import PropTypes from 'prop-types'; // material-ui import { useTheme } from '@mui/material/styles'; /** * if you want to use image instead of uncomment following. * - * import logoDark from 'assets/images/logo-dark.svg'; * import logo from 'assets/images/logo.svg'; * */ // ==============================|| LOGO SVG ||============================== // -export default function LogoMain() { +export default function LogoMain({ reverse }) { const theme = useTheme(); return ( /** * if you want to use image instead of svg uncomment following, and comment out element. * - * Mantis + * Mantis * */ <> @@ -57,3 +57,5 @@ export default function LogoMain() { ); } + +LogoMain.propTypes = { reverse: PropTypes.bool }; diff --git a/src/components/third-party/SimpleBar.jsx b/src/components/third-party/SimpleBar.jsx index 5eee24678..d1ddc99ff 100644 --- a/src/components/third-party/SimpleBar.jsx +++ b/src/components/third-party/SimpleBar.jsx @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; // material-ui -import { alpha, styled, useTheme } from '@mui/material/styles'; +import { alpha, styled } from '@mui/material/styles'; import Box from '@mui/material/Box'; // third-party @@ -43,8 +43,6 @@ const SimpleBarStyle = styled(SimpleBar)(({ theme }) => ({ // ==============================|| SIMPLE SCROLL BAR ||============================== // export default function SimpleBarScroll({ children, sx, ...other }) { - const theme = useTheme(); - return ( <> diff --git a/src/layout/Dashboard/Drawer/DrawerContent/Navigation/NavGroup.jsx b/src/layout/Dashboard/Drawer/DrawerContent/Navigation/NavGroup.jsx index fff7bf051..97476698b 100644 --- a/src/layout/Dashboard/Drawer/DrawerContent/Navigation/NavGroup.jsx +++ b/src/layout/Dashboard/Drawer/DrawerContent/Navigation/NavGroup.jsx @@ -8,6 +8,8 @@ import Box from '@mui/material/Box'; import NavItem from './NavItem'; import { useGetMenuMaster } from 'api/menu'; +// ==============================|| NAVIGATION - LIST GROUP ||============================== // + export default function NavGroup({ item }) { const { menuMaster } = useGetMenuMaster(); const drawerOpen = menuMaster.isDashboardDrawerOpened; diff --git a/src/layout/Dashboard/Drawer/MiniDrawerStyled.js b/src/layout/Dashboard/Drawer/MiniDrawerStyled.js index ee9e6a40c..bd26891be 100644 --- a/src/layout/Dashboard/Drawer/MiniDrawerStyled.js +++ b/src/layout/Dashboard/Drawer/MiniDrawerStyled.js @@ -42,17 +42,11 @@ const MiniDrawerStyled = styled(Drawer, { shouldForwardProp: (prop) => prop !== variants: [ { props: ({ open }) => open, - style: { - ...openedMixin(theme), - '& .MuiDrawer-paper': openedMixin(theme) - } + style: { ...openedMixin(theme), '& .MuiDrawer-paper': openedMixin(theme) } }, { props: ({ open }) => !open, - style: { - ...closedMixin(theme), - '& .MuiDrawer-paper': closedMixin(theme) - } + style: { ...closedMixin(theme), '& .MuiDrawer-paper': closedMixin(theme) } } ] })); diff --git a/src/layout/Dashboard/Header/HeaderContent/Profile/ProfileTab.jsx b/src/layout/Dashboard/Header/HeaderContent/Profile/ProfileTab.jsx index f7a46964b..65a0b4a14 100644 --- a/src/layout/Dashboard/Header/HeaderContent/Profile/ProfileTab.jsx +++ b/src/layout/Dashboard/Header/HeaderContent/Profile/ProfileTab.jsx @@ -1,5 +1,4 @@ import PropTypes from 'prop-types'; - // material-ui import List from '@mui/material/List'; import ListItemButton from '@mui/material/ListItemButton'; diff --git a/src/layout/Dashboard/Header/HeaderContent/Profile/SettingTab.jsx b/src/layout/Dashboard/Header/HeaderContent/Profile/SettingTab.jsx index b0222aee9..af06ccf8b 100644 --- a/src/layout/Dashboard/Header/HeaderContent/Profile/SettingTab.jsx +++ b/src/layout/Dashboard/Header/HeaderContent/Profile/SettingTab.jsx @@ -1,6 +1,3 @@ -import { useState } from 'react'; -import { useNavigate } from 'react-router'; - // material-ui import List from '@mui/material/List'; import Link from '@mui/material/Link'; @@ -18,48 +15,37 @@ import UnorderedListOutlined from '@ant-design/icons/UnorderedListOutlined'; // ==============================|| HEADER PROFILE - SETTING TAB ||============================== // export default function SettingTab() { - const navigate = useNavigate(); - const [selectedIndex, setSelectedIndex] = useState(0); - - const handleListItemClick = (event, index, route = '') => { - setSelectedIndex(index); - - if (route && route !== '') { - navigate(route); - } - }; - return ( - handleListItemClick(event, 0)}> + - handleListItemClick(event, 1)}> + - handleListItemClick(event, 2)}> + - handleListItemClick(event, 3)}> + - handleListItemClick(event, 4)}> + diff --git a/src/layout/Dashboard/index.jsx b/src/layout/Dashboard/index.jsx index 842dc2397..65cfcb77f 100644 --- a/src/layout/Dashboard/index.jsx +++ b/src/layout/Dashboard/index.jsx @@ -44,7 +44,7 @@ export default function DashboardLayout() { flexDirection: 'column' }} > - {pathname !== '/apps/profiles/account/my-account' && } + {pathname !== '#!' && }