Skip to content

Commit

Permalink
[PART-OF-121] update dependencies for verificationcurator serviceui (#…
Browse files Browse the repository at this point in the history
…125)

* Update package-lock.json

* Update libraries v1

* Fix for tests

* Fix tests for editing source
  • Loading branch information
stanislaw-zakrzewski committed Apr 9, 2024
1 parent 4a6b5c5 commit bef7593
Show file tree
Hide file tree
Showing 63 changed files with 16,372 additions and 9,638 deletions.
24,727 changes: 15,748 additions & 8,979 deletions verification/curator-service/ui/package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions verification/curator-service/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"@date-io/date-fns": "^2.15.0",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@material-ui/core": "^4.12.4",
"@material-table/core": "^6.3.2",
"@mui/icons-material": "^5.10.3",
"@mui/lab": "^5.0.0-alpha.97",
"@mui/material": "^5.10.3",
"@mui/styles": "^5.10.3",
"@mui/material": "^5.15.15",
"@mui/system": "^5.15.15",
"@mui/x-date-pickers": "^5.0.0",
"@reduxjs/toolkit": "^1.8.5",
"axios": "^0.26.1",
Expand All @@ -25,7 +25,6 @@
"http-proxy-middleware": "^2.0.1",
"i18n-iso-countries": "^7.3.0",
"lodash": "^4.17.21",
"material-table": "^2.0.3",
"msw": "^0.39.2",
"papaparse": "^5.3.1",
"react": "^18.2.0",
Expand All @@ -35,13 +34,14 @@
"react-google-recaptcha": "^3.0.0-alpha.1",
"react-gtm-module": "^2.0.11",
"react-helmet": "^6.1.0",
"react-highlight-words": "^0.17.0",
"react-highlight-words": "^0.20.0",
"react-password-strength-bar": "^0.4.1",
"react-redux": "^8.0.1",
"react-router-dom": "^5.3.0",
"react-scripts": "^5.0.1",
"react-scroll": "^1.8.4",
"shortid": "^2.2.8",
"tss-react": "^4.9.6",
"typeface-roboto": "^1.1.13",
"yup": "^0.32.11"
},
Expand Down Expand Up @@ -82,9 +82,9 @@
]
},
"devDependencies": {
"@testing-library/dom": "^8.17.1",
"@testing-library/dom": "^8.20.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^12.1.5",
"@testing-library/react": "^14.2.2",
"@testing-library/user-event": "^14.4.3",
"@types/css-mediaquery": "^0.1.1",
"@types/jest": "^24.9.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import React from 'react';
import TableHead from '@mui/material/TableHead';
import TableRow from '@mui/material/TableRow';
import TableCell from '@mui/material/TableCell';
import TableSortLabel from '@mui/material/TableSortLabel';
import { TableCell, TableHead, TableRow, TableSortLabel } from '@mui/material';

import { EnhancedTableProps, Data, HeadCell } from './types';

Expand Down Expand Up @@ -31,24 +28,24 @@ function EnhancedTableHead(props: EnhancedTableProps): JSX.Element {

return (
<TableHead>
<TableRow className={classes.headerRow}>
<TableRow className={classes?.headerRow}>
{headCells.map((headCell) => (
<TableCell
key={headCell.id}
align={headCell.numeric ? 'right' : 'left'}
padding={headCell.disablePadding ? 'none' : 'normal'}
sortDirection={orderBy === headCell.id ? order : false}
className={classes.headerCell}
className={classes?.headerCell}
>
<TableSortLabel
active={orderBy === headCell.id}
direction={orderBy === headCell.id ? order : 'asc'}
onClick={createSortHandler(headCell.id)}
className={classes.activeCellLabel}
className={classes?.activeCellLabel}
>
{headCell.label}
{orderBy === headCell.id ? (
<span className={classes.visuallyHidden}>
<span className={classes?.visuallyHidden}>
{order === 'desc'
? 'sorted descending'
: 'sorted ascending'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ import React, { useEffect } from 'react';
import { useAppDispatch, useAppSelector } from '../../hooks/redux';
import Helmet from 'react-helmet';

import Table from '@mui/material/Table';
import TableBody from '@mui/material/TableBody';
import TableCell from '@mui/material/TableCell';
import TableContainer from '@mui/material/TableContainer';
import TablePagination from '@mui/material/TablePagination';
import TableRow from '@mui/material/TableRow';
import Typography from '@mui/material/Typography';
import Paper from '@mui/material/Paper';
import Divider from '@mui/material/Divider';
import CircularProgress from '@mui/material/CircularProgress';
import {
CircularProgress,
Divider,
Paper,
Table,
TableBody,
TableCell,
TableContainer,
TablePagination,
TableRow,
Typography,
} from '@mui/material';
import { fetchAcknowledgmentData } from '../../redux/acknowledgmentData/thunk';
import { SnackbarAlert } from '../SnackbarAlert';
import EnhancedTableHead from './EnhancedTableHead';
Expand All @@ -28,7 +30,7 @@ import { Data, Order } from './types';
import { createData, getComparator, stableSort } from './helperFunctions';

export default function AcknowledgmentsPage(): JSX.Element {
const classes = useTableStyles();
const { classes } = useTableStyles();
const [order, setOrder] = React.useState<Order>('asc');
const [orderBy, setOrderBy] = React.useState<keyof Data>('providerName');
const [page, setPage] = React.useState(0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,83 +1,80 @@
import { Theme } from '@mui/material/styles';

import makeStyles from '@mui/styles/makeStyles';
import createStyles from '@mui/styles/createStyles';
import { makeStyles } from 'tss-react/mui';

export const useTableStyles = makeStyles((theme: Theme) =>
createStyles({
root: {
width: '80%',
margin: '10em auto auto auto',
},
export const useTableStyles = makeStyles()((theme: Theme) => ({
root: {
width: '80%',
margin: '10em auto auto auto',
},

tableRow: {
'&:nth-of-type(odd)': {
backgroundColor: theme.palette.action.hover,
},
tableRow: {
'&:nth-of-type(odd)': {
backgroundColor: theme.palette.action.hover,
},
headerRow: {
backgroundColor: theme.palette.primary.main,
},
headerCell: {
},
headerRow: {
backgroundColor: theme.palette.primary.main,
},
headerCell: {
color: '#fff',
fontWeight: 'bold',
},
activeCellLabel: {
'&.MuiTableSortLabel-active': {
color: '#fff',
fontWeight: 'bold',
},
activeCellLabel: {
'&.MuiTableSortLabel-active': {
'&.MuiTableSortLabel-root.MuiTableSortLabel-active.MuiTableSortLabel-root.MuiTableSortLabel-active .MuiTableSortLabel-icon':
{
color: '#fff',
},
'&.MuiTableSortLabel-root.MuiTableSortLabel-active.MuiTableSortLabel-root.MuiTableSortLabel-active .MuiTableSortLabel-icon':
{
color: '#fff',
},
'&:hover': {
color: '#fff',
opacity: 0.8,
},
},
pageTitle: { fontSize: '2em', marginBottom: '1em' },
pageSubTitle: {
fontSize: '1.4em',
marginBottom: '1.6em',
width: '70%',
},
divider: {
width: '70%',
},
belowNote: {
width: '70%',
marginTop: '0.4em',
},
paper: {
width: '100%',
marginBottom: theme.spacing(2),
position: 'relative',
},
table: {
minWidth: 750,
},
visuallyHidden: {
border: 0,
clip: 'rect(0 0 0 0)',
height: 1,
margin: -1,
overflow: 'hidden',
padding: 0,
position: 'absolute',
top: 20,
width: 1,
},
loaderConrainer: {
width: '100%',
height: '100%',
position: 'absolute',
top: 0,
left: 0,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'rgba(255, 255, 255, 0.6)',
zIndex: 1000,
'&:hover': {
color: '#fff',
opacity: 0.8,
},
}),
);
},
pageTitle: { fontSize: '2em', marginBottom: '1em' },
pageSubTitle: {
fontSize: '1.4em',
marginBottom: '1.6em',
width: '70%',
},
divider: {
width: '70%',
},
belowNote: {
width: '70%',
marginTop: '0.4em',
},
paper: {
width: '100%',
marginBottom: theme.spacing(2),
position: 'relative',
},
table: {
minWidth: 750,
},
visuallyHidden: {
border: 0,
clip: 'rect(0 0 0 0)',
height: 1,
margin: -1,
overflow: 'hidden',
padding: 0,
position: 'absolute',
top: 20,
width: 1,
},
loaderConrainer: {
width: '100%',
height: '100%',
position: 'absolute',
top: 0,
left: 0,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'rgba(255, 255, 255, 0.6)',
zIndex: 1000,
},
}));
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ export interface HeadCell {
export type Order = 'asc' | 'desc';

export interface EnhancedTableProps {
classes: ReturnType<typeof useTableStyles>;
classes?: Partial<
Record<
'headerRow' | 'headerCell' | 'activeCellLabel' | 'visuallyHidden',
string
>
>;
numSelected: number;
onRequestSort: (
event: React.MouseEvent<unknown>,
Expand Down
16 changes: 6 additions & 10 deletions verification/curator-service/ui/src/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
} from 'react-router-dom';
import { Theme } from '@mui/material/styles';

import makeStyles from '@mui/styles/makeStyles';
import { makeStyles } from 'tss-react/mui';

import AutomatedBackfill from '../AutomatedBackfill';
import AutomatedSourceForm from '../AutomatedSourceForm';
Expand Down Expand Up @@ -65,7 +65,7 @@ import { theme } from '../../theme/theme';
import { setSearchQuery } from '../../redux/linelistTable/slice';
import { selectSearchQuery } from '../../redux/linelistTable/selectors';

const menuStyles = makeStyles((theme) => ({
const menuStyles = makeStyles()((theme) => ({
link: {
color: theme.custom.palette.link.color,
fontWeight: 300,
Expand All @@ -76,7 +76,7 @@ const menuStyles = makeStyles((theme) => ({
},
}));

const useStyles = makeStyles((theme: Theme) => ({
const useStyles = makeStyles()((theme: Theme) => ({
root: {
display: 'flex',
flexDirection: 'column',
Expand Down Expand Up @@ -112,10 +112,6 @@ const useStyles = makeStyles((theme: Theme) => ({
marginTop: '12px',
width: '100%',
},
drawerHeader: {
// necessary for content to be below app bar
...theme.mixins.toolbar,
},
link: {
marginTop: 12,
},
Expand Down Expand Up @@ -161,7 +157,7 @@ function ProfileMenu(props: { user: User; version: string }): JSX.Element {
setAnchorEl(null);
};

const classes = menuStyles();
const { classes } = menuStyles();

const releaseNotesUrl = getReleaseNotesUrl(props.version);

Expand Down Expand Up @@ -300,7 +296,7 @@ export default function App(): JSX.Element {
const rootRef = React.useRef<HTMLDivElement>(null);
const history = useHistory();
const location = useLocation<LocationState>();
const classes = useStyles();
const { classes } = useStyles();

const savedSearchQuery = localStorage.getItem('searchQuery');

Expand Down Expand Up @@ -441,7 +437,7 @@ export default function App(): JSX.Element {
[classes.contentShift]: drawerOpen,
})}
>
<div className={classes.drawerHeader} />
<div />
<Switch>
<Redirect
from="/:url*(/+)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useAppSelector } from '../hooks/redux';
import { selectUser } from '../redux/auth/selectors';

import { Button, Paper, Typography, Theme } from '@mui/material';
import makeStyles from '@mui/styles/makeStyles';
import { makeStyles } from 'tss-react/mui';
import { FastField, Form, Formik } from 'formik';

import AppModal from './AppModal';
Expand All @@ -24,7 +24,7 @@ enum Format {
Xlsx = 'XLSX',
}

const useStyles = makeStyles((theme: Theme) => ({
const useStyles = makeStyles()((theme: Theme) => ({
headerBlurb: {
maxWidth: '70%',
paddingBottom: '3em',
Expand Down Expand Up @@ -102,7 +102,7 @@ const AutomatedSourceFormSchema = Yup.object().shape({
});

export default function AutomatedSourceForm(props: Props): JSX.Element {
const classes = useStyles();
const { classes } = useStyles();
const history = useHistory();
const [errorMessage, setErrorMessage] = React.useState('');

Expand Down
Loading

0 comments on commit bef7593

Please sign in to comment.