From ebfb418e6c3f6ee3fa8c64e77af8dcfdd870d695 Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Thu, 14 Mar 2024 17:35:09 +0000 Subject: [PATCH] feat: update material ui imports Signed-off-by: Timothy Deakin --- plugins/catalog-graph/dev/index.tsx | 2 +- .../CatalogGraphCard/CatalogGraphCard.tsx | 2 +- .../CatalogGraphPage/CatalogGraphPage.tsx | 7 +++++-- .../components/CatalogGraphPage/CurveFilter.tsx | 2 +- .../CatalogGraphPage/DirectionFilter.tsx | 2 +- .../CatalogGraphPage/MaxDepthFilter.tsx | 16 +++++++--------- .../CatalogGraphPage/SelectedKindsFilter.tsx | 16 +++++++--------- .../CatalogGraphPage/SelectedRelationsFilter.tsx | 16 +++++++--------- .../components/CatalogGraphPage/SwitchFilter.tsx | 5 ++++- .../EntityRelationsGraph.tsx | 3 ++- 10 files changed, 36 insertions(+), 35 deletions(-) diff --git a/plugins/catalog-graph/dev/index.tsx b/plugins/catalog-graph/dev/index.tsx index 1ef9f676de..8d9766e894 100644 --- a/plugins/catalog-graph/dev/index.tsx +++ b/plugins/catalog-graph/dev/index.tsx @@ -43,7 +43,7 @@ import { EntityProvider, } from '@backstage/plugin-catalog-react'; import { JsonObject } from '@backstage/types'; -import { Grid } from '@material-ui/core'; +import Grid from '@material-ui/core/Grid'; import _ from 'lodash'; import React from 'react'; import { diff --git a/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.tsx b/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.tsx index 99942b9a5c..1956a4bdae 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.tsx @@ -26,7 +26,7 @@ import { useEntity, entityRouteRef, } from '@backstage/plugin-catalog-react'; -import { makeStyles, Theme } from '@material-ui/core'; +import { makeStyles, Theme } from '@material-ui/core/styles'; import qs from 'qs'; import React, { MouseEvent, useCallback } from 'react'; import { useNavigate } from 'react-router-dom'; diff --git a/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.tsx b/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.tsx index 73d79978e9..c7f9360589 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.tsx @@ -27,10 +27,13 @@ import { entityRouteRef, humanizeEntityRef, } from '@backstage/plugin-catalog-react'; -import { Grid, makeStyles, Paper, Typography } from '@material-ui/core'; +import Grid from '@material-ui/core/Grid'; +import Paper from '@material-ui/core/Paper'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import FilterListIcon from '@material-ui/icons/FilterList'; import ZoomOutMap from '@material-ui/icons/ZoomOutMap'; -import { ToggleButton } from '@material-ui/lab'; +import ToggleButton from '@material-ui/lab/ToggleButton'; import React, { MouseEvent, useCallback } from 'react'; import { useNavigate } from 'react-router-dom'; import { diff --git a/plugins/catalog-graph/src/components/CatalogGraphPage/CurveFilter.tsx b/plugins/catalog-graph/src/components/CatalogGraphPage/CurveFilter.tsx index 2f3278dc6b..f4e52bf23f 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphPage/CurveFilter.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphPage/CurveFilter.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import { Select, SelectedItems } from '@backstage/core-components'; -import { Box } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; import React, { useCallback } from 'react'; type Curve = 'curveStepBefore' | 'curveMonotoneX'; diff --git a/plugins/catalog-graph/src/components/CatalogGraphPage/DirectionFilter.tsx b/plugins/catalog-graph/src/components/CatalogGraphPage/DirectionFilter.tsx index c614ed2b58..5fe308a90b 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphPage/DirectionFilter.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphPage/DirectionFilter.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import { Select, SelectedItems } from '@backstage/core-components'; -import { Box } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; import React, { useCallback } from 'react'; import { Direction } from '../EntityRelationsGraph'; diff --git a/plugins/catalog-graph/src/components/CatalogGraphPage/MaxDepthFilter.tsx b/plugins/catalog-graph/src/components/CatalogGraphPage/MaxDepthFilter.tsx index e6fb2fbab4..51ee4643b5 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphPage/MaxDepthFilter.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphPage/MaxDepthFilter.tsx @@ -13,15 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { - Box, - FormControl, - IconButton, - InputAdornment, - makeStyles, - OutlinedInput, - Typography, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import FormControl from '@material-ui/core/FormControl'; +import IconButton from '@material-ui/core/IconButton'; +import InputAdornment from '@material-ui/core/InputAdornment'; +import OutlinedInput from '@material-ui/core/OutlinedInput'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import ClearIcon from '@material-ui/icons/Clear'; import React, { useCallback, useEffect, useRef, useState } from 'react'; diff --git a/plugins/catalog-graph/src/components/CatalogGraphPage/SelectedKindsFilter.tsx b/plugins/catalog-graph/src/components/CatalogGraphPage/SelectedKindsFilter.tsx index 0817a01e0b..42c456888a 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphPage/SelectedKindsFilter.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphPage/SelectedKindsFilter.tsx @@ -15,18 +15,16 @@ */ import { alertApiRef, useApi } from '@backstage/core-plugin-api'; import { catalogApiRef } from '@backstage/plugin-catalog-react'; -import { - Box, - Checkbox, - FormControlLabel, - makeStyles, - TextField, - Typography, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Checkbox from '@material-ui/core/Checkbox'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import TextField from '@material-ui/core/TextField'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import CheckBoxIcon from '@material-ui/icons/CheckBox'; import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; -import { Autocomplete } from '@material-ui/lab'; +import Autocomplete from '@material-ui/lab/Autocomplete'; import React, { useCallback, useEffect, useMemo } from 'react'; import useAsync from 'react-use/lib/useAsync'; diff --git a/plugins/catalog-graph/src/components/CatalogGraphPage/SelectedRelationsFilter.tsx b/plugins/catalog-graph/src/components/CatalogGraphPage/SelectedRelationsFilter.tsx index 197f65cef8..74adfd0226 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphPage/SelectedRelationsFilter.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphPage/SelectedRelationsFilter.tsx @@ -13,18 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { - Box, - Checkbox, - FormControlLabel, - makeStyles, - TextField, - Typography, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Checkbox from '@material-ui/core/Checkbox'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import TextField from '@material-ui/core/TextField'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import CheckBoxIcon from '@material-ui/icons/CheckBox'; import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; -import { Autocomplete } from '@material-ui/lab'; +import Autocomplete from '@material-ui/lab/Autocomplete'; import React, { useCallback, useMemo } from 'react'; import { RelationPairs } from '../EntityRelationsGraph'; diff --git a/plugins/catalog-graph/src/components/CatalogGraphPage/SwitchFilter.tsx b/plugins/catalog-graph/src/components/CatalogGraphPage/SwitchFilter.tsx index 495f6b4db2..4427d87a59 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphPage/SwitchFilter.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphPage/SwitchFilter.tsx @@ -13,7 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Box, FormControlLabel, makeStyles, Switch } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import Switch from '@material-ui/core/Switch'; +import { makeStyles } from '@material-ui/core/styles'; import React, { useCallback } from 'react'; export type Props = { diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.tsx b/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.tsx index 35f76a7de0..61e24ecac4 100644 --- a/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.tsx +++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.tsx @@ -23,7 +23,8 @@ import { DependencyGraphTypes, } from '@backstage/core-components'; import { errorApiRef, useApi } from '@backstage/core-plugin-api'; -import { CircularProgress, makeStyles, useTheme } from '@material-ui/core'; +import CircularProgress from '@material-ui/core/CircularProgress'; +import { makeStyles, useTheme } from '@material-ui/core/styles'; import classNames from 'classnames'; import React, { MouseEvent, useEffect, useMemo } from 'react'; import { DefaultRenderLabel } from './DefaultRenderLabel';