Skip to content

Commit 5f72fad

Browse files
committed
Merge remote-tracking branch 'origin/v2-development' into v2-development
2 parents d3584d7 + ad52da5 commit 5f72fad

File tree

31 files changed

+3110
-2977
lines changed

31 files changed

+3110
-2977
lines changed

Servers/UI/OJS.Servers.Ui/ClientApp/package.json

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
"homepage": "https://localhost:5002",
66
"type": "module",
77
"dependencies": {
8-
"@emotion/react": "^11.11.1",
9-
"@emotion/styled": "^11.11.0",
10-
"@material-ui/core": "^4.12.3",
8+
"@emotion/react": "^11.14.0",
9+
"@emotion/styled": "^11.14.0",
1110
"@monaco-editor/react": "4.6.0",
12-
"@mui/base": "^5.0.0-beta.58",
13-
"@mui/icons-material": "^5.15.0",
14-
"@mui/material": "^5.15.21",
15-
"@mui/system": "^5.2.4",
16-
"@mui/x-data-grid": "^6.19.4",
17-
"@mui/x-date-pickers": "^6.19.4",
18-
"@mui/x-tree-view": "^7.8.0",
11+
"@mui/base": "^5.0.0-beta.70",
12+
"@mui/icons-material": "^7.1.1",
13+
"@mui/material": "^7.1.1",
14+
"@mui/system": "^7.1.1",
15+
"@mui/x-data-grid": "^8.5.1",
16+
"@mui/x-date-pickers": "^8.5.1",
17+
"@mui/x-tree-view": "^8.5.1",
1918
"@reduxjs/toolkit": "^1.9.7",
2019
"@types/prismjs": "^1.16.6",
2120
"@vitejs/plugin-react": "^2.0.1",
@@ -26,32 +25,33 @@
2625
"monaco-editor": "^0.34.1",
2726
"prismjs": "^1.25.0",
2827
"quill": "^2.0.2",
29-
"react": "^18.3.1",
28+
"react": "^19.0.0",
3029
"react-alice-carousel": "^2.5.1",
3130
"react-arborist": "^3.4.0",
3231
"react-diff-viewer": "^3.1.1",
33-
"react-dom": "^18.3.1",
32+
"react-dom": "^19.0.0",
3433
"react-helmet-async": "^2.0.5",
3534
"react-icons": "^4.3.1",
3635
"react-json-view": "^1.21.3",
3736
"react-lite-youtube-embed": "^2.4.0",
38-
"react-markdown": "^8.0.7",
37+
"react-markdown": "^10.1.0",
3938
"react-redux": "^8.1.3",
4039
"react-router": "^6.24.0",
4140
"react-router-dom": "^6.24.0",
4241
"redux-persist": "^6.0.0",
4342
"redux-persist-indexeddb-storage": "^1.0.4",
44-
"sass": "^1.69.5",
43+
"sass": "^1.89.2",
4544
"use-resize-observer": "^9.1.0",
4645
"uuid": "^9.0.0",
46+
"vfile": "5.3.7",
4747
"vite": "^3.0.7",
4848
"yarn": "^1.22.17"
4949
},
5050
"devDependencies": {
5151
"@types/lodash": "^4.14.175",
5252
"@types/node": "18.11.2",
53-
"@types/react": "^18.3.1",
54-
"@types/react-dom": "^18.3.1",
53+
"@types/react": "^19.1.7",
54+
"@types/react-dom": "^19.0.0",
5555
"@types/uuid": "^8.3.1",
5656
"@typescript-eslint/eslint-plugin": "^7.0.2",
5757
"@typescript-eslint/parser": "^7.0.2",
@@ -98,5 +98,8 @@
9898
"not dead",
9999
"not ie <= 11",
100100
"not op_mini all"
101-
]
101+
],
102+
"resolutions": {
103+
"vfile": "5.3.7"
104+
}
102105
}

Servers/UI/OJS.Servers.Ui/ClientApp/src/components/administration/common/user-actions/UserActions.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { ChangeEvent, FC, useState } from 'react';
1+
import React, { ChangeEvent, FC, RefObject, useState } from 'react';
22
import { CiSquareMore } from 'react-icons/ci';
33
import HomeIcon from '@mui/icons-material/Home';
44
import LogoutIcon from '@mui/icons-material/Logout';
@@ -16,7 +16,7 @@ interface IUserActionsProps {
1616
themeMode: ThemeMode;
1717
showMenu: boolean;
1818
setShowMenu: (show: boolean) => void;
19-
iconButtonRef: React.RefObject<HTMLButtonElement>;
19+
iconButtonRef: RefObject<HTMLButtonElement | null>;
2020
}
2121

2222
const MaterialUISwitch = styled(Switch)(({ theme }) => ({

Servers/UI/OJS.Servers.Ui/ClientApp/src/components/administration/exam-groups/users-in-exam-group-view/UsersInExamGroupView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const UsersInExamGroupView = (props: IUsersInExamGroupViewProps) => {
5050
filterable: false,
5151
sortable: false,
5252
flex: 1,
53-
valueFormatter: (params) => params.value.toString(),
53+
valueFormatter: (_, row) => row.value?.toString(),
5454
},
5555
{
5656
field: 'userName',

Servers/UI/OJS.Servers.Ui/ClientApp/src/components/contests/contest-categories/ContestCategories.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import { SyntheticEvent, useEffect, useMemo, useState } from 'react';
77
import { useParams } from 'react-router-dom';
88
import Box from '@mui/material/Box';
9+
import { TreeItem } from '@mui/x-tree-view';
910
import { SimpleTreeView } from '@mui/x-tree-view/SimpleTreeView';
10-
import { TreeItem2 } from '@mui/x-tree-view/TreeItem2';
1111

1212
import { IContestCategory } from '../../../common/types';
1313
import { getAllContestsPageUrl } from '../../../common/urls/compose-client-urls';
@@ -81,7 +81,7 @@ const ContestCategories = (props: IContestCategoriesProps) => {
8181
}, [ categoryId ]);
8282

8383
const handleExpandedItemsChange = (
84-
event: SyntheticEvent,
84+
event: SyntheticEvent | null,
8585
itemIds: string[],
8686
) => {
8787
setExpandedItems(itemIds);
@@ -118,15 +118,15 @@ const ContestCategories = (props: IContestCategoriesProps) => {
118118

119119
if (category.children.length > 0) {
120120
return (
121-
<TreeItem2
121+
<TreeItem
122122
itemId={`${category.id}`}
123123
key={category.id}
124124
label={category.name}
125125
className={categoryListItemClassNames}
126126
classes={{ content: categoryListItemContentClassNames }}
127127
>
128128
{category.children.map((child) => renderCategory(child, true))}
129-
</TreeItem2>
129+
</TreeItem>
130130
);
131131
}
132132

Servers/UI/OJS.Servers.Ui/ClientApp/src/components/guidelines/pagination/PaginationControls.tsx

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import makeStyles from '@material-ui/core/styles/makeStyles';
21
import { PaginationItem } from '@mui/material';
32
import Pagination from '@mui/material/Pagination';
43
import useTheme from 'src/hooks/use-theme';
@@ -31,22 +30,6 @@ const PaginationControls = ({
3130
className,
3231
);
3332

34-
const useStyles = makeStyles(() => ({
35-
ul: {
36-
// This sets the background color of the selected page button
37-
'& .MuiPaginationItem-root.Mui-selected': { backgroundColor: '#44a9f8', color: '#ffffff' },
38-
'& .MuiPaginationItem-root': { color: themeColors.textColor },
39-
'& .MuiPaginationItem-ellipsis': { cursor: 'pointer' },
40-
'& .Mui-disabled': { pointerEvents: 'none' },
41-
},
42-
ellipsis: {
43-
pointerEvents: 'auto',
44-
cursor: 'pointer',
45-
},
46-
}));
47-
48-
const classes = useStyles();
49-
5033
const handleEllipsisClick = (type: string) => {
5134
if (isDataFetching) {
5235
return;
@@ -71,30 +54,28 @@ const PaginationControls = ({
7154
count={count}
7255
siblingCount={PAGE_SIBLING_COUNT}
7356
boundaryCount={PAGE_BOUNDARY_COUNT}
74-
onChange={(ev, value) => {
75-
onChange(value);
76-
}}
57+
onChange={(ev, value) => onChange(value)}
7758
page={page}
7859
className={paginationClassNames}
79-
classes={{ ul: classes.ul }}
60+
sx={{
61+
ul: {
62+
'& .MuiPaginationItem-root.Mui-selected': {
63+
backgroundColor: '#44a9f8',
64+
color: '#ffffff',
65+
},
66+
'& .MuiPaginationItem-root': { color: themeColors.textColor },
67+
'& .MuiPaginationItem-ellipsis': { cursor: 'pointer' },
68+
'& .Mui-disabled': { pointerEvents: 'none' },
69+
},
70+
}}
8071
showFirstButton
8172
showLastButton
8273
disabled={isDataFetching}
8374
renderItem={(item) => {
84-
if (item.type === 'start-ellipsis') {
85-
return (
86-
<div
87-
className={classes.ellipsis}
88-
onClick={() => handleEllipsisClick(item.type)}
89-
>
90-
<PaginationItem {...item}>...</PaginationItem>
91-
</div>
92-
);
93-
}
94-
if (item.type === 'end-ellipsis') {
75+
if (item.type === 'start-ellipsis' || item.type === 'end-ellipsis') {
9576
return (
9677
<div
97-
className={classes.ellipsis}
78+
style={{ cursor: 'pointer', pointerEvents: 'auto' }}
9879
onClick={() => handleEllipsisClick(item.type)}
9980
>
10081
<PaginationItem {...item}>...</PaginationItem>

Servers/UI/OJS.Servers.Ui/ClientApp/src/components/mentor/Mentor.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ const Mentor = (props: IMentorProps) => {
319319
: styles.mentorMessage
320320
}`}
321321
>
322-
<ReactMarkdown className={styles.markdownContent}>
323-
{message.content}
324-
</ReactMarkdown>
322+
<div className={styles.markdownContent}>
323+
<ReactMarkdown>{message.content}</ReactMarkdown>
324+
</div>
325325
</div>
326326
</div>
327327
))}

Servers/UI/OJS.Servers.Ui/ClientApp/src/components/portals/administration/AdministrationPortal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ const AdministrationPortal = () => {
310310

311311
const [ open, setOpen ] = useState(true);
312312
const [ showMenu, setShowMenu ] = useState<boolean>(false);
313-
const iconButtonRef = useRef(null);
313+
const iconButtonRef = useRef<HTMLButtonElement>(null);
314314

315315
useEffect(() => {
316316
const locationPathnameElements = location.pathname.split('/');

Servers/UI/OJS.Servers.Ui/ClientApp/src/hooks/use-administration-theme-provider.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,22 @@ const AdministrationThemeProvider: FC<IAdministrationThemeProviderProps> = ({ ch
9191
},
9292
},
9393
},
94-
MuiDataGrid: { styleOverrides: { root: { borderRadius: '14px', borderWidth: '1px' } } },
94+
MuiDataGrid: {
95+
styleOverrides: {
96+
root: {
97+
borderRadius: '14px',
98+
borderWidth: '1px',
99+
backgroundColor: getColors(themeMode).background.default,
100+
'& .MuiDataGrid-cell': { backgroundColor: getColors(themeMode).background.default },
101+
'& .MuiDataGrid-row': { backgroundColor: getColors(themeMode).background.default },
102+
'& .MuiDataGrid-columnHeaders': {
103+
backgroundColor: getColors(themeMode).background.default,
104+
'& .MuiDataGrid-columnHeader': { backgroundColor: getColors(themeMode).background.default },
105+
'& .MuiDataGrid-columnHeaderTitle': { color: getColors(themeMode).textColors.primary },
106+
},
107+
},
108+
},
109+
},
95110
MuiButton: { styleOverrides: { root: { borderRadius: 8 } } },
96111
MuiCssBaseline: {
97112
styleOverrides: {

Servers/UI/OJS.Servers.Ui/ClientApp/src/pages/administration-new/access-logs/accessLogsGridColumns.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const accessLogsFilterableColumns: AdministrationGridColDef[] = [
3838
flex: 1,
3939
filterable: false,
4040
sortable: false,
41-
valueFormatter: (params) => adminFormatDate(params.value),
41+
valueFormatter: (_, row) => adminFormatDate(row.value),
4242
},
4343
{
4444
field: 'ipAddress',

Servers/UI/OJS.Servers.Ui/ClientApp/src/pages/administration-new/contest-categories/contestCategoriesGridColumns.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const categoriesFilterableColumns: AdministrationGridColDef[] = [
2323
filterable: false,
2424
align: 'center',
2525
sortable: false,
26-
valueFormatter: (params) => params.value.toString(),
26+
valueFormatter: (_, row) => row.value?.toString(),
2727
},
2828
{
2929
field: 'isDeleted',
@@ -136,7 +136,7 @@ const categoriesFilterableColumns: AdministrationGridColDef[] = [
136136
type: 'date',
137137
filterable: false,
138138
sortable: false,
139-
valueFormatter: (params) => adminFormatDate(params.value),
139+
valueFormatter: (_, row) => adminFormatDate(row.value),
140140
},
141141
{
142142
field: 'createdOn',
@@ -145,7 +145,7 @@ const categoriesFilterableColumns: AdministrationGridColDef[] = [
145145
flex: 1,
146146
filterable: false,
147147
sortable: false,
148-
valueFormatter: (params) => adminFormatDate(params.value),
148+
valueFormatter: (_, row) => adminFormatDate(row.value),
149149
},
150150
{
151151
field: 'modifiedOn',
@@ -154,7 +154,7 @@ const categoriesFilterableColumns: AdministrationGridColDef[] = [
154154
flex: 1,
155155
filterable: false,
156156
sortable: false,
157-
valueFormatter: (params) => adminFormatDate(params.value),
157+
valueFormatter: (_, row) => adminFormatDate(row.value),
158158
},
159159
];
160160

0 commit comments

Comments
 (0)