diff --git a/js/apps/account-ui/src/account-security/DeviceActivity.tsx b/js/apps/account-ui/src/account-security/DeviceActivity.tsx index 92927c4176..35cb3b1929 100644 --- a/js/apps/account-ui/src/account-security/DeviceActivity.tsx +++ b/js/apps/account-ui/src/account-security/DeviceActivity.tsx @@ -69,7 +69,7 @@ const DeviceActivity = () => { const signOutSession = async ( session: SessionRepresentation, - device: DeviceRepresentation + device: DeviceRepresentation, ) => { try { await deleteSession(session.id); @@ -233,7 +233,7 @@ const DeviceActivity = () => { - )) + )), )} diff --git a/js/apps/account-ui/src/account-security/LinkedAccounts.tsx b/js/apps/account-ui/src/account-security/LinkedAccounts.tsx index f13aec9320..5ca9081179 100644 --- a/js/apps/account-ui/src/account-security/LinkedAccounts.tsx +++ b/js/apps/account-ui/src/account-security/LinkedAccounts.tsx @@ -19,12 +19,12 @@ const LinkedAccounts = () => { const linkedAccounts = useMemo( () => accounts.filter((account) => account.connected), - [accounts] + [accounts], ); const unLinkedAccounts = useMemo( () => accounts.filter((account) => !account.connected), - [accounts] + [accounts], ); return ( diff --git a/js/apps/account-ui/src/account-security/SigningIn.tsx b/js/apps/account-ui/src/account-security/SigningIn.tsx index e8ac936124..9ce181d086 100644 --- a/js/apps/account-ui/src/account-security/SigningIn.tsx +++ b/js/apps/account-ui/src/account-security/SigningIn.tsx @@ -76,7 +76,7 @@ const SigningIn = () => { usePromise((signal) => getCredentials({ signal }), setCredentials, [key]); const credentialRowCells = ( - credMetadata: CredentialMetadataRepresentation + credMetadata: CredentialMetadataRepresentation, ) => { const credential = credMetadata.credential; const maxWidth = { "--pf-u-max-width--MaxWidth": "300px" } as CSSProperties; @@ -98,7 +98,7 @@ const SigningIn = () => { {{ date: formatDate(new Date(credential.createdDate)) }} - + , ); } return items; @@ -188,7 +188,7 @@ const SigningIn = () => { addAlert( t("successRemovedMessage", { userLabel: label(meta.credential), - }) + }), ); refresh(); } catch (error) { @@ -196,7 +196,7 @@ const SigningIn = () => { t("errorRemovedMessage", { userLabel: label(meta.credential), error, - }).toString() + }).toString(), ); } }} diff --git a/js/apps/account-ui/src/api.ts b/js/apps/account-ui/src/api.ts index ea7ed82244..3f9e5a6ef1 100644 --- a/js/apps/account-ui/src/api.ts +++ b/js/apps/account-ui/src/api.ts @@ -7,13 +7,13 @@ import { joinPath } from "./utils/joinPath"; export const fetchResources = async ( params: RequestInit, requestParams: Record, - shared: boolean | undefined = false + shared: boolean | undefined = false, ): Promise<{ data: Resource[]; links: Links }> => { const response = await get( `/resources${shared ? "/shared-with-me?" : "?"}${new URLSearchParams( - requestParams + requestParams, )}`, - params + params, ); let links: Links; @@ -32,11 +32,11 @@ export const fetchResources = async ( export const fetchPermission = async ( params: RequestInit, - resourceId: string + resourceId: string, ): Promise => { const response = await request( `/resources/${resourceId}/permissions`, - params + params, ); return checkResponse(response); }; @@ -44,7 +44,7 @@ export const fetchPermission = async ( export const updateRequest = ( resourceId: string, username: string, - scopes: Scope[] | string[] + scopes: Scope[] | string[], ) => request(`/resources/${resourceId}/permissions`, { method: "put", @@ -53,7 +53,7 @@ export const updateRequest = ( export const updatePermissions = ( resourceId: string, - permissions: Permission[] + permissions: Permission[], ) => request(`/resources/${resourceId}/permissions`, { method: "put", @@ -71,7 +71,7 @@ async function get(path: string, params: RequestInit): Promise { "realms", environment.realm, "account", - path + path, ); const response = await fetch(url, { @@ -90,7 +90,7 @@ async function get(path: string, params: RequestInit): Promise { async function request( path: string, - params: RequestInit + params: RequestInit, ): Promise { const response = await get(path, params); if (response.status !== 204) return response.json(); diff --git a/js/apps/account-ui/src/api/methods.ts b/js/apps/account-ui/src/api/methods.ts index fe431b2318..0ba65ade12 100644 --- a/js/apps/account-ui/src/api/methods.ts +++ b/js/apps/account-ui/src/api/methods.ts @@ -37,7 +37,7 @@ export async function getSupportedLocales({ } export async function savePersonalInfo( - info: UserRepresentation + info: UserRepresentation, ): Promise { const response = await request("/", { body: info, method: "POST" }); if (!response.ok) { @@ -49,11 +49,11 @@ export async function savePersonalInfo( export async function getPermissionRequests( resourceId: string, - { signal }: CallOptions = {} + { signal }: CallOptions = {}, ): Promise { const response = await request( `/resources/${resourceId}/permissions/requests`, - { signal } + { signal }, ); return parseResponse(response); @@ -110,7 +110,7 @@ export async function unLinkAccount(account: LinkedAccountRepresentation) { export async function linkAccount(account: LinkedAccountRepresentation) { const redirectUri = encodeURIComponent( - joinPath(environment.authUrl, "realms", environment.realm, "account") + joinPath(environment.authUrl, "realms", environment.realm, "account"), ); const response = await request("/linked-accounts/" + account.providerName, { searchParams: { providerId: account.providerName, redirectUri }, diff --git a/js/apps/account-ui/src/api/parse-response.ts b/js/apps/account-ui/src/api/parse-response.ts index 6af206eb3e..7599b04772 100644 --- a/js/apps/account-ui/src/api/parse-response.ts +++ b/js/apps/account-ui/src/api/parse-response.ts @@ -9,7 +9,7 @@ export async function parseResponse(response: Response): Promise { if (!isJSON) { throw new Error( - `Expected response to have a JSON content type, got '${contentType}' instead.` + `Expected response to have a JSON content type, got '${contentType}' instead.`, ); } @@ -48,6 +48,6 @@ function getErrorMessage(data: unknown): string { } throw new Error( - "Unable to retrieve error message from response, no matching key found." + "Unable to retrieve error message from response, no matching key found.", ); } diff --git a/js/apps/account-ui/src/api/request.ts b/js/apps/account-ui/src/api/request.ts index 14fad416e0..dc8de77c60 100644 --- a/js/apps/account-ui/src/api/request.ts +++ b/js/apps/account-ui/src/api/request.ts @@ -12,15 +12,15 @@ export type RequestOptions = { export async function request( path: string, - { signal, method, searchParams, body }: RequestOptions = {} + { signal, method, searchParams, body }: RequestOptions = {}, ): Promise { const url = new URL( - joinPath(environment.authUrl, "realms", environment.realm, "account", path) + joinPath(environment.authUrl, "realms", environment.realm, "account", path), ); if (searchParams) { Object.entries(searchParams).forEach(([key, value]) => - url.searchParams.set(key, value) + url.searchParams.set(key, value), ); } diff --git a/js/apps/account-ui/src/applications/Applications.tsx b/js/apps/account-ui/src/applications/Applications.tsx index 8117706c3d..579d08cb0e 100644 --- a/js/apps/account-ui/src/applications/Applications.tsx +++ b/js/apps/account-ui/src/applications/Applications.tsx @@ -44,13 +44,13 @@ const Applications = () => { usePromise( (signal) => getApplications({ signal }), (clients) => setApplications(clients.map((c) => ({ ...c, open: false }))), - [key] + [key], ); const toggleOpen = (clientId: string) => { setApplications([ ...applications!.map((a) => - a.clientId === clientId ? { ...a, open: !a.open } : a + a.clientId === clientId ? { ...a, open: !a.open } : a, ), ]); }; diff --git a/js/apps/account-ui/src/components/format/format-date.ts b/js/apps/account-ui/src/components/format/format-date.ts index 1193b7409c..5553edd2ca 100644 --- a/js/apps/account-ui/src/components/format/format-date.ts +++ b/js/apps/account-ui/src/components/format/format-date.ts @@ -16,13 +16,13 @@ export default function useFormatter() { return { formatDate: function ( date: Date, - options: Intl.DateTimeFormatOptions | undefined = DATE_AND_TIME_FORMAT + options: Intl.DateTimeFormatOptions | undefined = DATE_AND_TIME_FORMAT, ) { return date.toLocaleString("en", options); }, formatTime: function ( time: number, - options: Intl.DateTimeFormatOptions | undefined = TIME_FORMAT + options: Intl.DateTimeFormatOptions | undefined = TIME_FORMAT, ) { return new Intl.DateTimeFormat("en", options).format(time); }, diff --git a/js/apps/account-ui/src/components/formatter/format-date.ts b/js/apps/account-ui/src/components/formatter/format-date.ts index a0c5cb9f81..534c087896 100644 --- a/js/apps/account-ui/src/components/formatter/format-date.ts +++ b/js/apps/account-ui/src/components/formatter/format-date.ts @@ -15,13 +15,13 @@ export default function useFormatter() { return { formatDate: function ( date: Date, - options: Intl.DateTimeFormatOptions | undefined = DATE_AND_TIME_FORMAT + options: Intl.DateTimeFormatOptions | undefined = DATE_AND_TIME_FORMAT, ) { return date.toLocaleString("en", options); }, formatTime: function ( time: number, - options: Intl.DateTimeFormatOptions | undefined = TIME_FORMAT + options: Intl.DateTimeFormatOptions | undefined = TIME_FORMAT, ) { return new Intl.DateTimeFormat("en", options).format(time); }, diff --git a/js/apps/account-ui/src/groups/Groups.tsx b/js/apps/account-ui/src/groups/Groups.tsx index acddaecbfc..582e6470da 100644 --- a/js/apps/account-ui/src/groups/Groups.tsx +++ b/js/apps/account-ui/src/groups/Groups.tsx @@ -27,13 +27,13 @@ const Groups = () => { getParents( el, groups, - groups.map(({ path }) => path) - ) + groups.map(({ path }) => path), + ), ); } setGroups(groups); }, - [directMembership] + [directMembership], ); const getParents = (el: Group, groups: Group[], groupsPaths: string[]) => { diff --git a/js/apps/account-ui/src/main.tsx b/js/apps/account-ui/src/main.tsx index 9ec90591bc..beb3ee0829 100644 --- a/js/apps/account-ui/src/main.tsx +++ b/js/apps/account-ui/src/main.tsx @@ -25,5 +25,5 @@ const root = createRoot(container!); root.render( - + , ); diff --git a/js/apps/account-ui/src/personal-info/LocaleSelector.tsx b/js/apps/account-ui/src/personal-info/LocaleSelector.tsx index be8bc077bb..27832c362f 100644 --- a/js/apps/account-ui/src/personal-info/LocaleSelector.tsx +++ b/js/apps/account-ui/src/personal-info/LocaleSelector.tsx @@ -24,8 +24,8 @@ export const LocaleSelector = () => { locales.map((locale) => ({ key: locale, value: localeToDisplayName(locale) || "", - })) - ) + })), + ), ); return ( diff --git a/js/apps/account-ui/src/personal-info/PersonalInfo.tsx b/js/apps/account-ui/src/personal-info/PersonalInfo.tsx index baa9974817..00f43bd3db 100644 --- a/js/apps/account-ui/src/personal-info/PersonalInfo.tsx +++ b/js/apps/account-ui/src/personal-info/PersonalInfo.tsx @@ -48,7 +48,7 @@ const PersonalInfo = () => { (personalInfo) => { setUserProfileMetadata(personalInfo.userProfileMetadata); reset(personalInfo); - } + }, ); const onSubmit = async (user: UserRepresentation) => { @@ -61,7 +61,7 @@ const PersonalInfo = () => { (error as FieldError[]).forEach((e) => { const params = Object.assign( {}, - e.params.map((p) => (isBundleKey(p) ? unWrap(p) : p)) + e.params.map((p) => (isBundleKey(p) ? unWrap(p) : p)), ); setError(fieldName(e.field) as keyof UserRepresentation, { message: t(e.errorMessage as TFuncKey, { diff --git a/js/apps/account-ui/src/resources/EditTheResource.tsx b/js/apps/account-ui/src/resources/EditTheResource.tsx index 6f02e81492..5a3681d9a4 100644 --- a/js/apps/account-ui/src/resources/EditTheResource.tsx +++ b/js/apps/account-ui/src/resources/EditTheResource.tsx @@ -39,8 +39,8 @@ export const EditTheResource = ({ try { await Promise.all( permissions.map((permission) => - updatePermissions(resource._id, [permission]) - ) + updatePermissions(resource._id, [permission]), + ), ); addAlert(t("updateSuccess")); onClose(); diff --git a/js/apps/account-ui/src/resources/PermissionRequest.tsx b/js/apps/account-ui/src/resources/PermissionRequest.tsx index eadd302c91..964d15d66a 100644 --- a/js/apps/account-ui/src/resources/PermissionRequest.tsx +++ b/js/apps/account-ui/src/resources/PermissionRequest.tsx @@ -40,12 +40,12 @@ export const PermissionRequest = ({ const approveDeny = async ( shareRequest: Permission, - approve: boolean = false + approve: boolean = false, ) => { try { const permissions = await fetchPermission({}, resource._id); const { scopes, username } = permissions.find( - (p) => p.username === shareRequest.username + (p) => p.username === shareRequest.username, )!; await updateRequest( @@ -53,7 +53,7 @@ export const PermissionRequest = ({ username, approve ? [...(scopes as string[]), ...(shareRequest.scopes as string[])] - : scopes + : scopes, ); addAlert(t("shareSuccess")); toggle(); diff --git a/js/apps/account-ui/src/resources/ResourcesTab.tsx b/js/apps/account-ui/src/resources/ResourcesTab.tsx index eac345e953..075359512d 100644 --- a/js/apps/account-ui/src/resources/ResourcesTab.tsx +++ b/js/apps/account-ui/src/resources/ResourcesTab.tsx @@ -71,8 +71,8 @@ export const ResourcesTab = () => { await Promise.all( result.data.map( async (r) => - (r.shareRequests = await getPermissionRequests(r._id, { signal })) - ) + (r.shareRequests = await getPermissionRequests(r._id, { signal })), + ), ); return result; }, @@ -80,7 +80,7 @@ export const ResourcesTab = () => { setResources(data); setLinks(links); }, - [params, key] + [params, key], ); if (!resources) { @@ -102,7 +102,7 @@ export const ResourcesTab = () => { ({ username, scopes: [], - } as Permission) + }) as Permission, )!; await updatePermissions(resource._id, permissions); setDetails({}); @@ -115,7 +115,7 @@ export const ResourcesTab = () => { const toggleOpen = async ( id: string, field: keyof PermissionDetail, - open: boolean + open: boolean, ) => { const permissions = await fetchPermissions(id); @@ -162,7 +162,7 @@ export const ResourcesTab = () => { toggleOpen( resource._id, "rowOpen", - !details[resource._id]?.rowOpen + !details[resource._id]?.rowOpen, ), }} /> diff --git a/js/apps/account-ui/src/resources/ShareTheResource.tsx b/js/apps/account-ui/src/resources/ShareTheResource.tsx index 383b80f133..22fe4404b5 100644 --- a/js/apps/account-ui/src/resources/ShareTheResource.tsx +++ b/js/apps/account-ui/src/resources/ShareTheResource.tsx @@ -70,7 +70,7 @@ export const ShareTheResource = ({ }); const isDisabled = watchFields.every( - ({ value }) => value.trim().length === 0 + ({ value }) => value.trim().length === 0, ); const addShare = async ({ usernames, permissions }: FormValues) => { @@ -79,8 +79,8 @@ export const ShareTheResource = ({ usernames .filter(({ value }) => value !== "") .map(({ value: username }) => - updateRequest(resource._id, username, permissions) - ) + updateRequest(resource._id, username, permissions), + ), ); addAlert(t("shareSuccess")); onClose(); @@ -175,7 +175,7 @@ export const ShareTheResource = ({ remove(index)}> {field.value} - ) + ), )} )} diff --git a/js/apps/account-ui/src/root/PageNav.tsx b/js/apps/account-ui/src/root/PageNav.tsx index b2138828c6..d4fd853fbb 100644 --- a/js/apps/account-ui/src/root/PageNav.tsx +++ b/js/apps/account-ui/src/root/PageNav.tsx @@ -99,7 +99,7 @@ function NavMenuItem({ menuItem }: NavMenuItemProps) { const { pathname } = useLocation(); const isActive = useMemo( () => matchMenuItem(pathname, menuItem), - [pathname, menuItem] + [pathname, menuItem], ); if ("path" in menuItem) { diff --git a/js/apps/account-ui/src/root/Root.tsx b/js/apps/account-ui/src/root/Root.tsx index ad1200135d..5f70cb2872 100644 --- a/js/apps/account-ui/src/root/Root.tsx +++ b/js/apps/account-ui/src/root/Root.tsx @@ -52,7 +52,7 @@ export const Root = () => { signOut: t("signOut"), unknownUser: t("unknownUser"), }), - [t] + [t], ); return ( diff --git a/js/apps/account-ui/src/utils/usePromise.ts b/js/apps/account-ui/src/utils/usePromise.ts index d9e40b06f8..c05e485988 100644 --- a/js/apps/account-ui/src/utils/usePromise.ts +++ b/js/apps/account-ui/src/utils/usePromise.ts @@ -45,7 +45,7 @@ export type PromiseResolvedFn = (value: T) => void; export function usePromise( factory: PromiseFactoryFn, callback: PromiseResolvedFn, - deps: DependencyList = [] + deps: DependencyList = [], ) { useEffect(() => { const controller = new AbortController(); diff --git a/js/apps/admin-ui/cypress/e2e/authentication_policies.spec.ts b/js/apps/admin-ui/cypress/e2e/authentication_policies.spec.ts index 8050c7450e..66559fdf1e 100644 --- a/js/apps/admin-ui/cypress/e2e/authentication_policies.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/authentication_policies.spec.ts @@ -23,7 +23,7 @@ describe("Policies", () => { otpPoliciesPage.checkSupportedApplications( "FreeOTP", "Google Authenticator", - "Microsoft Authenticator" + "Microsoft Authenticator", ); otpPoliciesPage.setPolicyType("hotp").increaseInitialCounter().save(); masthead.checkNotificationMessage("OTP policy successfully updated"); @@ -48,7 +48,7 @@ describe("Policies", () => { }); webauthnPage.webAuthnPolicyCreateTimeout(30).save(); masthead.checkNotificationMessage( - "Updated webauthn policies successfully" + "Updated webauthn policies successfully", ); }); @@ -61,11 +61,11 @@ describe("Policies", () => { webAuthnPolicyRequireResidentKey: "Yes", webAuthnPolicyUserVerificationRequirement: "Preferred", }, - true + true, ) .save(); masthead.checkNotificationMessage( - "Updated webauthn policies successfully" + "Updated webauthn policies successfully", ); }); }); diff --git a/js/apps/admin-ui/cypress/e2e/authentication_policies_ciba.spec.ts b/js/apps/admin-ui/cypress/e2e/authentication_policies_ciba.spec.ts index 578d1a572e..e32afe92e5 100644 --- a/js/apps/admin-ui/cypress/e2e/authentication_policies_ciba.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/authentication_policies_ciba.spec.ts @@ -28,7 +28,7 @@ describe("Authentication - Policies - CIBA", () => { it("displays the initial state", () => { Select.assertSelectedItem( CIBAPolicyPage.getBackchannelTokenDeliveryModeSelect(), - "Poll" + "Poll", ); CIBAPolicyPage.getExpiresInput().should("have.value", "120"); CIBAPolicyPage.getIntervalInput().should("have.value", "5"); @@ -65,7 +65,7 @@ describe("Authentication - Policies - CIBA", () => { // Select new values for fields. Select.selectItem( CIBAPolicyPage.getBackchannelTokenDeliveryModeSelect(), - "Ping" + "Ping", ); CIBAPolicyPage.getExpiresInput().clear().type("140"); CIBAPolicyPage.getIntervalInput().clear().type("20"); @@ -77,7 +77,7 @@ describe("Authentication - Policies - CIBA", () => { // Assert values are saved. Select.assertSelectedItem( CIBAPolicyPage.getBackchannelTokenDeliveryModeSelect(), - "Ping" + "Ping", ); CIBAPolicyPage.getExpiresInput().should("have.value", "140"); CIBAPolicyPage.getIntervalInput().should("have.value", "20"); diff --git a/js/apps/admin-ui/cypress/e2e/authentication_test.spec.ts b/js/apps/admin-ui/cypress/e2e/authentication_test.spec.ts index f7eda8c674..0426629291 100644 --- a/js/apps/admin-ui/cypress/e2e/authentication_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/authentication_test.spec.ts @@ -68,7 +68,7 @@ describe("Authentication test", () => { listingPage.clickRowDetails("Browser").clickDetailMenu("Duplicate"); duplicateFlowModal.fill("browser"); masthead.checkNotificationMessage( - "Could not duplicate flow: New flow alias name already exists" + "Could not duplicate flow: New flow alias name already exists", ); }); @@ -85,7 +85,7 @@ describe("Authentication test", () => { detailPage.expectPriorityChange(fromRow, () => { detailPage.moveRowTo( fromRow, - `[data-testid="Identity Provider Redirector"]` + `[data-testid="Identity Provider Redirector"]`, ); }); }); @@ -124,7 +124,7 @@ describe("Authentication test", () => { listingPage.goToItemDetails("Copy of browser"); detailPage.addExecution( "Copy of browser forms", - "reset-credentials-choose-user" + "reset-credentials-choose-user", ); masthead.checkNotificationMessage("Flow successfully updated"); @@ -135,7 +135,7 @@ describe("Authentication test", () => { listingPage.goToItemDetails("Copy of browser"); detailPage.addCondition( "Copy of browser Browser - Conditional OTP", - "conditional-user-role" + "conditional-user-role", ); masthead.checkNotificationMessage("Flow successfully updated"); @@ -146,7 +146,7 @@ describe("Authentication test", () => { listingPage.goToItemDetails("Copy of browser"); detailPage.addSubFlow( "Copy of browser Browser - Conditional OTP", - flowName + flowName, ); masthead.checkNotificationMessage("Flow successfully updated"); @@ -173,7 +173,7 @@ describe("Authentication test", () => { detailPage.fillCreateForm( flowName, "Some nice description about what this flow does so that we can use it later", - "Client flow" + "Client flow", ); masthead.checkNotificationMessage("Flow created"); detailPage.addSubFlowToEmpty(flowName, "EmptySubFlow"); @@ -293,7 +293,7 @@ describe("Accessibility tests for authentication", () => { detailPage.fillCreateForm( flowName, "Some nice description about what this flow does", - "Client flow" + "Client flow", ); cy.checkA11y(); }); diff --git a/js/apps/admin-ui/cypress/e2e/client_authorization_test.spec.ts b/js/apps/admin-ui/cypress/e2e/client_authorization_test.spec.ts index a3a45a135e..a084d9ac10 100644 --- a/js/apps/admin-ui/cypress/e2e/client_authorization_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/client_authorization_test.spec.ts @@ -31,7 +31,7 @@ describe("Client authentication subtab", () => { authorizationServicesEnabled: true, serviceAccountsEnabled: true, standardFlowEnabled: true, - }) + }), ); after(() => { @@ -99,7 +99,7 @@ describe("Client authentication subtab", () => { masthead.checkNotificationMessage( "Authorization scope created successfully", - true + true, ); authenticationTab.goToScopesSubTab(); listingPage.itemExist("The scope"); @@ -109,7 +109,7 @@ describe("Client authentication subtab", () => { authenticationTab.goToPoliciesSubTab(); cy.intercept( "GET", - "/admin/realms/master/clients/*/authz/resource-server/policy/regex/*" + "/admin/realms/master/clients/*/authz/resource-server/policy/regex/*", ).as("get"); policiesSubTab .createPolicy("regex") @@ -141,7 +141,7 @@ describe("Client authentication subtab", () => { authenticationTab.goToPoliciesSubTab(); cy.intercept( "GET", - "/admin/realms/master/clients/*/authz/resource-server/policy/client/*" + "/admin/realms/master/clients/*/authz/resource-server/policy/client/*", ).as("get"); policiesSubTab .createPolicy("client") @@ -168,11 +168,11 @@ describe("Client authentication subtab", () => { }); permissionsSubTab.selectResource("Default Resource").formUtils().save(); cy.intercept( - "/admin/realms/master/clients/*/authz/resource-server/resource?first=0&max=10&permission=false" + "/admin/realms/master/clients/*/authz/resource-server/resource?first=0&max=10&permission=false", ).as("load"); masthead.checkNotificationMessage( "Successfully created the permission", - true + true, ); authenticationTab.formUtils().cancel(); }); @@ -191,7 +191,7 @@ describe("Client authentication subtab", () => { masthead.checkNotificationMessage( "Successfully exported authorization details.", - true + true, ); }); diff --git a/js/apps/admin-ui/cypress/e2e/client_registration_policies.spec.ts b/js/apps/admin-ui/cypress/e2e/client_registration_policies.spec.ts index 313b04b28c..29263f07f9 100644 --- a/js/apps/admin-ui/cypress/e2e/client_registration_policies.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/client_registration_policies.spec.ts @@ -54,7 +54,7 @@ describe("Client registration policies subtab", () => { clientRegistrationPage.modalUtils().confirmModal(); masthead.checkNotificationMessage( - "Client registration policy deleted successfully" + "Client registration policy deleted successfully", ); listingPage.itemExist("policy 2", false); }); diff --git a/js/apps/admin-ui/cypress/e2e/client_scopes_test.spec.ts b/js/apps/admin-ui/cypress/e2e/client_scopes_test.spec.ts index 337d191235..7370ae2158 100644 --- a/js/apps/admin-ui/cypress/e2e/client_scopes_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/client_scopes_test.spec.ts @@ -220,7 +220,7 @@ describe("Client Scopes test", () => { .checkModalMessage(modalMessageDeleteConfirmation) .confirmModal(); masthead.checkNotificationMessage( - notificationMessageDeletionConfirmation + notificationMessageDeletionConfirmation, ); listingPage.checkInSearchBarChangeTypeToButtonIsDisabled(); }); @@ -235,7 +235,7 @@ describe("Client Scopes test", () => { .checkModalMessage(modalMessageDeleteConfirmation) .confirmModal(); masthead.checkNotificationMessage( - notificationMessageDeletionConfirmation + notificationMessageDeletionConfirmation, ); listingPage.checkInSearchBarChangeTypeToButtonIsDisabled(); }); @@ -252,7 +252,7 @@ describe("Client Scopes test", () => { .checkModalMessage(modalMessageDeleteConfirmation) .confirmModal(); masthead.checkNotificationMessage( - notificationMessageDeletionConfirmation + notificationMessageDeletionConfirmation, ); listingPage.checkInSearchBarChangeTypeToButtonIsDisabled(); }); @@ -272,7 +272,7 @@ describe("Client Scopes test", () => { createClientScopePage.fillClientScopeData("address").save(); masthead.checkNotificationMessage( - "Could not create client scope: 'Client Scope address already exists'" + "Could not create client scope: 'Client Scope address already exists'", ); }); @@ -456,7 +456,7 @@ describe("Client Scopes test", () => { mappersTab.addMappersByConfiguration( predefinedMapper, - predefinedMapperName + predefinedMapperName, ); cy.checkA11y(); diff --git a/js/apps/admin-ui/cypress/e2e/clients_saml_advanced.spec.ts b/js/apps/admin-ui/cypress/e2e/clients_saml_advanced.spec.ts index 488b888b82..dbca715338 100644 --- a/js/apps/admin-ui/cypress/e2e/clients_saml_advanced.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/clients_saml_advanced.spec.ts @@ -52,7 +52,7 @@ describe("Clients Saml advanced tab", () => { advancedTab.termsOfServiceUrl("not a url").saveFineGrain(); masthead.checkNotificationMessage( - "Client could not be updated: Terms of service URL is not a valid URL" + "Client could not be updated: Terms of service URL is not a valid URL", ); }); }); diff --git a/js/apps/admin-ui/cypress/e2e/clients_saml_test.spec.ts b/js/apps/admin-ui/cypress/e2e/clients_saml_test.spec.ts index a97c966039..93130eda0f 100644 --- a/js/apps/admin-ui/cypress/e2e/clients_saml_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/clients_saml_test.spec.ts @@ -89,7 +89,7 @@ describe("Clients SAML tests", () => { it("should disable client signature", () => { cy.intercept( - "admin/realms/master/clients/*/certificates/saml.signing" + "admin/realms/master/clients/*/certificates/saml.signing", ).as("load"); cy.findByTestId("clientSignature").click({ force: true }); @@ -106,7 +106,7 @@ describe("Clients SAML tests", () => { cy.findByTestId("generate").click(); masthead.checkNotificationMessage( - "New key pair and certificate generated successfully" + "New key pair and certificate generated successfully", ); modalUtils.confirmModal(); diff --git a/js/apps/admin-ui/cypress/e2e/clients_test.spec.ts b/js/apps/admin-ui/cypress/e2e/clients_test.spec.ts index ede7daf40b..97d4040f4a 100644 --- a/js/apps/admin-ui/cypress/e2e/clients_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/clients_test.spec.ts @@ -61,7 +61,7 @@ describe("Clients test", () => { await adminClient.createClientScope(clientScope); await adminClient.addDefaultClientScopeInClient( clientScopeName + i, - clientId + clientId, ); } clientScope.name = clientScopeNameDefaultType; @@ -310,7 +310,7 @@ describe("Clients test", () => { commonPage .masthead() .checkNotificationMessage( - "Could not create client: 'Client account already exists'" + "Could not create client: 'Client account already exists'", ); }); @@ -459,7 +459,7 @@ describe("Clients test", () => { cy.findByTestId("importClient").click(); cy.findByTestId("realm-file").selectFile( "cypress/fixtures/partial-import-test-data/import-identical-client.json", - { action: "drag-drop" } + { action: "drag-drop" }, ); cy.wait(1000); @@ -470,7 +470,7 @@ describe("Clients test", () => { .masthead() .checkNotificationMessage( "Could not import client: Client identical already exists", - true + true, ); }); @@ -489,7 +489,7 @@ describe("Clients test", () => { clientId: client, protocol: "openid-connect", publicClient: false, - }) + }), ); beforeEach(() => { @@ -563,7 +563,7 @@ describe("Clients test", () => { .masthead() .checkNotificationMessage( `Could not create role: Role with name ${itemId} already exists`, - true + true, ); }); @@ -595,7 +595,7 @@ describe("Clients test", () => { // Add associated client role associatedRolesPage.addAssociatedRoleFromSearchBar( "manage-account", - true + true, ); commonPage .masthead() @@ -606,7 +606,7 @@ describe("Clients test", () => { // Add associated client role associatedRolesPage.addAssociatedRoleFromSearchBar( "manage-consent", - true + true, ); commonPage .masthead() @@ -807,7 +807,7 @@ describe("Clients test", () => { authorizationServicesEnabled: true, serviceAccountsEnabled: true, standardFlowEnabled: true, - }) + }), ); beforeEach(() => { @@ -968,7 +968,7 @@ describe("Clients test", () => { protocol: "openid-connect", clientId: keysName, publicClient: false, - }) + }), ); beforeEach(() => { @@ -991,7 +991,7 @@ describe("Clients test", () => { commonPage .masthead() .checkNotificationMessage( - "New key pair and certificate generated successfully" + "New key pair and certificate generated successfully", ); }); }); @@ -1036,7 +1036,7 @@ describe("Clients test", () => { protocol: "openid-connect", publicClient: false, bearerOnly: true, - }) + }), ); beforeEach(() => { diff --git a/js/apps/admin-ui/cypress/e2e/events_test.spec.ts b/js/apps/admin-ui/cypress/e2e/events_test.spec.ts index 7cdda14ed4..d08377735f 100644 --- a/js/apps/admin-ui/cypress/e2e/events_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/events_test.spec.ts @@ -43,13 +43,13 @@ describe.skip("Events tests", () => { before(async () => { const result = await adminClient.createUser( - eventsTestUser.userRepresentation + eventsTestUser.userRepresentation, ); eventsTestUser.eventsTestUserId = result.id!; }); after(() => - adminClient.deleteUser(eventsTestUser.userRepresentation.username) + adminClient.deleteUser(eventsTestUser.userRepresentation.username), ); describe("User events list", () => { @@ -175,8 +175,8 @@ describe.skip("Events tests", () => { adminClient.loginUser( eventsTestUser.userRepresentation.username, eventsTestUser.userRepresentation.credentials[0].value, - eventsTestUserClientId - ) + eventsTestUserClientId, + ), ); userEventsTab .searchUserEventByUserId(eventsTestUser.eventsTestUserId) diff --git a/js/apps/admin-ui/cypress/e2e/group_test.spec.ts b/js/apps/admin-ui/cypress/e2e/group_test.spec.ts index b955b25ab3..df1d29c988 100644 --- a/js/apps/admin-ui/cypress/e2e/group_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/group_test.spec.ts @@ -46,7 +46,7 @@ describe("Group test", () => { return { id: user.id!, username: username + index }; }); return user; - }) + }), ); }); @@ -133,7 +133,7 @@ describe("Group test", () => { it("Delete groups from search bar", () => { cy.wrap(null).then(() => - adminClient.createGroup("group_multiple_deletion_test") + adminClient.createGroup("group_multiple_deletion_test"), ); cy.reload(); groupPage @@ -151,7 +151,7 @@ describe("Group test", () => { range(5).map((index) => { adminClient.addUserToGroup( users[index].id!, - createdGroups[index % 3].id + createdGroups[index % 3].id, ); }), adminClient.createUser({ username: "new", enabled: true }), @@ -267,7 +267,7 @@ describe("Group test", () => { childGroupsTab .createGroup(predefinedGroups[2], false) .assertNotificationCouldNotCreateGroupWithDuplicatedName( - predefinedGroups[2] + predefinedGroups[2], ); }); @@ -317,7 +317,7 @@ describe("Group test", () => { range(5).map((index) => { adminClient.addUserToGroup( users[index].id!, - createdGroups[index % 3].id + createdGroups[index % 3].id, ); }), adminClient.createGroup(emptyGroup), diff --git a/js/apps/admin-ui/cypress/e2e/i18n_test.spec.ts b/js/apps/admin-ui/cypress/e2e/i18n_test.spec.ts index cbc1c1ccfa..b364963555 100644 --- a/js/apps/admin-ui/cypress/e2e/i18n_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/i18n_test.spec.ts @@ -142,7 +142,7 @@ describe("i18n tests", () => { addLocalization( "en", "user-federation:addProvider_other", - "addProvider_other en: {{provider}}" + "addProvider_other en: {{provider}}", ); updateUserLocale("en"); @@ -159,20 +159,22 @@ describe("i18n tests", () => { function updateUserLocale(locale: string) { cy.wrap(null).then(() => - adminClient.updateUser(usernameI18nId, { attributes: { locale: locale } }) + adminClient.updateUser(usernameI18nId, { + attributes: { locale: locale }, + }), ); } function addCommonRealmSettingsLocalizationText( locale: string, - value: string + value: string, ) { addLocalization(locale, "common:realmSettings", value); } function addLocalization(locale: string, key: string, value: string) { cy.wrap(null).then(() => - adminClient.addLocalizationText(locale, key, value) + adminClient.addLocalizationText(locale, key, value), ); } }); diff --git a/js/apps/admin-ui/cypress/e2e/identity_providers_oidc_test.spec.ts b/js/apps/admin-ui/cypress/e2e/identity_providers_oidc_test.spec.ts index 88e08e1102..cf65cc11ab 100644 --- a/js/apps/admin-ui/cypress/e2e/identity_providers_oidc_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/identity_providers_oidc_test.spec.ts @@ -81,16 +81,16 @@ describe("OIDC identity provider test", () => { providerBaseAdvancedSettingsPage.assertOIDCPKCESwitch(); //Client Authentication providerBaseAdvancedSettingsPage.assertOIDCClientAuthentication( - ClientAuthentication.basicAuth + ClientAuthentication.basicAuth, ); providerBaseAdvancedSettingsPage.assertOIDCClientAuthentication( - ClientAuthentication.jwt + ClientAuthentication.jwt, ); providerBaseAdvancedSettingsPage.assertOIDCClientAuthentication( - ClientAuthentication.jwtPrivKey + ClientAuthentication.jwtPrivKey, ); providerBaseAdvancedSettingsPage.assertOIDCClientAuthentication( - ClientAuthentication.post + ClientAuthentication.post, ); //Client assertion signature algorithm Object.entries(ClientAssertionSigningAlg).forEach(([, value]) => { @@ -103,7 +103,7 @@ describe("OIDC identity provider test", () => { providerBaseAdvancedSettingsPage.selectPromptOption(PromptSelect.login); providerBaseAdvancedSettingsPage.selectPromptOption(PromptSelect.select); providerBaseAdvancedSettingsPage.selectPromptOption( - PromptSelect.unspecified + PromptSelect.unspecified, ); //Advanced Settings providerBaseAdvancedSettingsPage.assertAdvancedSettings(); diff --git a/js/apps/admin-ui/cypress/e2e/identity_providers_saml_test.spec.ts b/js/apps/admin-ui/cypress/e2e/identity_providers_saml_test.spec.ts index 99d55644a5..38bfc5f966 100644 --- a/js/apps/admin-ui/cypress/e2e/identity_providers_saml_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/identity_providers_saml_test.spec.ts @@ -81,7 +81,7 @@ describe("SAML identity provider test", () => { addMapperPage.goToMappersTab(); addMapperPage.addMapper(); addMapperPage.addUsernameTemplateImporterMapper( - "SAML Username Template Importer Mapper" + "SAML Username Template Importer Mapper", ); masthead.checkNotificationMessage(createMapperSuccessMsg, true); }); @@ -92,7 +92,7 @@ describe("SAML identity provider test", () => { addMapperPage.goToMappersTab(); addMapperPage.addMapper(); addMapperPage.addHardcodedUserSessionAttrMapper( - "Hardcoded User Session Attribute" + "Hardcoded User Session Attribute", ); masthead.checkNotificationMessage(createMapperSuccessMsg, true); }); diff --git a/js/apps/admin-ui/cypress/e2e/identity_providers_test.spec.ts b/js/apps/admin-ui/cypress/e2e/identity_providers_test.spec.ts index b5ad819cb5..797c99dc67 100644 --- a/js/apps/admin-ui/cypress/e2e/identity_providers_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/identity_providers_test.spec.ts @@ -64,7 +64,7 @@ describe("Identity provider test", () => { return true; } return false; - } + }, ); return instance; } @@ -104,8 +104,8 @@ describe("Identity provider test", () => { after(async () => { await Promise.all( socialLoginIdentityProviders.map((idp) => - adminClient.deleteIdentityProvider(idp.alias) - ) + adminClient.deleteIdentityProvider(idp.alias), + ), ); }); @@ -318,7 +318,7 @@ describe("Identity provider test", () => { advancedSettings.assertStoreTokensSwitchTurnedOn(false); advancedSettings.assertAcceptsPromptNoneForwardFromClientSwitchTurnedOn( - false + false, ); advancedSettings.assertDisableUserInfoSwitchTurnedOn(false); advancedSettings.assertTrustEmailSwitchTurnedOn(false); @@ -338,7 +338,7 @@ describe("Identity provider test", () => { advancedSettings.ensureAdvancedSettingsAreVisible(); advancedSettings.assertStoreTokensSwitchTurnedOn(true); advancedSettings.assertAcceptsPromptNoneForwardFromClientSwitchTurnedOn( - true + true, ); advancedSettings.assertDisableUserInfoSwitchTurnedOn(true); advancedSettings.assertTrustEmailSwitchTurnedOn(true); @@ -358,19 +358,19 @@ describe("Identity provider test", () => { cy.findByTestId("jump-link-advanced-settings").click(); advancedSettings.assertStoreTokensSwitchTurnedOn(true); advancedSettings.assertAcceptsPromptNoneForwardFromClientSwitchTurnedOn( - true + true, ); advancedSettings.clickStoreTokensSwitch(); advancedSettings.clickAcceptsPromptNoneForwardFromClientSwitch(); advancedSettings.ensureAdvancedSettingsAreVisible(); advancedSettings.assertStoreTokensSwitchTurnedOn(false); advancedSettings.assertAcceptsPromptNoneForwardFromClientSwitchTurnedOn( - false + false, ); cy.findByTestId("idp-details-revert").click(); advancedSettings.assertStoreTokensSwitchTurnedOn(true); advancedSettings.assertAcceptsPromptNoneForwardFromClientSwitchTurnedOn( - true + true, ); }); diff --git a/js/apps/admin-ui/cypress/e2e/masthead_test.spec.ts b/js/apps/admin-ui/cypress/e2e/masthead_test.spec.ts index 43d2b5697e..376bcf8f1a 100644 --- a/js/apps/admin-ui/cypress/e2e/masthead_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/masthead_test.spec.ts @@ -48,7 +48,7 @@ describe("Masthead tests", () => { cy.origin(href, () => { cy.get("#header").should( "contain.text", - "Server Administration Guide" + "Server Administration Guide", ); }); }); diff --git a/js/apps/admin-ui/cypress/e2e/partial_export_test.spec.ts b/js/apps/admin-ui/cypress/e2e/partial_export_test.spec.ts index 914837d7ca..4fd912afb6 100644 --- a/js/apps/admin-ui/cypress/e2e/partial_export_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/partial_export_test.spec.ts @@ -48,7 +48,7 @@ describe("Partial realm export", () => { modal.includeGroupsAndRolesSwitch().click({ force: true }); modal.exportButton().click(); cy.readFile( - Cypress.config("downloadsFolder") + "/realm-export.json" + Cypress.config("downloadsFolder") + "/realm-export.json", ).should("exist"); modal.exportButton().should("not.exist"); }); diff --git a/js/apps/admin-ui/cypress/e2e/partial_import_test.spec.ts b/js/apps/admin-ui/cypress/e2e/partial_import_test.spec.ts index 82d79dc4e3..46247c2f08 100644 --- a/js/apps/admin-ui/cypress/e2e/partial_import_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/partial_import_test.spec.ts @@ -25,7 +25,7 @@ describe("Partial import test", () => { Promise.all([ adminClient.createRealm(TEST_REALM), adminClient.createRealm(TEST_REALM_2), - ]) + ]), ); after(async () => { diff --git a/js/apps/admin-ui/cypress/e2e/realm_roles_test.spec.ts b/js/apps/admin-ui/cypress/e2e/realm_roles_test.spec.ts index 8a0f43c403..b75025598d 100644 --- a/js/apps/admin-ui/cypress/e2e/realm_roles_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/realm_roles_test.spec.ts @@ -35,7 +35,7 @@ describe("Realm roles test", () => { // The error should inform about duplicated name/id (THIS MESSAGE DOES NOT HAVE QUOTES AS THE OTHERS) masthead.checkNotificationMessage( "Could not create role: Role with name admin already exists", - true + true, ); }); @@ -85,7 +85,7 @@ describe("Realm roles test", () => { listingPage.itemExist(defaultRole).deleteItem(defaultRole); masthead.checkNotificationMessage( "You cannot delete a default role.", - true + true, ); }); @@ -122,7 +122,7 @@ describe("Realm roles test", () => { // Add associated client role associatedRolesPage.addAssociatedRoleFromSearchBar( "manage-account-links", - true + true, ); masthead.checkNotificationMessage("Associated roles have been added", true); }); @@ -159,7 +159,7 @@ describe("Realm roles test", () => { masthead.checkNotificationMessage( "Scope mapping successfully removed", - true + true, ); }); @@ -178,7 +178,7 @@ describe("Realm roles test", () => { masthead.checkNotificationMessage( "Scope mapping successfully removed", - true + true, ); }); @@ -209,7 +209,7 @@ describe("Realm roles test", () => { masthead.checkNotificationMessage( "Scope mapping successfully removed", - true + true, ); listingPage.removeItem("offline_access"); sidebarPage.waitForPageLoad(); @@ -218,7 +218,7 @@ describe("Realm roles test", () => { masthead.checkNotificationMessage( "Scope mapping successfully removed", - true + true, ); }); @@ -231,7 +231,7 @@ describe("Realm roles test", () => { adminClient.createRealmRole({ name: editRoleName, description, - }) + }), ); after(() => adminClient.deleteRealmRole(editRoleName)); diff --git a/js/apps/admin-ui/cypress/e2e/realm_settings_client_policies_test.spec.ts b/js/apps/admin-ui/cypress/e2e/realm_settings_client_policies_test.spec.ts index 8bd6ee2eca..0240a19fb3 100644 --- a/js/apps/admin-ui/cypress/e2e/realm_settings_client_policies_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/realm_settings_client_policies_test.spec.ts @@ -48,7 +48,7 @@ describe("Realm settings client policies tab tests", () => { realmSettingsPage.createNewClientPolicyFromEmptyState( "Test", - "Test Description" + "Test Description", ); masthead.checkNotificationMessage("New policy created"); cy.wait("@save"); @@ -88,7 +88,7 @@ describe("Realm settings client policies tab tests", () => { modalUtils .checkModalTitle("Delete condition?") .checkModalMessage( - "This action will permanently delete client-roles. This cannot be undone." + "This action will permanently delete client-roles. This cannot be undone.", ) .checkConfirmButtonText("Delete") .cancelButtonContains("Cancel") @@ -111,7 +111,7 @@ describe("Realm settings client policies tab tests", () => { realmSettingsPage.deleteClientPolicyItemFromTable("Test"); modalUtils .checkModalMessage( - "This action will permanently delete the policy Test. This cannot be undone." + "This action will permanently delete the policy Test. This cannot be undone.", ) .cancelModal(); realmSettingsPage.checkElementInList("Test"); @@ -135,7 +135,7 @@ describe("Realm settings client policies tab tests", () => { realmSettingsPage.createNewClientPolicyFromEmptyState( "Test", - "Test Description" + "Test Description", ); masthead.checkNotificationMessage("New policy created"); cy.wait("@save"); @@ -147,7 +147,7 @@ describe("Realm settings client policies tab tests", () => { realmSettingsPage.createNewClientPolicyFromList( "Test", "Test Again Description", - true + true, ); realmSettingsPage.shouldShowErrorWhenDuplicate(); @@ -169,7 +169,7 @@ describe("Realm settings client policies tab tests", () => { cy.intercept("PUT", url).as("save"); realmSettingsPage.createNewClientPolicyFromEmptyState( "Test again", - "Test Again Description" + "Test Again Description", ); masthead.checkNotificationMessage("New policy created"); sidebarPage.waitForPageLoad(); diff --git a/js/apps/admin-ui/cypress/e2e/realm_settings_client_profiles_test.spec.ts b/js/apps/admin-ui/cypress/e2e/realm_settings_client_profiles_test.spec.ts index 8256d9f1c9..28dc764e37 100644 --- a/js/apps/admin-ui/cypress/e2e/realm_settings_client_profiles_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/realm_settings_client_profiles_test.spec.ts @@ -87,7 +87,7 @@ describe("Realm settings client profiles tab tests", () => { .saveClientProfileCreation(); cy.wait("@save"); masthead.checkNotificationMessage( - "Could not create client profile: 'proposed client profile name duplicated.'" + "Could not create client profile: 'proposed client profile name duplicated.'", ); }); @@ -158,7 +158,7 @@ describe("Realm settings client profiles tab tests", () => { .checkModalMessage( "This action will permanently delete the profile " + editedProfileName + - ". This cannot be undone." + ". This cannot be undone.", ) .cancelModal(); realmSettingsPage.checkElementInList(editedProfileName); diff --git a/js/apps/admin-ui/cypress/e2e/realm_settings_events_test.spec.ts b/js/apps/admin-ui/cypress/e2e/realm_settings_events_test.spec.ts index a2d66a9eab..8a8f000b9d 100644 --- a/js/apps/admin-ui/cypress/e2e/realm_settings_events_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/realm_settings_events_test.spec.ts @@ -108,13 +108,13 @@ describe("Realm settings events tab tests", () => { realmSettingsPage.clearEvents("user"); modalUtils .checkModalMessage( - "If you clear all events of this realm, all records will be permanently cleared in the database" + "If you clear all events of this realm, all records will be permanently cleared in the database", ) .confirmModal(); masthead.checkNotificationMessage("The user events have been cleared"); const events = ["Client info", "Client info error"]; cy.intercept("GET", `/admin/realms/${realmName}/events/config`).as( - "fetchConfig" + "fetchConfig", ); realmSettingsPage.addUserEvents(events).clickAdd(); masthead.checkNotificationMessage("Successfully saved configuration"); @@ -254,7 +254,7 @@ describe("Realm settings events tab tests", () => { cy.get("#kc-l-supported-locales").click(); cy.intercept("GET", `/admin/realms/${realmName}/localization/en*`).as( - "load" + "load", ); cy.findByTestId("localization-tab-save").click(); @@ -263,7 +263,7 @@ describe("Realm settings events tab tests", () => { addBundle(); masthead.checkNotificationMessage( - "Success! The message bundle has been added." + "Success! The message bundle has been added.", ); realmSettingsPage.setDefaultLocale("dansk"); cy.findByTestId("localization-tab-save").click(); @@ -315,46 +315,46 @@ describe("Realm settings events tab tests", () => { cy.findByTestId(realmSettingsPage.ssoSessionIdleInput).should( "have.value", - 1 + 1, ); cy.findByTestId(realmSettingsPage.ssoSessionMaxInput).should( "have.value", - 2 + 2, ); cy.findByTestId(realmSettingsPage.ssoSessionIdleRememberMeInput).should( "have.value", - 3 + 3, ); cy.findByTestId(realmSettingsPage.ssoSessionMaxRememberMeInput).should( "have.value", - 4 + 4, ); cy.findByTestId(realmSettingsPage.clientSessionIdleInput).should( "have.value", - 5 + 5, ); cy.findByTestId(realmSettingsPage.clientSessionMaxInput).should( "have.value", - 6 + 6, ); cy.findByTestId(realmSettingsPage.offlineSessionIdleInput).should( "have.value", - 7 + 7, ); cy.findByTestId(realmSettingsPage.offlineSessionMaxSwitch).should( "have.value", - "on" + "on", ); cy.findByTestId(realmSettingsPage.loginTimeoutInput).should( "have.value", - 9 + 9, ); cy.findByTestId(realmSettingsPage.loginActionTimeoutInput).should( "have.value", - 10 + 10, ); }); @@ -376,42 +376,42 @@ describe("Realm settings events tab tests", () => { cy.findByTestId(realmSettingsPage.accessTokenLifespanInput).should( "have.value", - 1 + 1, ); cy.findByTestId(realmSettingsPage.accessTokenLifespanImplicitInput).should( "have.value", - 2 + 2, ); cy.findByTestId(realmSettingsPage.clientLoginTimeoutInput).should( "have.value", - 3 + 3, ); cy.findByTestId(realmSettingsPage.userInitiatedActionLifespanInput).should( "have.value", - 4 + 4, ); cy.findByTestId(realmSettingsPage.defaultAdminInitatedInput).should( "have.value", - 5 + 5, ); cy.findByTestId(realmSettingsPage.emailVerificationInput).should( "have.value", - 6 + 6, ); cy.findByTestId(realmSettingsPage.idpEmailVerificationInput).should( "have.value", - 7 + 7, ); cy.findByTestId(realmSettingsPage.forgotPasswordInput).should( "have.value", - 8 + 8, ); cy.findByTestId(realmSettingsPage.executeActionsInput).should( "have.value", - 9 + 9, ); }); }); diff --git a/js/apps/admin-ui/cypress/e2e/realm_settings_general_tab_test.spec.ts b/js/apps/admin-ui/cypress/e2e/realm_settings_general_tab_test.spec.ts index 508962f3df..8b0f91b173 100644 --- a/js/apps/admin-ui/cypress/e2e/realm_settings_general_tab_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/realm_settings_general_tab_test.spec.ts @@ -32,13 +32,13 @@ describe("Realm settings general tab tests", () => { sidebarPage.goToRealmSettings(); realmSettingsPage.toggleSwitch( realmSettingsPage.managedAccessSwitch, - false + false, ); realmSettingsPage.save(realmSettingsPage.generalSaveBtn); masthead.checkNotificationMessage("Realm successfully updated", true); realmSettingsPage.toggleSwitch( realmSettingsPage.managedAccessSwitch, - false + false, ); realmSettingsPage.save(realmSettingsPage.generalSaveBtn); masthead.checkNotificationMessage("Realm successfully updated", true); @@ -127,8 +127,8 @@ describe("Realm settings general tab tests", () => { "have.attr", "href", `${Cypress.env( - "KEYCLOAK_SERVER" - )}/realms/${realmName}/.well-known/openid-configuration` + "KEYCLOAK_SERVER", + )}/realms/${realmName}/.well-known/openid-configuration`, ) .should("have.attr", "target", "_blank") .should("have.attr", "rel", "noreferrer noopener"); @@ -152,8 +152,8 @@ describe("Realm settings general tab tests", () => { "have.attr", "href", `${Cypress.env( - "KEYCLOAK_SERVER" - )}/realms/${realmName}/protocol/saml/descriptor` + "KEYCLOAK_SERVER", + )}/realms/${realmName}/protocol/saml/descriptor`, ) .should("have.attr", "target", "_blank") .should("have.attr", "rel", "noreferrer noopener"); diff --git a/js/apps/admin-ui/cypress/e2e/realm_settings_tabs_test.spec.ts b/js/apps/admin-ui/cypress/e2e/realm_settings_tabs_test.spec.ts index d06b4d4bef..4be9e9063a 100644 --- a/js/apps/admin-ui/cypress/e2e/realm_settings_tabs_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/realm_settings_tabs_test.spec.ts @@ -39,7 +39,7 @@ describe("Realm settings tabs tests", () => { cy.findByTestId(realmSettingsPage.userProfileTab).should("not.exist"); realmSettingsPage.toggleSwitch( realmSettingsPage.profileEnabledSwitch, - false + false, ); realmSettingsPage.save(realmSettingsPage.generalSaveBtn); masthead.checkNotificationMessage("Realm successfully updated"); @@ -75,12 +75,12 @@ describe("Realm settings tabs tests", () => { // Check other values cy.findByTestId(realmSettingsPage.emailAsUsernameSwitch).should( "have.value", - "off" + "off", ); cy.findByTestId(realmSettingsPage.verifyEmailSwitch).should( "have.value", - "off" + "off", ); }); diff --git a/js/apps/admin-ui/cypress/e2e/realm_settings_user_profile_tab.spec.ts b/js/apps/admin-ui/cypress/e2e/realm_settings_user_profile_tab.spec.ts index f198ac17aa..2e1f8ded48 100644 --- a/js/apps/admin-ui/cypress/e2e/realm_settings_user_profile_tab.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/realm_settings_user_profile_tab.spec.ts @@ -30,7 +30,7 @@ describe("User profile tabs", () => { before(() => adminClient.createRealm(realmName, { attributes: { userProfileEnabled: "true" }, - }) + }), ); after(() => adminClient.deleteRealm(realmName)); @@ -67,7 +67,7 @@ describe("User profile tabs", () => { .createAttribute(attributeName, "Display name") .saveAttributeCreation(); masthead.checkNotificationMessage( - "Success! User Profile configuration has been saved." + "Success! User Profile configuration has been saved.", ); }); @@ -79,7 +79,7 @@ describe("User profile tabs", () => { .editAttribute("Edited display name") .saveAttributeCreation(); masthead.checkNotificationMessage( - "Success! User Profile configuration has been saved." + "Success! User Profile configuration has been saved.", ); }); @@ -101,7 +101,7 @@ describe("User profile tabs", () => { cy.wrap(null).then(() => adminClient.patchUserProfile(realmName, { groups: [{ name: "Test" }], - }) + }), ); getUserProfileTab(); @@ -131,7 +131,7 @@ describe("User profile tabs", () => { getJsonEditorTab(); userProfileTab.typeJSON(removedThree).saveJSON(); masthead.checkNotificationMessage( - "User profile settings successfully updated." + "User profile settings successfully updated.", ); }); }); diff --git a/js/apps/admin-ui/cypress/e2e/realm_test.spec.ts b/js/apps/admin-ui/cypress/e2e/realm_test.spec.ts index 9da137bfa0..43c36a6f2b 100644 --- a/js/apps/admin-ui/cypress/e2e/realm_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/realm_test.spec.ts @@ -29,9 +29,9 @@ describe("Realm tests", () => { after(() => Promise.all( [testRealmName, newRealmName, editedRealmName].map((realm) => - adminClient.deleteRealm(realm) - ) - ) + adminClient.deleteRealm(realm), + ), + ), ); it("should fail creating Master realm", () => { @@ -39,7 +39,7 @@ describe("Realm tests", () => { createRealmPage.fillRealmName("master").createRealm(); masthead.checkNotificationMessage( - "Could not create realm Conflict detected. See logs for details" + "Could not create realm Conflict detected. See logs for details", ); createRealmPage.cancelRealmCreation(); }); diff --git a/js/apps/admin-ui/cypress/e2e/sessions_test.spec.ts b/js/apps/admin-ui/cypress/e2e/sessions_test.spec.ts index bde2dd99ef..19705897ca 100644 --- a/js/apps/admin-ui/cypress/e2e/sessions_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/sessions_test.spec.ts @@ -73,7 +73,7 @@ describe("Sessions test", () => { commonPage .masthead() .checkNotificationMessage( - "No push sent. No admin URI configured or no registered cluster nodes available" + "No push sent. No admin URI configured or no registered cluster nodes available", ); }); }); diff --git a/js/apps/admin-ui/cypress/e2e/user_fed_kerberos_test.spec.ts b/js/apps/admin-ui/cypress/e2e/user_fed_kerberos_test.spec.ts index b1902b5231..75b3620f0c 100644 --- a/js/apps/admin-ui/cypress/e2e/user_fed_kerberos_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/user_fed_kerberos_test.spec.ts @@ -74,7 +74,7 @@ describe("User Fed Kerberos tests", () => { firstKerberosName, firstKerberosRealm, firstKerberosPrincipal, - firstKerberosKeytab + firstKerberosKeytab, ); providersPage.save(provider); @@ -216,7 +216,7 @@ describe("User Fed Kerberos tests", () => { secondKerberosName, secondKerberosRealm, secondKerberosPrincipal, - secondKerberosKeytab + secondKerberosKeytab, ); providersPage.save(provider); diff --git a/js/apps/admin-ui/cypress/e2e/user_fed_ldap_hardcoded_mapper_test.spec.ts b/js/apps/admin-ui/cypress/e2e/user_fed_ldap_hardcoded_mapper_test.spec.ts index a5c984aae3..ab736f86ab 100644 --- a/js/apps/admin-ui/cypress/e2e/user_fed_ldap_hardcoded_mapper_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/user_fed_ldap_hardcoded_mapper_test.spec.ts @@ -96,7 +96,7 @@ describe("User Fed LDAP mapper tests", () => { truststoreSpiAlways, connectionTimeoutTwoSecs, bindDnCnDc, - bindCredsValid + bindCredsValid, ); providersPage.toggleSwitch(providersPage.enableStartTls); providersPage.toggleSwitch(providersPage.connectionPooling); @@ -107,7 +107,7 @@ describe("User Fed LDAP mapper tests", () => { firstUserLdapAtt, firstRdnLdapAtt, firstUuidLdapAtt, - firstUserObjClasses + firstUserObjClasses, ); providersPage.save(provider); masthead.checkNotificationMessage(providerCreatedSuccess); diff --git a/js/apps/admin-ui/cypress/e2e/user_fed_ldap_mapper_test.spec.ts b/js/apps/admin-ui/cypress/e2e/user_fed_ldap_mapper_test.spec.ts index 9fcb3dcb6c..c0df367fe0 100644 --- a/js/apps/admin-ui/cypress/e2e/user_fed_ldap_mapper_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/user_fed_ldap_mapper_test.spec.ts @@ -99,7 +99,7 @@ describe("User Fed LDAP mapper tests", () => { truststoreSpiAlways, connectionTimeoutTwoSecs, bindDnCnDc, - bindCredsValid + bindCredsValid, ); providersPage.toggleSwitch(providersPage.enableStartTls); providersPage.toggleSwitch(providersPage.connectionPooling); @@ -110,7 +110,7 @@ describe("User Fed LDAP mapper tests", () => { firstUserLdapAtt, firstRdnLdapAtt, firstUuidLdapAtt, - firstUserObjClasses + firstUserObjClasses, ); providersPage.save(provider); masthead.checkNotificationMessage(providerCreatedSuccess); diff --git a/js/apps/admin-ui/cypress/e2e/user_fed_ldap_test.spec.ts b/js/apps/admin-ui/cypress/e2e/user_fed_ldap_test.spec.ts index 124af90004..1f000c68a4 100644 --- a/js/apps/admin-ui/cypress/e2e/user_fed_ldap_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/user_fed_ldap_test.spec.ts @@ -120,7 +120,7 @@ describe("User Federation LDAP tests", () => { truststoreSpiNever, connectionTimeoutTwoSecs, bindDnCnOnly, - bindCredsInvalid + bindCredsInvalid, ); providersPage.fillLdapSearchingData( editModeReadOnly, @@ -131,7 +131,7 @@ describe("User Federation LDAP tests", () => { firstUserObjClasses, firstUserLdapFilter, searchScopeOneLevel, - firstReadTimeout + firstReadTimeout, ); providersPage.save(provider); masthead.checkNotificationMessage(createdSuccessMessage); @@ -159,7 +159,7 @@ describe("User Federation LDAP tests", () => { secondUserLdapAtt, secondRdnLdapAtt, secondUuidLdapAtt, - secondUserObjClasses + secondUserObjClasses, ); providersPage.save(provider); masthead.checkNotificationMessage(savedSuccessMessage); @@ -221,7 +221,7 @@ describe("User Federation LDAP tests", () => { connectionUrlInvalid, bindTypeNone, truststoreSpiNever, - connectionTimeoutTwoSecs + connectionTimeoutTwoSecs, ); providersPage.toggleSwitch(providersPage.enableStartTls); providersPage.toggleSwitch(providersPage.connectionPooling); @@ -234,15 +234,15 @@ describe("User Federation LDAP tests", () => { providersPage.clickExistingCard(firstLdapName); providersPage.verifyTextField( providersPage.connectionUrlInput, - connectionUrlInvalid + connectionUrlInvalid, ); providersPage.verifyTextField( providersPage.connectionTimeoutInput, - connectionTimeoutTwoSecs + connectionTimeoutTwoSecs, ); providersPage.verifySelect( providersPage.truststoreSpiInput, - truststoreSpiNever + truststoreSpiNever, ); providersPage.verifySelect(providersPage.bindTypeInput, bindTypeNone); providersPage.verifyToggle(providersPage.enableStartTls, "on"); @@ -271,7 +271,7 @@ describe("User Federation LDAP tests", () => { truststoreSpiAlways, connectionTimeoutTwoSecs, bindDnCnDc, - bindCredsValid + bindCredsValid, ); providersPage.toggleSwitch(providersPage.enableStartTls); providersPage.toggleSwitch(providersPage.connectionPooling); @@ -296,11 +296,11 @@ describe("User Federation LDAP tests", () => { providersPage.fillTextField( providersPage.ldapKerberosRealmInput, - kerberosRealm + kerberosRealm, ); providersPage.fillTextField( providersPage.ldapServerPrincipalInput, - serverPrincipal + serverPrincipal, ); providersPage.fillTextField(providersPage.ldapKeyTabInput, keyTab); @@ -312,11 +312,11 @@ describe("User Federation LDAP tests", () => { providersPage.clickExistingCard(firstLdapName); providersPage.verifyTextField( providersPage.ldapKerberosRealmInput, - kerberosRealm + kerberosRealm, ); providersPage.verifyTextField( providersPage.ldapServerPrincipalInput, - serverPrincipal + serverPrincipal, ); providersPage.verifyTextField(providersPage.ldapKeyTabInput, keyTab); providersPage.verifyToggle(providersPage.allowKerberosAuth, "on"); @@ -336,11 +336,11 @@ describe("User Federation LDAP tests", () => { providersPage.fillTextField(providersPage.ldapBatchSizeInput, batchSize); providersPage.fillTextField( providersPage.ldapFullSyncPeriodInput, - fullSyncPeriod + fullSyncPeriod, ); providersPage.fillTextField( providersPage.ldapUsersSyncPeriodInput, - userSyncPeriod + userSyncPeriod, ); providersPage.save(provider); @@ -352,11 +352,11 @@ describe("User Federation LDAP tests", () => { providersPage.verifyTextField(providersPage.ldapBatchSizeInput, batchSize); providersPage.verifyTextField( providersPage.ldapFullSyncPeriodInput, - fullSyncPeriod + fullSyncPeriod, ); providersPage.verifyTextField( providersPage.ldapUsersSyncPeriodInput, - userSyncPeriod + userSyncPeriod, ); providersPage.verifyToggle(providersPage.periodicFullSync, "on"); providersPage.verifyToggle(providersPage.periodicUsersSync, "on"); @@ -376,7 +376,7 @@ describe("User Federation LDAP tests", () => { secondUserObjClasses, secondUserLdapFilter, searchScopeSubtree, - secondReadTimeout + secondReadTimeout, ); providersPage.toggleSwitch(providersPage.ldapPagination); @@ -389,39 +389,39 @@ describe("User Federation LDAP tests", () => { providersPage.verifySelect( providersPage.ldapEditModeInput, - editModeWritable + editModeWritable, ); providersPage.verifyTextField( providersPage.ldapUsersDnInput, - secondUsersDn + secondUsersDn, ); providersPage.verifyTextField( providersPage.ldapUserLdapAttInput, - secondUserLdapAtt + secondUserLdapAtt, ); providersPage.verifyTextField( providersPage.ldapRdnLdapAttInput, - secondRdnLdapAtt + secondRdnLdapAtt, ); providersPage.verifyTextField( providersPage.ldapUuidLdapAttInput, - secondUuidLdapAtt + secondUuidLdapAtt, ); providersPage.verifyTextField( providersPage.ldapUserObjClassesInput, - secondUserObjClasses + secondUserObjClasses, ); providersPage.verifyTextField( providersPage.ldapUserLdapFilter, - secondUserLdapFilter + secondUserLdapFilter, ); providersPage.verifySelect( providersPage.ldapSearchScopeInput, - searchScopeSubtree + searchScopeSubtree, ); providersPage.verifyTextField( providersPage.ldapReadTimeout, - secondReadTimeout + secondReadTimeout, ); providersPage.verifyToggle(providersPage.ldapPagination, "on"); @@ -452,7 +452,7 @@ describe("User Federation LDAP tests", () => { providersPage.verifySelect( providersPage.ldapEditModeInput, - editModeUnsynced + editModeUnsynced, ); }); @@ -542,7 +542,7 @@ describe("User Federation LDAP tests", () => { truststoreSpiNever, connectionTimeoutTwoSecs, bindDnCnOnly, - bindCredsInvalid + bindCredsInvalid, ); providersPage.fillLdapSearchingData( editModeWritable, @@ -550,7 +550,7 @@ describe("User Federation LDAP tests", () => { secondUserLdapAtt, secondRdnLdapAtt, secondUuidLdapAtt, - secondUserObjClasses + secondUserObjClasses, ); providersPage.save(provider); masthead.checkNotificationMessage(createdSuccessMessage); diff --git a/js/apps/admin-ui/cypress/e2e/users_test.spec.ts b/js/apps/admin-ui/cypress/e2e/users_test.spec.ts index e2bf657c76..935285c546 100644 --- a/js/apps/admin-ui/cypress/e2e/users_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/users_test.spec.ts @@ -242,7 +242,7 @@ describe("User creation", () => { enabled: true, }), identityProviders.forEach((idp) => - adminClient.createIdentityProvider(idp.displayName, idp.alias) + adminClient.createIdentityProvider(idp.displayName, idp.alias), ), ]); }); @@ -251,8 +251,8 @@ describe("User creation", () => { await adminClient.deleteUser(usernameIdpLinksTest); await Promise.all( identityProviders.map((idp) => - adminClient.deleteIdentityProvider(idp.alias) - ) + adminClient.deleteIdentityProvider(idp.alias), + ), ); }); @@ -267,7 +267,7 @@ describe("User creation", () => { if (linkedIdpsCount == 0) { identityProviderLinksTab.assertNoIdentityProvidersLinkedMessageExist( - true + true, ); } identityProviderLinksTab @@ -285,7 +285,7 @@ describe("User creation", () => { .assertAvailableIdentityProviderExist($idp.testName, false); if (availableIdpsCount - 1 == 0) { identityProviderLinksTab.assertNoAvailableIdentityProvidersMessageExist( - true + true, ); } }); @@ -295,8 +295,8 @@ describe("User creation", () => { cy.wrap(null).then(() => adminClient.unlinkAccountIdentityProvider( usernameIdpLinksTest, - identityProviders[0].displayName - ) + identityProviders[0].displayName, + ), ); sidebarPage.goToUsers(); @@ -306,15 +306,15 @@ describe("User creation", () => { cy.wrap(null).then(() => adminClient.linkAccountIdentityProvider( usernameIdpLinksTest, - identityProviders[0].displayName - ) + identityProviders[0].displayName, + ), ); identityProviderLinksTab .clickLinkAccount(identityProviders[0].testName) .assertLinkAccountModalTitleEqual(identityProviders[0].testName) .assertLinkAccountModalIdentityProviderInputEqual( - identityProviders[0].testName + identityProviders[0].testName, ) .typeLinkAccountModalUserId("testUserId") .typeLinkAccountModalUsername("testUsername") @@ -329,7 +329,7 @@ describe("User creation", () => { if (availableIdpsCount == 0) { identityProviderLinksTab.assertNoAvailableIdentityProvidersMessageExist( - true + true, ); } identityProviderLinksTab @@ -344,7 +344,7 @@ describe("User creation", () => { .assertAvailableIdentityProviderExist($idp.testName, true); if (linkedIdpsCount - 1 == 0) { identityProviderLinksTab.assertNoIdentityProvidersLinkedMessageExist( - true + true, ); } }); @@ -358,7 +358,7 @@ describe("User creation", () => { .clickEmptyStateResetBtn() .fillResetCredentialForm(); masthead.checkNotificationMessage( - "Failed: Failed to send execute actions email" + "Failed: Failed to send execute actions email", ); }); @@ -370,7 +370,7 @@ describe("User creation", () => { .fillResetCredentialForm(); masthead.checkNotificationMessage( - "Failed: Failed to send execute actions email" + "Failed: Failed to send execute actions email", ); }); @@ -383,7 +383,7 @@ describe("User creation", () => { .clickEditConfirmationBtn(); masthead.checkNotificationMessage( - "The user label has been changed successfully." + "The user label has been changed successfully.", ); }); @@ -404,7 +404,7 @@ describe("User creation", () => { modalUtils.checkModalTitle("Delete credentials?").confirmModal(); masthead.checkNotificationMessage( - "The credentials has been deleted successfully." + "The credentials has been deleted successfully.", ); }); diff --git a/js/apps/admin-ui/cypress/support/forms/FormValidation.ts b/js/apps/admin-ui/cypress/support/forms/FormValidation.ts index e06cdc0c7d..7c9bfdf2fc 100644 --- a/js/apps/admin-ui/cypress/support/forms/FormValidation.ts +++ b/js/apps/admin-ui/cypress/support/forms/FormValidation.ts @@ -5,21 +5,21 @@ export default class FormValidation { static assertMinValue( chain: Cypress.Chainable>, - minValue: number + minValue: number, ) { this.#getHelperText(chain).should( "have.text", - `Must be greater than ${minValue}` + `Must be greater than ${minValue}`, ); } static assertMaxValue( chain: Cypress.Chainable>, - maxValue: number + maxValue: number, ) { this.#getHelperText(chain).should( "have.text", - `Must be less than ${maxValue}` + `Must be less than ${maxValue}`, ); } diff --git a/js/apps/admin-ui/cypress/support/forms/Select.ts b/js/apps/admin-ui/cypress/support/forms/Select.ts index 51f6b66bb3..47734c52b6 100644 --- a/js/apps/admin-ui/cypress/support/forms/Select.ts +++ b/js/apps/admin-ui/cypress/support/forms/Select.ts @@ -1,14 +1,14 @@ export default class Select { static assertSelectedItem( chain: Cypress.Chainable>, - itemName: string + itemName: string, ) { chain.should("have.text", itemName); } static selectItem( chain: Cypress.Chainable>, - itemName: string + itemName: string, ) { chain.click(); this.#getSelectMenu(chain).contains(itemName).click(); diff --git a/js/apps/admin-ui/cypress/support/pages/CommonElements.ts b/js/apps/admin-ui/cypress/support/pages/CommonElements.ts index 2c3bf7852d..7d8b89bc5f 100644 --- a/js/apps/admin-ui/cypress/support/pages/CommonElements.ts +++ b/js/apps/admin-ui/cypress/support/pages/CommonElements.ts @@ -43,13 +43,13 @@ export default class CommonElements { checkElementIsDisabled( element: Cypress.Chainable>, - disabled: boolean + disabled: boolean, ) { element.then(($btn) => { if ($btn.hasClass("pf-m-disabled")) { element.should( (!disabled ? "not." : "") + "have.class", - "pf-m-disabled" + "pf-m-disabled", ); } else { element.should((!disabled ? "not." : "") + "have.attr", "disabled"); diff --git a/js/apps/admin-ui/cypress/support/pages/LoginPage.ts b/js/apps/admin-ui/cypress/support/pages/LoginPage.ts index b3a134636f..10453f7065 100644 --- a/js/apps/admin-ui/cypress/support/pages/LoginPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/LoginPage.ts @@ -37,7 +37,7 @@ export default class LoginPage { validate() { cy.get('[role="progressbar"]').should("not.exist"); }, - } + }, ); } } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/Masthead.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/Masthead.ts index 5e81613be2..dbf47f2e4f 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/Masthead.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/Masthead.ts @@ -80,7 +80,7 @@ export default class Masthead extends CommonElements { .document() .then(({ documentElement }) => documentElement.getBoundingClientRect()) .then(({ width }) => - cy.get(width < 1024 ? this.userDrpDwnKebab : this.userDrpDwn) + cy.get(width < 1024 ? this.userDrpDwnKebab : this.userDrpDwn), ); } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/SidebarPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/SidebarPage.ts index a45049d113..3e0fd4b7f9 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/SidebarPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/SidebarPage.ts @@ -21,7 +21,7 @@ export default class SidebarPage extends CommonElements { cy.findByTestId(this.realmsDrpDwn).click(); cy.get('[data-testid="realmSelector"] li').should( "have.length", - length + 1 // account for button + length + 1, // account for button ); cy.findByTestId(this.realmsDrpDwn).click({ force: true }); } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/components/FormPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/components/FormPage.ts index d94b1f51fd..457e6424d0 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/components/FormPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/components/FormPage.ts @@ -28,7 +28,7 @@ export default class FormPage extends CommonElements { checkSaveButtonIsDisabled(disabled: boolean) { this.checkElementIsDisabled( cy.get(this.primaryBtn).contains("Save"), - disabled + disabled, ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/components/PageObject.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/components/PageObject.ts index 2c7209e3c2..69eab07fe4 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/components/PageObject.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/components/PageObject.ts @@ -22,7 +22,7 @@ export default class PageObject { protected assertIsVisible( element: Cypress.Chainable, - isVisible: boolean + isVisible: boolean, ) { element.should((!isVisible ? "not." : "") + "be.visible"); return this; @@ -30,13 +30,13 @@ export default class PageObject { protected assertIsEnabled( element: Cypress.Chainable, - isEnabled = true + isEnabled = true, ) { element.then(($btn) => { if ($btn.hasClass("pf-m-disabled")) { element.should( (isEnabled ? "not." : "") + "have.class", - "pf-m-disabled" + "pf-m-disabled", ); } else { element.should((isEnabled ? "not." : "") + "have.attr", "disabled"); @@ -61,7 +61,7 @@ export default class PageObject { protected assertSwitchStateOn( element?: Cypress.Chainable, - isOn = true + isOn = true, ) { (element ?? cy.get(this.switchInput)) .parent() @@ -76,7 +76,7 @@ export default class PageObject { protected assertDropdownMenuIsOpen( isOpen = true, - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { this.assertExist(element ?? cy.get(this.drpDwnMenuList), isOpen); return this; @@ -85,13 +85,13 @@ export default class PageObject { protected assertDropdownMenuIsClosed(element?: Cypress.Chainable) { return this.assertDropdownMenuIsOpen( false, - element ?? cy.get(this.drpDwnMenuList) + element ?? cy.get(this.drpDwnMenuList), ); } protected clickDropdownMenuItem( itemName: string, - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { (element ?? cy.get(this.drpDwnMenuItem).contains(itemName)).click(); return this; @@ -99,7 +99,7 @@ export default class PageObject { protected clickDropdownMenuToggleButton( itemName: string, - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { element = element ?? @@ -110,7 +110,7 @@ export default class PageObject { protected openDropdownMenu( itemName: string, - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { element = element ?? @@ -122,7 +122,7 @@ export default class PageObject { protected closeDropdownMenu( itemName: string, - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { element = element ?? @@ -135,19 +135,19 @@ export default class PageObject { protected assertDropdownMenuItemIsSelected( itemName: string, isSelected: boolean, - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { element = element ?? cy.get(this.drpDwnMenuItem); this.assertExist( element.contains(itemName).find(this.selectItemSelectedIcon), - isSelected + isSelected, ); return this; } protected assertDropdownMenuHasItems( items: string[], - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { const initialElement = element; for (const item of items) { @@ -159,7 +159,7 @@ export default class PageObject { protected assertDropdownMenuHasLabels( items: string[], - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { const initialElement = element; for (const item of items) { @@ -171,7 +171,7 @@ export default class PageObject { protected assertDropdownMenuItemsEqualTo( number: number, - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { element = element ?? cy.get(this.drpDwnMenuList); element.find(this.drpDwnMenuItem).should(($item) => { @@ -182,7 +182,7 @@ export default class PageObject { protected assertSelectMenuIsOpen( isOpen = true, - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { element = element ?? cy.get(this.selectMenuList); return this.assertDropdownMenuIsOpen(isOpen, element); @@ -195,7 +195,7 @@ export default class PageObject { protected clickSelectMenuItem( itemName: string, - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { element = element ?? @@ -205,7 +205,7 @@ export default class PageObject { protected clickSelectMenuToggleButton( itemName: string, - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { element = element ?? @@ -224,7 +224,7 @@ export default class PageObject { protected closeSelectMenu( itemName: string, - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { element = element ?? @@ -237,7 +237,7 @@ export default class PageObject { protected assertSelectMenuItemIsSelected( itemName: string, isSelected: boolean, - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { element = element ?? cy.get(this.selectMenuItem); return this.assertDropdownMenuItemIsSelected(itemName, isSelected, element); @@ -245,7 +245,7 @@ export default class PageObject { protected assertSelectMenuHasItems( items: string[], - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { const initialElement = element; for (const item of items) { @@ -257,7 +257,7 @@ export default class PageObject { protected assertSelectMenuItemsEqualTo( number: number, - element?: Cypress.Chainable + element?: Cypress.Chainable, ) { element = element ?? cy.get(this.selectMenuList); element.find(this.selectMenuItem).should(($item) => { @@ -320,11 +320,11 @@ export default class PageObject { protected assertChipGroupItemExist( groupName: string, itemName: string, - exist: boolean + exist: boolean, ) { this.assertExist( this.getChipGroup(groupName).contains(this.chipItem, itemName), - exist + exist, ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/components/TabPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/components/TabPage.ts index 9d88c94a59..3834d88cc0 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/components/TabPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/components/TabPage.ts @@ -32,7 +32,7 @@ export default class TabPage extends CommonElements { checkTabExists( tabName: string, exists: boolean, - index: number | undefined = 0 + index: number | undefined = 0, ) { const condition = exists ? "exist" : "not.exist"; this.getTab(tabName, index).should(condition); diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/components/TablePage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/components/TablePage.ts index e7ad6d155e..dd3655ee90 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/components/TablePage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/components/TablePage.ts @@ -27,7 +27,7 @@ export default class TablePage extends CommonElements { selectRowItemCheckbox(itemName: string) { cy.get( - (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem + (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem, ) .contains(itemName) .parentsUntil("tbody") @@ -38,7 +38,7 @@ export default class TablePage extends CommonElements { clickRowItemLink(itemName: string) { cy.get( - (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem + (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem, ) .contains(itemName) .click(); @@ -47,7 +47,7 @@ export default class TablePage extends CommonElements { selectRowItemAction(itemName: string, actionItemName: string) { cy.get( - (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem + (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem, ) .contains(itemName) .parentsUntil("tbody") @@ -63,7 +63,7 @@ export default class TablePage extends CommonElements { this.tableRowItem + ":nth-child(" + row + - ")" + ")", ) .find("td:nth-child(" + column + ")") .type(value); @@ -76,7 +76,7 @@ export default class TablePage extends CommonElements { this.tableRowItem + ":nth-child(" + row + - ")" + ")", ) .find("td:nth-child(" + column + ") " + appendChildren) .click(); @@ -86,10 +86,10 @@ export default class TablePage extends CommonElements { clickRowItemByItemName( itemName: string, column: number, - appendChildren?: string + appendChildren?: string, ) { cy.get( - (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem + (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem, ) .find("td:nth-child(" + column + ") " + appendChildren) .contains(itemName) @@ -100,7 +100,7 @@ export default class TablePage extends CommonElements { clickHeaderItem(column: number, appendChildren?: string) { cy.get( (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + - this.tableHeaderRowItem + this.tableHeaderRowItem, ) .find("td:nth-child(" + column + ") " + appendChildren) .click(); @@ -109,7 +109,7 @@ export default class TablePage extends CommonElements { checkRowItemsEqualTo(amount: number) { cy.get( - (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem + (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem, ) .its("length") .should("be.eq", amount); @@ -118,7 +118,7 @@ export default class TablePage extends CommonElements { checkRowItemsGreaterThan(amount: number) { cy.get( - (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem + (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem, ) .its("length") .should("be.gt", amount); @@ -127,7 +127,7 @@ export default class TablePage extends CommonElements { checkRowItemExists(itemName: string, exist = true) { cy.get( - (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem + (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem, ) .contains(itemName) .should((!exist ? "not." : "") + "exist"); @@ -136,7 +136,7 @@ export default class TablePage extends CommonElements { checkRowItemValueByItemName(itemName: string, column: number, value: string) { cy.get( - (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem + (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem, ) .contains(itemName) .parentsUntil("tbody") @@ -149,14 +149,14 @@ export default class TablePage extends CommonElements { row: number, column: number, value: string, - appendChildren?: string + appendChildren?: string, ) { cy.get( (this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem + ":nth-child(" + row + - ")" + ")", ) .find("td:nth-child(" + column + ") " + appendChildren) .should("have.text", value) diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/configure/realm_settings/PartialImportModal.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/configure/realm_settings/PartialImportModal.ts index f88aa6ee93..5ee0898e97 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/configure/realm_settings/PartialImportModal.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/configure/realm_settings/PartialImportModal.ts @@ -9,7 +9,7 @@ export default class GroupModal { typeResourceFile = (filename: string) => { cy.get("#partial-import-file-filename").selectFile( "cypress/fixtures/partial-import-test-data/" + filename, - { action: "drag-drop" } + { action: "drag-drop" }, ); }; diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/RoleMappingTab.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/RoleMappingTab.ts index 404ba6c736..679bbfedc5 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/RoleMappingTab.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/RoleMappingTab.ts @@ -30,7 +30,7 @@ export default class RoleMappingTab { assignRole(notEmpty = true) { cy.findByTestId( - notEmpty ? this.assignEmptyRoleBtn(this.type) : this.assignRoleBtn + notEmpty ? this.assignEmptyRoleBtn(this.type) : this.assignRoleBtn, ).click(); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/authentication/FlowDetail.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/authentication/FlowDetail.ts index 693a0a7c0c..a3b6031433 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/authentication/FlowDetail.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/authentication/FlowDetail.ts @@ -26,7 +26,7 @@ export default class FlowDetails { const executionId = rowDetails.children().attr("data-id"); cy.intercept( "POST", - `/admin/realms/test*/authentication/executions/${executionId}/lower-priority` + `/admin/realms/test*/authentication/executions/${executionId}/lower-priority`, ).as("priority"); callback(); cy.wait("@priority"); @@ -90,7 +90,7 @@ export default class FlowDetails { private fillSubFlowModal(subFlowName: string, name: string) { cy.get(".pf-c-modal-box__title-text").contains( - "Add step to " + subFlowName + "Add step to " + subFlowName, ); cy.findByTestId("name").type(name); cy.findByTestId("modal-add").click(); @@ -99,7 +99,7 @@ export default class FlowDetails { fillCreateForm( name: string, description: string, - type: "Basic flow" | "Client flow" + type: "Basic flow" | "Client flow", ) { cy.findByTestId("name").type(name); cy.findByTestId("description").type(description); diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/authentication/OTPPolicies.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/authentication/OTPPolicies.ts index 5a5f971e58..dbaaf5ef3c 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/authentication/OTPPolicies.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/authentication/OTPPolicies.ts @@ -17,7 +17,7 @@ export default class OTPPolicies { checkSupportedApplications(...supportedApplications: string[]) { cy.findByTestId("supportedApplications").should( "have.text", - supportedApplications.join("") + supportedApplications.join(""), ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/authentication/WebAuthnPolicies.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/authentication/WebAuthnPolicies.ts index ff5350f94d..1f38e85457 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/authentication/WebAuthnPolicies.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/authentication/WebAuthnPolicies.ts @@ -21,7 +21,7 @@ export default class WebAuthnPolicies { cy.get( `#${ isPasswordLess ? prop.replace("Policy", "PolicyPasswordless") : prop - }` + }`, ) .click() .parent() diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/client_scopes/CreateClientScopePage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/client_scopes/CreateClientScopePage.ts index 2a6bfaad1f..db1f4240ef 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/client_scopes/CreateClientScopePage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/client_scopes/CreateClientScopePage.ts @@ -43,7 +43,7 @@ export default class CreateClientScopePage extends CommonPage { name: string, description = "", consentScreenText = "", - displayOrder = "" + displayOrder = "", ) { cy.get(this.clientScopeNameInput).clear(); diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/CreateClientPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/CreateClientPage.ts index b082250172..56a3a652be 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/CreateClientPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/CreateClientPage.ts @@ -73,7 +73,7 @@ export default class CreateClientPage extends CommonPage { name = "", description = "", alwaysDisplay?: boolean, - frontchannelLogout?: boolean + frontchannelLogout?: boolean, ) { cy.get(this.clientIdInput).clear(); diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/CreatePermissionPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/CreatePermissionPage.ts index ea4c422060..7a59492089 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/CreatePermissionPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/CreatePermissionPage.ts @@ -4,7 +4,7 @@ import type PolicyRepresentation from "@keycloak/keycloak-admin-client/lib/defs/ export default class CreatePermissionPage extends CommonPage { fillPermissionForm(permission: PolicyRepresentation) { Object.entries(permission).map(([key, value]) => - cy.get(`#${key}`).type(value) + cy.get(`#${key}`).type(value), ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/AdvancedSamlTab.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/AdvancedSamlTab.ts index 072fbca6b3..074230f81c 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/AdvancedSamlTab.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/AdvancedSamlTab.ts @@ -20,7 +20,7 @@ export class AdvancedSamlTab extends PageObject { checkTermsOfServiceUrl(termsOfServiceUrl: string) { cy.findAllByTestId(this.termsOfServiceUrlId).should( "have.value", - termsOfServiceUrl + termsOfServiceUrl, ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/AdvancedTab.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/AdvancedTab.ts index 2f4a7c56b7..2246460886 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/AdvancedTab.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/AdvancedTab.ts @@ -75,7 +75,7 @@ export default class AdvancedTab extends PageObject { new Date().toLocaleString("en-US", { dateStyle: "long", timeStyle: "short", - }) + }), ); return this; @@ -89,7 +89,7 @@ export default class AdvancedTab extends PageObject { checkTestClusterAvailability(active: boolean) { cy.get(this.testClusterAvailability).should( (active ? "not." : "") + "have.class", - "pf-m-disabled" + "pf-m-disabled", ); return this; } @@ -132,7 +132,7 @@ export default class AdvancedTab extends PageObject { checkAccessTokenSignatureAlgorithm(algorithm: string) { cy.get(this.accessTokenSignatureAlgorithmInput).should( "have.text", - algorithm + algorithm, ); return this; } @@ -175,7 +175,7 @@ export default class AdvancedTab extends PageObject { .parent() .click(); this.assertSwitchStateOn( - cy.get(this.useRefreshTokenForClientCredentialsGrantSwitch) + cy.get(this.useRefreshTokenForClientCredentialsGrantSwitch), ); cy.get(this.useLowerCaseBearerTypeSwitch).parent().click(); this.assertSwitchStateOn(cy.get(this.useLowerCaseBearerTypeSwitch)); @@ -191,7 +191,7 @@ export default class AdvancedTab extends PageObject { .parent() .click(); this.assertSwitchStateOff( - cy.get(this.useRefreshTokenForClientCredentialsGrantSwitch) + cy.get(this.useRefreshTokenForClientCredentialsGrantSwitch), ); } @@ -220,7 +220,7 @@ export default class AdvancedTab extends PageObject { cy.get(this.oAuthMutualSwitch).scrollIntoView(); this.assertSwitchStateOn(cy.get(this.oAuthMutualSwitch)); this.assertSwitchStateOn( - cy.get(this.pushedAuthorizationRequestRequiredSwitch) + cy.get(this.pushedAuthorizationRequestRequiredSwitch), ); return this; } @@ -228,7 +228,7 @@ export default class AdvancedTab extends PageObject { checkAdvancedSwitchesOff() { this.assertSwitchStateOff(cy.get(this.oAuthMutualSwitch)); this.assertSwitchStateOff( - cy.get(this.pushedAuthorizationRequestRequiredSwitch) + cy.get(this.pushedAuthorizationRequestRequiredSwitch), ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/KeysTab.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/KeysTab.ts index c77e0b0149..28f5d4c7cf 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/KeysTab.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/KeysTab.ts @@ -28,7 +28,7 @@ export default class KeysTab extends CommonPage { archiveFormat: string, keyAlias: string, keyPassword: string, - storePassword: string + storePassword: string, ) { cy.get("#archiveFormat").click(); cy.findAllByRole("option").contains(archiveFormat).click(); diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/authorization_subtabs/PoliciesTab.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/authorization_subtabs/PoliciesTab.ts index 5eb8d421cf..04085a3631 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/authorization_subtabs/PoliciesTab.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/client_details/tabs/authorization_subtabs/PoliciesTab.ts @@ -16,7 +16,7 @@ export default class PoliciesTab extends CommonPage { fillBasePolicyForm(policy: { [key: string]: string }) { Object.entries(policy).map(([key, value]) => - cy.findByTestId(key).type(value) + cy.findByTestId(key).type(value), ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/tabs/InitialAccessTokenTab.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/tabs/InitialAccessTokenTab.ts index eacf8845a5..957531cd60 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/tabs/InitialAccessTokenTab.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/clients/tabs/InitialAccessTokenTab.ts @@ -60,7 +60,7 @@ export default class InitialAccessTokenTab extends CommonPage { checkExpirationGreaterThanZeroError() { cy.get(this.expirationText).should( "have.text", - "Value should should be greater or equal to 1" + "Value should should be greater or equal to 1", ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/events/tabs/AdminEventsTab.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/events/tabs/AdminEventsTab.ts index d7398114c5..3911530b85 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/events/tabs/AdminEventsTab.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/events/tabs/AdminEventsTab.ts @@ -57,7 +57,7 @@ export default class AdminEventsTab extends PageObject { public assertAdminSearchDropdownMenuHasLabels() { super.assertDropdownMenuHasLabels( - Object.values(AdminEventsTabSearchFormFieldsLabel) + Object.values(AdminEventsTabSearchFormFieldsLabel), ); return this; } @@ -204,7 +204,7 @@ export default class AdminEventsTab extends PageObject { public assertResourceTypesChipGroupExist(exist: boolean) { super.assertChipGroupExist( AdminEventsTabSearchFormFieldsLabel.ResourceTypes, - exist + exist, ); return this; } @@ -212,7 +212,7 @@ export default class AdminEventsTab extends PageObject { public assertOperationTypesChipGroupExist(exist: boolean) { super.assertChipGroupExist( AdminEventsTabSearchFormFieldsLabel.OperationTypes, - exist + exist, ); return this; } @@ -220,19 +220,19 @@ export default class AdminEventsTab extends PageObject { public assertResourcePathChipGroupExist(exist: boolean) { super.assertChipGroupExist( AdminEventsTabSearchFormFieldsLabel.ResourcePath, - exist + exist, ); return this; } public assertResourcePathChipGroupItemExist( itemName: string, - exist: boolean + exist: boolean, ) { super.assertChipGroupItemExist( AdminEventsTabSearchFormFieldsLabel.ResourcePath, itemName, - exist + exist, ); return this; } @@ -240,7 +240,7 @@ export default class AdminEventsTab extends PageObject { public assertRealmChipGroupExist(exist: boolean) { super.assertChipGroupExist( AdminEventsTabSearchFormFieldsLabel.Realm, - exist + exist, ); return this; } @@ -248,7 +248,7 @@ export default class AdminEventsTab extends PageObject { public assertClientChipGroupExist(exist: boolean) { super.assertChipGroupExist( AdminEventsTabSearchFormFieldsLabel.Client, - exist + exist, ); return this; } @@ -261,7 +261,7 @@ export default class AdminEventsTab extends PageObject { public assertIpAddressChipGroupExist(exist: boolean) { super.assertChipGroupExist( AdminEventsTabSearchFormFieldsLabel.IpAddress, - exist + exist, ); return this; } @@ -269,7 +269,7 @@ export default class AdminEventsTab extends PageObject { public assertDateFromChipGroupExist(exist: boolean) { super.assertChipGroupExist( AdminEventsTabSearchFormFieldsLabel.DateFrom, - exist + exist, ); return this; } @@ -277,7 +277,7 @@ export default class AdminEventsTab extends PageObject { public assertDateToChipGroupExist(exist: boolean) { super.assertChipGroupExist( AdminEventsTabSearchFormFieldsLabel.DateTo, - exist + exist, ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/events/tabs/UserEventsTab.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/events/tabs/UserEventsTab.ts index ff99f3a034..9b8d99858f 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/events/tabs/UserEventsTab.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/events/tabs/UserEventsTab.ts @@ -36,7 +36,7 @@ export default class UserEventsTab extends PageObject { public openSearchUserEventDropdownMenu() { super.openDropdownMenu( "", - cy.findByTestId(this.searchUserEventDrpDwnToggle) + cy.findByTestId(this.searchUserEventDrpDwnToggle), ); return this; } @@ -63,7 +63,7 @@ export default class UserEventsTab extends PageObject { public assertUserSearchDropdownMenuHasLabels() { super.assertDropdownMenuHasLabels( - Object.values(UserEventsTabSearchFormFieldsLabel) + Object.values(UserEventsTabSearchFormFieldsLabel), ); return this; } @@ -161,7 +161,7 @@ export default class UserEventsTab extends PageObject { public removeEventTypeChipGroupItem(itemName: string) { super.removeChipGroupItem( UserEventsTabSearchFormFieldsLabel.EventType, - itemName + itemName, ); return this; } @@ -170,7 +170,7 @@ export default class UserEventsTab extends PageObject { super.assertChipGroupItemExist( UserEventsTabSearchFormFieldsLabel.EventType, itemName, - exist + exist, ); return this; } @@ -178,7 +178,7 @@ export default class UserEventsTab extends PageObject { public assertUserIdChipGroupExist(exist: boolean) { super.assertChipGroupExist( UserEventsTabSearchFormFieldsLabel.UserId, - exist + exist, ); return this; } @@ -186,7 +186,7 @@ export default class UserEventsTab extends PageObject { public assertEventTypeChipGroupExist(exist: boolean) { super.assertChipGroupExist( UserEventsTabSearchFormFieldsLabel.EventType, - exist + exist, ); return this; } @@ -194,7 +194,7 @@ export default class UserEventsTab extends PageObject { public assertClientChipGroupExist(exist: boolean) { super.assertChipGroupExist( UserEventsTabSearchFormFieldsLabel.Client, - exist + exist, ); return this; } @@ -202,7 +202,7 @@ export default class UserEventsTab extends PageObject { public assertDateFromChipGroupExist(exist: boolean) { super.assertChipGroupExist( UserEventsTabSearchFormFieldsLabel.DateFrom, - exist + exist, ); return this; } @@ -210,7 +210,7 @@ export default class UserEventsTab extends PageObject { public assertDateToChipGroupExist(exist: boolean) { super.assertChipGroupExist( UserEventsTabSearchFormFieldsLabel.DateTo, - exist + exist, ); return this; } @@ -218,7 +218,7 @@ export default class UserEventsTab extends PageObject { public assertIpAddressChipGroupExist(exist: boolean) { super.assertChipGroupExist( UserEventsTabSearchFormFieldsLabel.IpAddress, - exist + exist, ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/groups/GroupPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/groups/GroupPage.ts index d654baa45a..5af8356ac7 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/groups/GroupPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/groups/GroupPage.ts @@ -104,7 +104,7 @@ export default class GroupPage extends PageObject { public moveGroupItemAction( groupName: string, - destinationGroupName: string[] + destinationGroupName: string[], ) { listingPage.clickRowDetails(groupName); listingPage.clickDetailMenu("Move to"); @@ -176,18 +176,18 @@ export default class GroupPage extends PageObject { public assertNotificationCouldNotCreateGroupWithEmptyName() { masthead.checkNotificationMessage( - "Could not create group Group name is missing" + "Could not create group Group name is missing", ); return this; } public assertNotificationCouldNotCreateGroupWithDuplicatedName( - groupName: string + groupName: string, ) { masthead.checkNotificationMessage( "Could not create group Top level group named '" + groupName + - "' already exists." + "' already exists.", ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/groups/group_details/GroupDetailPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/groups/group_details/GroupDetailPage.ts index ed6e659518..0fbdc63de7 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/groups/group_details/GroupDetailPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/groups/group_details/GroupDetailPage.ts @@ -53,7 +53,7 @@ export default class GroupDetailPage extends GroupPage { super.openDropdownMenu("", cy.findByTestId(this.actionDrpDwnButton)); super.clickDropdownMenuItem( "", - cy.findByTestId(this.actionDrpDwnItemRenameGroup) + cy.findByTestId(this.actionDrpDwnItemRenameGroup), ); return this; } @@ -62,7 +62,7 @@ export default class GroupDetailPage extends GroupPage { super.openDropdownMenu("", cy.findByTestId(this.actionDrpDwnButton)); super.clickDropdownMenuItem( "", - cy.findByTestId(this.actionDrpDwnItemDeleteGroup) + cy.findByTestId(this.actionDrpDwnItemDeleteGroup), ); modalUtils.confirmModal(); return this; diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/groups/group_details/tabs/MembersTab.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/groups/group_details/tabs/MembersTab.ts index 12e88baaf1..6e23b454c4 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/groups/group_details/tabs/MembersTab.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/groups/group_details/tabs/MembersTab.ts @@ -61,14 +61,14 @@ export default class MembersTab extends GroupDetailPage { public assertNotificationUserAddedToTheGroup(amount: number) { masthead.checkNotificationMessage( - `${amount} user${amount > 1 ? "s" : ""} added to the group` + `${amount} user${amount > 1 ? "s" : ""} added to the group`, ); return this; } public assertNotificationUserLeftTheGroup(amount: number) { masthead.checkNotificationMessage( - `${amount} user${amount > 1 ? "s" : ""} left the group` + `${amount} user${amount > 1 ? "s" : ""} left the group`, ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/AddMapperPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/AddMapperPage.ts index 46b8c67b17..f430e45cdb 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/AddMapperPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/AddMapperPage.ts @@ -81,7 +81,7 @@ export default class AddMapperPage { cy.findByTestId(this.socialProfileJSONfieldPath).clear(); cy.findByTestId(this.socialProfileJSONfieldPath).type( - "social profile JSON field path" + "social profile JSON field path", ); cy.findByTestId(this.userAttributeName).clear(); @@ -175,7 +175,7 @@ export default class AddMapperPage { cy.findByTestId(this.userSessionAttributeValue).clear(); cy.findByTestId(this.userSessionAttributeValue).type( - "user session attribute value" + "user session attribute value", ); this.saveNewMapper(); @@ -323,7 +323,7 @@ export default class AddMapperPage { cy.findByTestId(this.socialProfileJSONfieldPath).clear(); cy.findByTestId(this.socialProfileJSONfieldPath).type( - "social profile JSON field path edited" + "social profile JSON field path edited", ); cy.findByTestId(this.userAttributeName).clear(); diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/CreateProviderPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/CreateProviderPage.ts index ba3b47b6b5..1176e365d3 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/CreateProviderPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/CreateProviderPage.ts @@ -43,7 +43,7 @@ export default class CreateProviderPage { checkAddButtonDisabled(disabled = true) { cy.findByTestId(this.addButton).should( - !disabled ? "not." : "" + "be.disabled" + !disabled ? "not." : "" + "be.disabled", ); return this; } @@ -125,7 +125,7 @@ export default class CreateProviderPage { shouldBeSuccessful() { cy.findByTestId(this.discoveryEndpoint).should( "have.class", - "pf-m-success" + "pf-m-success", ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/ProviderBaseAdvancedSettingsPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/ProviderBaseAdvancedSettingsPage.ts index 46f02d2302..e8395c0383 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/ProviderBaseAdvancedSettingsPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/ProviderBaseAdvancedSettingsPage.ts @@ -156,7 +156,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject { cy.get(this.firstLoginFlowSelect).click(); super.clickSelectMenuItem( loginFlowOption, - cy.get(".pf-c-select__menu-item").contains(loginFlowOption) + cy.get(".pf-c-select__menu-item").contains(loginFlowOption), ); return this; } @@ -165,18 +165,18 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject { cy.get(this.postLoginFlowSelect).click(); super.clickSelectMenuItem( loginFlowOption, - cy.get(".pf-c-select__menu-item").contains(loginFlowOption) + cy.get(".pf-c-select__menu-item").contains(loginFlowOption), ); return this; } public selectClientAssertSignAlg( - clientAssertionSigningAlg: ClientAssertionSigningAlg + clientAssertionSigningAlg: ClientAssertionSigningAlg, ) { cy.get(this.clientAssertionSigningAlg).click(); super.clickSelectMenuItem( clientAssertionSigningAlg, - cy.get(".pf-c-select__menu-item").contains(clientAssertionSigningAlg) + cy.get(".pf-c-select__menu-item").contains(clientAssertionSigningAlg), ); return this; } @@ -185,7 +185,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject { cy.get(this.syncModeSelect).click(); super.clickSelectMenuItem( syncModeOption, - cy.get(".pf-c-select__menu-item").contains(syncModeOption) + cy.get(".pf-c-select__menu-item").contains(syncModeOption), ); return this; } @@ -194,7 +194,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject { cy.get(this.promptSelect).click(); super.clickSelectMenuItem( promptOption, - cy.get(".pf-c-select__menu-item").contains(promptOption).parent() + cy.get(".pf-c-select__menu-item").contains(promptOption).parent(), ); return this; } @@ -222,7 +222,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject { public assertAcceptsPromptNoneForwardFromClientSwitchTurnedOn(isOn: boolean) { super.assertSwitchStateOn( cy.get(this.acceptsPromptNoneForwardFromClientSwitch).parent(), - isOn + isOn, ); return this; } @@ -230,7 +230,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject { public assertDisableUserInfoSwitchTurnedOn(isOn: boolean) { super.assertSwitchStateOn( cy.get(this.disableUserInfoSwitch).parent(), - isOn + isOn, ); return this; } @@ -248,7 +248,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject { public assertHideOnLoginPageSwitchTurnedOn(isOn: boolean) { super.assertSwitchStateOn( cy.get(this.hideOnLoginPageSwitch).parent(), - isOn + isOn, ); return this; } @@ -269,14 +269,14 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject { } public assertFirstLoginFlowSelectOptionEqual( - loginFlowOption: LoginFlowOption + loginFlowOption: LoginFlowOption, ) { cy.get(this.firstLoginFlowSelect).should("have.text", loginFlowOption); return this; } public assertPostLoginFlowSelectOptionEqual( - loginFlowOption: LoginFlowOption + loginFlowOption: LoginFlowOption, ) { cy.get(this.postLoginFlowSelect).should("have.text", loginFlowOption); return this; @@ -288,11 +288,11 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject { } public assertClientAssertSigAlgSelectOptionEqual( - clientAssertionSigningAlg: ClientAssertionSigningAlg + clientAssertionSigningAlg: ClientAssertionSigningAlg, ) { cy.get(this.clientAssertionSigningAlg).should( "have.text", - clientAssertionSigningAlg + clientAssertionSigningAlg, ); return this; } @@ -305,7 +305,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject { this.clickSaveBtn(); masthead.checkNotificationMessage( "Could not update the provider The url [" + url + "_url] is malformed", - true + true, ); this.clickRevertBtn(); //cy.findByTestId(url + "Url").contains @@ -382,7 +382,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject { this.clickAcceptsPromptNoneForwardFromClientSwitch(); super.assertSwitchStateOn( - cy.get(this.acceptsPromptNoneForwardFromClientSwitch) + cy.get(this.acceptsPromptNoneForwardFromClientSwitch), ); return this; } @@ -413,12 +413,12 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject { this.assertHideOnLoginPageSwitchTurnedOn(false); this.assertFirstLoginFlowSelectOptionEqual( - LoginFlowOption.firstBrokerLogin + LoginFlowOption.firstBrokerLogin, ); this.assertPostLoginFlowSelectOptionEqual(LoginFlowOption.none); this.assertSyncModeSelectOptionEqual(SyncModeOption.import); this.assertClientAssertSigAlgSelectOptionEqual( - ClientAssertionSigningAlg.algorithmNotSpecified + ClientAssertionSigningAlg.algorithmNotSpecified, ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/ProviderBaseGeneralSettingsPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/ProviderBaseGeneralSettingsPage.ts index d87e37f864..503af469a0 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/ProviderBaseGeneralSettingsPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/ProviderBaseGeneralSettingsPage.ts @@ -122,12 +122,12 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject { protected assertCommonFilledDataEqual(idpName: string) { cy.get(this.clientIdInput).should( "have.value", - this.testData["ClientId"] + idpName + this.testData["ClientId"] + idpName, ); cy.get(this.clientSecretInput).should("contain.value", "****"); cy.get(this.displayOrderInput).should( "have.value", - this.testData["DisplayOrder"] + this.testData["DisplayOrder"], ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/social/ProviderFacebookGeneralSettings.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/social/ProviderFacebookGeneralSettings.ts index 0f6b434c08..86fba88cec 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/social/ProviderFacebookGeneralSettings.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/social/ProviderFacebookGeneralSettings.ts @@ -15,7 +15,7 @@ export default class ProviderFacebookGeneralSettings extends ProviderBaseGeneral public assertAdditionalUsersProfileFieldsInputEqual(value: string) { cy.findByTestId(this.additionalUsersProfileFieldsInput).should( "have.value", - value + value, ); return this; } @@ -23,7 +23,7 @@ export default class ProviderFacebookGeneralSettings extends ProviderBaseGeneral public fillData(idpName: string) { this.fillCommonFields(idpName); this.typeAdditionalUsersProfileFieldsInput( - idpName + additionalUsersProfile_input_test_value + idpName + additionalUsersProfile_input_test_value, ); return this; } @@ -31,7 +31,7 @@ export default class ProviderFacebookGeneralSettings extends ProviderBaseGeneral public assertFilledDataEqual(idpName: string) { this.assertCommonFilledDataEqual(idpName); this.assertAdditionalUsersProfileFieldsInputEqual( - idpName + additionalUsersProfile_input_test_value + idpName + additionalUsersProfile_input_test_value, ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/social/ProviderGoogleGeneralSettings.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/social/ProviderGoogleGeneralSettings.ts index 780bc9be4d..d36e0f67e7 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/social/ProviderGoogleGeneralSettings.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/social/ProviderGoogleGeneralSettings.ts @@ -36,7 +36,7 @@ export default class ProviderGoogleGeneralSettings extends ProviderBaseGeneralSe public assertRequestRefreshTokenSwitchTurnedOn(isOn: boolean) { super.assertSwitchStateOn( cy.findByTestId(this.requestRefreshTokenSwitch), - isOn + isOn, ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/social/ProviderOpenshiftGeneralSettings.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/social/ProviderOpenshiftGeneralSettings.ts index a394e66817..7cb760404a 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/social/ProviderOpenshiftGeneralSettings.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/identity_providers/social/ProviderOpenshiftGeneralSettings.ts @@ -27,7 +27,7 @@ export default class ProviderOpenshiftGeneralSettings extends ProviderBaseGenera public fillData(idpName: string) { this.fillCommonFields(idpName); cy.findByTestId(this.baseUrlInput).type( - idpName + base_url_input_test_value + idpName + base_url_input_test_value, ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/providers/ProviderPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/providers/ProviderPage.ts index 7c98d8c7ad..67a38bdd77 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/providers/ProviderPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/providers/ProviderPage.ts @@ -139,7 +139,7 @@ export default class ProviderPage { verifyChangedHourInput(expected: string, unexpected: string) { expect(cy.get(this.cacheHourInput).contains(expected).should("exist")); expect( - cy.get(this.cacheHourInput).contains(unexpected).should("not.exist") + cy.get(this.cacheHourInput).contains(unexpected).should("not.exist"), ); return this; } @@ -161,7 +161,7 @@ export default class ProviderPage { name: string, realm: string, principal: string, - keytab: string + keytab: string, ) { if (name) { cy.findByTestId(this.kerberosNameInput).clear().type(name); @@ -229,7 +229,7 @@ export default class ProviderPage { truststoreSpi?: string, connectionTimeout?: string, bindDn?: string, - bindCreds?: string + bindCreds?: string, ) { cy.findByTestId(this.connectionUrlInput).clear().type(connectionUrl); @@ -263,7 +263,7 @@ export default class ProviderPage { userObjClasses?: string, userLdapFilter?: string, searchScope?: string, - readTimeout?: string + readTimeout?: string, ) { cy.get(this.ldapEditModeInput).click(); cy.get(this.ldapEditModeList).contains(editMode).click(); diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/realm_roles/AssociatedRolesPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/realm_roles/AssociatedRolesPage.ts index 382c480daa..585cc4f7af 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/realm_roles/AssociatedRolesPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/realm_roles/AssociatedRolesPage.ts @@ -27,7 +27,7 @@ export default class AssociatedRolesPage { cy.findByTestId(this.compositeRoleBadge).should( "contain.text", - "Composite" + "Composite", ); return this; @@ -86,7 +86,7 @@ export default class AssociatedRolesPage { isRemoveAssociatedRolesBtnDisabled() { cy.findByTestId(this.removeRolesButton).should( "have.class", - "pf-m-disabled" + "pf-m-disabled", ); return this; } diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/realm_settings/RealmSettingsPage.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/realm_settings/RealmSettingsPage.ts index 0f2fc1eed7..30cab822d9 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/realm_settings/RealmSettingsPage.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/realm_settings/RealmSettingsPage.ts @@ -258,7 +258,7 @@ export default class RealmSettingsPage extends CommonPage { disableRealm() { cy.get(this.modalDialogTitle).contains("Disable realm?"); cy.get(this.modalDialogBodyText).contains( - "User and clients can't access the realm if it's disabled. Are you sure you want to continue?" + "User and clients can't access the realm if it's disabled. Are you sure you want to continue?", ); cy.findByTestId(this.modalConfirm).contains("Disable").click(); } @@ -386,7 +386,7 @@ export default class RealmSettingsPage extends CommonPage { cy.get(this.alertMessage).should( "be.visible", - "Success. The provider has been deleted." + "Success. The provider has been deleted.", ); return this; } @@ -492,7 +492,7 @@ export default class RealmSettingsPage extends CommonPage { changeTimeUnit( unit: "Minutes" | "Hours" | "Days", inputType: string, - listType: string + listType: string, ) { switch (unit) { case "Minutes": @@ -518,38 +518,38 @@ export default class RealmSettingsPage extends CommonPage { this.changeTimeUnit( "Minutes", this.ssoSessionIdleSelectMenu, - this.ssoSessionIdleSelectMenuList + this.ssoSessionIdleSelectMenuList, ); cy.findByTestId(this.ssoSessionMaxInput).clear().type("2"); this.changeTimeUnit( "Hours", this.ssoSessionMaxSelectMenu, - this.ssoSessionMaxSelectMenuList + this.ssoSessionMaxSelectMenuList, ); cy.findByTestId(this.ssoSessionIdleRememberMeInput).clear().type("3"); this.changeTimeUnit( "Days", this.ssoSessionIdleRememberMeSelectMenu, - this.ssoSessionIdleRememberMeSelectMenuList + this.ssoSessionIdleRememberMeSelectMenuList, ); cy.findByTestId(this.ssoSessionMaxRememberMeInput).clear().type("4"); this.changeTimeUnit( "Minutes", this.ssoSessionMaxRememberMeSelectMenu, - this.ssoSessionMaxRememberMeSelectMenuList + this.ssoSessionMaxRememberMeSelectMenuList, ); cy.findByTestId(this.clientSessionIdleInput).clear().type("5"); this.changeTimeUnit( "Hours", this.clientSessionIdleSelectMenu, - this.clientSessionIdleSelectMenuList + this.clientSessionIdleSelectMenuList, ); cy.findByTestId(this.clientSessionMaxInput).clear().type("6"); this.changeTimeUnit( "Days", this.clientSessionMaxSelectMenu, - this.clientSessionMaxSelectMenuList + this.clientSessionMaxSelectMenuList, ); cy.findByTestId(this.offlineSessionIdleInput).clear().type("7"); @@ -559,13 +559,13 @@ export default class RealmSettingsPage extends CommonPage { this.changeTimeUnit( "Minutes", this.loginTimeoutSelectMenu, - this.loginTimeoutSelectMenuList + this.loginTimeoutSelectMenuList, ); cy.findByTestId(this.loginActionTimeoutInput).clear().type("10"); this.changeTimeUnit( "Days", this.loginActionTimeoutSelectMenu, - this.loginActionTimeoutSelectMenuList + this.loginActionTimeoutSelectMenuList, ); } @@ -579,61 +579,61 @@ export default class RealmSettingsPage extends CommonPage { this.changeTimeUnit( "Days", this.accessTokenLifespanSelectMenu, - this.accessTokenLifespanSelectMenuList + this.accessTokenLifespanSelectMenuList, ); cy.findByTestId(this.accessTokenLifespanImplicitInput).clear().type("2"); this.changeTimeUnit( "Minutes", this.accessTokenLifespanImplicitSelectMenu, - this.accessTokenLifespanImplicitSelectMenuList + this.accessTokenLifespanImplicitSelectMenuList, ); cy.findByTestId(this.clientLoginTimeoutInput).clear().type("3"); this.changeTimeUnit( "Hours", this.clientLoginTimeoutSelectMenu, - this.clientLoginTimeoutSelectMenuList + this.clientLoginTimeoutSelectMenuList, ); cy.findByTestId(this.userInitiatedActionLifespanInput).clear().type("4"); this.changeTimeUnit( "Minutes", this.userInitiatedActionLifespanSelectMenu, - this.userInitiatedActionLifespanSelectMenuList + this.userInitiatedActionLifespanSelectMenuList, ); cy.findByTestId(this.defaultAdminInitatedInput).clear().type("5"); this.changeTimeUnit( "Days", this.defaultAdminInitatedInputSelectMenu, - this.defaultAdminInitatedInputSelectMenuList + this.defaultAdminInitatedInputSelectMenuList, ); cy.findByTestId(this.emailVerificationInput).clear().type("6"); this.changeTimeUnit( "Days", this.emailVerificationSelectMenu, - this.emailVerificationSelectMenuList + this.emailVerificationSelectMenuList, ); cy.findByTestId(this.idpEmailVerificationInput).clear().type("7"); this.changeTimeUnit( "Days", this.idpEmailVerificationSelectMenu, - this.idpEmailVerificationSelectMenuList + this.idpEmailVerificationSelectMenuList, ); cy.findByTestId(this.forgotPasswordInput).clear().type("8"); this.changeTimeUnit( "Days", this.forgotPasswordSelectMenu, - this.forgotPasswordSelectMenuList + this.forgotPasswordSelectMenuList, ); cy.findByTestId(this.executeActionsInput).clear().type("9"); this.changeTimeUnit( "Days", this.executeActionsSelectMenu, - this.executeActionsSelectMenuList + this.executeActionsSelectMenuList, ); } @@ -675,7 +675,7 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.eventListenersSaveBtn).click(); cy.get(this.alertMessage).should( "be.visible", - "Event listener has been updated." + "Event listener has been updated.", ); } @@ -684,7 +684,7 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.eventListenersSaveBtn).click({ force: true }); cy.get(this.alertMessage).should( "be.visible", - "Event listener has been updated." + "Event listener has been updated.", ); cy.get(this.eventListenersDrpDwn).should("not.have.text", "email"); } @@ -773,7 +773,7 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.jsonEditorSaveBtn).click(); cy.get(this.alertMessage).should( "be.visible", - "The client profiles configuration was updated" + "The client profiles configuration was updated", ); cy.findByTestId(this.formViewProfilesView).check(); cy.get("table").should("be.visible").contains("td", "Test"); @@ -792,7 +792,7 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.saveNewClientProfileBtn).click(); cy.get(this.alertMessage).should( "be.visible", - "Client profile updated successfully" + "Client profile updated successfully", ); } @@ -810,7 +810,7 @@ export default class RealmSettingsPage extends CommonPage { shouldShowErrorWhenDuplicate() { cy.get("form").should( "not.have.text", - "The name must be unique within the realm" + "The name must be unique within the realm", ); } @@ -820,7 +820,7 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.reloadBtn).click(); cy.findByTestId(this.newClientProfileNameInput).should( "have.value", - "Edit" + "Edit", ); } @@ -828,7 +828,7 @@ export default class RealmSettingsPage extends CommonPage { cy.get(this.clientProfileTwo).click(); cy.get('h2[class*="kc-emptyExecutors"]').should( "have.text", - "No executors configured" + "No executors configured", ); } @@ -842,7 +842,7 @@ export default class RealmSettingsPage extends CommonPage { cy.get(this.addExecutorCancelBtn).click(); cy.get('h2[class*="kc-emptyExecutors"]').should( "have.text", - "No executors configured" + "No executors configured", ); } @@ -856,11 +856,11 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.addExecutorSaveBtn).click(); cy.get(this.alertMessage).should( "be.visible", - "Success! Executor created successfully" + "Success! Executor created successfully", ); cy.get('ul[class*="pf-c-data-list"]').should( "have.text", - "secure-ciba-signed-authn-req" + "secure-ciba-signed-authn-req", ); } @@ -869,22 +869,22 @@ export default class RealmSettingsPage extends CommonPage { cy.get('svg[class*="kc-executor-trash-icon"]').click(); cy.get(this.modalDialogTitle).contains("Delete executor?"); cy.get(this.modalDialogBodyText).contains( - "The action will permanently delete secure-ciba-signed-authn-req. This cannot be undone." + "The action will permanently delete secure-ciba-signed-authn-req. This cannot be undone.", ); cy.findByTestId(this.modalConfirm).contains("Delete"); cy.get(this.deleteDialogCancelBtn).contains("Cancel").click(); cy.get('ul[class*="pf-c-data-list"]').should( "have.text", - "secure-ciba-signed-authn-req" + "secure-ciba-signed-authn-req", ); } openProfileDetails(name: string) { cy.intercept( - `/admin/realms/${this.realmName}/client-policies/profiles*` + `/admin/realms/${this.realmName}/client-policies/profiles*`, ).as("profilesFetch"); cy.get( - 'a[href*="realm-settings/client-policies/' + name + '/edit-profile"]' + 'a[href*="realm-settings/client-policies/' + name + '/edit-profile"]', ).click(); cy.wait("@profilesFetch"); return this; @@ -892,7 +892,7 @@ export default class RealmSettingsPage extends CommonPage { editExecutor(availablePeriod?: number) { cy.intercept( - `/admin/realms/${this.realmName}/client-policies/profiles*` + `/admin/realms/${this.realmName}/client-policies/profiles*`, ).as("profilesFetch"); cy.get(this.editExecutorBtn).click(); cy.wait("@profilesFetch"); @@ -917,7 +917,7 @@ export default class RealmSettingsPage extends CommonPage { checkExecutorNotInList() { cy.get('ul[class*="pf-c-data-list"]').should( "have.text", - "secure-ciba-signed-authn-req" + "secure-ciba-signed-authn-req", ); return this; } @@ -925,7 +925,7 @@ export default class RealmSettingsPage extends CommonPage { checkAvailablePeriodExecutor(value: number) { cy.findByTestId(this.availablePeriodExecutorFld).should( "have.value", - value + value, ); return this; } @@ -937,7 +937,7 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.addExecutorSaveBtn).click(); cy.get(this.alertMessage).should( "be.visible", - "Executor updated successfully" + "Executor updated successfully", ); } @@ -946,13 +946,13 @@ export default class RealmSettingsPage extends CommonPage { cy.get('svg[class*="kc-executor-trash-icon"]').click(); cy.get(this.modalDialogTitle).contains("Delete executor?"); cy.get(this.modalDialogBodyText).contains( - "The action will permanently delete secure-ciba-signed-authn-req. This cannot be undone." + "The action will permanently delete secure-ciba-signed-authn-req. This cannot be undone.", ); cy.findByTestId(this.modalConfirm).contains("Delete"); cy.findByTestId(this.modalConfirm).click(); cy.get('h2[class*="kc-emptyExecutors"]').should( "have.text", - "No executors configured" + "No executors configured", ); } @@ -985,7 +985,7 @@ export default class RealmSettingsPage extends CommonPage { cy.get(this.alertMessage).should( "be.visible", - "The client policy configuration was updated" + "The client policy configuration was updated", ); cy.findByTestId(this.formViewSelectPolicies).check(); cy.get("table").should("be.visible").contains("td", "Test"); @@ -997,7 +997,7 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.jsonEditorReloadBtn).contains("Reload"); cy.findByTestId(this.formViewSelectPolicies).check(); cy.findByTestId(this.createPolicyEmptyStateBtn).contains( - "Create client policy" + "Create client policy", ); } @@ -1024,7 +1024,7 @@ export default class RealmSettingsPage extends CommonPage { createNewClientPolicyFromList( name: string, description: string, - cancel?: boolean + cancel?: boolean, ) { cy.findByTestId(this.createPolicyBtn).click(); cy.findByTestId(this.newClientPolicyNameInput).type(name); @@ -1049,7 +1049,7 @@ export default class RealmSettingsPage extends CommonPage { cy.get(this.clientPolicy).click(); cy.get('h2[class*="kc-emptyConditions"]').should( "have.text", - "No conditions configured" + "No conditions configured", ); } @@ -1063,7 +1063,7 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.addConditionCancelBtn).click(); cy.get('h2[class*="kc-emptyConditions"]').should( "have.text", - "No conditions configured" + "No conditions configured", ); } @@ -1079,7 +1079,7 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.addConditionSaveBtn).click(); cy.get(this.alertMessage).should( "be.visible", - "Success! Condition created successfully" + "Success! Condition created successfully", ); cy.get('ul[class*="pf-c-data-list"]').should("have.text", "client-roles"); } @@ -1105,7 +1105,7 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.addConditionSaveBtn).click(); cy.get(this.alertMessage).should( "be.visible", - "Success! Condition created successfully" + "Success! Condition created successfully", ); cy.get('ul[class*="pf-c-data-list"]').contains("client-scopes"); } @@ -1121,7 +1121,7 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.addConditionSaveBtn).click(); cy.get(this.alertMessage).should( "be.visible", - "Success! Condition updated successfully" + "Success! Condition updated successfully", ); } @@ -1135,7 +1135,7 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.addConditionSaveBtn).click(); cy.get(this.alertMessage).should( "be.visible", - "Success! Condition updated successfully" + "Success! Condition updated successfully", ); } @@ -1155,13 +1155,13 @@ export default class RealmSettingsPage extends CommonPage { cy.findByTestId(this.deleteClientScopesConditionBtn).click(); cy.get(this.modalDialogTitle).contains("Delete condition?"); cy.get(this.modalDialogBodyText).contains( - "This action will permanently delete client-scopes. This cannot be undone." + "This action will permanently delete client-scopes. This cannot be undone.", ); cy.findByTestId(this.modalConfirm).contains("Delete"); cy.findByTestId(this.modalConfirm).click({ force: true }); cy.get('h2[class*="kc-emptyConditions"]').should( "have.text", - "No conditions configured" + "No conditions configured", ); } @@ -1183,7 +1183,7 @@ export default class RealmSettingsPage extends CommonPage { createNewClientPolicyFromEmptyState( name: string, description: string, - cancel?: boolean + cancel?: boolean, ) { cy.findByTestId(this.createPolicyEmptyStateBtn).click(); cy.findByTestId(this.newClientPolicyNameInput).type(name); diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/realm_settings/tabs/realmsettings_events_subtabs/AdminEventsSettingsTab.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/realm_settings/tabs/realmsettings_events_subtabs/AdminEventsSettingsTab.ts index 2e378645fd..7513bff1af 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/realm_settings/tabs/realmsettings_events_subtabs/AdminEventsSettingsTab.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/realm_settings/tabs/realmsettings_events_subtabs/AdminEventsSettingsTab.ts @@ -40,7 +40,7 @@ export default class AdminEventsSettingsTab extends PageObject { { waitForRealm, waitForConfig } = { waitForRealm: true, waitForConfig: false, - } + }, ) { waitForRealm && cy.intercept("/admin/realms/*").as("saveRealm"); waitForConfig && diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/users/user_details/tabs/IdentityProviderLinksTab.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/users/user_details/tabs/IdentityProviderLinksTab.ts index 03b3e46a48..e8207827e4 100644 --- a/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/users/user_details/tabs/IdentityProviderLinksTab.ts +++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/manage/users/user_details/tabs/IdentityProviderLinksTab.ts @@ -62,7 +62,7 @@ export default class IdentityProviderLinksTab { public assertNoIdentityProvidersLinkedMessageExist(exist: boolean) { cy.get(this.linkedProvidersSection).should( (exist ? "" : "not.") + "contain.text", - "No identity providers linked. Choose one from the list below." + "No identity providers linked. Choose one from the list below.", ); return this; @@ -71,7 +71,7 @@ export default class IdentityProviderLinksTab { public assertNoAvailableIdentityProvidersMessageExist(exist: boolean) { cy.get(this.availableProvidersSection).should( (exist ? "" : "not.") + "contain.text", - "No available identity providers." + "No available identity providers.", ); return this; @@ -92,7 +92,7 @@ export default class IdentityProviderLinksTab { public assertLinkAccountModalIdentityProviderInputEqual(idpName: string) { cy.findByTestId(this.linkAccountModalIdentityProviderInput).should( "have.value", - idpName + idpName, ); return this; @@ -106,7 +106,7 @@ export default class IdentityProviderLinksTab { public assertNotificationAlreadyLinkedError() { masthead.checkNotificationMessage( - "Could not link identity provider User is already linked with provider" + "Could not link identity provider User is already linked with provider", ); return this; @@ -144,7 +144,7 @@ export default class IdentityProviderLinksTab { public assertLinkedIdentityProviderExist(idpName: string, exist: boolean) { cy.get(this.linkedProvidersSection).should( (exist ? "" : "not.") + "contain.text", - idpName + idpName, ); return this; @@ -153,7 +153,7 @@ export default class IdentityProviderLinksTab { public assertAvailableIdentityProviderExist(idpName: string, exist: boolean) { cy.get(this.availableProvidersSection).should( (exist ? "" : "not.") + "contain.text", - idpName + idpName, ); return this; diff --git a/js/apps/admin-ui/cypress/support/util/AdminClient.ts b/js/apps/admin-ui/cypress/support/util/AdminClient.ts index 60707027bb..506276e366 100644 --- a/js/apps/admin-ui/cypress/support/util/AdminClient.ts +++ b/js/apps/admin-ui/cypress/support/util/AdminClient.ts @@ -83,7 +83,7 @@ class AdminClient { } else { parentGroup = await this.client.groups.createChildGroup( { id: parentGroup.id }, - { name: group } + { name: group }, ); } createdGroups.push(parentGroup); @@ -107,7 +107,7 @@ class AdminClient { if (!createdUser) { throw new Error( - "Unable to create user, created user could not be found." + "Unable to create user, created user could not be found.", ); } @@ -177,7 +177,7 @@ class AdminClient { async addDefaultClientScopeInClient( clientScopeName: string, - clientId: string + clientId: string, ) { await this.login(); const scope = await this.client.clientScopes.findOneByName({ @@ -192,7 +192,7 @@ class AdminClient { async removeDefaultClientScopeInClient( clientScopeName: string, - clientId: string + clientId: string, ) { await this.login(); const scope = await this.client.clientScopes.findOneByName({ @@ -211,7 +211,7 @@ class AdminClient { const currentProfile = await this.client.users.getProfile({ realm }); await this.client.users.updateProfile( - merge(currentProfile, payload, { realm }) + merge(currentProfile, payload, { realm }), ); } @@ -247,7 +247,7 @@ class AdminClient { async unlinkAccountIdentityProvider( username: string, - idpDisplayName: string + idpDisplayName: string, ) { await this.login(); const user = await this.client.users.find({ username }); @@ -282,7 +282,7 @@ class AdminClient { await this.login(); await this.client.realms.addLocalization( { realm: this.client.realmName, selectedLocale: locale, key: key }, - value + value, ); } @@ -296,8 +296,8 @@ class AdminClient { this.client.realms.deleteRealmLocalizationTexts({ realm: this.client.realmName, selectedLocale: locale, - }) - ) + }), + ), ); } } diff --git a/js/apps/admin-ui/cypress/support/util/grantClipboardAccess.ts b/js/apps/admin-ui/cypress/support/util/grantClipboardAccess.ts index daf2ebeada..86a12a14da 100644 --- a/js/apps/admin-ui/cypress/support/util/grantClipboardAccess.ts +++ b/js/apps/admin-ui/cypress/support/util/grantClipboardAccess.ts @@ -8,6 +8,6 @@ export default function grantClipboardAccess() { permissions: ["clipboardReadWrite", "clipboardSanitizedWrite"], origin: window.location.origin, }, - }) + }), ); } diff --git a/js/apps/admin-ui/src/PageNav.tsx b/js/apps/admin-ui/src/PageNav.tsx index e0acfa2bef..bf70e84acf 100644 --- a/js/apps/admin-ui/src/PageNav.tsx +++ b/js/apps/admin-ui/src/PageNav.tsx @@ -25,7 +25,7 @@ const LeftNav = ({ title, path }: LeftNavProps) => { const { hasAccess } = useAccess(); const { realm } = useRealm(); const route = routes.find( - (route) => route.path.replace(/\/:.+?(\?|(?:(?!\/).)*|$)/g, "") === path + (route) => route.path.replace(/\/:.+?(\?|(?:(?!\/).)*|$)/g, "") === path, ); const accessAllowed = @@ -76,13 +76,13 @@ export const PageNav = () => { "query-groups", "query-users", "query-clients", - "view-events" + "view-events", ); const showConfigure = hasSomeAccess( "view-realm", "query-clients", - "view-identity-providers" + "view-identity-providers", ); const isOnAddRealm = !!useMatch(AddRealmRoute.path); diff --git a/js/apps/admin-ui/src/authentication/AuthenticationSection.tsx b/js/apps/admin-ui/src/authentication/AuthenticationSection.tsx index 88d4a28e1f..c9b0c2da9c 100644 --- a/js/apps/admin-ui/src/authentication/AuthenticationSection.tsx +++ b/js/apps/admin-ui/src/authentication/AuthenticationSection.tsx @@ -103,12 +103,12 @@ export default function AuthenticationSection() { const loader = async () => { const flowsRequest = await fetch( `${addTrailingSlash( - adminClient.baseUrl + adminClient.baseUrl, )}admin/realms/${realmName}/ui-ext/authentication-management/flows`, { method: "GET", headers: getAuthorizationHeaders(await adminClient.getAccessToken()), - } + }, ); const flows = await flowsRequest.json(); @@ -118,7 +118,7 @@ export default function AuthenticationSection() { return sortBy( localeSort(flows, mapByKey("alias")), - (flow) => flow.usedBy?.type + (flow) => flow.usedBy?.type, ); }; diff --git a/js/apps/admin-ui/src/authentication/BindFlowDialog.tsx b/js/apps/admin-ui/src/authentication/BindFlowDialog.tsx index 1de58f8401..8b480d5c75 100644 --- a/js/apps/admin-ui/src/authentication/BindFlowDialog.tsx +++ b/js/apps/admin-ui/src/authentication/BindFlowDialog.tsx @@ -41,7 +41,7 @@ export const BindFlowDialog = ({ flowAlias, onClose }: BindFlowDialogProps) => { try { await adminClient.realms.update( { realm }, - { ...realmRep, [bindingType]: flowAlias } + { ...realmRep, [bindingType]: flowAlias }, ); addAlert(t("updateFlowSuccess"), AlertVariant.success); } catch (error) { diff --git a/js/apps/admin-ui/src/authentication/DuplicateFlowModal.tsx b/js/apps/admin-ui/src/authentication/DuplicateFlowModal.tsx index 434bde53df..46126e4eb0 100644 --- a/js/apps/admin-ui/src/authentication/DuplicateFlowModal.tsx +++ b/js/apps/admin-ui/src/authentication/DuplicateFlowModal.tsx @@ -58,7 +58,7 @@ export const DuplicateFlowModal = ({ newFlow.description = form.description; await adminClient.authenticationManagement.updateFlow( { flowId: newFlow.id! }, - newFlow + newFlow, ); } addAlert(t("copyFlowSuccess"), AlertVariant.success); @@ -68,7 +68,7 @@ export const DuplicateFlowModal = ({ id: newFlow.id!, usedBy: "notInUse", builtIn: newFlow.builtIn ? "builtIn" : undefined, - }) + }), ); } catch (error) { addError("authentication:copyFlowError", error); diff --git a/js/apps/admin-ui/src/authentication/EditFlowModal.tsx b/js/apps/admin-ui/src/authentication/EditFlowModal.tsx index a6081083d7..4677d8d091 100644 --- a/js/apps/admin-ui/src/authentication/EditFlowModal.tsx +++ b/js/apps/admin-ui/src/authentication/EditFlowModal.tsx @@ -32,7 +32,7 @@ export const EditFlowModal = ({ flow, toggleDialog }: EditFlowModalProps) => { try { await adminClient.authenticationManagement.updateFlow( { flowId: flow.id! }, - { ...flow, ...formValues } + { ...flow, ...formValues }, ); addAlert(t("updateFlowSuccess"), AlertVariant.success); } catch (error) { diff --git a/js/apps/admin-ui/src/authentication/FlowDetails.tsx b/js/apps/admin-ui/src/authentication/FlowDetails.tsx index fe05af7cc1..d8fa2df61b 100644 --- a/js/apps/admin-ui/src/authentication/FlowDetails.tsx +++ b/js/apps/admin-ui/src/authentication/FlowDetails.tsx @@ -47,7 +47,7 @@ import { toAuthentication } from "./routes/Authentication"; import type { FlowParams } from "./routes/Flow"; export const providerConditionFilter = ( - value: AuthenticationProviderRepresentation + value: AuthenticationProviderRepresentation, ) => value.displayName?.startsWith("Condition "); export default function FlowDetails() { @@ -93,12 +93,12 @@ export default function FlowDetails() { setFlow(flow); setExecutionList(new ExecutionList(executions)); }, - [key] + [key], ); const executeChange = async ( ex: AuthenticationFlowRepresentation, - change: LevelChange | IndexChange + change: LevelChange | IndexChange, ) => { try { let id = ex.id!; @@ -136,7 +136,7 @@ export default function FlowDetails() { try { await adminClient.authenticationManagement.updateExecution( { flow: flow?.alias! }, - ex + ex, ); refresh(); addAlert(t("updateFlowSuccess"), AlertVariant.success); @@ -147,7 +147,7 @@ export default function FlowDetails() { const addExecution = async ( name: string, - type: AuthenticationProviderRepresentation + type: AuthenticationProviderRepresentation, ) => { try { await adminClient.authenticationManagement.addExecutionToFlow({ @@ -163,7 +163,7 @@ export default function FlowDetails() { const addFlow = async ( flow: string, - { name, description = "", type, provider }: Flow + { name, description = "", type, provider }: Flow, ) => { try { await adminClient.authenticationManagement.addFlowToFlow({ @@ -359,18 +359,18 @@ export default function FlowDetails() { onDragFinish={(order) => { const withoutHeaderId = order.slice(1); setLiveText( - t("common:onDragFinish", { list: dragged?.displayName }) + t("common:onDragFinish", { list: dragged?.displayName }), ); const change = executionList.getChange( dragged!, - withoutHeaderId + withoutHeaderId, ); executeChange(dragged!, change); }} onDragStart={(id) => { const item = executionList.findExecution(id)!; setLiveText( - t("common:onDragStart", { item: item.displayName }) + t("common:onDragStart", { item: item.displayName }), ); setDragged(item); if (!item.isCollapsed) { @@ -380,7 +380,7 @@ export default function FlowDetails() { }} onDragMove={() => setLiveText( - t("common:onDragMove", { item: dragged?.displayName }) + t("common:onDragMove", { item: dragged?.displayName }), ) } onDragCancel={() => setLiveText(t("common:onDragCancel"))} diff --git a/js/apps/admin-ui/src/authentication/RequiredActions.tsx b/js/apps/admin-ui/src/authentication/RequiredActions.tsx index 27bfb7d45a..d81067f442 100644 --- a/js/apps/admin-ui/src/authentication/RequiredActions.tsx +++ b/js/apps/admin-ui/src/authentication/RequiredActions.tsx @@ -51,7 +51,7 @@ export const RequiredActions = () => { ]; }, (actions) => setActions(actions), - [key] + [key], ); const isUnregisteredAction = (data: DataType): boolean => { @@ -60,14 +60,14 @@ export const RequiredActions = () => { const updateAction = async ( action: DataType, - field: "enabled" | "defaultAction" + field: "enabled" | "defaultAction", ) => { try { if (field in action) { action[field] = !action[field]; await adminClient.authenticationManagement.updateRequiredAction( { alias: action.alias! }, - action + action, ); } else if (isUnregisteredAction(action)) { await adminClient.authenticationManagement.registerRequiredAction({ @@ -84,7 +84,7 @@ export const RequiredActions = () => { const executeMove = async ( action: RequiredActionProviderRepresentation, - times: number + times: number, ) => { try { const alias = action.alias!; @@ -93,13 +93,13 @@ export const RequiredActions = () => { await adminClient.authenticationManagement.lowerRequiredActionPriority( { alias, - } + }, ); } else { await adminClient.authenticationManagement.raiseRequiredActionPriority( { alias, - } + }, ); } } diff --git a/js/apps/admin-ui/src/authentication/components/AddFlowDropdown.tsx b/js/apps/admin-ui/src/authentication/components/AddFlowDropdown.tsx index 8b93e27cc7..4582e7206a 100644 --- a/js/apps/admin-ui/src/authentication/components/AddFlowDropdown.tsx +++ b/js/apps/admin-ui/src/authentication/components/AddFlowDropdown.tsx @@ -19,7 +19,7 @@ type AddFlowDropdownProps = { execution: ExpandableExecution; onAddExecution: ( execution: ExpandableExecution, - type: AuthenticationProviderRepresentation + type: AuthenticationProviderRepresentation, ) => void; onAddFlow: (execution: ExpandableExecution, flow: Flow) => void; }; @@ -41,7 +41,7 @@ export const AddFlowDropdown = ({ flowId: execution.flowId!, }), ({ providerId }) => setProviderId(providerId), - [] + [], ); return ( diff --git a/js/apps/admin-ui/src/authentication/components/DraggableTable.tsx b/js/apps/admin-ui/src/authentication/components/DraggableTable.tsx index bc39d7df24..5b29d4c1a6 100644 --- a/js/apps/admin-ui/src/authentication/components/DraggableTable.tsx +++ b/js/apps/admin-ui/src/authentication/components/DraggableTable.tsx @@ -58,7 +58,7 @@ export function DraggableTable({ const itemOrder: string[] = useMemo( () => data.map((d) => get(d, keyField)), - [data] + [data], ); const onDragStart = (evt: ReactDragEvent) => { @@ -150,13 +150,13 @@ export function DraggableTable({ } else { const dragId = curListItem.id; const draggingToItemIndex = Array.from( - bodyRef.current?.children || [] + bodyRef.current?.children || [], ).findIndex((item) => item.id === dragId); if (draggingToItemIndex !== state.draggingToItemIndex) { const tempItemOrder = moveItem( itemOrder, state.draggedItemId, - draggingToItemIndex + draggingToItemIndex, ); move(tempItemOrder); @@ -241,7 +241,7 @@ export function DraggableTable({ items={actions.map(({ isActionable, ...action }) => isActionable ? { ...action, isDisabled: !isActionable(row) } - : action + : action, )} rowData={row!} /> diff --git a/js/apps/admin-ui/src/authentication/components/ExecutionConfigModal.tsx b/js/apps/admin-ui/src/authentication/components/ExecutionConfigModal.tsx index 706c471230..d6aef07005 100644 --- a/js/apps/admin-ui/src/authentication/components/ExecutionConfigModal.tsx +++ b/js/apps/admin-ui/src/authentication/components/ExecutionConfigModal.tsx @@ -76,7 +76,7 @@ export const ExecutionConfigModal = ({ setConfigDescription(configDescription); setConfig(config); }, - [] + [], ); useEffect(() => { @@ -101,7 +101,7 @@ export const ExecutionConfigModal = ({ config: changedConfig.config, }; const { id } = await adminClient.authenticationManagement.createConfig( - newConfig + newConfig, ); setConfig({ ...newConfig.config, id, alias: newConfig.alias }); } diff --git a/js/apps/admin-ui/src/authentication/components/FlowDiagram.tsx b/js/apps/admin-ui/src/authentication/components/FlowDiagram.tsx index e1d79744d9..7b2117f5d7 100644 --- a/js/apps/admin-ui/src/authentication/components/FlowDiagram.tsx +++ b/js/apps/admin-ui/src/authentication/components/FlowDiagram.tsx @@ -39,7 +39,7 @@ const createEdge = (fromNode: string, toNode: string): Edge => ({ data: { onEdgeClick: ( evt: ReactMouseEvent, - id: string + id: string, ) => { evt.stopPropagation(); alert(`hello ${id}`); @@ -72,7 +72,7 @@ const renderParallelNodes = (execution: ExpandableExecution): Node[] => [ const renderParallelEdges = ( start: AuthenticationExecutionInfoRepresentation, execution: ExpandableExecution, - end: AuthenticationExecutionInfoRepresentation + end: AuthenticationExecutionInfoRepresentation, ): Edge[] => [ createEdge(start.id!, execution.id!), createEdge(execution.id!, end.id!), @@ -88,7 +88,7 @@ const renderSequentialEdges = ( end: AuthenticationExecutionInfoRepresentation, prefExecution: ExpandableExecution, isFirst: boolean, - isLast: boolean + isLast: boolean, ): Edge[] => { const edges: Edge[] = []; @@ -135,7 +135,7 @@ const renderSubFlowEdges = ( execution: ExpandableExecution, start: AuthenticationExecutionInfoRepresentation, end: AuthenticationExecutionInfoRepresentation, - prefExecution?: ExpandableExecution + prefExecution?: ExpandableExecution, ): Edge[] => { const edges: Edge[] = []; @@ -146,8 +146,8 @@ const renderSubFlowEdges = ( prefExecution && prefExecution.requirement !== "ALTERNATIVE" ? prefExecution.id! : start.id!, - execution.id! - ) + execution.id!, + ), ); edges.push(createEdge(endSubFlowId, end.id!)); @@ -155,7 +155,7 @@ const renderSubFlowEdges = ( renderFlowEdges(execution, execution.executionList || [], { ...execution, id: endSubFlowId, - }) + }), ); }; @@ -184,7 +184,7 @@ const renderFlowNodes = (executionList: ExpandableExecution[]): Node[] => { const renderFlowEdges = ( start: AuthenticationExecutionInfoRepresentation, executionList: ExpandableExecution[], - end: AuthenticationExecutionInfoRepresentation + end: AuthenticationExecutionInfoRepresentation, ): Edge[] => { let elements: Edge[] = []; @@ -192,7 +192,7 @@ const renderFlowEdges = ( const execution = executionList[index]; if (execution.executionList) { elements = elements.concat( - renderSubFlowEdges(execution, start, end, executionList[index - 1]) + renderSubFlowEdges(execution, start, end, executionList[index - 1]), ); } else { if ( @@ -208,8 +208,8 @@ const renderFlowEdges = ( end, executionList[index - 1], index === 0, - index === executionList.length - 1 - ) + index === executionList.length - 1, + ), ); } } @@ -254,7 +254,7 @@ function renderEdges(expandableList: ExpandableExecution[]): Edge[] { return getLayoutedEdges( renderFlowEdges({ id: "start" }, expandableList, { id: "end", - }) + }), ); } diff --git a/js/apps/admin-ui/src/authentication/components/FlowRow.tsx b/js/apps/admin-ui/src/authentication/components/FlowRow.tsx index e7f8ecf507..6bd6993c3c 100644 --- a/js/apps/admin-ui/src/authentication/components/FlowRow.tsx +++ b/js/apps/admin-ui/src/authentication/components/FlowRow.tsx @@ -32,7 +32,7 @@ type FlowRowProps = { onRowChange: (execution: ExpandableExecution) => void; onAddExecution: ( execution: ExpandableExecution, - type: AuthenticationProviderRepresentation + type: AuthenticationProviderRepresentation, ) => void; onAddFlow: (execution: ExpandableExecution, flow: Flow) => void; onDelete: (execution: ExpandableExecution) => void; diff --git a/js/apps/admin-ui/src/authentication/components/UsedBy.tsx b/js/apps/admin-ui/src/authentication/components/UsedBy.tsx index 2c4eee56ba..ae28cc71fa 100644 --- a/js/apps/admin-ui/src/authentication/components/UsedBy.tsx +++ b/js/apps/admin-ui/src/authentication/components/UsedBy.tsx @@ -41,7 +41,7 @@ const UsedByModal = ({ id, isSpecificClient, onClose }: UsedByModalProps) => { const loader = async ( first?: number, max?: number, - search?: string + search?: string, ): Promise<{ name: string }[]> => { const result = await fetchUsedBy({ id, @@ -99,7 +99,7 @@ export const UsedBy = ({ authType: { id, usedBy }, realm }: UsedByProps) => { const [open, toggle] = useToggle(); const key = Object.entries(realm).find( - (e) => e[1] === usedBy?.values[0] + (e) => e[1] === usedBy?.values[0], )?.[0]; return ( @@ -123,7 +123,7 @@ export const UsedBy = ({ authType: { id, usedBy }, realm }: UsedByProps) => { "appliedBy" + (usedBy.type === "SPECIFIC_CLIENTS" ? "Clients" - : "Providers") + : "Providers"), )}{" "} {usedBy.values.map((used, index) => ( <> diff --git a/js/apps/admin-ui/src/authentication/components/diagram/ButtonEdge.tsx b/js/apps/admin-ui/src/authentication/components/diagram/ButtonEdge.tsx index 550afa3149..7e6ad6e484 100644 --- a/js/apps/admin-ui/src/authentication/components/diagram/ButtonEdge.tsx +++ b/js/apps/admin-ui/src/authentication/components/diagram/ButtonEdge.tsx @@ -12,7 +12,7 @@ export type ButtonEdgeProps = EdgeProps & { data: { onEdgeClick: ( evt: ReactMouseEvent, - id: string + id: string, ) => void; }; }; diff --git a/js/apps/admin-ui/src/authentication/components/modals/AddStepModal.tsx b/js/apps/admin-ui/src/authentication/components/modals/AddStepModal.tsx index f6cf078513..126710aa7a 100644 --- a/js/apps/admin-ui/src/authentication/components/modals/AddStepModal.tsx +++ b/js/apps/admin-ui/src/authentication/components/modals/AddStepModal.tsx @@ -87,7 +87,7 @@ export const AddStepModal = ({ name, type, onSelect }: AddStepModalProps) => { } }, (providers) => setProviders(providers), - [] + [], ); const page = useMemo( @@ -95,10 +95,10 @@ export const AddStepModal = ({ name, type, onSelect }: AddStepModalProps) => { localeSort(providers ?? [], mapByKey("displayName")) .filter( (p) => - p.displayName?.includes(search) || p.description?.includes(search) + p.displayName?.includes(search) || p.description?.includes(search), ) .slice(first, first + max + 1), - [providers, search, first, max] + [providers, search, first, max], ); return ( diff --git a/js/apps/admin-ui/src/authentication/components/modals/AddSubFlowModal.tsx b/js/apps/admin-ui/src/authentication/components/modals/AddSubFlowModal.tsx index 1b0570313c..96fb59f7fd 100644 --- a/js/apps/admin-ui/src/authentication/components/modals/AddSubFlowModal.tsx +++ b/js/apps/admin-ui/src/authentication/components/modals/AddSubFlowModal.tsx @@ -56,7 +56,7 @@ export const AddSubFlowModal = ({ useFetch( () => adminClient.authenticationManagement.getFormProviders(), setFormProviders, - [] + [], ); useEffect(() => { diff --git a/js/apps/admin-ui/src/authentication/execution-model.ts b/js/apps/admin-ui/src/authentication/execution-model.ts index cbf010ec04..ca9e12c10f 100644 --- a/js/apps/admin-ui/src/authentication/execution-model.ts +++ b/js/apps/admin-ui/src/authentication/execution-model.ts @@ -21,7 +21,7 @@ export class LevelChange extends IndexChange { constructor( oldIndex: number, newIndex: number, - parent?: ExpandableExecution + parent?: ExpandableExecution, ) { super(oldIndex, newIndex); this.parent = parent; @@ -46,7 +46,7 @@ export class ExecutionList { private transformToExpandableList( currentIndex: number, currentLevel: number, - execution: ExpandableExecution + execution: ExpandableExecution, ) { for (let index = currentIndex; index < this.list.length; index++) { const ex = this.list[index]; @@ -82,7 +82,7 @@ export class ExecutionList { findExecution( id: string, - list?: ExpandableExecution[] + list?: ExpandableExecution[], ): ExpandableExecution | undefined { let found = (list || this.expandableList).find((ex) => ex.id === id); if (!found) { @@ -113,7 +113,7 @@ export class ExecutionList { getChange( changed: AuthenticationExecutionInfoRepresentation, - order: string[] + order: string[], ) { const currentOrder = this.order(); const newLocIndex = order.findIndex((id) => id === changed.id); @@ -127,7 +127,7 @@ export class ExecutionList { return new LevelChange( parent?.executionList?.length || 0, newLocation.index!, - parent + parent, ); } return new LevelChange(this.expandableList.length, newLocation.index!); diff --git a/js/apps/admin-ui/src/authentication/form/CreateFlow.tsx b/js/apps/admin-ui/src/authentication/form/CreateFlow.tsx index 63743a9e19..972a13f975 100644 --- a/js/apps/admin-ui/src/authentication/form/CreateFlow.tsx +++ b/js/apps/admin-ui/src/authentication/form/CreateFlow.tsx @@ -32,7 +32,7 @@ export default function CreateFlow() { try { const { id } = await adminClient.authenticationManagement.createFlow( - flow + flow, ); addAlert(t("flowCreatedSuccess"), AlertVariant.success); navigate( @@ -40,14 +40,14 @@ export default function CreateFlow() { realm, id: id!, usedBy: "notInUse", - }) + }), ); } catch (error: any) { addAlert( t("flowCreateError", { error: error.response?.data?.errorMessage || error, }), - AlertVariant.danger + AlertVariant.danger, ); } }; diff --git a/js/apps/admin-ui/src/authentication/policies/CibaPolicy.tsx b/js/apps/admin-ui/src/authentication/policies/CibaPolicy.tsx index 076811ea31..2e78bad11b 100644 --- a/js/apps/admin-ui/src/authentication/policies/CibaPolicy.tsx +++ b/js/apps/admin-ui/src/authentication/policies/CibaPolicy.tsx @@ -67,7 +67,7 @@ export const CibaPolicy = ({ realm, realmUpdated }: CibaPolicyProps) => { try { await adminClient.realms.update( { realm: realmName }, - convertFormValuesToObject(formValues) + convertFormValuesToObject(formValues), ); const updatedRealm = await adminClient.realms.findOne({ @@ -95,7 +95,7 @@ export const CibaPolicy = ({ realm, realmUpdated }: CibaPolicyProps) => { labelIcon={ diff --git a/js/apps/admin-ui/src/authentication/policies/OtpPolicy.tsx b/js/apps/admin-ui/src/authentication/policies/OtpPolicy.tsx index d30badf682..c0f8360c61 100644 --- a/js/apps/admin-ui/src/authentication/policies/OtpPolicy.tsx +++ b/js/apps/admin-ui/src/authentication/policies/OtpPolicy.tsx @@ -70,7 +70,7 @@ export const OtpPolicy = ({ realm, realmUpdated }: OtpPolicyProps) => { const supportedApplications = useMemo(() => { const labels = (realm.otpSupportedApplications ?? []).map((key) => - t(`otpSupportedApplications.${key}`) + t(`otpSupportedApplications.${key}`), ); return localeSort(labels, (label) => label); diff --git a/js/apps/admin-ui/src/authentication/policies/PasswordPolicy.tsx b/js/apps/admin-ui/src/authentication/policies/PasswordPolicy.tsx index d2124d8931..59d18fb146 100644 --- a/js/apps/admin-ui/src/authentication/policies/PasswordPolicy.tsx +++ b/js/apps/admin-ui/src/authentication/policies/PasswordPolicy.tsx @@ -44,9 +44,9 @@ const PolicySelect = ({ onSelect, selectedPolicies }: PolicySelectProps) => { const policies = useMemo( () => passwordPolicies?.filter( - (p) => selectedPolicies.find((o) => o.id === p.id) === undefined + (p) => selectedPolicies.find((o) => o.id === p.id) === undefined, ), - [selectedPolicies] + [selectedPolicies], ); return ( diff --git a/js/apps/admin-ui/src/authentication/policies/Policies.tsx b/js/apps/admin-ui/src/authentication/policies/Policies.tsx index 338d2299ce..9b2258241c 100644 --- a/js/apps/admin-ui/src/authentication/policies/Policies.tsx +++ b/js/apps/admin-ui/src/authentication/policies/Policies.tsx @@ -29,7 +29,7 @@ export const Policies = () => { (realm) => { setRealm(realm); }, - [] + [], ); if (!realm) { diff --git a/js/apps/admin-ui/src/authentication/policies/WebauthnPolicy.tsx b/js/apps/admin-ui/src/authentication/policies/WebauthnPolicy.tsx index 7a29f91801..0c03a5fb0a 100644 --- a/js/apps/admin-ui/src/authentication/policies/WebauthnPolicy.tsx +++ b/js/apps/admin-ui/src/authentication/policies/WebauthnPolicy.tsx @@ -108,7 +108,7 @@ const WebauthnSelect = ({ onSelect={(_, selectedValue) => { if (isMultiSelect) { const changedValue = field.value.find( - (item: string) => item === selectedValue + (item: string) => item === selectedValue, ) ? field.value.filter((item: string) => item !== selectedValue) : [...field.value, selectedValue]; @@ -313,7 +313,7 @@ export const WebauthnPolicy = ({ labelIcon={ @@ -341,7 +341,7 @@ export const WebauthnPolicy = ({ labelIcon={ diff --git a/js/apps/admin-ui/src/authentication/policies/util.test.ts b/js/apps/admin-ui/src/authentication/policies/util.test.ts index ffc879632f..0884da9772 100644 --- a/js/apps/admin-ui/src/authentication/policies/util.test.ts +++ b/js/apps/admin-ui/src/authentication/policies/util.test.ts @@ -19,7 +19,7 @@ describe("serializePolicy", () => { }; expect(serializePolicy(policies, submittedValues)).toEqual( - "one(value1) and two(value2)" + "one(value1) and two(value2)", ); }); }); diff --git a/js/apps/admin-ui/src/authentication/policies/util.ts b/js/apps/admin-ui/src/authentication/policies/util.ts index acb6def9c1..c47d397d75 100644 --- a/js/apps/admin-ui/src/authentication/policies/util.ts +++ b/js/apps/admin-ui/src/authentication/policies/util.ts @@ -8,7 +8,7 @@ const POLICY_SEPARATOR = " and "; export const serializePolicy = ( policies: PasswordPolicyTypeRepresentation[], - submitted: SubmittedValues + submitted: SubmittedValues, ) => policies .map((policy) => `${policy.id}(${submitted[policy.id!]})`) @@ -20,7 +20,7 @@ type PolicyValue = PasswordPolicyTypeRepresentation & { export const parsePolicy = ( value: string, - policies: PasswordPolicyTypeRepresentation[] + policies: PasswordPolicyTypeRepresentation[], ) => value .split(POLICY_SEPARATOR) diff --git a/js/apps/admin-ui/src/authentication/routes/Authentication.tsx b/js/apps/admin-ui/src/authentication/routes/Authentication.tsx index a34467504f..31b0801b92 100644 --- a/js/apps/admin-ui/src/authentication/routes/Authentication.tsx +++ b/js/apps/admin-ui/src/authentication/routes/Authentication.tsx @@ -24,7 +24,7 @@ export const AuthenticationRouteWithTab: AppRouteObject = { }; export const toAuthentication = ( - params: AuthenticationParams + params: AuthenticationParams, ): Partial => { const path = params.tab ? AuthenticationRouteWithTab.path diff --git a/js/apps/admin-ui/src/client-scopes/ChangeTypeDropdown.tsx b/js/apps/admin-ui/src/client-scopes/ChangeTypeDropdown.tsx index 437a2c849f..5f4b934804 100644 --- a/js/apps/admin-ui/src/client-scopes/ChangeTypeDropdown.tsx +++ b/js/apps/admin-ui/src/client-scopes/ChangeTypeDropdown.tsx @@ -46,10 +46,10 @@ export const ChangeTypeDropdown = ({ clientId, row, row.type, - value as ClientScope + value as ClientScope, ) : changeScope(row, value as ClientScope); - }) + }), ); setOpen(false); refresh(); @@ -61,7 +61,7 @@ export const ChangeTypeDropdown = ({ > {clientScopeTypesSelectOptions( t, - !clientId ? allClientScopeTypes : undefined + !clientId ? allClientScopeTypes : undefined, )} ); diff --git a/js/apps/admin-ui/src/client-scopes/ClientScopesSection.tsx b/js/apps/admin-ui/src/client-scopes/ClientScopesSection.tsx index 5831b15ba7..1cabd78ecd 100644 --- a/js/apps/admin-ui/src/client-scopes/ClientScopesSection.tsx +++ b/js/apps/admin-ui/src/client-scopes/ClientScopesSection.tsx @@ -99,7 +99,7 @@ export default function ClientScopesSection() { const [searchType, setSearchType] = useState("name"); const [searchTypeType, setSearchTypeType] = useState( - AllClientScopes.none + AllClientScopes.none, ); const [searchProtocol, setSearchProtocol] = useState("all"); const localeSort = useLocaleSort(); @@ -129,11 +129,11 @@ export default function ClientScopesSection() { const row: Row = { ...scope, type: defaultScopes.find( - (defaultScope) => defaultScope.name === scope.name + (defaultScope) => defaultScope.name === scope.name, ) ? ClientScope.default : optionalScopes.find( - (optionalScope) => optionalScope.name === scope.name + (optionalScope) => optionalScope.name === scope.name, ) ? ClientScope.optional : AllClientScopes.none, @@ -144,7 +144,7 @@ export default function ClientScopesSection() { return localeSort(transformed, mapByKey("name")).slice( first, - Number(first) + Number(max) + Number(first) + Number(max), ); }; @@ -164,7 +164,7 @@ export default function ClientScopesSection() { } catch (error: any) { console.warn( "could not remove scope", - error.response?.data?.errorMessage || error + error.response?.data?.errorMessage || error, ); } await adminClient.clientScopes.del({ id: scope.id! }); diff --git a/js/apps/admin-ui/src/client-scopes/CreateClientScope.tsx b/js/apps/admin-ui/src/client-scopes/CreateClientScope.tsx index f9103a3afa..eddb4db232 100644 --- a/js/apps/admin-ui/src/client-scopes/CreateClientScope.tsx +++ b/js/apps/admin-ui/src/client-scopes/CreateClientScope.tsx @@ -46,7 +46,7 @@ export default function CreateClientScope() { realm, id: scope.id!, tab: "settings", - }) + }), ); } catch (error) { addError("client-scopes:createError", error); diff --git a/js/apps/admin-ui/src/client-scopes/EditClientScope.tsx b/js/apps/admin-ui/src/client-scopes/EditClientScope.tsx index aef1a9fff7..7d948ab601 100644 --- a/js/apps/admin-ui/src/client-scopes/EditClientScope.tsx +++ b/js/apps/admin-ui/src/client-scopes/EditClientScope.tsx @@ -74,14 +74,14 @@ export default function EditClientScope() { (clientScope) => { setClientScope(clientScope); }, - [key, id] + [key, id], ); async function determineScopeType(clientScope: ClientScopeRepresentation) { const defaultScopes = await adminClient.clientScopes.listDefaultClientScopes(); const hasDefaultScope = defaultScopes.find( - (defaultScope) => defaultScope.name === clientScope.name + (defaultScope) => defaultScope.name === clientScope.name, ); if (hasDefaultScope) { @@ -91,7 +91,7 @@ export default function EditClientScope() { const optionalScopes = await adminClient.clientScopes.listDefaultOptionalClientScopes(); const hasOptionalScope = optionalScopes.find( - (optionalScope) => optionalScope.name === clientScope.name + (optionalScope) => optionalScope.name === clientScope.name, ); return hasOptionalScope ? ClientScope.optional : AllClientScopes.none; @@ -103,7 +103,7 @@ export default function EditClientScope() { realm, id, tab, - }) + }), ); const settingsTab = useTab("settings"); @@ -155,7 +155,7 @@ export default function EditClientScope() { { id, }, - realmRoles + realmRoles, ); await Promise.all( rows @@ -166,9 +166,9 @@ export default function EditClientScope() { id, client: row.client!.id!, }, - [row.role as RoleMappingPayload] - ) - ) + [row.role as RoleMappingPayload], + ), + ), ); addAlert(t("roleMappingUpdatedSuccess"), AlertVariant.success); } catch (error) { @@ -177,7 +177,7 @@ export default function EditClientScope() { }; const addMappers = async ( - mappers: ProtocolMapperTypeRepresentation | ProtocolMapperRepresentation[] + mappers: ProtocolMapperTypeRepresentation | ProtocolMapperRepresentation[], ): Promise => { if (!Array.isArray(mappers)) { const mapper = mappers as ProtocolMapperTypeRepresentation; @@ -186,13 +186,13 @@ export default function EditClientScope() { realm, id: clientScope!.id!, mapperId: mapper.id!, - }) + }), ); } else { try { await adminClient.clientScopes.addMultipleProtocolMappers( { id: clientScope!.id! }, - mappers as ProtocolMapperRepresentation[] + mappers as ProtocolMapperRepresentation[], ); refresh(); addAlert(t("common:mappingCreatedSuccess"), AlertVariant.success); diff --git a/js/apps/admin-ui/src/client-scopes/add/MapperDialog.tsx b/js/apps/admin-ui/src/client-scopes/add/MapperDialog.tsx index d53c97dbff..4810b2afa7 100644 --- a/js/apps/admin-ui/src/client-scopes/add/MapperDialog.tsx +++ b/js/apps/admin-ui/src/client-scopes/add/MapperDialog.tsx @@ -33,7 +33,7 @@ export type AddMapperDialogModalProps = { protocol: string; filter?: ProtocolMapperRepresentation[]; onConfirm: ( - value: ProtocolMapperTypeRepresentation | ProtocolMapperRepresentation[] + value: ProtocolMapperTypeRepresentation | ProtocolMapperRepresentation[], ) => void; }; @@ -57,7 +57,7 @@ export const AddMapperDialog = (props: AddMapperDialogProps) => { () => localeSort(builtInMappers, mapByKey("name")).map((mapper) => { const mapperType = protocolMappers.filter( - (type) => type.id === mapper.protocolMapper + (type) => type.id === mapper.protocolMapper, )[0]; return { item: mapper, @@ -65,7 +65,7 @@ export const AddMapperDialog = (props: AddMapperDialogProps) => { description: mapperType.helpText, }; }), - [builtInMappers, protocolMappers] + [builtInMappers, protocolMappers], ); const [rows, setRows] = useState(allRows); @@ -77,7 +77,7 @@ export const AddMapperDialog = (props: AddMapperDialogProps) => { const sortedProtocolMappers = useMemo( () => localeSort(protocolMappers, mapByKey("name")), - [protocolMappers] + [protocolMappers], ); const isBuiltIn = !!props.filter; diff --git a/js/apps/admin-ui/src/client-scopes/details/MapperList.tsx b/js/apps/admin-ui/src/client-scopes/details/MapperList.tsx index 6635b6a328..f7ac948717 100644 --- a/js/apps/admin-ui/src/client-scopes/details/MapperList.tsx +++ b/js/apps/admin-ui/src/client-scopes/details/MapperList.tsx @@ -21,7 +21,7 @@ import { type MapperListProps = { model: ClientScopeRepresentation | ClientRepresentation; onAdd: ( - mappers: ProtocolMapperTypeRepresentation | ProtocolMapperRepresentation[] + mappers: ProtocolMapperTypeRepresentation | ProtocolMapperRepresentation[], ) => void; onDelete: (mapper: ProtocolMapperRepresentation) => void; detailLink: (id: string) => Partial; @@ -74,7 +74,7 @@ export const MapperList = ({ const list = mapperList.reduce((rows, mapper) => { const mapperType = mapperTypes.find( - ({ id }) => id === mapper.protocolMapper + ({ id }) => id === mapper.protocolMapper, ); if (!mapperType) { diff --git a/js/apps/admin-ui/src/client-scopes/details/MappingDetails.tsx b/js/apps/admin-ui/src/client-scopes/details/MappingDetails.tsx index 24d9bddd71..dfe3c01ba0 100644 --- a/js/apps/admin-ui/src/client-scopes/details/MappingDetails.tsx +++ b/js/apps/admin-ui/src/client-scopes/details/MappingDetails.tsx @@ -83,7 +83,7 @@ export default function MappingDetails() { const mapperTypes = serverInfo.protocolMapperTypes![data!.protocol!]; const mapping = mapperTypes.find( - (type) => type.id === data!.protocolMapper + (type) => type.id === data!.protocolMapper, ); return { @@ -104,7 +104,7 @@ export default function MappingDetails() { const protocolMappers = serverInfo.protocolMapperTypes![model.protocol!]; const mapping = protocolMappers.find( - (mapper) => mapper.id === mapperId + (mapper) => mapper.id === mapperId, ); if (!mapping) { throw new Error(t("common:notFound")); @@ -125,7 +125,7 @@ export default function MappingDetails() { convertToFormValues(data, setValue); } }, - [] + [], ); const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({ @@ -162,11 +162,11 @@ export default function MappingDetails() { isOnClientScope ? await adminClient.clientScopes.updateProtocolMapper( { id, mapperId }, - { id: mapperId, ...mapping } + { id: mapperId, ...mapping }, ) : await adminClient.clients.updateProtocolMapper( { id, mapperId }, - { id: mapperId, ...mapping } + { id: mapperId, ...mapping }, ); } else { isOnClientScope diff --git a/js/apps/admin-ui/src/client-scopes/details/ScopeForm.tsx b/js/apps/admin-ui/src/client-scopes/details/ScopeForm.tsx index 47215661dd..1e3757afc6 100644 --- a/js/apps/admin-ui/src/client-scopes/details/ScopeForm.tsx +++ b/js/apps/admin-ui/src/client-scopes/details/ScopeForm.tsx @@ -65,7 +65,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => { const dynamicScope = useWatch({ control, name: convertAttributeNameToForm( - "attributes.is.dynamic.scope" + "attributes.is.dynamic.scope", ), defaultValue: "false", }); @@ -73,9 +73,9 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => { const setDynamicRegex = (value: string, append: boolean) => setValue( convertAttributeNameToForm( - "attributes.dynamic.scope.regexp" + "attributes.dynamic.scope.regexp", ), - append ? `${value}:*` : value + append ? `${value}:*` : value, ); useEffect(() => { @@ -123,7 +123,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => { ( - "attributes.is.dynamic.scope" + "attributes.is.dynamic.scope", )} label={t("dynamicScope")} labelIcon={t("client-scopes-help:dynamicScope")} @@ -135,7 +135,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => { {dynamicScope === "true" && ( ( - "attributes.dynamic.scope.regexp" + "attributes.dynamic.scope.regexp", )} label={t("dynamicScopeFormat")} labelIcon={t("client-scopes-help:dynamicScopeFormat")} @@ -256,7 +256,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => { > ( - "attributes.display.on.consent.screen" + "attributes.display.on.consent.screen", )} control={control} defaultValue={displayOnConsentScreen} @@ -286,8 +286,8 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => { id="kc-consent-screen-text" {...register( convertAttributeNameToForm( - "attributes.consent.screen.text" - ) + "attributes.consent.screen.text", + ), )} /> @@ -305,7 +305,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => { > ( - "attributes.include.in.token.scope" + "attributes.include.in.token.scope", )} control={control} defaultValue="true" @@ -332,7 +332,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => { > ( - "attributes.gui.order" + "attributes.gui.order", )} defaultValue="" control={control} diff --git a/js/apps/admin-ui/src/client-scopes/routes/NewClientScope.tsx b/js/apps/admin-ui/src/client-scopes/routes/NewClientScope.tsx index f7104a619a..5132f0236d 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/NewClientScope.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/NewClientScope.tsx @@ -17,7 +17,7 @@ export const NewClientScopeRoute: AppRouteObject = { }; export const toNewClientScope = ( - params: NewClientScopeParams + params: NewClientScopeParams, ): Partial => ({ pathname: generatePath(NewClientScopeRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/AdvancedTab.tsx b/js/apps/admin-ui/src/clients/AdvancedTab.tsx index 4d442aaf00..3fc04f5109 100644 --- a/js/apps/admin-ui/src/clients/AdvancedTab.tsx +++ b/js/apps/admin-ui/src/clients/AdvancedTab.tsx @@ -22,7 +22,7 @@ export const parseResult = ( result: GlobalRequestResult, prefixKey: string, addAlert: AddAlertFunction, - t: TFunction + t: TFunction, ) => { const successCount = result.successRequests?.length || 0; const failedCount = result.failedRequests?.length || 0; @@ -32,16 +32,16 @@ export const parseResult = ( } else if (failedCount > 0) { addAlert( t(prefixKey + "Success", { successNodes: result.successRequests }), - AlertVariant.success + AlertVariant.success, ); addAlert( t(prefixKey + "Fail", { failedNodes: result.failedRequests }), - AlertVariant.danger + AlertVariant.danger, ); } else { addAlert( t(prefixKey + "Success", { successNodes: result.successRequests }), - AlertVariant.success + AlertVariant.success, ); } }; @@ -67,7 +67,7 @@ export const AdvancedTab = ({ save, client }: AdvancedProps) => { for (const name of names) { setValue( convertAttributeNameToForm(`attributes.${name}`), - attributes?.[name] || "" + attributes?.[name] || "", ); } }; @@ -179,7 +179,7 @@ export const AdvancedTab = ({ save, client }: AdvancedProps) => { {t( "clients-help:advancedSettings" + - toUpperCase(protocol || "") + toUpperCase(protocol || ""), )} { reset={() => { setValue( "authenticationFlowBindingOverrides.browser", - authenticationFlowBindingOverrides?.browser + authenticationFlowBindingOverrides?.browser, ); setValue( "authenticationFlowBindingOverrides.direct_grant", - authenticationFlowBindingOverrides?.direct_grant + authenticationFlowBindingOverrides?.direct_grant, ); }} /> diff --git a/js/apps/admin-ui/src/clients/ClientDetails.tsx b/js/apps/admin-ui/src/clients/ClientDetails.tsx index 35d1feb87c..49ca624d8c 100644 --- a/js/apps/admin-ui/src/clients/ClientDetails.tsx +++ b/js/apps/admin-ui/src/clients/ClientDetails.tsx @@ -106,7 +106,7 @@ const ClientDetailHeader = ({ const badges = useMemo(() => { const protocolName = getProtocolName( t, - client.protocol ?? "openid-connect" + client.protocol ?? "openid-connect", ); const text = client.bearerOnly ? ( @@ -229,7 +229,7 @@ export default function ClientDetails() { realm, clientId, tab, - }) + }), ); const settingsTab = useTab("settings"); @@ -249,7 +249,7 @@ export default function ClientDetails() { realm, clientId, tab, - }) + }), ); const clientScopesSetupTab = useClientScopesTab("setup"); @@ -261,7 +261,7 @@ export default function ClientDetails() { realm, clientId, tab, - }) + }), ); const authorizationSettingsTab = useAuthorizationTab("settings"); @@ -296,8 +296,8 @@ export default function ClientDetails() { convertAttributeNameToForm("attributes.acr.loa.map"), // @ts-ignore Object.entries(JSON.parse(client.attributes["acr.loa.map"])).flatMap( - ([key, value]) => ({ key, value }) - ) + ([key, value]) => ({ key, value }), + ), ); } }; @@ -311,14 +311,14 @@ export default function ClientDetails() { setClient(cloneDeep(fetchedClient)); setupForm(fetchedClient); }, - [clientId, key] + [clientId, key], ); const save = async ( { confirmed = false, messageKey = "clientSaveSuccess" }: SaveOptions = { confirmed: false, messageKey: "clientSaveSuccess", - } + }, ) => { if (!(await form.trigger())) { return; @@ -343,8 +343,8 @@ export default function ClientDetails() { Object.fromEntries( (submittedClient.attributes["acr.loa.map"] as KeyValueType[]) .filter(({ key }) => key !== "") - .map(({ key, value }) => [key, value]) - ) + .map(({ key, value }) => [key, value]), + ), ); } diff --git a/js/apps/admin-ui/src/clients/ClientSessions.tsx b/js/apps/admin-ui/src/clients/ClientSessions.tsx index df69d2894f..5e6b58e31a 100644 --- a/js/apps/admin-ui/src/clients/ClientSessions.tsx +++ b/js/apps/admin-ui/src/clients/ClientSessions.tsx @@ -15,7 +15,7 @@ export const ClientSessions = ({ client }: ClientSessionsProps) => { const loader: LoaderFunction = async ( first, - max + max, ) => { const mapSessionsToType = (type: string) => (sessions: UserSessionRepresentation[]) => diff --git a/js/apps/admin-ui/src/clients/add/CapabilityConfig.tsx b/js/apps/admin-ui/src/clients/add/CapabilityConfig.tsx index 31daaee42b..9068c87212 100644 --- a/js/apps/admin-ui/src/clients/add/CapabilityConfig.tsx +++ b/js/apps/admin-ui/src/clients/add/CapabilityConfig.tsx @@ -69,9 +69,9 @@ export const CapabilityConfig = ({ setValue("serviceAccountsEnabled", false); setValue( convertAttributeNameToForm( - "attributes.oidc.ciba.grant.enabled" + "attributes.oidc.ciba.grant.enabled", ), - false + false, ); } }} @@ -234,7 +234,7 @@ export const CapabilityConfig = ({ /> @@ -245,7 +245,7 @@ export const CapabilityConfig = ({ ( - "attributes.oidc.ciba.grant.enabled" + "attributes.oidc.ciba.grant.enabled", )} defaultValue={false} control={control} @@ -287,7 +287,7 @@ export const CapabilityConfig = ({ > ( - "attributes.saml.encrypt" + "attributes.saml.encrypt", )} control={control} defaultValue={false} @@ -317,7 +317,7 @@ export const CapabilityConfig = ({ > ( - "attributes.saml.client.signature" + "attributes.saml.client.signature", )} control={control} defaultValue={false} diff --git a/js/apps/admin-ui/src/clients/add/LoginSettings.tsx b/js/apps/admin-ui/src/clients/add/LoginSettings.tsx index 00de1b21ba..c8a35f4c04 100644 --- a/js/apps/admin-ui/src/clients/add/LoginSettings.tsx +++ b/js/apps/admin-ui/src/clients/add/LoginSettings.tsx @@ -24,7 +24,7 @@ export const LoginSettings = ({ const { realm } = useRealm(); const idpInitiatedSsoUrlName: string = watch( - "attributes.saml_idp_initiated_sso_url_name" + "attributes.saml_idp_initiated_sso_url_name", ); const standardFlowEnabled = watch("standardFlowEnabled"); @@ -97,7 +97,7 @@ export const LoginSettings = ({ { const consentRequired = watch("consentRequired"); const displayOnConsentScreen: string = watch( convertAttributeNameToForm( - "attributes.display.on.consent.screen" - ) + "attributes.display.on.consent.screen", + ), ); return ( @@ -114,7 +114,7 @@ export const LoginSettingsPanel = ({ access }: { access?: boolean }) => { > ( - "attributes.display.on.consent.screen" + "attributes.display.on.consent.screen", )} defaultValue={false} control={control} @@ -145,8 +145,8 @@ export const LoginSettingsPanel = ({ access }: { access?: boolean }) => { id="kc-consent-screen-text" {...register( convertAttributeNameToForm( - "attributes.consent.screen.text" - ) + "attributes.consent.screen.text", + ), )} isDisabled={!(consentRequired && displayOnConsentScreen === "true")} /> diff --git a/js/apps/admin-ui/src/clients/add/LogoutPanel.tsx b/js/apps/admin-ui/src/clients/add/LogoutPanel.tsx index cecfea338f..31452ed645 100644 --- a/js/apps/admin-ui/src/clients/add/LogoutPanel.tsx +++ b/js/apps/admin-ui/src/clients/add/LogoutPanel.tsx @@ -94,12 +94,12 @@ export const LogoutPanel = ({ type="url" {...register( convertAttributeNameToForm( - "attributes.frontchannel.logout.url" + "attributes.frontchannel.logout.url", ), { validate: (uri) => validateUrl(uri, t("frontchannelUrlInvalid").toString()), - } + }, )} validated={ errors.attributes?.[beerify("frontchannel.logout.url")]?.message @@ -135,12 +135,12 @@ export const LogoutPanel = ({ type="url" {...register( convertAttributeNameToForm( - "attributes.backchannel.logout.url" + "attributes.backchannel.logout.url", ), { validate: (uri) => validateUrl(uri, t("backchannelUrlInvalid").toString()), - } + }, )} validated={ errors.attributes?.[beerify("backchannel.logout.url")]?.message @@ -162,7 +162,7 @@ export const LogoutPanel = ({ > ( - "attributes.backchannel.logout.session.required" + "attributes.backchannel.logout.session.required", )} defaultValue="true" control={control} @@ -183,7 +183,7 @@ export const LogoutPanel = ({ labelIcon={ @@ -193,7 +193,7 @@ export const LogoutPanel = ({ > ( - "attributes.backchannel.logout.revoke.offline.tokens" + "attributes.backchannel.logout.revoke.offline.tokens", )} defaultValue="false" control={control} diff --git a/js/apps/admin-ui/src/clients/add/SamlConfig.tsx b/js/apps/admin-ui/src/clients/add/SamlConfig.tsx index 9aec799c7d..24a4e4d6d2 100644 --- a/js/apps/admin-ui/src/clients/add/SamlConfig.tsx +++ b/js/apps/admin-ui/src/clients/add/SamlConfig.tsx @@ -121,13 +121,13 @@ export const SamlConfig = () => { /> diff --git a/js/apps/admin-ui/src/clients/add/SamlSignature.tsx b/js/apps/admin-ui/src/clients/add/SamlSignature.tsx index 65e99a5ffc..ec9558b592 100644 --- a/js/apps/admin-ui/src/clients/add/SamlSignature.tsx +++ b/js/apps/admin-ui/src/clients/add/SamlSignature.tsx @@ -50,12 +50,12 @@ export const SamlSignature = () => { const { control, watch } = useFormContext(); const signDocs = watch( - convertAttributeNameToForm("attributes.saml.server.signature") + convertAttributeNameToForm("attributes.saml.server.signature"), ); const signAssertion = watch( convertAttributeNameToForm( - "attributes.saml.assertion.signature" - ) + "attributes.saml.assertion.signature", + ), ); return ( @@ -86,7 +86,7 @@ export const SamlSignature = () => { > ( - "attributes.saml.signature.algorithm" + "attributes.saml.signature.algorithm", )} defaultValue={SIGNATURE_ALGORITHMS[0]} control={control} @@ -126,7 +126,7 @@ export const SamlSignature = () => { > ( - "attributes.saml.server.signature.keyinfo.xmlSigKeyInfoKeyNameTransformer" + "attributes.saml.server.signature.keyinfo.xmlSigKeyInfoKeyNameTransformer", )} defaultValue={KEYNAME_TRANSFORMER[0]} control={control} diff --git a/js/apps/admin-ui/src/clients/advanced/AdvancedSettings.tsx b/js/apps/admin-ui/src/clients/advanced/AdvancedSettings.tsx index 661ee7a555..4378a43014 100644 --- a/js/apps/admin-ui/src/clients/advanced/AdvancedSettings.tsx +++ b/js/apps/admin-ui/src/clients/advanced/AdvancedSettings.tsx @@ -47,7 +47,7 @@ export const AdvancedSettings = ({ useFetch( () => adminClient.realms.findOne({ realm: realmName }), setRealm, - [] + [], ); const { control } = useFormContext(); @@ -70,7 +70,7 @@ export const AdvancedSettings = ({ > ( - "attributes.saml.assertion.lifespan" + "attributes.saml.assertion.lifespan", )} defaultValue="" control={control} @@ -89,7 +89,7 @@ export const AdvancedSettings = ({ ( - "attributes.tls.client.certificate.bound.access.tokens" + "attributes.tls.client.certificate.bound.access.tokens", )} defaultValue={false} control={control} @@ -173,7 +173,7 @@ export const AdvancedSettings = ({ > ( - "attributes.pkce.code.challenge.method" + "attributes.pkce.code.challenge.method", )} defaultValue="" control={control} @@ -210,7 +210,7 @@ export const AdvancedSettings = ({ > ( - "attributes.require.pushed.authorization.requests" + "attributes.require.pushed.authorization.requests", )} defaultValue="false" control={control} diff --git a/js/apps/admin-ui/src/clients/advanced/AuthenticationOverrides.tsx b/js/apps/admin-ui/src/clients/advanced/AuthenticationOverrides.tsx index 361f8ba181..d2ae445f65 100644 --- a/js/apps/admin-ui/src/clients/advanced/AuthenticationOverrides.tsx +++ b/js/apps/admin-ui/src/clients/advanced/AuthenticationOverrides.tsx @@ -55,7 +55,7 @@ export const AuthenticationOverrides = ({ )), ]); }, - [] + [], ); return ( diff --git a/js/apps/admin-ui/src/clients/advanced/ClusteringPanel.tsx b/js/apps/admin-ui/src/clients/advanced/ClusteringPanel.tsx index 276509d843..033b15ab58 100644 --- a/js/apps/admin-ui/src/clients/advanced/ClusteringPanel.tsx +++ b/js/apps/admin-ui/src/clients/advanced/ClusteringPanel.tsx @@ -132,7 +132,7 @@ export const ClusteringPanel = ({ Promise.resolve( Object.entries(nodes || {}).map((entry) => { return { host: entry[0], registration: entry[1] }; - }) + }), ) } toolbarItem={ @@ -180,7 +180,7 @@ export const ClusteringPanel = ({ value ? formatDate( new Date(parseInt(value.toString()) * 1000), - FORMAT_DATE_AND_TIME + FORMAT_DATE_AND_TIME, ) : "", ], diff --git a/js/apps/admin-ui/src/clients/advanced/FineGrainOpenIdConnect.tsx b/js/apps/admin-ui/src/clients/advanced/FineGrainOpenIdConnect.tsx index d0d0c0cd17..355694974a 100644 --- a/js/apps/admin-ui/src/clients/advanced/FineGrainOpenIdConnect.tsx +++ b/js/apps/admin-ui/src/clients/advanced/FineGrainOpenIdConnect.tsx @@ -172,7 +172,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.access.token.signed.response.alg" + "attributes.access.token.signed.response.alg", )} defaultValue="" control={control} @@ -205,7 +205,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.id.token.signed.response.alg" + "attributes.id.token.signed.response.alg", )} defaultValue="" control={control} @@ -238,7 +238,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.id.token.encrypted.response.alg" + "attributes.id.token.encrypted.response.alg", )} defaultValue="" control={control} @@ -265,7 +265,7 @@ export const FineGrainOpenIdConnect = ({ labelIcon={ @@ -273,7 +273,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.id.token.encrypted.response.enc" + "attributes.id.token.encrypted.response.enc", )} defaultValue="" control={control} @@ -306,7 +306,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.user.info.response.signature.alg" + "attributes.user.info.response.signature.alg", )} defaultValue="" control={control} @@ -333,7 +333,7 @@ export const FineGrainOpenIdConnect = ({ labelIcon={ @@ -341,7 +341,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.user.info.encrypted.response.alg" + "attributes.user.info.encrypted.response.alg", )} defaultValue="" control={control} @@ -368,7 +368,7 @@ export const FineGrainOpenIdConnect = ({ labelIcon={ @@ -376,7 +376,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.user.info.encrypted.response.enc" + "attributes.user.info.encrypted.response.enc", )} defaultValue="" control={control} @@ -409,7 +409,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.request.object.signature.alg" + "attributes.request.object.signature.alg", )} defaultValue="" control={control} @@ -442,7 +442,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.request.object.encryption.alg" + "attributes.request.object.encryption.alg", )} defaultValue="" control={control} @@ -475,7 +475,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.request.object.encryption.enc" + "attributes.request.object.encryption.enc", )} defaultValue="" control={control} @@ -508,7 +508,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.request.object.required" + "attributes.request.object.required", )} defaultValue="" control={control} @@ -558,7 +558,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.authorization.signed.response.alg" + "attributes.authorization.signed.response.alg", )} defaultValue="" control={control} @@ -591,7 +591,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.authorization.encrypted.response.alg" + "attributes.authorization.encrypted.response.alg", )} defaultValue="" control={control} @@ -624,7 +624,7 @@ export const FineGrainOpenIdConnect = ({ > ( - "attributes.authorization.encrypted.response.enc" + "attributes.authorization.encrypted.response.enc", )} defaultValue="" control={control} diff --git a/js/apps/admin-ui/src/clients/advanced/OpenIdConnectCompatibilityModes.tsx b/js/apps/admin-ui/src/clients/advanced/OpenIdConnectCompatibilityModes.tsx index 3f99e6c3c5..4ecc97d715 100644 --- a/js/apps/admin-ui/src/clients/advanced/OpenIdConnectCompatibilityModes.tsx +++ b/js/apps/admin-ui/src/clients/advanced/OpenIdConnectCompatibilityModes.tsx @@ -33,7 +33,7 @@ export const OpenIdConnectCompatibilityModes = ({ labelIcon={ @@ -41,7 +41,7 @@ export const OpenIdConnectCompatibilityModes = ({ > ( - "attributes.exclude.session.state.from.auth.response" + "attributes.exclude.session.state.from.auth.response", )} defaultValue="" control={control} @@ -70,7 +70,7 @@ export const OpenIdConnectCompatibilityModes = ({ > ( - "attributes.use.refresh.tokens" + "attributes.use.refresh.tokens", )} defaultValue="true" control={control} @@ -93,7 +93,7 @@ export const OpenIdConnectCompatibilityModes = ({ labelIcon={ @@ -101,7 +101,7 @@ export const OpenIdConnectCompatibilityModes = ({ > ( - "attributes.client_credentials.use_refresh_token" + "attributes.client_credentials.use_refresh_token", )} defaultValue="false" control={control} @@ -130,7 +130,7 @@ export const OpenIdConnectCompatibilityModes = ({ > ( - "attributes.token.response.type.bearer.lower-case" + "attributes.token.response.type.bearer.lower-case", )} defaultValue="false" control={control} diff --git a/js/apps/admin-ui/src/clients/authorization/AuthorizationEvaluate.tsx b/js/apps/admin-ui/src/clients/authorization/AuthorizationEvaluate.tsx index 648773aeeb..fabf23d554 100644 --- a/js/apps/admin-ui/src/clients/authorization/AuthorizationEvaluate.tsx +++ b/js/apps/admin-ui/src/clients/authorization/AuthorizationEvaluate.tsx @@ -122,7 +122,7 @@ const AuthorizationEvaluateContent = ({ client }: Props) => { (roles) => { setClientRoles(roles); }, - [] + [], ); useFetch( @@ -139,7 +139,7 @@ const AuthorizationEvaluateContent = ({ client }: Props) => { setResources(resources); setScopes(scopes); }, - [] + [], ); const evaluate = async () => { @@ -159,7 +159,7 @@ const AuthorizationEvaluateContent = ({ client }: Props) => { scopes: r.scopes?.filter((s) => Object.values(keys) .flatMap((v) => v) - .includes(s.name!) + .includes(s.name!), ), })), entitlements: false, @@ -167,7 +167,7 @@ const AuthorizationEvaluateContent = ({ client }: Props) => { attributes: Object.fromEntries( formValues.context.attributes .filter((item) => item.key || item.value !== "") - .map(({ key, value }) => [key, value]) + .map(({ key, value }) => [key, value]), ), }, }; @@ -175,7 +175,7 @@ const AuthorizationEvaluateContent = ({ client }: Props) => { try { const evaluation = await adminClient.clients.evaluateResource( { id: client.id!, realm: realm.realm }, - resEval + resEval, ); setEvaluateResult(evaluation); @@ -254,8 +254,8 @@ const AuthorizationEvaluateContent = ({ client }: Props) => { if (field.value?.includes(option)) { field.onChange( field.value.filter( - (item: string) => item !== option - ) + (item: string) => item !== option, + ), ); } else { field.onChange([...(field.value || []), option]); @@ -375,8 +375,8 @@ const AuthorizationEvaluateContent = ({ client }: Props) => { if (field.value.includes(option)) { field.onChange( field.value.filter( - (item: string) => item !== option - ) + (item: string) => item !== option, + ), ); } else { field.onChange([...field.value, option]); diff --git a/js/apps/admin-ui/src/clients/authorization/AuthorizationEvaluateResource.tsx b/js/apps/admin-ui/src/clients/authorization/AuthorizationEvaluateResource.tsx index 603d90e705..05536a9467 100644 --- a/js/apps/admin-ui/src/clients/authorization/AuthorizationEvaluateResource.tsx +++ b/js/apps/admin-ui/src/clients/authorization/AuthorizationEvaluateResource.tsx @@ -80,7 +80,7 @@ export const AuthorizationEvaluateResource = ({ outerPolicy={outerPolicy as PolicyResultRepresentation} resource={resource} /> - ) + ), )} diff --git a/js/apps/admin-ui/src/clients/authorization/AuthorizationExport.tsx b/js/apps/admin-ui/src/clients/authorization/AuthorizationExport.tsx index a4a1db49d4..76b4d2194a 100644 --- a/js/apps/admin-ui/src/clients/authorization/AuthorizationExport.tsx +++ b/js/apps/admin-ui/src/clients/authorization/AuthorizationExport.tsx @@ -40,7 +40,7 @@ export const AuthorizationExport = () => { setCode(JSON.stringify(authDetails, null, 2)); setAuthorizationDetails(authDetails); }, - [] + [], ); const exportAuthDetails = () => { @@ -49,7 +49,7 @@ export const AuthorizationExport = () => { new Blob([prettyPrintJSON(authorizationDetails)], { type: "application/json", }), - "test-authz-config.json" + "test-authz-config.json", ); addAlert(t("exportAuthDetailsSuccess"), AlertVariant.success); } catch (error) { diff --git a/js/apps/admin-ui/src/clients/authorization/DetailCell.tsx b/js/apps/admin-ui/src/clients/authorization/DetailCell.tsx index 2664a8c400..db6c7b9b7b 100644 --- a/js/apps/admin-ui/src/clients/authorization/DetailCell.tsx +++ b/js/apps/admin-ui/src/clients/authorization/DetailCell.tsx @@ -42,7 +42,7 @@ export const DetailCell = ({ id, clientId, uris }: DetailCellProps) => { setScope(scopes); setPermissions(permissions); }, - [] + [], ); if (!permissions || !scope) { diff --git a/js/apps/admin-ui/src/clients/authorization/ImportDialog.tsx b/js/apps/admin-ui/src/clients/authorization/ImportDialog.tsx index f586f57dc8..4c74448bec 100644 --- a/js/apps/admin-ui/src/clients/authorization/ImportDialog.tsx +++ b/js/apps/admin-ui/src/clients/authorization/ImportDialog.tsx @@ -78,7 +78,7 @@ export const ImportDialog = ({ onConfirm, closeDialog }: ImportDialogProps) => { id="policyEnforcementMode" name="policyEnforcementMode" label={t( - `policyEnforcementModes.${imported.policyEnforcementMode}` + `policyEnforcementModes.${imported.policyEnforcementMode}`, )} isChecked isDisabled diff --git a/js/apps/admin-ui/src/clients/authorization/KeyBasedAttributeInput.tsx b/js/apps/admin-ui/src/clients/authorization/KeyBasedAttributeInput.tsx index 48e881ffb4..1d3da3f1a8 100644 --- a/js/apps/admin-ui/src/clients/authorization/KeyBasedAttributeInput.tsx +++ b/js/apps/admin-ui/src/clients/authorization/KeyBasedAttributeInput.tsx @@ -69,7 +69,7 @@ const ValueInput = ({ if (selectableValues) { values = defaultContextAttributes.find( - (attr) => attr.key === getValues().context?.[rowIndex]?.key + (attr) => attr.key === getValues().context?.[rowIndex]?.key, )?.values; } @@ -78,7 +78,7 @@ const ValueInput = ({ const renderSelectOptionType = () => { const scopeValues = resources?.find( - (resource) => resource.name === getValues().resources?.[rowIndex]?.key + (resource) => resource.name === getValues().resources?.[rowIndex]?.key, )?.scopes; if (attributeValues?.length && !resources) { diff --git a/js/apps/admin-ui/src/clients/authorization/NewPolicyDialog.tsx b/js/apps/admin-ui/src/clients/authorization/NewPolicyDialog.tsx index f0b4dcc34f..7575b51457 100644 --- a/js/apps/admin-ui/src/clients/authorization/NewPolicyDialog.tsx +++ b/js/apps/admin-ui/src/clients/authorization/NewPolicyDialog.tsx @@ -37,7 +37,7 @@ export const NewPolicyDialog = ({ const sortedPolicies = useMemo( () => policyProviders ? localeSort(policyProviders, mapByKey("name")) : [], - [policyProviders] + [policyProviders], ); return ( diff --git a/js/apps/admin-ui/src/clients/authorization/PermissionDetails.tsx b/js/apps/admin-ui/src/clients/authorization/PermissionDetails.tsx index fd270a0fc1..41b0922fd6 100644 --- a/js/apps/admin-ui/src/clients/authorization/PermissionDetails.tsx +++ b/js/apps/admin-ui/src/clients/authorization/PermissionDetails.tsx @@ -105,12 +105,12 @@ export default function PermissionDetails() { reset({ ...permission, resources, policies, scopes }); if (permission && "resourceType" in permission) { setApplyToResourceTypeFlag( - !!(permission as { resourceType: string }).resourceType + !!(permission as { resourceType: string }).resourceType, ); } setPermission({ ...permission, resources, policies }); }, - [] + [], ); const save = async (permission: PolicyRepresentation) => { @@ -118,12 +118,12 @@ export default function PermissionDetails() { if (permissionId) { await adminClient.clients.updatePermission( { id, type: permissionType, permissionId }, - permission + permission, ); } else { const result = await adminClient.clients.createPermission( { id, type: permissionType }, - permission + permission, ); navigate( toPermissionDetails({ @@ -131,12 +131,12 @@ export default function PermissionDetails() { id, permissionType, permissionId: result.id!, - }) + }), ); } addAlert( t((permissionId ? "update" : "create") + "PermissionSuccess"), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError("clients:permissionSaveError", error); @@ -159,7 +159,7 @@ export default function PermissionDetails() { }); addAlert(t("permissionDeletedSuccess"), AlertVariant.success); navigate( - toAuthorizationTab({ realm, clientId: id, tab: "permissions" }) + toAuthorizationTab({ realm, clientId: id, tab: "permissions" }), ); } catch (error) { addError("clients:permissionDeletedError", error); diff --git a/js/apps/admin-ui/src/clients/authorization/Permissions.tsx b/js/apps/admin-ui/src/clients/authorization/Permissions.tsx index 835f62f0e6..0357e20492 100644 --- a/js/apps/admin-ui/src/clients/authorization/Permissions.tsx +++ b/js/apps/admin-ui/src/clients/authorization/Permissions.tsx @@ -113,11 +113,11 @@ export const AuthorizationPermissions = ({ clientId }: PermissionsProps) => { associatedPolicies, isExpanded: false, }; - }) + }), ); }, setPermissions, - [key, search, first, max] + [key, search, first, max], ); useFetch( @@ -135,7 +135,7 @@ export const AuthorizationPermissions = ({ clientId }: PermissionsProps) => { ]); return { policies: policies.filter( - (p) => p.type === "resource" || p.type === "scope" + (p) => p.type === "resource" || p.type === "scope", ), resources: resources.length !== 1, scopes: scopes.length !== 1, @@ -145,7 +145,7 @@ export const AuthorizationPermissions = ({ clientId }: PermissionsProps) => { setPolicyProviders(policies); setDisabledCreate({ resources, scopes }); }, - [] + [], ); const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({ @@ -223,7 +223,7 @@ export const AuthorizationPermissions = ({ clientId }: PermissionsProps) => { realm, id: clientId, permissionType: "resource", - }) + }), ) } > @@ -241,7 +241,7 @@ export const AuthorizationPermissions = ({ clientId }: PermissionsProps) => { realm, id: clientId, permissionType: "scope", - }) + }), ) } > @@ -285,7 +285,7 @@ export const AuthorizationPermissions = ({ clientId }: PermissionsProps) => { const rows = permissions.map((p, index) => index === rowIndex ? { ...p, isExpanded: !p.isExpanded } - : p + : p, ); setPermissions(rows); }, diff --git a/js/apps/admin-ui/src/clients/authorization/Policies.tsx b/js/apps/admin-ui/src/clients/authorization/Policies.tsx index 71a649c489..68d01c0f0f 100644 --- a/js/apps/admin-ui/src/clients/authorization/Policies.tsx +++ b/js/apps/admin-ui/src/clients/authorization/Policies.tsx @@ -110,11 +110,11 @@ export const AuthorizationPolicies = ({ clientId }: PoliciesProps) => { }, ([providers, ...policies]) => { setPolicyProviders( - providers.filter((p) => p.type !== "resource" && p.type !== "scope") + providers.filter((p) => p.type !== "resource" && p.type !== "scope"), ); setPolicies(policies); }, - [key, search, first, max] + [key, search, first, max], ); const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({ @@ -174,7 +174,7 @@ export const AuthorizationPolicies = ({ clientId }: PoliciesProps) => { policyProviders={policyProviders} onSelect={(p) => navigate( - toCreatePolicy({ id: clientId, realm, policyType: p.type! }) + toCreatePolicy({ id: clientId, realm, policyType: p.type! }), ) } toggleDialog={toggleDialog} @@ -231,7 +231,7 @@ export const AuthorizationPolicies = ({ clientId }: PoliciesProps) => { const rows = policies.map((policy, index) => index === rowIndex ? { ...policy, isExpanded: !policy.isExpanded } - : policy + : policy, ); setPolicies(rows); }, @@ -317,11 +317,11 @@ export const AuthorizationPolicies = ({ clientId }: PoliciesProps) => { {newDialog && ( p.type !== "aggregate" + (p) => p.type !== "aggregate", )} onSelect={(p) => navigate( - toCreatePolicy({ id: clientId, realm, policyType: p.type! }) + toCreatePolicy({ id: clientId, realm, policyType: p.type! }), ) } toggleDialog={toggleDialog} diff --git a/js/apps/admin-ui/src/clients/authorization/ResourceDetails.tsx b/js/apps/admin-ui/src/clients/authorization/ResourceDetails.tsx index b7562ad01e..2d2a436f0f 100644 --- a/js/apps/admin-ui/src/clients/authorization/ResourceDetails.tsx +++ b/js/apps/admin-ui/src/clients/authorization/ResourceDetails.tsx @@ -92,7 +92,7 @@ export default function ResourceDetails() { setResource(resource); setupForm(resource); }, - [] + [], ); const submit = async (submitted: SubmittedResource) => { @@ -107,13 +107,13 @@ export default function ResourceDetails() { } else { const result = await adminClient.clients.createResource( { id }, - resource + resource, ); navigate(toResourceDetails({ realm, id, resourceId: result._id! })); } addAlert( t((resourceId ? "update" : "create") + "ResourceSuccess"), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError("clients:resourceSaveError", error); diff --git a/js/apps/admin-ui/src/clients/authorization/Resources.tsx b/js/apps/admin-ui/src/clients/authorization/Resources.tsx index 5036f53f16..8e66ef01b6 100644 --- a/js/apps/admin-ui/src/clients/authorization/Resources.tsx +++ b/js/apps/admin-ui/src/clients/authorization/Resources.tsx @@ -84,9 +84,9 @@ export const AuthorizationResources = ({ clientId }: ResourcesProps) => { }, (resources) => setResources( - resources.map((resource) => ({ ...resource, isExpanded: false })) + resources.map((resource) => ({ ...resource, isExpanded: false })), ), - [key, search, first, max] + [key, search, first, max], ); const fetchPermissions = async (id: string) => { @@ -209,7 +209,7 @@ export const AuthorizationResources = ({ clientId }: ResourcesProps) => { ...resource, isExpanded: !resource.isExpanded, } - : resource + : resource, ); setResources(rows); }, @@ -258,7 +258,7 @@ export const AuthorizationResources = ({ clientId }: ResourcesProps) => { onClick: async () => { setSelectedResource(resource); setPermission( - await fetchPermissions(resource._id!) + await fetchPermissions(resource._id!), ); toggleDeleteDialog(); }, diff --git a/js/apps/admin-ui/src/clients/authorization/ResourcesPolicySelect.tsx b/js/apps/admin-ui/src/clients/authorization/ResourcesPolicySelect.tsx index b586b36496..6bf16f3b2c 100644 --- a/js/apps/admin-ui/src/clients/authorization/ResourcesPolicySelect.tsx +++ b/js/apps/admin-ui/src/clients/authorization/ResourcesPolicySelect.tsx @@ -70,7 +70,7 @@ export const ResourcesPolicySelect = ({ const functions = typeMapping[name]; const convert = ( - p: PolicyRepresentation | ResourceRepresentation + p: PolicyRepresentation | ResourceRepresentation, ): Policies => ({ id: "_id" in p ? p._id : "id" in p ? p.id : undefined, name: p.name, @@ -80,7 +80,7 @@ export const ResourcesPolicySelect = ({ async () => { const params: PolicyQuery = Object.assign( { id: clientId, first: 0, max: 10, permission: "false" }, - search === "" ? null : { name: search } + search === "" ? null : { name: search }, ); return ( await Promise.all([ @@ -96,16 +96,16 @@ export const ResourcesPolicySelect = ({ .flat() .filter( (r): r is PolicyRepresentation | ResourceRepresentation => - typeof r !== "string" + typeof r !== "string", ) .map(convert) .filter( ({ id }, index, self) => - index === self.findIndex(({ id: otherId }) => id === otherId) + index === self.findIndex(({ id: otherId }) => id === otherId), ); }, setItems, - [search] + [search], ); const toSelectOptions = () => @@ -139,7 +139,7 @@ export const ResourcesPolicySelect = ({ const option = selectedValue.toString(); if (variant === SelectVariant.typeaheadMulti) { const changedValue = field.value?.find( - (p: string) => p === option + (p: string) => p === option, ) ? field.value.filter((p: string) => p !== option) : [...field.value!, option]; diff --git a/js/apps/admin-ui/src/clients/authorization/ScopeDetails.tsx b/js/apps/admin-ui/src/clients/authorization/ScopeDetails.tsx index c7b3a2073d..b163c1db7a 100644 --- a/js/apps/admin-ui/src/clients/authorization/ScopeDetails.tsx +++ b/js/apps/admin-ui/src/clients/authorization/ScopeDetails.tsx @@ -64,7 +64,7 @@ export default function ScopeDetails() { setScope(scope); reset({ ...scope }); }, - [] + [], ); const onSubmit = async (scope: ScopeRepresentation) => { @@ -72,7 +72,7 @@ export default function ScopeDetails() { if (scopeId) { await adminClient.clients.updateAuthorizationScope( { id, scopeId }, - scope + scope, ); setScope(scope); } else { @@ -82,13 +82,13 @@ export default function ScopeDetails() { name: scope.name!, displayName: scope.displayName, iconUri: scope.iconUri, - } + }, ); navigate(toAuthorizationTab({ realm, clientId: id, tab: "scopes" })); } addAlert( t((scopeId ? "update" : "create") + "ScopeSuccess"), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError("clients:scopeSaveError", error); diff --git a/js/apps/admin-ui/src/clients/authorization/ScopePicker.tsx b/js/apps/admin-ui/src/clients/authorization/ScopePicker.tsx index 6dcc0f572c..8d6e6ef90f 100644 --- a/js/apps/admin-ui/src/clients/authorization/ScopePicker.tsx +++ b/js/apps/admin-ui/src/clients/authorization/ScopePicker.tsx @@ -38,7 +38,7 @@ export const ScopePicker = ({ clientId }: { clientId: string }) => { return adminClient.clients.listAllScopes(params); }, setScopes, - [search] + [search], ); const renderScopes = (scopes?: ScopeRepresentation[]) => @@ -85,7 +85,7 @@ export const ScopePicker = ({ clientId }: { clientId: string }) => { ? selectedValue : (selectedValue as Scope).name; const changedValue = field.value.find( - (o: Scope) => o.name === option + (o: Scope) => o.name === option, ) ? field.value.filter((item: Scope) => item.name !== option) : [...field.value, selectedValue]; diff --git a/js/apps/admin-ui/src/clients/authorization/ScopeSelect.tsx b/js/apps/admin-ui/src/clients/authorization/ScopeSelect.tsx index 2403504056..244ad0c5ca 100644 --- a/js/apps/admin-ui/src/clients/authorization/ScopeSelect.tsx +++ b/js/apps/admin-ui/src/clients/authorization/ScopeSelect.tsx @@ -29,7 +29,7 @@ export const ScopeSelect = ({ const [scopes, setScopes] = useState([]); const [selectedScopes, setSelectedScopes] = useState( - [] + [], ); const [search, setSearch] = useState(""); const [open, setOpen] = useState(false); @@ -50,8 +50,8 @@ export const ScopeSelect = ({ return adminClient.clients.listAllScopes( Object.assign( { id: clientId, deep: false }, - search === "" ? null : { name: search } - ) + search === "" ? null : { name: search }, + ), ); } @@ -69,10 +69,10 @@ export const ScopeSelect = ({ setScopes(scopes); if (!search) setSelectedScopes( - scopes.filter((s: ScopeRepresentation) => values?.includes(s.id!)) + scopes.filter((s: ScopeRepresentation) => values?.includes(s.id!)), ); }, - [resourceId, search] + [resourceId, search], ); return ( diff --git a/js/apps/admin-ui/src/clients/authorization/Scopes.tsx b/js/apps/admin-ui/src/clients/authorization/Scopes.tsx index 45a3481783..eb34a3ab21 100644 --- a/js/apps/admin-ui/src/clients/authorization/Scopes.tsx +++ b/js/apps/admin-ui/src/clients/authorization/Scopes.tsx @@ -83,7 +83,7 @@ export const AuthorizationScopes = ({ clientId }: ScopesProps) => { setScopes(scopes.map((s) => ({ ...s, isLoaded: false }))); setCollapsed(scopes.map((s) => ({ id: s.id!, isExpanded: false }))); }, - [key, search, first, max] + [key, search, first, max], ); const getScope = (id: string) => scopes?.find((scope) => scope.id === id)!; @@ -116,14 +116,14 @@ export const AuthorizationScopes = ({ clientId }: ScopesProps) => { permissions, isLoaded: true, }; - }) + }), ); }, (resourcesScopes) => { let result = [...(scopes || [])]; resourcesScopes.forEach((resourceScope) => { const index = scopes?.findIndex( - (scope) => resourceScope.id === scope.id + (scope) => resourceScope.id === scope.id, )!; result = [ ...result.slice(0, index), @@ -134,7 +134,7 @@ export const AuthorizationScopes = ({ clientId }: ScopesProps) => { setScopes(result); }, - [collapsed] + [collapsed], ); if (!scopes) { diff --git a/js/apps/admin-ui/src/clients/authorization/Settings.tsx b/js/apps/admin-ui/src/clients/authorization/Settings.tsx index 84b4442fc3..b26112c12e 100644 --- a/js/apps/admin-ui/src/clients/authorization/Settings.tsx +++ b/js/apps/admin-ui/src/clients/authorization/Settings.tsx @@ -50,7 +50,7 @@ export const AuthorizationSettings = ({ clientId }: { clientId: string }) => { setResource(resource); reset(resource); }, - [] + [], ); const importResource = async (value: ResourceServerRepresentation) => { @@ -67,7 +67,7 @@ export const AuthorizationSettings = ({ clientId }: { clientId: string }) => { try { await adminClient.clients.updateResourceServer( { id: clientId }, - resource + resource, ); addAlert(t("updateResourceSuccess"), AlertVariant.success); } catch (error) { diff --git a/js/apps/admin-ui/src/clients/authorization/evaluate/Results.tsx b/js/apps/admin-ui/src/clients/authorization/evaluate/Results.tsx index dd5150aedc..9ce955d7f9 100644 --- a/js/apps/admin-ui/src/clients/authorization/evaluate/Results.tsx +++ b/js/apps/admin-ui/src/clients/authorization/evaluate/Results.tsx @@ -40,7 +40,7 @@ enum ResultsFilter { function filterResults( results: EvaluationResultRepresentation[], - filter: ResultsFilter + filter: ResultsFilter, ) { switch (filter) { case ResultsFilter.StatusPermitted: @@ -74,9 +74,9 @@ export const Results = ({ evaluateResult, refresh, back }: ResultProps) => { const filteredResources = useMemo( () => filterResults(evaluateResult.results!, filter).filter( - ({ resource }) => resource?.name?.includes(searchQuery) ?? false + ({ resource }) => resource?.name?.includes(searchQuery) ?? false, ), - [evaluateResult.results, filter, searchQuery] + [evaluateResult.results, filter, searchQuery], ); const noEvaluatedData = evaluateResult.results!.length === 0; diff --git a/js/apps/admin-ui/src/clients/authorization/policy/Client.tsx b/js/apps/admin-ui/src/clients/authorization/policy/Client.tsx index 781ebdd114..8165e08d4a 100644 --- a/js/apps/admin-ui/src/clients/authorization/policy/Client.tsx +++ b/js/apps/admin-ui/src/clients/authorization/policy/Client.tsx @@ -41,14 +41,14 @@ export const Client = () => { return await Promise.all( values.map( (id: string) => - adminClient.clients.findOne({ id }) as ClientRepresentation - ) + adminClient.clients.findOne({ id }) as ClientRepresentation, + ), ); } return await adminClient.clients.find(params); }, setClients, - [search] + [search], ); const convert = (clients: ClientRepresentation[]) => @@ -98,7 +98,7 @@ export const Client = () => { const option = v.toString(); if (field.value.includes(option)) { field.onChange( - field.value.filter((item: string) => item !== option) + field.value.filter((item: string) => item !== option), ); } else { field.onChange([...field.value, option]); diff --git a/js/apps/admin-ui/src/clients/authorization/policy/ClientScope.tsx b/js/apps/admin-ui/src/clients/authorization/policy/ClientScope.tsx index 3beb164b44..e68f12db8b 100644 --- a/js/apps/admin-ui/src/clients/authorization/policy/ClientScope.tsx +++ b/js/apps/admin-ui/src/clients/authorization/policy/ClientScope.tsx @@ -47,11 +47,13 @@ export const ClientScope = () => { () => adminClient.clientScopes.find(), (scopes) => { setSelectedScopes( - getValues("clientScopes").map((s) => scopes.find((c) => c.id === s.id)!) + getValues("clientScopes").map( + (s) => scopes.find((c) => c.id === s.id)!, + ), ); setScopes(localeSort(scopes, mapByKey("name"))); }, - [] + [], ); return ( @@ -84,7 +86,7 @@ export const ClientScope = () => { (scope) => !field.value .map((c: RequiredIdValue) => c.id) - .includes(scope.id!) + .includes(scope.id!), )} isClientScopesConditionType open={open} @@ -152,7 +154,7 @@ export const ClientScope = () => { onClick={() => { setValue("clientScopes", [ ...getValues("clientScopes").filter( - (s) => s.id !== scope.id + (s) => s.id !== scope.id, ), ]); setSelectedScopes([ diff --git a/js/apps/admin-ui/src/clients/authorization/policy/Group.tsx b/js/apps/admin-ui/src/clients/authorization/policy/Group.tsx index 8369b34ab0..19cfe40b12 100644 --- a/js/apps/admin-ui/src/clients/authorization/policy/Group.tsx +++ b/js/apps/admin-ui/src/clients/authorization/policy/Group.tsx @@ -42,14 +42,14 @@ export const Group = () => { const [open, setOpen] = useState(false); const [selectedGroups, setSelectedGroups] = useState( - [] + [], ); useFetch( () => { if (values && values.length > 0) return Promise.all( - values.map((g) => adminClient.groups.findOne({ id: g.id })) + values.map((g) => adminClient.groups.findOne({ id: g.id })), ); return Promise.resolve([]); }, @@ -57,7 +57,7 @@ export const Group = () => { const filteredGroup = groups.filter((g) => g) as GroupRepresentation[]; setSelectedGroups(filteredGroup); }, - [] + [], ); return ( diff --git a/js/apps/admin-ui/src/clients/authorization/policy/PolicyDetails.tsx b/js/apps/admin-ui/src/clients/authorization/policy/PolicyDetails.tsx index d83aa89735..03f5f2ad45 100644 --- a/js/apps/admin-ui/src/clients/authorization/policy/PolicyDetails.tsx +++ b/js/apps/admin-ui/src/clients/authorization/policy/PolicyDetails.tsx @@ -103,7 +103,7 @@ export default function PolicyDetails() { reset({ ...policy, policies }); setPolicy(policy); }, - [id, policyType, policyId] + [id, policyType, policyId], ); const onSubmit = async (policy: Policy) => { @@ -118,12 +118,12 @@ export default function PolicyDetails() { if (policyId) { await adminClient.clients.updatePolicy( { id, type: policyType, policyId }, - policy + policy, ); } else { const result = await adminClient.clients.createPolicy( { id, type: policyType }, - policy + policy, ); navigate( toPolicyDetails({ @@ -131,12 +131,12 @@ export default function PolicyDetails() { id, policyType, policyId: result.id!, - }) + }), ); } addAlert( t((policyId ? "update" : "create") + "PolicySuccess"), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError("clients:policySaveError", error); diff --git a/js/apps/admin-ui/src/clients/authorization/policy/Role.tsx b/js/apps/admin-ui/src/clients/authorization/policy/Role.tsx index 61dcd0783c..2437f5bcca 100644 --- a/js/apps/admin-ui/src/clients/authorization/policy/Role.tsx +++ b/js/apps/admin-ui/src/clients/authorization/policy/Role.tsx @@ -38,7 +38,7 @@ export const Role = () => { async () => { if (values && values.length > 0) { const roles = await Promise.all( - values.map((r) => adminClient.roles.findOneById({ id: r.id })) + values.map((r) => adminClient.roles.findOneById({ id: r.id })), ); return Promise.all( roles.map(async (role) => ({ @@ -48,13 +48,13 @@ export const Role = () => { id: role?.containerId!, }) : undefined, - })) + })), ); } return Promise.resolve([]); }, setSelectedRoles, - [] + [], ); return ( @@ -153,7 +153,7 @@ export const Role = () => { ]); setSelectedRoles([ ...selectedRoles.filter( - (s) => s.role.id !== row.role.id + (s) => s.role.id !== row.role.id, ), ]); }} diff --git a/js/apps/admin-ui/src/clients/authorization/policy/Time.tsx b/js/apps/admin-ui/src/clients/authorization/policy/Time.tsx index ff8fa69b4f..91f638032b 100644 --- a/js/apps/admin-ui/src/clients/authorization/policy/Time.tsx +++ b/js/apps/admin-ui/src/clients/authorization/policy/Time.tsx @@ -42,7 +42,7 @@ const DateTime = ({ name }: { name: string }) => { const parseTime = ( value: string, hour?: number | null, - minute?: number | null + minute?: number | null, ): string => { const parts = value.match(DATE_TIME_FORMAT); if (minute !== undefined && minute !== null) { diff --git a/js/apps/admin-ui/src/clients/credentials/ClientSecret.tsx b/js/apps/admin-ui/src/clients/credentials/ClientSecret.tsx index ff08de36d3..8c48ea6947 100644 --- a/js/apps/admin-ui/src/clients/credentials/ClientSecret.tsx +++ b/js/apps/admin-ui/src/clients/credentials/ClientSecret.tsx @@ -89,7 +89,7 @@ export const ClientSecret = ({ client, secret, toggle }: ClientSecretProps) => { const { addAlert, addError } = useAlerts(); const [secretRotated, setSecretRotated] = useState( - client.attributes?.["client.secret.rotated"] + client.attributes?.["client.secret.rotated"], ); const secretExpirationTime: number = client.attributes?.["client.secret.expiration.time"]; diff --git a/js/apps/admin-ui/src/clients/credentials/Credentials.tsx b/js/apps/admin-ui/src/clients/credentials/Credentials.tsx index b377aedaef..4affb14893 100644 --- a/js/apps/admin-ui/src/clients/credentials/Credentials.tsx +++ b/js/apps/admin-ui/src/clients/credentials/Credentials.tsx @@ -79,12 +79,12 @@ export const Credentials = ({ client, save, refresh }: CredentialsProps) => { setProviders(providers); setSecret(secret.value!); }, - [] + [], ); async function regenerate( call: (clientId: string) => Promise, - message: string + message: string, ): Promise { try { const data = await call(clientId); @@ -99,7 +99,7 @@ export const Credentials = ({ client, save, refresh }: CredentialsProps) => { const secret = await regenerate( (clientId) => adminClient.clients.generateNewClientSecret({ id: clientId }), - "clientSecret" + "clientSecret", ); setSecret(secret?.value || ""); refresh(); @@ -117,7 +117,7 @@ export const Credentials = ({ client, save, refresh }: CredentialsProps) => { const accessToken = await regenerate( (clientId) => adminClient.clients.generateRegistrationAccessToken({ id: clientId }), - "accessToken" + "accessToken", ); setAccessToken(accessToken?.registrationAccessToken || ""); }; diff --git a/js/apps/admin-ui/src/clients/credentials/SignedJWT.tsx b/js/apps/admin-ui/src/clients/credentials/SignedJWT.tsx index 4ba04d3590..e72af8833a 100644 --- a/js/apps/admin-ui/src/clients/credentials/SignedJWT.tsx +++ b/js/apps/admin-ui/src/clients/credentials/SignedJWT.tsx @@ -41,7 +41,7 @@ export const SignedJWT = ({ clientAuthenticatorType }: SignedJWTProps) => { > ( - "attributes.token.endpoint.auth.signing.alg" + "attributes.token.endpoint.auth.signing.alg", )} defaultValue="" control={control} diff --git a/js/apps/admin-ui/src/clients/credentials/X509.tsx b/js/apps/admin-ui/src/clients/credentials/X509.tsx index ebcc65ea49..5842949ebf 100644 --- a/js/apps/admin-ui/src/clients/credentials/X509.tsx +++ b/js/apps/admin-ui/src/clients/credentials/X509.tsx @@ -28,7 +28,7 @@ export const X509 = () => { > ( - "attributes.x509.allow.regex.pattern.comparison" + "attributes.x509.allow.regex.pattern.comparison", )} defaultValue="false" control={control} @@ -71,7 +71,7 @@ export const X509 = () => { } {...register( convertAttributeNameToForm("attributes.x509.subjectdn"), - { required: true } + { required: true }, )} /> diff --git a/js/apps/admin-ui/src/clients/import/ImportForm.tsx b/js/apps/admin-ui/src/clients/import/ImportForm.tsx index 22905958d7..4fbab73c0a 100644 --- a/js/apps/admin-ui/src/clients/import/ImportForm.tsx +++ b/js/apps/admin-ui/src/clients/import/ImportForm.tsx @@ -55,7 +55,7 @@ export default function ImportForm() { }; async function parseFileContents( - contents: string + contents: string, ): Promise { if (!isXml(contents)) { return JSON.parse(contents); @@ -63,18 +63,18 @@ export default function ImportForm() { const response = await fetch( `${addTrailingSlash( - adminClient.baseUrl + adminClient.baseUrl, )}admin/realms/${realm}/client-description-converter`, { method: "POST", body: contents, headers: getAuthorizationHeaders(await adminClient.getAccessToken()), - } + }, ); if (!response.ok) { throw new Error( - `Server responded with invalid status: ${response.statusText}` + `Server responded with invalid status: ${response.statusText}`, ); } diff --git a/js/apps/admin-ui/src/clients/initial-access/CreateInitialAccessToken.tsx b/js/apps/admin-ui/src/clients/initial-access/CreateInitialAccessToken.tsx index 478c41e6ba..f60e7a2eab 100644 --- a/js/apps/admin-ui/src/clients/initial-access/CreateInitialAccessToken.tsx +++ b/js/apps/admin-ui/src/clients/initial-access/CreateInitialAccessToken.tsx @@ -40,7 +40,7 @@ export default function CreateInitialAccessToken() { try { const access = await adminClient.realms.createClientsInitialAccess( { realm }, - clientToken + clientToken, ); setToken(access.token!); } catch (error) { @@ -123,7 +123,7 @@ export default function CreateInitialAccessToken() { onMinus={() => field.onChange(field.value - 1)} onChange={(event) => { const value = Number( - (event.target as HTMLInputElement).value + (event.target as HTMLInputElement).value, ); field.onChange(value < 1 ? 1 : value); }} diff --git a/js/apps/admin-ui/src/clients/initial-access/InitialAccessTokenList.tsx b/js/apps/admin-ui/src/clients/initial-access/InitialAccessTokenList.tsx index eaf4cd7c7e..2062f87d3c 100644 --- a/js/apps/admin-ui/src/clients/initial-access/InitialAccessTokenList.tsx +++ b/js/apps/admin-ui/src/clients/initial-access/InitialAccessTokenList.tsx @@ -98,7 +98,7 @@ export const InitialAccessTokenList = () => { cellRenderer: (row) => formatDate( new Date(row.timestamp! * 1000 + row.expiration! * 1000), - FORMAT_DATE_AND_TIME + FORMAT_DATE_AND_TIME, ), }, { diff --git a/js/apps/admin-ui/src/clients/keys/ExportSamlKeyDialog.tsx b/js/apps/admin-ui/src/clients/keys/ExportSamlKeyDialog.tsx index 2fe471cb58..95456dd169 100644 --- a/js/apps/admin-ui/src/clients/keys/ExportSamlKeyDialog.tsx +++ b/js/apps/admin-ui/src/clients/keys/ExportSamlKeyDialog.tsx @@ -34,11 +34,11 @@ export const ExportSamlKeyDialog = ({ id: clientId, attr: "saml.signing", }, - config + config, ); saveAs( new Blob([keyStore], { type: "application/octet-stream" }), - `keystore.${getFileExtension(config.format ?? "")}` + `keystore.${getFileExtension(config.format ?? "")}`, ); addAlert(t("samlKeysExportSuccess")); close(); diff --git a/js/apps/admin-ui/src/clients/keys/Keys.tsx b/js/apps/admin-ui/src/clients/keys/Keys.tsx index 3f4c77686b..46ce0f4fdc 100644 --- a/js/apps/admin-ui/src/clients/keys/Keys.tsx +++ b/js/apps/admin-ui/src/clients/keys/Keys.tsx @@ -66,7 +66,7 @@ export const Keys = ({ clientId, save, hasConfigureAccess }: KeysProps) => { useFetch( () => adminClient.clients.getKeyInfo({ id: clientId, attr }), (info) => setKeyInfo(info), - [key] + [key], ); const generate = async (config: KeyStoreConfig) => { @@ -76,11 +76,11 @@ export const Keys = ({ clientId, save, hasConfigureAccess }: KeysProps) => { id: clientId, attr, }, - config + config, ); saveAs( new Blob([keyStore], { type: "application/octet-stream" }), - `keystore.${getFileExtension(config.format ?? "")}` + `keystore.${getFileExtension(config.format ?? "")}`, ); addAlert(t("generateSuccess"), AlertVariant.success); refresh(); @@ -102,7 +102,7 @@ export const Keys = ({ clientId, save, hasConfigureAccess }: KeysProps) => { await adminClient.clients.uploadCertificate( { id: clientId, attr }, - formData + formData, ); addAlert(t("importSuccess"), AlertVariant.success); refresh(); @@ -186,7 +186,7 @@ export const Keys = ({ clientId, save, hasConfigureAccess }: KeysProps) => { id="jwksUrl" type="url" {...register( - convertAttributeNameToForm("attributes.jwks.url") + convertAttributeNameToForm("attributes.jwks.url"), )} /> diff --git a/js/apps/admin-ui/src/clients/keys/SamlKeys.tsx b/js/apps/admin-ui/src/clients/keys/SamlKeys.tsx index 5fa00c389a..e8c0187694 100644 --- a/js/apps/admin-ui/src/clients/keys/SamlKeys.tsx +++ b/js/apps/admin-ui/src/clients/keys/SamlKeys.tsx @@ -169,11 +169,11 @@ export const SamlKeys = ({ clientId, save }: SamlKeysProps) => { () => Promise.all( KEYS.map((attr) => - adminClient.clients.getKeyInfo({ id: clientId, attr }) - ) + adminClient.clients.getKeyInfo({ id: clientId, attr }), + ), ), (info) => setKeyInfo(info), - [refresh] + [refresh], ); const generate = async (attr: KeyTypes) => { @@ -190,7 +190,7 @@ export const SamlKeys = ({ clientId, save }: SamlKeysProps) => { new Blob([info[index].privateKey!], { type: "application/octet-stream", }), - "private.key" + "private.key", ); addAlert(t("generateSuccess"), AlertVariant.success); diff --git a/js/apps/admin-ui/src/clients/keys/SamlKeysDialog.tsx b/js/apps/admin-ui/src/clients/keys/SamlKeysDialog.tsx index 1e7f89f277..4141a706f6 100644 --- a/js/apps/admin-ui/src/clients/keys/SamlKeysDialog.tsx +++ b/js/apps/admin-ui/src/clients/keys/SamlKeysDialog.tsx @@ -44,7 +44,7 @@ export const submitForm = async ( form: SamlKeysDialogForm, id: string, attr: KeyTypes, - callback: (error?: unknown) => void + callback: (error?: unknown) => void, ) => { try { const formData = new FormData(); @@ -52,8 +52,8 @@ export const submitForm = async ( Object.entries(rest).map(([key, value]) => formData.append( key === "format" ? "keystoreFormat" : key, - value.toString() - ) + value.toString(), + ), ); formData.append("file", file); @@ -102,7 +102,7 @@ export const SamlKeysDialog = ({ new Blob([key.privateKey!], { type: "application/octet-stream", }), - "private.key" + "private.key", ); addAlert(t("generateSuccess"), AlertVariant.success); diff --git a/js/apps/admin-ui/src/clients/registration/AddProviderDialog.tsx b/js/apps/admin-ui/src/clients/registration/AddProviderDialog.tsx index e95791350c..1a83b987c6 100644 --- a/js/apps/admin-ui/src/clients/registration/AddProviderDialog.tsx +++ b/js/apps/admin-ui/src/clients/registration/AddProviderDialog.tsx @@ -24,7 +24,7 @@ export const AddProviderDialog = ({ const { t } = useTranslation("clients"); const serverInfo = useServerInfo(); const providers = Object.keys( - serverInfo.providers?.["client-registration-policy"].providers || [] + serverInfo.providers?.["client-registration-policy"].providers || [], ); const descriptions = @@ -37,9 +37,9 @@ export const AddProviderDialog = ({ () => localeSort( descriptions?.filter((d) => providers.includes(d.id)) || [], - mapByKey("id") + mapByKey("id"), ), - [providers, descriptions] + [providers, descriptions], ); return ( {name} - ) + ), )} /> diff --git a/js/apps/admin-ui/src/clients/registration/ClientRegistrationList.tsx b/js/apps/admin-ui/src/clients/registration/ClientRegistrationList.tsx index 1b61f1367b..1145ef3db5 100644 --- a/js/apps/admin-ui/src/clients/registration/ClientRegistrationList.tsx +++ b/js/apps/admin-ui/src/clients/registration/ClientRegistrationList.tsx @@ -61,7 +61,7 @@ export const ClientRegistrationList = ({ type: "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy", }), (policies) => setPolicies(policies.filter((p) => p.subType === subType)), - [selectedPolicy] + [selectedPolicy], ); const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({ @@ -95,7 +95,7 @@ export const ClientRegistrationList = ({ realm, subTab: subTab || "anonymous", providerId, - }) + }), ) } toggleDialog={toggleAddDialog} diff --git a/js/apps/admin-ui/src/clients/registration/DetailProvider.tsx b/js/apps/admin-ui/src/clients/registration/DetailProvider.tsx index f1970fefd5..f95b5ced2d 100644 --- a/js/apps/admin-ui/src/clients/registration/DetailProvider.tsx +++ b/js/apps/admin-ui/src/clients/registration/DetailProvider.tsx @@ -64,7 +64,7 @@ export default function DetailProvider() { setParentId(realm?.id || ""); reset(data || { providerId }); }, - [] + [], ); const providerName = useWatch({ control, defaultValue: "", name: "name" }); @@ -73,7 +73,7 @@ export default function DetailProvider() { if (component.config) Object.entries(component.config).forEach( ([key, value]) => - (component.config![key] = Array.isArray(value) ? value : [value]) + (component.config![key] = Array.isArray(value) ? value : [value]), ); try { const updatedComponent = { diff --git a/js/apps/admin-ui/src/clients/roles/CreateClientRole.tsx b/js/apps/admin-ui/src/clients/roles/CreateClientRole.tsx index c102170188..3f3fba5817 100644 --- a/js/apps/admin-ui/src/clients/roles/CreateClientRole.tsx +++ b/js/apps/admin-ui/src/clients/roles/CreateClientRole.tsx @@ -46,7 +46,7 @@ export default function CreateClientRole() { clientId: clientId!, id: createdRole.id!, tab: "details", - }) + }), ); } catch (error) { addError("roles:roleCreateError", error); diff --git a/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx b/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx index 7de3abb246..feafb57941 100644 --- a/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx +++ b/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx @@ -28,7 +28,7 @@ export const EditRegistrationProviderRoute: AppRouteObject = { }; export const toRegistrationProvider = ( - params: RegistrationProviderParams + params: RegistrationProviderParams, ): Partial => { const path = params.id ? EditRegistrationProviderRoute.path diff --git a/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx b/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx index 87531cfeba..abb4d5454d 100644 --- a/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx +++ b/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx @@ -30,7 +30,7 @@ export const AuthorizationRoute: AppRouteObject = { }; export const toAuthorizationTab = ( - params: AuthorizationParams + params: AuthorizationParams, ): Partial => ({ pathname: generatePath(AuthorizationRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx b/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx index c1cd0f708e..aed37eea8c 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx @@ -22,7 +22,7 @@ export const ClientRegistrationRoute: AppRouteObject = { }; export const toClientRegistration = ( - params: ClientRegistrationParams + params: ClientRegistrationParams, ): Partial => ({ pathname: generatePath(ClientRegistrationRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx b/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx index f6965248a4..50f100489e 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx @@ -23,7 +23,7 @@ export const ClientScopesRoute: AppRouteObject = { }; export const toClientScopesTab = ( - params: ClientScopesParams + params: ClientScopesParams, ): Partial => ({ pathname: generatePath(ClientScopesRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx b/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx index bef5bd9106..85e8ba2303 100644 --- a/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx +++ b/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx @@ -6,7 +6,7 @@ import type { AppRouteObject } from "../../routes"; export type CreateInitialAccessTokenParams = { realm: string }; const CreateInitialAccessToken = lazy( - () => import("../initial-access/CreateInitialAccessToken") + () => import("../initial-access/CreateInitialAccessToken"), ); export const CreateInitialAccessTokenRoute: AppRouteObject = { @@ -19,7 +19,7 @@ export const CreateInitialAccessTokenRoute: AppRouteObject = { }; export const toCreateInitialAccessToken = ( - params: CreateInitialAccessTokenParams + params: CreateInitialAccessTokenParams, ): Partial => ({ pathname: generatePath(CreateInitialAccessTokenRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx b/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx index 16a0c97d76..4ebfed42b4 100644 --- a/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx @@ -28,7 +28,7 @@ export const DedicatedScopeDetailsWithTabRoute: AppRouteObject = { }; export const toDedicatedScope = ( - params: DedicatedScopeDetailsParams + params: DedicatedScopeDetailsParams, ): Partial => { const path = params.tab ? DedicatedScopeDetailsWithTabRoute.path diff --git a/js/apps/admin-ui/src/clients/routes/Mapper.tsx b/js/apps/admin-ui/src/clients/routes/Mapper.tsx index 99e2bdca0b..85554f669f 100644 --- a/js/apps/admin-ui/src/clients/routes/Mapper.tsx +++ b/js/apps/admin-ui/src/clients/routes/Mapper.tsx @@ -10,7 +10,7 @@ export type MapperParams = { }; const MappingDetails = lazy( - () => import("../../client-scopes/details/MappingDetails") + () => import("../../client-scopes/details/MappingDetails"), ); export const MapperRoute: AppRouteObject = { diff --git a/js/apps/admin-ui/src/clients/routes/NewPermission.tsx b/js/apps/admin-ui/src/clients/routes/NewPermission.tsx index 5bf2288415..7f9d9c7b8d 100644 --- a/js/apps/admin-ui/src/clients/routes/NewPermission.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewPermission.tsx @@ -13,7 +13,7 @@ export type NewPermissionParams = { }; const PermissionDetails = lazy( - () => import("../authorization/PermissionDetails") + () => import("../authorization/PermissionDetails"), ); export const NewPermissionRoute: AppRouteObject = { diff --git a/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx b/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx index 7f883816c4..590e1ab957 100644 --- a/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx @@ -6,7 +6,7 @@ import type { AppRouteObject } from "../../routes"; export type NewPolicyParams = { realm: string; id: string; policyType: string }; const PolicyDetails = lazy( - () => import("../authorization/policy/PolicyDetails") + () => import("../authorization/policy/PolicyDetails"), ); export const NewPolicyRoute: AppRouteObject = { diff --git a/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx b/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx index 255b24e668..a95aefdae2 100644 --- a/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx @@ -12,7 +12,7 @@ export type PermissionDetailsParams = { }; const PermissionDetails = lazy( - () => import("../authorization/PermissionDetails") + () => import("../authorization/PermissionDetails"), ); export const PermissionDetailsRoute: AppRouteObject = { @@ -25,7 +25,7 @@ export const PermissionDetailsRoute: AppRouteObject = { }; export const toPermissionDetails = ( - params: PermissionDetailsParams + params: PermissionDetailsParams, ): Partial => ({ pathname: generatePath(PermissionDetailsRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx b/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx index f36455d032..ee8851c8bd 100644 --- a/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx @@ -11,7 +11,7 @@ export type PolicyDetailsParams = { }; const PolicyDetails = lazy( - () => import("../authorization/policy/PolicyDetails") + () => import("../authorization/policy/PolicyDetails"), ); export const PolicyDetailsRoute: AppRouteObject = { @@ -24,7 +24,7 @@ export const PolicyDetailsRoute: AppRouteObject = { }; export const toPolicyDetails = ( - params: PolicyDetailsParams + params: PolicyDetailsParams, ): Partial => ({ pathname: generatePath(PolicyDetailsRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/Resource.tsx b/js/apps/admin-ui/src/clients/routes/Resource.tsx index c53472353c..c12ec6b5c3 100644 --- a/js/apps/admin-ui/src/clients/routes/Resource.tsx +++ b/js/apps/admin-ui/src/clients/routes/Resource.tsx @@ -26,7 +26,7 @@ export const ResourceDetailsWithResourceIdRoute: AppRouteObject = { }; export const toResourceDetails = ( - params: ResourceDetailsParams + params: ResourceDetailsParams, ): Partial => { const path = params.resourceId ? ResourceDetailsWithResourceIdRoute.path diff --git a/js/apps/admin-ui/src/clients/scopes/AddScopeDialog.tsx b/js/apps/admin-ui/src/clients/scopes/AddScopeDialog.tsx index b814e0b88c..5f686bfc4c 100644 --- a/js/apps/admin-ui/src/clients/scopes/AddScopeDialog.tsx +++ b/js/apps/admin-ui/src/clients/scopes/AddScopeDialog.tsx @@ -37,7 +37,7 @@ export type AddScopeDialogProps = { open: boolean; toggleDialog: () => void; onAdd: ( - scopes: { scope: ClientScopeRepresentation; type?: ClientScopeType }[] + scopes: { scope: ClientScopeRepresentation; type?: ClientScopeType }[], ) => void; isClientScopesConditionType?: boolean; }; diff --git a/js/apps/admin-ui/src/clients/scopes/ClientScopes.tsx b/js/apps/admin-ui/src/clients/scopes/ClientScopes.tsx index 15dbbcf57c..96231f2890 100644 --- a/js/apps/admin-ui/src/clients/scopes/ClientScopes.tsx +++ b/js/apps/admin-ui/src/clients/scopes/ClientScopes.tsx @@ -90,7 +90,7 @@ const TypeSelector = ({ clientId, scope, scope.type, - value as ClientScope + value as ClientScope, ); addAlert(t("clientScopeSuccess"), AlertVariant.success); refresh(); @@ -116,7 +116,7 @@ export const ClientScopes = ({ const [searchType, setSearchType] = useState("name"); const [searchTypeType, setSearchTypeType] = useState( - AllClientScopes.none + AllClientScopes.none, ); const [addDialogOpen, setAddDialogOpen] = useState(false); @@ -170,7 +170,7 @@ export const ClientScopes = ({ setRest( clientScopes .filter((scope) => !names.includes(scope.name)) - .filter((scope) => scope.protocol === protocol) + .filter((scope) => scope.protocol === protocol), ); const filter = @@ -203,7 +203,7 @@ export const ClientScopes = ({ await removeClientScope( clientId, selectedRows[0], - selectedRows[0].type as ClientScope + selectedRows[0].type as ClientScope, ); addAlert(t("clientScopeRemoveSuccess"), AlertVariant.success); refresh(); @@ -226,8 +226,8 @@ export const ClientScopes = ({ await Promise.all( scopes.map( async (scope) => - await addClientScope(clientId, scope.scope, scope.type!) - ) + await addClientScope(clientId, scope.scope, scope.type!), + ), ); addAlert(t("clientScopeSuccess"), AlertVariant.success); refresh(); @@ -299,9 +299,9 @@ export const ClientScopes = ({ removeClientScope( clientId, { ...row }, - row.type as ClientScope - ) - ) + row.type as ClientScope, + ), + ), ); setKebabOpen(false); diff --git a/js/apps/admin-ui/src/clients/scopes/DecicatedScope.tsx b/js/apps/admin-ui/src/clients/scopes/DecicatedScope.tsx index 3da4f83491..cc3e30e1ce 100644 --- a/js/apps/admin-ui/src/clients/scopes/DecicatedScope.tsx +++ b/js/apps/admin-ui/src/clients/scopes/DecicatedScope.tsx @@ -44,7 +44,7 @@ export const DedicatedScope = ({ { id: client.id!, }, - realmRoles + realmRoles, ), ...rows .filter((row) => row.client !== undefined) @@ -54,8 +54,8 @@ export const DedicatedScope = ({ id: client.id!, client: row.client!.id!, }, - [row.role as RoleMappingPayload] - ) + [row.role as RoleMappingPayload], + ), ), ]); diff --git a/js/apps/admin-ui/src/clients/scopes/DedicatedScopes.tsx b/js/apps/admin-ui/src/clients/scopes/DedicatedScopes.tsx index 94727749a2..1b348a8f85 100644 --- a/js/apps/admin-ui/src/clients/scopes/DedicatedScopes.tsx +++ b/js/apps/admin-ui/src/clients/scopes/DedicatedScopes.tsx @@ -51,7 +51,7 @@ export default function DedicatedScopes() { } const addMappers = async ( - mappers: ProtocolMapperTypeRepresentation | ProtocolMapperRepresentation[] + mappers: ProtocolMapperTypeRepresentation | ProtocolMapperRepresentation[], ): Promise => { if (!Array.isArray(mappers)) { const mapper = mappers as ProtocolMapperTypeRepresentation; @@ -60,13 +60,13 @@ export default function DedicatedScopes() { realm, id: client.id!, mapperId: mapper.id!, - }) + }), ); } else { try { await adminClient.clients.addMultipleProtocolMappers( { id: client.id! }, - mappers as ProtocolMapperRepresentation[] + mappers as ProtocolMapperRepresentation[], ); setClient(await adminClient.clients.findOne({ id: client.id! })); addAlert(t("common:mappingCreatedSuccess"), AlertVariant.success); @@ -85,7 +85,7 @@ export default function DedicatedScopes() { setClient({ ...client, protocolMappers: client.protocolMappers?.filter( - (m) => m.id !== mapper.id + (m) => m.id !== mapper.id, ), }); addAlert(t("common:mappingDeletedSuccess"), AlertVariant.success); diff --git a/js/apps/admin-ui/src/clients/scopes/EvaluateScopes.tsx b/js/apps/admin-ui/src/clients/scopes/EvaluateScopes.tsx index 2d56852f69..d10b1d9a50 100644 --- a/js/apps/admin-ui/src/clients/scopes/EvaluateScopes.tsx +++ b/js/apps/admin-ui/src/clients/scopes/EvaluateScopes.tsx @@ -128,7 +128,7 @@ export const EvaluateScopes = ({ clientId, protocol }: EvaluateScopesProps) => { const [key, setKey] = useState(""); const refresh = () => setKey(`${new Date().getTime()}`); const [effectiveRoles, setEffectiveRoles] = useState( - [] + [], ); const [protocolMappers, setProtocolMappers] = useState< ProtocolMapperRepresentation[] @@ -151,7 +151,7 @@ export const EvaluateScopes = ({ clientId, protocol }: EvaluateScopesProps) => { useFetch( () => adminClient.clients.listOptionalClientScopes({ id: clientId }), (optionalClientScopes) => setSelectableScopes(optionalClientScopes), - [] + [], ); useFetch( @@ -180,14 +180,14 @@ export const EvaluateScopes = ({ clientId, protocol }: EvaluateScopesProps) => { setEffectiveRoles(effectiveRoles); mapperList.map((mapper) => { mapper.type = mapperTypes.filter( - (type) => type.id === mapper.protocolMapper + (type) => type.id === mapper.protocolMapper, )[0]; }); setProtocolMappers(mapperList); refresh(); }, - [selected] + [selected], ); useFetch( @@ -219,7 +219,7 @@ export const EvaluateScopes = ({ clientId, protocol }: EvaluateScopesProps) => { setUserInfo(prettyPrintJSON(userInfo)); setIdToken(prettyPrintJSON(idToken)); }, - [form.getValues("user"), selected] + [form.getValues("user"), selected], ); return ( diff --git a/js/apps/admin-ui/src/clients/service-account/ServiceAccount.tsx b/js/apps/admin-ui/src/clients/service-account/ServiceAccount.tsx index a3480bc07f..d81723f664 100644 --- a/js/apps/admin-ui/src/clients/service-account/ServiceAccount.tsx +++ b/js/apps/admin-ui/src/clients/service-account/ServiceAccount.tsx @@ -38,7 +38,7 @@ export const ServiceAccount = ({ client }: ServiceAccountProps) => { id: client.id!, }), (serviceAccount) => setServiceAccount(serviceAccount), - [] + [], ); const assignRoles = async (rows: Row[]) => { @@ -59,8 +59,8 @@ export const ServiceAccount = ({ client }: ServiceAccountProps) => { id: serviceAccount?.id!, clientUniqueId: row.client!.id!, roles: [row.role as RoleMappingPayload], - }) - ) + }), + ), ); addAlert(t("roleMappingUpdatedSuccess"), AlertVariant.success); } catch (error) { diff --git a/js/apps/admin-ui/src/components/SwitchControl.tsx b/js/apps/admin-ui/src/components/SwitchControl.tsx index c9b0cb98da..fa5738729f 100644 --- a/js/apps/admin-ui/src/components/SwitchControl.tsx +++ b/js/apps/admin-ui/src/components/SwitchControl.tsx @@ -5,7 +5,7 @@ import { SwitchControl } from "ui-shared"; type DefaultSwitchControlProps< T extends FieldValues, - P extends FieldPath = FieldPath + P extends FieldPath = FieldPath, > = SwitchProps & UseControllerProps & { name: string; @@ -16,9 +16,9 @@ type DefaultSwitchControlProps< export const DefaultSwitchControl = < T extends FieldValues, - P extends FieldPath = FieldPath + P extends FieldPath = FieldPath, >( - props: DefaultSwitchControlProps + props: DefaultSwitchControlProps, ) => { const { t } = useTranslation("common"); diff --git a/js/apps/admin-ui/src/components/alert/Alerts.tsx b/js/apps/admin-ui/src/components/alert/Alerts.tsx index 57647bcccf..c44101d2fe 100644 --- a/js/apps/admin-ui/src/components/alert/Alerts.tsx +++ b/js/apps/admin-ui/src/components/alert/Alerts.tsx @@ -13,7 +13,7 @@ const ALERT_TIMEOUT = 8000; export type AddAlertFunction = ( message: string, variant?: AlertVariant, - description?: string + description?: string, ) => void; export type AddErrorFunction = (message: string, error: unknown) => void; @@ -25,7 +25,7 @@ export type AlertProps = { export const AlertContext = createNamedContext( "AlertContext", - undefined + undefined, ); export const useAlerts = () => useRequiredContext(AlertContext); @@ -57,7 +57,7 @@ export const AlertProvider = ({ children }: PropsWithChildren) => { setAlerts((alerts) => [alert, ...alerts]); setTimeout(() => removeAlert(alert.id), ALERT_TIMEOUT); }, - [] + [], ); const addError = useCallback((message, error) => { @@ -65,7 +65,7 @@ export const AlertProvider = ({ children }: PropsWithChildren) => { t(message, { error: getErrorMessage(error), }), - AlertVariant.danger + AlertVariant.danger, ); }, []); diff --git a/js/apps/admin-ui/src/components/bread-crumb/GroupBreadCrumbs.tsx b/js/apps/admin-ui/src/components/bread-crumb/GroupBreadCrumbs.tsx index de145dc2d8..f46ebc6aa4 100644 --- a/js/apps/admin-ui/src/components/bread-crumb/GroupBreadCrumbs.tsx +++ b/js/apps/admin-ui/src/components/bread-crumb/GroupBreadCrumbs.tsx @@ -33,7 +33,7 @@ export const GroupBreadCrumbs = () => { remove(group)} > diff --git a/js/apps/admin-ui/src/components/bread-crumb/PageBreadCrumbs.tsx b/js/apps/admin-ui/src/components/bread-crumb/PageBreadCrumbs.tsx index 0b6330bdaf..8317cca0d9 100644 --- a/js/apps/admin-ui/src/components/bread-crumb/PageBreadCrumbs.tsx +++ b/js/apps/admin-ui/src/components/bread-crumb/PageBreadCrumbs.tsx @@ -27,7 +27,7 @@ export const PageBreadCrumbs = () => { disableDefaults: true, excludePaths: ["/", `/${realm}`], }), - elementText + elementText, ); return crumbs.length > 1 ? ( diff --git a/js/apps/admin-ui/src/components/client-scope/ClientScopeTypes.tsx b/js/apps/admin-ui/src/components/client-scope/ClientScopeTypes.tsx index ed9cb8635e..552fd43ed0 100644 --- a/js/apps/admin-ui/src/components/client-scope/ClientScopeTypes.tsx +++ b/js/apps/admin-ui/src/components/client-scope/ClientScopeTypes.tsx @@ -32,7 +32,7 @@ export const allClientScopeTypes = Object.keys({ export const clientScopeTypesSelectOptions = ( t: TFunction, - scopeTypes: string[] | undefined = clientScopeTypes + scopeTypes: string[] | undefined = clientScopeTypes, ) => scopeTypes.map((type) => ( @@ -42,7 +42,7 @@ export const clientScopeTypesSelectOptions = ( export const clientScopeTypesDropdown = ( t: TFunction, - onClick: (scope: ClientScopeType) => void + onClick: (scope: ClientScopeType) => void, ) => clientScopeTypes.map((type) => ( onClick(type as ClientScopeType)}> @@ -76,7 +76,7 @@ export const CellDropdown = ({ selections={[type]} onSelect={(_, value) => { onSelect( - all ? (value as ClientScopeType) : (value as AllClientScopeType) + all ? (value as ClientScopeType) : (value as AllClientScopeType), ); setOpen(false); }} @@ -84,7 +84,7 @@ export const CellDropdown = ({ > {clientScopeTypesSelectOptions( t, - all ? allClientScopeTypes : clientScopeTypes + all ? allClientScopeTypes : clientScopeTypes, )} ); @@ -96,7 +96,7 @@ export type ClientScopeDefaultOptionalType = ClientScopeRepresentation & { export const changeScope = async ( clientScope: ClientScopeDefaultOptionalType, - changeTo: AllClientScopeType + changeTo: AllClientScopeType, ) => { await removeScope(clientScope); await addScope(clientScope, changeTo); @@ -108,7 +108,7 @@ const castAdminClient = () => }; export const removeScope = async ( - clientScope: ClientScopeDefaultOptionalType + clientScope: ClientScopeDefaultOptionalType, ) => { if (clientScope.type !== AllClientScopes.none) await castAdminClient()[ @@ -122,7 +122,7 @@ export const removeScope = async ( const addScope = async ( clientScope: ClientScopeDefaultOptionalType, - type: AllClientScopeType + type: AllClientScopeType, ) => { if (type !== AllClientScopes.none) await castAdminClient()[ @@ -136,7 +136,7 @@ export const changeClientScope = async ( clientId: string, clientScope: ClientScopeRepresentation, type: AllClientScopeType, - changeTo: ClientScopeType + changeTo: ClientScopeType, ) => { if (type !== "none") { await removeClientScope(clientId, clientScope, type); @@ -147,7 +147,7 @@ export const changeClientScope = async ( export const removeClientScope = async ( clientId: string, clientScope: ClientScopeRepresentation, - type: ClientScope + type: ClientScope, ) => { const methodName = `del${toUpperCase(type)}ClientScope` as const; @@ -160,7 +160,7 @@ export const removeClientScope = async ( export const addClientScope = async ( clientId: string, clientScope: ClientScopeRepresentation, - type: ClientScopeType + type: ClientScopeType, ) => { const methodName = `add${toUpperCase(type)}ClientScope` as const; diff --git a/js/apps/admin-ui/src/components/client/ClientSelect.tsx b/js/apps/admin-ui/src/components/client/ClientSelect.tsx index fa00abb713..c27ea505ab 100644 --- a/js/apps/admin-ui/src/components/client/ClientSelect.tsx +++ b/js/apps/admin-ui/src/components/client/ClientSelect.tsx @@ -51,7 +51,7 @@ export const ClientSelect = ({ return adminClient.clients.find(params); }, (clients) => setClients(clients), - [search] + [search], ); const convert = (clients: ClientRepresentation[]) => [ diff --git a/js/apps/admin-ui/src/components/confirm-dialog/ConfirmDialog.tsx b/js/apps/admin-ui/src/components/confirm-dialog/ConfirmDialog.tsx index 0bce2f47b7..e574267ab1 100644 --- a/js/apps/admin-ui/src/components/confirm-dialog/ConfirmDialog.tsx +++ b/js/apps/admin-ui/src/components/confirm-dialog/ConfirmDialog.tsx @@ -8,7 +8,7 @@ import { import { useTranslation } from "react-i18next"; export const useConfirmDialog = ( - props: ConfirmDialogProps + props: ConfirmDialogProps, ): [() => void, () => ReactElement] => { const [show, setShow] = useState(false); diff --git a/js/apps/admin-ui/src/components/download-dialog/DownloadDialog.tsx b/js/apps/admin-ui/src/components/download-dialog/DownloadDialog.tsx index 3e3a62d960..e2b5b32ed3 100644 --- a/js/apps/admin-ui/src/components/download-dialog/DownloadDialog.tsx +++ b/js/apps/admin-ui/src/components/download-dialog/DownloadDialog.tsx @@ -42,20 +42,20 @@ export const DownloadDialog = ({ const configFormats = serverInfo.clientInstallations![protocol]; const [selected, setSelected] = useState( - configFormats[configFormats.length - 1].id + configFormats[configFormats.length - 1].id, ); const [snippet, setSnippet] = useState(); const [openType, setOpenType] = useState(false); const selectedConfig = useMemo( () => configFormats.find((config) => config.id === selected) ?? null, - [selected] + [selected], ); const sanitizeSnippet = (snippet: string) => snippet.replace( /.*<\/PrivateKeyPem>/gs, - `${t("clients:privateKeyMask")}` + `${t("clients:privateKeyMask")}`, ); useFetch( @@ -63,14 +63,14 @@ export const DownloadDialog = ({ if (selectedConfig?.mediaType === "application/zip") { const response = await fetch( `${addTrailingSlash( - adminClient.baseUrl + adminClient.baseUrl, )}admin/realms/${realm}/clients/${id}/installation/providers/${selected}`, { method: "GET", headers: getAuthorizationHeaders( - await adminClient.getAccessToken() + await adminClient.getAccessToken(), ), - } + }, ); return response.arrayBuffer(); @@ -87,7 +87,7 @@ export const DownloadDialog = ({ } }, (snippet) => setSnippet(snippet), - [id, selected] + [id, selected], ); // Clear snippet when selected config changes, this prevents old snippets from being displayed during fetch. @@ -100,7 +100,7 @@ export const DownloadDialog = ({ onConfirm={() => { saveAs( new Blob([snippet!], { type: selectedConfig?.mediaType }), - selectedConfig?.filename + selectedConfig?.filename, ); }} open={open} diff --git a/js/apps/admin-ui/src/components/dynamic/MultivaluedListComponent.tsx b/js/apps/admin-ui/src/components/dynamic/MultivaluedListComponent.tsx index f692fc20e3..8574d746ad 100644 --- a/js/apps/admin-ui/src/components/dynamic/MultivaluedListComponent.tsx +++ b/js/apps/admin-ui/src/components/dynamic/MultivaluedListComponent.tsx @@ -54,7 +54,7 @@ export const MultiValuedListComponent = ({ const option = v.toString(); if (field.value.includes(option)) { field.onChange( - field.value.filter((item: string) => item !== option) + field.value.filter((item: string) => item !== option), ); } else { field.onChange([...field.value, option]); diff --git a/js/apps/admin-ui/src/components/form/FormAccess.tsx b/js/apps/admin-ui/src/components/form/FormAccess.tsx index 03b28075b5..2cf5b2c61f 100644 --- a/js/apps/admin-ui/src/components/form/FormAccess.tsx +++ b/js/apps/admin-ui/src/components/form/FormAccess.tsx @@ -64,7 +64,7 @@ export const FormAccess = ({ const recursiveCloneChildren = ( children: ReactNode, - newProps: any + newProps: any, ): ReactNode => { return Children.map(children, (child) => { if (!isValidElement(child)) { @@ -87,7 +87,7 @@ export const FormAccess = ({ } const children = recursiveCloneChildren( element.props.children, - newProps + newProps, ); if (child.type === TextArea) { return cloneElement(child, { @@ -106,7 +106,7 @@ export const FormAccess = ({ child.type === Stack || child.type === StackItem ? { children } - : { ...newProps, children } + : { ...newProps, children }, ); } return child; diff --git a/js/apps/admin-ui/src/components/group/GroupPickerDialog.tsx b/js/apps/admin-ui/src/components/group/GroupPickerDialog.tsx index edfe42210b..5b9e9f9693 100644 --- a/js/apps/admin-ui/src/components/group/GroupPickerDialog.tsx +++ b/js/apps/admin-ui/src/components/group/GroupPickerDialog.tsx @@ -80,8 +80,8 @@ export const GroupPickerDialog = ({ first: `${first}`, max: `${max + 1}`, }, - isSearching ? null : { search: filter } - ) + isSearching ? null : { search: filter }, + ), ); } else if (!navigation.map(({ id }) => id).includes(groupId)) { group = await adminClient.groups.findOne({ id: groupId }); @@ -118,7 +118,7 @@ export const GroupPickerDialog = ({ } setCount(count); }, - [groupId, filter, first, max] + [groupId, filter, first, max], ); const isRowDisabled = (row?: GroupRepresentation) => { @@ -149,7 +149,7 @@ export const GroupPickerDialog = ({ ? selectedRows : navigation.length ? [currentGroup()] - : undefined + : undefined, ); }} isDisabled={type === "selectMany" && selectedRows.length === 0} diff --git a/js/apps/admin-ui/src/components/json-file-upload/patternfly/FileUpload.tsx b/js/apps/admin-ui/src/components/json-file-upload/patternfly/FileUpload.tsx index 75d6d9cd58..c61ef49fe4 100644 --- a/js/apps/admin-ui/src/components/json-file-upload/patternfly/FileUpload.tsx +++ b/js/apps/admin-ui/src/components/json-file-upload/patternfly/FileUpload.tsx @@ -37,7 +37,7 @@ export interface FileUploadProps event: | React.MouseEvent // Clear button was clicked | React.ChangeEvent // User typed in the TextArea - | DropEvent + | DropEvent, ) => void; /** Change event emitted from the hidden \ field associated with the component */ onFileInputChange?: (event: DropEvent, file: File) => void; @@ -154,7 +154,7 @@ export const FileUpload = ({ }; const onClearButtonClick = ( - event: React.MouseEvent + event: React.MouseEvent, ) => { onChange?.("", "", event); onClearClick?.(event); diff --git a/js/apps/admin-ui/src/components/json-file-upload/patternfly/FileUploadField.tsx b/js/apps/admin-ui/src/components/json-file-upload/patternfly/FileUploadField.tsx index 164da7dd1c..04a596015f 100644 --- a/js/apps/admin-ui/src/components/json-file-upload/patternfly/FileUploadField.tsx +++ b/js/apps/admin-ui/src/components/json-file-upload/patternfly/FileUploadField.tsx @@ -32,7 +32,7 @@ export interface FileUploadFieldProps filename: string, event: | React.ChangeEvent // User typed in the TextArea - | React.MouseEvent // User clicked Clear button + | React.MouseEvent, // User clicked Clear button ) => void; /** Additional classes added to the FileUploadField container element. */ className?: string; @@ -75,15 +75,15 @@ export interface FileUploadFieldProps /** A callback for when the Browse button is clicked. */ onBrowseButtonClick?: ( - event: React.MouseEvent + event: React.MouseEvent, ) => void; /** A callback for when the Clear button is clicked. */ onClearButtonClick?: ( - event: React.MouseEvent + event: React.MouseEvent, ) => void; /** A callback from when the text area is clicked. Can also be set via the onClick property of FileUpload. */ onTextAreaClick?: ( - event: React.MouseEvent + event: React.MouseEvent, ) => void; /** Flag to show if a file is being dragged over the field */ isDragActive?: boolean; @@ -126,7 +126,7 @@ export const FileUploadField = ({ }: PropsWithChildren) => { const onTextAreaChange = ( newValue: string, - event: React.ChangeEvent + event: React.ChangeEvent, ) => { onChange?.(newValue, filename, event); onTextChange?.(newValue); @@ -137,7 +137,7 @@ export const FileUploadField = ({ styles.fileUpload, isDragActive && styles.modifiers.dragHover, isLoading && styles.modifiers.loading, - className + className, )} ref={containerRef} {...props} diff --git a/js/apps/admin-ui/src/components/key-value-form/KeySelect.tsx b/js/apps/admin-ui/src/components/key-value-form/KeySelect.tsx index 6edf8ee12a..6d2eb66767 100644 --- a/js/apps/admin-ui/src/components/key-value-form/KeySelect.tsx +++ b/js/apps/admin-ui/src/components/key-value-form/KeySelect.tsx @@ -15,7 +15,7 @@ export const KeySelect = ({ selectItems, ...rest }: KeySelectProp) => { const [open, toggle] = useToggle(); const { field } = useController(rest); const [custom, setCustom] = useState( - !selectItems.map(({ key }) => key).includes(field.value) + !selectItems.map(({ key }) => key).includes(field.value), ); return ( diff --git a/js/apps/admin-ui/src/components/key-value-form/ValueSelect.tsx b/js/apps/admin-ui/src/components/key-value-form/ValueSelect.tsx index 5efd270a00..8c753f5933 100644 --- a/js/apps/admin-ui/src/components/key-value-form/ValueSelect.tsx +++ b/js/apps/admin-ui/src/components/key-value-form/ValueSelect.tsx @@ -22,7 +22,7 @@ export const ValueSelect = ({ const defaultItem = useMemo( () => selectItems.find((v) => v.key === keyValue), - [selectItems, keyValue] + [selectItems, keyValue], ); return defaultItem?.values ? ( diff --git a/js/apps/admin-ui/src/components/key-value-form/key-value-convert.ts b/js/apps/admin-ui/src/components/key-value-form/key-value-convert.ts index ef0181fd79..45f0653756 100644 --- a/js/apps/admin-ui/src/components/key-value-form/key-value-convert.ts +++ b/js/apps/admin-ui/src/components/key-value-form/key-value-convert.ts @@ -19,7 +19,7 @@ export function keyValueToArray(attributeArray: KeyValueType[] = []) { export function arrayToKeyValue(attributes: Record = {}) { const result = Object.entries(attributes).flatMap(([key, value]) => - value.map((value) => ({ key, value })) + value.map((value) => ({ key, value })), ); return result as PathValue>; diff --git a/js/apps/admin-ui/src/components/password-input/PasswordInput.tsx b/js/apps/admin-ui/src/components/password-input/PasswordInput.tsx index 57010e5f71..c750556772 100644 --- a/js/apps/admin-ui/src/components/password-input/PasswordInput.tsx +++ b/js/apps/admin-ui/src/components/password-input/PasswordInput.tsx @@ -42,6 +42,6 @@ const PasswordInputBase = ({ export const PasswordInput = forwardRef( (props: PasswordInputProps, ref: Ref) => ( } /> - ) + ), ); PasswordInput.displayName = "PasswordInput"; diff --git a/js/apps/admin-ui/src/components/permission-tab/PermissionTab.tsx b/js/apps/admin-ui/src/components/permission-tab/PermissionTab.tsx index 56162050fe..35d3c00752 100644 --- a/js/apps/admin-ui/src/components/permission-tab/PermissionTab.tsx +++ b/js/apps/admin-ui/src/components/permission-tab/PermissionTab.tsx @@ -57,7 +57,7 @@ export const PermissionsTab = ({ id, type }: PermissionsTabProps) => { case "clients": return adminClient.clients.updateFineGrainPermission( { id: id! }, - { enabled } + { enabled }, ); case "users": return adminClient.realms.updateUsersManagementPermissions({ @@ -71,7 +71,7 @@ export const PermissionsTab = ({ id, type }: PermissionsTabProps) => { case "identityProviders": return adminClient.identityProviders.updatePermission( { alias: id! }, - { enabled } + { enabled }, ); } }; @@ -106,7 +106,7 @@ export const PermissionsTab = ({ id, type }: PermissionsTabProps) => { setRealmId(clients[0]?.id!); setPermission(permission); }, - [id] + [id], ); const [toggleDisableDialog, DisableConfirm] = useConfirmDialog({ @@ -197,7 +197,7 @@ export const PermissionsTab = ({ id, type }: PermissionsTabProps) => { {localeSort( Object.entries(permission.scopePermissions || {}), - ([name]) => name + ([name]) => name, ).map(([name, id]) => ( @@ -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} - ) + ), )} ) : null} - ) + ), )} diff --git a/js/apps/admin-ui/src/events/AdminEvents.tsx b/js/apps/admin-ui/src/events/AdminEvents.tsx index 037160b546..1174af99a3 100644 --- a/js/apps/admin-ui/src/events/AdminEvents.tsx +++ b/js/apps/admin-ui/src/events/AdminEvents.tsx @@ -166,7 +166,7 @@ export const AdminEvents = () => { function removeFilterValue( key: keyof AdminEventSearchForm, - valueToRemove: string + valueToRemove: string, ) { const formValues = getValues(); const fieldValue = formValues[key]; @@ -181,7 +181,7 @@ export const AdminEvents = () => { function commitFilters() { const newFilters: Partial = pickBy( getValues(), - (value) => value !== "" || (Array.isArray(value) && value.length > 0) + (value) => value !== "" || (Array.isArray(value) && value.length > 0), ); setActiveFilters(newFilters); @@ -263,7 +263,7 @@ export const AdminEvents = () => { onClick={(resource) => { resource.stopPropagation(); field.onChange( - field.value.filter((val) => val !== chip) + field.value.filter((val) => val !== chip), ); }} > @@ -324,7 +324,7 @@ export const AdminEvents = () => { onClick={(operation) => { operation.stopPropagation(); field.onChange( - field.value.filter((val) => val !== chip) + field.value.filter((val) => val !== chip), ); }} > @@ -465,7 +465,7 @@ export const AdminEvents = () => { {Object.entries(activeFilters).map((filter) => { const [key, value] = filter as [ keyof AdminEventSearchForm, - string | string[] + string | string[], ]; return ( @@ -510,7 +510,7 @@ export const AdminEvents = () => { representationEvent?.representation ? prettyPrintJSON(JSON.parse(representationEvent.representation)) : "", - [representationEvent?.representation] + [representationEvent?.representation], ); return ( diff --git a/js/apps/admin-ui/src/events/EventsSection.tsx b/js/apps/admin-ui/src/events/EventsSection.tsx index 424235eb58..5e912d6bcf 100644 --- a/js/apps/admin-ui/src/events/EventsSection.tsx +++ b/js/apps/admin-ui/src/events/EventsSection.tsx @@ -161,7 +161,7 @@ export default function EventsSection() { useFetch( () => adminClient.realms.getConfigEvents({ realm }), (events) => setEvents(events), - [] + [], ); function loader(first?: number, max?: number) { @@ -199,7 +199,7 @@ export default function EventsSection() { function removeFilterValue( key: keyof UserEventSearchForm, - valueToRemove: EventType + valueToRemove: EventType, ) { const formValues = getValues(); const fieldValue = formValues[key]; @@ -214,7 +214,7 @@ export default function EventsSection() { function commitFilters() { const newFilters: Partial = pickBy( getValues(), - (value) => value !== "" || (Array.isArray(value) && value.length > 0) + (value) => value !== "" || (Array.isArray(value) && value.length > 0), ); setActiveFilters(newFilters); @@ -308,7 +308,7 @@ export default function EventsSection() { onClick={(event) => { event.stopPropagation(); field.onChange( - field.value.filter((val) => val !== chip) + field.value.filter((val) => val !== chip), ); }} > @@ -418,7 +418,7 @@ export default function EventsSection() { {Object.entries(activeFilters).map((filter) => { const [key, value] = filter as [ keyof UserEventSearchForm, - string | EventType[] + string | EventType[], ]; return ( diff --git a/js/apps/admin-ui/src/events/ResourceLinks.tsx b/js/apps/admin-ui/src/events/ResourceLinks.tsx index 5c903c0c3b..75147751f5 100644 --- a/js/apps/admin-ui/src/events/ResourceLinks.tsx +++ b/js/apps/admin-ui/src/events/ResourceLinks.tsx @@ -50,7 +50,7 @@ const isLinkable = (event: AdminEventRepresentation) => { }; const idRegex = new RegExp( - /([0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12})/ + /([0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12})/, ); const createLink = (realm: string, event: AdminEventRepresentation) => { @@ -114,5 +114,5 @@ export const ResourceLink = ({ event }: ResourceLinkProps) => { }; export const CellResourceLinkRenderer = ( - adminEvent: AdminEventRepresentation + adminEvent: AdminEventRepresentation, ) => ; diff --git a/js/apps/admin-ui/src/groups/GroupRoleMapping.tsx b/js/apps/admin-ui/src/groups/GroupRoleMapping.tsx index 551b9ac147..034ffbc700 100644 --- a/js/apps/admin-ui/src/groups/GroupRoleMapping.tsx +++ b/js/apps/admin-ui/src/groups/GroupRoleMapping.tsx @@ -33,8 +33,8 @@ export const GroupRoleMapping = ({ id, name }: GroupRoleMappingProps) => { id, clientUniqueId: row.client!.id!, roles: [row.role as RoleMappingPayload], - }) - ) + }), + ), ); addAlert(t("roleMappingUpdatedSuccess"), AlertVariant.success); } catch (error) { diff --git a/js/apps/admin-ui/src/groups/GroupTable.tsx b/js/apps/admin-ui/src/groups/GroupTable.tsx index c6e3cc3346..e600f34e1e 100644 --- a/js/apps/admin-ui/src/groups/GroupTable.tsx +++ b/js/apps/admin-ui/src/groups/GroupTable.tsx @@ -221,7 +221,7 @@ export const GroupTable = ({ hasIcon={true} message={t(`noGroupsInThis${id ? "SubGroup" : "Realm"}`)} instructions={t( - `noGroupsInThis${id ? "SubGroup" : "Realm"}Instructions` + `noGroupsInThis${id ? "SubGroup" : "Realm"}Instructions`, )} primaryActionText={t("createGroup")} onPrimaryAction={toggleCreateOpen} diff --git a/js/apps/admin-ui/src/groups/GroupsModal.tsx b/js/apps/admin-ui/src/groups/GroupsModal.tsx index 55bde6f554..d4bf11e589 100644 --- a/js/apps/admin-ui/src/groups/GroupsModal.tsx +++ b/js/apps/admin-ui/src/groups/GroupsModal.tsx @@ -48,7 +48,7 @@ export const GroupsModal = ({ } else if (rename) { await adminClient.groups.update( { id }, - { ...rename, name: group.name } + { ...rename, name: group.name }, ); } else { await (group.id @@ -60,7 +60,7 @@ export const GroupsModal = ({ handleModalToggle(); addAlert( t(rename ? "groupUpdated" : "groupCreated"), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError("groups:couldNotCreateGroup", error); diff --git a/js/apps/admin-ui/src/groups/GroupsSection.tsx b/js/apps/admin-ui/src/groups/GroupsSection.tsx index 2767304ec2..19b35ec329 100644 --- a/js/apps/admin-ui/src/groups/GroupsSection.tsx +++ b/js/apps/admin-ui/src/groups/GroupsSection.tsx @@ -97,7 +97,7 @@ export default function GroupsSection() { (groups: GroupRepresentation[]) => { if (groups.length) setSubGroups(groups); }, - [id] + [id], ); return ( diff --git a/js/apps/admin-ui/src/groups/Members.tsx b/js/apps/admin-ui/src/groups/Members.tsx index 947484bebd..1d8d1bd8d6 100644 --- a/js/apps/admin-ui/src/groups/Members.tsx +++ b/js/apps/admin-ui/src/groups/Members.tsx @@ -99,14 +99,14 @@ export const Members = () => { const subGroups = getSubGroups(currentGroup()?.subGroups!); for (const group of subGroups) { members = members.concat( - await adminClient.groups.listMembers({ id: group.id! }) + await adminClient.groups.listMembers({ id: group.id! }), ); } members = uniqBy(members, (member) => member.username); } const memberOfPromises = await Promise.all( - members.map((member) => getMembership(member.id!)) + members.map((member) => getMembership(member.id!)), ); return members.map((member: UserRepresentation, i) => { return { ...member, membership: memberOfPromises[i] }; @@ -174,13 +174,13 @@ export const Members = () => { adminClient.users.delFromGroup({ id: user.id!, groupId: id!, - }) - ) + }), + ), ); setIsKebabOpen(false); addAlert( t("usersLeft", { count: selectedRows.length }), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError("groups:usersLeftError", error); @@ -210,7 +210,7 @@ export const Members = () => { }); addAlert( t("usersLeft", { count: 1 }), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError("groups:usersLeftError", error); diff --git a/js/apps/admin-ui/src/groups/MembersModal.tsx b/js/apps/admin-ui/src/groups/MembersModal.tsx index 767f43463c..517255fb1f 100644 --- a/js/apps/admin-ui/src/groups/MembersModal.tsx +++ b/js/apps/admin-ui/src/groups/MembersModal.tsx @@ -57,13 +57,13 @@ export const MemberModal = ({ groupId, onClose }: MemberModalProps) => { try { await Promise.all( selectedRows.map((user) => - adminClient.users.addToGroup({ id: user.id!, groupId }) - ) + adminClient.users.addToGroup({ id: user.id!, groupId }), + ), ); onClose(); addAlert( t("usersAdded", { count: selectedRows.length }), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError("groups:usersAddedError", error); diff --git a/js/apps/admin-ui/src/groups/SubGroupsContext.tsx b/js/apps/admin-ui/src/groups/SubGroupsContext.tsx index fe023155cc..b1b35fd243 100644 --- a/js/apps/admin-ui/src/groups/SubGroupsContext.tsx +++ b/js/apps/admin-ui/src/groups/SubGroupsContext.tsx @@ -12,7 +12,7 @@ type SubGroupsProps = { const SubGroupsContext = createNamedContext( "SubGroupsContext", - undefined + undefined, ); export const SubGroups = ({ children }: PropsWithChildren) => { @@ -21,7 +21,7 @@ export const SubGroups = ({ children }: PropsWithChildren) => { const clear = () => setSubGroups([]); const remove = (group: GroupRepresentation) => setSubGroups( - subGroups.slice(0, subGroups.findIndex((g) => g.id === group.id) + 1) + subGroups.slice(0, subGroups.findIndex((g) => g.id === group.id) + 1), ); const currentGroup = () => subGroups[subGroups.length - 1]; return ( diff --git a/js/apps/admin-ui/src/groups/components/CheckableTreeView.tsx b/js/apps/admin-ui/src/groups/components/CheckableTreeView.tsx index 6d68bf5d47..3e0b401d02 100644 --- a/js/apps/admin-ui/src/groups/components/CheckableTreeView.tsx +++ b/js/apps/admin-ui/src/groups/components/CheckableTreeView.tsx @@ -45,11 +45,11 @@ export const CheckableTreeView = ({ checkedItems: checked ? prevState.checkedItems.concat( flatCheckedItems.filter( - (item) => !prevState.checkedItems.some((i) => i.id === item.id) - ) + (item) => !prevState.checkedItems.some((i) => i.id === item.id), + ), ) : prevState.checkedItems.filter( - (item) => !flatCheckedItems.some((i) => i.id === item.id) + (item) => !flatCheckedItems.some((i) => i.id === item.id), ), }; }); diff --git a/js/apps/admin-ui/src/groups/components/GroupTree.tsx b/js/apps/admin-ui/src/groups/components/GroupTree.tsx index 37d6557d76..1e1fe28b60 100644 --- a/js/apps/admin-ui/src/groups/components/GroupTree.tsx +++ b/js/apps/admin-ui/src/groups/components/GroupTree.tsx @@ -139,7 +139,7 @@ export const GroupTree = ({ const mapGroup = ( group: GroupRepresentation, parents: GroupRepresentation[], - refresh: () => void + refresh: () => void, ): TreeViewDataItem => { const groups = [...parents, group]; return { @@ -170,8 +170,8 @@ export const GroupTree = ({ max: `${max + 1}`, exact: `${exact}`, }, - search === "" ? null : { search } - ) + search === "" ? null : { search }, + ), ); const count = (await adminClient.groups.count({ search, top: true })) .count; @@ -182,14 +182,14 @@ export const GroupTree = ({ setData(groups.map((g) => mapGroup(g, [], refresh))); setCount(count); }, - [key, first, max, search, exact] + [key, first, max, search, exact], ); const findGroup = ( groups: GroupRepresentation[], id: string, path: GroupRepresentation[], - found: GroupRepresentation[] + found: GroupRepresentation[], ) => { return groups.map((group) => { if (found.length > 0) return; diff --git a/js/apps/admin-ui/src/groups/components/MoveDialog.tsx b/js/apps/admin-ui/src/groups/components/MoveDialog.tsx index ef927c0686..4aaa9fb6c2 100644 --- a/js/apps/admin-ui/src/groups/components/MoveDialog.tsx +++ b/js/apps/admin-ui/src/groups/components/MoveDialog.tsx @@ -18,7 +18,7 @@ const moveToRoot = (source: GroupRepresentation) => const moveToGroup = async ( source: GroupRepresentation, - dest: GroupRepresentation + dest: GroupRepresentation, ) => adminClient.groups.updateChildGroup({ id: dest.id! }, source); export const MoveDialog = ({ source, onClose, refresh }: MoveDialogProps) => { diff --git a/js/apps/admin-ui/src/i18n/OverridesBackend.ts b/js/apps/admin-ui/src/i18n/OverridesBackend.ts index 7a28873a82..4fac8e0688 100644 --- a/js/apps/admin-ui/src/i18n/OverridesBackend.ts +++ b/js/apps/admin-ui/src/i18n/OverridesBackend.ts @@ -14,7 +14,7 @@ export class OverridesBackend extends HttpBackend { url: string, callback: ReadCallback, languages?: string | string[], - namespaces?: string | string[] + namespaces?: string | string[], ) { try { const [data, overrides] = await Promise.all([ @@ -38,7 +38,7 @@ export class OverridesBackend extends HttpBackend { #applyOverrides( namespace: string, data: ResourceKey, - overrides: ParsedOverrides + overrides: ParsedOverrides, ) { // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (typeof data === "string" || !overrides[namespace]) { @@ -135,7 +135,7 @@ export class OverridesBackend extends HttpBackend { #loadUrlPromisified( url: string, languages?: string | string[], - namespaces?: string | string[] + namespaces?: string | string[], ) { return new Promise((resolve, reject) => { const callback: ReadCallback = (error, data) => { @@ -147,8 +147,8 @@ export class OverridesBackend extends HttpBackend { return reject( new Error( "Unable to load URL, data returned is of an unsupported type.", - { cause: error } - ) + { cause: error }, + ), ); } diff --git a/js/apps/admin-ui/src/identity-providers/IdentityProvidersSection.tsx b/js/apps/admin-ui/src/identity-providers/IdentityProvidersSection.tsx index c879175c0d..245d5b674c 100644 --- a/js/apps/admin-ui/src/identity-providers/IdentityProvidersSection.tsx +++ b/js/apps/admin-ui/src/identity-providers/IdentityProvidersSection.tsx @@ -75,7 +75,7 @@ export default function IdentityProvidersSection() { const { t } = useTranslation("identity-providers"); const identityProviders = groupBy( useServerInfo().identityProviders, - "groupName" + "groupName", ); const { realm } = useRealm(); const navigate = useNavigate(); @@ -101,7 +101,7 @@ export default function IdentityProvidersSection() { (providers) => { setProviders(sortBy(providers, ["config.guiOrder", "alias"])); }, - [key] + [key], ); const navigateToCreate = (providerId: string) => @@ -109,7 +109,7 @@ export default function IdentityProvidersSection() { toIdentityProviderCreate({ realm, providerId, - }) + }), ); const identityProviderOptions = () => diff --git a/js/apps/admin-ui/src/identity-providers/ManageOrderDialog.tsx b/js/apps/admin-ui/src/identity-providers/ManageOrderDialog.tsx index 2631402211..173549bc76 100644 --- a/js/apps/admin-ui/src/identity-providers/ManageOrderDialog.tsx +++ b/js/apps/admin-ui/src/identity-providers/ManageOrderDialog.tsx @@ -36,7 +36,7 @@ export const ManageOrderDialog = ({ const [alias, setAlias] = useState(""); const [liveText, setLiveText] = useState(""); const [order, setOrder] = useState( - providers.map((provider) => provider.alias!) + providers.map((provider) => provider.alias!), ); const onDragStart = (id: string) => { diff --git a/js/apps/admin-ui/src/identity-providers/add/AddIdentityProvider.tsx b/js/apps/admin-ui/src/identity-providers/add/AddIdentityProvider.tsx index 94c0d0df41..632113a7d0 100644 --- a/js/apps/admin-ui/src/identity-providers/add/AddIdentityProvider.tsx +++ b/js/apps/admin-ui/src/identity-providers/add/AddIdentityProvider.tsx @@ -37,7 +37,7 @@ export default function AddIdentityProvider() { for (const namespace of namespaces) { const social = serverInfo.componentTypes?.[namespace]?.find( - ({ id }) => id === providerId + ({ id }) => id === providerId, ); if (social) { @@ -69,7 +69,7 @@ export default function AddIdentityProvider() { providerId, alias: providerId, tab: "settings", - }) + }), ); } catch (error) { addError("identity-providers:createError", error); diff --git a/js/apps/admin-ui/src/identity-providers/add/AddMapper.tsx b/js/apps/admin-ui/src/identity-providers/add/AddMapper.tsx index eefddb5e8f..05d06ae7e3 100644 --- a/js/apps/admin-ui/src/identity-providers/add/AddMapper.tsx +++ b/js/apps/admin-ui/src/identity-providers/add/AddMapper.tsx @@ -88,7 +88,7 @@ export default function AddMapper() { id: id!, alias: alias!, }, - { ...identityProviderMapper } + { ...identityProviderMapper }, ); addAlert(t("mapperSaveSuccess"), AlertVariant.success); } catch (error) { @@ -108,7 +108,7 @@ export default function AddMapper() { alias, providerId: providerId, id: createdMapper.id, - }) + }), ); } catch (error) { addError(t("mapperCreateError"), error); @@ -131,7 +131,7 @@ export default function AddMapper() { }); addAlert(t("deleteMapperSuccess"), AlertVariant.success); navigate( - toIdentityProvider({ providerId, alias, tab: "mappers", realm }) + toIdentityProvider({ providerId, alias, tab: "mappers", realm }), ); } catch (error) { addError("identity-providers:deleteErrorError", error); @@ -149,7 +149,7 @@ export default function AddMapper() { const mappers = localeSort(Object.values(mapperTypes), mapByKey("name")); if (mapper) { setCurrentMapper( - mappers.find(({ id }) => id === mapper.identityProviderMapper) + mappers.find(({ id }) => id === mapper.identityProviderMapper), ); setupForm(mapper); } else { @@ -158,7 +158,7 @@ export default function AddMapper() { setMapperTypes(mappers); }, - [] + [], ); const setupForm = (mapper: IdentityProviderMapperRepresentation) => { diff --git a/js/apps/admin-ui/src/identity-providers/add/AddMapperForm.tsx b/js/apps/admin-ui/src/identity-providers/add/AddMapperForm.tsx index f41a86bb2b..387a14a39b 100644 --- a/js/apps/admin-ui/src/identity-providers/add/AddMapperForm.tsx +++ b/js/apps/admin-ui/src/identity-providers/add/AddMapperForm.tsx @@ -20,7 +20,7 @@ type AddMapperFormProps = { mapperType: IdentityProviderMapperTypeRepresentation; id: string; updateMapperType: ( - mapperType: IdentityProviderMapperTypeRepresentation + mapperType: IdentityProviderMapperTypeRepresentation, ) => void; form: UseFormReturn; }; diff --git a/js/apps/admin-ui/src/identity-providers/add/AddOpenIdConnect.tsx b/js/apps/admin-ui/src/identity-providers/add/AddOpenIdConnect.tsx index 38eab9f671..faaefdd413 100644 --- a/js/apps/admin-ui/src/identity-providers/add/AddOpenIdConnect.tsx +++ b/js/apps/admin-ui/src/identity-providers/add/AddOpenIdConnect.tsx @@ -56,7 +56,7 @@ export default function AddOpenIdConnect() { providerId: id, alias: provider.alias!, tab: "settings", - }) + }), ); } catch (error) { addError("identity-providers:createError", error); @@ -67,7 +67,7 @@ export default function AddOpenIdConnect() { <> diff --git a/js/apps/admin-ui/src/identity-providers/add/AddSamlConnect.tsx b/js/apps/admin-ui/src/identity-providers/add/AddSamlConnect.tsx index 64fd95168d..999d835ccd 100644 --- a/js/apps/admin-ui/src/identity-providers/add/AddSamlConnect.tsx +++ b/js/apps/admin-ui/src/identity-providers/add/AddSamlConnect.tsx @@ -53,7 +53,7 @@ export default function AddSamlConnect() { providerId: id, alias: provider.alias!, tab: "settings", - }) + }), ); } catch (error: any) { addError("identity-providers:createError", error); diff --git a/js/apps/admin-ui/src/identity-providers/add/AdvancedSettings.tsx b/js/apps/admin-ui/src/identity-providers/add/AdvancedSettings.tsx index a0d010eac4..9dce00dc48 100644 --- a/js/apps/admin-ui/src/identity-providers/add/AdvancedSettings.tsx +++ b/js/apps/admin-ui/src/identity-providers/add/AdvancedSettings.tsx @@ -36,7 +36,7 @@ const LoginFlow = ({ () => adminClient.authenticationManagement.getFlows(), (flows) => setFlows(flows.filter((flow) => flow.providerId === "basic-flow")), - [] + [], ); return ( diff --git a/js/apps/admin-ui/src/identity-providers/add/DescriptorSettings.tsx b/js/apps/admin-ui/src/identity-providers/add/DescriptorSettings.tsx index 1845ce6b04..5be7a94ef6 100644 --- a/js/apps/admin-ui/src/identity-providers/add/DescriptorSettings.tsx +++ b/js/apps/admin-ui/src/identity-providers/add/DescriptorSettings.tsx @@ -525,7 +525,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => { onMinus={() => field.onChange(v - 1)} onChange={(event) => { const value = Number( - (event.target as HTMLInputElement).value + (event.target as HTMLInputElement).value, ); field.onChange(value < 0 ? 0 : value); }} @@ -564,7 +564,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => { onMinus={() => field.onChange(v - 1)} onChange={(event) => { const value = Number( - (event.target as HTMLInputElement).value + (event.target as HTMLInputElement).value, ); field.onChange(value < 0 ? 0 : value); }} diff --git a/js/apps/admin-ui/src/identity-providers/add/DetailSettings.tsx b/js/apps/admin-ui/src/identity-providers/add/DetailSettings.tsx index 144e7bd778..ef84fe5feb 100644 --- a/js/apps/admin-ui/src/identity-providers/add/DetailSettings.tsx +++ b/js/apps/admin-ui/src/identity-providers/add/DetailSettings.tsx @@ -88,7 +88,7 @@ const Header = ({ onChange, value, save, toggleDeleteDialog }: HeaderProps) => { } setProvider(fetchedProvider); }, - [] + [], ); const [toggleDisableDialog, DisableConfirm] = useConfirmDialog({ @@ -110,7 +110,7 @@ const Header = ({ onChange, value, save, toggleDeleteDialog }: HeaderProps) => { ? provider.displayName ? provider.displayName : provider.providerId! - : "" + : "", )} divider={false} dropdownItems={[ @@ -169,7 +169,7 @@ export default function DetailSettings() { serverInfo.componentTypes?.[ "org.keycloak.broker.social.SocialIdentityProvider" ]?.find((p) => p.id === providerId), - [serverInfo, providerId] + [serverInfo, providerId], ); const { addAlert, addError } = useAlerts(); @@ -191,18 +191,18 @@ export default function DetailSettings() { if (fetchedProvider.config!.authnContextClassRefs) { form.setValue( "config.authnContextClassRefs", - JSON.parse(fetchedProvider.config?.authnContextClassRefs) + JSON.parse(fetchedProvider.config?.authnContextClassRefs), ); } if (fetchedProvider.config!.authnContextDeclRefs) { form.setValue( "config.authnContextDeclRefs", - JSON.parse(fetchedProvider.config?.authnContextDeclRefs) + JSON.parse(fetchedProvider.config?.authnContextDeclRefs), ); } }, - [] + [], ); const toTab = (tab: IdentityProviderTab) => @@ -223,11 +223,11 @@ export default function DetailSettings() { const p = savedProvider || getValues(); if (p.config?.authnContextClassRefs) p.config.authnContextClassRefs = JSON.stringify( - p.config.authnContextClassRefs + p.config.authnContextClassRefs, ); if (p.config?.authnContextDeclRefs) p.config.authnContextDeclRefs = JSON.stringify( - p.config.authnContextDeclRefs + p.config.authnContextDeclRefs, ); try { @@ -238,7 +238,7 @@ export default function DetailSettings() { config: { ...provider?.config, ...p.config }, alias, providerId, - } + }, ); addAlert(t("updateSuccess"), AlertVariant.success); } catch (error) { @@ -278,7 +278,7 @@ export default function DetailSettings() { addAlert(t("deleteMapperSuccess"), AlertVariant.success); refresh(); navigate( - toIdentityProvider({ providerId, alias, tab: "mappers", realm }) + toIdentityProvider({ providerId, alias, tab: "mappers", realm }), ); } catch (error) { addError("identity-providers:deleteErrorError", error); @@ -302,7 +302,7 @@ export default function DetailSettings() { const components = loaderMappers.map((loaderMapper) => { const mapperType = Object.values(loaderMapperTypes).find( (loaderMapperType) => - loaderMapper.identityProviderMapper! === loaderMapperType.id! + loaderMapper.identityProviderMapper! === loaderMapperType.id!, ); const result: IdPWithMapperAttributes = { @@ -434,7 +434,7 @@ export default function DetailSettings() { alias: alias!, providerId: provider.providerId!, tab: "mappers", - }) + }), ) } /> diff --git a/js/apps/admin-ui/src/identity-providers/add/ExtendedNonDiscoverySettings.tsx b/js/apps/admin-ui/src/identity-providers/add/ExtendedNonDiscoverySettings.tsx index a076c3f3d3..e5d778fe03 100644 --- a/js/apps/admin-ui/src/identity-providers/add/ExtendedNonDiscoverySettings.tsx +++ b/js/apps/admin-ui/src/identity-providers/add/ExtendedNonDiscoverySettings.tsx @@ -111,7 +111,7 @@ export const ExtendedNonDiscoverySettings = () => { onMinus={() => field.onChange(v - 1)} onChange={(event) => { const value = Number( - (event.target as HTMLInputElement).value + (event.target as HTMLInputElement).value, ); field.onChange(value < 0 ? 0 : value); }} diff --git a/js/apps/admin-ui/src/identity-providers/add/OpenIdConnectSettings.tsx b/js/apps/admin-ui/src/identity-providers/add/OpenIdConnectSettings.tsx index 8b480e97b3..c470d8a635 100644 --- a/js/apps/admin-ui/src/identity-providers/add/OpenIdConnectSettings.tsx +++ b/js/apps/admin-ui/src/identity-providers/add/OpenIdConnectSettings.tsx @@ -35,7 +35,7 @@ export const OpenIdConnectSettings = () => { try { const result = await adminClient.identityProviders.importFromUrl( - formData + formData, ); setupForm(result); } catch (error) { diff --git a/js/apps/admin-ui/src/identity-providers/add/SamlConnectSettings.tsx b/js/apps/admin-ui/src/identity-providers/add/SamlConnectSettings.tsx index 72950f02e0..6c4b4c8bcd 100644 --- a/js/apps/admin-ui/src/identity-providers/add/SamlConnectSettings.tsx +++ b/js/apps/admin-ui/src/identity-providers/add/SamlConnectSettings.tsx @@ -33,7 +33,7 @@ export const SamlConnectSettings = () => { const setupForm = (result: IdentityProviderRepresentation) => { Object.entries(result).map(([key, value]) => - setValue(`config.${key}`, value) + setValue(`config.${key}`, value), ); }; @@ -49,13 +49,13 @@ export const SamlConnectSettings = () => { try { const response = await fetch( `${addTrailingSlash( - adminClient.baseUrl + adminClient.baseUrl, )}admin/realms/${realm}/identity-provider/import-config`, { method: "POST", body: formData, headers: getAuthorizationHeaders(await adminClient.getAccessToken()), - } + }, ); if (response.ok) { const result = await response.json(); diff --git a/js/apps/admin-ui/src/identity-providers/component/DiscoveryEndpointField.tsx b/js/apps/admin-ui/src/identity-providers/component/DiscoveryEndpointField.tsx index d60f28cd82..3e4e582c2d 100644 --- a/js/apps/admin-ui/src/identity-providers/component/DiscoveryEndpointField.tsx +++ b/js/apps/admin-ui/src/identity-providers/component/DiscoveryEndpointField.tsx @@ -69,7 +69,7 @@ export const DiscoveryEndpointField = ({ <> {discovery && ( { const { realm } = useRealm(); const callbackUrl = `${addTrailingSlash( - adminClient.baseUrl + adminClient.baseUrl, )}realms/${realm}/broker`; return ( diff --git a/js/apps/admin-ui/src/identity-providers/routes/AddMapper.tsx b/js/apps/admin-ui/src/identity-providers/routes/AddMapper.tsx index 97b0bbf723..0148b3cbfc 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/AddMapper.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/AddMapper.tsx @@ -22,7 +22,7 @@ export const IdentityProviderAddMapperRoute: AppRouteObject = { }; export const toIdentityProviderAddMapper = ( - params: IdentityProviderAddMapperParams + params: IdentityProviderAddMapperParams, ): Partial => ({ pathname: generatePath(IdentityProviderAddMapperRoute.path, params), }); diff --git a/js/apps/admin-ui/src/identity-providers/routes/EditMapper.tsx b/js/apps/admin-ui/src/identity-providers/routes/EditMapper.tsx index e45eca956b..8c84d83f32 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/EditMapper.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/EditMapper.tsx @@ -22,7 +22,7 @@ export const IdentityProviderEditMapperRoute: AppRouteObject = { }; export const toIdentityProviderEditMapper = ( - params: IdentityProviderEditMapperParams + params: IdentityProviderEditMapperParams, ): Partial => ({ pathname: generatePath(IdentityProviderEditMapperRoute.path, params), }); diff --git a/js/apps/admin-ui/src/identity-providers/routes/IdentityProvider.tsx b/js/apps/admin-ui/src/identity-providers/routes/IdentityProvider.tsx index c62fee593d..ab7b5b466e 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProvider.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProvider.tsx @@ -24,7 +24,7 @@ export const IdentityProviderRoute: AppRouteObject = { }; export const toIdentityProvider = ( - params: IdentityProviderParams + params: IdentityProviderParams, ): Partial => ({ pathname: generatePath(IdentityProviderRoute.path, params), }); diff --git a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderCreate.tsx b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderCreate.tsx index 3a1b1a20f0..13ae9e06a3 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderCreate.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderCreate.tsx @@ -20,7 +20,7 @@ export const IdentityProviderCreateRoute: AppRouteObject = { }; export const toIdentityProviderCreate = ( - params: IdentityProviderCreateParams + params: IdentityProviderCreateParams, ): Partial => ({ pathname: generatePath(IdentityProviderCreateRoute.path, params), }); diff --git a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderKeycloakOidc.tsx b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderKeycloakOidc.tsx index 7217deea4c..e025551198 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderKeycloakOidc.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderKeycloakOidc.tsx @@ -17,7 +17,7 @@ export const IdentityProviderKeycloakOidcRoute: AppRouteObject = { }; export const toIdentityProviderKeycloakOidc = ( - params: IdentityProviderKeycloakOidcParams + params: IdentityProviderKeycloakOidcParams, ): Partial => ({ pathname: generatePath(IdentityProviderKeycloakOidcRoute.path, params), }); diff --git a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderOidc.tsx b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderOidc.tsx index a8b2a60b08..df06099283 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderOidc.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderOidc.tsx @@ -17,7 +17,7 @@ export const IdentityProviderOidcRoute: AppRouteObject = { }; export const toIdentityProviderOidc = ( - params: IdentityProviderOidcParams + params: IdentityProviderOidcParams, ): Partial => ({ pathname: generatePath(IdentityProviderOidcRoute.path, params), }); diff --git a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderSaml.tsx b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderSaml.tsx index c2f11a6a1e..4d685cae54 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderSaml.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderSaml.tsx @@ -17,7 +17,7 @@ export const IdentityProviderSamlRoute: AppRouteObject = { }; export const toIdentityProviderSaml = ( - params: IdentityProviderSamlParams + params: IdentityProviderSamlParams, ): Partial => ({ pathname: generatePath(IdentityProviderSamlRoute.path, params), }); diff --git a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviders.tsx b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviders.tsx index a74f373c5a..3645968b85 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviders.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviders.tsx @@ -6,7 +6,7 @@ import type { AppRouteObject } from "../../routes"; export type IdentityProvidersParams = { realm: string }; const IdentityProvidersSection = lazy( - () => import("../IdentityProvidersSection") + () => import("../IdentityProvidersSection"), ); export const IdentityProvidersRoute: AppRouteObject = { @@ -19,7 +19,7 @@ export const IdentityProvidersRoute: AppRouteObject = { }; export const toIdentityProviders = ( - params: IdentityProvidersParams + params: IdentityProvidersParams, ): Partial => ({ pathname: generatePath(IdentityProvidersRoute.path, params), }); diff --git a/js/apps/admin-ui/src/main.tsx b/js/apps/admin-ui/src/main.tsx index 385c9238e1..e9fee24f55 100644 --- a/js/apps/admin-ui/src/main.tsx +++ b/js/apps/admin-ui/src/main.tsx @@ -22,5 +22,5 @@ render( , - container + container, ); diff --git a/js/apps/admin-ui/src/realm-roles/RealmRoleTabs.tsx b/js/apps/admin-ui/src/realm-roles/RealmRoleTabs.tsx index 48740d9503..829bcf2104 100644 --- a/js/apps/admin-ui/src/realm-roles/RealmRoleTabs.tsx +++ b/js/apps/admin-ui/src/realm-roles/RealmRoleTabs.tsx @@ -114,7 +114,7 @@ export default function RealmRoleTabs() { setAttributes(convertedRole.attributes); setRealm(realm); }, - [key] + [key], ); const onSubmit: SubmitHandler = async (formValues) => { @@ -130,7 +130,7 @@ export default function RealmRoleTabs() { } else { await adminClient.clients.updateRole( { id: clientId, roleName: formValues.name! }, - roleRepresentation + roleRepresentation, ); } @@ -271,7 +271,7 @@ export default function RealmRoleTabs() { addAlert( t("compositeRoleOff"), AlertVariant.success, - t("compositesRemovedAlertDescription") + t("compositesRemovedAlertDescription"), ); navigate(toTab("details")); refresh(); @@ -289,7 +289,7 @@ export default function RealmRoleTabs() { try { await adminClient.roles.createComposite( { roleId: id, realm: realm!.realm }, - composites + composites, ); refresh(); navigate(toTab("associated-roles")); diff --git a/js/apps/admin-ui/src/realm-settings/AddClientProfileModal.tsx b/js/apps/admin-ui/src/realm-settings/AddClientProfileModal.tsx index d04a556836..dc45dca5a9 100644 --- a/js/apps/admin-ui/src/realm-settings/AddClientProfileModal.tsx +++ b/js/apps/admin-ui/src/realm-settings/AddClientProfileModal.tsx @@ -48,7 +48,7 @@ export const AddClientProfileModal = (props: AddClientProfileModalProps) => { (globalProfiles) => ({ ...globalProfiles, global: true, - }) + }), ); const profiles = allProfiles.profiles?.map((profiles) => ({ @@ -58,7 +58,7 @@ export const AddClientProfileModal = (props: AddClientProfileModalProps) => { setTableProfiles([...(globalProfiles ?? []), ...(profiles ?? [])]); }, - [] + [], ); const loader = async () => diff --git a/js/apps/admin-ui/src/realm-settings/ClientProfileForm.tsx b/js/apps/admin-ui/src/realm-settings/ClientProfileForm.tsx index fd675028e1..4a15d52f36 100644 --- a/js/apps/admin-ui/src/realm-settings/ClientProfileForm.tsx +++ b/js/apps/admin-ui/src/realm-settings/ClientProfileForm.tsx @@ -84,7 +84,7 @@ export default function ClientProfileForm() { serverInfo.componentTypes?.[ "org.keycloak.services.clientpolicy.executor.ClientPolicyExecutorProvider" ], - [] + [], ); const [executorToDelete, setExecutorToDelete] = useState<{ idx: number; @@ -103,21 +103,21 @@ export default function ClientProfileForm() { profiles: profiles.profiles?.filter((p) => p.name !== profileName), }); const globalProfile = profiles.globalProfiles?.find( - (p) => p.name === profileName + (p) => p.name === profileName, ); const profile = profiles.profiles?.find((p) => p.name === profileName); setIsGlobalProfile(globalProfile !== undefined); setValue("name", globalProfile?.name ?? profile?.name ?? ""); setValue( "description", - globalProfile?.description ?? profile?.description ?? "" + globalProfile?.description ?? profile?.description ?? "", ); setValue( "executors", - globalProfile?.executors ?? profile?.executors ?? [] + globalProfile?.executors ?? profile?.executors ?? [], ); }, - [key] + [key], ); const save = async (form: ClientProfileForm) => { @@ -133,7 +133,7 @@ export default function ClientProfileForm() { editMode ? t("realm-settings:updateClientProfileSuccess") : t("realm-settings:createClientProfileSuccess"), - AlertVariant.success + AlertVariant.success, ); navigate(toClientProfile({ realm, profileName: form.name })); @@ -142,7 +142,7 @@ export default function ClientProfileForm() { editMode ? "realm-settings:updateClientProfileError" : "realm-settings:createClientProfileError", - error + error, ); } }; @@ -361,7 +361,7 @@ export default function ClientProfileForm() { )} {executorTypes ?.filter( - (type) => type.id === executor.executor + (type) => type.id === executor.executor, ) .map((type) => ( diff --git a/js/apps/admin-ui/src/realm-settings/DefaultGroupsTab.tsx b/js/apps/admin-ui/src/realm-settings/DefaultGroupsTab.tsx index b8ca5442b5..e92ac0929f 100644 --- a/js/apps/admin-ui/src/realm-settings/DefaultGroupsTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/DefaultGroupsTab.tsx @@ -54,7 +54,7 @@ export const DefaultsGroupsTab = () => { setDefaultGroups(groups); setKey(key + 1); }, - [load] + [load], ); const loader = () => Promise.resolve(defaultGroups!); @@ -66,12 +66,12 @@ export const DefaultsGroupsTab = () => { adminClient.realms.removeDefaultGroup({ realm, id: group.id!, - }) - ) + }), + ), ); addAlert( t("groupRemove", { count: selectedRows.length }), - AlertVariant.success + AlertVariant.success, ); setSelectedRows([]); } catch (error) { @@ -87,12 +87,12 @@ export const DefaultsGroupsTab = () => { adminClient.realms.addDefaultGroup({ realm, id: group.id!, - }) - ) + }), + ), ); addAlert( t("defaultGroupAdded", { count: groups.length }), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError("realm-settings:defaultGroupAddedError", error); diff --git a/js/apps/admin-ui/src/realm-settings/EmailTab.tsx b/js/apps/admin-ui/src/realm-settings/EmailTab.tsx index c0eba2e957..9021eff79a 100644 --- a/js/apps/admin-ui/src/realm-settings/EmailTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/EmailTab.tsx @@ -87,7 +87,7 @@ export const RealmSettingsEmailTab = ({ toggleTest(); await adminClient.realms.testSMTPConnection( { realm: realm.realm! }, - serverSettings + serverSettings, ); addAlert(t("testConnectionSuccess"), AlertVariant.success); } catch (error) { diff --git a/js/apps/admin-ui/src/realm-settings/ExecutorForm.tsx b/js/apps/admin-ui/src/realm-settings/ExecutorForm.tsx index 6ba6c6bc7a..e88fc784f2 100644 --- a/js/apps/admin-ui/src/realm-settings/ExecutorForm.tsx +++ b/js/apps/admin-ui/src/realm-settings/ExecutorForm.tsx @@ -65,7 +65,7 @@ export default function ExecutorForm() { const setupForm = (profiles: ClientProfileRepresentation[]) => { const profile = profiles.find((profile) => profile.name === profileName); const executor = profile?.executors?.find( - (executor) => executor.executor === executorName + (executor) => executor.executor === executorName, ); if (executor) reset({ config: executor.configuration }); }; @@ -80,7 +80,7 @@ export default function ExecutorForm() { setupForm(profiles.profiles!); setupForm(profiles.globalProfiles!); }, - [] + [], ); const save = async () => { @@ -97,7 +97,7 @@ export default function ExecutorForm() { if (editMode) { const profileExecutor = profile.executors!.find( - (executor) => executor.executor === executorName + (executor) => executor.executor === executorName, ); profileExecutor!.configuration = { ...profileExecutor!.configuration, @@ -122,7 +122,7 @@ export default function ExecutorForm() { editMode ? t("realm-settings:updateExecutorSuccess") : t("realm-settings:addExecutorSuccess"), - AlertVariant.success + AlertVariant.success, ); navigate(toClientProfile({ realm, profileName })); @@ -131,17 +131,17 @@ export default function ExecutorForm() { editMode ? "realm-settings:updateExecutorError" : "realm-settings:addExecutorError", - error + error, ); } }; const globalProfile = globalProfiles.find( - (globalProfile) => globalProfile.name === profileName + (globalProfile) => globalProfile.name === profileName, ); const profileExecutorType = executorTypes?.find( - (executor) => executor.id === executorName + (executor) => executor.id === executorName, ); const editedProfileExecutors = @@ -152,7 +152,7 @@ export default function ExecutorForm() { ...property, defaultValue: globalDefaultValues, }; - } + }, ); return ( @@ -197,11 +197,11 @@ export default function ExecutorForm() { onSelect={(_, value) => { reset({ ...defaultValues, executor: value.toString() }); const selectedExecutor = executorTypes?.filter( - (type) => type.id === value + (type) => type.id === value, ); setExecutors(selectedExecutor ?? []); setExecutorProperties( - selectedExecutor?.[0].properties ?? [] + selectedExecutor?.[0].properties ?? [], ); setSelectExecutorTypeOpen(false); }} diff --git a/js/apps/admin-ui/src/realm-settings/GeneralTab.tsx b/js/apps/admin-ui/src/realm-settings/GeneralTab.tsx index 7a7e7e237b..d18698e7ec 100644 --- a/js/apps/admin-ui/src/realm-settings/GeneralTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/GeneralTab.tsx @@ -60,12 +60,12 @@ export const RealmSettingsGeneralTab = ({ convertToFormValues(realm, setValue); if (realm.attributes?.["acr.loa.map"]) { const result = Object.entries( - JSON.parse(realm.attributes["acr.loa.map"]) + JSON.parse(realm.attributes["acr.loa.map"]), ).flatMap(([key, value]) => ({ key, value })); result.concat({ key: "", value: "" }); setValue( convertAttributeNameToForm("attributes.acr.loa.map") as any, - result + result, ); } }; @@ -232,7 +232,7 @@ export const RealmSettingsGeneralTab = ({ @@ -273,7 +273,7 @@ export const RealmSettingsGeneralTab = ({ diff --git a/js/apps/admin-ui/src/realm-settings/LocalizationTab.tsx b/js/apps/admin-ui/src/realm-settings/LocalizationTab.tsx index e72535b82c..2825cbe846 100644 --- a/js/apps/admin-ui/src/realm-settings/LocalizationTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/LocalizationTab.tsx @@ -96,7 +96,7 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => { const themeTypes = useServerInfo().themes!; const allLocales = useMemo(() => { const locales = Object.values(themeTypes).flatMap((theme) => - theme.flatMap(({ locales }) => (locales ? locales : [])) + theme.flatMap(({ locales }) => (locales ? locales : [])), ); return Array.from(new Set(locales)); }, [themeTypes]); @@ -158,7 +158,7 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => { if (filter) { const filtered = uniqWith( searchInBundles(0).concat(searchInBundles(1)), - isEqual + isEqual, ); result = Object.fromEntries(filtered); @@ -221,14 +221,14 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => { return bundles; }, - [tableKey, filter, first, max] + [tableKey, filter, first, max], ); const handleTextInputChange = ( newValue: string, evt: any, rowIndex: number, - cellIndex: number + cellIndex: number, ) => { setTableRows((prev) => { const newRows = cloneDeep(prev); @@ -243,7 +243,7 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => { const updateEditableRows = async ( type: RowEditType, rowIndex?: number, - validationErrors?: RowErrors + validationErrors?: RowErrors, ) => { if (rowIndex === undefined) { return; @@ -277,7 +277,7 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => { selectMenuLocale || getValues("defaultLocale") || DEFAULT_LOCALE, key, }, - value + value, ); addAlert(t("updateMessageBundleSuccess"), AlertVariant.success); } catch (error) { @@ -316,7 +316,7 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => { selectMenuLocale || getValues("defaultLocale") || DEFAULT_LOCALE, key: pair.key, }, - pair.value + pair.value, ); adminClient.setConfig({ @@ -414,8 +414,8 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => { if (field.value.includes(option)) { field.onChange( field.value.filter( - (item: string) => item !== option - ) + (item: string) => item !== option, + ), ); } else { field.onChange([...field.value, option]); @@ -464,7 +464,7 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => { ? localeToDisplayName(field.value) : realm.defaultLocale !== "" ? localeToDisplayName( - realm.defaultLocale || DEFAULT_LOCALE + realm.defaultLocale || DEFAULT_LOCALE, ) : t("placeholderText") } @@ -594,7 +594,7 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => { title: t("common:delete"), onClick: (_, row) => deleteKey( - (tableRows[row].cells?.[0] as IRowCell).props.value + (tableRows[row].cells?.[0] as IRowCell).props.value, ), }, ]} diff --git a/js/apps/admin-ui/src/realm-settings/LoginTab.tsx b/js/apps/admin-ui/src/realm-settings/LoginTab.tsx index 173ad65b44..6a0b8b375a 100644 --- a/js/apps/admin-ui/src/realm-settings/LoginTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/LoginTab.tsx @@ -37,7 +37,7 @@ export const RealmSettingsLoginTab = ({ }, Array.isArray(switches) ? switches.reduce((realm, s) => Object.assign(realm, s), realm) - : Object.assign(realm, switches) + : Object.assign(realm, switches), ); addAlert(t("enableSwitchSuccess", { switch: t(name) })); refresh(); diff --git a/js/apps/admin-ui/src/realm-settings/NewAttributeSettings.tsx b/js/apps/admin-ui/src/realm-settings/NewAttributeSettings.tsx index 47c8e47449..0bbda4aa49 100644 --- a/js/apps/admin-ui/src/realm-settings/NewAttributeSettings.tsx +++ b/js/apps/admin-ui/src/realm-settings/NewAttributeSettings.tsx @@ -65,14 +65,14 @@ type PermissionView = [ { adminView: boolean; userView: boolean; - } + }, ]; type PermissionEdit = [ { adminEdit: boolean; userEdit: boolean; - } + }, ]; export const USERNAME_EMAIL = ["username", "email"]; @@ -141,29 +141,29 @@ export default function NewAttributeSettings() { ...values } = config.attributes!.find( - (attribute) => attribute.name === attributeName + (attribute) => attribute.name === attributeName, ) || {}; convertToFormValues(values, form.setValue); Object.entries( - flatten({ permissions, selector, required }, { safe: true }) + flatten({ permissions, selector, required }, { safe: true }), ).map(([key, value]) => form.setValue(key as any, value)); form.setValue( "annotations", Object.entries(annotations || {}).map(([key, value]) => ({ key, value, - })) + })), ); form.setValue( "validations", Object.entries(validations || {}).map(([key, value]) => ({ key, value, - })) + })), ); form.setValue("isRequired", required !== undefined); }, - [] + [], ); const save = async (profileConfig: UserProfileAttributeType) => { @@ -175,12 +175,12 @@ export default function NewAttributeSettings() { : currentValidations.value; return prevValidations; }, - {} as Record + {} as Record, ); const annotations = profileConfig.annotations.reduce( (obj, item) => Object.assign(obj, { [item.key]: item.value }), - {} + {}, ); const patchAttributes = () => @@ -203,7 +203,9 @@ export default function NewAttributeSettings() { profileConfig.isRequired ? { required: profileConfig.required } : undefined, - profileConfig.group ? { group: profileConfig.group } : { group: null } + profileConfig.group + ? { group: profileConfig.group } + : { group: null }, ); }); @@ -224,7 +226,7 @@ export default function NewAttributeSettings() { profileConfig.isRequired ? { required: profileConfig.required } : undefined, - profileConfig.group ? { group: profileConfig.group } : undefined + profileConfig.group ? { group: profileConfig.group } : undefined, ), ] as UserProfileAttribute); @@ -241,7 +243,7 @@ export default function NewAttributeSettings() { addAlert( t("realm-settings:createAttributeSuccess"), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError("realm-settings:createAttributeError", error); diff --git a/js/apps/admin-ui/src/realm-settings/NewClientPolicyCondition.tsx b/js/apps/admin-ui/src/realm-settings/NewClientPolicyCondition.tsx index 5db17673af..a1f14fbfe7 100644 --- a/js/apps/admin-ui/src/realm-settings/NewClientPolicyCondition.tsx +++ b/js/apps/admin-ui/src/realm-settings/NewClientPolicyCondition.tsx @@ -79,15 +79,15 @@ export default function NewClientPolicyCondition() { if (conditionName) { const currentPolicy = policies.policies?.find( - (item) => item.name === policyName + (item) => item.name === policyName, ); const typeAndConfigData = currentPolicy?.conditions?.find( - (item) => item.condition === conditionName + (item) => item.condition === conditionName, ); const currentCondition = conditionTypes?.find( - (condition) => condition.id === conditionName + (condition) => condition.id === conditionName, ); setConditionData(typeAndConfigData!); @@ -95,7 +95,7 @@ export default function NewClientPolicyCondition() { setupForm(typeAndConfigData!); } }, - [] + [], ); const save = async (configPolicy: ConfigProperty) => { @@ -122,7 +122,7 @@ export default function NewClientPolicyCondition() { }; const index = conditions.findIndex( - (condition) => conditionName === condition.condition + (condition) => conditionName === condition.condition, ); if (index === -1) { @@ -162,7 +162,7 @@ export default function NewClientPolicyCondition() { conditionName ? t("realm-settings:updateClientConditionSuccess") : t("realm-settings:createClientConditionSuccess"), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError("realm-settings:createClientConditionError", error); @@ -189,7 +189,7 @@ export default function NewClientPolicyCondition() { helpText={ conditionType ? `realm-settings-help:${camelCase( - conditionType.replace(/-/g, " ") + conditionType.replace(/-/g, " "), )}` : "realm-settings-help:conditions" } @@ -212,7 +212,7 @@ export default function NewClientPolicyCondition() { onSelect={(_, value) => { field.onChange(value); setConditionProperties( - (value as ComponentTypeRepresentation).properties + (value as ComponentTypeRepresentation).properties, ); setConditionType((value as ComponentTypeRepresentation).id); setCondition([ @@ -232,8 +232,8 @@ export default function NewClientPolicyCondition() { selected={condition.id === field.value} description={t( `realm-settings-help:${camelCase( - condition.id.replace(/-/g, " ") - )}` + condition.id.replace(/-/g, " "), + )}`, )} key={condition.id} value={condition} diff --git a/js/apps/admin-ui/src/realm-settings/NewClientPolicyForm.tsx b/js/apps/admin-ui/src/realm-settings/NewClientPolicyForm.tsx index 61d52016a3..f9f5a18378 100644 --- a/js/apps/admin-ui/src/realm-settings/NewClientPolicyForm.tsx +++ b/js/apps/admin-ui/src/realm-settings/NewClientPolicyForm.tsx @@ -183,7 +183,7 @@ export default function NewClientPolicyForm() { }, ({ policies, profiles }) => { const currentPolicy = policies.policies?.find( - (item) => item.name === policyName + (item) => item.name === policyName, ); const allClientProfiles = [ @@ -199,7 +199,7 @@ export default function NewClientPolicyForm() { setShowAddConditionsAndProfilesForm(true); } }, - [] + [], ); const setupForm = (policy: ClientPolicyRepresentation) => { @@ -207,7 +207,7 @@ export default function NewClientPolicyForm() { }; const policy = (policies || []).filter( - (policy) => policy.name === policyName + (policy) => policy.name === policyName, ); const policyConditions = policy[0]?.conditions || []; const policyProfiles = policy[0]?.profiles || []; @@ -229,12 +229,12 @@ export default function NewClientPolicyForm() { const getAllPolicies = () => { const policyNameExists = policies?.some( - (policy) => policy.name === createdPolicy.name + (policy) => policy.name === createdPolicy.name, ); if (policyNameExists) { return policies?.map((policy) => - policy.name === createdPolicy.name ? createdPolicy : policy + policy.name === createdPolicy.name ? createdPolicy : policy, ); } else if (createdForm.name !== policyName) { return policies @@ -252,7 +252,7 @@ export default function NewClientPolicyForm() { policyName ? t("realm-settings:updateClientPolicySuccess") : t("realm-settings:createClientPolicySuccess"), - AlertVariant.success + AlertVariant.success, ); navigate(toEditClientPolicy({ realm, policyName: createdForm.name! })); setShowAddConditionsAndProfilesForm(true); @@ -270,7 +270,7 @@ export default function NewClientPolicyForm() { continueButtonVariant: ButtonVariant.danger, onConfirm: async () => { const updatedPolicies = policies?.filter( - (policy) => policy.name !== policyName + (policy) => policy.name !== policyName, ); try { @@ -282,7 +282,7 @@ export default function NewClientPolicyForm() { toClientPolicies({ realm, tab: "policies", - }) + }), ); } catch (error) { addError(t("deleteClientPolicyError"), error); @@ -307,14 +307,14 @@ export default function NewClientPolicyForm() { }); addAlert(t("deleteConditionSuccess"), AlertVariant.success); navigate( - toEditClientPolicy({ realm, policyName: formValues.name! }) + toEditClientPolicy({ realm, policyName: formValues.name! }), ); } catch (error) { addError(t("deleteConditionError"), error); } } else { const updatedPolicies = policies?.filter( - (policy) => policy.name !== policyName + (policy) => policy.name !== policyName, ); try { @@ -326,7 +326,7 @@ export default function NewClientPolicyForm() { toClientPolicies({ realm, tab: "policies", - }) + }), ); } catch (error) { addError(t("deleteClientError"), error); @@ -357,7 +357,7 @@ export default function NewClientPolicyForm() { } } else { const updatedPolicies = policies?.filter( - (policy) => policy.name !== policyName + (policy) => policy.name !== policyName, ); try { @@ -369,7 +369,7 @@ export default function NewClientPolicyForm() { toClientPolicies({ realm, tab: "policies", - }) + }), ); } catch (error) { addError(t("deleteClientError"), error); @@ -400,7 +400,7 @@ export default function NewClientPolicyForm() { }; const index = policies?.findIndex( - (policy) => createdPolicy.name === policy.name + (policy) => createdPolicy.name === policy.name, ); if (index === undefined || index === -1) { @@ -421,7 +421,7 @@ export default function NewClientPolicyForm() { navigate(toEditClientPolicy({ realm, policyName: formValues.name! })); addAlert( t("realm-settings:addClientProfileSuccess"), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError("realm-settings:addClientProfileError", error); @@ -515,7 +515,7 @@ export default function NewClientPolicyForm() { toClientPolicies({ realm, tab: "policies", - }) + }), ) } data-testid="cancelCreatePolicy" @@ -618,7 +618,7 @@ export default function NewClientPolicyForm() { } > - ) + ), )} , ]} @@ -701,7 +701,7 @@ export default function NewClientPolicyForm() { type === profile.name + (profile) => type === profile.name, )?.description } fieldLabelId={profile} diff --git a/js/apps/admin-ui/src/realm-settings/PartialExport.tsx b/js/apps/admin-ui/src/realm-settings/PartialExport.tsx index 735140139a..e54132bb3c 100644 --- a/js/apps/admin-ui/src/realm-settings/PartialExport.tsx +++ b/js/apps/admin-ui/src/realm-settings/PartialExport.tsx @@ -55,7 +55,7 @@ export const PartialExportDialog = ({ new Blob([prettyPrintJSON(realmExport)], { type: "application/json", }), - "realm-export.json" + "realm-export.json", ); addAlert(t("exportSuccess"), AlertVariant.success); diff --git a/js/apps/admin-ui/src/realm-settings/PartialImport.tsx b/js/apps/admin-ui/src/realm-settings/PartialImport.tsx index 3ac1b67742..e9b0d413ff 100644 --- a/js/apps/admin-ui/src/realm-settings/PartialImport.tsx +++ b/js/apps/admin-ui/src/realm-settings/PartialImport.tsx @@ -85,7 +85,7 @@ export const PartialImportDialog = (props: PartialImportProps) => { const [resourcesToImport, setResourcesToImport] = useState(INITIAL_RESOURCES); const isAnyResourceChecked = Object.values(resourcesToImport).some( - (checked) => checked + (checked) => checked, ); const resetResourcesToImport = () => { @@ -125,7 +125,7 @@ export const PartialImportDialog = (props: PartialImportProps) => { const handleResourceCheckBox = ( checked: boolean, - event: FormEvent + event: FormEvent, ) => { const resource = event.currentTarget.name as Resource; @@ -148,7 +148,7 @@ export const PartialImportDialog = (props: PartialImportProps) => { const handleCollisionSelect = ( event: ChangeEvent | ReactMouseEvent, - option: string | SelectOptionObject + option: string | SelectOptionObject, ) => { setCollisionOption(option as CollisionOption); setIsCollisionSelectOpen(false); @@ -211,13 +211,13 @@ export const PartialImportDialog = (props: PartialImportProps) => { }; const clientRolesCount = ( - clientRoles: Record + clientRoles: Record, ) => Object.values(clientRoles).reduce((total, role) => total + role.length, 0); const resourceDataListItem = ( resource: Resource, - resourceDisplayName: string + resourceDisplayName: string, ) => { return ( @@ -358,14 +358,14 @@ export const PartialImportDialog = (props: PartialImportProps) => { {targetHasResource("identityProviders") && resourceDataListItem( "identityProviders", - t("common:identityProviders") + t("common:identityProviders"), )} {targetHasRealmRoles() && resourceDataListItem("realmRoles", t("common:realmRoles"))} {targetHasClientRoles() && resourceDataListItem( "clientRoles", - t("common:clientRoles") + t("common:clientRoles"), )} diff --git a/js/apps/admin-ui/src/realm-settings/PoliciesTab.tsx b/js/apps/admin-ui/src/realm-settings/PoliciesTab.tsx index 595c957e44..74b3034fcc 100644 --- a/js/apps/admin-ui/src/realm-settings/PoliciesTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/PoliciesTab.tsx @@ -60,7 +60,7 @@ export const PoliciesTab = () => { setTablePolicies(policies.policies || []), setCode(prettyPrintJSON(policies.policies)); }, - [key] + [key], ); const loader = async () => policies ?? []; @@ -76,7 +76,7 @@ export const PoliciesTab = () => { ...policy, enabled, }; - } + }, ); try { @@ -86,7 +86,7 @@ export const PoliciesTab = () => { navigate(toClientPolicies({ realm, tab: "policies" })); addAlert( t("realm-settings:updateClientPolicySuccess"), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError("realm-settings:updateClientPolicyError", error); @@ -155,7 +155,7 @@ export const PoliciesTab = () => { }); addAlert( t("realm-settings:updateClientPoliciesSuccess"), - AlertVariant.success + AlertVariant.success, ); refresh(); } catch (error) { @@ -176,7 +176,7 @@ export const PoliciesTab = () => { continueButtonVariant: ButtonVariant.danger, onConfirm: async () => { const updatedPolicies = policies?.filter( - (policy) => policy.name !== selectedPolicy?.name + (policy) => policy.name !== selectedPolicy?.name, ); try { diff --git a/js/apps/admin-ui/src/realm-settings/ProfilesTab.tsx b/js/apps/admin-ui/src/realm-settings/ProfilesTab.tsx index c092bc84a9..9ae4eab455 100644 --- a/js/apps/admin-ui/src/realm-settings/ProfilesTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/ProfilesTab.tsx @@ -65,7 +65,7 @@ export default function ProfilesTab() { (globalProfiles) => ({ ...globalProfiles, global: true, - }) + }), ); const profiles = allProfiles.profiles?.map((profiles) => ({ @@ -77,13 +77,13 @@ export default function ProfilesTab() { setTableProfiles(allClientProfiles || []); setCode(JSON.stringify(allClientProfiles, null, 2)); }, - [key] + [key], ); const loader = async () => tableProfiles ?? []; const normalizeProfile = ( - profile: ClientProfile + profile: ClientProfile, ): ClientProfileRepresentation => omit(profile, "global"); const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({ @@ -96,10 +96,11 @@ export default function ProfilesTab() { onConfirm: async () => { const updatedProfiles = tableProfiles ?.filter( - (profile) => profile.name !== selectedProfile?.name && !profile.global + (profile) => + profile.name !== selectedProfile?.name && !profile.global, ) .map((profile) => - normalizeProfile(profile) + normalizeProfile(profile), ); try { @@ -153,7 +154,7 @@ export default function ProfilesTab() { }); addAlert( t("realm-settings:updateClientProfilesSuccess"), - AlertVariant.success + AlertVariant.success, ); setKey(key + 1); } catch (error) { diff --git a/js/apps/admin-ui/src/realm-settings/RealmSettingsTabs.tsx b/js/apps/admin-ui/src/realm-settings/RealmSettingsTabs.tsx index 9f31ffd354..4d63d2c734 100644 --- a/js/apps/admin-ui/src/realm-settings/RealmSettingsTabs.tsx +++ b/js/apps/admin-ui/src/realm-settings/RealmSettingsTabs.tsx @@ -193,8 +193,8 @@ export const RealmSettingsTabs = ({ Object.fromEntries( (r.attributes["acr.loa.map"] as KeyValueType[]) .filter(({ key }) => key !== "") - .map(({ key, value }) => [key, value]) - ) + .map(({ key, value }) => [key, value]), + ), ); } @@ -245,7 +245,7 @@ export const RealmSettingsTabs = ({ toClientPolicies({ realm: realmName, tab, - }) + }), ); const clientPoliciesProfilesTab = useClientPoliciesTab("profiles"); @@ -377,7 +377,7 @@ export const RealmSettingsTabs = ({ tooltip={ } @@ -394,7 +394,7 @@ export const RealmSettingsTabs = ({ tooltip={ } diff --git a/js/apps/admin-ui/src/realm-settings/TokensTab.tsx b/js/apps/admin-ui/src/realm-settings/TokensTab.tsx index 04c47fc420..a643b11c9e 100644 --- a/js/apps/admin-ui/src/realm-settings/TokensTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/TokensTab.tsx @@ -49,7 +49,7 @@ export const RealmSettingsTokensTab = ({ useState(false); const defaultSigAlgOptions = sortProviders( - serverInfo.providers!["signature"].providers + serverInfo.providers!["signature"].providers, ); const form = useForm(); @@ -265,7 +265,7 @@ export const RealmSettingsTokensTab = ({ onMinus={() => field.onChange(field.value! - 1)} onChange={(event) => field.onChange( - Number((event.target as HTMLInputElement).value) + Number((event.target as HTMLInputElement).value), ) } /> @@ -325,7 +325,7 @@ export const RealmSettingsTokensTab = ({ labelIcon={ @@ -443,7 +443,7 @@ export const RealmSettingsTokensTab = ({ labelIcon={ diff --git a/js/apps/admin-ui/src/realm-settings/UserRegistration.tsx b/js/apps/admin-ui/src/realm-settings/UserRegistration.tsx index fa0e757cf6..d87b5b66b5 100644 --- a/js/apps/admin-ui/src/realm-settings/UserRegistration.tsx +++ b/js/apps/admin-ui/src/realm-settings/UserRegistration.tsx @@ -24,7 +24,7 @@ export const UserRegistration = () => { useFetch( () => adminClient.realms.findOne({ realm: realmName }), setRealm, - [] + [], ); if (!realm) { @@ -37,7 +37,7 @@ export const UserRegistration = () => { try { await adminClient.roles.createComposite( { roleId: realm.defaultRole!.id!, realm: realmName }, - compositeArray + compositeArray, ); setKey(key + 1); addAlert(t("roles:addAssociatedRolesSuccess"), AlertVariant.success); diff --git a/js/apps/admin-ui/src/realm-settings/event-config/AddEventTypesDialog.tsx b/js/apps/admin-ui/src/realm-settings/event-config/AddEventTypesDialog.tsx index 0fa89dcb53..7bdd4d67e0 100644 --- a/js/apps/admin-ui/src/realm-settings/event-config/AddEventTypesDialog.tsx +++ b/js/apps/admin-ui/src/realm-settings/event-config/AddEventTypesDialog.tsx @@ -49,7 +49,7 @@ export const AddEventTypesDialog = ({ ariaLabelKey="addTypes" onSelect={(selected) => setSelectedTypes(selected)} eventTypes={enums!["eventType"].filter( - (type) => !configured.includes(type) + (type) => !configured.includes(type), )} /> diff --git a/js/apps/admin-ui/src/realm-settings/event-config/EventsTab.tsx b/js/apps/admin-ui/src/realm-settings/event-config/EventsTab.tsx index 2c5d1e5062..c9eead23b9 100644 --- a/js/apps/admin-ui/src/realm-settings/event-config/EventsTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/event-config/EventsTab.tsx @@ -92,13 +92,13 @@ export const EventsTab = ({ realm }: EventsTabProps) => { }); reload(); }, - [key] + [key], ); const save = async (config: EventsConfigForm) => { const updatedEventListener = !isEqual( events?.eventsListeners, - config.eventsListeners + config.eventsListeners, ); const { adminEventsExpiration, ...eventConfig } = config; @@ -108,28 +108,28 @@ export const EventsTab = ({ realm }: EventsTabProps) => { { ...realm, attributes: { ...(realm.attributes || {}), adminEventsExpiration }, - } + }, ); } try { await adminClient.realms.updateConfigEvents( { realm: realmName }, - eventConfig + eventConfig, ); setupForm({ ...events, ...eventConfig, adminEventsExpiration }); addAlert( updatedEventListener ? t("realm-settings:saveEventListenersSuccess") : t("realm-settings:eventConfigSuccessfully"), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError( updatedEventListener ? t("realm-settings:saveEventListenersError") : t("realm-settings:eventConfigError"), - error + error, ); } }; @@ -202,7 +202,7 @@ export const EventsTab = ({ realm }: EventsTabProps) => { eventTypes={events?.enabledEventTypes || []} onDelete={(value) => { const enabledEventTypes = events?.enabledEventTypes?.filter( - (e) => e !== value.id + (e) => e !== value.id, ); addEvents(enabledEventTypes); setEvents({ ...events, enabledEventTypes }); diff --git a/js/apps/admin-ui/src/realm-settings/keys/KeysListTab.tsx b/js/apps/admin-ui/src/realm-settings/keys/KeysListTab.tsx index 922ad4deea..5229504e2b 100644 --- a/js/apps/admin-ui/src/realm-settings/keys/KeysListTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/keys/KeysListTab.tsx @@ -97,13 +97,13 @@ export const KeysListTab = ({ realmComponents }: KeysListTabProps) => { return keysMetaData.keys?.map((key) => { const provider = realmComponents.find( (component: ComponentRepresentation) => - component.id === key.providerId + component.id === key.providerId, ); return { ...key, provider: provider?.name } as KeyData; })!; }, setKeyData, - [] + [], ); const [togglePublicKeyDialog, PublicKeyDialog] = useConfirmDialog({ @@ -142,7 +142,7 @@ export const KeysListTab = ({ realmComponents }: KeysListTabProps) => { setFilteredKeyData( filterType !== FILTER_OPTIONS[0] ? keyData!.filter(({ status }) => status === filterType) - : undefined + : undefined, ) } /> diff --git a/js/apps/admin-ui/src/realm-settings/keys/KeysProvidersTab.tsx b/js/apps/admin-ui/src/realm-settings/keys/KeysProvidersTab.tsx index bbbfdd7149..b5a7f32776 100644 --- a/js/apps/admin-ui/src/realm-settings/keys/KeysProvidersTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/keys/KeysProvidersTab.tsx @@ -55,7 +55,7 @@ export const KeysProvidersTab = ({ const [searchVal, setSearchVal] = useState(""); const [filteredComponents, setFilteredComponents] = useState( - [] + [], ); const [isCreateModalOpen, handleModalToggle] = useToggle(); @@ -75,7 +75,7 @@ export const KeysProvidersTab = ({ realmComponents.map((component) => { const provider = keyProviderComponentTypes.find( (componentType: ComponentTypeRepresentation) => - component.providerId === componentType.id + component.providerId === componentType.id, ); return { @@ -83,7 +83,7 @@ export const KeysProvidersTab = ({ providerDescription: provider?.helpText, }; }), - [realmComponents] + [realmComponents], ); const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({ @@ -115,7 +115,7 @@ export const KeysProvidersTab = ({ const filteredComponents = components.filter( (component) => component.name?.includes(searchVal) || - component.providerId?.includes(searchVal) + component.providerId?.includes(searchVal), ); setFilteredComponents(filteredComponents); } else { @@ -216,7 +216,7 @@ export const KeysProvidersTab = ({ ).toString(), ], }, - } + }, ); }); diff --git a/js/apps/admin-ui/src/realm-settings/keys/KeysTab.tsx b/js/apps/admin-ui/src/realm-settings/keys/KeysTab.tsx index 06104d52d9..3d5d0cf0be 100644 --- a/js/apps/admin-ui/src/realm-settings/keys/KeysTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/keys/KeysTab.tsx @@ -48,7 +48,7 @@ export const KeysTab = () => { realm: realmName, }), (components) => setRealmComponents(sortByPriority(components)), - [key] + [key], ); const useTab = (tab: KeySubTab) => diff --git a/js/apps/admin-ui/src/realm-settings/keys/key-providers/KeyProviderForm.tsx b/js/apps/admin-ui/src/realm-settings/keys/key-providers/KeyProviderForm.tsx index 16a8e9b17c..5989da904f 100644 --- a/js/apps/admin-ui/src/realm-settings/keys/key-providers/KeyProviderForm.tsx +++ b/js/apps/admin-ui/src/realm-settings/keys/key-providers/KeyProviderForm.tsx @@ -59,7 +59,7 @@ export const KeyProviderForm = ({ if (component.config) Object.entries(component.config).forEach( ([key, value]) => - (component.config![key] = Array.isArray(value) ? value : [value]) + (component.config![key] = Array.isArray(value) ? value : [value]), ); try { if (id) { @@ -68,7 +68,7 @@ export const KeyProviderForm = ({ { ...component, providerType: KEY_PROVIDER_TYPE, - } + }, ); addAlert(t("saveProviderSuccess"), AlertVariant.success); } else { @@ -94,7 +94,7 @@ export const KeyProviderForm = ({ reset({ ...result }); } }, - [] + [], ); return ( diff --git a/js/apps/admin-ui/src/realm-settings/routes/AddClientPolicy.tsx b/js/apps/admin-ui/src/realm-settings/routes/AddClientPolicy.tsx index 29bc19039f..d4d677559a 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddClientPolicy.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddClientPolicy.tsx @@ -17,7 +17,7 @@ export const AddClientPolicyRoute: AppRouteObject = { }; export const toAddClientPolicy = ( - params: AddClientPolicyParams + params: AddClientPolicyParams, ): Partial => ({ pathname: generatePath(AddClientPolicyRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx b/js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx index 9db23e4455..010c7a86f7 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx @@ -20,7 +20,7 @@ export const AddClientProfileRoute: AppRouteObject = { }; export const toAddClientProfile = ( - params: AddClientProfileParams + params: AddClientProfileParams, ): Partial => ({ pathname: generatePath(AddClientProfileRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/AddCondition.tsx b/js/apps/admin-ui/src/realm-settings/routes/AddCondition.tsx index b8cbab1ec3..a4b37bf292 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddCondition.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddCondition.tsx @@ -9,7 +9,7 @@ export type NewClientPolicyConditionParams = { }; const NewClientPolicyCondition = lazy( - () => import("../NewClientPolicyCondition") + () => import("../NewClientPolicyCondition"), ); export const NewClientPolicyConditionRoute: AppRouteObject = { @@ -22,7 +22,7 @@ export const NewClientPolicyConditionRoute: AppRouteObject = { }; export const toNewClientPolicyCondition = ( - params: NewClientPolicyConditionParams + params: NewClientPolicyConditionParams, ): Partial => ({ pathname: generatePath(NewClientPolicyConditionRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/ClientPolicies.tsx b/js/apps/admin-ui/src/realm-settings/routes/ClientPolicies.tsx index b6e4375d2e..70a5cf827e 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/ClientPolicies.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/ClientPolicies.tsx @@ -22,7 +22,7 @@ export const ClientPoliciesRoute: AppRouteObject = { }; export const toClientPolicies = ( - params: ClientPoliciesParams + params: ClientPoliciesParams, ): Partial => ({ pathname: generatePath(ClientPoliciesRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/ClientProfile.tsx b/js/apps/admin-ui/src/realm-settings/routes/ClientProfile.tsx index ab14135415..65977a7573 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/ClientProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/ClientProfile.tsx @@ -20,7 +20,7 @@ export const ClientProfileRoute: AppRouteObject = { }; export const toClientProfile = ( - params: ClientProfileParams + params: ClientProfileParams, ): Partial => ({ pathname: generatePath(ClientProfileRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/EditAttributesGroup.tsx b/js/apps/admin-ui/src/realm-settings/routes/EditAttributesGroup.tsx index 123517a4ca..da2d3ee506 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditAttributesGroup.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditAttributesGroup.tsx @@ -9,7 +9,7 @@ export type EditAttributesGroupParams = { }; const AttributesGroupDetails = lazy( - () => import("../user-profile/AttributesGroupDetails") + () => import("../user-profile/AttributesGroupDetails"), ); export const EditAttributesGroupRoute: AppRouteObject = { @@ -22,7 +22,7 @@ export const EditAttributesGroupRoute: AppRouteObject = { }; export const toEditAttributesGroup = ( - params: EditAttributesGroupParams + params: EditAttributesGroupParams, ): Partial => ({ pathname: generatePath(EditAttributesGroupRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/EditClientPolicy.tsx b/js/apps/admin-ui/src/realm-settings/routes/EditClientPolicy.tsx index 7dbc27e76c..cb57cea5bd 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditClientPolicy.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditClientPolicy.tsx @@ -20,7 +20,7 @@ export const EditClientPolicyRoute: AppRouteObject = { }; export const toEditClientPolicy = ( - params: EditClientPolicyParams + params: EditClientPolicyParams, ): Partial => ({ pathname: generatePath(EditClientPolicyRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/EditCondition.tsx b/js/apps/admin-ui/src/realm-settings/routes/EditCondition.tsx index 9b1ba2a397..ec15d9bac4 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditCondition.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditCondition.tsx @@ -10,7 +10,7 @@ export type EditClientPolicyConditionParams = { }; const NewClientPolicyCondition = lazy( - () => import("../NewClientPolicyCondition") + () => import("../NewClientPolicyCondition"), ); export const EditClientPolicyConditionRoute: AppRouteObject = { @@ -23,7 +23,7 @@ export const EditClientPolicyConditionRoute: AppRouteObject = { }; export const toEditClientPolicyCondition = ( - params: EditClientPolicyConditionParams + params: EditClientPolicyConditionParams, ): Partial => ({ pathname: generatePath(EditClientPolicyConditionRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/KeyProvider.tsx b/js/apps/admin-ui/src/realm-settings/routes/KeyProvider.tsx index ed5d76f19d..7c0faa2977 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/KeyProvider.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/KeyProvider.tsx @@ -20,7 +20,7 @@ export type KeyProviderParams = { }; const KeyProviderForm = lazy( - () => import("../keys/key-providers/KeyProviderForm") + () => import("../keys/key-providers/KeyProviderForm"), ); export const KeyProviderFormRoute: AppRouteObject = { diff --git a/js/apps/admin-ui/src/realm-settings/routes/NewAttributesGroup.tsx b/js/apps/admin-ui/src/realm-settings/routes/NewAttributesGroup.tsx index 0a0ffadf32..b28496952c 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/NewAttributesGroup.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/NewAttributesGroup.tsx @@ -8,7 +8,7 @@ export type NewAttributesGroupParams = { }; const AttributesGroupDetails = lazy( - () => import("../user-profile/AttributesGroupDetails") + () => import("../user-profile/AttributesGroupDetails"), ); export const NewAttributesGroupRoute: AppRouteObject = { @@ -21,7 +21,7 @@ export const NewAttributesGroupRoute: AppRouteObject = { }; export const toNewAttributesGroup = ( - params: NewAttributesGroupParams + params: NewAttributesGroupParams, ): Partial => ({ pathname: generatePath(NewAttributesGroupRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/security-defences/BruteForceDetection.tsx b/js/apps/admin-ui/src/realm-settings/security-defences/BruteForceDetection.tsx index 3ba81c9fca..0004077efd 100644 --- a/js/apps/admin-ui/src/realm-settings/security-defences/BruteForceDetection.tsx +++ b/js/apps/admin-ui/src/realm-settings/security-defences/BruteForceDetection.tsx @@ -99,7 +99,7 @@ export const BruteForceDetection = ({ onMinus={() => field.onChange(field.value - 1)} onChange={(event) => field.onChange( - Number((event.target as HTMLInputElement).value) + Number((event.target as HTMLInputElement).value), ) } /> @@ -141,7 +141,7 @@ export const BruteForceDetection = ({ labelIcon={ @@ -161,7 +161,7 @@ export const BruteForceDetection = ({ onMinus={() => field.onChange(field.value - 1)} onChange={(event) => field.onChange( - Number((event.target as HTMLInputElement).value) + Number((event.target as HTMLInputElement).value), ) } /> diff --git a/js/apps/admin-ui/src/realm-settings/user-profile/AttributesGroupForm.tsx b/js/apps/admin-ui/src/realm-settings/user-profile/AttributesGroupForm.tsx index 5c91d61d8c..dfc4006964 100644 --- a/js/apps/admin-ui/src/realm-settings/user-profile/AttributesGroupForm.tsx +++ b/js/apps/admin-ui/src/realm-settings/user-profile/AttributesGroupForm.tsx @@ -39,7 +39,7 @@ function transformAnnotations(input: KeyValueType[]): Record { return Object.fromEntries( input .filter((annotation) => annotation.key.length > 0) - .map((annotation) => [annotation.key, annotation.value] as const) + .map((annotation) => [annotation.key, annotation.value] as const), ); } @@ -64,7 +64,7 @@ export default function AttributesGroupForm() { const matchingGroup = useMemo( () => config?.groups?.find(({ name }) => name === params.name), - [config?.groups] + [config?.groups], ); useEffect(() => { diff --git a/js/apps/admin-ui/src/realm-settings/user-profile/AttributesGroupTab.tsx b/js/apps/admin-ui/src/realm-settings/user-profile/AttributesGroupTab.tsx index 464074bc50..19777f3e85 100644 --- a/js/apps/admin-ui/src/realm-settings/user-profile/AttributesGroupTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/user-profile/AttributesGroupTab.tsx @@ -46,7 +46,7 @@ export const AttributesGroupTab = () => { continueButtonVariant: ButtonVariant.danger, onConfirm() { const groups = (config?.groups ?? []).filter( - (group) => group !== groupToDelete + (group) => group !== groupToDelete, ); save( @@ -54,7 +54,7 @@ export const AttributesGroupTab = () => { { successMessageKey: "realm-settings:deleteSuccess", errorMessageKey: "realm-settings:deleteAttributeGroupError", - } + }, ); }, }); diff --git a/js/apps/admin-ui/src/realm-settings/user-profile/AttributesTab.tsx b/js/apps/admin-ui/src/realm-settings/user-profile/AttributesTab.tsx index 4f201b5c37..97681c948a 100644 --- a/js/apps/admin-ui/src/realm-settings/user-profile/AttributesTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/user-profile/AttributesTab.tsx @@ -41,7 +41,7 @@ export const AttributesTab = () => { const executeMove = async ( attribute: UserProfileAttribute, - newIndex: number + newIndex: number, ) => { const fromIndex = config?.attributes!.findIndex((attr) => { return attr.name === attribute.name; @@ -57,12 +57,12 @@ export const AttributesTab = () => { { successMessageKey: "realm-settings:updatedUserProfileSuccess", errorMessageKey: "realm-settings:updatedUserProfileError", - } + }, ); }; const updatedAttributes = config?.attributes!.filter( - (attribute) => attribute.name !== attributeToDelete + (attribute) => attribute.name !== attributeToDelete, ); const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({ @@ -78,7 +78,7 @@ export const AttributesTab = () => { { successMessageKey: "realm-settings:deleteAttributeSuccess", errorMessageKey: "realm-settings:deleteAttributeError", - } + }, ); setAttributeToDelete(""); }, @@ -118,7 +118,9 @@ export const AttributesTab = () => { setData( filter === "allGroups" ? config.attributes - : config.attributes?.filter((attr) => attr.group === filter) + : config.attributes?.filter( + (attr) => attr.group === filter, + ), ); toggleIsFilterTypeDropdownOpen(); }} @@ -178,7 +180,7 @@ export const AttributesTab = () => { toAttribute({ realm: realmName, attributeName: component.name, - }) + }), ); }, }, diff --git a/js/apps/admin-ui/src/realm-settings/user-profile/UserProfileContext.tsx b/js/apps/admin-ui/src/realm-settings/user-profile/UserProfileContext.tsx index 29af81c943..c339c0574a 100644 --- a/js/apps/admin-ui/src/realm-settings/user-profile/UserProfileContext.tsx +++ b/js/apps/admin-ui/src/realm-settings/user-profile/UserProfileContext.tsx @@ -17,7 +17,7 @@ type UserProfileProps = { export type SaveCallback = ( updatedConfig: UserProfileConfig, - options?: SaveOptions + options?: SaveOptions, ) => Promise; export type SaveOptions = { @@ -40,7 +40,7 @@ export const UserProfileProvider = ({ children }: PropsWithChildren) => { useFetch( () => adminClient.users.getProfile({ realm }), (config) => setConfig(config), - [refreshCount] + [refreshCount], ); const save: SaveCallback = async (updatedConfig, options) => { @@ -56,7 +56,7 @@ export const UserProfileProvider = ({ children }: PropsWithChildren) => { setRefreshCount(refreshCount + 1); addAlert( t(options?.successMessageKey ?? "realm-settings:userProfileSuccess"), - AlertVariant.success + AlertVariant.success, ); return true; @@ -64,7 +64,7 @@ export const UserProfileProvider = ({ children }: PropsWithChildren) => { setIsSaving(false); addError( options?.errorMessageKey ?? "realm-settings:userProfileError", - error + error, ); return false; diff --git a/js/apps/admin-ui/src/realm-settings/user-profile/attribute/AddValidatorDialog.tsx b/js/apps/admin-ui/src/realm-settings/user-profile/attribute/AddValidatorDialog.tsx index 7bf45c63fb..5cc44899bb 100644 --- a/js/apps/admin-ui/src/realm-settings/user-profile/attribute/AddValidatorDialog.tsx +++ b/js/apps/admin-ui/src/realm-settings/user-profile/attribute/AddValidatorDialog.tsx @@ -68,7 +68,7 @@ export const AddValidatorDialog = ({
validator.key + (validator) => validator.key, )} onChange={setSelectedValidator} /> diff --git a/js/apps/admin-ui/src/realm-settings/user-profile/attribute/AttributeGeneralSettings.tsx b/js/apps/admin-ui/src/realm-settings/user-profile/attribute/AttributeGeneralSettings.tsx index 7865072cad..cc1e9567ec 100644 --- a/js/apps/admin-ui/src/realm-settings/user-profile/attribute/AttributeGeneralSettings.tsx +++ b/js/apps/admin-ui/src/realm-settings/user-profile/attribute/AttributeGeneralSettings.tsx @@ -171,7 +171,7 @@ export const AttributeGeneralSettings = () => { if (value) { form.setValue( "selector.scopes", - clientScopes.map((s) => s.name) + clientScopes.map((s) => s.name), ); } else { form.setValue("selector.scopes", []); @@ -191,7 +191,7 @@ export const AttributeGeneralSettings = () => { } else { form.setValue( "selector.scopes", - clientScopes.map((s) => s.name) + clientScopes.map((s) => s.name), ); } }} @@ -321,7 +321,7 @@ export const AttributeGeneralSettings = () => { if (value) { form.setValue( "required.scopes", - clientScopes.map((s) => s.name) + clientScopes.map((s) => s.name), ); } else { form.setValue("required.scopes", []); @@ -341,7 +341,7 @@ export const AttributeGeneralSettings = () => { } else { form.setValue( "required.scopes", - clientScopes.map((s) => s.name) + clientScopes.map((s) => s.name), ); } }} @@ -372,7 +372,7 @@ export const AttributeGeneralSettings = () => { if (field.value) { changedValue = field.value.includes(option) ? field.value.filter( - (item: string) => item !== option + (item: string) => item !== option, ) : [...field.value, option]; } else { diff --git a/js/apps/admin-ui/src/realm-settings/user-profile/attribute/AttributeValidations.tsx b/js/apps/admin-ui/src/realm-settings/user-profile/attribute/AttributeValidations.tsx index fb5edf69d3..d1a23903e7 100644 --- a/js/apps/admin-ui/src/realm-settings/user-profile/attribute/AttributeValidations.tsx +++ b/js/apps/admin-ui/src/realm-settings/user-profile/attribute/AttributeValidations.tsx @@ -51,7 +51,7 @@ export const AttributeValidations = () => { continueButtonVariant: ButtonVariant.danger, onConfirm: async () => { const updatedValidators = validators.filter( - (validator) => validator.key !== validatorToDelete + (validator) => validator.key !== validatorToDelete, ); setValue("validations", [...updatedValidators]); diff --git a/js/apps/admin-ui/src/realm-settings/user-profile/attribute/ValidatorSelect.tsx b/js/apps/admin-ui/src/realm-settings/user-profile/attribute/ValidatorSelect.tsx index b5bd8b454d..4e15daaed1 100644 --- a/js/apps/admin-ui/src/realm-settings/user-profile/attribute/ValidatorSelect.tsx +++ b/js/apps/admin-ui/src/realm-settings/user-profile/attribute/ValidatorSelect.tsx @@ -19,7 +19,7 @@ export const ValidatorSelect = ({ useServerInfo().componentTypes?.["org.keycloak.validate.Validator"] || []; const validators = useMemo( () => allValidator.filter(({ id }) => !selectedValidators.includes(id)), - [selectedValidators] + [selectedValidators], ); const [open, toggle] = useToggle(); const [value, setValue] = useState(); diff --git a/js/apps/admin-ui/src/root/AuthWall.tsx b/js/apps/admin-ui/src/root/AuthWall.tsx index 6997d64d65..9333fdf09d 100644 --- a/js/apps/admin-ui/src/root/AuthWall.tsx +++ b/js/apps/admin-ui/src/root/AuthWall.tsx @@ -6,7 +6,7 @@ import { useAccess } from "../context/access/Access"; function hasProp( data: object, - prop: K + prop: K, ): data is Record { return prop in data; } diff --git a/js/apps/admin-ui/src/sessions/RevocationModal.tsx b/js/apps/admin-ui/src/sessions/RevocationModal.tsx index e6543e2f18..30aac0042f 100644 --- a/js/apps/admin-ui/src/sessions/RevocationModal.tsx +++ b/js/apps/admin-ui/src/sessions/RevocationModal.tsx @@ -53,7 +53,7 @@ export const RevocationModal = ({ (realm) => { setRealm(realm); }, - [key] + [key], ); const parseResult = (result: GlobalRequestResult, prefixKey: string) => { @@ -67,20 +67,20 @@ export const RevocationModal = ({ t("clients:" + prefixKey + "Success", { successNodes: result.successRequests, }), - AlertVariant.success + AlertVariant.success, ); addAlert( t("clients:" + prefixKey + "Fail", { failedNodes: result.failedRequests, }), - AlertVariant.danger + AlertVariant.danger, ); } else { addAlert( t("clients:" + prefixKey + "Success", { successNodes: result.successRequests, }), - AlertVariant.success + AlertVariant.success, ); } }; @@ -92,7 +92,7 @@ export const RevocationModal = ({ { realm: realmName, notBefore: Date.now() / 1000, - } + }, ); addAlert(t("notBeforeSuccess"), AlertVariant.success); @@ -108,7 +108,7 @@ export const RevocationModal = ({ { realm: realmName, notBefore: 0, - } + }, ); addAlert(t("notBeforeClearedSuccess"), AlertVariant.success); refresh(); diff --git a/js/apps/admin-ui/src/sessions/SessionsSection.tsx b/js/apps/admin-ui/src/sessions/SessionsSection.tsx index bebb8498cf..b02a4e2b4c 100644 --- a/js/apps/admin-ui/src/sessions/SessionsSection.tsx +++ b/js/apps/admin-ui/src/sessions/SessionsSection.tsx @@ -84,7 +84,7 @@ export default function SessionsSection() { max: `${max}`, type: filterType, search: search || "", - } + }, ); setNoSessions(data.length === 0); return data; diff --git a/js/apps/admin-ui/src/sessions/SessionsTable.tsx b/js/apps/admin-ui/src/sessions/SessionsTable.tsx index 19180eafd2..360d38cb87 100644 --- a/js/apps/admin-ui/src/sessions/SessionsTable.tsx +++ b/js/apps/admin-ui/src/sessions/SessionsTable.tsx @@ -119,7 +119,7 @@ export default function SessionsTable({ ]; return defaultColumns.filter( - ({ name }) => !hiddenColumns.includes(name as ColumnName) + ({ name }) => !hiddenColumns.includes(name as ColumnName), ); }, [realm, hiddenColumns]); diff --git a/js/apps/admin-ui/src/user-federation/ManagePriorityDialog.tsx b/js/apps/admin-ui/src/user-federation/ManagePriorityDialog.tsx index 35f1a1dc52..225950a05c 100644 --- a/js/apps/admin-ui/src/user-federation/ManagePriorityDialog.tsx +++ b/js/apps/admin-ui/src/user-federation/ManagePriorityDialog.tsx @@ -36,7 +36,7 @@ export const ManagePriorityDialog = ({ const [id, setId] = useState(""); const [liveText, setLiveText] = useState(""); const [order, setOrder] = useState( - components.map((component) => component.name!) + components.map((component) => component.name!), ); const onDragStart = (id: string) => { @@ -73,7 +73,7 @@ export const ManagePriorityDialog = ({ component.config!.priority = [index.toString()]; return adminClient.components.update( { id: component.id! }, - component + component, ); }); diff --git a/js/apps/admin-ui/src/user-federation/UserFederationKerberosSettings.tsx b/js/apps/admin-ui/src/user-federation/UserFederationKerberosSettings.tsx index 66a7ba35ee..2217bcb889 100644 --- a/js/apps/admin-ui/src/user-federation/UserFederationKerberosSettings.tsx +++ b/js/apps/admin-ui/src/user-federation/UserFederationKerberosSettings.tsx @@ -43,7 +43,7 @@ export default function UserFederationKerberosSettings() { throw new Error(t("common:notFound")); } }, - [] + [], ); const setupForm = (component: ComponentRepresentation) => { diff --git a/js/apps/admin-ui/src/user-federation/UserFederationLdapForm.tsx b/js/apps/admin-ui/src/user-federation/UserFederationLdapForm.tsx index 5935c2bba7..ccac8f70e7 100644 --- a/js/apps/admin-ui/src/user-federation/UserFederationLdapForm.tsx +++ b/js/apps/admin-ui/src/user-federation/UserFederationLdapForm.tsx @@ -91,7 +91,7 @@ export const UserFederationLdapForm = ({ }; export function serializeFormData( - formData: LdapComponentRepresentation + formData: LdapComponentRepresentation, ): LdapComponentRepresentation { const { config } = formData; diff --git a/js/apps/admin-ui/src/user-federation/UserFederationLdapSettings.tsx b/js/apps/admin-ui/src/user-federation/UserFederationLdapSettings.tsx index be2f1d9995..fc3cf8b3f2 100644 --- a/js/apps/admin-ui/src/user-federation/UserFederationLdapSettings.tsx +++ b/js/apps/admin-ui/src/user-federation/UserFederationLdapSettings.tsx @@ -54,7 +54,7 @@ export default function UserFederationLdapSettings() { setComponent(component); setupForm(component); }, - [id, refreshCount] + [id, refreshCount], ); const useTab = (tab: UserFederationLdapTab) => @@ -67,12 +67,12 @@ export default function UserFederationLdapSettings() { form.reset(component); form.setValue( "config.periodicChangedUsersSync", - component.config?.["changedSyncPeriod"]?.[0] !== "-1" + component.config?.["changedSyncPeriod"]?.[0] !== "-1", ); form.setValue( "config.periodicFullSync", - component.config?.["fullSyncPeriod"]?.[0] !== "-1" + component.config?.["fullSyncPeriod"]?.[0] !== "-1", ); }; @@ -80,7 +80,7 @@ export default function UserFederationLdapSettings() { try { await adminClient.components.update( { id: id! }, - serializeFormData(formData) + serializeFormData(formData), ); addAlert(t("saveSuccess"), AlertVariant.success); refresh(); diff --git a/js/apps/admin-ui/src/user-federation/UserFederationSection.tsx b/js/apps/admin-ui/src/user-federation/UserFederationSection.tsx index 4cd8e213f4..c96bace339 100644 --- a/js/apps/admin-ui/src/user-federation/UserFederationSection.tsx +++ b/js/apps/admin-ui/src/user-federation/UserFederationSection.tsx @@ -67,7 +67,7 @@ export default function UserFederationSection() { (userFederations) => { setUserFederations(userFederations); }, - [key] + [key], ); const ufAddProviderDropdownItems = useMemo( @@ -84,7 +84,7 @@ export default function UserFederationSection() { : toUpperCase(p.id)} )), - [] + [], ); const lowerButtonProps = { @@ -211,7 +211,7 @@ export default function UserFederationSection() { key={p.id} onClick={() => navigate( - toNewCustomUserFederation({ realm, providerId: p.id! }) + toNewCustomUserFederation({ realm, providerId: p.id! }), ) } data-testid={`${p.id}-card`} diff --git a/js/apps/admin-ui/src/user-federation/custom/CustomProviderSettings.tsx b/js/apps/admin-ui/src/user-federation/custom/CustomProviderSettings.tsx index 7649df9ecc..ef15d0950f 100644 --- a/js/apps/admin-ui/src/user-federation/custom/CustomProviderSettings.tsx +++ b/js/apps/admin-ui/src/user-federation/custom/CustomProviderSettings.tsx @@ -69,7 +69,7 @@ export default function CustomProviderSettings() { throw new Error(t("common:notFound")); } }, - [] + [], ); useFetch( @@ -78,7 +78,7 @@ export default function CustomProviderSettings() { realm: realmName, }), (realm) => setParentId(realm?.id!), - [] + [], ); const save = async (component: ComponentRepresentation) => { @@ -88,7 +88,7 @@ export default function CustomProviderSettings() { Object.entries(component.config || {}).map(([key, value]) => [ key, Array.isArray(value) ? value : [value], - ]) + ]), ), providerId, providerType: "org.keycloak.storage.UserStorageProvider", diff --git a/js/apps/admin-ui/src/user-federation/kerberos/KerberosSettingsRequired.tsx b/js/apps/admin-ui/src/user-federation/kerberos/KerberosSettingsRequired.tsx index d334990917..b0ebb4a32e 100644 --- a/js/apps/admin-ui/src/user-federation/kerberos/KerberosSettingsRequired.tsx +++ b/js/apps/admin-ui/src/user-federation/kerberos/KerberosSettingsRequired.tsx @@ -44,7 +44,7 @@ export const KerberosSettingsRequired = ({ useFetch( () => adminClient.realms.findOne({ realm }), (result) => form.setValue("parentId", result!.id), - [] + [], ); return ( @@ -253,7 +253,7 @@ export const KerberosSettingsRequired = ({ labelIcon={ diff --git a/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsAdvanced.tsx b/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsAdvanced.tsx index 9d125c93d1..d048c236d3 100644 --- a/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsAdvanced.tsx +++ b/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsAdvanced.tsx @@ -37,11 +37,11 @@ export const LdapSettingsAdvanced = ({ const settings = convertFormToSettings(form); const ldapOids = await adminClient.realms.ldapServerCapabilities( { realm }, - { ...settings, componentId: id } + { ...settings, componentId: id }, ); addAlert(t("testSuccess")); const passwordModifyOid = ldapOids.filter( - (id: { oid: string }) => id.oid === PASSWORD_MODIFY_OID + (id: { oid: string }) => id.oid === PASSWORD_MODIFY_OID, ); form.setValue("config.usePasswordModifyExtendedOp", [ (passwordModifyOid.length > 0).toString(), diff --git a/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsConnection.tsx b/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsConnection.tsx index 4ccc717db8..2caa702324 100644 --- a/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsConnection.tsx +++ b/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsConnection.tsx @@ -70,7 +70,7 @@ export const LdapSettingsConnection = ({ const settings = convertFormToSettings(form); await adminClient.realms.testLDAPConnection( { realm }, - { ...settings, action: testType, componentId: id } + { ...settings, action: testType, componentId: id }, ); addAlert(t("testSuccess"), AlertVariant.success); } catch (error) { @@ -95,7 +95,7 @@ export const LdapSettingsConnection = ({ @@ -106,7 +106,7 @@ export const LdapSettingsConnection = ({ labelIcon={ diff --git a/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsGeneral.tsx b/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsGeneral.tsx index f13d146d5f..273ec7acd1 100644 --- a/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsGeneral.tsx +++ b/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsGeneral.tsx @@ -37,7 +37,7 @@ export const LdapSettingsGeneral = ({ useFetch( () => adminClient.realms.findOne({ realm }), (result) => form.setValue("parentId", result!.id), - [] + [], ); const [isVendorDropdownOpen, setIsVendorDropdownOpen] = useState(false); @@ -49,7 +49,7 @@ export const LdapSettingsGeneral = ({ form.setValue("config.uuidLDAPAttribute[0]", "objectGUID"); form.setValue( "config.userObjectClasses[0]", - "person, organizationalPerson, user" + "person, organizationalPerson, user", ); break; case "rhds": @@ -58,7 +58,7 @@ export const LdapSettingsGeneral = ({ form.setValue("config.uuidLDAPAttribute[0]", "nsuniqueid"); form.setValue( "config.userObjectClasses[0]", - "inetOrgPerson, organizationalPerson" + "inetOrgPerson, organizationalPerson", ); break; case "tivoli": @@ -67,7 +67,7 @@ export const LdapSettingsGeneral = ({ form.setValue("config.uuidLDAPAttribute[0]", "uniqueidentifier"); form.setValue( "config.userObjectClasses[0]", - "inetOrgPerson, organizationalPerson" + "inetOrgPerson, organizationalPerson", ); break; case "edirectory": @@ -76,7 +76,7 @@ export const LdapSettingsGeneral = ({ form.setValue("config.uuidLDAPAttribute[0]", "guid"); form.setValue( "config.userObjectClasses[0]", - "inetOrgPerson, organizationalPerson" + "inetOrgPerson, organizationalPerson", ); break; case "other": @@ -85,7 +85,7 @@ export const LdapSettingsGeneral = ({ form.setValue("config.uuidLDAPAttribute[0]", "entryUUID"); form.setValue( "config.userObjectClasses[0]", - "inetOrgPerson, organizationalPerson" + "inetOrgPerson, organizationalPerson", ); break; default: diff --git a/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsKerberosIntegration.tsx b/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsKerberosIntegration.tsx index 4995c0af6e..c6254f3231 100644 --- a/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsKerberosIntegration.tsx +++ b/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsKerberosIntegration.tsx @@ -43,7 +43,7 @@ export const LdapSettingsKerberosIntegration = ({ labelIcon={ @@ -222,7 +222,7 @@ export const LdapSettingsKerberosIntegration = ({ labelIcon={ diff --git a/js/apps/admin-ui/src/user-federation/ldap/mappers/LdapMapperDetails.tsx b/js/apps/admin-ui/src/user-federation/ldap/mappers/LdapMapperDetails.tsx index a3aeb77472..35fa91267d 100644 --- a/js/apps/admin-ui/src/user-federation/ldap/mappers/LdapMapperDetails.tsx +++ b/js/apps/admin-ui/src/user-federation/ldap/mappers/LdapMapperDetails.tsx @@ -73,7 +73,7 @@ export default function LdapMapperDetails() { if (fetchedMapper) setupForm(fetchedMapper); }, - [] + [], ); const setupForm = (mapper: ComponentRepresentation) => { @@ -90,7 +90,7 @@ export default function LdapMapperDetails() { result[key] = Array.isArray(value) ? value : [value]; return result; }, - {} as Record + {} as Record, ), }; @@ -98,7 +98,7 @@ export default function LdapMapperDetails() { if (mapperId === "new") { await adminClient.components.create(map); navigate( - toUserFederationLdap({ realm, id: mapper.parentId!, tab: "mappers" }) + toUserFederationLdap({ realm, id: mapper.parentId!, tab: "mappers" }), ); } else { await adminClient.components.update({ id: mapperId }, map); @@ -108,16 +108,16 @@ export default function LdapMapperDetails() { t( mapperId === "new" ? "common:mappingCreatedSuccess" - : "common:mappingUpdatedSuccess" + : "common:mappingUpdatedSuccess", ), - AlertVariant.success + AlertVariant.success, ); } catch (error) { addError( mapperId === "new" ? "common:mappingCreatedError" : "common:mappingUpdatedError", - error + error, ); } }; @@ -132,7 +132,7 @@ export default function LdapMapperDetails() { addAlert( t("syncLDAPGroupsSuccessful", { result: result.status, - }) + }), ); } catch (error) { addError("user-federation:syncLDAPGroupsError", error); @@ -350,7 +350,7 @@ export default function LdapMapperDetails() { : navigate( `/${realm}/user-federation/ldap/${ mapping!.parentId - }/mappers` + }/mappers`, ) } data-testid="ldap-mapper-cancel" diff --git a/js/apps/admin-ui/src/user-federation/ldap/mappers/LdapMapperList.tsx b/js/apps/admin-ui/src/user-federation/ldap/mappers/LdapMapperList.tsx index 27b07d4566..87012df854 100644 --- a/js/apps/admin-ui/src/user-federation/ldap/mappers/LdapMapperList.tsx +++ b/js/apps/admin-ui/src/user-federation/ldap/mappers/LdapMapperList.tsx @@ -62,11 +62,11 @@ export const LdapMapperList = ({ toCreate, toDetail }: LdapMapperListProps) => { name: mapper.name, type: mapper.providerId, })), - mapByKey("name") - ) + mapByKey("name"), + ), ); }, - [key] + [key], ); const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({ diff --git a/js/apps/admin-ui/src/user-federation/routes/CustomUserFederation.tsx b/js/apps/admin-ui/src/user-federation/routes/CustomUserFederation.tsx index df6928a2e4..750c88450e 100644 --- a/js/apps/admin-ui/src/user-federation/routes/CustomUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/CustomUserFederation.tsx @@ -11,7 +11,7 @@ export type CustomUserFederationRouteParams = { }; const CustomProviderSettings = lazy( - () => import("../custom/CustomProviderSettings") + () => import("../custom/CustomProviderSettings"), ); export const CustomUserFederationRoute: AppRouteObject = { @@ -24,7 +24,7 @@ export const CustomUserFederationRoute: AppRouteObject = { }; export const toCustomUserFederation = ( - params: CustomUserFederationRouteParams + params: CustomUserFederationRouteParams, ): Partial => ({ pathname: generatePath(CustomUserFederationRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user-federation/routes/NewCustomUserFederation.tsx b/js/apps/admin-ui/src/user-federation/routes/NewCustomUserFederation.tsx index 81d8bf732e..a8a35eafc5 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewCustomUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewCustomUserFederation.tsx @@ -10,7 +10,7 @@ export type NewCustomUserFederationRouteParams = { }; const CustomProviderSettings = lazy( - () => import("../custom/CustomProviderSettings") + () => import("../custom/CustomProviderSettings"), ); export const NewCustomUserFederationRoute: AppRouteObject = { @@ -23,7 +23,7 @@ export const NewCustomUserFederationRoute: AppRouteObject = { }; export const toNewCustomUserFederation = ( - params: NewCustomUserFederationRouteParams + params: NewCustomUserFederationRouteParams, ): Partial => ({ pathname: generatePath(NewCustomUserFederationRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user-federation/routes/NewKerberosUserFederation.tsx b/js/apps/admin-ui/src/user-federation/routes/NewKerberosUserFederation.tsx index 083dac8d81..bde2930bb0 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewKerberosUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewKerberosUserFederation.tsx @@ -6,7 +6,7 @@ import type { AppRouteObject } from "../../routes"; export type NewKerberosUserFederationParams = { realm: string }; const UserFederationKerberosSettings = lazy( - () => import("../UserFederationKerberosSettings") + () => import("../UserFederationKerberosSettings"), ); export const NewKerberosUserFederationRoute: AppRouteObject = { @@ -19,7 +19,7 @@ export const NewKerberosUserFederationRoute: AppRouteObject = { }; export const toNewKerberosUserFederation = ( - params: NewKerberosUserFederationParams + params: NewKerberosUserFederationParams, ): Partial => ({ pathname: generatePath(NewKerberosUserFederationRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user-federation/routes/NewLdapUserFederation.tsx b/js/apps/admin-ui/src/user-federation/routes/NewLdapUserFederation.tsx index 2ba12a5b2d..2be4cd430a 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewLdapUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewLdapUserFederation.tsx @@ -6,7 +6,7 @@ import type { AppRouteObject } from "../../routes"; export type NewLdapUserFederationParams = { realm: string }; const CreateUserFederationLdapSettings = lazy( - () => import("../CreateUserFederationLdapSettings") + () => import("../CreateUserFederationLdapSettings"), ); export const NewLdapUserFederationRoute: AppRouteObject = { @@ -20,7 +20,7 @@ export const NewLdapUserFederationRoute: AppRouteObject = { }; export const toNewLdapUserFederation = ( - params: NewLdapUserFederationParams + params: NewLdapUserFederationParams, ): Partial => ({ pathname: generatePath(NewLdapUserFederationRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user-federation/routes/UserFederation.tsx b/js/apps/admin-ui/src/user-federation/routes/UserFederation.tsx index ee0c147db3..45ef09ee59 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederation.tsx @@ -17,7 +17,7 @@ export const UserFederationRoute: AppRouteObject = { }; export const toUserFederation = ( - params: UserFederationParams + params: UserFederationParams, ): Partial => ({ pathname: generatePath(UserFederationRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user-federation/routes/UserFederationKerberos.tsx b/js/apps/admin-ui/src/user-federation/routes/UserFederationKerberos.tsx index abae1ca438..d7ae857131 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationKerberos.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationKerberos.tsx @@ -9,7 +9,7 @@ export type UserFederationKerberosParams = { }; const UserFederationKerberosSettings = lazy( - () => import("../UserFederationKerberosSettings") + () => import("../UserFederationKerberosSettings"), ); export const UserFederationKerberosRoute: AppRouteObject = { @@ -22,7 +22,7 @@ export const UserFederationKerberosRoute: AppRouteObject = { }; export const toUserFederationKerberos = ( - params: UserFederationKerberosParams + params: UserFederationKerberosParams, ): Partial => ({ pathname: generatePath(UserFederationKerberosRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user-federation/routes/UserFederationLdap.tsx b/js/apps/admin-ui/src/user-federation/routes/UserFederationLdap.tsx index 047221d153..f903053745 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationLdap.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationLdap.tsx @@ -12,7 +12,7 @@ export type UserFederationLdapParams = { }; const UserFederationLdapSettings = lazy( - () => import("../UserFederationLdapSettings") + () => import("../UserFederationLdapSettings"), ); export const UserFederationLdapRoute: AppRouteObject = { @@ -30,7 +30,7 @@ export const UserFederationLdapWithTabRoute: AppRouteObject = { }; export const toUserFederationLdap = ( - params: UserFederationLdapParams + params: UserFederationLdapParams, ): Partial => { const path = params.tab ? UserFederationLdapWithTabRoute.path diff --git a/js/apps/admin-ui/src/user-federation/routes/UserFederationLdapMapper.tsx b/js/apps/admin-ui/src/user-federation/routes/UserFederationLdapMapper.tsx index 99f32b7ba9..48219df719 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationLdapMapper.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationLdapMapper.tsx @@ -10,7 +10,7 @@ export type UserFederationLdapMapperParams = { }; const LdapMapperDetails = lazy( - () => import("../ldap/mappers/LdapMapperDetails") + () => import("../ldap/mappers/LdapMapperDetails"), ); export const UserFederationLdapMapperRoute: AppRouteObject = { @@ -23,7 +23,7 @@ export const UserFederationLdapMapperRoute: AppRouteObject = { }; export const toUserFederationLdapMapper = ( - params: UserFederationLdapMapperParams + params: UserFederationLdapMapperParams, ): Partial => ({ pathname: generatePath(UserFederationLdapMapperRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user-federation/routes/UserFederationsKerberos.tsx b/js/apps/admin-ui/src/user-federation/routes/UserFederationsKerberos.tsx index 065c897774..7f4a41871b 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationsKerberos.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationsKerberos.tsx @@ -16,7 +16,7 @@ export const UserFederationsKerberosRoute: AppRouteObject = { }; export const toUserFederationsKerberos = ( - params: UserFederationsKerberosParams + params: UserFederationsKerberosParams, ): Partial => ({ pathname: generatePath(UserFederationsKerberosRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user-federation/routes/UserFederationsLdap.tsx b/js/apps/admin-ui/src/user-federation/routes/UserFederationsLdap.tsx index ad0d4a5652..b02fda3ecc 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationsLdap.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationsLdap.tsx @@ -16,7 +16,7 @@ export const UserFederationsLdapRoute: AppRouteObject = { }; export const toUserFederationsLdap = ( - params: UserFederationsLdapParams + params: UserFederationsLdapParams, ): Partial => ({ pathname: generatePath(UserFederationsLdapRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user-federation/shared/ExtendedHeader.tsx b/js/apps/admin-ui/src/user-federation/shared/ExtendedHeader.tsx index 43aa5bc9b8..e95029c723 100644 --- a/js/apps/admin-ui/src/user-federation/shared/ExtendedHeader.tsx +++ b/js/apps/admin-ui/src/user-federation/shared/ExtendedHeader.tsx @@ -81,7 +81,7 @@ export const ExtendedHeader = ({ addAlert( t("syncUsersSuccess") + `${response.added} users added, ${response.updated} users updated, ${response.removed} users removed, ${response.failed} users failed.`, - AlertVariant.success + AlertVariant.success, ); } } @@ -103,7 +103,7 @@ export const ExtendedHeader = ({ addAlert( t("syncUsersSuccess") + `${response.added} users added, ${response.updated} users updated, ${response.removed} users removed, ${response.failed} users failed.`, - AlertVariant.success + AlertVariant.success, ); } } diff --git a/js/apps/admin-ui/src/user-federation/shared/SettingsCache.tsx b/js/apps/admin-ui/src/user-federation/shared/SettingsCache.tsx index e04ab3bd5c..6299c0d89a 100644 --- a/js/apps/admin-ui/src/user-federation/shared/SettingsCache.tsx +++ b/js/apps/admin-ui/src/user-federation/shared/SettingsCache.tsx @@ -50,7 +50,7 @@ const CacheFields = ({ form }: { form: UseFormReturn }) => { hourOptions.push( {hourDisplay} - + , ); } @@ -69,7 +69,7 @@ const CacheFields = ({ form }: { form: UseFormReturn }) => { minuteOptions.push( {minuteDisplay} - + , ); } diff --git a/js/apps/admin-ui/src/user/EditUser.tsx b/js/apps/admin-ui/src/user/EditUser.tsx index 3b1b5ce360..428917b840 100644 --- a/js/apps/admin-ui/src/user/EditUser.tsx +++ b/js/apps/admin-ui/src/user/EditUser.tsx @@ -75,7 +75,7 @@ export default function EditUser() { setUser(user); setBruteForced(bruteForced); }, - [refreshCount] + [refreshCount], ); if (!user || !bruteForced) { @@ -115,7 +115,7 @@ const EditUserForm = ({ user, bruteForced, refresh }: EditUserFormProps) => { } setRealmRepresentattion(realm); }, - [] + [], ); const isFeatureEnabled = useIsFeatureEnabled(); @@ -152,7 +152,7 @@ const EditUserForm = ({ user, bruteForced, refresh }: EditUserFormProps) => { ...formUser, username: formUser.username?.trim(), attributes: { ...user.attributes, ...formUser.attributes }, - } + }, ); addAlert(t("userSaved"), AlertVariant.success); refresh(); @@ -189,7 +189,7 @@ const EditUserForm = ({ user, bruteForced, refresh }: EditUserFormProps) => { try { const data = await adminClient.users.impersonation( { id: user.id! }, - { user: user.id!, realm } + { user: user.id!, realm }, ); if (data.sameRealm) { window.location = data.redirect; diff --git a/js/apps/admin-ui/src/user/FederatedUserLink.tsx b/js/apps/admin-ui/src/user/FederatedUserLink.tsx index 47794066aa..6b8b7e0db8 100644 --- a/js/apps/admin-ui/src/user/FederatedUserLink.tsx +++ b/js/apps/admin-ui/src/user/FederatedUserLink.tsx @@ -30,7 +30,7 @@ export const FederatedUserLink = ({ user }: FederatedUserLinkProps) => { id: (user.federationLink || user.origin)!, }), setComponent, - [] + [], ); if (!component) return null; diff --git a/js/apps/admin-ui/src/user/UserCredentials.tsx b/js/apps/admin-ui/src/user/UserCredentials.tsx index 355688e5b4..87900a473a 100644 --- a/js/apps/admin-ui/src/user/UserCredentials.tsx +++ b/js/apps/admin-ui/src/user/UserCredentials.tsx @@ -93,21 +93,21 @@ export const UserCredentials = ({ user }: UserCredentialsProps) => { }, Object.create(null)); const groupedCredentialsArray = Object.keys(groupedCredentials).map( - (key) => ({ key, value: groupedCredentials[key] }) + (key) => ({ key, value: groupedCredentials[key] }), ); setGroupedUserCredentials( groupedCredentialsArray.map((groupedCredential) => ({ ...groupedCredential, isExpanded: false, - })) + })), ); }, - [key] + [key], ); const passwordTypeFinder = userCredentials.find( - (credential) => credential.type === "password" + (credential) => credential.type === "password", ); const toggleModal = () => setIsOpen(!isOpen); @@ -179,7 +179,7 @@ export const UserCredentials = ({ user }: UserCredentialsProps) => { ? groupedCredential.value.map((c) => c.id!) : []), ]), - [groupedUserCredentials] + [groupedUserCredentials], ); const onDragStart = (evt: ReactDragEvent) => { @@ -267,7 +267,7 @@ export const UserCredentials = ({ user }: UserCredentialsProps) => { } else { const dragId = curListItem.id; const draggingToItemIndex = Array.from( - bodyRef.current?.children || [] + bodyRef.current?.children || [], ).findIndex((item) => item.id === dragId); if (draggingToItemIndex === state.draggingToItemIndex) { return; @@ -275,7 +275,7 @@ export const UserCredentials = ({ user }: UserCredentialsProps) => { const tempItemOrder = moveItem( itemOrder, state.draggedItemId, - draggingToItemIndex + draggingToItemIndex, ); move(tempItemOrder); setState({ @@ -337,7 +337,7 @@ export const UserCredentials = ({ user }: UserCredentialsProps) => { useFetch( () => adminClient.users.getUserStorageCredentialTypes({ id: user.id! }), setCredentialTypes, - [] + [], ); if (!credentialTypes) { @@ -434,7 +434,7 @@ export const UserCredentials = ({ user }: UserCredentialsProps) => { } draggableRow={{ id: `draggable-row-${groupedCredential.value.map( - ({ id }) => id + ({ id }) => id, )}`, }} /> @@ -452,7 +452,7 @@ export const UserCredentials = ({ user }: UserCredentialsProps) => { ...credential, isExpanded: !credential.isExpanded, } - : credential + : credential, ); setGroupedUserCredentials(rows); }, @@ -488,7 +488,7 @@ export const UserCredentials = ({ user }: UserCredentialsProps) => { className="kc-draggable-dropdown-type-icon" draggableRow={{ id: `draggable-row-${groupedCredential.value.map( - ({ id }) => id + ({ id }) => id, )}`, }} /> diff --git a/js/apps/admin-ui/src/user/UserForm.tsx b/js/apps/admin-ui/src/user/UserForm.tsx index b121a438a9..0d2f6d02c2 100644 --- a/js/apps/admin-ui/src/user/UserForm.tsx +++ b/js/apps/admin-ui/src/user/UserForm.tsx @@ -108,7 +108,7 @@ export const UserForm = ({ } = useFormContext(); const watchUsernameInput = watch("username"); const [selectedGroups, setSelectedGroups] = useState( - [] + [], ); const [open, setOpen] = useState(false); const [locked, setLocked] = useState(isLocked); diff --git a/js/apps/admin-ui/src/user/UserGroups.tsx b/js/apps/admin-ui/src/user/UserGroups.tsx index 0a276d1270..151594384c 100644 --- a/js/apps/admin-ui/src/user/UserGroups.tsx +++ b/js/apps/admin-ui/src/user/UserGroups.tsx @@ -35,7 +35,7 @@ export const UserGroups = ({ user }: UserGroupsProps) => { const refresh = () => setKey(key + 1); const [selectedGroups, setSelectedGroups] = useState( - [] + [], ); const [isDirectMembership, setDirectMembership] = useState(true); @@ -79,7 +79,7 @@ export const UserGroups = ({ user }: UserGroupsProps) => { ...paths.map((p) => ({ name: p, path: g.path?.substring(0, g.path.indexOf(p) + p.length), - })) + })), ); }); @@ -109,8 +109,8 @@ export const UserGroups = ({ user }: UserGroupsProps) => { adminClient.users.delFromGroup({ id: user.id!, groupId: group.id!, - }) - ) + }), + ), ); addAlert(t("removedGroupMembership"), AlertVariant.success); @@ -133,8 +133,8 @@ export const UserGroups = ({ user }: UserGroupsProps) => { adminClient.users.addToGroup({ id: user.id!, groupId: group.id!, - }) - ) + }), + ), ); addAlert(t("addedGroupMembership"), AlertVariant.success); @@ -175,7 +175,7 @@ export const UserGroups = ({ user }: UserGroupsProps) => { isDirectMembership ? setSelectedGroups(groups) : setSelectedGroups( - intersectionBy(groups, directMembershipList, "id") + intersectionBy(groups, directMembershipList, "id"), ) } isRowDisabled={(group) => diff --git a/js/apps/admin-ui/src/user/UserIdPModal.tsx b/js/apps/admin-ui/src/user/UserIdPModal.tsx index 89e090b770..eebc06a24e 100644 --- a/js/apps/admin-ui/src/user/UserIdPModal.tsx +++ b/js/apps/admin-ui/src/user/UserIdPModal.tsx @@ -41,7 +41,7 @@ export const UserIdpModal = ({ }); const onSubmit = async ( - federatedIdentity: FederatedIdentityRepresentation + federatedIdentity: FederatedIdentityRepresentation, ) => { try { await adminClient.users.addToFederatedIdentity({ diff --git a/js/apps/admin-ui/src/user/UserIdentityProviderLinks.tsx b/js/apps/admin-ui/src/user/UserIdentityProviderLinks.tsx index 67687bde35..0ac1acfc1b 100644 --- a/js/apps/admin-ui/src/user/UserIdentityProviderLinks.tsx +++ b/js/apps/admin-ui/src/user/UserIdentityProviderLinks.tsx @@ -57,7 +57,7 @@ export const UserIdentityProviderLinks = ({ })) as WithProviderId[]; for (const element of allFedIds) { element.providerId = allProviders.find( - (item) => item.alias === element.identityProvider + (item) => item.alias === element.identityProvider, )?.providerId!; } @@ -74,11 +74,11 @@ export const UserIdentityProviderLinks = ({ const availableIdPsLoader = async () => { const linkedNames = (await getFederatedIdentities()).map( - (x) => x.identityProvider + (x) => x.identityProvider, ); return (await getAvailableIdPs())?.filter( - (item) => !linkedNames.includes(item.alias) + (item) => !linkedNames.includes(item.alias), )!; }; @@ -122,7 +122,7 @@ export const UserIdentityProviderLinks = ({ const badgeRenderer1 = (idp: FederatedIdentityRepresentation) => { const groupName = identityProviders?.find( - (provider) => provider["id"] === idp.identityProvider + (provider) => provider["id"] === idp.identityProvider, )?.groupName!; return (