moved datatable to ui-shared so it can be used in account (#32122)

* moved datatable to ui-shared so it can be used in account

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

* merged changes

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

---------

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2024-08-21 13:07:38 +02:00 committed by GitHub
parent c1f6d5ca64
commit 957f97d9cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
147 changed files with 466 additions and 454 deletions

View file

@ -12,11 +12,11 @@ import { PageNav } from "./PageNav";
import { AdminClientContext, initAdminClient } from "./admin-client"; import { AdminClientContext, initAdminClient } from "./admin-client";
import { PageBreadCrumbs } from "./components/bread-crumb/PageBreadCrumbs"; import { PageBreadCrumbs } from "./components/bread-crumb/PageBreadCrumbs";
import { ErrorRenderer } from "./components/error/ErrorRenderer"; import { ErrorRenderer } from "./components/error/ErrorRenderer";
import { KeycloakSpinner } from "./components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { import {
ErrorBoundaryFallback, ErrorBoundaryFallback,
ErrorBoundaryProvider, ErrorBoundaryProvider,
} from "./context/ErrorBoundary"; } from "@keycloak/keycloak-ui-shared";
import { RecentRealmsProvider } from "./context/RecentRealms"; import { RecentRealmsProvider } from "./context/RecentRealms";
import { AccessContextProvider } from "./context/access/Access"; import { AccessContextProvider } from "./context/access/Access";
import { RealmContextProvider } from "./context/realm-context/RealmContext"; import { RealmContextProvider } from "./context/realm-context/RealmContext";

View file

@ -19,13 +19,13 @@ import { Link } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { import {
RoutableTabs, RoutableTabs,
useRoutableTab, useRoutableTab,
} from "../components/routable-tabs/RoutableTabs"; } from "../components/routable-tabs/RoutableTabs";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable"; import { KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
import { ViewHeader } from "../components/view-header/ViewHeader"; import { ViewHeader } from "../components/view-header/ViewHeader";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import helpUrls from "../help-urls"; import helpUrls from "../help-urls";

View file

@ -10,7 +10,7 @@ import {
import type AuthenticationFlowRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation"; import type AuthenticationFlowRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation";
import type { AuthenticationProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation"; import type { AuthenticationProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { AddStepModal } from "./components/modals/AddStepModal"; import { AddStepModal } from "./components/modals/AddStepModal";
import { AddSubFlowModal, Flow } from "./components/modals/AddSubFlowModal"; import { AddSubFlowModal, Flow } from "./components/modals/AddSubFlowModal";

View file

@ -1,6 +1,7 @@
import AuthenticationFlowRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation"; import AuthenticationFlowRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation";
import type { AuthenticationProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation"; import type { AuthenticationProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation";
import AuthenticatorConfigRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation"; import AuthenticatorConfigRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation";
import { useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
AlertVariant, AlertVariant,
Button, Button,
@ -22,11 +23,9 @@ import { useState } from "react";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { useNavigate, useParams } from "react-router-dom"; import { useNavigate, useParams } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
import { ViewHeader } from "../components/view-header/ViewHeader"; import { ViewHeader } from "../components/view-header/ViewHeader";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { useFetch } from "../utils/useFetch";
import useToggle from "../utils/useToggle"; import useToggle from "../utils/useToggle";
import { BindFlowDialog } from "./BindFlowDialog"; import { BindFlowDialog } from "./BindFlowDialog";
import { BuildInLabel } from "./BuildInLabel"; import { BuildInLabel } from "./BuildInLabel";

View file

@ -1,19 +1,18 @@
import { fetchWithError } from "@keycloak/keycloak-admin-client";
import type RequiredActionProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/requiredActionProviderRepresentation"; import type RequiredActionProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/requiredActionProviderRepresentation";
import type RequiredActionProviderSimpleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/requiredActionProviderSimpleRepresentation"; import type RequiredActionProviderSimpleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/requiredActionProviderSimpleRepresentation";
import { useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { AlertVariant, Button, Switch } from "@patternfly/react-core"; import { AlertVariant, Button, Switch } from "@patternfly/react-core";
import { CogIcon } from "@patternfly/react-icons"; import { CogIcon } from "@patternfly/react-icons";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner"; import { useRealm } from "../context/realm-context/RealmContext";
import { addTrailingSlash, toKey } from "../util"; import { addTrailingSlash, toKey } from "../util";
import { useFetch } from "../utils/useFetch"; import { getAuthorizationHeaders } from "../utils/getAuthorizationHeaders";
import { DraggableTable } from "./components/DraggableTable"; import { DraggableTable } from "./components/DraggableTable";
import { RequiredActionConfigModal } from "./components/RequiredActionConfigModal"; import { RequiredActionConfigModal } from "./components/RequiredActionConfigModal";
import { fetchWithError } from "@keycloak/keycloak-admin-client";
import { getAuthorizationHeaders } from "../utils/getAuthorizationHeaders";
import { useRealm } from "../context/realm-context/RealmContext";
type DataType = RequiredActionProviderRepresentation & type DataType = RequiredActionProviderRepresentation &
RequiredActionProviderSimpleRepresentation & { RequiredActionProviderSimpleRepresentation & {

View file

@ -1,11 +1,16 @@
import type { AuthenticationProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation"; import type { AuthenticationProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation";
import { DropdownList, Tooltip } from "@patternfly/react-core"; import { useFetch } from "@keycloak/keycloak-ui-shared";
import { Dropdown, DropdownItem, MenuToggle } from "@patternfly/react-core"; import {
Dropdown,
DropdownItem,
DropdownList,
MenuToggle,
Tooltip,
} from "@patternfly/react-core";
import { PlusIcon } from "@patternfly/react-icons"; import { PlusIcon } from "@patternfly/react-icons";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useFetch } from "../../utils/useFetch";
import type { ExpandableExecution } from "../execution-model"; import type { ExpandableExecution } from "../execution-model";
import { AddStepModal, FlowType } from "./modals/AddStepModal"; import { AddStepModal, FlowType } from "./modals/AddStepModal";
import { AddSubFlowModal, Flow } from "./modals/AddSubFlowModal"; import { AddSubFlowModal, Flow } from "./modals/AddSubFlowModal";

View file

@ -1,5 +1,6 @@
import type AuthenticatorConfigInfoRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigInfoRepresentation"; import type AuthenticatorConfigInfoRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigInfoRepresentation";
import type AuthenticatorConfigRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation"; import type AuthenticatorConfigRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation";
import { TextControl, useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
AlertVariant, AlertVariant,
@ -14,12 +15,9 @@ 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { DynamicComponents } from "../../components/dynamic/DynamicComponents"; import { DynamicComponents } from "../../components/dynamic/DynamicComponents";
import { convertFormValuesToObject, convertToFormValues } from "../../util"; import { convertFormValuesToObject, convertToFormValues } from "../../util";
import { useFetch } from "../../utils/useFetch";
import type { ExpandableExecution } from "../execution-model"; import type { ExpandableExecution } from "../execution-model";
type ExecutionConfigModalForm = { type ExecutionConfigModalForm = {

View file

@ -1,6 +1,7 @@
import RequiredActionConfigInfoRepresentation from "@keycloak/keycloak-admin-client/lib/defs/requiredActionConfigInfoRepresentation"; import RequiredActionConfigInfoRepresentation from "@keycloak/keycloak-admin-client/lib/defs/requiredActionConfigInfoRepresentation";
import RequiredActionConfigRepresentation from "@keycloak/keycloak-admin-client/lib/defs/requiredActionConfigRepresentation"; import RequiredActionConfigRepresentation from "@keycloak/keycloak-admin-client/lib/defs/requiredActionConfigRepresentation";
import type RequiredActionProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/requiredActionProviderRepresentation"; import type RequiredActionProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/requiredActionProviderRepresentation";
import { useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
AlertVariant, AlertVariant,
@ -15,10 +16,8 @@ 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 { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { DynamicComponents } from "../../components/dynamic/DynamicComponents"; import { DynamicComponents } from "../../components/dynamic/DynamicComponents";
import { convertFormValuesToObject, convertToFormValues } from "../../util"; import { convertFormValuesToObject, convertToFormValues } from "../../util";
import { useFetch } from "../../utils/useFetch";
type RequiredActionConfigModalForm = { type RequiredActionConfigModalForm = {
// alias: string; // alias: string;

View file

@ -11,7 +11,7 @@ import { CheckCircleIcon } from "@patternfly/react-icons";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { fetchUsedBy } from "../../components/role-mapping/resource"; import { fetchUsedBy } from "../../components/role-mapping/resource";
import { KeycloakDataTable } from "../../components/table-toolbar/KeycloakDataTable"; import { KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import { AuthenticationType, REALM_FLOWS } from "../AuthenticationSection"; import { AuthenticationType, REALM_FLOWS } from "../AuthenticationSection";

View file

@ -1,4 +1,5 @@
import type { AuthenticationProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation"; import type { AuthenticationProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation";
import { PaginatingTableToolbar, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
Button, Button,
ButtonVariant, ButtonVariant,
@ -10,11 +11,9 @@ import {
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { PaginatingTableToolbar } from "../../../components/table-toolbar/PaginatingTableToolbar"; import { useAdminClient } from "../../../admin-client";
import { useFetch } from "../../../utils/useFetch";
import useLocaleSort, { mapByKey } from "../../../utils/useLocaleSort"; import useLocaleSort, { mapByKey } from "../../../utils/useLocaleSort";
import { providerConditionFilter } from "../../FlowDetails"; import { providerConditionFilter } from "../../FlowDetails";
import { useAdminClient } from "../../../admin-client";
type AuthenticationProviderListProps = { type AuthenticationProviderListProps = {
list?: AuthenticationProviderRepresentation[]; list?: AuthenticationProviderRepresentation[];

View file

@ -1,4 +1,9 @@
import type { AuthenticationProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation"; import type { AuthenticationProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation";
import {
SelectControl,
TextControl,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
Button, Button,
ButtonVariant, ButtonVariant,
@ -9,9 +14,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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../../admin-client"; import { useAdminClient } from "../../../admin-client";
import { useFetch } from "../../../utils/useFetch";
type AddSubFlowProps = { type AddSubFlowProps = {
name: string; name: string;

View file

@ -1,11 +1,11 @@
import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation"; import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import { useFetch } from "@keycloak/keycloak-ui-shared";
import { Tab, Tabs, TabTitleText } from "@patternfly/react-core"; import { Tab, Tabs, TabTitleText } from "@patternfly/react-core";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useFetch } from "../../utils/useFetch";
import { CibaPolicy } from "./CibaPolicy"; import { CibaPolicy } from "./CibaPolicy";
import { OtpPolicy } from "./OtpPolicy"; import { OtpPolicy } from "./OtpPolicy";
import { PasswordPolicy } from "./PasswordPolicy"; import { PasswordPolicy } from "./PasswordPolicy";

View file

@ -28,10 +28,7 @@ import {
removeScope, removeScope,
} from "../components/client-scope/ClientScopeTypes"; } from "../components/client-scope/ClientScopeTypes";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
import { import { Action, KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
Action,
KeycloakDataTable,
} from "../components/table-toolbar/KeycloakDataTable";
import { ViewHeader } from "../components/view-header/ViewHeader"; import { ViewHeader } from "../components/view-header/ViewHeader";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import helpUrls from "../help-urls"; import helpUrls from "../help-urls";

View file

@ -2,6 +2,7 @@ import ClientScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/
import type ProtocolMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/protocolMapperRepresentation"; import type ProtocolMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/protocolMapperRepresentation";
import type { RoleMappingPayload } from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation"; import type { RoleMappingPayload } from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation"; import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
import { useAlerts, useFetch, useHelp } from "@keycloak/keycloak-ui-shared";
import { import {
Alert, Alert,
AlertVariant, AlertVariant,
@ -14,9 +15,7 @@ import {
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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { import {
AllClientScopes, AllClientScopes,
ClientScope, ClientScope,
@ -24,7 +23,7 @@ import {
changeScope, changeScope,
} from "../components/client-scope/ClientScopeTypes"; } from "../components/client-scope/ClientScopeTypes";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { RoleMapping, Row } from "../components/role-mapping/RoleMapping"; import { RoleMapping, Row } from "../components/role-mapping/RoleMapping";
import { import {
RoutableTabs, RoutableTabs,
@ -33,7 +32,6 @@ import {
import { ViewHeader } from "../components/view-header/ViewHeader"; import { ViewHeader } from "../components/view-header/ViewHeader";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { convertFormValuesToObject } from "../util"; import { convertFormValuesToObject } from "../util";
import { useFetch } from "../utils/useFetch";
import { useParams } from "../utils/useParams"; import { useParams } from "../utils/useParams";
import { MapperList } from "./details/MapperList"; import { MapperList } from "./details/MapperList";
import { ScopeForm } from "./details/ScopeForm"; import { ScopeForm } from "./details/ScopeForm";

View file

@ -19,8 +19,8 @@ import type ProtocolMapperRepresentation from "@keycloak/keycloak-admin-client/l
import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation"; import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { KeycloakDataTable } from "../../components/table-toolbar/KeycloakDataTable"; import { KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
import useLocaleSort, { mapByKey } from "../../utils/useLocaleSort"; import useLocaleSort, { mapByKey } from "../../utils/useLocaleSort";
type Row = { type Row = {

View file

@ -9,12 +9,9 @@ import type ProtocolMapperRepresentation from "@keycloak/keycloak-admin-client/l
import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation"; import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { AddMapperDialog } from "../add/MapperDialog"; import { AddMapperDialog } from "../add/MapperDialog";
import { import { Action, KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
Action,
KeycloakDataTable,
} from "../../components/table-toolbar/KeycloakDataTable";
import { import {
Dropdown, Dropdown,
DropdownItem, DropdownItem,

View file

@ -1,5 +1,6 @@
import type ProtocolMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/protocolMapperRepresentation"; import type ProtocolMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/protocolMapperRepresentation";
import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation"; import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
import { TextControl, useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
AlertVariant, AlertVariant,
@ -14,10 +15,8 @@ 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { toDedicatedScope } from "../../clients/routes/DedicatedScopeDetails"; import { toDedicatedScope } from "../../clients/routes/DedicatedScopeDetails";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { DynamicComponents } from "../../components/dynamic/DynamicComponents"; import { DynamicComponents } from "../../components/dynamic/DynamicComponents";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
@ -25,7 +24,6 @@ import { ViewHeader } from "../../components/view-header/ViewHeader";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
import { convertFormValuesToObject, convertToFormValues } from "../../util"; import { convertFormValuesToObject, convertToFormValues } from "../../util";
import { useFetch } from "../../utils/useFetch";
import { useParams } from "../../utils/useParams"; import { useParams } from "../../utils/useParams";
import { toClientScope } from "../routes/ClientScope"; import { toClientScope } from "../routes/ClientScope";
import { MapperParams, MapperRoute } from "../routes/Mapper"; import { MapperParams, MapperRoute } from "../routes/Mapper";

View file

@ -1,4 +1,5 @@
import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation"; import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import { useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
AlertVariant, AlertVariant,
ButtonVariant, ButtonVariant,
@ -17,14 +18,13 @@ import { Controller, FormProvider, useForm, useWatch } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { import {
ConfirmDialogModal, ConfirmDialogModal,
useConfirmDialog, useConfirmDialog,
} from "../components/confirm-dialog/ConfirmDialog"; } from "../components/confirm-dialog/ConfirmDialog";
import { DownloadDialog } from "../components/download-dialog/DownloadDialog"; import { DownloadDialog } from "../components/download-dialog/DownloadDialog";
import type { KeyValueType } from "../components/key-value-form/key-value-convert"; import type { KeyValueType } from "../components/key-value-form/key-value-convert";
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { PermissionsTab } from "../components/permission-tab/PermissionTab"; import { PermissionsTab } from "../components/permission-tab/PermissionTab";
import { RolesList } from "../components/roles-list/RolesList"; import { RolesList } from "../components/roles-list/RolesList";
import { import {
@ -43,7 +43,6 @@ import {
convertToFormValues, convertToFormValues,
exportClient, exportClient,
} from "../util"; } from "../util";
import { useFetch } from "../utils/useFetch";
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled"; import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
import { useParams } from "../utils/useParams"; import { useParams } from "../utils/useParams";
import useToggle from "../utils/useToggle"; import useToggle from "../utils/useToggle";

View file

@ -3,7 +3,7 @@ import type UserSessionRepresentation from "@keycloak/keycloak-admin-client/lib/
import { PageSection } from "@patternfly/react-core"; import { PageSection } from "@patternfly/react-core";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import type { LoaderFunction } from "../components/table-toolbar/KeycloakDataTable"; import type { LoaderFunction } from "@keycloak/keycloak-ui-shared";
import SessionsTable from "../sessions/SessionsTable"; import SessionsTable from "../sessions/SessionsTable";
type ClientSessionsProps = { type ClientSessionsProps = {

View file

@ -24,10 +24,7 @@ import {
RoutableTabs, RoutableTabs,
useRoutableTab, useRoutableTab,
} from "../components/routable-tabs/RoutableTabs"; } from "../components/routable-tabs/RoutableTabs";
import { import { Action, KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
Action,
KeycloakDataTable,
} from "../components/table-toolbar/KeycloakDataTable";
import { ViewHeader } from "../components/view-header/ViewHeader"; import { ViewHeader } from "../components/view-header/ViewHeader";
import { useAccess } from "../context/access/Access"; import { useAccess } from "../context/access/Access";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";

View file

@ -1,12 +1,11 @@
import AuthenticationFlowRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation"; import AuthenticationFlowRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation";
import { SelectControl, useFetch } from "@keycloak/keycloak-ui-shared";
import { ActionGroup, Button } from "@patternfly/react-core"; 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { useFetch } from "../../utils/useFetch";
type AuthenticationOverridesProps = { type AuthenticationOverridesProps = {
save: () => void; save: () => void;

View file

@ -15,11 +15,8 @@ import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared"; import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { import { Action, KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
Action,
KeycloakDataTable,
} from "../../components/table-toolbar/KeycloakDataTable";
import { TimeSelectorForm } from "../../components/time-selector/TimeSelectorForm"; import { TimeSelectorForm } from "../../components/time-selector/TimeSelectorForm";
import useFormatDate, { FORMAT_DATE_AND_TIME } from "../../utils/useFormatDate"; import useFormatDate, { FORMAT_DATE_AND_TIME } from "../../utils/useFormatDate";
import { AddHostDialog } from ".././advanced/AddHostDialog"; import { AddHostDialog } from ".././advanced/AddHostDialog";

View file

@ -9,6 +9,8 @@ import {
HelpItem, HelpItem,
SelectControl, SelectControl,
TextControl, TextControl,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
@ -27,7 +29,6 @@ import { FormProvider, useForm, useWatch } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { ForbiddenSection } from "../../ForbiddenSection"; import { ForbiddenSection } from "../../ForbiddenSection";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { ClientSelect } from "../../components/client/ClientSelect"; import { ClientSelect } from "../../components/client/ClientSelect";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { import {
@ -37,7 +38,6 @@ import {
import { UserSelect } from "../../components/users/UserSelect"; import { UserSelect } from "../../components/users/UserSelect";
import { useAccess } from "../../context/access/Access"; import { useAccess } from "../../context/access/Access";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useFetch } from "../../utils/useFetch";
import { FormFields } from "../ClientDetails"; import { FormFields } from "../ClientDetails";
import { defaultContextAttributes } from "../utils"; import { defaultContextAttributes } from "../utils";
import { KeyBasedAttributeInput } from "./KeyBasedAttributeInput"; import { KeyBasedAttributeInput } from "./KeyBasedAttributeInput";

View file

@ -1,4 +1,9 @@
import type ResourceServerRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation"; import type ResourceServerRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation";
import {
TextAreaControl,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
AlertVariant, AlertVariant,
@ -8,13 +13,10 @@ 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { prettyPrintJSON } from "../../util"; import { prettyPrintJSON } from "../../util";
import { useFetch } from "../../utils/useFetch";
import { useParams } from "../../utils/useParams"; import { useParams } from "../../utils/useParams";
import type { ClientParams } from "../routes/Client"; import type { ClientParams } from "../routes/Client";

View file

@ -1,10 +1,10 @@
import type ResourceServerRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation"; import type ResourceServerRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation";
import { useFetch } from "@keycloak/keycloak-ui-shared";
import { DescriptionList } from "@patternfly/react-core"; import { DescriptionList } from "@patternfly/react-core";
import { useState } from "react"; import { useState } from "react";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useFetch } from "../../utils/useFetch";
import { toPermissionDetails } from "../routes/PermissionDetails"; import { toPermissionDetails } from "../routes/PermissionDetails";
import { toScopeDetails } from "../routes/Scope"; import { toScopeDetails } from "../routes/Scope";
import { DetailDescription, DetailDescriptionLink } from "./DetailDescription"; import { DetailDescription, DetailDescriptionLink } from "./DetailDescription";

View file

@ -6,6 +6,8 @@ import {
SelectVariant, SelectVariant,
TextAreaControl, TextAreaControl,
TextControl, TextControl,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
@ -23,14 +25,12 @@ import { Controller, 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 { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ViewHeader } from "../../components/view-header/ViewHeader"; import { ViewHeader } from "../../components/view-header/ViewHeader";
import { useAccess } from "../../context/access/Access"; import { useAccess } from "../../context/access/Access";
import { toUpperCase } from "../../util"; import { toUpperCase } from "../../util";
import { useFetch } from "../../utils/useFetch";
import { useParams } from "../../utils/useParams"; import { useParams } from "../../utils/useParams";
import { toAuthorizationTab } from "../routes/AuthenticationTab"; import { toAuthorizationTab } from "../routes/AuthenticationTab";
import type { NewPermissionParams } from "../routes/NewPermission"; import type { NewPermissionParams } from "../routes/NewPermission";

View file

@ -1,5 +1,11 @@
import type PolicyProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/policyProviderRepresentation"; import type PolicyProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/policyProviderRepresentation";
import type PolicyRepresentation from "@keycloak/keycloak-admin-client/lib/defs/policyRepresentation"; import type PolicyRepresentation from "@keycloak/keycloak-admin-client/lib/defs/policyRepresentation";
import {
ListEmptyState,
PaginatingTableToolbar,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
Alert, Alert,
AlertVariant, AlertVariant,
@ -26,13 +32,9 @@ import { useState } from "react";
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 { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
import { PaginatingTableToolbar } from "../../components/table-toolbar/PaginatingTableToolbar";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useFetch } from "../../utils/useFetch";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import { toNewPermission } from "../routes/NewPermission"; import { toNewPermission } from "../routes/NewPermission";
import { toPermissionDetails } from "../routes/PermissionDetails"; import { toPermissionDetails } from "../routes/PermissionDetails";

View file

@ -1,5 +1,11 @@
import type PolicyProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/policyProviderRepresentation"; import type PolicyProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/policyProviderRepresentation";
import type PolicyRepresentation from "@keycloak/keycloak-admin-client/lib/defs/policyRepresentation"; import type PolicyRepresentation from "@keycloak/keycloak-admin-client/lib/defs/policyRepresentation";
import {
ListEmptyState,
PaginatingTableToolbar,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
Alert, Alert,
AlertVariant, AlertVariant,
@ -21,14 +27,10 @@ import { useState } from "react";
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 { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
import { PaginatingTableToolbar } from "../../components/table-toolbar/PaginatingTableToolbar";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { toUpperCase } from "../../util"; import { toUpperCase } from "../../util";
import { useFetch } from "../../utils/useFetch";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import { toCreatePolicy } from "../routes/NewPolicy"; import { toCreatePolicy } from "../routes/NewPolicy";
import { toPermissionDetails } from "../routes/PermissionDetails"; import { toPermissionDetails } from "../routes/PermissionDetails";

View file

@ -1,6 +1,12 @@
import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation"; import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import type ResourceRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceRepresentation"; import type ResourceRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceRepresentation";
import type ResourceServerRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation"; import type ResourceServerRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation";
import {
HelpItem,
TextControl,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
Alert, Alert,
@ -15,20 +21,17 @@ 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { DefaultSwitchControl } from "../../components/SwitchControl"; import { DefaultSwitchControl } from "../../components/SwitchControl";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { KeyValueInput } from "../../components/key-value-form/KeyValueInput"; import { KeyValueInput } from "../../components/key-value-form/KeyValueInput";
import type { KeyValueType } from "../../components/key-value-form/key-value-convert"; import type { KeyValueType } from "../../components/key-value-form/key-value-convert";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { MultiLineInput } from "../../components/multi-line-input/MultiLineInput"; import { MultiLineInput } from "../../components/multi-line-input/MultiLineInput";
import { ViewHeader } from "../../components/view-header/ViewHeader"; import { ViewHeader } from "../../components/view-header/ViewHeader";
import { useAccess } from "../../context/access/Access"; import { useAccess } from "../../context/access/Access";
import { convertFormValuesToObject, convertToFormValues } from "../../util"; import { convertFormValuesToObject, convertToFormValues } from "../../util";
import { useFetch } from "../../utils/useFetch";
import { useParams } from "../../utils/useParams"; import { useParams } from "../../utils/useParams";
import { toAuthorizationTab } from "../routes/AuthenticationTab"; import { toAuthorizationTab } from "../routes/AuthenticationTab";
import { ResourceDetailsParams, toResourceDetails } from "../routes/Resource"; import { ResourceDetailsParams, toResourceDetails } from "../routes/Resource";

View file

@ -1,5 +1,11 @@
import type ResourceRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceRepresentation"; import type ResourceRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceRepresentation";
import type ResourceServerRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation"; import type ResourceServerRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation";
import {
ListEmptyState,
PaginatingTableToolbar,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
Alert, Alert,
AlertVariant, AlertVariant,
@ -20,13 +26,9 @@ import { useState } from "react";
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 { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
import { PaginatingTableToolbar } from "../../components/table-toolbar/PaginatingTableToolbar";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useFetch } from "../../utils/useFetch";
import { toNewPermission } from "../routes/NewPermission"; import { toNewPermission } from "../routes/NewPermission";
import { toCreateResource } from "../routes/NewResource"; import { toCreateResource } from "../routes/NewResource";
import { toResourceDetails } from "../routes/Resource"; import { toResourceDetails } from "../routes/Resource";

View file

@ -5,6 +5,12 @@ import type {
Clients, Clients,
PolicyQuery, PolicyQuery,
} from "@keycloak/keycloak-admin-client/lib/resources/clients"; } from "@keycloak/keycloak-admin-client/lib/resources/clients";
import {
KeycloakSelect,
SelectVariant,
useFetch,
Variant,
} from "@keycloak/keycloak-ui-shared";
import { import {
Button, Button,
ButtonVariant, ButtonVariant,
@ -22,13 +28,7 @@ import { useTranslation } from "react-i18next";
import { Link, useNavigate } from "react-router-dom"; import { Link, useNavigate } from "react-router-dom";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import {
KeycloakSelect,
SelectVariant,
Variant,
} from "@keycloak/keycloak-ui-shared";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useFetch } from "../../utils/useFetch";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import { toCreatePolicy } from "../routes/NewPolicy"; import { toCreatePolicy } from "../routes/NewPolicy";
import { toPolicyDetails } from "../routes/PolicyDetails"; import { toPolicyDetails } from "../routes/PolicyDetails";

View file

@ -1,4 +1,5 @@
import type ScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation"; import type ScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation";
import { TextControl, useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
AlertVariant, AlertVariant,
@ -11,12 +12,9 @@ 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { ViewHeader } from "../../components/view-header/ViewHeader"; import { ViewHeader } from "../../components/view-header/ViewHeader";
import { useFetch } from "../../utils/useFetch";
import { useParams } from "../../utils/useParams"; import { useParams } from "../../utils/useParams";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import { toAuthorizationTab } from "../routes/AuthenticationTab"; import { toAuthorizationTab } from "../routes/AuthenticationTab";

View file

@ -3,14 +3,14 @@ import {
HelpItem, HelpItem,
KeycloakSelect, KeycloakSelect,
SelectVariant, SelectVariant,
useFetch,
} from "@keycloak/keycloak-ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { FormGroup, SelectOption } from "@patternfly/react-core"; import { FormGroup, SelectOption } from "@patternfly/react-core";
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 { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { useFetch } from "../../utils/useFetch";
type Scope = { type Scope = {
id: string; id: string;

View file

@ -1,11 +1,14 @@
import type ScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation"; import type ScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation";
import { KeycloakSelect, SelectVariant } from "@keycloak/keycloak-ui-shared"; import {
KeycloakSelect,
SelectVariant,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { SelectOption } from "@patternfly/react-core"; import { SelectOption } from "@patternfly/react-core";
import { useRef, useState } from "react"; import { useRef, 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 { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useFetch } from "../../utils/useFetch";
type ScopeSelectProps = { type ScopeSelectProps = {
clientId: string; clientId: string;

View file

@ -1,5 +1,10 @@
import type PolicyRepresentation from "@keycloak/keycloak-admin-client/lib/defs/policyRepresentation"; import type PolicyRepresentation from "@keycloak/keycloak-admin-client/lib/defs/policyRepresentation";
import type ScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation"; import type ScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation";
import {
ListEmptyState,
PaginatingTableToolbar,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
Button, Button,
DescriptionList, DescriptionList,
@ -19,11 +24,8 @@ import { useState } from "react";
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 { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
import { PaginatingTableToolbar } from "../../components/table-toolbar/PaginatingTableToolbar";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useFetch } from "../../utils/useFetch";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import { toNewPermission } from "../routes/NewPermission"; import { toNewPermission } from "../routes/NewPermission";
import { toNewScope } from "../routes/NewScope"; import { toNewScope } from "../routes/NewScope";

View file

@ -1,4 +1,5 @@
import type ResourceServerRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation"; import type ResourceServerRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation";
import { HelpItem, useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
AlertVariant, AlertVariant,
Button, Button,
@ -10,15 +11,12 @@ 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { DefaultSwitchControl } from "../../components/SwitchControl";
import { useAlerts } 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";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { DefaultSwitchControl } from "../../components/SwitchControl";
import { useAccess } from "../../context/access/Access"; import { useAccess } from "../../context/access/Access";
import { useFetch } from "../../utils/useFetch";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import { DecisionStrategySelect } from "./DecisionStrategySelect"; import { DecisionStrategySelect } from "./DecisionStrategySelect";
import { ImportDialog } from "./ImportDialog"; import { ImportDialog } from "./ImportDialog";

View file

@ -23,7 +23,7 @@ import { useTranslation } from "react-i18next";
import type EvaluationResultRepresentation from "@keycloak/keycloak-admin-client/lib/defs/evaluationResultRepresentation"; import type EvaluationResultRepresentation from "@keycloak/keycloak-admin-client/lib/defs/evaluationResultRepresentation";
import type PolicyEvaluationResponse from "@keycloak/keycloak-admin-client/lib/defs/policyEvaluationResponse"; import type PolicyEvaluationResponse from "@keycloak/keycloak-admin-client/lib/defs/policyEvaluationResponse";
import { FixedButtonsGroup } from "../../../components/form/FixedButtonGroup"; import { FixedButtonsGroup } from "../../../components/form/FixedButtonGroup";
import { ListEmptyState } from "../../../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import useToggle from "../../../utils/useToggle"; import useToggle from "../../../utils/useToggle";
import { AuthorizationDataModal } from "../AuthorizationDataModal"; import { AuthorizationDataModal } from "../AuthorizationDataModal";
import { AuthorizationEvaluateResource } from "../AuthorizationEvaluateResource"; import { AuthorizationEvaluateResource } from "../AuthorizationEvaluateResource";

View file

@ -1,13 +1,16 @@
import type ClientScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation"; import type ClientScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation";
import {
FormErrorText,
HelpItem,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { Button, Checkbox, FormGroup } from "@patternfly/react-core"; import { Button, Checkbox, FormGroup } from "@patternfly/react-core";
import { MinusCircleIcon } from "@patternfly/react-icons"; import { MinusCircleIcon } 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 { 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../../admin-client"; import { useAdminClient } from "../../../admin-client";
import { useFetch } from "../../../utils/useFetch";
import useLocaleSort, { mapByKey } from "../../../utils/useLocaleSort"; import useLocaleSort, { mapByKey } from "../../../utils/useLocaleSort";
import { AddScopeDialog } from "../../scopes/AddScopeDialog"; import { AddScopeDialog } from "../../scopes/AddScopeDialog";

View file

@ -3,6 +3,7 @@ import {
FormErrorText, FormErrorText,
HelpItem, HelpItem,
TextControl, TextControl,
useFetch,
} from "@keycloak/keycloak-ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { Button, Checkbox, FormGroup } from "@patternfly/react-core"; import { Button, Checkbox, FormGroup } from "@patternfly/react-core";
import { MinusCircleIcon } from "@patternfly/react-icons"; import { MinusCircleIcon } from "@patternfly/react-icons";
@ -12,7 +13,6 @@ import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../../../admin-client"; import { useAdminClient } from "../../../admin-client";
import { GroupPickerDialog } from "../../../components/group/GroupPickerDialog"; import { GroupPickerDialog } from "../../../components/group/GroupPickerDialog";
import { useFetch } from "../../../utils/useFetch";
type GroupForm = { type GroupForm = {
groups?: GroupValue[]; groups?: GroupValue[];

View file

@ -1,4 +1,5 @@
import type PolicyRepresentation from "@keycloak/keycloak-admin-client/lib/defs/policyRepresentation"; import type PolicyRepresentation from "@keycloak/keycloak-admin-client/lib/defs/policyRepresentation";
import { useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
AlertVariant, AlertVariant,
@ -12,12 +13,10 @@ 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 { useAdminClient } from "../../../admin-client"; import { useAdminClient } from "../../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../../components/confirm-dialog/ConfirmDialog";
import { FormAccess } from "../../../components/form/FormAccess"; import { FormAccess } from "../../../components/form/FormAccess";
import { KeycloakSpinner } from "../../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ViewHeader } from "../../../components/view-header/ViewHeader"; import { ViewHeader } from "../../../components/view-header/ViewHeader";
import { useFetch } from "../../../utils/useFetch";
import { useParams } from "../../../utils/useParams"; import { useParams } from "../../../utils/useParams";
import { toAuthorizationTab } from "../../routes/AuthenticationTab"; import { toAuthorizationTab } from "../../routes/AuthenticationTab";
import { import {

View file

@ -1,15 +1,18 @@
import {
FormErrorText,
HelpItem,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { Button, Checkbox, FormGroup } from "@patternfly/react-core"; import { Button, Checkbox, FormGroup } from "@patternfly/react-core";
import { MinusCircleIcon } from "@patternfly/react-icons"; import { MinusCircleIcon } 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 { 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../../admin-client"; import { useAdminClient } from "../../../admin-client";
import { DefaultSwitchControl } from "../../../components/SwitchControl"; import { DefaultSwitchControl } from "../../../components/SwitchControl";
import { AddRoleMappingModal } from "../../../components/role-mapping/AddRoleMappingModal"; import { AddRoleMappingModal } from "../../../components/role-mapping/AddRoleMappingModal";
import { Row, ServiceRole } from "../../../components/role-mapping/RoleMapping"; import { Row, ServiceRole } from "../../../components/role-mapping/RoleMapping";
import { useFetch } from "../../../utils/useFetch";
import type { RequiredIdValue } from "./ClientScope"; import type { RequiredIdValue } from "./ClientScope";
export const Role = () => { export const Role = () => {

View file

@ -1,6 +1,12 @@
import type { AuthenticationProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation"; import type { AuthenticationProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation";
import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation"; import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import type CredentialRepresentation from "@keycloak/keycloak-admin-client/lib/defs/credentialRepresentation"; import type CredentialRepresentation from "@keycloak/keycloak-admin-client/lib/defs/credentialRepresentation";
import {
HelpItem,
SelectControl,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
Alert, Alert,
@ -18,12 +24,9 @@ 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { useFetch } from "../../utils/useFetch";
import { FormFields } from "../ClientDetails"; import { FormFields } from "../ClientDetails";
import { ClientSecret } from "./ClientSecret"; import { ClientSecret } from "./ClientSecret";
import { SignedJWT } from "./SignedJWT"; import { SignedJWT } from "./SignedJWT";

View file

@ -7,11 +7,8 @@ import { Link, useNavigate } from "react-router-dom";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared"; import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { import { Action, KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
Action,
KeycloakDataTable,
} from "../../components/table-toolbar/KeycloakDataTable";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import useFormatDate, { FORMAT_DATE_AND_TIME } from "../../utils/useFormatDate"; import useFormatDate, { FORMAT_DATE_AND_TIME } from "../../utils/useFormatDate";
import { toCreateInitialAccessToken } from "../routes/CreateInitialAccessToken"; import { toCreateInitialAccessToken } from "../routes/CreateInitialAccessToken";

View file

@ -1,5 +1,6 @@
import type CertificateRepresentation from "@keycloak/keycloak-admin-client/lib/defs/certificateRepresentation"; import type CertificateRepresentation from "@keycloak/keycloak-admin-client/lib/defs/certificateRepresentation";
import type KeyStoreConfig from "@keycloak/keycloak-admin-client/lib/defs/keystoreConfig"; import type KeyStoreConfig from "@keycloak/keycloak-admin-client/lib/defs/keystoreConfig";
import { TextControl, useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
AlertVariant, AlertVariant,
@ -16,13 +17,10 @@ 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { DefaultSwitchControl } from "../../components/SwitchControl";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { DefaultSwitchControl } from "../../components/SwitchControl";
import { convertAttributeNameToForm } from "../../util"; import { convertAttributeNameToForm } from "../../util";
import { useFetch } from "../../utils/useFetch";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import { FormFields } from "../ClientDetails"; import { FormFields } from "../ClientDetails";
import { Certificate } from "./Certificate"; import { Certificate } from "./Certificate";

View file

@ -1,4 +1,10 @@
import type CertificateRepresentation from "@keycloak/keycloak-admin-client/lib/defs/certificateRepresentation"; import type CertificateRepresentation from "@keycloak/keycloak-admin-client/lib/defs/certificateRepresentation";
import {
FormPanel,
HelpItem,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
AlertVariant, AlertVariant,
@ -16,13 +22,10 @@ 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { convertAttributeNameToForm } from "../../util"; import { convertAttributeNameToForm } from "../../util";
import { useFetch } from "../../utils/useFetch";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import { FormFields } from "../ClientDetails"; import { FormFields } from "../ClientDetails";
import { Certificate } from "./Certificate"; import { Certificate } from "./Certificate";

View file

@ -1,17 +1,13 @@
import ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation"; import ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { Button, ButtonVariant, ToolbarItem } from "@patternfly/react-core"; import { Button, ButtonVariant, ToolbarItem } from "@patternfly/react-core";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link, useNavigate, useParams } from "react-router-dom"; import { Link, useNavigate, useParams } from "react-router-dom";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { import { Action, KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
Action,
KeycloakDataTable,
} from "../../components/table-toolbar/KeycloakDataTable";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useFetch } from "../../utils/useFetch";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import { toRegistrationProvider } from "../routes/AddRegistrationProvider"; import { toRegistrationProvider } from "../routes/AddRegistrationProvider";
import { ClientRegistrationParams } from "../routes/ClientRegistration"; import { ClientRegistrationParams } from "../routes/ClientRegistration";

View file

@ -1,5 +1,6 @@
import ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation"; import ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import ComponentTypeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentTypeRepresentation"; import ComponentTypeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentTypeRepresentation";
import { TextControl, useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
Button, Button,
@ -11,16 +12,13 @@ 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { DynamicComponents } from "../../components/dynamic/DynamicComponents"; import { DynamicComponents } from "../../components/dynamic/DynamicComponents";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ViewHeader } from "../../components/view-header/ViewHeader"; import { ViewHeader } from "../../components/view-header/ViewHeader";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useFetch } from "../../utils/useFetch";
import { useParams } from "../../utils/useParams"; import { useParams } from "../../utils/useParams";
import { import {
RegistrationProviderParams, RegistrationProviderParams,

View file

@ -22,8 +22,8 @@ import {
ClientScopeType, ClientScopeType,
clientScopeTypesDropdown, clientScopeTypesDropdown,
} from "../../components/client-scope/ClientScopeTypes"; } from "../../components/client-scope/ClientScopeTypes";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { KeycloakDataTable } from "../../components/table-toolbar/KeycloakDataTable"; import { KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import { getProtocolName } from "../utils"; import { getProtocolName } from "../utils";

View file

@ -33,11 +33,8 @@ import {
removeClientScope, removeClientScope,
} from "../../components/client-scope/ClientScopeTypes"; } from "../../components/client-scope/ClientScopeTypes";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { import { Action, KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
Action,
KeycloakDataTable,
} from "../../components/table-toolbar/KeycloakDataTable";
import { useAccess } from "../../context/access/Access"; import { useAccess } from "../../context/access/Access";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { translationFormatter } from "../../utils/translationFormatter"; import { translationFormatter } from "../../utils/translationFormatter";

View file

@ -1,6 +1,7 @@
import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation"; import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import type ProtocolMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/protocolMapperRepresentation"; import type ProtocolMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/protocolMapperRepresentation";
import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation"; import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
import { useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
AlertVariant, AlertVariant,
PageSection, PageSection,
@ -12,14 +13,12 @@ import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { MapperList } from "../../client-scopes/details/MapperList"; import { MapperList } from "../../client-scopes/details/MapperList";
import { useAlerts } from "@keycloak/keycloak-ui-shared"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
import { import {
RoutableTabs, RoutableTabs,
useRoutableTab, useRoutableTab,
} from "../../components/routable-tabs/RoutableTabs"; } from "../../components/routable-tabs/RoutableTabs";
import { ViewHeader } from "../../components/view-header/ViewHeader"; import { ViewHeader } from "../../components/view-header/ViewHeader";
import { useFetch } from "../../utils/useFetch";
import { useParams } from "../../utils/useParams"; import { useParams } from "../../utils/useParams";
import { import {
DedicatedScopeDetailsParams, DedicatedScopeDetailsParams,

View file

@ -4,8 +4,10 @@ import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/ro
import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation"; import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
import { import {
HelpItem, HelpItem,
KeycloakDataTable,
KeycloakSelect, KeycloakSelect,
SelectVariant, SelectVariant,
useFetch,
useHelp, useHelp,
} from "@keycloak/keycloak-ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { import {
@ -30,13 +32,11 @@ 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 { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { KeycloakDataTable } from "../../components/table-toolbar/KeycloakDataTable";
import { UserSelect } from "../../components/users/UserSelect"; import { UserSelect } from "../../components/users/UserSelect";
import { useAccess } from "../../context/access/Access"; import { useAccess } from "../../context/access/Access";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
import { prettyPrintJSON } from "../../util"; import { prettyPrintJSON } from "../../util";
import { useFetch } from "../../utils/useFetch";
import { GeneratedCodeTab } from "./GeneratedCodeTab"; import { GeneratedCodeTab } from "./GeneratedCodeTab";
import "./evaluate.css"; import "./evaluate.css";

View file

@ -1,19 +1,18 @@
import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation"; import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import type { RoleMappingPayload } from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation"; import type { RoleMappingPayload } from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation"; import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import { useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { AlertVariant, PageSection } from "@patternfly/react-core"; import { AlertVariant, PageSection } from "@patternfly/react-core";
import { InfoCircleIcon } from "@patternfly/react-icons"; import { InfoCircleIcon } from "@patternfly/react-icons";
import { useState } from "react"; import { useState } from "react";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
import { RoleMapping, Row } from "../../components/role-mapping/RoleMapping"; import { RoleMapping, Row } from "../../components/role-mapping/RoleMapping";
import { useAccess } from "../../context/access/Access"; import { useAccess } from "../../context/access/Access";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { toUser } from "../../user/routes/User"; import { toUser } from "../../user/routes/User";
import { useFetch } from "../../utils/useFetch";
import "./service-account.css"; import "./service-account.css";

View file

@ -1,10 +1,13 @@
import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation"; import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import type { ClientQuery } from "@keycloak/keycloak-admin-client/lib/resources/clients"; import type { ClientQuery } from "@keycloak/keycloak-admin-client/lib/resources/clients";
import { SelectControl, SelectVariant } from "@keycloak/keycloak-ui-shared"; import {
SelectControl,
SelectVariant,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useFetch } from "../../utils/useFetch";
import type { ComponentProps } from "../dynamic/components"; import type { ComponentProps } from "../dynamic/components";
type ClientSelectProps = ComponentProps & { variant?: `${SelectVariant}` }; type ClientSelectProps = ComponentProps & { variant?: `${SelectVariant}` };

View file

@ -1,5 +1,5 @@
import { fetchWithError } from "@keycloak/keycloak-admin-client"; import { fetchWithError } from "@keycloak/keycloak-admin-client";
import { HelpItem, useHelp } from "@keycloak/keycloak-ui-shared"; import { HelpItem, useFetch, useHelp } from "@keycloak/keycloak-ui-shared";
import { import {
Form, Form,
FormGroup, FormGroup,
@ -20,7 +20,6 @@ import { useRealm } from "../../context/realm-context/RealmContext";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
import { addTrailingSlash, prettyPrintJSON } from "../../util"; import { addTrailingSlash, prettyPrintJSON } from "../../util";
import { getAuthorizationHeaders } from "../../utils/getAuthorizationHeaders"; import { getAuthorizationHeaders } from "../../utils/getAuthorizationHeaders";
import { useFetch } from "../../utils/useFetch";
import { ConfirmDialogModal } from "../confirm-dialog/ConfirmDialog"; import { ConfirmDialogModal } from "../confirm-dialog/ConfirmDialog";
type DownloadDialogProps = { type DownloadDialogProps = {

View file

@ -1,11 +1,14 @@
import type { UserProfileConfig } from "@keycloak/keycloak-admin-client/lib/defs/userProfileMetadata"; import type { UserProfileConfig } from "@keycloak/keycloak-admin-client/lib/defs/userProfileMetadata";
import {
FormErrorText,
HelpItem,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { FormGroup } from "@patternfly/react-core"; import { FormGroup } from "@patternfly/react-core";
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 { FormErrorText, HelpItem } from "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useFetch } from "../../utils/useFetch";
import { KeySelect } from "../key-value-form/KeySelect"; import { KeySelect } from "../key-value-form/KeySelect";
import { convertToName } from "./DynamicComponents"; import { convertToName } from "./DynamicComponents";
import type { ComponentProps } from "./components"; import type { ComponentProps } from "./components";

View file

@ -7,7 +7,7 @@ import {
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { type FallbackProps } from "../../context/ErrorBoundary"; import { type FallbackProps } from "@keycloak/keycloak-ui-shared";
export const ErrorRenderer = ({ error }: FallbackProps) => { export const ErrorRenderer = ({ error }: FallbackProps) => {
const { t } = useTranslation(); const { t } = useTranslation();

View file

@ -3,6 +3,7 @@ import {
GroupQuery, GroupQuery,
SubGroupQuery, SubGroupQuery,
} from "@keycloak/keycloak-admin-client/lib/resources/groups"; } from "@keycloak/keycloak-admin-client/lib/resources/groups";
import { PaginatingTableToolbar, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
Breadcrumb, Breadcrumb,
BreadcrumbItem, BreadcrumbItem,
@ -21,9 +22,7 @@ import { AngleRightIcon } from "@patternfly/react-icons";
import { Fragment, useState } from "react"; import { Fragment, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useFetch } from "../../utils/useFetch"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { ListEmptyState } from "../list-empty-state/ListEmptyState";
import { PaginatingTableToolbar } from "../table-toolbar/PaginatingTableToolbar";
import { GroupPath } from "./GroupPath"; import { GroupPath } from "./GroupPath";
import "./group-picker-dialog.css"; import "./group-picker-dialog.css";

View file

@ -119,7 +119,7 @@ export const FileUpload = ({
const onDropAccepted = (acceptedFiles: File[], event: DropEvent) => { const onDropAccepted = (acceptedFiles: File[], event: DropEvent) => {
if (acceptedFiles.length > 0) { if (acceptedFiles.length > 0) {
const fileHandle = acceptedFiles[0]; const fileHandle = acceptedFiles[0];
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (event?.type === "drop") { if (event?.type === "drop") {
onFileInputChange?.(event, fileHandle); onFileInputChange?.(event, fileHandle);
} }

View file

@ -1,4 +1,5 @@
import type { ManagementPermissionReference } from "@keycloak/keycloak-admin-client/lib/defs/managementPermissionReference"; import type { ManagementPermissionReference } from "@keycloak/keycloak-admin-client/lib/defs/managementPermissionReference";
import { HelpItem, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
Card, Card,
CardBody, CardBody,
@ -20,12 +21,10 @@ import {
import { useState } from "react"; import { useState } from "react";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { Link, useNavigate } from "react-router-dom"; import { Link, useNavigate } from "react-router-dom";
import { HelpItem } from "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { toPermissionDetails } from "../../clients/routes/PermissionDetails"; import { toPermissionDetails } from "../../clients/routes/PermissionDetails";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useFetch } from "../../utils/useFetch";
import useLocaleSort from "../../utils/useLocaleSort"; import useLocaleSort from "../../utils/useLocaleSort";
import { useConfirmDialog } from "../confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../confirm-dialog/ConfirmDialog";

View file

@ -1,5 +1,5 @@
import { NetworkError } from "@keycloak/keycloak-admin-client"; import { NetworkError } from "@keycloak/keycloak-admin-client";
import { label } from "@keycloak/keycloak-ui-shared"; import { label, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
Button, Button,
Divider, Divider,
@ -32,7 +32,6 @@ import { useRealm } from "../../context/realm-context/RealmContext";
import { useWhoAmI } from "../../context/whoami/WhoAmI"; import { useWhoAmI } from "../../context/whoami/WhoAmI";
import { toDashboard } from "../../dashboard/routes/Dashboard"; import { toDashboard } from "../../dashboard/routes/Dashboard";
import { toAddRealm } from "../../realm/routes/AddRealm"; import { toAddRealm } from "../../realm/routes/AddRealm";
import { useFetch } from "../../utils/useFetch";
import "./realm-selector.css"; import "./realm-selector.css";

View file

@ -15,8 +15,8 @@ import { useAdminClient } from "../../admin-client";
import { useAccess } from "../../context/access/Access"; import { useAccess } from "../../context/access/Access";
import { translationFormatter } from "../../utils/translationFormatter"; import { translationFormatter } from "../../utils/translationFormatter";
import useLocaleSort from "../../utils/useLocaleSort"; import useLocaleSort from "../../utils/useLocaleSort";
import { ListEmptyState } from "../list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { KeycloakDataTable } from "../table-toolbar/KeycloakDataTable"; import { KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
import { ResourcesKey, Row, ServiceRole } from "./RoleMapping"; import { ResourcesKey, Row, ServiceRole } from "./RoleMapping";
import { getAvailableRoles } from "./queries"; import { getAvailableRoles } from "./queries";
import { getAvailableClientRoles } from "./resource"; import { getAvailableClientRoles } from "./resource";

View file

@ -17,8 +17,8 @@ import { useAdminClient } from "../../admin-client";
import { emptyFormatter, upperCaseFormatter } from "../../util"; import { emptyFormatter, upperCaseFormatter } from "../../util";
import { translationFormatter } from "../../utils/translationFormatter"; import { translationFormatter } from "../../utils/translationFormatter";
import { useConfirmDialog } from "../confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../confirm-dialog/ConfirmDialog";
import { ListEmptyState } from "../list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { Action, KeycloakDataTable } from "../table-toolbar/KeycloakDataTable"; import { Action, KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
import { AddRoleMappingModal } from "./AddRoleMappingModal"; import { AddRoleMappingModal } from "./AddRoleMappingModal";
import { deleteMapping, getEffectiveRoles, getMapping } from "./queries"; import { deleteMapping, getEffectiveRoles, getMapping } from "./queries";
import { getEffectiveClientRoles } from "./resource"; import { getEffectiveClientRoles } from "./resource";

View file

@ -11,8 +11,8 @@ import { toRealmSettings } from "../../realm-settings/routes/RealmSettings";
import { emptyFormatter, upperCaseFormatter } from "../../util"; import { emptyFormatter, upperCaseFormatter } from "../../util";
import { translationFormatter } from "../../utils/translationFormatter"; import { translationFormatter } from "../../utils/translationFormatter";
import { useConfirmDialog } from "../confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../confirm-dialog/ConfirmDialog";
import { ListEmptyState } from "../list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { Action, KeycloakDataTable } from "../table-toolbar/KeycloakDataTable"; import { Action, KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
import "./RolesList.css"; import "./RolesList.css";

View file

@ -1,6 +1,12 @@
import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation"; import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import type { UserProfileConfig } from "@keycloak/keycloak-admin-client/lib/defs/userProfileMetadata"; import type { UserProfileConfig } from "@keycloak/keycloak-admin-client/lib/defs/userProfileMetadata";
import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation"; import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import {
KeycloakDataTable,
ListEmptyState,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
AlertVariant, AlertVariant,
Button, Button,
@ -32,13 +38,9 @@ import { SearchType } from "../../user/details/SearchFilter";
import { toAddUser } from "../../user/routes/AddUser"; import { toAddUser } from "../../user/routes/AddUser";
import { toUser } from "../../user/routes/User"; import { toUser } from "../../user/routes/User";
import { emptyFormatter } from "../../util"; import { emptyFormatter } from "../../util";
import { useFetch } from "../../utils/useFetch";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../confirm-dialog/ConfirmDialog";
import { KeycloakSpinner } from "../keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ListEmptyState } from "../list-empty-state/ListEmptyState";
import { BruteUser, findUsers } from "../role-mapping/resource"; import { BruteUser, findUsers } from "../role-mapping/resource";
import { KeycloakDataTable } from "../table-toolbar/KeycloakDataTable";
import { UserDataTableToolbarItems } from "./UserDataTableToolbarItems"; import { UserDataTableToolbarItems } from "./UserDataTableToolbarItems";
export type UserAttribute = { export type UserAttribute = {

View file

@ -1,5 +1,10 @@
import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation"; import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import type { UserQuery } from "@keycloak/keycloak-admin-client/lib/resources/users"; import type { UserQuery } from "@keycloak/keycloak-admin-client/lib/resources/users";
import {
FormErrorText,
HelpItem,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
Button, Button,
Chip, Chip,
@ -13,16 +18,14 @@ import {
TextInputGroupMain, TextInputGroupMain,
TextInputGroupUtilities, TextInputGroupUtilities,
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import { TimesIcon } from "@patternfly/react-icons";
import { debounce } from "lodash-es"; import { debounce } from "lodash-es";
import { useCallback, useRef, useState } from "react"; import { useCallback, useRef, 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useFetch } from "../../utils/useFetch";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import type { ComponentProps } from "../dynamic/components"; import type { ComponentProps } from "../dynamic/components";
import { TimesIcon } from "@patternfly/react-icons";
type UserSelectVariant = "typeaheadMulti" | "typeahead"; type UserSelectVariant = "typeaheadMulti" | "typeahead";

View file

@ -2,6 +2,7 @@ import RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmR
import { import {
createNamedContext, createNamedContext,
useEnvironment, useEnvironment,
useFetch,
useRequiredContext, useRequiredContext,
} from "@keycloak/keycloak-ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { PropsWithChildren, useEffect, useState } from "react"; import { PropsWithChildren, useEffect, useState } from "react";
@ -9,7 +10,6 @@ import { useMatch } from "react-router-dom";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { DashboardRouteWithRealm } from "../../dashboard/routes/Dashboard"; import { DashboardRouteWithRealm } from "../../dashboard/routes/Dashboard";
import { i18n } from "../../i18n/i18n"; import { i18n } from "../../i18n/i18n";
import { useFetch } from "../../utils/useFetch";
type RealmContextType = { type RealmContextType = {
realm: string; realm: string;

View file

@ -1,14 +1,14 @@
import { NetworkError } from "@keycloak/keycloak-admin-client";
import type { ServerInfoRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation"; import type { ServerInfoRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
import { import {
createNamedContext, createNamedContext,
useFetch,
useRequiredContext, useRequiredContext,
} from "@keycloak/keycloak-ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { NetworkError } from "@keycloak/keycloak-admin-client";
import { PropsWithChildren, useCallback, useState } from "react"; import { PropsWithChildren, useCallback, useState } from "react";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { sortProviders } from "../../util"; import { sortProviders } from "../../util";
import { useFetch } from "../../utils/useFetch";
export const ServerInfoContext = createNamedContext< export const ServerInfoContext = createNamedContext<
ServerInfoRepresentation | undefined ServerInfoRepresentation | undefined

View file

@ -1,14 +1,14 @@
import type WhoAmIRepresentation from "@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation"; import type WhoAmIRepresentation from "@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation";
import type { AccessType } from "@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation"; import type { AccessType } from "@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation";
import { PropsWithChildren, useState } from "react";
import { import {
createNamedContext, createNamedContext,
useEnvironment, useEnvironment,
useFetch,
useRequiredContext, useRequiredContext,
} from "@keycloak/keycloak-ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { PropsWithChildren, useState } from "react";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { DEFAULT_LOCALE, i18n } from "../../i18n/i18n"; import { DEFAULT_LOCALE, i18n } from "../../i18n/i18n";
import { useFetch } from "../../utils/useFetch";
import { useRealm } from "../realm-context/RealmContext"; import { useRealm } from "../realm-context/RealmContext";
// can be replaced with https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo // can be replaced with https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo

View file

@ -33,7 +33,7 @@ import {
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import { useMemo } from "react"; import { useMemo } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { import {
RoutableTabs, RoutableTabs,
useRoutableTab, useRoutableTab,

View file

@ -1,10 +1,9 @@
import { useMemo, useState } from "react"; import { TableToolbar } from "@keycloak/keycloak-ui-shared";
import { useTranslation } from "react-i18next";
import { ExpandableSection, PageSection } from "@patternfly/react-core"; import { ExpandableSection, PageSection } from "@patternfly/react-core";
import { Table, Tbody, Td, Th, Thead, Tr } from "@patternfly/react-table"; import { Table, Tbody, Td, Th, Thead, Tr } from "@patternfly/react-table";
import { useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { useServerInfo } from "../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../context/server-info/ServerInfoProvider";
import { TableToolbar } from "../components/table-toolbar/TableToolbar";
export const ProviderInfo = () => { export const ProviderInfo = () => {
const { t } = useTranslation(); const { t } = useTranslation();

View file

@ -35,11 +35,8 @@ import { Controller, FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import DropdownPanel from "../components/dropdown-panel/DropdownPanel"; import DropdownPanel from "../components/dropdown-panel/DropdownPanel";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { import { Action, KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
Action,
KeycloakDataTable,
} from "../components/table-toolbar/KeycloakDataTable";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { useServerInfo } from "../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../context/server-info/ServerInfoProvider";
import { prettyPrintJSON } from "../util"; import { prettyPrintJSON } from "../util";

View file

@ -2,9 +2,12 @@ import type EventRepresentation from "@keycloak/keycloak-admin-client/lib/defs/e
import type EventType from "@keycloak/keycloak-admin-client/lib/defs/eventTypes"; import type EventType from "@keycloak/keycloak-admin-client/lib/defs/eventTypes";
import type { RealmEventsConfigRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/realmEventsConfigRepresentation"; import type { RealmEventsConfigRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/realmEventsConfigRepresentation";
import { import {
KeycloakDataTable,
KeycloakSelect, KeycloakSelect,
ListEmptyState,
SelectVariant, SelectVariant,
TextControl, TextControl,
useFetch,
} from "@keycloak/keycloak-ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
@ -36,18 +39,15 @@ import { Trans, useTranslation } from "react-i18next";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import DropdownPanel from "../components/dropdown-panel/DropdownPanel"; import DropdownPanel from "../components/dropdown-panel/DropdownPanel";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
import { import {
RoutableTabs, RoutableTabs,
useRoutableTab, useRoutableTab,
} from "../components/routable-tabs/RoutableTabs"; } from "../components/routable-tabs/RoutableTabs";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { ViewHeader } from "../components/view-header/ViewHeader"; import { ViewHeader } from "../components/view-header/ViewHeader";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import helpUrls from "../help-urls"; import helpUrls from "../help-urls";
import { toRealmSettings } from "../realm-settings/routes/RealmSettings"; import { toRealmSettings } from "../realm-settings/routes/RealmSettings";
import { toUser } from "../user/routes/User"; import { toUser } from "../user/routes/User";
import { useFetch } from "../utils/useFetch";
import useFormatDate, { FORMAT_DATE_AND_TIME } from "../utils/useFormatDate"; import useFormatDate, { FORMAT_DATE_AND_TIME } from "../utils/useFormatDate";
import { AdminEvents } from "./AdminEvents"; import { AdminEvents } from "./AdminEvents";
import { EventsTab, toEvents } from "./routes/Events"; import { EventsTab, toEvents } from "./routes/Events";

View file

@ -1,4 +1,5 @@
import GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation"; import GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
import { useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
AlertVariant, AlertVariant,
PageSection, PageSection,
@ -9,14 +10,12 @@ import { useForm } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useLocation } from "react-router-dom"; import { useLocation } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { import {
AttributeForm, AttributeForm,
AttributesForm, AttributesForm,
} from "../components/key-value-form/AttributeForm"; } from "../components/key-value-form/AttributeForm";
import { arrayToKeyValue } from "../components/key-value-form/key-value-convert"; import { arrayToKeyValue } from "../components/key-value-form/key-value-convert";
import { convertFormValuesToObject } from "../util"; import { convertFormValuesToObject } from "../util";
import { useFetch } from "../utils/useFetch";
import { getLastId } from "./groupIdUtils"; import { getLastId } from "./groupIdUtils";
export const GroupAttributes = () => { export const GroupAttributes = () => {

View file

@ -8,8 +8,8 @@ import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link, useLocation } from "react-router-dom"; import { Link, useLocation } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable"; import { KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
import { useAccess } from "../context/access/Access"; import { useAccess } from "../context/access/Access";
import useToggle from "../utils/useToggle"; import useToggle from "../utils/useToggle";
import { GroupsModal } from "./GroupsModal"; import { GroupsModal } from "./GroupsModal";

View file

@ -1,4 +1,5 @@
import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation"; import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
import { useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
Button, Button,
Drawer, Drawer,
@ -25,7 +26,6 @@ import { ViewHeader } from "../components/view-header/ViewHeader";
import { useAccess } from "../context/access/Access"; import { useAccess } from "../context/access/Access";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import helpUrls from "../help-urls"; import helpUrls from "../help-urls";
import { useFetch } from "../utils/useFetch";
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled"; import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
import useToggle from "../utils/useToggle"; import useToggle from "../utils/useToggle";
import { GroupAttributes } from "./GroupAttributes"; import { GroupAttributes } from "./GroupAttributes";

View file

@ -1,15 +1,22 @@
import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation"; import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation"; import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import { SubGroupQuery } from "@keycloak/keycloak-admin-client/lib/resources/groups"; import { SubGroupQuery } from "@keycloak/keycloak-admin-client/lib/resources/groups";
import {
Action,
KeycloakDataTable,
ListEmptyState,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
Button, Button,
Checkbox, Checkbox,
Dropdown, Dropdown,
DropdownItem, DropdownItem,
DropdownList, DropdownList,
Label,
MenuToggle, MenuToggle,
ToolbarItem, ToolbarItem,
Label,
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import { EllipsisVIcon, InfoCircleIcon } from "@patternfly/react-icons"; import { EllipsisVIcon, InfoCircleIcon } from "@patternfly/react-icons";
import { uniqBy } from "lodash-es"; import { uniqBy } from "lodash-es";
@ -17,19 +24,12 @@ import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link, useLocation } from "react-router-dom"; import { Link, useLocation } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { GroupPath } from "../components/group/GroupPath"; import { GroupPath } from "../components/group/GroupPath";
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
import {
Action,
KeycloakDataTable,
} from "../components/table-toolbar/KeycloakDataTable";
import { useAccess } from "../context/access/Access"; import { useAccess } from "../context/access/Access";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { toUser } from "../user/routes/User"; import { toUser } from "../user/routes/User";
import { emptyFormatter } from "../util"; import { emptyFormatter } from "../util";
import { useFetch } from "../utils/useFetch";
import { MemberModal } from "./MembersModal"; import { MemberModal } from "./MembersModal";
import { useSubGroups } from "./SubGroupsContext"; import { useSubGroups } from "./SubGroupsContext";
import { getLastId } from "./groupIdUtils"; import { getLastId } from "./groupIdUtils";

View file

@ -6,8 +6,8 @@ import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared"; import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable"; import { KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
import { emptyFormatter } from "../util"; import { emptyFormatter } from "../util";
type MemberModalProps = { type MemberModalProps = {

View file

@ -3,32 +3,34 @@ import {
AlertVariant, AlertVariant,
Button, Button,
Checkbox, Checkbox,
Divider,
Dropdown,
DropdownItem,
DropdownList,
InputGroup, InputGroup,
InputGroupItem, InputGroupItem,
MenuToggle,
Spinner, Spinner,
Tooltip, Tooltip,
TreeView, TreeView,
TreeViewDataItem, TreeViewDataItem,
Dropdown,
MenuToggle,
DropdownList,
Divider,
DropdownItem,
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import {
PaginatingTableToolbar,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { AngleRightIcon, EllipsisVIcon } from "@patternfly/react-icons"; import { AngleRightIcon, EllipsisVIcon } from "@patternfly/react-icons";
import { unionBy } from "lodash-es"; import { unionBy } from "lodash-es";
import { useRef, useState } from "react"; import { useRef, 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 { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
import { PaginatingTableToolbar } from "../../components/table-toolbar/PaginatingTableToolbar";
import { useAccess } from "../../context/access/Access"; import { useAccess } from "../../context/access/Access";
import { fetchAdminUI } from "../../context/auth/admin-ui-endpoint"; import { fetchAdminUI } from "../../context/auth/admin-ui-endpoint";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useFetch } from "../../utils/useFetch";
import useToggle from "../../utils/useToggle"; import useToggle from "../../utils/useToggle";
import { GroupsModal } from "../GroupsModal"; import { GroupsModal } from "../GroupsModal";
import { useSubGroups } from "../SubGroupsContext"; import { useSubGroups } from "../SubGroupsContext";

View file

@ -1,6 +1,6 @@
import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation"; import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation";
import type { IdentityProvidersQuery } from "@keycloak/keycloak-admin-client/lib/resources/identityProviders"; import type { IdentityProvidersQuery } from "@keycloak/keycloak-admin-client/lib/resources/identityProviders";
import { IconMapper } from "@keycloak/keycloak-ui-shared"; import { IconMapper, useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
AlertVariant, AlertVariant,
Badge, Badge,
@ -26,20 +26,15 @@ import { Fragment, useState } from "react";
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 { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
import { ClickableCard } from "../components/keycloak-card/ClickableCard"; import { ClickableCard } from "../components/keycloak-card/ClickableCard";
import { import { Action, KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
Action,
KeycloakDataTable,
} from "../components/table-toolbar/KeycloakDataTable";
import { ViewHeader } from "../components/view-header/ViewHeader"; import { ViewHeader } from "../components/view-header/ViewHeader";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { useServerInfo } from "../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../context/server-info/ServerInfoProvider";
import helpUrls from "../help-urls"; import helpUrls from "../help-urls";
import { toEditOrganization } from "../organizations/routes/EditOrganization"; import { toEditOrganization } from "../organizations/routes/EditOrganization";
import { upperCaseFormatter } from "../util"; import { upperCaseFormatter } from "../util";
import { useFetch } from "../utils/useFetch";
import { ManageOrderDialog } from "./ManageOrderDialog"; import { ManageOrderDialog } from "./ManageOrderDialog";
import { toIdentityProvider } from "./routes/IdentityProvider"; import { toIdentityProvider } from "./routes/IdentityProvider";
import { toIdentityProviderCreate } from "./routes/IdentityProviderCreate"; import { toIdentityProviderCreate } from "./routes/IdentityProviderCreate";

View file

@ -1,4 +1,5 @@
import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation"; import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation";
import { useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
Button, Button,
ButtonVariant, ButtonVariant,
@ -22,9 +23,7 @@ import { sortBy } from "lodash-es";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner";
import { useFetch } from "../utils/useFetch";
type ManageOrderDialogProps = { type ManageOrderDialogProps = {
onClose: () => void; onClose: () => void;

View file

@ -1,6 +1,7 @@
import type IdentityProviderMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderMapperRepresentation"; import type IdentityProviderMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderMapperRepresentation";
import type { IdentityProviderMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/identityProviderMapperTypeRepresentation"; import type { IdentityProviderMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/identityProviderMapperTypeRepresentation";
import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation"; import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import { TextControl, useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
AlertVariant, AlertVariant,
@ -13,18 +14,15 @@ 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 "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { DynamicComponents } from "../../components/dynamic/DynamicComponents"; import { DynamicComponents } from "../../components/dynamic/DynamicComponents";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import type { AttributeForm } from "../../components/key-value-form/AttributeForm"; import type { AttributeForm } from "../../components/key-value-form/AttributeForm";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ViewHeader } from "../../components/view-header/ViewHeader"; import { ViewHeader } from "../../components/view-header/ViewHeader";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { convertFormValuesToObject, convertToFormValues } from "../../util"; import { convertFormValuesToObject, convertToFormValues } from "../../util";
import { useFetch } from "../../utils/useFetch";
import useLocaleSort, { mapByKey } from "../../utils/useLocaleSort"; import useLocaleSort, { mapByKey } from "../../utils/useLocaleSort";
import { useParams } from "../../utils/useParams"; import { useParams } from "../../utils/useParams";
import { import {

View file

@ -6,6 +6,7 @@ import {
KeycloakSelect, KeycloakSelect,
SelectControl, SelectControl,
SelectVariant, SelectVariant,
useFetch,
} from "@keycloak/keycloak-ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { import {
FormGroup, FormGroup,
@ -18,7 +19,6 @@ import { useState } from "react";
import { Controller, useFormContext, useWatch } from "react-hook-form"; import { Controller, useFormContext, useWatch } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { useFetch } from "../../utils/useFetch";
import useIsFeatureEnabled, { Feature } from "../../utils/useIsFeatureEnabled"; import useIsFeatureEnabled, { Feature } from "../../utils/useIsFeatureEnabled";
import type { FieldProps } from "../component/FormGroupField"; import type { FieldProps } from "../component/FormGroupField";
import { FormGroupField } from "../component/FormGroupField"; import { FormGroupField } from "../component/FormGroupField";

View file

@ -1,5 +1,12 @@
import type IdentityProviderMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderMapperRepresentation"; import type IdentityProviderMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderMapperRepresentation";
import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation"; import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation";
import {
Action,
KeycloakDataTable,
ScrollForm,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
AlertVariant, AlertVariant,
Button, Button,
@ -22,28 +29,22 @@ import {
} from "react-hook-form"; } 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 { ScrollForm } from "@keycloak/keycloak-ui-shared"; import { useAdminClient } from "../../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { DynamicComponents } from "../../components/dynamic/DynamicComponents"; import { DynamicComponents } from "../../components/dynamic/DynamicComponents";
import { FixedButtonsGroup } from "../../components/form/FixedButtonGroup"; import { FixedButtonsGroup } from "../../components/form/FixedButtonGroup";
import { FormAccess } from "../../components/form/FormAccess"; import { FormAccess } from "../../components/form/FormAccess";
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { PermissionsTab } from "../../components/permission-tab/PermissionTab"; import { PermissionsTab } from "../../components/permission-tab/PermissionTab";
import { import {
RoutableTabs, RoutableTabs,
useRoutableTab, useRoutableTab,
} from "../../components/routable-tabs/RoutableTabs"; } from "../../components/routable-tabs/RoutableTabs";
import {
Action,
KeycloakDataTable,
} from "../../components/table-toolbar/KeycloakDataTable";
import { ViewHeader } from "../../components/view-header/ViewHeader"; import { ViewHeader } from "../../components/view-header/ViewHeader";
import { useRealm } from "../../context/realm-context/RealmContext"; import { useRealm } from "../../context/realm-context/RealmContext";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
import { toUpperCase } from "../../util"; import { toUpperCase } from "../../util";
import { useFetch } from "../../utils/useFetch";
import useIsFeatureEnabled, { Feature } from "../../utils/useIsFeatureEnabled"; import useIsFeatureEnabled, { Feature } from "../../utils/useIsFeatureEnabled";
import { useParams } from "../../utils/useParams"; import { useParams } from "../../utils/useParams";
import { toIdentityProviderAddMapper } from "../routes/AddMapper"; import { toIdentityProviderAddMapper } from "../routes/AddMapper";
@ -63,7 +64,6 @@ import { OIDCAuthentication } from "./OIDCAuthentication";
import { OIDCGeneralSettings } from "./OIDCGeneralSettings"; import { OIDCGeneralSettings } from "./OIDCGeneralSettings";
import { ReqAuthnConstraints } from "./ReqAuthnConstraintsSettings"; import { ReqAuthnConstraints } from "./ReqAuthnConstraintsSettings";
import { SamlGeneralSettings } from "./SamlGeneralSettings"; import { SamlGeneralSettings } from "./SamlGeneralSettings";
import { useAdminClient } from "../../admin-client";
type HeaderProps = { type HeaderProps = {
onChange: (value: boolean) => void; onChange: (value: boolean) => void;

View file

@ -109,8 +109,6 @@ export { KeyValueInput } from "./components/key-value-form/KeyValueInput";
export { ValueSelect } from "./components/key-value-form/ValueSelect"; export { ValueSelect } from "./components/key-value-form/ValueSelect";
export { ClickableCard } from "./components/keycloak-card/ClickableCard"; export { ClickableCard } from "./components/keycloak-card/ClickableCard";
export { KeycloakCard } from "./components/keycloak-card/KeycloakCard"; export { KeycloakCard } from "./components/keycloak-card/KeycloakCard";
export { KeycloakSpinner } from "./components/keycloak-spinner/KeycloakSpinner";
export { ListEmptyState } from "./components/list-empty-state/ListEmptyState";
export { MultiLineInput } from "./components/multi-line-input/MultiLineInput"; export { MultiLineInput } from "./components/multi-line-input/MultiLineInput";
export { PermissionsTab } from "./components/permission-tab/PermissionTab"; export { PermissionsTab } from "./components/permission-tab/PermissionTab";
export { RealmSelector } from "./components/realm-selector/RealmSelector"; export { RealmSelector } from "./components/realm-selector/RealmSelector";
@ -119,9 +117,6 @@ export { AddRoleMappingModal } from "./components/role-mapping/AddRoleMappingMod
export { RoleMapping } from "./components/role-mapping/RoleMapping"; export { RoleMapping } from "./components/role-mapping/RoleMapping";
export { RolesList } from "./components/roles-list/RolesList"; export { RolesList } from "./components/roles-list/RolesList";
export { RoutableTabs } from "./components/routable-tabs/RoutableTabs"; export { RoutableTabs } from "./components/routable-tabs/RoutableTabs";
export { KeycloakDataTable } from "./components/table-toolbar/KeycloakDataTable";
export { PaginatingTableToolbar } from "./components/table-toolbar/PaginatingTableToolbar";
export { TableToolbar } from "./components/table-toolbar/TableToolbar";
export { TimeSelector } from "./components/time-selector/TimeSelector"; export { TimeSelector } from "./components/time-selector/TimeSelector";
export { TimeSelectorControl } from "./components/time-selector/TimeSelectorControl"; export { TimeSelectorControl } from "./components/time-selector/TimeSelectorControl";
export { TimeSelectorForm } from "./components/time-selector/TimeSelectorForm"; export { TimeSelectorForm } from "./components/time-selector/TimeSelectorForm";
@ -145,7 +140,7 @@ export { useWhoAmI, WhoAmIContextProvider } from "./context/whoami/WhoAmI";
export { export {
useErrorBoundary, useErrorBoundary,
ErrorBoundaryProvider, ErrorBoundaryProvider,
} from "./context/ErrorBoundary"; } from "@keycloak/keycloak-ui-shared";
export { useRecentRealms, RecentRealmsProvider } from "./context/RecentRealms"; export { useRecentRealms, RecentRealmsProvider } from "./context/RecentRealms";
export * as DashboardSection from "./dashboard/Dashboard"; export * as DashboardSection from "./dashboard/Dashboard";
export { ProviderInfo } from "./dashboard/ProviderInfo"; export { ProviderInfo } from "./dashboard/ProviderInfo";

View file

@ -1,4 +1,8 @@
import { FormSubmitButton } from "@keycloak/keycloak-ui-shared"; import {
FormSubmitButton,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
Button, Button,
@ -9,7 +13,6 @@ import {
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 { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { FormAccess } from "../components/form/FormAccess"; import { FormAccess } from "../components/form/FormAccess";
import { AttributesForm } from "../components/key-value-form/AttributeForm"; import { AttributesForm } from "../components/key-value-form/AttributeForm";
import { arrayToKeyValue } from "../components/key-value-form/key-value-convert"; import { arrayToKeyValue } from "../components/key-value-form/key-value-convert";
@ -18,9 +21,9 @@ import {
useRoutableTab, useRoutableTab,
} from "../components/routable-tabs/RoutableTabs"; } from "../components/routable-tabs/RoutableTabs";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { useFetch } from "../utils/useFetch";
import { useParams } from "../utils/useParams"; import { useParams } from "../utils/useParams";
import { DetailOrganizationHeader } from "./DetailOraganzationHeader"; import { DetailOrganizationHeader } from "./DetailOraganzationHeader";
import { IdentityProviders } from "./IdentityProviders";
import { Members } from "./Members"; import { Members } from "./Members";
import { import {
OrganizationForm, OrganizationForm,
@ -32,7 +35,6 @@ import {
OrganizationTab, OrganizationTab,
toEditOrganization, toEditOrganization,
} from "./routes/EditOrganization"; } from "./routes/EditOrganization";
import { IdentityProviders } from "./IdentityProviders";
export default function DetailOrganization() { export default function DetailOrganization() {
const { adminClient } = useAdminClient(); const { adminClient } = useAdminClient();

View file

@ -1,6 +1,10 @@
import IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation"; import IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation";
import { IdentityProvidersQuery } from "@keycloak/keycloak-admin-client/lib/resources/identityProviders"; import { IdentityProvidersQuery } from "@keycloak/keycloak-admin-client/lib/resources/identityProviders";
import { FormErrorText, HelpItem } from "@keycloak/keycloak-ui-shared"; import {
FormErrorText,
HelpItem,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
Button, Button,
Chip, Chip,
@ -21,8 +25,7 @@ import { Controller, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { ComponentProps } from "../components/dynamic/components"; import { ComponentProps } from "../components/dynamic/components";
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { useFetch } from "../utils/useFetch";
import useToggle from "../utils/useToggle"; import useToggle from "../utils/useToggle";
type IdentityProviderSelectProps = ComponentProps & { type IdentityProviderSelectProps = ComponentProps & {

View file

@ -1,4 +1,9 @@
import IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation"; import IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation";
import {
KeycloakDataTable,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared";
import { import {
Button, Button,
ButtonVariant, ButtonVariant,
@ -11,11 +16,8 @@ import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { useFetch } from "../utils/useFetch";
import useToggle from "../utils/useToggle"; import useToggle from "../utils/useToggle";
import { LinkIdentityProviderModal } from "./LinkIdentityProviderModal"; import { LinkIdentityProviderModal } from "./LinkIdentityProviderModal";
import { EditOrganizationParams } from "./routes/EditOrganization"; import { EditOrganizationParams } from "./routes/EditOrganization";

View file

@ -13,8 +13,8 @@ import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared"; import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable"; import { KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { MemberModal } from "../groups/MembersModal"; import { MemberModal } from "../groups/MembersModal";
import { toUser } from "../user/routes/User"; import { toUser } from "../user/routes/User";

View file

@ -1,12 +1,12 @@
import OrganizationRepresentation from "@keycloak/keycloak-admin-client/lib/defs/organizationRepresentation"; import OrganizationRepresentation from "@keycloak/keycloak-admin-client/lib/defs/organizationRepresentation";
import UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation"; import UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import { KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
import { Button, Modal, ModalVariant } from "@patternfly/react-core"; import { Button, Modal, ModalVariant } from "@patternfly/react-core";
import { TableText } from "@patternfly/react-table";
import { differenceBy } from "lodash-es"; import { differenceBy } from "lodash-es";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { TableText } from "@patternfly/react-table";
type OrganizationModalProps = { type OrganizationModalProps = {
isJoin?: boolean; isJoin?: boolean;

View file

@ -7,7 +7,7 @@ import { Link } from "react-router-dom";
import { import {
KeycloakDataTable, KeycloakDataTable,
LoaderFunction, LoaderFunction,
} from "../components/table-toolbar/KeycloakDataTable"; } from "@keycloak/keycloak-ui-shared";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { toEditOrganization } from "./routes/EditOrganization"; import { toEditOrganization } from "./routes/EditOrganization";

View file

@ -11,7 +11,7 @@ import { useTranslation } from "react-i18next";
import { Link, useNavigate } from "react-router-dom"; import { Link, useNavigate } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { ViewHeader } from "../components/view-header/ViewHeader"; import { ViewHeader } from "../components/view-header/ViewHeader";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { OrganizationTable } from "./OrganizationTable"; import { OrganizationTable } from "./OrganizationTable";

View file

@ -1,6 +1,8 @@
import { useAlerts } from "@keycloak/keycloak-ui-shared"; import ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { ButtonVariant, DropdownItem } from "@patternfly/react-core"; import { ButtonVariant, DropdownItem } from "@patternfly/react-core";
import { get } from "lodash-es"; import { get } from "lodash-es";
import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useNavigate, useParams } from "react-router-dom"; import { useNavigate, useParams } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
@ -11,9 +13,6 @@ import { useServerInfo } from "../context/server-info/ServerInfoProvider";
import { PageHandler } from "./PageHandler"; import { PageHandler } from "./PageHandler";
import { PAGE_PROVIDER } from "./PageList"; import { PAGE_PROVIDER } from "./PageList";
import { PageParams, toPage } from "./routes"; import { PageParams, toPage } from "./routes";
import { useFetch } from "../utils/useFetch";
import ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { useState } from "react";
export default function Page() { export default function Page() {
const { adminClient } = useAdminClient(); const { adminClient } = useAdminClient();

View file

@ -1,15 +1,14 @@
import ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation"; import ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import ComponentTypeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentTypeRepresentation"; import ComponentTypeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentTypeRepresentation";
import { useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { ActionGroup, Button, Form, PageSection } from "@patternfly/react-core"; import { ActionGroup, Button, Form, PageSection } from "@patternfly/react-core";
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 { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { DynamicComponents } from "../components/dynamic/DynamicComponents"; import { DynamicComponents } from "../components/dynamic/DynamicComponents";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { useFetch } from "../utils/useFetch";
import { useParams } from "../utils/useParams"; import { useParams } from "../utils/useParams";
import { type PAGE_PROVIDER, TAB_PROVIDER } from "./PageList"; import { type PAGE_PROVIDER, TAB_PROVIDER } from "./PageList";
import { toPage } from "./routes"; import { toPage } from "./routes";

View file

@ -14,8 +14,8 @@ import { useTranslation } from "react-i18next";
import { Link, useNavigate, useParams } from "react-router-dom"; import { Link, useNavigate, useParams } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable"; import { KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
import { ViewHeader } from "../components/view-header/ViewHeader"; import { ViewHeader } from "../components/view-header/ViewHeader";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { useServerInfo } from "../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../context/server-info/ServerInfoProvider";

View file

@ -1,4 +1,5 @@
import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation"; import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import { useAlerts, useFetch } from "@keycloak/keycloak-ui-shared";
import { import {
AlertVariant, AlertVariant,
ButtonVariant, ButtonVariant,
@ -24,7 +25,6 @@ import {
ClientRoleTab, ClientRoleTab,
toClientRole, toClientRole,
} from "../clients/routes/ClientRole"; } from "../clients/routes/ClientRole";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
import { import {
AttributeForm, AttributeForm,
@ -35,7 +35,7 @@ import {
arrayToKeyValue, arrayToKeyValue,
keyValueToArray, keyValueToArray,
} from "../components/key-value-form/key-value-convert"; } from "../components/key-value-form/key-value-convert";
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { PermissionsTab } from "../components/permission-tab/PermissionTab"; import { PermissionsTab } from "../components/permission-tab/PermissionTab";
import { RoleForm } from "../components/role-form/RoleForm"; import { RoleForm } from "../components/role-form/RoleForm";
import { AddRoleMappingModal } from "../components/role-mapping/AddRoleMappingModal"; import { AddRoleMappingModal } from "../components/role-mapping/AddRoleMappingModal";
@ -45,14 +45,13 @@ import {
useRoutableTab, useRoutableTab,
} from "../components/routable-tabs/RoutableTabs"; } from "../components/routable-tabs/RoutableTabs";
import { ViewHeader } from "../components/view-header/ViewHeader"; import { ViewHeader } from "../components/view-header/ViewHeader";
import { useAccess } from "../context/access/Access";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { useFetch } from "../utils/useFetch";
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled"; import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
import { useParams } from "../utils/useParams"; import { useParams } from "../utils/useParams";
import { UsersInRoleTab } from "./UsersInRoleTab"; import { UsersInRoleTab } from "./UsersInRoleTab";
import { RealmRoleRoute, RealmRoleTab, toRealmRole } from "./routes/RealmRole"; import { RealmRoleRoute, RealmRoleTab, toRealmRole } from "./routes/RealmRole";
import { toRealmRoles } from "./routes/RealmRoles"; import { toRealmRoles } from "./routes/RealmRoles";
import { useAccess } from "../context/access/Access";
export default function RealmRoleTabs() { export default function RealmRoleTabs() {
const { adminClient } = useAdminClient(); const { adminClient } = useAdminClient();

View file

@ -5,8 +5,8 @@ import { useNavigate } from "react-router-dom";
import { useHelp } from "@keycloak/keycloak-ui-shared"; import { useHelp } from "@keycloak/keycloak-ui-shared";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import type { ClientRoleParams } from "../clients/routes/ClientRole"; import type { ClientRoleParams } from "../clients/routes/ClientRole";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable"; import { KeycloakDataTable } from "@keycloak/keycloak-ui-shared";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { emptyFormatter, upperCaseFormatter } from "../util"; import { emptyFormatter, upperCaseFormatter } from "../util";
import { useParams } from "../utils/useParams"; import { useParams } from "../utils/useParams";

View file

@ -1,14 +1,13 @@
import type ClientProfileRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientProfileRepresentation"; import type ClientProfileRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientProfileRepresentation";
import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation"; import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import { KeycloakDataTable, useFetch } from "@keycloak/keycloak-ui-shared";
import { Button, Label, Modal, ModalVariant } from "@patternfly/react-core"; import { Button, Label, Modal, ModalVariant } from "@patternfly/react-core";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { translationFormatter } from "../utils/translationFormatter"; import { translationFormatter } from "../utils/translationFormatter";
import { useFetch } from "../utils/useFetch";
type ClientProfile = ClientProfileRepresentation & { type ClientProfile = ClientProfileRepresentation & {
global: boolean; global: boolean;

View file

@ -4,6 +4,8 @@ import {
HelpItem, HelpItem,
TextAreaControl, TextAreaControl,
TextControl, TextControl,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
@ -30,13 +32,11 @@ import { FormProvider, useFieldArray, 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 { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
import { FormAccess } from "../components/form/FormAccess"; import { FormAccess } from "../components/form/FormAccess";
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ViewHeader } from "../components/view-header/ViewHeader"; import { ViewHeader } from "../components/view-header/ViewHeader";
import { useServerInfo } from "../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../context/server-info/ServerInfoProvider";
import { useFetch } from "../utils/useFetch";
import { useParams } from "../utils/useParams"; import { useParams } from "../utils/useParams";
import { toAddExecutor } from "./routes/AddExecutor"; import { toAddExecutor } from "./routes/AddExecutor";
import { toClientPolicies } from "./routes/ClientPolicies"; import { toClientPolicies } from "./routes/ClientPolicies";

View file

@ -1,5 +1,11 @@
import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation"; import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
import { useHelp } from "@keycloak/keycloak-ui-shared"; import {
Action,
KeycloakDataTable,
useAlerts,
useFetch,
useHelp,
} from "@keycloak/keycloak-ui-shared";
import { import {
AlertVariant, AlertVariant,
Button, Button,
@ -18,18 +24,12 @@ import { useState } from "react";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
import { GroupPickerDialog } from "../components/group/GroupPickerDialog"; import { GroupPickerDialog } from "../components/group/GroupPickerDialog";
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner"; import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState"; import { ListEmptyState } from "@keycloak/keycloak-ui-shared";
import {
Action,
KeycloakDataTable,
} from "../components/table-toolbar/KeycloakDataTable";
import { useRealm } from "../context/realm-context/RealmContext"; import { useRealm } from "../context/realm-context/RealmContext";
import { toUserFederation } from "../user-federation/routes/UserFederation"; import { toUserFederation } from "../user-federation/routes/UserFederation";
import { useFetch } from "../utils/useFetch";
import useToggle from "../utils/useToggle"; import useToggle from "../utils/useToggle";
import { useAccess } from "../context/access/Access"; import { useAccess } from "../context/access/Access";

View file

@ -5,6 +5,8 @@ import {
HelpItem, HelpItem,
KeycloakSelect, KeycloakSelect,
SelectVariant, SelectVariant,
useAlerts,
useFetch,
} from "@keycloak/keycloak-ui-shared"; } from "@keycloak/keycloak-ui-shared";
import { import {
ActionGroup, ActionGroup,
@ -19,12 +21,10 @@ import { Controller, 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 { useAdminClient } from "../admin-client"; import { useAdminClient } from "../admin-client";
import { useAlerts } from "@keycloak/keycloak-ui-shared";
import { DynamicComponents } from "../components/dynamic/DynamicComponents"; import { DynamicComponents } from "../components/dynamic/DynamicComponents";
import { FormAccess } from "../components/form/FormAccess"; import { FormAccess } from "../components/form/FormAccess";
import { ViewHeader } from "../components/view-header/ViewHeader"; import { ViewHeader } from "../components/view-header/ViewHeader";
import { useServerInfo } from "../context/server-info/ServerInfoProvider"; import { useServerInfo } from "../context/server-info/ServerInfoProvider";
import { useFetch } from "../utils/useFetch";
import { useParams } from "../utils/useParams"; import { useParams } from "../utils/useParams";
import { ClientProfileParams, toClientProfile } from "./routes/ClientProfile"; import { ClientProfileParams, toClientProfile } from "./routes/ClientProfile";
import type { ExecutorParams } from "./routes/Executor"; import type { ExecutorParams } from "./routes/Executor";

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