@keycloakify/keycloak-account-ui 260007.0.2 → 260200.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/KcAccountUiLoader.js.map +1 -1
- package/keycloak-theme/account/KcAccountUi.tsx +11 -11
- package/keycloak-theme/account/account-security/AccountRow.tsx +2 -2
- package/keycloak-theme/account/account-security/DeviceActivity.tsx +2 -2
- package/keycloak-theme/account/account-security/LinkedAccounts.tsx +1 -1
- package/keycloak-theme/account/account-security/LinkedAccountsToolbar.tsx +1 -1
- package/keycloak-theme/account/account-security/SigningIn.tsx +61 -6
- package/keycloak-theme/account/api/methods.ts +2 -0
- package/keycloak-theme/account/api/representations.ts +8 -3
- package/keycloak-theme/account/applications/Applications.tsx +2 -2
- package/keycloak-theme/account/components/datalist/EmptyRow.tsx +1 -1
- package/keycloak-theme/account/components/page/Page.tsx +1 -1
- package/keycloak-theme/account/content/ContentComponent.tsx +1 -1
- package/keycloak-theme/account/groups/Groups.tsx +1 -1
- package/keycloak-theme/account/i18n/i18n.ts +6 -7
- package/keycloak-theme/account/i18n/messages_ca.properties +44 -43
- package/keycloak-theme/account/i18n/messages_de.properties +23 -22
- package/keycloak-theme/account/i18n/messages_el.properties +13 -13
- package/keycloak-theme/account/i18n/messages_en.properties +8 -7
- package/keycloak-theme/account/i18n/messages_es.properties +140 -46
- package/keycloak-theme/account/i18n/messages_fa.properties +9 -9
- package/keycloak-theme/account/i18n/messages_fi.properties +8 -8
- package/keycloak-theme/account/i18n/messages_fr.properties +14 -13
- package/keycloak-theme/account/i18n/messages_hr.properties +225 -0
- package/keycloak-theme/account/i18n/messages_hu.properties +15 -14
- package/keycloak-theme/account/i18n/messages_it.properties +141 -49
- package/keycloak-theme/account/i18n/messages_ja.properties +189 -6
- package/keycloak-theme/account/i18n/messages_ka.properties +6 -5
- package/keycloak-theme/account/i18n/messages_nl.properties +52 -3
- package/keycloak-theme/account/i18n/messages_pl.properties +35 -0
- package/keycloak-theme/account/i18n/messages_pt.properties +2 -2
- package/keycloak-theme/account/i18n/messages_pt_BR.properties +4 -4
- package/keycloak-theme/account/i18n/messages_ro.properties +13 -0
- package/keycloak-theme/account/i18n/messages_sl.properties +9 -0
- package/keycloak-theme/account/i18n/messages_th.properties +9 -9
- package/keycloak-theme/account/i18n/messages_tr.properties +2 -2
- package/keycloak-theme/account/i18n/messages_zh_CN.properties +2 -2
- package/keycloak-theme/account/oid4vci/Oid4Vci.tsx +1 -1
- package/keycloak-theme/account/personal-info/PersonalInfo.tsx +2 -2
- package/keycloak-theme/account/resources/EditTheResource.tsx +1 -1
- package/keycloak-theme/account/resources/PermissionRequest.tsx +3 -3
- package/keycloak-theme/account/resources/ResourceToolbar.tsx +1 -1
- package/keycloak-theme/account/resources/Resources.tsx +1 -1
- package/keycloak-theme/account/resources/ResourcesTab.tsx +3 -3
- package/keycloak-theme/account/resources/ShareTheResource.tsx +2 -2
- package/keycloak-theme/account/root/Header.tsx +2 -2
- package/keycloak-theme/account/root/PageNav.tsx +3 -2
- package/keycloak-theme/account/root/Root.tsx +57 -15
- package/keycloak-theme/account/routes.tsx +14 -23
- package/keycloak-theme/account/utils/useAccountAlerts.ts +1 -1
- package/package.json +13 -13
- package/src/KcAccountUiLoader.tsx +21 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/keycloak-theme/account/root/ErrorPage.tsx +0 -69
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
OverflowMenuGroup,
|
|
22
22
|
OverflowMenuItem,
|
|
23
23
|
Spinner,
|
|
24
|
-
} from "
|
|
24
|
+
} from "../../shared/@patternfly/react-core";
|
|
25
25
|
import {
|
|
26
26
|
EditAltIcon,
|
|
27
27
|
EllipsisVIcon,
|
|
28
28
|
ExternalLinkAltIcon,
|
|
29
29
|
Remove2Icon,
|
|
30
30
|
ShareAltIcon,
|
|
31
|
-
} from "
|
|
31
|
+
} from "../../shared/@patternfly/react-icons";
|
|
32
32
|
import {
|
|
33
33
|
ExpandableRowContent,
|
|
34
34
|
Table,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
Th,
|
|
38
38
|
Thead,
|
|
39
39
|
Tr,
|
|
40
|
-
} from "
|
|
40
|
+
} from "../../shared/@patternfly/react-table";
|
|
41
41
|
import { useState } from "react";
|
|
42
42
|
import { useTranslation } from "react-i18next";
|
|
43
43
|
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
Modal,
|
|
19
19
|
TextInput,
|
|
20
20
|
ValidatedOptions,
|
|
21
|
-
} from "
|
|
21
|
+
} from "../../shared/@patternfly/react-core";
|
|
22
22
|
import { useEffect } from "react";
|
|
23
23
|
import {
|
|
24
24
|
FormProvider,
|
|
@@ -181,7 +181,7 @@ export const ShareTheResource = ({
|
|
|
181
181
|
</InputGroupItem>
|
|
182
182
|
</InputGroup>
|
|
183
183
|
{fields.length > 1 && (
|
|
184
|
-
<ChipGroup categoryName={t("shareWith")}>
|
|
184
|
+
<ChipGroup categoryName={t("shareWith") + " "}>
|
|
185
185
|
{fields.map(
|
|
186
186
|
(field, index) =>
|
|
187
187
|
index !== fields.length - 1 && (
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
label,
|
|
9
9
|
useEnvironment,
|
|
10
10
|
} from "../../shared/keycloak-ui-shared";
|
|
11
|
-
import { Button } from "
|
|
12
|
-
import { ExternalLinkSquareAltIcon } from "
|
|
11
|
+
import { Button } from "../../shared/@patternfly/react-core";
|
|
12
|
+
import { ExternalLinkSquareAltIcon } from "../../shared/@patternfly/react-icons";
|
|
13
13
|
import { useTranslation } from "react-i18next";
|
|
14
14
|
import { useHref } from "react-router-dom";
|
|
15
15
|
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
PageSidebar,
|
|
12
12
|
PageSidebarBody,
|
|
13
13
|
Spinner,
|
|
14
|
-
} from "
|
|
14
|
+
} from "../../shared/@patternfly/react-core";
|
|
15
15
|
import {
|
|
16
16
|
PropsWithChildren,
|
|
17
17
|
MouseEvent as ReactMouseEvent,
|
|
@@ -33,6 +33,7 @@ import { TFuncKey } from "../i18n";
|
|
|
33
33
|
import { usePromise } from "../utils/usePromise";
|
|
34
34
|
|
|
35
35
|
type RootMenuItem = {
|
|
36
|
+
id?: string;
|
|
36
37
|
label: TFuncKey;
|
|
37
38
|
path: string;
|
|
38
39
|
isVisible?: keyof Feature;
|
|
@@ -141,7 +142,7 @@ export const NavLink = ({
|
|
|
141
142
|
isActive,
|
|
142
143
|
children,
|
|
143
144
|
}: PropsWithChildren<NavLinkProps>) => {
|
|
144
|
-
const menuItemPath = getFullUrl(path) +
|
|
145
|
+
const menuItemPath = getFullUrl(path) + location.search;
|
|
145
146
|
const href = useHref(menuItemPath);
|
|
146
147
|
const handleClick = useLinkClickHandler(menuItemPath);
|
|
147
148
|
|
|
@@ -2,23 +2,65 @@
|
|
|
2
2
|
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { Page, Spinner } from "
|
|
7
|
-
import { Suspense } from "react";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
import { ErrorPage, useEnvironment } from "../../shared/keycloak-ui-shared";
|
|
6
|
+
import { Page, Spinner } from "../../shared/@patternfly/react-core";
|
|
7
|
+
import { Suspense, useState } from "react";
|
|
8
|
+
import {
|
|
9
|
+
createBrowserRouter,
|
|
10
|
+
Outlet,
|
|
11
|
+
RouteObject,
|
|
12
|
+
RouterProvider,
|
|
13
|
+
} from "react-router-dom";
|
|
14
|
+
import fetchContentJson from "../content/fetchContent";
|
|
15
|
+
import { Environment, environment } from "../environment";
|
|
16
|
+
import { usePromise } from "../utils/usePromise";
|
|
11
17
|
import { Header } from "./Header";
|
|
12
|
-
import { PageNav } from "./PageNav";
|
|
18
|
+
import { MenuItem, PageNav } from "./PageNav";
|
|
19
|
+
import { routes } from "../routes";
|
|
20
|
+
|
|
21
|
+
function mapRoutes(content: MenuItem[]): RouteObject[] {
|
|
22
|
+
return content
|
|
23
|
+
.map((item) => {
|
|
24
|
+
if ("children" in item) {
|
|
25
|
+
return mapRoutes(item.children);
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
...item,
|
|
29
|
+
element:
|
|
30
|
+
"path" in item
|
|
31
|
+
? routes.find((r) => r.path === (item.id ?? item.path))?.element
|
|
32
|
+
: undefined,
|
|
33
|
+
};
|
|
34
|
+
})
|
|
35
|
+
.flat();
|
|
36
|
+
}
|
|
13
37
|
|
|
14
38
|
export const Root = () => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
39
|
+
const context = useEnvironment<Environment>();
|
|
40
|
+
const [content, setContent] = useState<RouteObject[]>();
|
|
41
|
+
|
|
42
|
+
usePromise(
|
|
43
|
+
(signal) => fetchContentJson({ signal, context }),
|
|
44
|
+
(content) => {
|
|
45
|
+
setContent([
|
|
46
|
+
{
|
|
47
|
+
path: decodeURIComponent(new URL(environment.baseUrl).pathname),
|
|
48
|
+
element: (
|
|
49
|
+
<Page header={<Header />} sidebar={<PageNav />} isManagedSidebar>
|
|
50
|
+
<Suspense fallback={<Spinner />}>
|
|
51
|
+
<Outlet />
|
|
52
|
+
</Suspense>
|
|
53
|
+
</Page>
|
|
54
|
+
),
|
|
55
|
+
errorElement: <ErrorPage />,
|
|
56
|
+
children: mapRoutes(content),
|
|
57
|
+
},
|
|
58
|
+
]);
|
|
59
|
+
},
|
|
23
60
|
);
|
|
61
|
+
|
|
62
|
+
if (!content) {
|
|
63
|
+
return <Spinner />;
|
|
64
|
+
}
|
|
65
|
+
return <RouterProvider router={createBrowserRouter(content)} />;
|
|
24
66
|
};
|
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { lazy } from "react";
|
|
6
6
|
import type { IndexRouteObject, RouteObject } from "react-router-dom";
|
|
7
|
-
|
|
8
7
|
import { environment } from "./environment";
|
|
9
8
|
import { Organizations } from "./organizations/Organizations";
|
|
10
|
-
import { ErrorPage } from "./root/ErrorPage";
|
|
11
|
-
import { Root } from "./root/Root";
|
|
12
9
|
|
|
13
10
|
const DeviceActivity = lazy(() => import("./account-security/DeviceActivity"));
|
|
14
11
|
const LinkedAccounts = lazy(() => import("./account-security/LinkedAccounts"));
|
|
@@ -62,6 +59,7 @@ export const ContentRoute: RouteObject = {
|
|
|
62
59
|
export const PersonalInfoRoute: IndexRouteObject = {
|
|
63
60
|
index: true,
|
|
64
61
|
element: <PersonalInfo />,
|
|
62
|
+
path: "",
|
|
65
63
|
};
|
|
66
64
|
|
|
67
65
|
export const OrganizationsRoute: RouteObject = {
|
|
@@ -74,23 +72,16 @@ export const Oid4VciRoute: RouteObject = {
|
|
|
74
72
|
element: <Oid4Vci />,
|
|
75
73
|
};
|
|
76
74
|
|
|
77
|
-
export const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
ResourcesRoute,
|
|
91
|
-
ContentRoute,
|
|
92
|
-
Oid4VciRoute,
|
|
93
|
-
],
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export const routes: RouteObject[] = [RootRoute];
|
|
75
|
+
export const routes: RouteObject[] = [
|
|
76
|
+
PersonalInfoRoute,
|
|
77
|
+
DeviceActivityRoute,
|
|
78
|
+
LinkedAccountsRoute,
|
|
79
|
+
SigningInRoute,
|
|
80
|
+
ApplicationsRoute,
|
|
81
|
+
GroupsRoute,
|
|
82
|
+
OrganizationsRoute,
|
|
83
|
+
PersonalInfoRoute,
|
|
84
|
+
ResourcesRoute,
|
|
85
|
+
ContentRoute,
|
|
86
|
+
...(environment.features.isOid4VciEnabled ? [Oid4VciRoute] : []),
|
|
87
|
+
];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
|
|
5
5
|
import { useAlerts } from "../../shared/keycloak-ui-shared";
|
|
6
|
-
import { AlertVariant } from "
|
|
6
|
+
import { AlertVariant } from "../../shared/@patternfly/react-core";
|
|
7
7
|
import { useCallback, useMemo } from "react";
|
|
8
8
|
import { useTranslation } from "react-i18next";
|
|
9
9
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@keycloakify/keycloak-account-ui",
|
|
3
3
|
"main": "index.js",
|
|
4
4
|
"types": "index.d.ts",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "260200.0.0-rc.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git://github.com/keycloakify/keycloak-account-ui.git"
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
"tsafe": "^1.8.5"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@patternfly/patternfly": "^5.4.
|
|
23
|
-
"@patternfly/react-core": "^5.4.
|
|
24
|
-
"@patternfly/react-icons": "^5.4.
|
|
25
|
-
"@patternfly/react-table": "^5.4.
|
|
26
|
-
"i18next": "^
|
|
27
|
-
"i18next-
|
|
22
|
+
"@patternfly/patternfly": "^5.4.2",
|
|
23
|
+
"@patternfly/react-core": "^5.4.14",
|
|
24
|
+
"@patternfly/react-icons": "^5.4.2",
|
|
25
|
+
"@patternfly/react-table": "^5.4.16",
|
|
26
|
+
"i18next": "^24.2.3",
|
|
27
|
+
"i18next-fetch-backend": "^6.0.0",
|
|
28
|
+
"keycloak-js": "^26.2.0",
|
|
28
29
|
"lodash-es": "^4.17.21",
|
|
29
30
|
"react": "^18.3.1",
|
|
30
|
-
"react-hook-form": "^7.
|
|
31
|
-
"react-i18next": "^15.
|
|
32
|
-
"react-router-dom": "^6.
|
|
33
|
-
"keycloak-
|
|
34
|
-
"@keycloakify/keycloak-ui-shared": "~260007.0.1",
|
|
31
|
+
"react-hook-form": "^7.54.2",
|
|
32
|
+
"react-i18next": "^15.4.1",
|
|
33
|
+
"react-router-dom": "^6.30.0",
|
|
34
|
+
"@keycloakify/keycloak-ui-shared": "~260200.0.0",
|
|
35
35
|
"@types/lodash-es": "^4.17.12",
|
|
36
|
-
"@types/react": "^18.3.
|
|
36
|
+
"@types/react": "^18.3.18"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -8,16 +8,37 @@ import { getI18n } from "react-i18next";
|
|
|
8
8
|
import type { AccountEnvironment as Environment_target } from "@keycloak/keycloak-account-ui";
|
|
9
9
|
|
|
10
10
|
type Environment = {
|
|
11
|
+
/**
|
|
12
|
+
* The URL to the root of the Keycloak server, including the path if present, this is **NOT** always equivalent to the URL of the Admin Console.
|
|
13
|
+
* For example, the Keycloak server could be hosted on `auth.example.com` and Admin Console may be hosted on `admin.example.com/some/path`.
|
|
14
|
+
*
|
|
15
|
+
* Note that this URL is normalized not to include a trailing slash, so take this into account when constructing URLs.
|
|
16
|
+
*
|
|
17
|
+
* @see {@link https://www.keycloak.org/server/hostname#_administration_console}
|
|
18
|
+
*/
|
|
11
19
|
serverBaseUrl: string;
|
|
20
|
+
/** The identifier of the realm used to authenticate the user. */
|
|
12
21
|
realm: string;
|
|
22
|
+
/** The identifier of the client used to authenticate the user. */
|
|
13
23
|
clientId: string;
|
|
24
|
+
/** The base URL of the resources. */
|
|
14
25
|
resourceUrl: string;
|
|
26
|
+
/** The source URL for the the logo image. */
|
|
15
27
|
logo: string;
|
|
28
|
+
/** The URL to be followed when the logo is clicked. */
|
|
16
29
|
logoUrl: string;
|
|
30
|
+
/** The scopes to be requested when sending authorization requests*/
|
|
31
|
+
scope?: string;
|
|
32
|
+
|
|
33
|
+
/** The URL to the root of the account console. */
|
|
17
34
|
baseUrl: string;
|
|
35
|
+
/** The locale of the user */
|
|
18
36
|
locale: string;
|
|
37
|
+
/** Name of the referrer application in the back link */
|
|
19
38
|
referrerName?: string;
|
|
39
|
+
/** UR to the referrer application in the back link */
|
|
20
40
|
referrerUrl?: string;
|
|
41
|
+
/** Feature flags */
|
|
21
42
|
features: {
|
|
22
43
|
isRegistrationEmailAsUsername: boolean;
|
|
23
44
|
isEditUserNameAllowed: boolean;
|