@@ -227,7 +227,7 @@ export const PermissionsTab = ({ id, type }: PermissionsTabProps) => {
id: realmId,
permissionType: "scope",
permissionId: id,
- })
+ }),
);
},
},
diff --git a/js/apps/admin-ui/src/components/realm-selector/RealmSelector.tsx b/js/apps/admin-ui/src/components/realm-selector/RealmSelector.tsx
index 8de0c03830..e56907e31e 100644
--- a/js/apps/admin-ui/src/components/realm-selector/RealmSelector.tsx
+++ b/js/apps/admin-ui/src/components/realm-selector/RealmSelector.tsx
@@ -97,13 +97,13 @@ export const RealmSelector = () => {
.concat(
realms
.filter(
- (r) => !recentRealms.includes(r.realm!) || r.realm === realm
+ (r) => !recentRealms.includes(r.realm!) || r.realm === realm,
)
.map((r) => {
return { name: r.realm!, used: false };
- })
+ }),
),
- [recentRealms, realm, realms]
+ [recentRealms, realm, realms],
);
const filteredItems = useMemo(
@@ -111,9 +111,9 @@ export const RealmSelector = () => {
search.trim() === ""
? all
: all.filter((r) =>
- r.name.toLowerCase().includes(search.toLowerCase())
+ r.name.toLowerCase().includes(search.toLowerCase()),
),
- [search, all]
+ [search, all],
);
return realms.length > 5 ? (
diff --git a/js/apps/admin-ui/src/components/role-mapping/AddRoleMappingModal.tsx b/js/apps/admin-ui/src/components/role-mapping/AddRoleMappingModal.tsx
index 6bbd13f43a..d90ee4f7a1 100644
--- a/js/apps/admin-ui/src/components/role-mapping/AddRoleMappingModal.tsx
+++ b/js/apps/admin-ui/src/components/role-mapping/AddRoleMappingModal.tsx
@@ -47,7 +47,7 @@ export const AddRoleMappingModal = ({
const [searchToggle, setSearchToggle] = useState(false);
const [filterType, setFilterType] = useState(
- canViewRealmRoles ? "roles" : "clients"
+ canViewRealmRoles ? "roles" : "clients",
);
const [selectedRows, setSelectedRows] = useState([]);
const [key, setKey] = useState(0);
@@ -59,7 +59,7 @@ export const AddRoleMappingModal = ({
const loader = async (
first?: number,
max?: number,
- search?: string
+ search?: string,
): Promise => {
const params: Record = {
first: first!,
@@ -83,7 +83,7 @@ export const AddRoleMappingModal = ({
const clientRolesLoader = async (
first?: number,
max?: number,
- search?: string
+ search?: string,
): Promise => {
const roles = await getAvailableClientRoles({
id,
@@ -99,7 +99,7 @@ export const AddRoleMappingModal = ({
role: { id: e.id, name: e.role, description: e.description },
id: e.id,
})),
- ({ client: { clientId }, role: { name } }) => `${clientId}${name}`
+ ({ client: { clientId }, role: { name } }) => `${clientId}${name}`,
);
};
diff --git a/js/apps/admin-ui/src/components/role-mapping/RoleMapping.tsx b/js/apps/admin-ui/src/components/role-mapping/RoleMapping.tsx
index bc40116c31..a626d79077 100644
--- a/js/apps/admin-ui/src/components/role-mapping/RoleMapping.tsx
+++ b/js/apps/admin-ui/src/components/role-mapping/RoleMapping.tsx
@@ -38,7 +38,7 @@ export type Row = {
export const mapRoles = (
assignedRoles: Row[],
effectiveRoles: Row[],
- hide: boolean
+ hide: boolean,
) => [
...(hide
? assignedRoles.map((row) => ({
@@ -126,7 +126,7 @@ export const RoleMapping = ({
client.mappings.map((role: RoleRepresentation) => ({
client: { clientId: client.client, ...client },
role,
- }))
+ })),
)
.flat();
@@ -134,7 +134,7 @@ export const RoleMapping = ({
...mapRoles(
[...realmRolesMapping, ...clientMapping],
[...effectiveClientRoles, ...effectiveRoles],
- hide
+ hide,
),
];
};
diff --git a/js/apps/admin-ui/src/components/role-mapping/queries.ts b/js/apps/admin-ui/src/components/role-mapping/queries.ts
index 51670a9a67..7c34723443 100644
--- a/js/apps/admin-ui/src/components/role-mapping/queries.ts
+++ b/js/apps/admin-ui/src/components/role-mapping/queries.ts
@@ -122,13 +122,13 @@ export const deleteMapping = (type: ResourcesKey, id: string, rows: Row[]) =>
client: row.client?.id,
roles: [role],
},
- [role]
+ [role],
);
});
export const getMapping = async (
type: ResourcesKey,
- id: string
+ id: string,
): Promise => {
const query = mapping[type]!.listEffective[0];
const result = applyQuery(type, query, { id });
@@ -146,7 +146,7 @@ export const getMapping = async (
role.containerId = client?.clientId;
return { ...client, mappings: [role] };
- })
+ }),
);
return {
@@ -157,7 +157,7 @@ export const getMapping = async (
export const getEffectiveRoles = async (
type: ResourcesKey,
- id: string
+ id: string,
): Promise => {
const query = mapping[type]!.listEffective[1];
if (type !== "roles") {
@@ -169,14 +169,14 @@ export const getEffectiveRoles = async (
const parentRoles = await Promise.all(
roles
.filter((r) => r.composite)
- .map((r) => applyQuery(type, query, { id: r.id }))
+ .map((r) => applyQuery(type, query, { id: r.id })),
);
return [...roles, ...parentRoles.flat()].map((role) => ({ role }));
};
export const getAvailableRoles = async (
type: ResourcesKey,
- params: Record
+ params: Record,
): Promise => {
const query = mapping[type]!.listAvailable[1];
return (await applyQuery(type, query, params)).map((role) => ({
diff --git a/js/apps/admin-ui/src/components/role-mapping/resource.ts b/js/apps/admin-ui/src/components/role-mapping/resource.ts
index 43bd0b74a9..e0dc11d6f3 100644
--- a/js/apps/admin-ui/src/components/role-mapping/resource.ts
+++ b/js/apps/admin-ui/src/components/role-mapping/resource.ts
@@ -42,12 +42,12 @@ const fetchEndpoint = async ({
});
export const getAvailableClientRoles = (
- query: PaginatingQuery
+ query: PaginatingQuery,
): Promise =>
fetchEndpoint({ ...query, endpoint: "available-roles" });
export const getEffectiveClientRoles = (
- query: EffectiveClientRolesQuery
+ query: EffectiveClientRolesQuery,
): Promise =>
fetchEndpoint({ ...query, endpoint: "effective-roles" });
diff --git a/js/apps/admin-ui/src/components/roles-list/RolesList.tsx b/js/apps/admin-ui/src/components/roles-list/RolesList.tsx
index 7c676e0ec4..3bf8f6c54b 100644
--- a/js/apps/admin-ui/src/components/roles-list/RolesList.tsx
+++ b/js/apps/admin-ui/src/components/roles-list/RolesList.tsx
@@ -58,7 +58,7 @@ type RolesListProps = {
loader?: (
first?: number,
max?: number,
- search?: string
+ search?: string,
) => Promise;
};
@@ -84,7 +84,7 @@ export const RolesList = ({
(realm) => {
setRealm(realm);
},
- []
+ [],
);
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
@@ -150,7 +150,7 @@ export const RolesList = ({
) {
addAlert(
t("defaultRoleDeleteError"),
- AlertVariant.danger
+ AlertVariant.danger,
);
} else toggleDeleteDialog();
},
diff --git a/js/apps/admin-ui/src/components/routable-tabs/RoutableTabs.tsx b/js/apps/admin-ui/src/components/routable-tabs/RoutableTabs.tsx
index 708b9b5a5b..e84dcd3712 100644
--- a/js/apps/admin-ui/src/components/routable-tabs/RoutableTabs.tsx
+++ b/js/apps/admin-ui/src/components/routable-tabs/RoutableTabs.tsx
@@ -40,7 +40,7 @@ export const RoutableTabs = ({
// Determine if there is an exact match.
const exactMatch = eventKeys.find(
- (eventKey) => eventKey === decodeURI(pathname)
+ (eventKey) => eventKey === decodeURI(pathname),
);
// Determine which event keys at least partially match the current path, then sort them so the nearest match ends up on top.
diff --git a/js/apps/admin-ui/src/components/scroll-form/ScrollForm.tsx b/js/apps/admin-ui/src/components/scroll-form/ScrollForm.tsx
index 7a73bf4c48..40ad0e99a0 100644
--- a/js/apps/admin-ui/src/components/scroll-form/ScrollForm.tsx
+++ b/js/apps/admin-ui/src/components/scroll-form/ScrollForm.tsx
@@ -38,7 +38,7 @@ export const ScrollForm = ({
const { t } = useTranslation("common");
const shownSections = useMemo(
() => sections.filter(({ isHidden }) => !isHidden),
- [sections]
+ [sections],
);
return (
diff --git a/js/apps/admin-ui/src/components/table-toolbar/KeycloakDataTable.tsx b/js/apps/admin-ui/src/components/table-toolbar/KeycloakDataTable.tsx
index eecf3c9345..e4bf02bd14 100644
--- a/js/apps/admin-ui/src/components/table-toolbar/KeycloakDataTable.tsx
+++ b/js/apps/admin-ui/src/components/table-toolbar/KeycloakDataTable.tsx
@@ -128,7 +128,7 @@ export type Action = IAction & {
export type LoaderFunction = (
first?: number,
max?: number,
- search?: string
+ search?: string,
) => Promise;
export type DataListProps = Omit<
@@ -210,7 +210,7 @@ export function KeycloakDataTable({
const [defaultPageSize, setDefaultPageSize] = useStoredState(
localStorage,
"pageSize",
- 10
+ 10,
);
const [max, setMax] = useState(defaultPageSize);
@@ -272,7 +272,7 @@ export function KeycloakDataTable({
return getNodeText(
isValidElement((node as TitleCell).title)
? (node as TitleCell).title.props
- : Object.values(node)
+ : Object.values(node),
);
}
return "";
@@ -287,11 +287,13 @@ export function KeycloakDataTable({
row.cells.some(
(cell) =>
cell &&
- getNodeText(cell).toLowerCase().includes(search.toLowerCase())
- )
+ getNodeText(cell)
+ .toLowerCase()
+ .includes(search.toLowerCase()),
+ ),
)
.slice(first, first + max + 1),
- [search, first, max]
+ [search, first, max],
);
useEffect(() => {
@@ -301,7 +303,7 @@ export function KeycloakDataTable({
.item(0);
if (checkboxes) {
const checkAllCheckbox = checkboxes.children!.item(
- 0
+ 0,
)! as HTMLInputElement;
checkAllCheckbox.indeterminate =
selected.length > 0 &&
@@ -338,7 +340,13 @@ export function KeycloakDataTable({
setRows(result);
setLoading(false);
},
- [key, first, max, search, typeof loader !== "function" ? loader : undefined]
+ [
+ key,
+ first,
+ max,
+ search,
+ typeof loader !== "function" ? loader : undefined,
+ ],
);
const convertAction = () =>
@@ -347,7 +355,7 @@ export function KeycloakDataTable({
delete action.onRowClick;
action.onClick = async (_, rowIndex) => {
const result = await actions[index].onRowClick!(
- (filteredData || rows)![rowIndex].data
+ (filteredData || rows)![rowIndex].data,
);
if (result) {
if (!isPaginated) {
@@ -366,7 +374,7 @@ export function KeycloakDataTable({
data!.map((row) => {
(row as Row).selected = isSelected;
return row;
- })
+ }),
);
} else {
(data![rowIndex] as Row).selected = isSelected;
@@ -378,7 +386,7 @@ export function KeycloakDataTable({
const difference = differenceBy(
selected,
data!.map((row) => row.data),
- "id"
+ "id",
);
// Selected rows are any rows previously selected from a different page, plus current page selections
diff --git a/js/apps/admin-ui/src/components/time-selector/TimeSelector.tsx b/js/apps/admin-ui/src/components/time-selector/TimeSelector.tsx
index 4457311f57..1344f09bbf 100644
--- a/js/apps/admin-ui/src/components/time-selector/TimeSelector.tsx
+++ b/js/apps/admin-ui/src/components/time-selector/TimeSelector.tsx
@@ -36,7 +36,7 @@ export const getTimeUnit = (value: number | undefined = 0) =>
value % time.multiplier === 0 && v.multiplier < time.multiplier
? time
: v,
- allTimes[0]
+ allTimes[0],
);
export const toHumanFormat = (value: number, locale: string) => {
@@ -62,7 +62,7 @@ export const TimeSelector = ({
const defaultMultiplier = useMemo(
() => allTimes.find((time) => time.unit === units[0])?.multiplier,
- [units]
+ [units],
);
const [timeValue, setTimeValue] = useState<"" | number>("");
@@ -71,7 +71,7 @@ export const TimeSelector = ({
const times = useMemo(() => {
const filteredUnits = units.map(
- (unit) => allTimes.find((time) => time.unit === unit)!
+ (unit) => allTimes.find((time) => time.unit === unit)!,
);
if (
!filteredUnits.every((u) => u.multiplier === multiplier) &&
@@ -96,7 +96,7 @@ export const TimeSelector = ({
const updateTimeout = (
timeout: "" | number,
- times: number | undefined = multiplier
+ times: number | undefined = multiplier,
) => {
if (timeout !== "") {
onChange?.(timeout * (times || 1));
diff --git a/js/apps/admin-ui/src/components/users/UserDataTable.tsx b/js/apps/admin-ui/src/components/users/UserDataTable.tsx
index e52c3cb174..b073b38ef7 100644
--- a/js/apps/admin-ui/src/components/users/UserDataTable.tsx
+++ b/js/apps/admin-ui/src/components/users/UserDataTable.tsx
@@ -82,18 +82,18 @@ export function UserDataTable() {
return [[], {}, {}] as [
ComponentRepresentation[],
RealmRepresentation | undefined,
- UserProfileConfig
+ UserProfileConfig,
];
}
},
([storageProviders, realm, profile]) => {
setUserStorage(
- storageProviders.filter((p) => p.config?.enabled[0] === "true")
+ storageProviders.filter((p) => p.config?.enabled[0] === "true"),
);
setRealm(realm);
setProfile(profile);
},
- []
+ [],
);
const UserDetailLink = (user: UserRepresentation) => (
@@ -215,7 +215,7 @@ export function UserDataTable() {
const clearAllFilters = () => {
const filtered = [...activeFilters].filter(
- (chip) => chip.name !== chip.name
+ (chip) => chip.name !== chip.name,
);
setActiveFilters(filtered);
setSearchUser("");
@@ -251,7 +251,7 @@ export function UserDataTable() {
event.stopPropagation();
const filtered = [...activeFilters].filter(
- (chip) => chip.name !== entry.name
+ (chip) => chip.name !== entry.name,
);
const attributes = createQueryString(filtered);
diff --git a/js/apps/admin-ui/src/components/users/UserDataTableAttributeSearchForm.tsx b/js/apps/admin-ui/src/components/users/UserDataTableAttributeSearchForm.tsx
index 7c07933110..8a2a9cf82e 100644
--- a/js/apps/admin-ui/src/components/users/UserDataTableAttributeSearchForm.tsx
+++ b/js/apps/admin-ui/src/components/users/UserDataTableAttributeSearchForm.tsx
@@ -120,7 +120,7 @@ export function UserDataTableAttributeSearchForm({
const clearActiveFilters = () => {
const filtered = [...activeFilters].filter(
- (chip) => chip.name !== chip.name
+ (chip) => chip.name !== chip.name,
);
setActiveFilters(filtered);
};
diff --git a/js/apps/admin-ui/src/components/users/UserSelect.tsx b/js/apps/admin-ui/src/components/users/UserSelect.tsx
index f1e9a5f528..c8f9c67d96 100644
--- a/js/apps/admin-ui/src/components/users/UserSelect.tsx
+++ b/js/apps/admin-ui/src/components/users/UserSelect.tsx
@@ -55,13 +55,13 @@ export const UserSelect = ({
if (values?.length && !search) {
return Promise.all(
- values.map((id: string) => adminClient.users.findOne({ id }))
+ values.map((id: string) => adminClient.users.findOne({ id })),
);
}
return adminClient.users.find(params);
},
setUsers,
- [search]
+ [search],
);
const convert = (clients: (UserRepresentation | undefined)[]) =>
@@ -117,7 +117,7 @@ export const UserSelect = ({
: field.onChange([option]);
} else {
const changedValue = field.value.find(
- (v: string) => v === option
+ (v: string) => v === option,
)
? field.value.filter((v: string) => v !== option)
: [...field.value, option];
diff --git a/js/apps/admin-ui/src/context/RealmsContext.tsx b/js/apps/admin-ui/src/context/RealmsContext.tsx
index d3055b0bd6..d83b30e1a3 100644
--- a/js/apps/admin-ui/src/context/RealmsContext.tsx
+++ b/js/apps/admin-ui/src/context/RealmsContext.tsx
@@ -17,7 +17,7 @@ type RealmsContextProps = {
export const RealmsContext = createNamedContext(
"RealmsContext",
- undefined
+ undefined,
);
export const RealmsProvider = ({ children }: PropsWithChildren) => {
@@ -46,7 +46,7 @@ export const RealmsProvider = ({ children }: PropsWithChildren) => {
}
},
(realms) => updateRealms(realms),
- [refreshCount]
+ [refreshCount],
);
const refresh = useCallback(async () => {
@@ -58,7 +58,7 @@ export const RealmsProvider = ({ children }: PropsWithChildren) => {
const value = useMemo(
() => ({ realms, refresh }),
- [realms, refresh]
+ [realms, refresh],
);
return (
diff --git a/js/apps/admin-ui/src/context/RecentRealms.tsx b/js/apps/admin-ui/src/context/RecentRealms.tsx
index e25f9d9eec..d6262704e8 100644
--- a/js/apps/admin-ui/src/context/RecentRealms.tsx
+++ b/js/apps/admin-ui/src/context/RecentRealms.tsx
@@ -13,7 +13,7 @@ const MAX_REALMS = 4;
export const RecentRealmsContext = createNamedContext(
"RecentRealmsContext",
- undefined
+ undefined,
);
export const RecentRealmsProvider = ({ children }: PropsWithChildren) => {
@@ -22,12 +22,12 @@ export const RecentRealmsProvider = ({ children }: PropsWithChildren) => {
const [storedRealms, setStoredRealms] = useStoredState(
localStorage,
"recentRealms",
- [realm]
+ [realm],
);
const recentRealms = useMemo(
() => filterRealmNames(realms, storedRealms),
- [realms, storedRealms]
+ [realms, storedRealms],
);
useEffect(() => {
diff --git a/js/apps/admin-ui/src/context/access/Access.tsx b/js/apps/admin-ui/src/context/access/Access.tsx
index 655efc9f6c..81a3d0f39b 100644
--- a/js/apps/admin-ui/src/context/access/Access.tsx
+++ b/js/apps/admin-ui/src/context/access/Access.tsx
@@ -11,7 +11,7 @@ type AccessContextProps = {
export const AccessContext = createNamedContext(
"AccessContext",
- undefined
+ undefined,
);
export const useAccess = () => useRequiredContext(AccessContext);
diff --git a/js/apps/admin-ui/src/context/auth/admin-ui-endpoint.ts b/js/apps/admin-ui/src/context/auth/admin-ui-endpoint.ts
index 8a59075775..e3e3e91c63 100644
--- a/js/apps/admin-ui/src/context/auth/admin-ui-endpoint.ts
+++ b/js/apps/admin-ui/src/context/auth/admin-ui-endpoint.ts
@@ -4,7 +4,7 @@ import { joinPath } from "../../utils/joinPath";
export async function fetchAdminUI(
endpoint: string,
- query?: Record
+ query?: Record,
): Promise {
const accessToken = await adminClient.getAccessToken();
const baseUrl = adminClient.baseUrl;
@@ -15,7 +15,7 @@ export async function fetchAdminUI(
{
method: "GET",
headers: getAuthorizationHeaders(accessToken),
- }
+ },
);
return await response.json();
diff --git a/js/apps/admin-ui/src/context/realm-context/RealmContext.tsx b/js/apps/admin-ui/src/context/realm-context/RealmContext.tsx
index a5400acb5b..9137891035 100644
--- a/js/apps/admin-ui/src/context/realm-context/RealmContext.tsx
+++ b/js/apps/admin-ui/src/context/realm-context/RealmContext.tsx
@@ -12,7 +12,7 @@ type RealmContextType = {
export const RealmContext = createNamedContext(
"RealmContext",
- undefined
+ undefined,
);
export const RealmContextProvider = ({ children }: PropsWithChildren) => {
@@ -24,7 +24,7 @@ export const RealmContextProvider = ({ children }: PropsWithChildren) => {
const realmParam = routeMatch?.params.realm;
const realm = useMemo(
() => realmParam ?? environment.loginRealm,
- [realmParam]
+ [realmParam],
);
// Configure admin client to use selected realm when it changes.
diff --git a/js/apps/admin-ui/src/context/whoami/WhoAmI.tsx b/js/apps/admin-ui/src/context/whoami/WhoAmI.tsx
index 6eedb790ee..fe91c62320 100644
--- a/js/apps/admin-ui/src/context/whoami/WhoAmI.tsx
+++ b/js/apps/admin-ui/src/context/whoami/WhoAmI.tsx
@@ -59,7 +59,7 @@ type WhoAmIProps = {
export const WhoAmIContext = createNamedContext(
"WhoAmIContext",
- undefined
+ undefined,
);
export const useWhoAmI = () => useRequiredContext(WhoAmIContext);
@@ -74,7 +74,7 @@ export const WhoAmIContextProvider = ({ children }: PropsWithChildren) => {
const whoAmI = new WhoAmI(me);
setWhoAmI(whoAmI);
},
- [key]
+ [key],
);
return (
diff --git a/js/apps/admin-ui/src/dashboard/Dashboard.tsx b/js/apps/admin-ui/src/dashboard/Dashboard.tsx
index 8f8e9e992a..829c9e2fdf 100644
--- a/js/apps/admin-ui/src/dashboard/Dashboard.tsx
+++ b/js/apps/admin-ui/src/dashboard/Dashboard.tsx
@@ -89,9 +89,9 @@ const Dashboard = () => {
() =>
localeSort(
serverInfo.profileInfo?.disabledFeatures ?? [],
- (item) => item
+ (item) => item,
),
- [serverInfo.profileInfo]
+ [serverInfo.profileInfo],
);
const enabledFeatures = useMemo(
@@ -100,15 +100,15 @@ const Dashboard = () => {
filter(
union(
serverInfo.profileInfo?.experimentalFeatures,
- serverInfo.profileInfo?.previewFeatures
+ serverInfo.profileInfo?.previewFeatures,
),
(feature) => {
return !isDeprecatedFeature(feature);
- }
+ },
),
- (item) => item
+ (item) => item,
),
- [serverInfo.profileInfo]
+ [serverInfo.profileInfo],
);
const useTab = (tab: DashboardTab) =>
@@ -116,7 +116,7 @@ const Dashboard = () => {
toDashboard({
realm,
tab,
- })
+ }),
);
const infoTab = useTab("info");
diff --git a/js/apps/admin-ui/src/dashboard/ProviderInfo.tsx b/js/apps/admin-ui/src/dashboard/ProviderInfo.tsx
index 3ae1436747..10db08ace9 100644
--- a/js/apps/admin-ui/src/dashboard/ProviderInfo.tsx
+++ b/js/apps/admin-ui/src/dashboard/ProviderInfo.tsx
@@ -22,9 +22,9 @@ export const ProviderInfo = () => {
const providerInfo = useMemo(
() =>
Object.entries(serverInfo.providers || []).filter(([key]) =>
- key.includes(filter)
+ key.includes(filter),
),
- [filter]
+ [filter],
);
const toggleOpen = (option: string) => {
@@ -78,14 +78,14 @@ export const ProviderInfo = () => {
{key} |
{value} |
|
- )
+ ),
)}