changed name and added version number (#28157)

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2024-04-19 20:10:34 +02:00 committed by GitHub
parent 3e0a185070
commit 659f0f583f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
199 changed files with 495 additions and 214 deletions

View file

@ -9,3 +9,6 @@ mvn:documentation/keycloak-documentation:keycloak-documentation
npm:js/libs/keycloak-admin-client/target/keycloak-keycloak-admin-client-$$VERSION$$.tgz:keycloak-admin-client-$$VERSION$$.tgz npm:js/libs/keycloak-admin-client/target/keycloak-keycloak-admin-client-$$VERSION$$.tgz:keycloak-admin-client-$$VERSION$$.tgz
npm:js/libs/keycloak-js/target/keycloak-js-$$VERSION$$.tgz:keycloak-js-$$VERSION$$.tgz npm:js/libs/keycloak-js/target/keycloak-js-$$VERSION$$.tgz:keycloak-js-$$VERSION$$.tgz
npm:js/libs/ui-shared/target/keycloak-keycloak-ui-shared-$$VERSION$$.tgz:keycloak-ui-shared-$$VERSION$$.tgz
npm:js/apps/account-ui/target/keycloak-keycloak-account-ui-$$VERSION$$.tgz:keycloak-account-ui-$$VERSION$$.tgz

View file

@ -1,4 +1,5 @@
/test-results/ /test-results/
/playwright-report/ /playwright-report/
/playwright/.cache/ /playwright/.cache/
.auth/ .auth/
lib/

View file

@ -1,3 +1,97 @@
# Keycloak Account UI # Keycloak Account UI
This project is the next generation of the Keycloak Account UI. It is written with React and [PatternFly 4](https://www.patternfly.org/v4/) and uses [Vite](https://vitejs.dev/guide/). This project is the next generation of the Keycloak Account UI. It is written with React and [PatternFly 4](https://www.patternfly.org/v4/) and uses [Vite](https://vitejs.dev/guide/).
## Features
Contains all the "pages" from the account-ui as re-usable components, all the functions to save and the side menu to use in your own build of the account-ui
## Install
```bash
npm i @keycloak/keycloak-account-ui
```
## Usage
To use these pages you'll need to add `KeycloakProvider` in your component hierarchy to setup what client, realm and url to use.
```jsx
import { KeycloakProvider } from "@keycloak/keycloak-account-ui";
//...
<KeycloakProvider environment={{
authUrl: "http://localhost:8080",
realm: "master",
clientId: "security-admin-console"
}}>
{/* rest of you application */}
</KeycloakProvider>
```
### Translation
For the translation we use `react-i18next` you can [set it up](https://react.i18next.com/) as described on their website.
If you want to use the translations that are provided then you need to add `i18next-http-backend` to your project and add:
```ts
backend: {
loadPath: `http://localhost:8180/resources/master/account/{{lng}}`,
parse: (data: string) => {
const messages = JSON.parse(data);
const result: Record<string, string> = {};
messages.forEach((v) => (result[v.key] = v.value));
return result;
},
},
```
to the `i18next` config object.
### Save functions
If you want to build your own "pages" you can still reuse the save functions:
* deleteConsent
* deleteCredentials
* deleteSession
* getApplications
* getCredentials
* getDevices
* getGroups
* getLinkedAccounts
* getPermissionRequests
* getPersonalInfo
* getSupportedLocales
* linkAccount
* savePersonalInfo
* unLinkAccount
Example:
```ts
import { savePersonalInfo, useEnvironment } from "@keycloak/keycloak-account-ui";
//...
function App() {
// the save function also needs to have the context so that it knows where to POST
// this hook gives us access to the `KeycloakProvider` context
const context = useEnvironment();
const submit = async (data) => {
try {
await savePersonalInfo(context, data);
} catch (error) {
// Error contains `name` and `value` of the server side errors
// and your app will have better error handling ;)
console.error(error);
}
}
// ...
```
## Building
To build a library instead of an app you need to add the `LIB=true` environment variable.
```bash
LIB=true pnpm run build
```

View file

@ -1,14 +1,18 @@
{ {
"name": "account-ui", "name": "@keycloak/keycloak-account-ui",
"version": "999.0.0-SNAPSHOT",
"type": "module", "type": "module",
"main": "dist/account-ui.js", "main": "lib/keycloak-account-ui.js",
"types": "./dist/account-ui.d.ts", "types": "./lib/keycloak-account-ui.d.ts",
"exports": { "exports": {
".": { ".": {
"import": "./dist/account-ui.js", "import": "./lib/keycloak-account-ui.js",
"types": "./dist/account-ui.d.ts" "types": "./lib/keycloak-account-ui.d.ts"
} }
}, },
"files": [
"lib"
],
"scripts": { "scripts": {
"dev": "wireit", "dev": "wireit",
"build": "wireit", "build": "wireit",
@ -30,7 +34,7 @@
"react-hook-form": "^7.51.3", "react-hook-form": "^7.51.3",
"react-i18next": "^14.1.0", "react-i18next": "^14.1.0",
"react-router-dom": "^6.22.3", "react-router-dom": "^6.22.3",
"ui-shared": "workspace:*" "@keycloak/keycloak-ui-shared": "workspace:*"
}, },
"devDependencies": { "devDependencies": {
"@keycloak/keycloak-admin-client": "workspace:*", "@keycloak/keycloak-admin-client": "workspace:*",

View file

@ -172,6 +172,25 @@
</replacements> </replacements>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<id>pack</id>
<phase>package</phase>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>pack --pack-destination=target</arguments>
<systemPropertyVariables>
<LIB>true</LIB>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View file

@ -12,7 +12,7 @@ import {
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import { LinkIcon, UnlinkIcon } from "@patternfly/react-icons"; import { LinkIcon, UnlinkIcon } from "@patternfly/react-icons";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { IconMapper, useAlerts } from "ui-shared"; import { IconMapper, useAlerts } from "@keycloak/keycloak-ui-shared";
import { linkAccount, unLinkAccount } from "../api/methods"; import { linkAccount, unLinkAccount } from "../api/methods";
import { LinkedAccountRepresentation } from "../api/representations"; import { LinkedAccountRepresentation } from "../api/representations";

View file

@ -23,7 +23,7 @@ import {
} from "@patternfly/react-icons"; } from "@patternfly/react-icons";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { ContinueCancelModal, useAlerts } from "ui-shared"; import { ContinueCancelModal, useAlerts } from "@keycloak/keycloak-ui-shared";
import { deleteSession, getDevices } from "../api/methods"; import { deleteSession, getDevices } from "../api/methods";
import { import {
ClientRepresentation, ClientRepresentation,

View file

@ -22,7 +22,7 @@ import {
} from "@patternfly/react-icons"; } from "@patternfly/react-icons";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { ContinueCancelModal, useAlerts } from "ui-shared"; import { ContinueCancelModal, useAlerts } from "@keycloak/keycloak-ui-shared";
import { deleteConsent, getApplications } from "../api/methods"; import { deleteConsent, getApplications } from "../api/methods";
import { ClientRepresentation } from "../api/representations"; import { ClientRepresentation } from "../api/representations";
import { Page } from "../components/page/Page"; import { Page } from "../components/page/Page";

View file

@ -17,7 +17,7 @@ import {
debeerify, debeerify,
setUserProfileServerError, setUserProfileServerError,
useAlerts, useAlerts,
} from "ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { import {
getPersonalInfo, getPersonalInfo,

View file

@ -3,7 +3,11 @@ import { Fragment, useEffect } from "react";
import { FormProvider, useFieldArray, useForm } from "react-hook-form"; import { FormProvider, useFieldArray, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SelectControl, TextControl, useAlerts } from "ui-shared"; import {
SelectControl,
TextControl,
useAlerts,
} from "@keycloak/keycloak-ui-shared";
import { updatePermissions } from "../api"; import { updatePermissions } from "../api";
import type { Permission, Resource } from "../api/representations"; import type { Permission, Resource } from "../api/representations";
import { useEnvironment } from "../root/KeycloakContext"; import { useEnvironment } from "../root/KeycloakContext";

View file

@ -11,7 +11,7 @@ import { UserCheckIcon } from "@patternfly/react-icons";
import { Table, Tbody, Td, Th, Thead, Tr } from "@patternfly/react-table"; import { Table, Tbody, Td, Th, Thead, Tr } from "@patternfly/react-table";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAlerts } from "ui-shared"; import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { fetchPermission, updateRequest } from "../api"; import { fetchPermission, updateRequest } from "../api";
import { Permission, Resource } from "../api/representations"; import { Permission, Resource } from "../api/representations";

View file

@ -33,7 +33,7 @@ import {
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { ContinueCancelModal, useAlerts } from "ui-shared"; import { ContinueCancelModal, useAlerts } from "@keycloak/keycloak-ui-shared";
import { fetchPermission, fetchResources, updatePermissions } from "../api"; import { fetchPermission, fetchResources, updatePermissions } from "../api";
import { getPermissionRequests } from "../api/methods"; import { getPermissionRequests } from "../api/methods";
import { Links } from "../api/parse-links"; import { Links } from "../api/parse-links";

View file

@ -18,8 +18,11 @@ import {
useWatch, useWatch,
} from "react-hook-form"; } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { FormErrorText, SelectControl, useAlerts } from "ui-shared"; import {
FormErrorText,
SelectControl,
useAlerts,
} from "@keycloak/keycloak-ui-shared";
import { updateRequest } from "../api"; import { updateRequest } from "../api";
import { Permission, Resource } from "../api/representations"; import { Permission, Resource } from "../api/representations";
import { useEnvironment } from "../root/KeycloakContext"; import { useEnvironment } from "../root/KeycloakContext";

View file

@ -2,7 +2,7 @@ import { Button } from "@patternfly/react-core";
import { ExternalLinkSquareAltIcon } from "@patternfly/react-icons"; import { ExternalLinkSquareAltIcon } from "@patternfly/react-icons";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useHref } from "react-router-dom"; import { useHref } from "react-router-dom";
import { KeycloakMasthead, label } from "ui-shared"; import { KeycloakMasthead, label } from "@keycloak/keycloak-ui-shared";
import { environment } from "../environment"; import { environment } from "../environment";
import { joinPath } from "../utils/joinPath"; import { joinPath } from "../utils/joinPath";

View file

@ -9,7 +9,7 @@ import {
useRef, useRef,
useState, useState,
} from "react"; } from "react";
import { AlertProvider, Help } from "ui-shared"; import { AlertProvider, Help } from "@keycloak/keycloak-ui-shared";
import { Environment } from "../environment"; import { Environment } from "../environment";
import { ErrorPage } from "./ErrorPage"; import { ErrorPage } from "./ErrorPage";

View file

@ -18,6 +18,7 @@ export default defineConfig(({ mode }) => {
} }
const lib = env.LIB const lib = env.LIB
? { ? {
outDir: "lib",
lib: { lib: {
entry: path.resolve(__dirname, "src/index.ts"), entry: path.resolve(__dirname, "src/index.ts"),
formats: ["es"], formats: ["es"],
@ -37,7 +38,7 @@ export default defineConfig(({ mode }) => {
modulePreload: false, modulePreload: false,
cssMinify: "lightningcss", cssMinify: "lightningcss",
rollupOptions: { rollupOptions: {
external: external, external,
}, },
}, },
plugins, plugins,

View file

@ -86,7 +86,7 @@
"react-i18next": "^14.1.0", "react-i18next": "^14.1.0",
"react-router-dom": "^6.22.3", "react-router-dom": "^6.22.3",
"reactflow": "^11.11.1", "reactflow": "^11.11.1",
"ui-shared": "workspace:*", "@keycloak/keycloak-ui-shared": "workspace:*",
"use-react-router-breadcrumbs": "^4.0.1" "use-react-router-breadcrumbs": "^4.0.1"
}, },
"devDependencies": { "devDependencies": {

View file

@ -1,7 +1,7 @@
import { Page } from "@patternfly/react-core"; import { Page } from "@patternfly/react-core";
import { PropsWithChildren, Suspense } from "react"; import { PropsWithChildren, Suspense } from "react";
import { Outlet } from "react-router-dom"; import { Outlet } from "react-router-dom";
import { Help, mainPageContentId } from "ui-shared"; import { Help, mainPageContentId } from "@keycloak/keycloak-ui-shared";
import { Header } from "./PageHeader"; import { Header } from "./PageHeader";
import { PageNav } from "./PageNav"; import { PageNav } from "./PageNav";

View file

@ -18,7 +18,7 @@ import { BarsIcon, EllipsisVIcon, HelpIcon } from "@patternfly/react-icons";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link, useHref } from "react-router-dom"; import { Link, useHref } from "react-router-dom";
import { useHelp } from "ui-shared"; import { useHelp } from "@keycloak/keycloak-ui-shared";
import { HelpHeader } from "./components/help-enabler/HelpHeader"; import { HelpHeader } from "./components/help-enabler/HelpHeader";
import { useRealm } from "./context/realm-context/RealmContext"; import { useRealm } from "./context/realm-context/RealmContext";

View file

@ -9,7 +9,7 @@ import {
import { SelectVariant } from "@patternfly/react-core/deprecated"; import { SelectVariant } from "@patternfly/react-core/deprecated";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SelectControl } from "ui-shared"; import { SelectControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../admin-client"; import { adminClient } from "../admin-client";
import { useAlerts } from "../components/alert/Alerts"; import { useAlerts } from "../components/alert/Alerts";

View file

@ -10,7 +10,7 @@ import { PencilAltIcon } from "@patternfly/react-icons";
import { useEffect } from "react"; import { useEffect } from "react";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { TextAreaControl, TextControl } from "ui-shared"; import { TextAreaControl, TextControl } from "@keycloak/keycloak-ui-shared";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import type { ExpandableExecution } from "../execution-model"; import type { ExpandableExecution } from "../execution-model";

View file

@ -14,7 +14,7 @@ import { CogIcon, TrashIcon } from "@patternfly/react-icons";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { TextControl } from "ui-shared"; import { TextControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { DynamicComponents } from "../../components/dynamic/DynamicComponents"; import { DynamicComponents } from "../../components/dynamic/DynamicComponents";

View file

@ -9,7 +9,7 @@ import {
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SelectControl, TextControl } from "ui-shared"; import { SelectControl, TextControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../../admin-client"; import { adminClient } from "../../../admin-client";
import { useFetch } from "../../../utils/useFetch"; import { useFetch } from "../../../utils/useFetch";

View file

@ -9,7 +9,7 @@ import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link, useNavigate } from "react-router-dom"; import { Link, useNavigate } from "react-router-dom";
import { SelectControl } from "ui-shared"; import { SelectControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";

View file

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { TextControl } from "ui-shared"; import { TextControl } from "@keycloak/keycloak-ui-shared";
export const NameDescription = () => { export const NameDescription = () => {
const { t } = useTranslation(); const { t } = useTranslation();

View file

@ -9,7 +9,7 @@ import {
import { useEffect } from "react"; import { useEffect } from "react";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SelectControl, TextControl } from "ui-shared"; import { SelectControl, TextControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";

View file

@ -18,7 +18,7 @@ import {
NumberControl, NumberControl,
SelectControl, SelectControl,
SwitchControl, SwitchControl,
} from "ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";

View file

@ -12,7 +12,7 @@ import {
import { MinusCircleIcon } from "@patternfly/react-icons"; import { MinusCircleIcon } from "@patternfly/react-icons";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { FormErrorText, HelpItem } from "ui-shared"; import { FormErrorText, HelpItem } from "@keycloak/keycloak-ui-shared";
import "./policy-row.css"; import "./policy-row.css";

View file

@ -21,7 +21,7 @@ import {
SwitchControl, SwitchControl,
TextControl, TextControl,
useHelp, useHelp,
} from "ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";

View file

@ -14,7 +14,7 @@ import { DropdownItem } from "@patternfly/react-core/deprecated";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useHelp } from "ui-shared"; import { useHelp } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../admin-client"; import { adminClient } from "../admin-client";
import { useAlerts } from "../components/alert/Alerts"; import { useAlerts } from "../components/alert/Alerts";

View file

@ -14,7 +14,7 @@ import { useState } from "react";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link, useMatch, useNavigate } from "react-router-dom"; import { Link, useMatch, useNavigate } from "react-router-dom";
import { TextControl } from "ui-shared"; import { TextControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";

View file

@ -5,7 +5,11 @@ import { useEffect } from "react";
import { FormProvider, useForm, useWatch } from "react-hook-form"; import { FormProvider, useForm, useWatch } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { SelectControl, TextAreaControl, TextControl } from "ui-shared"; import {
SelectControl,
TextAreaControl,
TextControl,
} from "@keycloak/keycloak-ui-shared";
import { getProtocolName } from "../../clients/utils"; import { getProtocolName } from "../../clients/utils";
import { DefaultSwitchControl } from "../../components/SwitchControl"; import { DefaultSwitchControl } from "../../components/SwitchControl";

View file

@ -4,7 +4,7 @@ import { AlertVariant, PageSection, Text } from "@patternfly/react-core";
import type { TFunction } from "i18next"; import type { TFunction } from "i18next";
import { useFormContext } from "react-hook-form"; import { useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { ScrollForm } from "ui-shared"; import { ScrollForm } from "@keycloak/keycloak-ui-shared";
import type { AddAlertFunction } from "../components/alert/Alerts"; import type { AddAlertFunction } from "../components/alert/Alerts";
import { convertAttributeNameToForm, toUpperCase } from "../util"; import { convertAttributeNameToForm, toUpperCase } from "../util";
import type { FormFields, SaveOptions } from "./ClientDetails"; import type { FormFields, SaveOptions } from "./ClientDetails";

View file

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { TextControl, TextAreaControl } from "ui-shared"; import { TextControl, TextAreaControl } from "@keycloak/keycloak-ui-shared";
import { FormAccess } from "../components/form/FormAccess"; import { FormAccess } from "../components/form/FormAccess";
import { DefaultSwitchControl } from "../components/SwitchControl"; import { DefaultSwitchControl } from "../components/SwitchControl";

View file

@ -2,7 +2,7 @@ import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/
import { Form } from "@patternfly/react-core"; import { Form } from "@patternfly/react-core";
import { useFormContext } from "react-hook-form"; import { useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { ScrollForm } from "ui-shared"; import { ScrollForm } from "@keycloak/keycloak-ui-shared";
import { ClientDescription } from "./ClientDescription"; import { ClientDescription } from "./ClientDescription";
import { FormFields } from "./ClientDetails"; import { FormFields } from "./ClientDetails";
import { AccessSettings } from "./add/AccessSettings"; import { AccessSettings } from "./add/AccessSettings";

View file

@ -1,6 +1,6 @@
import { useFormContext } from "react-hook-form"; import { useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { TextControl } from "ui-shared"; import { TextControl } from "@keycloak/keycloak-ui-shared";
import { FixedButtonsGroup } from "../../components/form/FixedButtonGroup"; import { FixedButtonsGroup } from "../../components/form/FixedButtonGroup";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";

View file

@ -10,7 +10,7 @@ import {
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { DefaultSwitchControl } from "../../components/SwitchControl"; import { DefaultSwitchControl } from "../../components/SwitchControl";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { convertAttributeNameToForm } from "../../util"; import { convertAttributeNameToForm } from "../../util";

View file

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SelectControl } from "ui-shared"; import { SelectControl } from "@keycloak/keycloak-ui-shared";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { useLoginProviders } from "../../context/server-info/ServerInfoProvider"; import { useLoginProviders } from "../../context/server-info/ServerInfoProvider";
import { ClientDescription } from "../ClientDescription"; import { ClientDescription } from "../ClientDescription";

View file

@ -1,7 +1,7 @@
import { FormGroup } from "@patternfly/react-core"; import { FormGroup } from "@patternfly/react-core";
import { useFormContext } from "react-hook-form"; import { useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem, TextControl } from "ui-shared"; import { HelpItem, TextControl } from "@keycloak/keycloak-ui-shared";
import { MultiLineInput } from "../../components/multi-line-input/MultiLineInput"; import { MultiLineInput } from "../../components/multi-line-input/MultiLineInput";
import { convertAttributeNameToForm } from "../../util"; import { convertAttributeNameToForm } from "../../util";

View file

@ -1,6 +1,6 @@
import { useFormContext } from "react-hook-form"; import { useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SelectControl, TextAreaControl } from "ui-shared"; import { SelectControl, TextAreaControl } from "@keycloak/keycloak-ui-shared";
import { DefaultSwitchControl } from "../../components/SwitchControl"; import { DefaultSwitchControl } from "../../components/SwitchControl";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../../context/server-info/ServerInfoProvider";

View file

@ -1,7 +1,7 @@
import { FormGroup, Switch } from "@patternfly/react-core"; import { FormGroup, Switch } from "@patternfly/react-core";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem, TextControl } from "ui-shared"; import { HelpItem, TextControl } from "@keycloak/keycloak-ui-shared";
import { FixedButtonsGroup } from "../../components/form/FixedButtonGroup"; import { FixedButtonsGroup } from "../../components/form/FixedButtonGroup";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";

View file

@ -1,6 +1,6 @@
import { Path, PathValue } from "react-hook-form"; import { Path, PathValue } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SelectControl } from "ui-shared"; import { SelectControl } from "@keycloak/keycloak-ui-shared";
import { DefaultSwitchControl } from "../../components/SwitchControl"; import { DefaultSwitchControl } from "../../components/SwitchControl";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { convertAttributeNameToForm } from "../../util"; import { convertAttributeNameToForm } from "../../util";

View file

@ -1,6 +1,6 @@
import { useFormContext } from "react-hook-form"; import { useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SelectControl } from "ui-shared"; import { SelectControl } from "@keycloak/keycloak-ui-shared";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { convertAttributeNameToForm } from "../../util"; import { convertAttributeNameToForm } from "../../util";
import { FormFields } from "../ClientDetails"; import { FormFields } from "../ClientDetails";

View file

@ -7,7 +7,7 @@ import {
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { TextControl } from "ui-shared"; import { TextControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";

View file

@ -9,7 +9,7 @@ import { useState } from "react";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { DefaultSwitchControl } from "../../components/SwitchControl"; import { DefaultSwitchControl } from "../../components/SwitchControl";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { KeyValueInput } from "../../components/key-value-form/KeyValueInput"; import { KeyValueInput } from "../../components/key-value-form/KeyValueInput";

View file

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { TextControl } from "ui-shared"; import { TextControl } from "@keycloak/keycloak-ui-shared";
type ApplicationUrlsProps = { type ApplicationUrlsProps = {
isDisabled?: boolean; isDisabled?: boolean;

View file

@ -3,7 +3,7 @@ import { ActionGroup, Button } from "@patternfly/react-core";
import { sortBy } from "lodash-es"; import { sortBy } from "lodash-es";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SelectControl } from "ui-shared"; import { SelectControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { useFetch } from "../../utils/useFetch"; import { useFetch } from "../../utils/useFetch";

View file

@ -10,7 +10,7 @@ import {
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";

View file

@ -1,7 +1,7 @@
import { ProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation"; import { ProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
import { ActionGroup, Button, FormGroup } from "@patternfly/react-core"; import { ActionGroup, Button, FormGroup } from "@patternfly/react-core";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem, SelectControl } from "ui-shared"; import { HelpItem, SelectControl } from "@keycloak/keycloak-ui-shared";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { MultiLineInput } from "../../components/multi-line-input/MultiLineInput"; import { MultiLineInput } from "../../components/multi-line-input/MultiLineInput";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../../context/server-info/ServerInfoProvider";

View file

@ -2,7 +2,7 @@ import { ActionGroup, Button } from "@patternfly/react-core";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { TextControl } from "ui-shared"; import { TextControl } from "@keycloak/keycloak-ui-shared";
import { ApplicationUrls } from "./ApplicationUrls"; import { ApplicationUrls } from "./ApplicationUrls";
type FineGrainSamlEndpointConfigProps = { type FineGrainSamlEndpointConfigProps = {

View file

@ -3,7 +3,7 @@ import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { convertAttributeNameToForm } from "../../util"; import { convertAttributeNameToForm } from "../../util";
import { FormFields } from "../ClientDetails"; import { FormFields } from "../ClientDetails";

View file

@ -8,7 +8,7 @@ import { useState } from "react";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { import {
TimeSelector, TimeSelector,
Unit, Unit,

View file

@ -25,7 +25,11 @@ import {
import { useState } from "react"; import { useState } from "react";
import { Controller, FormProvider, useForm, useWatch } from "react-hook-form"; import { Controller, FormProvider, useForm, useWatch } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { FormErrorText, HelpItem, TextControl } from "ui-shared"; import {
FormErrorText,
HelpItem,
TextControl,
} from "@keycloak/keycloak-ui-shared";
import { ForbiddenSection } from "../../ForbiddenSection"; import { ForbiddenSection } from "../../ForbiddenSection";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";

View file

@ -8,7 +8,7 @@ import {
import { saveAs } from "file-saver"; import { saveAs } from "file-saver";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { TextAreaControl } from "ui-shared"; import { TextAreaControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";

View file

@ -2,7 +2,7 @@ import { FormGroup, Radio } from "@patternfly/react-core";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
const DECISION_STRATEGY = ["UNANIMOUS", "AFFIRMATIVE", "CONSENSUS"] as const; const DECISION_STRATEGY = ["UNANIMOUS", "AFFIRMATIVE", "CONSENSUS"] as const;

View file

@ -14,7 +14,7 @@ import {
import type ResourceServerRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation"; import type ResourceServerRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation";
import { JsonFileUpload } from "../../components/json-file-upload/JsonFileUpload"; import { JsonFileUpload } from "../../components/json-file-upload/JsonFileUpload";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
type ImportDialogProps = { type ImportDialogProps = {
onConfirm: (value: ResourceServerRepresentation) => void; onConfirm: (value: ResourceServerRepresentation) => void;

View file

@ -20,7 +20,7 @@ import {
HelpItem, HelpItem,
TextAreaControl, TextAreaControl,
TextControl, TextControl,
} from "ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";

View file

@ -15,7 +15,7 @@ import { useState } from "react";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link, useNavigate } from "react-router-dom"; import { Link, useNavigate } from "react-router-dom";
import { HelpItem, TextControl } from "ui-shared"; import { HelpItem, TextControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";

View file

@ -11,7 +11,7 @@ import { useState } from "react";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link, useNavigate } from "react-router-dom"; import { Link, useNavigate } from "react-router-dom";
import { TextControl } from "ui-shared"; import { TextControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";

View file

@ -8,7 +8,7 @@ import {
import { useState } from "react"; import { useState } from "react";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useFetch } from "../../utils/useFetch"; import { useFetch } from "../../utils/useFetch";

View file

@ -4,7 +4,7 @@ import { Dropdown, DropdownToggle } from "@patternfly/react-core/deprecated";
import { useEffect } from "react"; import { useEffect } from "react";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SelectControl, TextControl } from "ui-shared"; import { SelectControl, TextControl } from "@keycloak/keycloak-ui-shared";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import "./search-dropdown.css"; import "./search-dropdown.css";

View file

@ -10,7 +10,7 @@ import {
import { useState } from "react"; import { useState } from "react";
import { Controller, FormProvider, useForm } from "react-hook-form"; import { Controller, FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { DefaultSwitchControl } from "../../components/SwitchControl"; import { DefaultSwitchControl } from "../../components/SwitchControl";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";

View file

@ -1,7 +1,7 @@
import { FormGroup } from "@patternfly/react-core"; import { FormGroup } from "@patternfly/react-core";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { useParams } from "../../../utils/useParams"; import { useParams } from "../../../utils/useParams";
import type { PolicyDetailsParams } from "../../routes/PolicyDetails"; import type { PolicyDetailsParams } from "../../routes/PolicyDetails";
import { DecisionStrategySelect } from "../DecisionStrategySelect"; import { DecisionStrategySelect } from "../DecisionStrategySelect";

View file

@ -5,7 +5,7 @@ import { Table, Tbody, Td, Th, Thead, Tr } from "@patternfly/react-table";
import { useState } from "react"; import { useState } from "react";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { FormErrorText, HelpItem } from "ui-shared"; import { FormErrorText, HelpItem } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../../admin-client"; import { adminClient } from "../../../admin-client";
import { useFetch } from "../../../utils/useFetch"; import { useFetch } from "../../../utils/useFetch";

View file

@ -5,7 +5,11 @@ import { Table, Tbody, Td, Th, Thead, Tr } from "@patternfly/react-table";
import { useState } from "react"; import { useState } from "react";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { FormErrorText, HelpItem, TextControl } from "ui-shared"; import {
FormErrorText,
HelpItem,
TextControl,
} from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../../admin-client"; import { adminClient } from "../../../admin-client";
import { GroupPickerDialog } from "../../../components/group/GroupPickerDialog"; import { GroupPickerDialog } from "../../../components/group/GroupPickerDialog";

View file

@ -3,7 +3,7 @@ import { Controller, useFormContext } from "react-hook-form";
import { FormGroup } from "@patternfly/react-core"; import { FormGroup } from "@patternfly/react-core";
import { CodeEditor, Language } from "@patternfly/react-code-editor"; import { CodeEditor, Language } from "@patternfly/react-code-editor";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
export const JavaScript = () => { export const JavaScript = () => {
const { t } = useTranslation(); const { t } = useTranslation();

View file

@ -2,7 +2,7 @@ import { useTranslation } from "react-i18next";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { FormGroup, Radio } from "@patternfly/react-core"; import { FormGroup, Radio } from "@patternfly/react-core";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
const LOGIC_TYPES = ["POSITIVE", "NEGATIVE"] as const; const LOGIC_TYPES = ["POSITIVE", "NEGATIVE"] as const;

View file

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { TextAreaControl, TextControl } from "ui-shared"; import { TextAreaControl, TextControl } from "@keycloak/keycloak-ui-shared";
type NameDescriptionProps = { type NameDescriptionProps = {
isDisabled: boolean; isDisabled: boolean;

View file

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SwitchControl, TextControl } from "ui-shared"; import { SwitchControl, TextControl } from "@keycloak/keycloak-ui-shared";
export const Regex = () => { export const Regex = () => {
const { t } = useTranslation(); const { t } = useTranslation();

View file

@ -4,7 +4,7 @@ import { Table, Tbody, Td, Th, Thead, Tr } from "@patternfly/react-table";
import { useState } from "react"; import { useState } from "react";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { FormErrorText, HelpItem } from "ui-shared"; import { FormErrorText, HelpItem } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../../admin-client"; import { adminClient } from "../../../admin-client";
import { DefaultSwitchControl } from "../../../components/SwitchControl"; import { DefaultSwitchControl } from "../../../components/SwitchControl";

View file

@ -10,9 +10,9 @@ import {
TimePicker, TimePicker,
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import { useState } from "react"; import { useState } from "react";
import { Controller, useFormContext } from "react-hook-form"; import { FormErrorText, HelpItem } from "@keycloak/keycloak-ui-shared";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { FormErrorText, HelpItem } from "ui-shared"; import { Controller, useFormContext } from "react-hook-form";
const DATE_TIME_FORMAT = /(\d\d\d\d-\d\d-\d\d)? (\d\d?):(\d\d?)/; const DATE_TIME_FORMAT = /(\d\d\d\d-\d\d-\d\d)? (\d\d?):(\d\d?)/;
const padDateSegment = (value: number) => value.toString().padStart(2, "0"); const padDateSegment = (value: number) => value.toString().padStart(2, "0");

View file

@ -11,7 +11,7 @@ import {
import { useState } from "react"; import { useState } from "react";
import { useFormContext } from "react-hook-form"; import { useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { PasswordInput } from "ui-shared"; import { PasswordInput } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";

View file

@ -18,7 +18,7 @@ import {
import { useState } from "react"; import { useState } from "react";
import { useFormContext, useWatch } from "react-hook-form"; import { useFormContext, useWatch } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem, SelectControl } from "ui-shared"; import { HelpItem, SelectControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";

View file

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SelectControl } from "ui-shared"; import { SelectControl } from "@keycloak/keycloak-ui-shared";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
import { convertAttributeNameToForm } from "../../util"; import { convertAttributeNameToForm } from "../../util";
import { FormFields } from "../ClientDetails"; import { FormFields } from "../ClientDetails";

View file

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { TextControl } from "ui-shared"; import { TextControl } from "@keycloak/keycloak-ui-shared";
import { DefaultSwitchControl } from "../../components/SwitchControl"; import { DefaultSwitchControl } from "../../components/SwitchControl";
import { convertAttributeNameToForm } from "../../util"; import { convertAttributeNameToForm } from "../../util";
import { FormFields } from "../ClientDetails"; import { FormFields } from "../ClientDetails";

View file

@ -11,7 +11,7 @@ import { useState } from "react";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link, useNavigate } from "react-router-dom"; import { Link, useNavigate } from "react-router-dom";
import { TextControl } from "ui-shared"; import { TextControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";

View file

@ -9,7 +9,7 @@ import { useState } from "react";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link, useNavigate } from "react-router-dom"; import { Link, useNavigate } from "react-router-dom";
import { NumberControl } from "ui-shared"; import { NumberControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";

View file

@ -2,7 +2,7 @@ import type CertificateRepresentation from "@keycloak/keycloak-admin-client/lib/
import { FormGroup, TextArea } from "@patternfly/react-core"; import { FormGroup, TextArea } from "@patternfly/react-core";
import { useId } from "react"; import { useId } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
type CertificateProps = Omit<CertificateDisplayProps, "id"> & { type CertificateProps = Omit<CertificateDisplayProps, "id"> & {
plain?: boolean; plain?: boolean;

View file

@ -18,7 +18,7 @@ import {
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import type KeyStoreConfig from "@keycloak/keycloak-admin-client/lib/defs/keystoreConfig"; import type KeyStoreConfig from "@keycloak/keycloak-admin-client/lib/defs/keystoreConfig";
import { HelpItem, SelectControl } from "ui-shared"; import { HelpItem, SelectControl } from "@keycloak/keycloak-ui-shared";
import { StoreSettings } from "./StoreSettings"; import { StoreSettings } from "./StoreSettings";
import { FileUpload } from "../../components/json-file-upload/patternfly/FileUpload"; import { FileUpload } from "../../components/json-file-upload/patternfly/FileUpload";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../../context/server-info/ServerInfoProvider";

View file

@ -10,7 +10,7 @@ import {
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import { Controller, FormProvider, useForm, useWatch } from "react-hook-form"; import { Controller, FormProvider, useForm, useWatch } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SelectControl } from "ui-shared"; import { SelectControl } from "@keycloak/keycloak-ui-shared";
import { FileUpload } from "../../components/json-file-upload/patternfly/FileUpload"; import { FileUpload } from "../../components/json-file-upload/patternfly/FileUpload";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
import { StoreSettings } from "./StoreSettings"; import { StoreSettings } from "./StoreSettings";

View file

@ -16,7 +16,7 @@ import { saveAs } from "file-saver";
import { useState } from "react"; import { useState } from "react";
import { useFormContext, useWatch } from "react-hook-form"; import { useFormContext, useWatch } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { TextControl } from "ui-shared"; import { TextControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { DefaultSwitchControl } from "../../components/SwitchControl"; import { DefaultSwitchControl } from "../../components/SwitchControl";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";

View file

@ -16,7 +16,7 @@ import { saveAs } from "file-saver";
import { Fragment, useState } from "react"; import { Fragment, useState } from "react";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { FormPanel, HelpItem } from "ui-shared"; import { FormPanel, HelpItem } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";

View file

@ -21,7 +21,7 @@ import { saveAs } from "file-saver";
import { useState } from "react"; import { useState } from "react";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";

View file

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { PasswordControl, TextControl } from "ui-shared"; import { PasswordControl, TextControl } from "@keycloak/keycloak-ui-shared";
export const StoreSettings = ({ export const StoreSettings = ({
hidePassword = false, hidePassword = false,

View file

@ -1,6 +1,6 @@
import { Tab, TabTitleText } from "@patternfly/react-core"; import { Tab, TabTitleText } from "@patternfly/react-core";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { import {
RoutableTabs, RoutableTabs,
useRoutableTab, useRoutableTab,

View file

@ -11,7 +11,7 @@ import { useState } from "react";
import { FormProvider, useForm, useWatch } from "react-hook-form"; import { FormProvider, useForm, useWatch } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link, useNavigate } from "react-router-dom"; import { Link, useNavigate } from "react-router-dom";
import { TextControl } from "ui-shared"; import { TextControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";

View file

@ -11,7 +11,7 @@ import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useAlerts } from "../../components/alert/Alerts"; import { useAlerts } from "../../components/alert/Alerts";

View file

@ -27,7 +27,7 @@ import { QuestionCircleIcon } from "@patternfly/react-icons";
import { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem, useHelp } from "ui-shared"; import { HelpItem, useHelp } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { KeycloakDataTable } from "../../components/table-toolbar/KeycloakDataTable"; import { KeycloakDataTable } from "../../components/table-toolbar/KeycloakDataTable";

View file

@ -1,7 +1,7 @@
import { FieldPath, FieldValues } from "react-hook-form"; import { FieldPath, FieldValues } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import type { SwitchControlProps } from "ui-shared"; import type { SwitchControlProps } from "@keycloak/keycloak-ui-shared";
import { SwitchControl } from "ui-shared"; import { SwitchControl } from "@keycloak/keycloak-ui-shared";
export type DefaultSwitchControlProps< export type DefaultSwitchControlProps<
T extends FieldValues, T extends FieldValues,

View file

@ -4,7 +4,10 @@ import { PropsWithChildren, useCallback, useMemo, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { generateId } from "../../util"; import { generateId } from "../../util";
import { createNamedContext, useRequiredContext } from "ui-shared"; import {
createNamedContext,
useRequiredContext,
} from "@keycloak/keycloak-ui-shared";
import useSetTimeout from "../../utils/useSetTimeout"; import useSetTimeout from "../../utils/useSetTimeout";
import { AlertPanel } from "./AlertPanel"; import { AlertPanel } from "./AlertPanel";

View file

@ -3,7 +3,7 @@ import type { ClientQuery } from "@keycloak/keycloak-admin-client/lib/resources/
import { SelectProps, SelectVariant } from "@patternfly/react-core/deprecated"; import { SelectProps, SelectVariant } from "@patternfly/react-core/deprecated";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SelectControl } from "ui-shared"; import { SelectControl } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useFetch } from "../../utils/useFetch"; import { useFetch } from "../../utils/useFetch";

View file

@ -15,7 +15,7 @@ import {
import { saveAs } from "file-saver"; import { saveAs } from "file-saver";
import { useEffect, useMemo, useState } from "react"; import { useEffect, useMemo, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem, useHelp } from "ui-shared"; import { HelpItem, useHelp } from "@keycloak/keycloak-ui-shared";
import { adminClient } from "../../admin-client"; import { adminClient } from "../../admin-client";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";

View file

@ -2,7 +2,7 @@ import { FormGroup, Switch } from "@patternfly/react-core";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import type { ComponentProps } from "./components"; import type { ComponentProps } from "./components";
import { convertToName } from "./DynamicComponents"; import { convertToName } from "./DynamicComponents";

View file

@ -3,7 +3,7 @@ import { useState } from "react";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { FileUpload } from "../json-file-upload/patternfly/FileUpload"; import { FileUpload } from "../json-file-upload/patternfly/FileUpload";
import type { ComponentProps } from "./components"; import type { ComponentProps } from "./components";
import { convertToName } from "./DynamicComponents"; import { convertToName } from "./DynamicComponents";

View file

@ -12,7 +12,7 @@ import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { GroupPickerDialog } from "../group/GroupPickerDialog"; import { GroupPickerDialog } from "../group/GroupPickerDialog";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import type { ComponentProps } from "./components"; import type { ComponentProps } from "./components";
import { convertToName } from "./DynamicComponents"; import { convertToName } from "./DynamicComponents";

View file

@ -8,7 +8,7 @@ import { useState } from "react";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import type { ComponentProps } from "./components"; import type { ComponentProps } from "./components";
import { convertToName } from "./DynamicComponents"; import { convertToName } from "./DynamicComponents";

View file

@ -16,7 +16,7 @@ import { useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { generateId } from "../../util"; import { generateId } from "../../util";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { KeyValueType } from "../key-value-form/key-value-convert"; import { KeyValueType } from "../key-value-form/key-value-convert";
import type { ComponentProps } from "./components"; import type { ComponentProps } from "./components";
import { convertToName } from "./DynamicComponents"; import { convertToName } from "./DynamicComponents";

View file

@ -8,7 +8,7 @@ import { useState } from "react";
import { Controller, useFormContext } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import type { ComponentProps } from "./components"; import type { ComponentProps } from "./components";
import { convertToName } from "./DynamicComponents"; import { convertToName } from "./DynamicComponents";

View file

@ -2,7 +2,7 @@ import { useTranslation } from "react-i18next";
import { FormGroup } from "@patternfly/react-core"; import { FormGroup } from "@patternfly/react-core";
import type { ComponentProps } from "./components"; import type { ComponentProps } from "./components";
import { HelpItem } from "ui-shared"; import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { MultiLineInput } from "../multi-line-input/MultiLineInput"; import { MultiLineInput } from "../multi-line-input/MultiLineInput";
import { convertToName } from "./DynamicComponents"; import { convertToName } from "./DynamicComponents";

View file

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { PasswordControl } from "ui-shared"; import { PasswordControl } from "@keycloak/keycloak-ui-shared";
import { convertToName } from "./DynamicComponents"; import { convertToName } from "./DynamicComponents";
import type { ComponentProps } from "./components"; import type { ComponentProps } from "./components";

Some files were not shown because too many files have changed in this diff Show more