Skip to content

Commit 765bcc2

Browse files
committed
Upgrade all UI dependencies on Oct 31, 2024
1 parent 5f3cead commit 765bcc2

27 files changed

+431
-458
lines changed

ui/tests/package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/tests/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"devDependencies": {
1414
"@apicurio/eslint-config": "0.3.0",
1515
"@playwright/test": "1.48.2",
16-
"@types/node": "22.8.4",
16+
"@types/node": "22.8.5",
1717
"@typescript-eslint/eslint-plugin": "8.12.2",
1818
"@typescript-eslint/parser": "8.12.2",
1919
"eslint": "8.57.1",

ui/ui-app/package-lock.json

+239-228
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/ui-app/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
"@types/pluralize": "0.0.33",
2424
"@types/react": "18.3.12",
2525
"@types/react-dom": "18.3.1",
26-
"@typescript-eslint/eslint-plugin": "7.18.0",
27-
"@typescript-eslint/parser": "7.18.0",
26+
"@typescript-eslint/eslint-plugin": "8.12.2",
27+
"@typescript-eslint/parser": "8.12.2",
2828
"@vitejs/plugin-react-swc": "3.7.1",
2929
"copyfiles": "2.4.1",
3030
"eslint": "8.57.1",
31-
"eslint-plugin-react-hooks": "4.6.2",
31+
"eslint-plugin-react-hooks": "5.0.0",
3232
"eslint-plugin-react-refresh": "0.4.14",
33-
"rimraf": "5.0.10",
33+
"rimraf": "6.0.1",
3434
"typescript": "5.6.3",
3535
"vite": "5.4.10",
3636
"vite-tsconfig-paths": "5.0.1"
@@ -46,7 +46,7 @@
4646
"@microsoft/kiota-serialization-multipart": "1.0.0-preview.46",
4747
"@microsoft/kiota-serialization-text": "1.0.0-preview.65",
4848
"@patternfly/patternfly": "5.4.2",
49-
"@patternfly/react-code-editor": "5.4.10",
49+
"@patternfly/react-code-editor": "5.4.11",
5050
"@patternfly/react-core": "5.4.8",
5151
"@patternfly/react-icons": "5.4.2",
5252
"@patternfly/react-table": "5.4.9",

ui/ui-app/src/app/App.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ import { LoggerService, useLoggerService } from "@services/useLoggerService.ts";
1313
import { ApplicationAuth, AuthConfig, AuthConfigContext } from "@apicurio/common-ui-components";
1414
import { ArtifactPage } from "@app/pages/artifact";
1515

16-
export type AppProps = {
17-
// No props
18-
};
16+
export type AppProps = object;
1917

2018
/**
2119
* The main application class.

ui/ui-app/src/app/components/header/AppHeader.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import { AppNavigation, useAppNavigation } from "@services/useAppNavigation.ts";
66
import { ConfigService, useConfigService } from "@services/useConfigService.ts";
77

88

9-
export type AppHeaderProps = {
10-
// No properties.
11-
};
9+
export type AppHeaderProps = object;
1210

1311

1412
export const AppHeader: FunctionComponent<AppHeaderProps> = () => {

ui/ui-app/src/app/components/header/AppHeaderToolbar.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import { SystemService, useSystemService } from "@services/useSystemService.ts";
88
import { ConfigService, useConfigService } from "@services/useConfigService.ts";
99

1010

11-
export type AppHeaderToolbarProps = {
12-
// No properties.
13-
};
11+
export type AppHeaderToolbarProps = object;
1412

1513

1614
export const AppHeaderToolbar: FunctionComponent<AppHeaderToolbarProps> = () => {

ui/ui-app/src/app/components/header/AvatarDropdown.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import { UserService, useUserService } from "@services/useUserService.ts";
55
import { ConfigService, useConfigService } from "@services/useConfigService.ts";
66

77

8-
export type AvatarDropdownProps = {
9-
// No props
10-
};
8+
export type AvatarDropdownProps = object;
119

1210

1311
export const AvatarDropdown: FunctionComponent<AvatarDropdownProps> = () => {

ui/ui-app/src/app/pages/404/404.tsx

+2-8
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,13 @@ import {
1313
} from "@patternfly/react-core";
1414
import { ExclamationCircleIcon } from "@patternfly/react-icons";
1515
import { AppNavigation, useAppNavigation } from "@services/useAppNavigation.ts";
16+
import { PageProperties } from "@app/pages";
1617

1718

18-
/**
19-
* Properties
20-
*/
21-
export type NotFoundPageProps = {
22-
// No page properties.
23-
};
24-
2519
/**
2620
* The "not found" page.
2721
*/
28-
export const NotFoundPage: FunctionComponent<NotFoundPageProps> = () => {
22+
export const NotFoundPage: FunctionComponent<PageProperties> = () => {
2923
const appNavigation: AppNavigation = useAppNavigation();
3024

3125
return (
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
export type PageProperties = object; // Currently pages do not have properties

ui/ui-app/src/app/pages/artifact/ArtifactPage.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { FunctionComponent, useEffect, useState } from "react";
22
import "./ArtifactPage.css";
33
import { Breadcrumb, BreadcrumbItem, PageSection, PageSectionVariants, Tab, Tabs } from "@patternfly/react-core";
44
import { Link, useLocation, useParams } from "react-router-dom";
5-
import { PageDataLoader, PageError, PageErrorHandler, toPageError } from "@app/pages";
5+
import { PageDataLoader, PageError, PageErrorHandler, PageProperties, toPageError } from "@app/pages";
66
import {
77
ChangeOwnerModal,
88
ConfirmDeleteModal,
@@ -37,14 +37,10 @@ import {
3737
import { AddVersionToBranchModal } from "@app/components/modals/AddVersionToBranchModal.tsx";
3838

3939

40-
export type ArtifactPageProps = {
41-
// No properties
42-
}
43-
4440
/**
4541
* The artifact version page.
4642
*/
47-
export const ArtifactPage: FunctionComponent<ArtifactPageProps> = () => {
43+
export const ArtifactPage: FunctionComponent<PageProperties> = () => {
4844
const [pageError, setPageError] = useState<PageError>();
4945
const [loaders, setLoaders] = useState<Promise<any> | Promise<any>[] | undefined>();
5046
const [artifact, setArtifact] = useState<ArtifactMetaData>();

ui/ui-app/src/app/pages/branch/BranchPage.tsx

+9-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ import { FunctionComponent, useEffect, useState } from "react";
22
import "./BranchPage.css";
33
import { Breadcrumb, BreadcrumbItem, PageSection, PageSectionVariants, Tab, Tabs } from "@patternfly/react-core";
44
import { Link, useLocation, useParams } from "react-router-dom";
5-
import { BranchVersionsTabContent, PageDataLoader, PageError, PageErrorHandler, toPageError } from "@app/pages";
5+
import {
6+
BranchVersionsTabContent,
7+
PageDataLoader,
8+
PageError,
9+
PageErrorHandler,
10+
PageProperties,
11+
toPageError
12+
} from "@app/pages";
613
import { ConfirmDeleteModal, EditMetaDataModal, IfFeature, MetaData } from "@app/components";
714
import { PleaseWaitModal } from "@apicurio/common-ui-components";
815
import { AppNavigation, useAppNavigation } from "@services/useAppNavigation.ts";
@@ -12,14 +19,10 @@ import { ArtifactMetaData, BranchMetaData, SearchedVersion } from "@sdk/lib/gene
1219
import { BranchInfoTabContent, BranchPageHeader } from "@app/pages/branch/components";
1320

1421

15-
export type BranchPageProps = {
16-
// No properties
17-
}
18-
1922
/**
2023
* The artifact branch page.
2124
*/
22-
export const BranchPage: FunctionComponent<BranchPageProps> = () => {
25+
export const BranchPage: FunctionComponent<PageProperties> = () => {
2326
const [pageError, setPageError] = useState<PageError>();
2427
const [loaders, setLoaders] = useState<Promise<any> | Promise<any>[] | undefined>();
2528
const [artifact, setArtifact] = useState<ArtifactMetaData>();

ui/ui-app/src/app/pages/explore/ExplorePage.tsx

+2-8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
PageDataLoader,
1212
PageError,
1313
PageErrorHandler,
14+
PageProperties,
1415
toPageError
1516
} from "@app/pages";
1617
import { CreateArtifactModal, CreateGroupModal, InvalidContentModal, RootPageHeader } from "@app/components";
@@ -34,13 +35,6 @@ import {
3435
SortOrderObject
3536
} from "@sdk/lib/generated-client/models";
3637

37-
/**
38-
* Properties
39-
*/
40-
export type ExplorePageProps = {
41-
// No properties.
42-
}
43-
4438
const EMPTY_RESULTS: ArtifactSearchResults = {
4539
artifacts: [],
4640
count: 0
@@ -54,7 +48,7 @@ const DEFAULT_PAGING: Paging = {
5448
/**
5549
* The Explore page.
5650
*/
57-
export const ExplorePage: FunctionComponent<ExplorePageProps> = () => {
51+
export const ExplorePage: FunctionComponent<PageProperties> = () => {
5852
const [pageError, setPageError] = useState<PageError>();
5953
const [loaders, setLoaders] = useState<Promise<any> | Promise<any>[] | undefined>();
6054
const [exploreType, setExploreType] = useState(ExploreType.ARTIFACT);

ui/ui-app/src/app/pages/group/GroupPage.tsx

+4-6
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ import {
88
PageDataLoader,
99
PageError,
1010
PageErrorHandler,
11+
PageProperties,
1112
toPageError
1213
} from "@app/pages";
1314
import {
1415
ChangeOwnerModal,
15-
ConfirmDeleteModal, CreateArtifactModal,
16+
ConfirmDeleteModal,
17+
CreateArtifactModal,
1618
EditMetaDataModal,
1719
IfFeature,
1820
InvalidContentModal,
@@ -33,14 +35,10 @@ import {
3335
} from "@sdk/lib/generated-client/models";
3436

3537

36-
export type GroupPageProps = {
37-
// No properties
38-
}
39-
4038
/**
4139
* The group page.
4240
*/
43-
export const GroupPage: FunctionComponent<GroupPageProps> = () => {
41+
export const GroupPage: FunctionComponent<PageProperties> = () => {
4442
const [pageError, setPageError] = useState<PageError>();
4543
const [loaders, setLoaders] = useState<Promise<any> | Promise<any>[] | undefined>();
4644
const [group, setGroup] = useState<GroupMetaData>();

ui/ui-app/src/app/pages/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ export * from "./PageDataLoader";
1111
export * from "./PageError";
1212
export * from "./PageErrorHandler";
1313
export * from "./PageErrorType";
14+
export * from "./PageProperties";
1415
export * from "./toPageError";

ui/ui-app/src/app/pages/roles/RolesPage.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
PageDataLoader,
66
PageError,
77
PageErrorHandler,
8+
PageProperties,
89
RoleList,
910
RoleMappingsEmptyState,
1011
RoleToolbar,
@@ -20,16 +21,11 @@ import { Paging } from "@models/paging.model.ts";
2021
import { RoleMapping } from "@sdk/lib/generated-client/models";
2122

2223

23-
export type RolesPageProps = {
24-
// No props.
25-
}
26-
27-
2824
/**
2925
* The roles/access page.
3026
*/
3127
// export class RolesPage extends PageComponent<RolesPageProps, RolesPageState> {
32-
export const RolesPage: FunctionComponent<RolesPageProps> = () => {
28+
export const RolesPage: FunctionComponent<PageProperties> = () => {
3329
const [pageError, setPageError] = useState<PageError>();
3430
const [loaders, setLoaders] = useState<Promise<any> | Promise<any>[] | undefined>();
3531
const [isGrantAccessOpen, setIsGrantAccessOpen] = useState(false);

ui/ui-app/src/app/pages/root/RootRedirectPage.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { FunctionComponent } from "react";
22
import { Navigate } from "react-router-dom";
33
import { AppNavigation, useAppNavigation } from "@services/useAppNavigation.ts";
4+
import { PageProperties } from "@app/pages";
45

56

67
/**
78
* The root redirect page.
89
*/
9-
export const RootRedirectPage: FunctionComponent<any> = () => {
10+
export const RootRedirectPage: FunctionComponent<PageProperties> = () => {
1011
const appNav: AppNavigation = useAppNavigation();
1112

1213
const redirect: string = appNav.createLink("/explore");

ui/ui-app/src/app/pages/rules/RulesPage.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,16 @@ import React, { FunctionComponent, useEffect, useState } from "react";
22
import "./RulesPage.css";
33
import { PageSection, PageSectionVariants, TextContent } from "@patternfly/react-core";
44
import { RootPageHeader, RuleList, RuleListType } from "@app/components";
5-
import { PageDataLoader, PageError, PageErrorHandler, toPageError } from "@app/pages";
5+
import { PageDataLoader, PageError, PageErrorHandler, PageProperties, toPageError } from "@app/pages";
66
import { AdminService, useAdminService } from "@services/useAdminService.ts";
77
import { LoggerService, useLoggerService } from "@services/useLoggerService.ts";
88
import { Rule, RuleType } from "@sdk/lib/generated-client/models";
99

1010

11-
export type RulesPageProps = {
12-
// No properties.
13-
}
14-
1511
/**
1612
* The global rules page.
1713
*/
18-
export const RulesPage: FunctionComponent<RulesPageProps> = () => {
14+
export const RulesPage: FunctionComponent<PageProperties> = () => {
1915
const [pageError, setPageError] = useState<PageError>();
2016
const [loaders, setLoaders] = useState<Promise<any> | Promise<any>[] | undefined>();
2117
const [rules, setRules] = useState<Rule[]>([]);

ui/ui-app/src/app/pages/settings/SettingsPage.tsx

+2-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
TextContent
1111
} from "@patternfly/react-core";
1212
import { RootPageHeader } from "@app/components";
13-
import { ConfigProperty, PageDataLoader, PageError, PageErrorHandler, toPageError } from "@app/pages";
13+
import { ConfigProperty, PageDataLoader, PageError, PageErrorHandler, PageProperties, toPageError } from "@app/pages";
1414
import { If, IfNotEmpty } from "@apicurio/common-ui-components";
1515
import { AdminService, useAdminService } from "@services/useAdminService.ts";
1616
import { AlertsService, useAlertsService } from "@services/useAlertsService.tsx";
@@ -70,15 +70,10 @@ const PROPERTY_GROUPS: PropertyGroup[] = [
7070
},
7171
];
7272

73-
74-
export type SettingsPageProps = {
75-
// No props
76-
}
77-
7873
/**
7974
* The settings page.
8075
*/
81-
export const SettingsPage: FunctionComponent<SettingsPageProps> = () => {
76+
export const SettingsPage: FunctionComponent<PageProperties> = () => {
8277
const [pageError, setPageError] = useState<PageError>();
8378
const [loaders, setLoaders] = useState<Promise<any> | Promise<any>[] | undefined>();
8479
const [properties, setProperties] = useState<ConfigurationProperty[]>([]);

ui/ui-app/src/app/pages/version/VersionPage.tsx

+3-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
PageError,
1111
PageErrorHandler,
1212
toPageError,
13-
VersionPageHeader
13+
VersionPageHeader, PageProperties
1414
} from "@app/pages";
1515
import { ReferencesTabContent } from "@app/pages/version/components/tabs/ReferencesTabContent.tsx";
1616
import { ConfirmDeleteModal, EditMetaDataModal, GenerateClientModal, IfFeature, MetaData } from "@app/components";
@@ -24,14 +24,10 @@ import { ArtifactTypes } from "@services/useArtifactTypesService.ts";
2424
import { ArtifactMetaData, Labels, VersionMetaData } from "@sdk/lib/generated-client/models";
2525

2626

27-
export type ArtifactVersionPageProps = {
28-
// No properties
29-
}
30-
3127
/**
3228
* The artifact version page.
3329
*/
34-
export const VersionPage: FunctionComponent<ArtifactVersionPageProps> = () => {
30+
export const VersionPage: FunctionComponent<PageProperties> = () => {
3531
const [pageError, setPageError] = useState<PageError>();
3632
const [loaders, setLoaders] = useState<Promise<any> | Promise<any>[] | undefined>();
3733
const [artifact, setArtifact] = useState<ArtifactMetaData>();
@@ -66,7 +62,7 @@ export const VersionPage: FunctionComponent<ArtifactVersionPageProps> = () => {
6662
if (eo && eo.status && eo.status === 404) {
6763
return true;
6864
}
69-
} catch (e) {
65+
} catch {
7066
// Do nothing
7167
}
7268
}

ui/ui-app/src/app/pages/version/components/tabs/ContentTabContent.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const formatJsonContent = (artifactContent: string): string => {
2626
if (pval) {
2727
return JSON.stringify(pval, null, 2);
2828
}
29-
} catch (e) {
29+
} catch {
3030
// Do nothing
3131
}
3232
return artifactContent;

0 commit comments

Comments
 (0)