Move useFetch()
to it's own utility file (#20129)
This commit is contained in:
parent
483246e24b
commit
cd6cf45444
93 changed files with 93 additions and 93 deletions
|
@ -26,11 +26,11 @@ import {
|
|||
} from "../components/routable-tabs/RoutableTabs";
|
||||
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import helpUrls from "../help-urls";
|
||||
import { addTrailingSlash } from "../util";
|
||||
import { getAuthorizationHeaders } from "../utils/getAuthorizationHeaders";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import useLocaleSort, { mapByKey } from "../utils/useLocaleSort";
|
||||
import useToggle from "../utils/useToggle";
|
||||
import { BindFlowDialog } from "./BindFlowDialog";
|
||||
|
|
|
@ -28,7 +28,7 @@ import { adminClient } from "../admin-client";
|
|||
import { useAlerts } from "../components/alert/Alerts";
|
||||
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import useToggle from "../utils/useToggle";
|
||||
import { BindFlowDialog } from "./BindFlowDialog";
|
||||
|
|
|
@ -7,8 +7,8 @@ import { useTranslation } from "react-i18next";
|
|||
import { adminClient } from "../admin-client";
|
||||
import { useAlerts } from "../components/alert/Alerts";
|
||||
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { toKey } from "../util";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { DraggableTable } from "./components/DraggableTable";
|
||||
|
||||
type DataType = RequiredActionProviderRepresentation &
|
||||
|
|
|
@ -10,7 +10,7 @@ import { useState } from "react";
|
|||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import type { ExpandableExecution } from "../execution-model";
|
||||
import { AddStepModal, FlowType } from "./modals/AddStepModal";
|
||||
import { AddSubFlowModal, Flow } from "./modals/AddSubFlowModal";
|
||||
|
|
|
@ -22,7 +22,7 @@ import { adminClient } from "../../admin-client";
|
|||
import { useAlerts } from "../../components/alert/Alerts";
|
||||
import { DynamicComponents } from "../../components/dynamic/DynamicComponents";
|
||||
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { convertFormValuesToObject, convertToFormValues } from "../../util";
|
||||
import type { ExpandableExecution } from "../execution-model";
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import { useTranslation } from "react-i18next";
|
|||
|
||||
import { adminClient } from "../../../admin-client";
|
||||
import { PaginatingTableToolbar } from "../../../components/table-toolbar/PaginatingTableToolbar";
|
||||
import { useFetch } from "../../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../../utils/useFetch";
|
||||
import useLocaleSort, { mapByKey } from "../../../utils/useLocaleSort";
|
||||
import { providerConditionFilter } from "../../FlowDetails";
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import { HelpItem } from "ui-shared";
|
|||
|
||||
import { adminClient } from "../../../admin-client";
|
||||
import { KeycloakTextInput } from "../../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { useFetch } from "../../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../../utils/useFetch";
|
||||
|
||||
type AddSubFlowProps = {
|
||||
name: string;
|
||||
|
|
|
@ -5,8 +5,8 @@ import { useTranslation } from "react-i18next";
|
|||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { CibaPolicy } from "./CibaPolicy";
|
||||
import { OtpPolicy } from "./OtpPolicy";
|
||||
import { PasswordPolicy } from "./PasswordPolicy";
|
||||
|
|
|
@ -32,9 +32,9 @@ import {
|
|||
useRoutableTab,
|
||||
} from "../components/routable-tabs/RoutableTabs";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { convertFormValuesToObject } from "../util";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { useParams } from "../utils/useParams";
|
||||
import { MapperList } from "./details/MapperList";
|
||||
import { ScopeForm } from "./details/ScopeForm";
|
||||
|
|
|
@ -24,10 +24,10 @@ import { DynamicComponents } from "../../components/dynamic/DynamicComponents";
|
|||
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { ViewHeader } from "../../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
|
||||
import { convertFormValuesToObject, convertToFormValues } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { useParams } from "../../utils/useParams";
|
||||
import { toClientScope } from "../routes/ClientScope";
|
||||
import { MapperParams, MapperRoute } from "../routes/Mapper";
|
||||
|
|
|
@ -37,7 +37,6 @@ import {
|
|||
ViewHeaderBadge,
|
||||
} from "../components/view-header/ViewHeader";
|
||||
import { useAccess } from "../context/access/Access";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import {
|
||||
convertAttributeNameToForm,
|
||||
|
@ -45,6 +44,7 @@ import {
|
|||
convertToFormValues,
|
||||
exportClient,
|
||||
} from "../util";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
|
||||
import { useParams } from "../utils/useParams";
|
||||
import useToggle from "../utils/useToggle";
|
||||
|
|
|
@ -18,9 +18,9 @@ import { FormAccess } from "../../components/form-access/FormAccess";
|
|||
import { KeyValueInput } from "../../components/key-value-form/KeyValueInput";
|
||||
import { MultiLineInput } from "../../components/multi-line-input/MultiLineInput";
|
||||
import { TimeSelector } from "../../components/time-selector/TimeSelector";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { convertAttributeNameToForm } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { FormFields } from "../ClientDetails";
|
||||
import { TokenLifespan } from "./TokenLifespan";
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import { HelpItem } from "ui-shared";
|
|||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
|
||||
type AuthenticationOverridesProps = {
|
||||
save: () => void;
|
||||
|
|
|
@ -34,8 +34,8 @@ import { KeycloakTextInput } from "../../components/keycloak-text-input/Keycloak
|
|||
import { FormPanel } from "../../components/scroll-form/FormPanel";
|
||||
import { UserSelect } from "../../components/users/UserSelect";
|
||||
import { useAccess } from "../../context/access/Access";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { FormFields } from "../ClientDetails";
|
||||
import { defaultContextAttributes } from "../utils";
|
||||
import { KeyBasedAttributeInput } from "./KeyBasedAttributeInput";
|
||||
|
|
|
@ -16,7 +16,7 @@ import { useAlerts } from "../../components/alert/Alerts";
|
|||
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { KeycloakTextArea } from "../../components/keycloak-text-area/KeycloakTextArea";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { prettyPrintJSON } from "../../util";
|
||||
import { useParams } from "../../utils/useParams";
|
||||
import type { ClientParams } from "../routes/Client";
|
||||
|
|
|
@ -4,7 +4,7 @@ import { useState } from "react";
|
|||
import { adminClient } from "../../admin-client";
|
||||
|
||||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { toPermissionDetails } from "../routes/PermissionDetails";
|
||||
import { toScopeDetails } from "../routes/Scope";
|
||||
|
|
|
@ -26,7 +26,7 @@ import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinn
|
|||
import { KeycloakTextArea } from "../../components/keycloak-text-area/KeycloakTextArea";
|
||||
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { ViewHeader } from "../../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { toUpperCase } from "../../util";
|
||||
import { useParams } from "../../utils/useParams";
|
||||
import { toAuthorizationTab } from "../routes/AuthenticationTab";
|
||||
|
|
|
@ -31,8 +31,8 @@ import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"
|
|||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
|
||||
import { PaginatingTableToolbar } from "../../components/table-toolbar/PaginatingTableToolbar";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import useToggle from "../../utils/useToggle";
|
||||
import { toNewPermission } from "../routes/NewPermission";
|
||||
import { toPermissionDetails } from "../routes/PermissionDetails";
|
||||
|
|
|
@ -27,9 +27,9 @@ import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"
|
|||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
|
||||
import { PaginatingTableToolbar } from "../../components/table-toolbar/PaginatingTableToolbar";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { toUpperCase } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import useToggle from "../../utils/useToggle";
|
||||
import { toCreatePolicy } from "../routes/NewPolicy";
|
||||
import { toPermissionDetails } from "../routes/PermissionDetails";
|
||||
|
|
|
@ -29,8 +29,8 @@ import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinn
|
|||
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { MultiLineInput } from "../../components/multi-line-input/MultiLineInput";
|
||||
import { ViewHeader } from "../../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { convertFormValuesToObject, convertToFormValues } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { useParams } from "../../utils/useParams";
|
||||
import { toAuthorizationTab } from "../routes/AuthenticationTab";
|
||||
import { ResourceDetailsParams, toResourceDetails } from "../routes/Resource";
|
||||
|
|
|
@ -26,8 +26,8 @@ import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"
|
|||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
|
||||
import { PaginatingTableToolbar } from "../../components/table-toolbar/PaginatingTableToolbar";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { toNewPermission } from "../routes/NewPermission";
|
||||
import { toCreateResource } from "../routes/NewResource";
|
||||
import { toResourceDetails } from "../routes/Resource";
|
||||
|
|
|
@ -10,7 +10,7 @@ import { Controller, useFormContext } from "react-hook-form";
|
|||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
|
||||
type Type = "resources" | "policies";
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import { useAlerts } from "../../components/alert/Alerts";
|
|||
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { ViewHeader } from "../../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { useParams } from "../../utils/useParams";
|
||||
import useToggle from "../../utils/useToggle";
|
||||
import { toAuthorizationTab } from "../routes/AuthenticationTab";
|
||||
|
|
|
@ -11,7 +11,7 @@ import { useTranslation } from "react-i18next";
|
|||
import { HelpItem } from "ui-shared";
|
||||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
|
||||
type Scope = {
|
||||
id: string;
|
||||
|
|
|
@ -5,7 +5,7 @@ import { Controller, useFormContext } from "react-hook-form";
|
|||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
|
||||
type ScopeSelectProps = {
|
||||
clientId: string;
|
||||
|
|
|
@ -23,8 +23,8 @@ import { adminClient } from "../../admin-client";
|
|||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
|
||||
import { PaginatingTableToolbar } from "../../components/table-toolbar/PaginatingTableToolbar";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import useToggle from "../../utils/useToggle";
|
||||
import { toNewPermission } from "../routes/NewPermission";
|
||||
import { toNewScope } from "../routes/NewScope";
|
||||
|
|
|
@ -17,7 +17,7 @@ import { adminClient } from "../../admin-client";
|
|||
import { useAlerts } from "../../components/alert/Alerts";
|
||||
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import useToggle from "../../utils/useToggle";
|
||||
import { SaveReset } from "../advanced/SaveReset";
|
||||
import { DecisionStrategySelect } from "./DecisionStrategySelect";
|
||||
|
|
|
@ -12,7 +12,7 @@ import { useTranslation } from "react-i18next";
|
|||
import { HelpItem } from "ui-shared";
|
||||
|
||||
import { adminClient } from "../../../admin-client";
|
||||
import { useFetch } from "../../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../../utils/useFetch";
|
||||
|
||||
export const Client = () => {
|
||||
const { t } = useTranslation("clients");
|
||||
|
|
|
@ -15,7 +15,7 @@ import { useTranslation } from "react-i18next";
|
|||
import { HelpItem } from "ui-shared";
|
||||
|
||||
import { adminClient } from "../../../admin-client";
|
||||
import { useFetch } from "../../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../../utils/useFetch";
|
||||
import useLocaleSort, { mapByKey } from "../../../utils/useLocaleSort";
|
||||
import { AddScopeDialog } from "../../scopes/AddScopeDialog";
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import { HelpItem } from "ui-shared";
|
|||
import { adminClient } from "../../../admin-client";
|
||||
import { GroupPickerDialog } from "../../../components/group/GroupPickerDialog";
|
||||
import { KeycloakTextInput } from "../../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { useFetch } from "../../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../../utils/useFetch";
|
||||
|
||||
type GroupForm = {
|
||||
groups?: GroupValue[];
|
||||
|
|
|
@ -18,7 +18,7 @@ import { useConfirmDialog } from "../../../components/confirm-dialog/ConfirmDial
|
|||
import { FormAccess } from "../../../components/form-access/FormAccess";
|
||||
import { KeycloakSpinner } from "../../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { ViewHeader } from "../../../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../../utils/useFetch";
|
||||
import { useParams } from "../../../utils/useParams";
|
||||
import { toAuthorizationTab } from "../../routes/AuthenticationTab";
|
||||
import {
|
||||
|
|
|
@ -16,7 +16,7 @@ import { HelpItem } from "ui-shared";
|
|||
import { adminClient } from "../../../admin-client";
|
||||
import { AddRoleMappingModal } from "../../../components/role-mapping/AddRoleMappingModal";
|
||||
import { Row, ServiceRole } from "../../../components/role-mapping/RoleMapping";
|
||||
import { useFetch } from "../../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../../utils/useFetch";
|
||||
import type { RequiredIdValue } from "./ClientScope";
|
||||
|
||||
export const Role = () => {
|
||||
|
|
|
@ -26,7 +26,7 @@ import { adminClient } from "../../admin-client";
|
|||
import { useAlerts } from "../../components/alert/Alerts";
|
||||
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
|
||||
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { FormFields } from "../ClientDetails";
|
||||
import { ClientSecret } from "./ClientSecret";
|
||||
import { SignedJWT } from "./SignedJWT";
|
||||
|
|
|
@ -24,8 +24,8 @@ import { adminClient } from "../../admin-client";
|
|||
import { useAlerts } from "../../components/alert/Alerts";
|
||||
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { convertAttributeNameToForm } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import useToggle from "../../utils/useToggle";
|
||||
import { FormFields } from "../ClientDetails";
|
||||
import { Certificate } from "./Certificate";
|
||||
|
|
|
@ -23,8 +23,8 @@ import { useAlerts } from "../../components/alert/Alerts";
|
|||
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
|
||||
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||
import { FormPanel } from "../../components/scroll-form/FormPanel";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { convertAttributeNameToForm } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import useToggle from "../../utils/useToggle";
|
||||
import { FormFields } from "../ClientDetails";
|
||||
import { Certificate } from "./Certificate";
|
||||
|
|
|
@ -11,8 +11,8 @@ import {
|
|||
Action,
|
||||
KeycloakDataTable,
|
||||
} from "../../components/table-toolbar/KeycloakDataTable";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import useToggle from "../../utils/useToggle";
|
||||
import { toRegistrationProvider } from "../routes/AddRegistrationProvider";
|
||||
import { ClientRegistrationParams } from "../routes/ClientRegistration";
|
||||
|
|
|
@ -23,8 +23,8 @@ import { FormAccess } from "../../components/form-access/FormAccess";
|
|||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { ViewHeader } from "../../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { useParams } from "../../utils/useParams";
|
||||
import {
|
||||
RegistrationProviderParams,
|
||||
|
|
|
@ -20,7 +20,7 @@ import {
|
|||
useRoutableTab,
|
||||
} from "../../components/routable-tabs/RoutableTabs";
|
||||
import { ViewHeader } from "../../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { useParams } from "../../utils/useParams";
|
||||
import {
|
||||
DedicatedScopeDetailsParams,
|
||||
|
|
|
@ -30,10 +30,10 @@ import { HelpItem, useHelp } from "ui-shared";
|
|||
import { adminClient } from "../../admin-client";
|
||||
import { KeycloakDataTable } from "../../components/table-toolbar/KeycloakDataTable";
|
||||
import { UserSelect } from "../../components/users/UserSelect";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
|
||||
import { prettyPrintJSON } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { GeneratedCodeTab } from "./GeneratedCodeTab";
|
||||
|
||||
import "./evaluate.css";
|
||||
|
|
|
@ -12,9 +12,9 @@ import { useAlerts } from "../../components/alert/Alerts";
|
|||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { RoleMapping, Row } from "../../components/role-mapping/RoleMapping";
|
||||
import { useAccess } from "../../context/access/Access";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { toUser } from "../../user/routes/User";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
|
||||
import "./service-account.css";
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { useTranslation } from "react-i18next";
|
|||
import { HelpItem } from "ui-shared";
|
||||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import type { ComponentProps } from "../dynamic/components";
|
||||
|
||||
type ClientSelectProps = ComponentProps & {
|
||||
|
|
|
@ -14,11 +14,11 @@ import { useTranslation } from "react-i18next";
|
|||
|
||||
import { HelpItem, useHelp } from "ui-shared";
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
|
||||
import { addTrailingSlash, prettyPrintJSON } from "../../util";
|
||||
import { getAuthorizationHeaders } from "../../utils/getAuthorizationHeaders";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { ConfirmDialogModal } from "../confirm-dialog/ConfirmDialog";
|
||||
import { KeycloakTextArea } from "../keycloak-text-area/KeycloakTextArea";
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import { useState } from "react";
|
|||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { ListEmptyState } from "../list-empty-state/ListEmptyState";
|
||||
import { PaginatingTableToolbar } from "../table-toolbar/PaginatingTableToolbar";
|
||||
import { GroupPath } from "./GroupPath";
|
||||
|
|
|
@ -25,8 +25,8 @@ import { HelpItem } from "ui-shared";
|
|||
import { adminClient } from "../../admin-client";
|
||||
import { toPermissionDetails } from "../../clients/routes/PermissionDetails";
|
||||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import useLocaleSort from "../../utils/useLocaleSort";
|
||||
import { useConfirmDialog } from "../confirm-dialog/ConfirmDialog";
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ import { Link, To, useNavigate } from "react-router-dom";
|
|||
import { HelpItem } from "ui-shared";
|
||||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { toRealmSettings } from "../../realm-settings/routes/RealmSettings";
|
||||
import { emptyFormatter, upperCaseFormatter } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { useAlerts } from "../alert/Alerts";
|
||||
import { useConfirmDialog } from "../confirm-dialog/ConfirmDialog";
|
||||
import { KeycloakSpinner } from "../keycloak-spinner/KeycloakSpinner";
|
||||
|
|
|
@ -16,8 +16,8 @@ import {
|
|||
import { cloneDeep, differenceBy, get } from "lodash-es";
|
||||
import {
|
||||
ComponentClass,
|
||||
isValidElement,
|
||||
ReactNode,
|
||||
isValidElement,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useRef,
|
||||
|
@ -25,8 +25,8 @@ import {
|
|||
} from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useStoredState } from "ui-shared";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { KeycloakSpinner } from "../keycloak-spinner/KeycloakSpinner";
|
||||
import { ListEmptyState } from "../list-empty-state/ListEmptyState";
|
||||
import { PaginatingTableToolbar } from "./PaginatingTableToolbar";
|
||||
|
|
|
@ -13,7 +13,7 @@ import { useTranslation } from "react-i18next";
|
|||
import { HelpItem } from "ui-shared";
|
||||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import useToggle from "../../utils/useToggle";
|
||||
import type { ComponentProps } from "../dynamic/components";
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import { createNamedContext, useRequiredContext } from "ui-shared";
|
|||
|
||||
import { adminClient } from "../admin-client";
|
||||
import { keycloak } from "../keycloak";
|
||||
import { useFetch } from "./auth/AdminClient";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
|
||||
type RealmsContextProps = {
|
||||
/** A list of all the realms. */
|
||||
|
|
|
@ -4,7 +4,7 @@ import { createNamedContext, useRequiredContext } from "ui-shared";
|
|||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { sortProviders } from "../../util";
|
||||
import { useFetch } from "../auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
|
||||
export const ServerInfoContext = createNamedContext<
|
||||
ServerInfoRepresentation | undefined
|
||||
|
|
|
@ -6,7 +6,7 @@ import { createNamedContext, useRequiredContext } from "ui-shared";
|
|||
import { adminClient } from "../../admin-client";
|
||||
import environment from "../../environment";
|
||||
import i18n, { DEFAULT_LOCALE } from "../../i18n";
|
||||
import { useFetch } from "../auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
|
||||
export class WhoAmI {
|
||||
constructor(private me?: WhoAmIRepresentation) {
|
||||
|
|
|
@ -42,11 +42,11 @@ import {
|
|||
} from "../components/routable-tabs/RoutableTabs";
|
||||
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import helpUrls from "../help-urls";
|
||||
import { toRealmSettings } from "../realm-settings/routes/RealmSettings";
|
||||
import { toUser } from "../user/routes/User";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import useFormatDate, { FORMAT_DATE_AND_TIME } from "../utils/useFormatDate";
|
||||
import { AdminEvents } from "./AdminEvents";
|
||||
import { EventsTab, toEvents } from "./routes/Events";
|
||||
|
|
|
@ -21,9 +21,9 @@ import { GroupBreadCrumbs } from "../components/bread-crumb/GroupBreadCrumbs";
|
|||
import { PermissionsTab } from "../components/permission-tab/PermissionTab";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useAccess } from "../context/access/Access";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import helpUrls from "../help-urls";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
|
||||
import useToggle from "../utils/useToggle";
|
||||
import { GroupAttributes } from "./GroupAttributes";
|
||||
|
|
|
@ -21,10 +21,10 @@ import { useAlerts } from "../../components/alert/Alerts";
|
|||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { PaginatingTableToolbar } from "../../components/table-toolbar/PaginatingTableToolbar";
|
||||
import { useAccess } from "../../context/access/Access";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { fetchAdminUI } from "../../context/auth/admin-ui-endpoint";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { joinPath } from "../../utils/joinPath";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import useToggle from "../../utils/useToggle";
|
||||
import { GroupsModal } from "../GroupsModal";
|
||||
import { useSubGroups } from "../SubGroupsContext";
|
||||
|
|
|
@ -34,11 +34,11 @@ import {
|
|||
KeycloakDataTable,
|
||||
} from "../components/table-toolbar/KeycloakDataTable";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
||||
import helpUrls from "../help-urls";
|
||||
import { upperCaseFormatter } from "../util";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { ManageOrderDialog } from "./ManageOrderDialog";
|
||||
import { toIdentityProvider } from "./routes/IdentityProvider";
|
||||
import { toIdentityProviderCreate } from "./routes/IdentityProviderCreate";
|
||||
|
|
|
@ -25,9 +25,9 @@ import type { AttributeForm } from "../../components/key-value-form/AttributeFor
|
|||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { ViewHeader } from "../../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { convertFormValuesToObject, convertToFormValues } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import useLocaleSort, { mapByKey } from "../../utils/useLocaleSort";
|
||||
import { useParams } from "../../utils/useParams";
|
||||
import {
|
||||
|
|
|
@ -11,7 +11,7 @@ import { useTranslation } from "react-i18next";
|
|||
import { HelpItem } from "ui-shared";
|
||||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import type { FieldProps } from "../component/FormGroupField";
|
||||
import { SwitchField } from "../component/SwitchField";
|
||||
import { TextField } from "../component/TextField";
|
||||
|
|
|
@ -35,9 +35,9 @@ import {
|
|||
KeycloakDataTable,
|
||||
} from "../../components/table-toolbar/KeycloakDataTable";
|
||||
import { ViewHeader } from "../../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { toUpperCase } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import useIsFeatureEnabled, { Feature } from "../../utils/useIsFeatureEnabled";
|
||||
import { useParams } from "../../utils/useParams";
|
||||
import { ExtendedFieldsForm } from "../component/ExtendedFieldsForm";
|
||||
|
|
|
@ -42,8 +42,8 @@ import {
|
|||
useRoutableTab,
|
||||
} from "../components/routable-tabs/RoutableTabs";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
|
||||
import { useParams } from "../utils/useParams";
|
||||
import { UsersInRoleTab } from "./UsersInRoleTab";
|
||||
|
|
|
@ -8,7 +8,7 @@ import { adminClient } from "../admin-client";
|
|||
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
|
||||
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
|
||||
type ClientProfile = ClientProfileRepresentation & {
|
||||
global: boolean;
|
||||
|
|
|
@ -36,8 +36,8 @@ import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner"
|
|||
import { KeycloakTextArea } from "../components/keycloak-text-area/KeycloakTextArea";
|
||||
import { KeycloakTextInput } from "../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { useParams } from "../utils/useParams";
|
||||
import { toAddExecutor } from "./routes/AddExecutor";
|
||||
import { toClientPolicies } from "./routes/ClientPolicies";
|
||||
|
|
|
@ -27,9 +27,9 @@ import {
|
|||
Action,
|
||||
KeycloakDataTable,
|
||||
} from "../components/table-toolbar/KeycloakDataTable";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { toUserFederation } from "../user-federation/routes/UserFederation";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import useToggle from "../utils/useToggle";
|
||||
|
||||
export const DefaultsGroupsTab = () => {
|
||||
|
|
|
@ -22,8 +22,8 @@ import { useAlerts } from "../components/alert/Alerts";
|
|||
import { DynamicComponents } from "../components/dynamic/DynamicComponents";
|
||||
import { FormAccess } from "../components/form-access/FormAccess";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { useParams } from "../utils/useParams";
|
||||
import { ClientProfileParams, toClientProfile } from "./routes/ClientProfile";
|
||||
import type { ExecutorParams } from "./routes/Executor";
|
||||
|
|
|
@ -43,12 +43,12 @@ import type { KeyValueType } from "../components/key-value-form/key-value-conver
|
|||
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
|
||||
import { FormPanel } from "../components/scroll-form/FormPanel";
|
||||
import { PaginatingTableToolbar } from "../components/table-toolbar/PaginatingTableToolbar";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
||||
import { useWhoAmI } from "../context/whoami/WhoAmI";
|
||||
import { DEFAULT_LOCALE } from "../i18n";
|
||||
import { convertToFormValues } from "../util";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { AddMessageBundleModal } from "./AddMessageBundleModal";
|
||||
|
||||
type LocalizationTabProps = {
|
||||
|
|
|
@ -17,8 +17,8 @@ import { adminClient } from "../admin-client";
|
|||
import { useAlerts } from "../components/alert/Alerts";
|
||||
import { ScrollForm } from "../components/scroll-form/ScrollForm";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { convertToFormValues } from "../util";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { useParams } from "../utils/useParams";
|
||||
import type { AttributeParams } from "./routes/Attribute";
|
||||
import { toUserProfile } from "./routes/UserProfile";
|
||||
|
|
|
@ -24,9 +24,9 @@ import { useAlerts } from "../components/alert/Alerts";
|
|||
import { DynamicComponents } from "../components/dynamic/DynamicComponents";
|
||||
import { FormAccess } from "../components/form-access/FormAccess";
|
||||
import { FormPanel } from "../components/scroll-form/FormPanel";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { toEditClientPolicy } from "./routes/EditClientPolicy";
|
||||
import type { EditClientPolicyConditionParams } from "./routes/EditCondition";
|
||||
|
||||
|
|
|
@ -35,9 +35,9 @@ import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner"
|
|||
import { KeycloakTextArea } from "../components/keycloak-text-area/KeycloakTextArea";
|
||||
import { KeycloakTextInput } from "../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { useParams } from "../utils/useParams";
|
||||
import { AddClientProfileModal } from "./AddClientProfileModal";
|
||||
import { toNewClientPolicyCondition } from "./routes/AddCondition";
|
||||
|
|
|
@ -27,9 +27,9 @@ import {
|
|||
Action,
|
||||
KeycloakDataTable,
|
||||
} from "../components/table-toolbar/KeycloakDataTable";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { prettyPrintJSON } from "../util";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { toAddClientPolicy } from "./routes/AddClientPolicy";
|
||||
import { toClientPolicies } from "./routes/ClientPolicies";
|
||||
import { toEditClientPolicy } from "./routes/EditClientPolicy";
|
||||
|
|
|
@ -29,9 +29,9 @@ import {
|
|||
Action,
|
||||
KeycloakDataTable,
|
||||
} from "../components/table-toolbar/KeycloakDataTable";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { prettyPrintJSON } from "../util";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { toAddClientProfile } from "./routes/AddClientProfile";
|
||||
import { toClientProfile } from "./routes/ClientProfile";
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { useState } from "react";
|
|||
|
||||
import { adminClient } from "../admin-client";
|
||||
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { useParams } from "../utils/useParams";
|
||||
import { RealmSettingsTabs } from "./RealmSettingsTabs";
|
||||
import type { RealmSettingsParams } from "./routes/RealmSettings";
|
||||
|
|
|
@ -8,8 +8,8 @@ import { adminClient } from "../admin-client";
|
|||
import { useAlerts } from "../components/alert/Alerts";
|
||||
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { RoleMapping } from "../components/role-mapping/RoleMapping";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { DefaultsGroupsTab } from "./DefaultGroupsTab";
|
||||
|
||||
export const UserRegistration = () => {
|
||||
|
|
|
@ -17,9 +17,9 @@ import { adminClient } from "../../admin-client";
|
|||
import { useAlerts } from "../../components/alert/Alerts";
|
||||
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
|
||||
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { convertToFormValues } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { AddEventTypesDialog } from "./AddEventTypesDialog";
|
||||
import { EventConfigForm, EventsType } from "./EventConfigForm";
|
||||
import { EventListenersForm } from "./EventListenersForm";
|
||||
|
|
|
@ -19,9 +19,9 @@ import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"
|
|||
import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
|
||||
import { KeycloakDataTable } from "../../components/table-toolbar/KeycloakDataTable";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { emptyFormatter } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import useToggle from "../../utils/useToggle";
|
||||
import { toKeysTab } from "../routes/KeysTab";
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ import {
|
|||
RoutableTabs,
|
||||
useRoutableTab,
|
||||
} from "../../components/routable-tabs/RoutableTabs";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { KEY_PROVIDER_TYPE } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { KeySubTab, toKeysTab } from "../routes/KeysTab";
|
||||
import { KeysListTab } from "./KeysListTab";
|
||||
import { KeysProvidersTab } from "./KeysProvidersTab";
|
||||
|
|
|
@ -19,9 +19,9 @@ import { DynamicComponents } from "../../../components/dynamic/DynamicComponents
|
|||
import { FormAccess } from "../../../components/form-access/FormAccess";
|
||||
import { KeycloakTextInput } from "../../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { ViewHeader } from "../../../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../../../context/auth/AdminClient";
|
||||
import { useServerInfo } from "../../../context/server-info/ServerInfoProvider";
|
||||
import { KEY_PROVIDER_TYPE } from "../../../util";
|
||||
import { useFetch } from "../../../utils/useFetch";
|
||||
import { useParams } from "../../../utils/useParams";
|
||||
import { KeyProviderParams, ProviderType } from "../../routes/KeyProvider";
|
||||
import { toKeysTab } from "../../routes/KeysTab";
|
||||
|
|
|
@ -6,8 +6,8 @@ import { createNamedContext, useRequiredContext } from "ui-shared";
|
|||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { useAlerts } from "../../components/alert/Alerts";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
|
||||
type UserProfileProps = {
|
||||
config: UserProfileConfig | null;
|
||||
|
|
|
@ -19,7 +19,7 @@ import { adminClient } from "../../../admin-client";
|
|||
import { FormAccess } from "../../../components/form-access/FormAccess";
|
||||
import { KeycloakSpinner } from "../../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { KeycloakTextInput } from "../../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { useFetch } from "../../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../../utils/useFetch";
|
||||
import { useParams } from "../../../utils/useParams";
|
||||
import { USERNAME_EMAIL } from "../../NewAttributeSettings";
|
||||
import type { AttributeParams } from "../../routes/Attribute";
|
||||
|
|
|
@ -18,9 +18,9 @@ import { useTranslation } from "react-i18next";
|
|||
import { adminClient } from "../admin-client";
|
||||
import { useAlerts } from "../components/alert/Alerts";
|
||||
import { KeycloakTextInput } from "../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { emailRegexPattern } from "../util";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
|
||||
type RevocationModalProps = {
|
||||
handleModalToggle: () => void;
|
||||
|
|
|
@ -12,8 +12,8 @@ import { useNavigate } from "react-router-dom";
|
|||
|
||||
import { adminClient } from "../admin-client";
|
||||
import { useAlerts } from "../components/alert/Alerts";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { useParams } from "../utils/useParams";
|
||||
import { KerberosSettingsRequired } from "./kerberos/KerberosSettingsRequired";
|
||||
import { toUserFederation } from "./routes/UserFederation";
|
||||
|
|
|
@ -17,8 +17,8 @@ import {
|
|||
RoutableTabs,
|
||||
useRoutableTab,
|
||||
} from "../components/routable-tabs/RoutableTabs";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import {
|
||||
LdapComponentRepresentation,
|
||||
UserFederationLdapForm,
|
||||
|
|
|
@ -24,11 +24,11 @@ import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
|
|||
import { ClickableCard } from "../components/keycloak-card/ClickableCard";
|
||||
import { KeycloakCard } from "../components/keycloak-card/KeycloakCard";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
||||
import helpUrls from "../help-urls";
|
||||
import { toUpperCase } from "../util";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { ManagePriorityDialog } from "./ManagePriorityDialog";
|
||||
import { toCustomUserFederation } from "./routes/CustomUserFederation";
|
||||
import { toNewCustomUserFederation } from "./routes/NewCustomUserFederation";
|
||||
|
|
|
@ -16,10 +16,10 @@ import { useAlerts } from "../../components/alert/Alerts";
|
|||
import { DynamicComponents } from "../../components/dynamic/DynamicComponents";
|
||||
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
|
||||
import { convertFormValuesToObject, convertToFormValues } from "../../util";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
import { useParams } from "../../utils/useParams";
|
||||
import type { CustomUserFederationRouteParams } from "../routes/CustomUserFederation";
|
||||
import { toUserFederation } from "../routes/UserFederation";
|
||||
|
|
|
@ -15,8 +15,8 @@ import { adminClient } from "../../admin-client";
|
|||
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { WizardSectionHeader } from "../../components/wizard-section-header/WizardSectionHeader";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
|
||||
export type KerberosSettingsRequiredProps = {
|
||||
form: UseFormReturn;
|
||||
|
|
|
@ -14,8 +14,8 @@ import { adminClient } from "../../admin-client";
|
|||
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { WizardSectionHeader } from "../../components/wizard-section-header/WizardSectionHeader";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
|
||||
export type LdapSettingsGeneralProps = {
|
||||
form: UseFormReturn<ComponentRepresentation>;
|
||||
|
|
|
@ -29,9 +29,9 @@ import { FormAccess } from "../../../components/form-access/FormAccess";
|
|||
import { KeycloakSpinner } from "../../../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { KeycloakTextInput } from "../../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { ViewHeader } from "../../../components/view-header/ViewHeader";
|
||||
import { useFetch } from "../../../context/auth/AdminClient";
|
||||
import { useRealm } from "../../../context/realm-context/RealmContext";
|
||||
import { convertFormValuesToObject, convertToFormValues } from "../../../util";
|
||||
import { useFetch } from "../../../utils/useFetch";
|
||||
import { useParams } from "../../../utils/useParams";
|
||||
import { toUserFederationLdap } from "../../routes/UserFederationLdap";
|
||||
import { UserFederationLdapMapperParams } from "../../routes/UserFederationLdapMapper";
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
Action,
|
||||
KeycloakDataTable,
|
||||
} from "../../../components/table-toolbar/KeycloakDataTable";
|
||||
import { useFetch } from "../../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../../utils/useFetch";
|
||||
import useLocaleSort, { mapByKey } from "../../../utils/useLocaleSort";
|
||||
|
||||
export type LdapMapperListProps = {
|
||||
|
|
|
@ -21,9 +21,9 @@ import {
|
|||
} from "../components/routable-tabs/RoutableTabs";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useAccess } from "../context/access/Access";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { UserProfileProvider } from "../realm-settings/user-profile/UserProfileContext";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { useParams } from "../utils/useParams";
|
||||
import { useUpdateEffect } from "../utils/useUpdateEffect";
|
||||
import { UserAttributes } from "./UserAttributes";
|
||||
|
|
|
@ -6,9 +6,9 @@ import { Link } from "react-router-dom";
|
|||
|
||||
import { adminClient } from "../admin-client";
|
||||
import { useAccess } from "../context/access/Access";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { toUserFederationLdap } from "../user-federation/routes/UserFederationLdap";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
|
||||
type FederatedUserLinkProps = {
|
||||
user: UserRepresentation;
|
||||
|
|
|
@ -32,8 +32,8 @@ import { useAlerts } from "../components/alert/Alerts";
|
|||
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
|
||||
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner";
|
||||
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { toUpperCase } from "../util";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import { FederatedUserLink } from "./FederatedUserLink";
|
||||
import { CredentialRow } from "./user-credentials/CredentialRow";
|
||||
import { InlineLabelEdit } from "./user-credentials/InlineLabelEdit";
|
||||
|
|
|
@ -23,9 +23,9 @@ import { FormAccess } from "../components/form-access/FormAccess";
|
|||
import { GroupPickerDialog } from "../components/group/GroupPickerDialog";
|
||||
import { KeycloakTextInput } from "../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { useAccess } from "../context/access/Access";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { emailRegexPattern } from "../util";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import useFormatDate from "../utils/useFormatDate";
|
||||
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
|
||||
import { FederatedUserLink } from "./FederatedUserLink";
|
||||
|
|
|
@ -47,10 +47,10 @@ import {
|
|||
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
|
||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||
import { useAccess } from "../context/access/Access";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import helpUrls from "../help-urls";
|
||||
import { emptyFormatter } from "../util";
|
||||
import { useFetch } from "../utils/useFetch";
|
||||
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
|
||||
import { toAddUser } from "./routes/AddUser";
|
||||
import { toUser } from "./routes/User";
|
||||
|
|
|
@ -11,7 +11,7 @@ import { useTranslation } from "react-i18next";
|
|||
import { HelpItem } from "ui-shared";
|
||||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { useFetch } from "../../context/auth/AdminClient";
|
||||
import { useFetch } from "../../utils/useFetch";
|
||||
|
||||
type RequiredActionMultiSelectProps = {
|
||||
name: string;
|
||||
|
|
|
@ -2,8 +2,8 @@ import UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRep
|
|||
import { useState } from "react";
|
||||
|
||||
import { adminClient } from "../admin-client";
|
||||
import { useFetch } from "../context/auth/AdminClient";
|
||||
import { useWhoAmI } from "../context/whoami/WhoAmI";
|
||||
import { useFetch } from "./useFetch";
|
||||
|
||||
export function useCurrentUser() {
|
||||
const { whoAmI } = useWhoAmI();
|
||||
|
|
Loading…
Reference in a new issue