keycloak-scim/js/apps/admin-ui/src/routes.tsx
Erik Jan de Wit 37790c7956
Add a way to extend the UI with an Java API (#23772)
* POC to see how we could extend the UI

This is very crude and there are still open issues that need to be worked out

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added saving option

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added list and recreate client form

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* add tab ui

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* integrate tabs

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* remove examples

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* fixed error messages

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added Feature for ui customization

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

---------

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
2024-01-22 08:19:58 +00:00

63 lines
1.9 KiB
TypeScript

import type { AccessType } from "@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation";
import type { TFunction } from "i18next";
import type { ComponentType } from "react";
import type { NonIndexRouteObject, RouteObject } from "react-router-dom";
import { App } from "./App";
import { PageNotFoundSection } from "./PageNotFoundSection";
import authenticationRoutes from "./authentication/routes";
import clientScopesRoutes from "./client-scopes/routes";
import clientRoutes from "./clients/routes";
import dashboardRoutes from "./dashboard/routes";
import eventRoutes from "./events/routes";
import groupsRoutes from "./groups/routes";
import identityProviders from "./identity-providers/routes";
import realmRoleRoutes from "./realm-roles/routes";
import realmSettingRoutes from "./realm-settings/routes";
import realmRoutes from "./realm/routes";
import sessionRoutes from "./sessions/routes";
import userFederationRoutes from "./user-federation/routes";
import userRoutes from "./user/routes";
import pageRoutes from "./page/routes";
export type AppRouteObjectHandle = {
access: AccessType | AccessType[];
};
export interface AppRouteObject extends NonIndexRouteObject {
path: string;
breadcrumb?: (t: TFunction) => string | ComponentType<any>;
handle: AppRouteObjectHandle;
}
export const NotFoundRoute: AppRouteObject = {
path: "*",
element: <PageNotFoundSection />,
handle: {
access: "anyone",
},
};
export const routes: AppRouteObject[] = [
...authenticationRoutes,
...clientRoutes,
...clientScopesRoutes,
...eventRoutes,
...identityProviders,
...realmRoleRoutes,
...realmRoutes,
...realmSettingRoutes,
...sessionRoutes,
...userFederationRoutes,
...userRoutes,
...groupsRoutes,
...dashboardRoutes,
...pageRoutes,
NotFoundRoute,
];
export const RootRoute: RouteObject = {
path: "/",
element: <App />,
children: routes,
};