@keycloakify/keycloak-account-ui 260007.0.3 → 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/SigningIn.tsx +60 -5
- package/keycloak-theme/account/api/methods.ts +2 -0
- package/keycloak-theme/account/api/representations.ts +8 -3
- 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/resources/ShareTheResource.tsx +1 -1
- package/keycloak-theme/account/root/PageNav.tsx +2 -1
- package/keycloak-theme/account/root/Root.tsx +56 -14
- package/keycloak-theme/account/routes.tsx +14 -23
- 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
|
@@ -2,23 +2,65 @@
|
|
|
2
2
|
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { ErrorPage, useEnvironment } from "../../shared/keycloak-ui-shared";
|
|
6
6
|
import { Page, Spinner } from "../../shared/@patternfly/react-core";
|
|
7
|
-
import { Suspense } from "react";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
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
|
+
];
|
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.2",
|
|
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;
|