From b87302bb2cbeb6e0a064f5dd5c2396988577dee8 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Tue, 3 Oct 2023 15:05:21 +0200 Subject: [PATCH 1/5] added ability to have `/` in url --- .../src/clients/routes/DedicatedScopeDetails.tsx | 2 +- js/apps/admin-ui/src/clients/routes/Mapper.tsx | 2 +- js/apps/admin-ui/src/util.ts | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx b/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx index 3868ec7ac83c..18ca1e07ce00 100644 --- a/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx @@ -1,7 +1,7 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; import type { AppRouteObject } from "../../routes"; +import { generatePath } from "../../util"; export type DedicatedScopeTab = "mappers" | "scope"; diff --git a/js/apps/admin-ui/src/clients/routes/Mapper.tsx b/js/apps/admin-ui/src/clients/routes/Mapper.tsx index b361c82a3c0d..d73fd83eab16 100644 --- a/js/apps/admin-ui/src/clients/routes/Mapper.tsx +++ b/js/apps/admin-ui/src/clients/routes/Mapper.tsx @@ -1,7 +1,7 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; import type { AppRouteObject } from "../../routes"; +import { generatePath } from "../../util"; export type MapperParams = { realm: string; diff --git a/js/apps/admin-ui/src/util.ts b/js/apps/admin-ui/src/util.ts index bf33712aca0c..d6ba7a9a97b8 100644 --- a/js/apps/admin-ui/src/util.ts +++ b/js/apps/admin-ui/src/util.ts @@ -2,10 +2,10 @@ import { saveAs } from "file-saver"; import { cloneDeep } from "lodash-es"; import { FieldValues, Path, PathValue, UseFormSetValue } from "react-hook-form"; import { flatten } from "flat"; - import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation"; import type { ProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation"; import type { IFormatter, IFormatterValueType } from "@patternfly/react-table"; +import { generatePath as generateUnencodedPath } from "react-router-dom"; import { arrayToKeyValue, @@ -171,3 +171,17 @@ export const addTrailingSlash = (url: string) => url.endsWith("/") ? url : url + "/"; export const generateId = () => Math.floor(Math.random() * 1000); + +export function generatePath( + originalPath: Path, + params?: { + [key: string]: string | null; + }, +): string { + if (params) + Object.entries(params).forEach( + ([k, v]) => (params[k] = encodeURIComponent(v || "")), + ); + //@ts-ignore as PathParam isn't an exported type + return generateUnencodedPath(originalPath, params); +} From 27524d8fba8a85c384357d7705a2ab3496800b47 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Tue, 3 Oct 2023 15:27:23 +0200 Subject: [PATCH 2/5] use the new util function everywhere --- js/apps/admin-ui/src/authentication/routes/Authentication.tsx | 2 +- js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx | 2 +- js/apps/admin-ui/src/authentication/routes/Flow.tsx | 2 +- js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx | 2 +- js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx | 2 +- js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx | 2 +- js/apps/admin-ui/src/client-scopes/routes/NewClientScope.tsx | 2 +- js/apps/admin-ui/src/clients/routes/AddClient.tsx | 2 +- js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx | 2 +- js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx | 2 +- js/apps/admin-ui/src/clients/routes/Client.tsx | 2 +- js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx | 2 +- js/apps/admin-ui/src/clients/routes/ClientRole.tsx | 2 +- js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx | 2 +- js/apps/admin-ui/src/clients/routes/Clients.tsx | 2 +- .../admin-ui/src/clients/routes/CreateInitialAccessToken.tsx | 2 +- js/apps/admin-ui/src/clients/routes/ImportClient.tsx | 2 +- js/apps/admin-ui/src/clients/routes/NewPermission.tsx | 2 +- js/apps/admin-ui/src/clients/routes/NewPolicy.tsx | 2 +- js/apps/admin-ui/src/clients/routes/NewResource.tsx | 2 +- js/apps/admin-ui/src/clients/routes/NewRole.tsx | 2 +- js/apps/admin-ui/src/clients/routes/NewScope.tsx | 2 +- js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx | 2 +- js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx | 2 +- js/apps/admin-ui/src/clients/routes/Resource.tsx | 2 +- js/apps/admin-ui/src/clients/routes/Scope.tsx | 2 +- js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx | 2 +- js/apps/admin-ui/src/events/routes/Events.tsx | 2 +- js/apps/admin-ui/src/groups/routes/Groups.tsx | 2 +- js/apps/admin-ui/src/identity-providers/routes/AddMapper.tsx | 2 +- js/apps/admin-ui/src/identity-providers/routes/EditMapper.tsx | 2 +- .../admin-ui/src/identity-providers/routes/IdentityProvider.tsx | 2 +- .../src/identity-providers/routes/IdentityProviderCreate.tsx | 2 +- .../identity-providers/routes/IdentityProviderKeycloakOidc.tsx | 2 +- .../src/identity-providers/routes/IdentityProviderOidc.tsx | 2 +- .../src/identity-providers/routes/IdentityProviderSaml.tsx | 2 +- .../src/identity-providers/routes/IdentityProviders.tsx | 2 +- js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx | 2 +- js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx | 2 +- js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/AddClientPolicy.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/AddCondition.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/ClientPolicies.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/ClientProfile.tsx | 2 +- .../admin-ui/src/realm-settings/routes/EditAttributesGroup.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/EditClientPolicy.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/EditCondition.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/Executor.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/KeyProvider.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx | 2 +- .../admin-ui/src/realm-settings/routes/NewAttributesGroup.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx | 2 +- js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx | 2 +- js/apps/admin-ui/src/realm/routes/AddRealm.tsx | 2 +- js/apps/admin-ui/src/sessions/routes/Sessions.tsx | 2 +- .../src/user-federation/routes/CustomUserFederation.tsx | 2 +- .../src/user-federation/routes/NewCustomUserFederation.tsx | 2 +- .../src/user-federation/routes/NewKerberosUserFederation.tsx | 2 +- .../src/user-federation/routes/NewLdapUserFederation.tsx | 2 +- js/apps/admin-ui/src/user-federation/routes/UserFederation.tsx | 2 +- .../src/user-federation/routes/UserFederationKerberos.tsx | 2 +- .../admin-ui/src/user-federation/routes/UserFederationLdap.tsx | 2 +- .../src/user-federation/routes/UserFederationLdapMapper.tsx | 2 +- .../src/user-federation/routes/UserFederationsKerberos.tsx | 2 +- .../admin-ui/src/user-federation/routes/UserFederationsLdap.tsx | 2 +- js/apps/admin-ui/src/user/routes/AddUser.tsx | 2 +- js/apps/admin-ui/src/user/routes/User.tsx | 2 +- js/apps/admin-ui/src/user/routes/Users.tsx | 2 +- 72 files changed, 72 insertions(+), 72 deletions(-) diff --git a/js/apps/admin-ui/src/authentication/routes/Authentication.tsx b/js/apps/admin-ui/src/authentication/routes/Authentication.tsx index 31b0801b92fc..8bf04f43522a 100644 --- a/js/apps/admin-ui/src/authentication/routes/Authentication.tsx +++ b/js/apps/admin-ui/src/authentication/routes/Authentication.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AuthenticationTab = "flows" | "required-actions" | "policies"; diff --git a/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx b/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx index 8d7a224c808b..30ea22f88362 100644 --- a/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx +++ b/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type CreateFlowParams = { realm: string }; diff --git a/js/apps/admin-ui/src/authentication/routes/Flow.tsx b/js/apps/admin-ui/src/authentication/routes/Flow.tsx index 826e5a1ce76b..849d2d0855c4 100644 --- a/js/apps/admin-ui/src/authentication/routes/Flow.tsx +++ b/js/apps/admin-ui/src/authentication/routes/Flow.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type FlowParams = { diff --git a/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx b/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx index 99683479f609..68d9309c8aae 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientScopeTab = "settings" | "mappers" | "scope"; diff --git a/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx b/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx index e3b2e679d2f7..33cd2202b10f 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientScopesParams = { realm: string }; diff --git a/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx b/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx index 39a4c7b559ae..843d109b0384 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type MapperParams = { 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 bf49153b9711..8d4aaf202dd9 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/NewClientScope.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/NewClientScope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewClientScopeParams = { realm: string }; diff --git a/js/apps/admin-ui/src/clients/routes/AddClient.tsx b/js/apps/admin-ui/src/clients/routes/AddClient.tsx index d6430a3fba16..dba1ec1bd7c3 100644 --- a/js/apps/admin-ui/src/clients/routes/AddClient.tsx +++ b/js/apps/admin-ui/src/clients/routes/AddClient.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddClientParams = { realm: string }; diff --git a/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx b/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx index 60b63d56448b..c94136c0947b 100644 --- a/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx +++ b/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; import { ClientRegistrationTab } from "./ClientRegistration"; diff --git a/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx b/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx index 50a5b6f61cca..f3b5113422a3 100644 --- a/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx +++ b/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AuthorizationTab = diff --git a/js/apps/admin-ui/src/clients/routes/Client.tsx b/js/apps/admin-ui/src/clients/routes/Client.tsx index 0b0ede17055e..c602a44bcd82 100644 --- a/js/apps/admin-ui/src/clients/routes/Client.tsx +++ b/js/apps/admin-ui/src/clients/routes/Client.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientTab = diff --git a/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx b/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx index daf8a1d342c6..d30a32b095e6 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientRegistrationTab = "anonymous" | "authenticated"; diff --git a/js/apps/admin-ui/src/clients/routes/ClientRole.tsx b/js/apps/admin-ui/src/clients/routes/ClientRole.tsx index 66b55d94f92d..e1506ca59186 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientRole.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientRoleTab = diff --git a/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx b/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx index eee2c8e9558e..fc8c33c082b7 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientScopesTab = "setup" | "evaluate"; diff --git a/js/apps/admin-ui/src/clients/routes/Clients.tsx b/js/apps/admin-ui/src/clients/routes/Clients.tsx index 3a017ca9d727..45120df5f823 100644 --- a/js/apps/admin-ui/src/clients/routes/Clients.tsx +++ b/js/apps/admin-ui/src/clients/routes/Clients.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientsTab = diff --git a/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx b/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx index bfd9f6b8356b..2c5ce73d9fb1 100644 --- a/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx +++ b/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type CreateInitialAccessTokenParams = { realm: string }; diff --git a/js/apps/admin-ui/src/clients/routes/ImportClient.tsx b/js/apps/admin-ui/src/clients/routes/ImportClient.tsx index 70f730b0c174..e1f286bea752 100644 --- a/js/apps/admin-ui/src/clients/routes/ImportClient.tsx +++ b/js/apps/admin-ui/src/clients/routes/ImportClient.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ImportClientParams = { realm: string }; diff --git a/js/apps/admin-ui/src/clients/routes/NewPermission.tsx b/js/apps/admin-ui/src/clients/routes/NewPermission.tsx index e87d85d4b786..cbc70b9e0dc1 100644 --- a/js/apps/admin-ui/src/clients/routes/NewPermission.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewPermission.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type PermissionType = "resource" | "scope"; diff --git a/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx b/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx index 5bb46b982e5a..7e7662f6ad73 100644 --- a/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewPolicyParams = { realm: string; id: string; policyType: string }; diff --git a/js/apps/admin-ui/src/clients/routes/NewResource.tsx b/js/apps/admin-ui/src/clients/routes/NewResource.tsx index 8f362c5ac6a7..7f0ea968d609 100644 --- a/js/apps/admin-ui/src/clients/routes/NewResource.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewResource.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewResourceParams = { realm: string; id: string }; diff --git a/js/apps/admin-ui/src/clients/routes/NewRole.tsx b/js/apps/admin-ui/src/clients/routes/NewRole.tsx index 360835501ba5..fc7a08bcb2d1 100644 --- a/js/apps/admin-ui/src/clients/routes/NewRole.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewRoleParams = { realm: string; clientId: string }; diff --git a/js/apps/admin-ui/src/clients/routes/NewScope.tsx b/js/apps/admin-ui/src/clients/routes/NewScope.tsx index c3beb80d20a7..d7794ad82d0f 100644 --- a/js/apps/admin-ui/src/clients/routes/NewScope.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewScope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewScopeParams = { realm: string; id: string }; diff --git a/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx b/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx index ad24dc117f6e..c8609c06ec3f 100644 --- a/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; import type { PermissionType } from "./NewPermission"; diff --git a/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx b/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx index 870034cb5ebb..5300b2c55768 100644 --- a/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type PolicyDetailsParams = { diff --git a/js/apps/admin-ui/src/clients/routes/Resource.tsx b/js/apps/admin-ui/src/clients/routes/Resource.tsx index c1ffbf10ecb4..563982a09689 100644 --- a/js/apps/admin-ui/src/clients/routes/Resource.tsx +++ b/js/apps/admin-ui/src/clients/routes/Resource.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ResourceDetailsParams = { diff --git a/js/apps/admin-ui/src/clients/routes/Scope.tsx b/js/apps/admin-ui/src/clients/routes/Scope.tsx index 76372499d276..34dbf1f0cb7d 100644 --- a/js/apps/admin-ui/src/clients/routes/Scope.tsx +++ b/js/apps/admin-ui/src/clients/routes/Scope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ScopeDetailsParams = { diff --git a/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx b/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx index be097d0b0061..132422cd0ad0 100644 --- a/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx +++ b/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type DashboardTab = "info" | "providers"; diff --git a/js/apps/admin-ui/src/events/routes/Events.tsx b/js/apps/admin-ui/src/events/routes/Events.tsx index 1ad8bc794a79..4c2aa40e2dc2 100644 --- a/js/apps/admin-ui/src/events/routes/Events.tsx +++ b/js/apps/admin-ui/src/events/routes/Events.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type EventsTab = "user-events" | "admin-events"; diff --git a/js/apps/admin-ui/src/groups/routes/Groups.tsx b/js/apps/admin-ui/src/groups/routes/Groups.tsx index a98b5f6e4afb..e4b5614dd8a0 100644 --- a/js/apps/admin-ui/src/groups/routes/Groups.tsx +++ b/js/apps/admin-ui/src/groups/routes/Groups.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type GroupsParams = { realm: string; id?: string; lazy?: string }; 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 1b8871db006b..b8b8ecf1eff7 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/AddMapper.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/AddMapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderAddMapperParams = { 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 341ddcde1ec7..175bf241f7e7 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/EditMapper.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/EditMapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderEditMapperParams = { 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 016843cfe987..756a0a59f4bb 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProvider.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProvider.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderTab = "settings" | "mappers" | "permissions"; 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 843bd2bae037..3051efaff3d0 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderCreate.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderCreate.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderCreateParams = { 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 a3450df941d6..947dc79f6d4d 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderKeycloakOidc.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderKeycloakOidc.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderKeycloakOidcParams = { realm: string }; 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 46f0335420f5..a71f9bae524a 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderOidc.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderOidc.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderOidcParams = { realm: string }; 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 7eb967f77d79..17cfaeca05e6 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderSaml.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderSaml.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderSamlParams = { realm: string }; 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 3645968b8525..cf89ea44b020 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviders.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviders.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProvidersParams = { realm: string }; diff --git a/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx b/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx index b55ce8cec0dd..a4dd3e3c6232 100644 --- a/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx +++ b/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddRoleParams = { realm: string }; diff --git a/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx b/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx index 80d6c84e0c34..4363c303dc90 100644 --- a/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx +++ b/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; diff --git a/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx b/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx index 974c0f9d833f..02e47fe0581c 100644 --- a/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx +++ b/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type RealmRolesParams = { realm: string }; diff --git a/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx b/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx index f1f272e50b9a..2b6adc28ec7b 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddAttributeParams = { 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 303dba582572..7a64352da83d 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddClientPolicy.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddClientPolicy.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddClientPolicyParams = { realm: string }; 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 e50370a839d6..6d7652f036f9 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddClientProfileParams = { 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 8dc7e86df698..2a3127c8ec91 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddCondition.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddCondition.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewClientPolicyConditionParams = { diff --git a/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx b/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx index ba1cdef6ea90..f49480adfcf2 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddExecutorParams = { diff --git a/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx b/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx index 95b33614941e..8531f58b14da 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AttributeParams = { 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 53877ab5c60d..50a2f7518c91 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/ClientPolicies.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/ClientPolicies.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientPoliciesTab = "profiles" | "policies"; 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 76ed590974e0..0efeb3960409 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/ClientProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/ClientProfile.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientProfileParams = { 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 61d897e26c07..8b99a7d06c52 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditAttributesGroup.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditAttributesGroup.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type EditAttributesGroupParams = { 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 41d9976450cd..40b1d2c8cd30 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditClientPolicy.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditClientPolicy.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type EditClientPolicyParams = { 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 874e1068a2bb..6681a48cc885 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditCondition.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditCondition.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type EditClientPolicyConditionParams = { diff --git a/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx b/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx index 7c692c0c01e8..2e363c7cc9d5 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ExecutorParams = { 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 34c5f81e7046..121dc1485170 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/KeyProvider.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/KeyProvider.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ProviderType = diff --git a/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx b/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx index 3b0ad87563c8..1f65a06873f4 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type KeySubTab = "list" | "providers"; 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 b22f687ec4df..cfe28cfc77ea 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/NewAttributesGroup.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/NewAttributesGroup.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewAttributesGroupParams = { diff --git a/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx b/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx index a505a0dd4da7..e44f549cad88 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type RealmSettingsTab = diff --git a/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx b/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx index 06e7f7d4e0fe..2117ffbb2a80 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserProfileTab = "attributes" | "attributes-group" | "json-editor"; diff --git a/js/apps/admin-ui/src/realm/routes/AddRealm.tsx b/js/apps/admin-ui/src/realm/routes/AddRealm.tsx index 5f598d26fa5b..39a8a3b6f98d 100644 --- a/js/apps/admin-ui/src/realm/routes/AddRealm.tsx +++ b/js/apps/admin-ui/src/realm/routes/AddRealm.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddRealmParams = { realm: string }; diff --git a/js/apps/admin-ui/src/sessions/routes/Sessions.tsx b/js/apps/admin-ui/src/sessions/routes/Sessions.tsx index 98139db8db07..0fdaca0b9fbb 100644 --- a/js/apps/admin-ui/src/sessions/routes/Sessions.tsx +++ b/js/apps/admin-ui/src/sessions/routes/Sessions.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type SessionsParams = { realm: string }; 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 53137a2ab1a2..1a15c8acce1d 100644 --- a/js/apps/admin-ui/src/user-federation/routes/CustomUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/CustomUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; 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 2ec53e316cca..2a95a46c6c74 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewCustomUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewCustomUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; 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 b6174499c4b2..462c1b417b15 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewKerberosUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewKerberosUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewKerberosUserFederationParams = { realm: string }; 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 cb021242d01c..3de1997c9eba 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewLdapUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewLdapUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewLdapUserFederationParams = { realm: string }; 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 45ef09ee597c..01f305f6a032 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationParams = { realm: string }; 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 7b6b8a868d23..2ac7d91d4865 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationKerberos.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationKerberos.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationKerberosParams = { 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 ca2a68a8f4b3..4ab07fff9418 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationLdap.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationLdap.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationLdapTab = "settings" | "mappers"; 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 e05a9fab1085..f6ddeb0928dd 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationLdapMapper.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationLdapMapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationLdapMapperParams = { 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 7f4a41871b0f..a1139525b1da 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationsKerberos.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationsKerberos.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationsKerberosParams = { realm: string }; 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 b02fda3ecc6b..9ebf183b9dd6 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationsLdap.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationsLdap.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationsLdapParams = { realm: string }; diff --git a/js/apps/admin-ui/src/user/routes/AddUser.tsx b/js/apps/admin-ui/src/user/routes/AddUser.tsx index 86d53bcf88b3..a83f53a60435 100644 --- a/js/apps/admin-ui/src/user/routes/AddUser.tsx +++ b/js/apps/admin-ui/src/user/routes/AddUser.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; diff --git a/js/apps/admin-ui/src/user/routes/User.tsx b/js/apps/admin-ui/src/user/routes/User.tsx index 378dc7c23219..35dab2b54e35 100644 --- a/js/apps/admin-ui/src/user/routes/User.tsx +++ b/js/apps/admin-ui/src/user/routes/User.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserTab = diff --git a/js/apps/admin-ui/src/user/routes/Users.tsx b/js/apps/admin-ui/src/user/routes/Users.tsx index 40d2f470fab8..207d76c9ed14 100644 --- a/js/apps/admin-ui/src/user/routes/Users.tsx +++ b/js/apps/admin-ui/src/user/routes/Users.tsx @@ -1,5 +1,5 @@ import { lazy } from "react"; -import { generatePath } from "react-router-dom"; +import { generatePath } from "../../util"; import type { Path } from "react-router-dom"; import type { AppRouteObject } from "../../routes"; From 100cbdec93c0dca1ef60f02152198e39904b17ee Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Fri, 6 Oct 2023 11:07:22 +0200 Subject: [PATCH 3/5] update review comments --- .../authentication/routes/Authentication.tsx | 4 ++-- .../src/authentication/routes/CreateFlow.tsx | 4 ++-- .../src/authentication/routes/Flow.tsx | 4 ++-- .../src/client-scopes/routes/ClientScope.tsx | 4 ++-- .../src/client-scopes/routes/ClientScopes.tsx | 4 ++-- .../src/client-scopes/routes/Mapper.tsx | 4 ++-- .../client-scopes/routes/NewClientScope.tsx | 4 ++-- .../admin-ui/src/clients/routes/AddClient.tsx | 4 ++-- .../routes/AddRegistrationProvider.tsx | 4 ++-- .../src/clients/routes/AuthenticationTab.tsx | 4 ++-- .../admin-ui/src/clients/routes/Client.tsx | 4 ++-- .../src/clients/routes/ClientRegistration.tsx | 4 ++-- .../src/clients/routes/ClientRole.tsx | 4 ++-- .../src/clients/routes/ClientScopeTab.tsx | 4 ++-- .../admin-ui/src/clients/routes/Clients.tsx | 4 ++-- .../routes/CreateInitialAccessToken.tsx | 4 ++-- .../clients/routes/DedicatedScopeDetails.tsx | 4 ++-- .../src/clients/routes/ImportClient.tsx | 4 ++-- .../admin-ui/src/clients/routes/Mapper.tsx | 4 ++-- .../src/clients/routes/NewPermission.tsx | 4 ++-- .../admin-ui/src/clients/routes/NewPolicy.tsx | 4 ++-- .../src/clients/routes/NewResource.tsx | 4 ++-- .../admin-ui/src/clients/routes/NewRole.tsx | 4 ++-- .../admin-ui/src/clients/routes/NewScope.tsx | 4 ++-- .../src/clients/routes/PermissionDetails.tsx | 4 ++-- .../src/clients/routes/PolicyDetails.tsx | 4 ++-- .../admin-ui/src/clients/routes/Resource.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/Scope.tsx | 4 ++-- .../src/dashboard/routes/Dashboard.tsx | 4 ++-- js/apps/admin-ui/src/events/routes/Events.tsx | 4 ++-- js/apps/admin-ui/src/groups/routes/Groups.tsx | 4 ++-- .../identity-providers/routes/AddMapper.tsx | 4 ++-- .../identity-providers/routes/EditMapper.tsx | 4 ++-- .../routes/IdentityProvider.tsx | 4 ++-- .../routes/IdentityProviderCreate.tsx | 4 ++-- .../routes/IdentityProviderKeycloakOidc.tsx | 7 ++++-- .../routes/IdentityProviderOidc.tsx | 4 ++-- .../routes/IdentityProviderSaml.tsx | 4 ++-- .../routes/IdentityProviders.tsx | 4 ++-- .../src/realm-roles/routes/AddRole.tsx | 4 ++-- .../src/realm-roles/routes/RealmRole.tsx | 4 ++-- .../src/realm-roles/routes/RealmRoles.tsx | 4 ++-- .../realm-settings/routes/AddAttribute.tsx | 4 ++-- .../realm-settings/routes/AddClientPolicy.tsx | 4 ++-- .../routes/AddClientProfile.tsx | 4 ++-- .../realm-settings/routes/AddCondition.tsx | 4 ++-- .../src/realm-settings/routes/AddExecutor.tsx | 4 ++-- .../src/realm-settings/routes/Attribute.tsx | 4 ++-- .../realm-settings/routes/ClientPolicies.tsx | 4 ++-- .../realm-settings/routes/ClientProfile.tsx | 4 ++-- .../routes/EditAttributesGroup.tsx | 4 ++-- .../routes/EditClientPolicy.tsx | 4 ++-- .../realm-settings/routes/EditCondition.tsx | 4 ++-- .../src/realm-settings/routes/Executor.tsx | 4 ++-- .../src/realm-settings/routes/KeyProvider.tsx | 4 ++-- .../src/realm-settings/routes/KeysTab.tsx | 4 ++-- .../routes/NewAttributesGroup.tsx | 4 ++-- .../realm-settings/routes/RealmSettings.tsx | 4 ++-- .../src/realm-settings/routes/UserProfile.tsx | 4 ++-- .../admin-ui/src/realm/routes/AddRealm.tsx | 4 ++-- .../admin-ui/src/sessions/routes/Sessions.tsx | 4 ++-- .../routes/CustomUserFederation.tsx | 4 ++-- .../routes/NewCustomUserFederation.tsx | 4 ++-- .../routes/NewKerberosUserFederation.tsx | 4 ++-- .../routes/NewLdapUserFederation.tsx | 4 ++-- .../user-federation/routes/UserFederation.tsx | 4 ++-- .../routes/UserFederationKerberos.tsx | 4 ++-- .../routes/UserFederationLdap.tsx | 4 ++-- .../routes/UserFederationLdapMapper.tsx | 4 ++-- .../routes/UserFederationsKerberos.tsx | 4 ++-- .../routes/UserFederationsLdap.tsx | 4 ++-- js/apps/admin-ui/src/user/routes/AddUser.tsx | 4 ++-- js/apps/admin-ui/src/user/routes/User.tsx | 4 ++-- js/apps/admin-ui/src/user/routes/Users.tsx | 4 ++-- js/apps/admin-ui/src/util.ts | 23 ++++++++++--------- 75 files changed, 163 insertions(+), 159 deletions(-) diff --git a/js/apps/admin-ui/src/authentication/routes/Authentication.tsx b/js/apps/admin-ui/src/authentication/routes/Authentication.tsx index 8bf04f43522a..4ec12ba6bc51 100644 --- a/js/apps/admin-ui/src/authentication/routes/Authentication.tsx +++ b/js/apps/admin-ui/src/authentication/routes/Authentication.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AuthenticationTab = "flows" | "required-actions" | "policies"; @@ -31,6 +31,6 @@ export const toAuthentication = ( : AuthenticationRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx b/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx index 30ea22f88362..31de14b57e99 100644 --- a/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx +++ b/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type CreateFlowParams = { realm: string }; @@ -17,5 +17,5 @@ export const CreateFlowRoute: AppRouteObject = { }; export const toCreateFlow = (params: CreateFlowParams): Partial => ({ - pathname: generatePath(CreateFlowRoute.path, params), + pathname: generateUnencodedPath(CreateFlowRoute.path, params), }); diff --git a/js/apps/admin-ui/src/authentication/routes/Flow.tsx b/js/apps/admin-ui/src/authentication/routes/Flow.tsx index 849d2d0855c4..9a9e28174a46 100644 --- a/js/apps/admin-ui/src/authentication/routes/Flow.tsx +++ b/js/apps/admin-ui/src/authentication/routes/Flow.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type FlowParams = { @@ -30,6 +30,6 @@ export const toFlow = (params: FlowParams): Partial => { const path = params.builtIn ? FlowWithBuiltInRoute.path : FlowRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx b/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx index 68d9309c8aae..c39e1929fc42 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientScopeTab = "settings" | "mappers" | "scope"; @@ -26,6 +26,6 @@ export const toClientScope = (params: ClientScopeParams): Partial => { const path = ClientScopeRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx b/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx index 33cd2202b10f..0448262657e8 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientScopesParams = { realm: string }; @@ -17,5 +17,5 @@ export const ClientScopesRoute: AppRouteObject = { }; export const toClientScopes = (params: ClientScopesParams): Partial => ({ - pathname: generatePath(ClientScopesRoute.path, params), + pathname: generateUnencodedPath(ClientScopesRoute.path, params), }); diff --git a/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx b/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx index 843d109b0384..87a3c351551e 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type MapperParams = { @@ -21,5 +21,5 @@ export const MapperRoute: AppRouteObject = { }; export const toMapper = (params: MapperParams): Partial => ({ - pathname: generatePath(MapperRoute.path, params), + pathname: generateUnencodedPath(MapperRoute.path, params), }); 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 8d4aaf202dd9..ded6b7307dd5 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/NewClientScope.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/NewClientScope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewClientScopeParams = { realm: string }; @@ -19,5 +19,5 @@ export const NewClientScopeRoute: AppRouteObject = { export const toNewClientScope = ( params: NewClientScopeParams, ): Partial => ({ - pathname: generatePath(NewClientScopeRoute.path, params), + pathname: generateUnencodedPath(NewClientScopeRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/AddClient.tsx b/js/apps/admin-ui/src/clients/routes/AddClient.tsx index dba1ec1bd7c3..cb8595b0f6c3 100644 --- a/js/apps/admin-ui/src/clients/routes/AddClient.tsx +++ b/js/apps/admin-ui/src/clients/routes/AddClient.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddClientParams = { realm: string }; @@ -17,5 +17,5 @@ export const AddClientRoute: AppRouteObject = { }; export const toAddClient = (params: AddClientParams): Partial => ({ - pathname: generatePath(AddClientRoute.path, params), + pathname: generateUnencodedPath(AddClientRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx b/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx index c94136c0947b..7bfc10a0a2ef 100644 --- a/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx +++ b/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; import { ClientRegistrationTab } from "./ClientRegistration"; @@ -35,6 +35,6 @@ export const toRegistrationProvider = ( : AddRegistrationProviderRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx b/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx index f3b5113422a3..4da3b8427072 100644 --- a/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx +++ b/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AuthorizationTab = @@ -32,5 +32,5 @@ export const AuthorizationRoute: AppRouteObject = { export const toAuthorizationTab = ( params: AuthorizationParams, ): Partial => ({ - pathname: generatePath(AuthorizationRoute.path, params), + pathname: generateUnencodedPath(AuthorizationRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/Client.tsx b/js/apps/admin-ui/src/clients/routes/Client.tsx index c602a44bcd82..7e17975d90aa 100644 --- a/js/apps/admin-ui/src/clients/routes/Client.tsx +++ b/js/apps/admin-ui/src/clients/routes/Client.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientTab = @@ -34,5 +34,5 @@ export const ClientRoute: AppRouteObject = { }; export const toClient = (params: ClientParams): Partial => ({ - pathname: generatePath(ClientRoute.path, params), + pathname: generateUnencodedPath(ClientRoute.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 d30a32b095e6..9ce87a897b7c 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientRegistrationTab = "anonymous" | "authenticated"; @@ -24,5 +24,5 @@ export const ClientRegistrationRoute: AppRouteObject = { export const toClientRegistration = ( params: ClientRegistrationParams, ): Partial => ({ - pathname: generatePath(ClientRegistrationRoute.path, params), + pathname: generateUnencodedPath(ClientRegistrationRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/ClientRole.tsx b/js/apps/admin-ui/src/clients/routes/ClientRole.tsx index e1506ca59186..05b626893f62 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientRole.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientRoleTab = @@ -28,5 +28,5 @@ export const ClientRoleRoute: AppRouteObject = { } satisfies AppRouteObject; export const toClientRole = (params: ClientRoleParams): Partial => ({ - pathname: generatePath(ClientRoleRoute.path, params), + pathname: generateUnencodedPath(ClientRoleRoute.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 fc8c33c082b7..1ead87506a3e 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientScopesTab = "setup" | "evaluate"; @@ -25,5 +25,5 @@ export const ClientScopesRoute: AppRouteObject = { export const toClientScopesTab = ( params: ClientScopesParams, ): Partial => ({ - pathname: generatePath(ClientScopesRoute.path, params), + pathname: generateUnencodedPath(ClientScopesRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/Clients.tsx b/js/apps/admin-ui/src/clients/routes/Clients.tsx index 45120df5f823..f4d98502e479 100644 --- a/js/apps/admin-ui/src/clients/routes/Clients.tsx +++ b/js/apps/admin-ui/src/clients/routes/Clients.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientsTab = @@ -33,6 +33,6 @@ export const toClients = (params: ClientsParams): Partial => { const path = params.tab ? ClientsRouteWithTab.path : ClientsRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(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 2c5ce73d9fb1..d0ff9d7aa1c6 100644 --- a/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx +++ b/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type CreateInitialAccessTokenParams = { realm: string }; @@ -21,5 +21,5 @@ export const CreateInitialAccessTokenRoute: AppRouteObject = { export const toCreateInitialAccessToken = ( params: CreateInitialAccessTokenParams, ): Partial => ({ - pathname: generatePath(CreateInitialAccessTokenRoute.path, params), + pathname: generateUnencodedPath(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 18ca1e07ce00..d19b79091d66 100644 --- a/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx @@ -1,7 +1,7 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; import type { AppRouteObject } from "../../routes"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; export type DedicatedScopeTab = "mappers" | "scope"; @@ -35,6 +35,6 @@ export const toDedicatedScope = ( : DedicatedScopeDetailsRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/clients/routes/ImportClient.tsx b/js/apps/admin-ui/src/clients/routes/ImportClient.tsx index e1f286bea752..c143b67df7c6 100644 --- a/js/apps/admin-ui/src/clients/routes/ImportClient.tsx +++ b/js/apps/admin-ui/src/clients/routes/ImportClient.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ImportClientParams = { realm: string }; @@ -17,5 +17,5 @@ export const ImportClientRoute: AppRouteObject = { }; export const toImportClient = (params: ImportClientParams): Partial => ({ - pathname: generatePath(ImportClientRoute.path, params), + pathname: generateUnencodedPath(ImportClientRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/Mapper.tsx b/js/apps/admin-ui/src/clients/routes/Mapper.tsx index d73fd83eab16..cdc8b31544b1 100644 --- a/js/apps/admin-ui/src/clients/routes/Mapper.tsx +++ b/js/apps/admin-ui/src/clients/routes/Mapper.tsx @@ -1,7 +1,7 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; import type { AppRouteObject } from "../../routes"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; export type MapperParams = { realm: string; @@ -23,5 +23,5 @@ export const MapperRoute: AppRouteObject = { }; export const toMapper = (params: MapperParams): Partial => ({ - pathname: generatePath(MapperRoute.path, params), + pathname: generateUnencodedPath(MapperRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/NewPermission.tsx b/js/apps/admin-ui/src/clients/routes/NewPermission.tsx index cbc70b9e0dc1..2a996ff096e7 100644 --- a/js/apps/admin-ui/src/clients/routes/NewPermission.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewPermission.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type PermissionType = "resource" | "scope"; @@ -36,6 +36,6 @@ export const toNewPermission = (params: NewPermissionParams): Partial => { : NewPermissionRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx b/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx index 7e7662f6ad73..7cd509b2dc02 100644 --- a/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewPolicyParams = { realm: string; id: string; policyType: string }; @@ -19,5 +19,5 @@ export const NewPolicyRoute: AppRouteObject = { }; export const toCreatePolicy = (params: NewPolicyParams): Partial => ({ - pathname: generatePath(NewPolicyRoute.path, params), + pathname: generateUnencodedPath(NewPolicyRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/NewResource.tsx b/js/apps/admin-ui/src/clients/routes/NewResource.tsx index 7f0ea968d609..d373cab35cb1 100644 --- a/js/apps/admin-ui/src/clients/routes/NewResource.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewResource.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewResourceParams = { realm: string; id: string }; @@ -17,5 +17,5 @@ export const NewResourceRoute: AppRouteObject = { }; export const toCreateResource = (params: NewResourceParams): Partial => ({ - pathname: generatePath(NewResourceRoute.path, params), + pathname: generateUnencodedPath(NewResourceRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/NewRole.tsx b/js/apps/admin-ui/src/clients/routes/NewRole.tsx index fc7a08bcb2d1..5ad2f2a91777 100644 --- a/js/apps/admin-ui/src/clients/routes/NewRole.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewRoleParams = { realm: string; clientId: string }; @@ -17,5 +17,5 @@ export const NewRoleRoute: AppRouteObject = { }; export const toCreateRole = (params: NewRoleParams): Partial => ({ - pathname: generatePath(NewRoleRoute.path, params), + pathname: generateUnencodedPath(NewRoleRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/NewScope.tsx b/js/apps/admin-ui/src/clients/routes/NewScope.tsx index d7794ad82d0f..bb30b0e9ada4 100644 --- a/js/apps/admin-ui/src/clients/routes/NewScope.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewScope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewScopeParams = { realm: string; id: string }; @@ -17,5 +17,5 @@ export const NewScopeRoute: AppRouteObject = { }; export const toNewScope = (params: NewScopeParams): Partial => ({ - pathname: generatePath(NewScopeRoute.path, params), + pathname: generateUnencodedPath(NewScopeRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx b/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx index c8609c06ec3f..b8e8bc0d8f79 100644 --- a/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; import type { PermissionType } from "./NewPermission"; @@ -27,5 +27,5 @@ export const PermissionDetailsRoute: AppRouteObject = { export const toPermissionDetails = ( params: PermissionDetailsParams, ): Partial => ({ - pathname: generatePath(PermissionDetailsRoute.path, params), + pathname: generateUnencodedPath(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 5300b2c55768..73551a655c66 100644 --- a/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type PolicyDetailsParams = { @@ -26,5 +26,5 @@ export const PolicyDetailsRoute: AppRouteObject = { export const toPolicyDetails = ( params: PolicyDetailsParams, ): Partial => ({ - pathname: generatePath(PolicyDetailsRoute.path, params), + pathname: generateUnencodedPath(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 563982a09689..47ba6fad5bce 100644 --- a/js/apps/admin-ui/src/clients/routes/Resource.tsx +++ b/js/apps/admin-ui/src/clients/routes/Resource.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ResourceDetailsParams = { @@ -33,6 +33,6 @@ export const toResourceDetails = ( : ResourceDetailsRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/clients/routes/Scope.tsx b/js/apps/admin-ui/src/clients/routes/Scope.tsx index 34dbf1f0cb7d..b0efd61abcdc 100644 --- a/js/apps/admin-ui/src/clients/routes/Scope.tsx +++ b/js/apps/admin-ui/src/clients/routes/Scope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ScopeDetailsParams = { @@ -31,6 +31,6 @@ export const toScopeDetails = (params: ScopeDetailsParams): Partial => { : ScopeDetailsRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx b/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx index 132422cd0ad0..57deb8e9b349 100644 --- a/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx +++ b/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type DashboardTab = "info" | "providers"; @@ -36,6 +36,6 @@ export const toDashboard = (params: DashboardParams): Partial => { : DashboardRoute.path; return { - pathname: generatePath(pathname, params), + pathname: generateUnencodedPath(pathname, params), }; }; diff --git a/js/apps/admin-ui/src/events/routes/Events.tsx b/js/apps/admin-ui/src/events/routes/Events.tsx index 4c2aa40e2dc2..5cfbb61d7d55 100644 --- a/js/apps/admin-ui/src/events/routes/Events.tsx +++ b/js/apps/admin-ui/src/events/routes/Events.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type EventsTab = "user-events" | "admin-events"; @@ -30,6 +30,6 @@ export const toEvents = (params: EventsParams): Partial => { const path = params.tab ? EventsRouteWithTab.path : EventsRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/groups/routes/Groups.tsx b/js/apps/admin-ui/src/groups/routes/Groups.tsx index e4b5614dd8a0..37132b3ae733 100644 --- a/js/apps/admin-ui/src/groups/routes/Groups.tsx +++ b/js/apps/admin-ui/src/groups/routes/Groups.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type GroupsParams = { realm: string; id?: string; lazy?: string }; @@ -24,6 +24,6 @@ export const toGroups = (params: GroupsParams): Partial => { const path = params.id ? GroupsWithIdRoute.path : GroupsRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(path, params), }; }; 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 b8b8ecf1eff7..3a901a558abf 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/AddMapper.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/AddMapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderAddMapperParams = { @@ -24,5 +24,5 @@ export const IdentityProviderAddMapperRoute: AppRouteObject = { export const toIdentityProviderAddMapper = ( params: IdentityProviderAddMapperParams, ): Partial => ({ - pathname: generatePath(IdentityProviderAddMapperRoute.path, params), + pathname: generateUnencodedPath(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 175bf241f7e7..e0bfdc5663b7 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/EditMapper.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/EditMapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderEditMapperParams = { @@ -24,5 +24,5 @@ export const IdentityProviderEditMapperRoute: AppRouteObject = { export const toIdentityProviderEditMapper = ( params: IdentityProviderEditMapperParams, ): Partial => ({ - pathname: generatePath(IdentityProviderEditMapperRoute.path, params), + pathname: generateUnencodedPath(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 756a0a59f4bb..b234a7f32e7d 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProvider.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProvider.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderTab = "settings" | "mappers" | "permissions"; @@ -26,5 +26,5 @@ export const IdentityProviderRoute: AppRouteObject = { export const toIdentityProvider = ( params: IdentityProviderParams, ): Partial => ({ - pathname: generatePath(IdentityProviderRoute.path, params), + pathname: generateUnencodedPath(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 3051efaff3d0..0d01604e7c2f 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderCreate.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderCreate.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderCreateParams = { @@ -22,5 +22,5 @@ export const IdentityProviderCreateRoute: AppRouteObject = { export const toIdentityProviderCreate = ( params: IdentityProviderCreateParams, ): Partial => ({ - pathname: generatePath(IdentityProviderCreateRoute.path, params), + pathname: generateUnencodedPath(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 947dc79f6d4d..95f009ed064f 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderKeycloakOidc.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderKeycloakOidc.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderKeycloakOidcParams = { realm: string }; @@ -19,5 +19,8 @@ export const IdentityProviderKeycloakOidcRoute: AppRouteObject = { export const toIdentityProviderKeycloakOidc = ( params: IdentityProviderKeycloakOidcParams, ): Partial => ({ - pathname: generatePath(IdentityProviderKeycloakOidcRoute.path, params), + pathname: generateUnencodedPath( + 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 a71f9bae524a..99ba0187da9e 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderOidc.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderOidc.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderOidcParams = { realm: string }; @@ -19,5 +19,5 @@ export const IdentityProviderOidcRoute: AppRouteObject = { export const toIdentityProviderOidc = ( params: IdentityProviderOidcParams, ): Partial => ({ - pathname: generatePath(IdentityProviderOidcRoute.path, params), + pathname: generateUnencodedPath(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 17cfaeca05e6..fcc2b2076351 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderSaml.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderSaml.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderSamlParams = { realm: string }; @@ -19,5 +19,5 @@ export const IdentityProviderSamlRoute: AppRouteObject = { export const toIdentityProviderSaml = ( params: IdentityProviderSamlParams, ): Partial => ({ - pathname: generatePath(IdentityProviderSamlRoute.path, params), + pathname: generateUnencodedPath(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 cf89ea44b020..4edfb4513877 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviders.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviders.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProvidersParams = { realm: string }; @@ -21,5 +21,5 @@ export const IdentityProvidersRoute: AppRouteObject = { export const toIdentityProviders = ( params: IdentityProvidersParams, ): Partial => ({ - pathname: generatePath(IdentityProvidersRoute.path, params), + pathname: generateUnencodedPath(IdentityProvidersRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx b/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx index a4dd3e3c6232..9cbf73331bcb 100644 --- a/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx +++ b/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddRoleParams = { realm: string }; @@ -17,5 +17,5 @@ export const AddRoleRoute: AppRouteObject = { }; export const toAddRole = (params: AddRoleParams): Partial => ({ - pathname: generatePath(AddRoleRoute.path, params), + pathname: generateUnencodedPath(AddRoleRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx b/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx index 4363c303dc90..f6c0e90db3d8 100644 --- a/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx +++ b/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; @@ -29,5 +29,5 @@ export const RealmRoleRoute: AppRouteObject = { }; export const toRealmRole = (params: RealmRoleParams): Partial => ({ - pathname: generatePath(RealmRoleRoute.path, params), + pathname: generateUnencodedPath(RealmRoleRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx b/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx index 02e47fe0581c..f80ec64b2fce 100644 --- a/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx +++ b/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type RealmRolesParams = { realm: string }; @@ -17,5 +17,5 @@ export const RealmRolesRoute: AppRouteObject = { }; export const toRealmRoles = (params: RealmRolesParams): Partial => ({ - pathname: generatePath(RealmRolesRoute.path, params), + pathname: generateUnencodedPath(RealmRolesRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx b/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx index 2b6adc28ec7b..c33959b4073a 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddAttributeParams = { @@ -19,5 +19,5 @@ export const AddAttributeRoute: AppRouteObject = { }; export const toAddAttribute = (params: AddAttributeParams): Partial => ({ - pathname: generatePath(AddAttributeRoute.path, params), + pathname: generateUnencodedPath(AddAttributeRoute.path, params), }); 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 7a64352da83d..8ad83ed5886c 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddClientPolicy.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddClientPolicy.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddClientPolicyParams = { realm: string }; @@ -19,5 +19,5 @@ export const AddClientPolicyRoute: AppRouteObject = { export const toAddClientPolicy = ( params: AddClientPolicyParams, ): Partial => ({ - pathname: generatePath(AddClientPolicyRoute.path, params), + pathname: generateUnencodedPath(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 6d7652f036f9..26a9c17f12a0 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddClientProfileParams = { @@ -22,5 +22,5 @@ export const AddClientProfileRoute: AppRouteObject = { export const toAddClientProfile = ( params: AddClientProfileParams, ): Partial => ({ - pathname: generatePath(AddClientProfileRoute.path, params), + pathname: generateUnencodedPath(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 2a3127c8ec91..a3fbcceb1f81 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddCondition.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddCondition.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewClientPolicyConditionParams = { @@ -24,5 +24,5 @@ export const NewClientPolicyConditionRoute: AppRouteObject = { export const toNewClientPolicyCondition = ( params: NewClientPolicyConditionParams, ): Partial => ({ - pathname: generatePath(NewClientPolicyConditionRoute.path, params), + pathname: generateUnencodedPath(NewClientPolicyConditionRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx b/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx index f49480adfcf2..7755c912fbd7 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddExecutorParams = { @@ -20,5 +20,5 @@ export const AddExecutorRoute: AppRouteObject = { }; export const toAddExecutor = (params: AddExecutorParams): Partial => ({ - pathname: generatePath(AddExecutorRoute.path, params), + pathname: generateUnencodedPath(AddExecutorRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx b/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx index 8531f58b14da..04161c378e57 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AttributeParams = { @@ -20,5 +20,5 @@ export const AttributeRoute: AppRouteObject = { }; export const toAttribute = (params: AttributeParams): Partial => ({ - pathname: generatePath(AttributeRoute.path, params), + pathname: generateUnencodedPath(AttributeRoute.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 50a2f7518c91..c11cf7008270 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/ClientPolicies.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/ClientPolicies.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientPoliciesTab = "profiles" | "policies"; @@ -24,5 +24,5 @@ export const ClientPoliciesRoute: AppRouteObject = { export const toClientPolicies = ( params: ClientPoliciesParams, ): Partial => ({ - pathname: generatePath(ClientPoliciesRoute.path, params), + pathname: generateUnencodedPath(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 0efeb3960409..32f7331b9c19 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/ClientProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/ClientProfile.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientProfileParams = { @@ -22,5 +22,5 @@ export const ClientProfileRoute: AppRouteObject = { export const toClientProfile = ( params: ClientProfileParams, ): Partial => ({ - pathname: generatePath(ClientProfileRoute.path, params), + pathname: generateUnencodedPath(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 8b99a7d06c52..bb722069c146 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditAttributesGroup.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditAttributesGroup.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type EditAttributesGroupParams = { @@ -24,5 +24,5 @@ export const EditAttributesGroupRoute: AppRouteObject = { export const toEditAttributesGroup = ( params: EditAttributesGroupParams, ): Partial => ({ - pathname: generatePath(EditAttributesGroupRoute.path, params), + pathname: generateUnencodedPath(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 40b1d2c8cd30..b57ba90873be 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditClientPolicy.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditClientPolicy.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type EditClientPolicyParams = { @@ -22,5 +22,5 @@ export const EditClientPolicyRoute: AppRouteObject = { export const toEditClientPolicy = ( params: EditClientPolicyParams, ): Partial => ({ - pathname: generatePath(EditClientPolicyRoute.path, params), + pathname: generateUnencodedPath(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 6681a48cc885..93c3bf217908 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditCondition.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditCondition.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type EditClientPolicyConditionParams = { @@ -25,5 +25,5 @@ export const EditClientPolicyConditionRoute: AppRouteObject = { export const toEditClientPolicyCondition = ( params: EditClientPolicyConditionParams, ): Partial => ({ - pathname: generatePath(EditClientPolicyConditionRoute.path, params), + pathname: generateUnencodedPath(EditClientPolicyConditionRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx b/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx index 2e363c7cc9d5..4b655d630944 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ExecutorParams = { @@ -21,5 +21,5 @@ export const ExecutorRoute: AppRouteObject = { }; export const toExecutor = (params: ExecutorParams): Partial => ({ - pathname: generatePath(ExecutorRoute.path, params), + pathname: generateUnencodedPath(ExecutorRoute.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 121dc1485170..9fe8f3c8620e 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/KeyProvider.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/KeyProvider.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ProviderType = @@ -33,5 +33,5 @@ export const KeyProviderFormRoute: AppRouteObject = { }; export const toKeyProvider = (params: KeyProviderParams): Partial => ({ - pathname: generatePath(KeyProviderFormRoute.path, params), + pathname: generateUnencodedPath(KeyProviderFormRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx b/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx index 1f65a06873f4..ac9345016eee 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type KeySubTab = "list" | "providers"; @@ -22,5 +22,5 @@ export const KeysRoute: AppRouteObject = { }; export const toKeysTab = (params: KeysParams): Partial => ({ - pathname: generatePath(KeysRoute.path, params), + pathname: generateUnencodedPath(KeysRoute.path, params), }); 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 cfe28cfc77ea..a52d4046a455 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/NewAttributesGroup.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/NewAttributesGroup.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewAttributesGroupParams = { @@ -23,5 +23,5 @@ export const NewAttributesGroupRoute: AppRouteObject = { export const toNewAttributesGroup = ( params: NewAttributesGroupParams, ): Partial => ({ - pathname: generatePath(NewAttributesGroupRoute.path, params), + pathname: generateUnencodedPath(NewAttributesGroupRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx b/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx index e44f549cad88..95fa00a86d43 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type RealmSettingsTab = @@ -45,6 +45,6 @@ export const toRealmSettings = (params: RealmSettingsParams): Partial => { : RealmSettingsRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx b/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx index 2117ffbb2a80..1a065fd96a9c 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserProfileTab = "attributes" | "attributes-group" | "json-editor"; @@ -22,5 +22,5 @@ export const UserProfileRoute: AppRouteObject = { }; export const toUserProfile = (params: UserProfileParams): Partial => ({ - pathname: generatePath(UserProfileRoute.path, params), + pathname: generateUnencodedPath(UserProfileRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm/routes/AddRealm.tsx b/js/apps/admin-ui/src/realm/routes/AddRealm.tsx index 39a8a3b6f98d..7dc62c0d4ac9 100644 --- a/js/apps/admin-ui/src/realm/routes/AddRealm.tsx +++ b/js/apps/admin-ui/src/realm/routes/AddRealm.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddRealmParams = { realm: string }; @@ -17,5 +17,5 @@ export const AddRealmRoute: AppRouteObject = { }; export const toAddRealm = (params: AddRealmParams): Partial => ({ - pathname: generatePath(AddRealmRoute.path, params), + pathname: generateUnencodedPath(AddRealmRoute.path, params), }); diff --git a/js/apps/admin-ui/src/sessions/routes/Sessions.tsx b/js/apps/admin-ui/src/sessions/routes/Sessions.tsx index 0fdaca0b9fbb..1a273a325921 100644 --- a/js/apps/admin-ui/src/sessions/routes/Sessions.tsx +++ b/js/apps/admin-ui/src/sessions/routes/Sessions.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type SessionsParams = { realm: string }; @@ -17,5 +17,5 @@ export const SessionsRoute: AppRouteObject = { }; export const toSessions = (params: SessionsParams): Partial => ({ - pathname: generatePath(SessionsRoute.path, params), + pathname: generateUnencodedPath(SessionsRoute.path, params), }); 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 1a15c8acce1d..54758bb16abd 100644 --- a/js/apps/admin-ui/src/user-federation/routes/CustomUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/CustomUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; @@ -26,5 +26,5 @@ export const CustomUserFederationRoute: AppRouteObject = { export const toCustomUserFederation = ( params: CustomUserFederationRouteParams, ): Partial => ({ - pathname: generatePath(CustomUserFederationRoute.path, params), + pathname: generateUnencodedPath(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 2a95a46c6c74..000114b0478a 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewCustomUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewCustomUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; @@ -25,5 +25,5 @@ export const NewCustomUserFederationRoute: AppRouteObject = { export const toNewCustomUserFederation = ( params: NewCustomUserFederationRouteParams, ): Partial => ({ - pathname: generatePath(NewCustomUserFederationRoute.path, params), + pathname: generateUnencodedPath(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 462c1b417b15..ef497dcf84fa 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewKerberosUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewKerberosUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewKerberosUserFederationParams = { realm: string }; @@ -21,5 +21,5 @@ export const NewKerberosUserFederationRoute: AppRouteObject = { export const toNewKerberosUserFederation = ( params: NewKerberosUserFederationParams, ): Partial => ({ - pathname: generatePath(NewKerberosUserFederationRoute.path, params), + pathname: generateUnencodedPath(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 3de1997c9eba..b9b5bca9506c 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewLdapUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewLdapUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewLdapUserFederationParams = { realm: string }; @@ -21,5 +21,5 @@ export const NewLdapUserFederationRoute: AppRouteObject = { export const toNewLdapUserFederation = ( params: NewLdapUserFederationParams, ): Partial => ({ - pathname: generatePath(NewLdapUserFederationRoute.path, params), + pathname: generateUnencodedPath(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 01f305f6a032..b62f1043f3be 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationParams = { realm: string }; @@ -19,5 +19,5 @@ export const UserFederationRoute: AppRouteObject = { export const toUserFederation = ( params: UserFederationParams, ): Partial => ({ - pathname: generatePath(UserFederationRoute.path, params), + pathname: generateUnencodedPath(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 2ac7d91d4865..3d881c9a7342 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationKerberos.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationKerberos.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationKerberosParams = { @@ -24,5 +24,5 @@ export const UserFederationKerberosRoute: AppRouteObject = { export const toUserFederationKerberos = ( params: UserFederationKerberosParams, ): Partial => ({ - pathname: generatePath(UserFederationKerberosRoute.path, params), + pathname: generateUnencodedPath(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 4ab07fff9418..255826c79172 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationLdap.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationLdap.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationLdapTab = "settings" | "mappers"; @@ -37,6 +37,6 @@ export const toUserFederationLdap = ( : UserFederationLdapRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(path, params), }; }; 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 f6ddeb0928dd..7fa56f73eb9a 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationLdapMapper.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationLdapMapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationLdapMapperParams = { @@ -25,5 +25,5 @@ export const UserFederationLdapMapperRoute: AppRouteObject = { export const toUserFederationLdapMapper = ( params: UserFederationLdapMapperParams, ): Partial => ({ - pathname: generatePath(UserFederationLdapMapperRoute.path, params), + pathname: generateUnencodedPath(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 a1139525b1da..f5046fcb0736 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationsKerberos.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationsKerberos.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationsKerberosParams = { realm: string }; @@ -18,5 +18,5 @@ export const UserFederationsKerberosRoute: AppRouteObject = { export const toUserFederationsKerberos = ( params: UserFederationsKerberosParams, ): Partial => ({ - pathname: generatePath(UserFederationsKerberosRoute.path, params), + pathname: generateUnencodedPath(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 9ebf183b9dd6..d8de69afd72c 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationsLdap.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationsLdap.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationsLdapParams = { realm: string }; @@ -18,5 +18,5 @@ export const UserFederationsLdapRoute: AppRouteObject = { export const toUserFederationsLdap = ( params: UserFederationsLdapParams, ): Partial => ({ - pathname: generatePath(UserFederationsLdapRoute.path, params), + pathname: generateUnencodedPath(UserFederationsLdapRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user/routes/AddUser.tsx b/js/apps/admin-ui/src/user/routes/AddUser.tsx index a83f53a60435..4bf8c34f2efc 100644 --- a/js/apps/admin-ui/src/user/routes/AddUser.tsx +++ b/js/apps/admin-ui/src/user/routes/AddUser.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; @@ -18,5 +18,5 @@ export const AddUserRoute: AppRouteObject = { }; export const toAddUser = (params: AddUserParams): Partial => ({ - pathname: generatePath(AddUserRoute.path, params), + pathname: generateUnencodedPath(AddUserRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user/routes/User.tsx b/js/apps/admin-ui/src/user/routes/User.tsx index 35dab2b54e35..8f7bf9ed9b28 100644 --- a/js/apps/admin-ui/src/user/routes/User.tsx +++ b/js/apps/admin-ui/src/user/routes/User.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserTab = @@ -31,5 +31,5 @@ export const UserRoute: AppRouteObject = { }; export const toUser = (params: UserParams): Partial => ({ - pathname: generatePath(UserRoute.path, params), + pathname: generateUnencodedPath(UserRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user/routes/Users.tsx b/js/apps/admin-ui/src/user/routes/Users.tsx index 207d76c9ed14..e77ff7b3d31f 100644 --- a/js/apps/admin-ui/src/user/routes/Users.tsx +++ b/js/apps/admin-ui/src/user/routes/Users.tsx @@ -1,5 +1,5 @@ import { lazy } from "react"; -import { generatePath } from "../../util"; +import { generateUnencodedPath } from "../../util"; import type { Path } from "react-router-dom"; import type { AppRouteObject } from "../../routes"; @@ -27,6 +27,6 @@ export const toUsers = (params: UsersParams): Partial => { const path = params.tab ? UsersRouteWithTab.path : UsersRoute.path; return { - pathname: generatePath(path, params), + pathname: generateUnencodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/util.ts b/js/apps/admin-ui/src/util.ts index d6ba7a9a97b8..986e9b79f3e9 100644 --- a/js/apps/admin-ui/src/util.ts +++ b/js/apps/admin-ui/src/util.ts @@ -5,7 +5,7 @@ import { flatten } from "flat"; import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation"; import type { ProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation"; import type { IFormatter, IFormatterValueType } from "@patternfly/react-table"; -import { generatePath as generateUnencodedPath } from "react-router-dom"; +import { generatePath } from "react-router-dom"; import { arrayToKeyValue, @@ -172,16 +172,17 @@ export const addTrailingSlash = (url: string) => export const generateId = () => Math.floor(Math.random() * 1000); -export function generatePath( +type PathParam = { [key: string]: string | null }; + +export function generateUnencodedPath( originalPath: Path, - params?: { - [key: string]: string | null; - }, + params: PathParam, ): string { - if (params) - Object.entries(params).forEach( - ([k, v]) => (params[k] = encodeURIComponent(v || "")), - ); - //@ts-ignore as PathParam isn't an exported type - return generateUnencodedPath(originalPath, params); + const encodedParams: PathParam = {}; + Object.entries(params).forEach( + ([k, v]) => (encodedParams[k] = encodeURIComponent(v || "")), + ); + + //@ts-ignore TODO: Fix type annotation once https://github.com/remix-run/react-router/pull/10719 is merged. + return generatePath(originalPath, encodedParams); } From 5feb0c8ba9f5f8eff72ff04e991032f7b885ea59 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Mon, 16 Oct 2023 08:47:42 +0200 Subject: [PATCH 4/5] more review --- .../src/authentication/routes/Authentication.tsx | 4 ++-- .../admin-ui/src/authentication/routes/CreateFlow.tsx | 4 ++-- js/apps/admin-ui/src/authentication/routes/Flow.tsx | 4 ++-- .../admin-ui/src/client-scopes/routes/ClientScope.tsx | 4 ++-- .../admin-ui/src/client-scopes/routes/ClientScopes.tsx | 4 ++-- js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx | 4 ++-- .../src/client-scopes/routes/NewClientScope.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/AddClient.tsx | 4 ++-- .../src/clients/routes/AddRegistrationProvider.tsx | 4 ++-- .../admin-ui/src/clients/routes/AuthenticationTab.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/Client.tsx | 4 ++-- .../admin-ui/src/clients/routes/ClientRegistration.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/ClientRole.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/Clients.tsx | 4 ++-- .../src/clients/routes/CreateInitialAccessToken.tsx | 4 ++-- .../src/clients/routes/DedicatedScopeDetails.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/ImportClient.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/Mapper.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/NewPermission.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/NewPolicy.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/NewResource.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/NewRole.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/NewScope.tsx | 4 ++-- .../admin-ui/src/clients/routes/PermissionDetails.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/Resource.tsx | 4 ++-- js/apps/admin-ui/src/clients/routes/Scope.tsx | 4 ++-- js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx | 4 ++-- js/apps/admin-ui/src/events/routes/Events.tsx | 4 ++-- js/apps/admin-ui/src/groups/routes/Groups.tsx | 4 ++-- .../src/identity-providers/routes/AddMapper.tsx | 4 ++-- .../src/identity-providers/routes/EditMapper.tsx | 4 ++-- .../src/identity-providers/routes/IdentityProvider.tsx | 4 ++-- .../routes/IdentityProviderCreate.tsx | 4 ++-- .../routes/IdentityProviderKeycloakOidc.tsx | 7 ++----- .../identity-providers/routes/IdentityProviderOidc.tsx | 4 ++-- .../identity-providers/routes/IdentityProviderSaml.tsx | 4 ++-- .../identity-providers/routes/IdentityProviders.tsx | 4 ++-- js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx | 4 ++-- js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx | 4 ++-- js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx | 4 ++-- .../src/realm-settings/routes/AddAttribute.tsx | 4 ++-- .../src/realm-settings/routes/AddClientPolicy.tsx | 4 ++-- .../src/realm-settings/routes/AddClientProfile.tsx | 4 ++-- .../src/realm-settings/routes/AddCondition.tsx | 4 ++-- .../admin-ui/src/realm-settings/routes/AddExecutor.tsx | 4 ++-- .../admin-ui/src/realm-settings/routes/Attribute.tsx | 4 ++-- .../src/realm-settings/routes/ClientPolicies.tsx | 4 ++-- .../src/realm-settings/routes/ClientProfile.tsx | 4 ++-- .../src/realm-settings/routes/EditAttributesGroup.tsx | 4 ++-- .../src/realm-settings/routes/EditClientPolicy.tsx | 4 ++-- .../src/realm-settings/routes/EditCondition.tsx | 4 ++-- .../admin-ui/src/realm-settings/routes/Executor.tsx | 4 ++-- .../admin-ui/src/realm-settings/routes/KeyProvider.tsx | 4 ++-- js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx | 4 ++-- .../src/realm-settings/routes/NewAttributesGroup.tsx | 4 ++-- .../src/realm-settings/routes/RealmSettings.tsx | 4 ++-- .../admin-ui/src/realm-settings/routes/UserProfile.tsx | 4 ++-- js/apps/admin-ui/src/realm/routes/AddRealm.tsx | 4 ++-- js/apps/admin-ui/src/sessions/routes/Sessions.tsx | 4 ++-- .../user-federation/routes/CustomUserFederation.tsx | 4 ++-- .../user-federation/routes/NewCustomUserFederation.tsx | 4 ++-- .../routes/NewKerberosUserFederation.tsx | 4 ++-- .../user-federation/routes/NewLdapUserFederation.tsx | 4 ++-- .../src/user-federation/routes/UserFederation.tsx | 4 ++-- .../user-federation/routes/UserFederationKerberos.tsx | 4 ++-- .../src/user-federation/routes/UserFederationLdap.tsx | 4 ++-- .../routes/UserFederationLdapMapper.tsx | 4 ++-- .../user-federation/routes/UserFederationsKerberos.tsx | 4 ++-- .../src/user-federation/routes/UserFederationsLdap.tsx | 4 ++-- js/apps/admin-ui/src/user/routes/AddUser.tsx | 4 ++-- js/apps/admin-ui/src/user/routes/User.tsx | 4 ++-- js/apps/admin-ui/src/user/routes/Users.tsx | 4 ++-- js/apps/admin-ui/src/util.ts | 10 +++++----- 75 files changed, 153 insertions(+), 156 deletions(-) diff --git a/js/apps/admin-ui/src/authentication/routes/Authentication.tsx b/js/apps/admin-ui/src/authentication/routes/Authentication.tsx index 4ec12ba6bc51..dbb7d26c7563 100644 --- a/js/apps/admin-ui/src/authentication/routes/Authentication.tsx +++ b/js/apps/admin-ui/src/authentication/routes/Authentication.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AuthenticationTab = "flows" | "required-actions" | "policies"; @@ -31,6 +31,6 @@ export const toAuthentication = ( : AuthenticationRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx b/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx index 31de14b57e99..4909c5062c64 100644 --- a/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx +++ b/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type CreateFlowParams = { realm: string }; @@ -17,5 +17,5 @@ export const CreateFlowRoute: AppRouteObject = { }; export const toCreateFlow = (params: CreateFlowParams): Partial => ({ - pathname: generateUnencodedPath(CreateFlowRoute.path, params), + pathname: generateEncodedPath(CreateFlowRoute.path, params), }); diff --git a/js/apps/admin-ui/src/authentication/routes/Flow.tsx b/js/apps/admin-ui/src/authentication/routes/Flow.tsx index 9a9e28174a46..66ec5f8a9386 100644 --- a/js/apps/admin-ui/src/authentication/routes/Flow.tsx +++ b/js/apps/admin-ui/src/authentication/routes/Flow.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type FlowParams = { @@ -30,6 +30,6 @@ export const toFlow = (params: FlowParams): Partial => { const path = params.builtIn ? FlowWithBuiltInRoute.path : FlowRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx b/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx index c39e1929fc42..280ce5e62c42 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientScopeTab = "settings" | "mappers" | "scope"; @@ -26,6 +26,6 @@ export const toClientScope = (params: ClientScopeParams): Partial => { const path = ClientScopeRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx b/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx index 0448262657e8..2c109df8014c 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientScopesParams = { realm: string }; @@ -17,5 +17,5 @@ export const ClientScopesRoute: AppRouteObject = { }; export const toClientScopes = (params: ClientScopesParams): Partial => ({ - pathname: generateUnencodedPath(ClientScopesRoute.path, params), + pathname: generateEncodedPath(ClientScopesRoute.path, params), }); diff --git a/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx b/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx index 87a3c351551e..971f6132bd11 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type MapperParams = { @@ -21,5 +21,5 @@ export const MapperRoute: AppRouteObject = { }; export const toMapper = (params: MapperParams): Partial => ({ - pathname: generateUnencodedPath(MapperRoute.path, params), + pathname: generateEncodedPath(MapperRoute.path, params), }); 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 ded6b7307dd5..c2ffaa62fc44 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/NewClientScope.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/NewClientScope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewClientScopeParams = { realm: string }; @@ -19,5 +19,5 @@ export const NewClientScopeRoute: AppRouteObject = { export const toNewClientScope = ( params: NewClientScopeParams, ): Partial => ({ - pathname: generateUnencodedPath(NewClientScopeRoute.path, params), + pathname: generateEncodedPath(NewClientScopeRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/AddClient.tsx b/js/apps/admin-ui/src/clients/routes/AddClient.tsx index cb8595b0f6c3..85a752339b64 100644 --- a/js/apps/admin-ui/src/clients/routes/AddClient.tsx +++ b/js/apps/admin-ui/src/clients/routes/AddClient.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddClientParams = { realm: string }; @@ -17,5 +17,5 @@ export const AddClientRoute: AppRouteObject = { }; export const toAddClient = (params: AddClientParams): Partial => ({ - pathname: generateUnencodedPath(AddClientRoute.path, params), + pathname: generateEncodedPath(AddClientRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx b/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx index 7bfc10a0a2ef..f30784c27c51 100644 --- a/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx +++ b/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; import { ClientRegistrationTab } from "./ClientRegistration"; @@ -35,6 +35,6 @@ export const toRegistrationProvider = ( : AddRegistrationProviderRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx b/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx index 4da3b8427072..402e68a232db 100644 --- a/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx +++ b/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AuthorizationTab = @@ -32,5 +32,5 @@ export const AuthorizationRoute: AppRouteObject = { export const toAuthorizationTab = ( params: AuthorizationParams, ): Partial => ({ - pathname: generateUnencodedPath(AuthorizationRoute.path, params), + pathname: generateEncodedPath(AuthorizationRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/Client.tsx b/js/apps/admin-ui/src/clients/routes/Client.tsx index 7e17975d90aa..fb141c43c403 100644 --- a/js/apps/admin-ui/src/clients/routes/Client.tsx +++ b/js/apps/admin-ui/src/clients/routes/Client.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientTab = @@ -34,5 +34,5 @@ export const ClientRoute: AppRouteObject = { }; export const toClient = (params: ClientParams): Partial => ({ - pathname: generateUnencodedPath(ClientRoute.path, params), + pathname: generateEncodedPath(ClientRoute.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 9ce87a897b7c..224cea9e114b 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientRegistrationTab = "anonymous" | "authenticated"; @@ -24,5 +24,5 @@ export const ClientRegistrationRoute: AppRouteObject = { export const toClientRegistration = ( params: ClientRegistrationParams, ): Partial => ({ - pathname: generateUnencodedPath(ClientRegistrationRoute.path, params), + pathname: generateEncodedPath(ClientRegistrationRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/ClientRole.tsx b/js/apps/admin-ui/src/clients/routes/ClientRole.tsx index 05b626893f62..a84758243337 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientRole.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientRoleTab = @@ -28,5 +28,5 @@ export const ClientRoleRoute: AppRouteObject = { } satisfies AppRouteObject; export const toClientRole = (params: ClientRoleParams): Partial => ({ - pathname: generateUnencodedPath(ClientRoleRoute.path, params), + pathname: generateEncodedPath(ClientRoleRoute.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 1ead87506a3e..d1f78f8ed2f8 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientScopesTab = "setup" | "evaluate"; @@ -25,5 +25,5 @@ export const ClientScopesRoute: AppRouteObject = { export const toClientScopesTab = ( params: ClientScopesParams, ): Partial => ({ - pathname: generateUnencodedPath(ClientScopesRoute.path, params), + pathname: generateEncodedPath(ClientScopesRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/Clients.tsx b/js/apps/admin-ui/src/clients/routes/Clients.tsx index f4d98502e479..e6e1b9df18be 100644 --- a/js/apps/admin-ui/src/clients/routes/Clients.tsx +++ b/js/apps/admin-ui/src/clients/routes/Clients.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientsTab = @@ -33,6 +33,6 @@ export const toClients = (params: ClientsParams): Partial => { const path = params.tab ? ClientsRouteWithTab.path : ClientsRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(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 d0ff9d7aa1c6..8089353f1184 100644 --- a/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx +++ b/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type CreateInitialAccessTokenParams = { realm: string }; @@ -21,5 +21,5 @@ export const CreateInitialAccessTokenRoute: AppRouteObject = { export const toCreateInitialAccessToken = ( params: CreateInitialAccessTokenParams, ): Partial => ({ - pathname: generateUnencodedPath(CreateInitialAccessTokenRoute.path, params), + pathname: generateEncodedPath(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 d19b79091d66..47799923e35d 100644 --- a/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx @@ -1,7 +1,7 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; import type { AppRouteObject } from "../../routes"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; export type DedicatedScopeTab = "mappers" | "scope"; @@ -35,6 +35,6 @@ export const toDedicatedScope = ( : DedicatedScopeDetailsRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/clients/routes/ImportClient.tsx b/js/apps/admin-ui/src/clients/routes/ImportClient.tsx index c143b67df7c6..86d5af3618b6 100644 --- a/js/apps/admin-ui/src/clients/routes/ImportClient.tsx +++ b/js/apps/admin-ui/src/clients/routes/ImportClient.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ImportClientParams = { realm: string }; @@ -17,5 +17,5 @@ export const ImportClientRoute: AppRouteObject = { }; export const toImportClient = (params: ImportClientParams): Partial => ({ - pathname: generateUnencodedPath(ImportClientRoute.path, params), + pathname: generateEncodedPath(ImportClientRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/Mapper.tsx b/js/apps/admin-ui/src/clients/routes/Mapper.tsx index cdc8b31544b1..675978567826 100644 --- a/js/apps/admin-ui/src/clients/routes/Mapper.tsx +++ b/js/apps/admin-ui/src/clients/routes/Mapper.tsx @@ -1,7 +1,7 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; import type { AppRouteObject } from "../../routes"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; export type MapperParams = { realm: string; @@ -23,5 +23,5 @@ export const MapperRoute: AppRouteObject = { }; export const toMapper = (params: MapperParams): Partial => ({ - pathname: generateUnencodedPath(MapperRoute.path, params), + pathname: generateEncodedPath(MapperRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/NewPermission.tsx b/js/apps/admin-ui/src/clients/routes/NewPermission.tsx index 2a996ff096e7..a535d62e4207 100644 --- a/js/apps/admin-ui/src/clients/routes/NewPermission.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewPermission.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type PermissionType = "resource" | "scope"; @@ -36,6 +36,6 @@ export const toNewPermission = (params: NewPermissionParams): Partial => { : NewPermissionRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx b/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx index 7cd509b2dc02..14580c3323d5 100644 --- a/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewPolicyParams = { realm: string; id: string; policyType: string }; @@ -19,5 +19,5 @@ export const NewPolicyRoute: AppRouteObject = { }; export const toCreatePolicy = (params: NewPolicyParams): Partial => ({ - pathname: generateUnencodedPath(NewPolicyRoute.path, params), + pathname: generateEncodedPath(NewPolicyRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/NewResource.tsx b/js/apps/admin-ui/src/clients/routes/NewResource.tsx index d373cab35cb1..62c3aaf66109 100644 --- a/js/apps/admin-ui/src/clients/routes/NewResource.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewResource.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewResourceParams = { realm: string; id: string }; @@ -17,5 +17,5 @@ export const NewResourceRoute: AppRouteObject = { }; export const toCreateResource = (params: NewResourceParams): Partial => ({ - pathname: generateUnencodedPath(NewResourceRoute.path, params), + pathname: generateEncodedPath(NewResourceRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/NewRole.tsx b/js/apps/admin-ui/src/clients/routes/NewRole.tsx index 5ad2f2a91777..ba8482a3f9d7 100644 --- a/js/apps/admin-ui/src/clients/routes/NewRole.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewRoleParams = { realm: string; clientId: string }; @@ -17,5 +17,5 @@ export const NewRoleRoute: AppRouteObject = { }; export const toCreateRole = (params: NewRoleParams): Partial => ({ - pathname: generateUnencodedPath(NewRoleRoute.path, params), + pathname: generateEncodedPath(NewRoleRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/NewScope.tsx b/js/apps/admin-ui/src/clients/routes/NewScope.tsx index bb30b0e9ada4..bc1272597985 100644 --- a/js/apps/admin-ui/src/clients/routes/NewScope.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewScope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewScopeParams = { realm: string; id: string }; @@ -17,5 +17,5 @@ export const NewScopeRoute: AppRouteObject = { }; export const toNewScope = (params: NewScopeParams): Partial => ({ - pathname: generateUnencodedPath(NewScopeRoute.path, params), + pathname: generateEncodedPath(NewScopeRoute.path, params), }); diff --git a/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx b/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx index b8e8bc0d8f79..2b78233afb6b 100644 --- a/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; import type { PermissionType } from "./NewPermission"; @@ -27,5 +27,5 @@ export const PermissionDetailsRoute: AppRouteObject = { export const toPermissionDetails = ( params: PermissionDetailsParams, ): Partial => ({ - pathname: generateUnencodedPath(PermissionDetailsRoute.path, params), + pathname: generateEncodedPath(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 73551a655c66..106bf8df8ef8 100644 --- a/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type PolicyDetailsParams = { @@ -26,5 +26,5 @@ export const PolicyDetailsRoute: AppRouteObject = { export const toPolicyDetails = ( params: PolicyDetailsParams, ): Partial => ({ - pathname: generateUnencodedPath(PolicyDetailsRoute.path, params), + pathname: generateEncodedPath(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 47ba6fad5bce..901743629712 100644 --- a/js/apps/admin-ui/src/clients/routes/Resource.tsx +++ b/js/apps/admin-ui/src/clients/routes/Resource.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ResourceDetailsParams = { @@ -33,6 +33,6 @@ export const toResourceDetails = ( : ResourceDetailsRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/clients/routes/Scope.tsx b/js/apps/admin-ui/src/clients/routes/Scope.tsx index b0efd61abcdc..679d512e4576 100644 --- a/js/apps/admin-ui/src/clients/routes/Scope.tsx +++ b/js/apps/admin-ui/src/clients/routes/Scope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ScopeDetailsParams = { @@ -31,6 +31,6 @@ export const toScopeDetails = (params: ScopeDetailsParams): Partial => { : ScopeDetailsRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx b/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx index 57deb8e9b349..b9685230fa16 100644 --- a/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx +++ b/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type DashboardTab = "info" | "providers"; @@ -36,6 +36,6 @@ export const toDashboard = (params: DashboardParams): Partial => { : DashboardRoute.path; return { - pathname: generateUnencodedPath(pathname, params), + pathname: generateEncodedPath(pathname, params), }; }; diff --git a/js/apps/admin-ui/src/events/routes/Events.tsx b/js/apps/admin-ui/src/events/routes/Events.tsx index 5cfbb61d7d55..506af32325a6 100644 --- a/js/apps/admin-ui/src/events/routes/Events.tsx +++ b/js/apps/admin-ui/src/events/routes/Events.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type EventsTab = "user-events" | "admin-events"; @@ -30,6 +30,6 @@ export const toEvents = (params: EventsParams): Partial => { const path = params.tab ? EventsRouteWithTab.path : EventsRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/groups/routes/Groups.tsx b/js/apps/admin-ui/src/groups/routes/Groups.tsx index 37132b3ae733..c880c046c6b2 100644 --- a/js/apps/admin-ui/src/groups/routes/Groups.tsx +++ b/js/apps/admin-ui/src/groups/routes/Groups.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type GroupsParams = { realm: string; id?: string; lazy?: string }; @@ -24,6 +24,6 @@ export const toGroups = (params: GroupsParams): Partial => { const path = params.id ? GroupsWithIdRoute.path : GroupsRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(path, params), }; }; 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 3a901a558abf..bebf760e8a37 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/AddMapper.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/AddMapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderAddMapperParams = { @@ -24,5 +24,5 @@ export const IdentityProviderAddMapperRoute: AppRouteObject = { export const toIdentityProviderAddMapper = ( params: IdentityProviderAddMapperParams, ): Partial => ({ - pathname: generateUnencodedPath(IdentityProviderAddMapperRoute.path, params), + pathname: generateEncodedPath(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 e0bfdc5663b7..4db6f6ab4986 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/EditMapper.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/EditMapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderEditMapperParams = { @@ -24,5 +24,5 @@ export const IdentityProviderEditMapperRoute: AppRouteObject = { export const toIdentityProviderEditMapper = ( params: IdentityProviderEditMapperParams, ): Partial => ({ - pathname: generateUnencodedPath(IdentityProviderEditMapperRoute.path, params), + pathname: generateEncodedPath(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 b234a7f32e7d..3ac6baccad04 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProvider.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProvider.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderTab = "settings" | "mappers" | "permissions"; @@ -26,5 +26,5 @@ export const IdentityProviderRoute: AppRouteObject = { export const toIdentityProvider = ( params: IdentityProviderParams, ): Partial => ({ - pathname: generateUnencodedPath(IdentityProviderRoute.path, params), + pathname: generateEncodedPath(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 0d01604e7c2f..a1128915ce99 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderCreate.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderCreate.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderCreateParams = { @@ -22,5 +22,5 @@ export const IdentityProviderCreateRoute: AppRouteObject = { export const toIdentityProviderCreate = ( params: IdentityProviderCreateParams, ): Partial => ({ - pathname: generateUnencodedPath(IdentityProviderCreateRoute.path, params), + pathname: generateEncodedPath(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 95f009ed064f..2fe7a486f250 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderKeycloakOidc.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderKeycloakOidc.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderKeycloakOidcParams = { realm: string }; @@ -19,8 +19,5 @@ export const IdentityProviderKeycloakOidcRoute: AppRouteObject = { export const toIdentityProviderKeycloakOidc = ( params: IdentityProviderKeycloakOidcParams, ): Partial => ({ - pathname: generateUnencodedPath( - IdentityProviderKeycloakOidcRoute.path, - params, - ), + pathname: generateEncodedPath(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 99ba0187da9e..ab0eedb4d44f 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderOidc.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderOidc.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderOidcParams = { realm: string }; @@ -19,5 +19,5 @@ export const IdentityProviderOidcRoute: AppRouteObject = { export const toIdentityProviderOidc = ( params: IdentityProviderOidcParams, ): Partial => ({ - pathname: generateUnencodedPath(IdentityProviderOidcRoute.path, params), + pathname: generateEncodedPath(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 fcc2b2076351..2c6eb94152e8 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderSaml.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderSaml.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderSamlParams = { realm: string }; @@ -19,5 +19,5 @@ export const IdentityProviderSamlRoute: AppRouteObject = { export const toIdentityProviderSaml = ( params: IdentityProviderSamlParams, ): Partial => ({ - pathname: generateUnencodedPath(IdentityProviderSamlRoute.path, params), + pathname: generateEncodedPath(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 4edfb4513877..585fd1012a44 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviders.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviders.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type IdentityProvidersParams = { realm: string }; @@ -21,5 +21,5 @@ export const IdentityProvidersRoute: AppRouteObject = { export const toIdentityProviders = ( params: IdentityProvidersParams, ): Partial => ({ - pathname: generateUnencodedPath(IdentityProvidersRoute.path, params), + pathname: generateEncodedPath(IdentityProvidersRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx b/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx index 9cbf73331bcb..e8511d7c1611 100644 --- a/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx +++ b/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddRoleParams = { realm: string }; @@ -17,5 +17,5 @@ export const AddRoleRoute: AppRouteObject = { }; export const toAddRole = (params: AddRoleParams): Partial => ({ - pathname: generateUnencodedPath(AddRoleRoute.path, params), + pathname: generateEncodedPath(AddRoleRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx b/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx index f6c0e90db3d8..540a861296a0 100644 --- a/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx +++ b/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; @@ -29,5 +29,5 @@ export const RealmRoleRoute: AppRouteObject = { }; export const toRealmRole = (params: RealmRoleParams): Partial => ({ - pathname: generateUnencodedPath(RealmRoleRoute.path, params), + pathname: generateEncodedPath(RealmRoleRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx b/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx index f80ec64b2fce..50ed40296fb4 100644 --- a/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx +++ b/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type RealmRolesParams = { realm: string }; @@ -17,5 +17,5 @@ export const RealmRolesRoute: AppRouteObject = { }; export const toRealmRoles = (params: RealmRolesParams): Partial => ({ - pathname: generateUnencodedPath(RealmRolesRoute.path, params), + pathname: generateEncodedPath(RealmRolesRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx b/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx index c33959b4073a..2597bcaabafc 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddAttributeParams = { @@ -19,5 +19,5 @@ export const AddAttributeRoute: AppRouteObject = { }; export const toAddAttribute = (params: AddAttributeParams): Partial => ({ - pathname: generateUnencodedPath(AddAttributeRoute.path, params), + pathname: generateEncodedPath(AddAttributeRoute.path, params), }); 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 8ad83ed5886c..66b6e29550c8 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddClientPolicy.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddClientPolicy.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddClientPolicyParams = { realm: string }; @@ -19,5 +19,5 @@ export const AddClientPolicyRoute: AppRouteObject = { export const toAddClientPolicy = ( params: AddClientPolicyParams, ): Partial => ({ - pathname: generateUnencodedPath(AddClientPolicyRoute.path, params), + pathname: generateEncodedPath(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 26a9c17f12a0..98f943c2edfd 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddClientProfileParams = { @@ -22,5 +22,5 @@ export const AddClientProfileRoute: AppRouteObject = { export const toAddClientProfile = ( params: AddClientProfileParams, ): Partial => ({ - pathname: generateUnencodedPath(AddClientProfileRoute.path, params), + pathname: generateEncodedPath(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 a3fbcceb1f81..34c1cc5f444c 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddCondition.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddCondition.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewClientPolicyConditionParams = { @@ -24,5 +24,5 @@ export const NewClientPolicyConditionRoute: AppRouteObject = { export const toNewClientPolicyCondition = ( params: NewClientPolicyConditionParams, ): Partial => ({ - pathname: generateUnencodedPath(NewClientPolicyConditionRoute.path, params), + pathname: generateEncodedPath(NewClientPolicyConditionRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx b/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx index 7755c912fbd7..5c2137a7a1b7 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddExecutorParams = { @@ -20,5 +20,5 @@ export const AddExecutorRoute: AppRouteObject = { }; export const toAddExecutor = (params: AddExecutorParams): Partial => ({ - pathname: generateUnencodedPath(AddExecutorRoute.path, params), + pathname: generateEncodedPath(AddExecutorRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx b/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx index 04161c378e57..8499826730ec 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AttributeParams = { @@ -20,5 +20,5 @@ export const AttributeRoute: AppRouteObject = { }; export const toAttribute = (params: AttributeParams): Partial => ({ - pathname: generateUnencodedPath(AttributeRoute.path, params), + pathname: generateEncodedPath(AttributeRoute.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 c11cf7008270..eb9027d3bfef 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/ClientPolicies.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/ClientPolicies.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientPoliciesTab = "profiles" | "policies"; @@ -24,5 +24,5 @@ export const ClientPoliciesRoute: AppRouteObject = { export const toClientPolicies = ( params: ClientPoliciesParams, ): Partial => ({ - pathname: generateUnencodedPath(ClientPoliciesRoute.path, params), + pathname: generateEncodedPath(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 32f7331b9c19..dd30f35c3c13 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/ClientProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/ClientProfile.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ClientProfileParams = { @@ -22,5 +22,5 @@ export const ClientProfileRoute: AppRouteObject = { export const toClientProfile = ( params: ClientProfileParams, ): Partial => ({ - pathname: generateUnencodedPath(ClientProfileRoute.path, params), + pathname: generateEncodedPath(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 bb722069c146..07f9464acc49 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditAttributesGroup.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditAttributesGroup.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type EditAttributesGroupParams = { @@ -24,5 +24,5 @@ export const EditAttributesGroupRoute: AppRouteObject = { export const toEditAttributesGroup = ( params: EditAttributesGroupParams, ): Partial => ({ - pathname: generateUnencodedPath(EditAttributesGroupRoute.path, params), + pathname: generateEncodedPath(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 b57ba90873be..d02521e7f15a 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditClientPolicy.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditClientPolicy.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type EditClientPolicyParams = { @@ -22,5 +22,5 @@ export const EditClientPolicyRoute: AppRouteObject = { export const toEditClientPolicy = ( params: EditClientPolicyParams, ): Partial => ({ - pathname: generateUnencodedPath(EditClientPolicyRoute.path, params), + pathname: generateEncodedPath(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 93c3bf217908..aff447f7713f 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditCondition.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditCondition.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type EditClientPolicyConditionParams = { @@ -25,5 +25,5 @@ export const EditClientPolicyConditionRoute: AppRouteObject = { export const toEditClientPolicyCondition = ( params: EditClientPolicyConditionParams, ): Partial => ({ - pathname: generateUnencodedPath(EditClientPolicyConditionRoute.path, params), + pathname: generateEncodedPath(EditClientPolicyConditionRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx b/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx index 4b655d630944..17abe30cb81c 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ExecutorParams = { @@ -21,5 +21,5 @@ export const ExecutorRoute: AppRouteObject = { }; export const toExecutor = (params: ExecutorParams): Partial => ({ - pathname: generateUnencodedPath(ExecutorRoute.path, params), + pathname: generateEncodedPath(ExecutorRoute.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 9fe8f3c8620e..5a19415f3358 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/KeyProvider.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/KeyProvider.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type ProviderType = @@ -33,5 +33,5 @@ export const KeyProviderFormRoute: AppRouteObject = { }; export const toKeyProvider = (params: KeyProviderParams): Partial => ({ - pathname: generateUnencodedPath(KeyProviderFormRoute.path, params), + pathname: generateEncodedPath(KeyProviderFormRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx b/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx index ac9345016eee..79fa7fbde4a8 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type KeySubTab = "list" | "providers"; @@ -22,5 +22,5 @@ export const KeysRoute: AppRouteObject = { }; export const toKeysTab = (params: KeysParams): Partial => ({ - pathname: generateUnencodedPath(KeysRoute.path, params), + pathname: generateEncodedPath(KeysRoute.path, params), }); 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 a52d4046a455..1724cc90eb1e 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/NewAttributesGroup.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/NewAttributesGroup.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewAttributesGroupParams = { @@ -23,5 +23,5 @@ export const NewAttributesGroupRoute: AppRouteObject = { export const toNewAttributesGroup = ( params: NewAttributesGroupParams, ): Partial => ({ - pathname: generateUnencodedPath(NewAttributesGroupRoute.path, params), + pathname: generateEncodedPath(NewAttributesGroupRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx b/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx index 95fa00a86d43..3506125f9e8d 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type RealmSettingsTab = @@ -45,6 +45,6 @@ export const toRealmSettings = (params: RealmSettingsParams): Partial => { : RealmSettingsRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx b/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx index 1a065fd96a9c..63547b89cd4a 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserProfileTab = "attributes" | "attributes-group" | "json-editor"; @@ -22,5 +22,5 @@ export const UserProfileRoute: AppRouteObject = { }; export const toUserProfile = (params: UserProfileParams): Partial => ({ - pathname: generateUnencodedPath(UserProfileRoute.path, params), + pathname: generateEncodedPath(UserProfileRoute.path, params), }); diff --git a/js/apps/admin-ui/src/realm/routes/AddRealm.tsx b/js/apps/admin-ui/src/realm/routes/AddRealm.tsx index 7dc62c0d4ac9..1b6b48dd6417 100644 --- a/js/apps/admin-ui/src/realm/routes/AddRealm.tsx +++ b/js/apps/admin-ui/src/realm/routes/AddRealm.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type AddRealmParams = { realm: string }; @@ -17,5 +17,5 @@ export const AddRealmRoute: AppRouteObject = { }; export const toAddRealm = (params: AddRealmParams): Partial => ({ - pathname: generateUnencodedPath(AddRealmRoute.path, params), + pathname: generateEncodedPath(AddRealmRoute.path, params), }); diff --git a/js/apps/admin-ui/src/sessions/routes/Sessions.tsx b/js/apps/admin-ui/src/sessions/routes/Sessions.tsx index 1a273a325921..87b68b9d9141 100644 --- a/js/apps/admin-ui/src/sessions/routes/Sessions.tsx +++ b/js/apps/admin-ui/src/sessions/routes/Sessions.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type SessionsParams = { realm: string }; @@ -17,5 +17,5 @@ export const SessionsRoute: AppRouteObject = { }; export const toSessions = (params: SessionsParams): Partial => ({ - pathname: generateUnencodedPath(SessionsRoute.path, params), + pathname: generateEncodedPath(SessionsRoute.path, params), }); 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 54758bb16abd..c4b24e3d5fd2 100644 --- a/js/apps/admin-ui/src/user-federation/routes/CustomUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/CustomUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; @@ -26,5 +26,5 @@ export const CustomUserFederationRoute: AppRouteObject = { export const toCustomUserFederation = ( params: CustomUserFederationRouteParams, ): Partial => ({ - pathname: generateUnencodedPath(CustomUserFederationRoute.path, params), + pathname: generateEncodedPath(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 000114b0478a..2bbdede7b571 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewCustomUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewCustomUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; @@ -25,5 +25,5 @@ export const NewCustomUserFederationRoute: AppRouteObject = { export const toNewCustomUserFederation = ( params: NewCustomUserFederationRouteParams, ): Partial => ({ - pathname: generateUnencodedPath(NewCustomUserFederationRoute.path, params), + pathname: generateEncodedPath(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 ef497dcf84fa..05a519614232 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewKerberosUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewKerberosUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewKerberosUserFederationParams = { realm: string }; @@ -21,5 +21,5 @@ export const NewKerberosUserFederationRoute: AppRouteObject = { export const toNewKerberosUserFederation = ( params: NewKerberosUserFederationParams, ): Partial => ({ - pathname: generateUnencodedPath(NewKerberosUserFederationRoute.path, params), + pathname: generateEncodedPath(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 b9b5bca9506c..069d4ef1be61 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewLdapUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewLdapUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type NewLdapUserFederationParams = { realm: string }; @@ -21,5 +21,5 @@ export const NewLdapUserFederationRoute: AppRouteObject = { export const toNewLdapUserFederation = ( params: NewLdapUserFederationParams, ): Partial => ({ - pathname: generateUnencodedPath(NewLdapUserFederationRoute.path, params), + pathname: generateEncodedPath(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 b62f1043f3be..c35a2d52bb11 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationParams = { realm: string }; @@ -19,5 +19,5 @@ export const UserFederationRoute: AppRouteObject = { export const toUserFederation = ( params: UserFederationParams, ): Partial => ({ - pathname: generateUnencodedPath(UserFederationRoute.path, params), + pathname: generateEncodedPath(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 3d881c9a7342..aa7c249fe303 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationKerberos.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationKerberos.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationKerberosParams = { @@ -24,5 +24,5 @@ export const UserFederationKerberosRoute: AppRouteObject = { export const toUserFederationKerberos = ( params: UserFederationKerberosParams, ): Partial => ({ - pathname: generateUnencodedPath(UserFederationKerberosRoute.path, params), + pathname: generateEncodedPath(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 255826c79172..526e7b5c5a74 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationLdap.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationLdap.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationLdapTab = "settings" | "mappers"; @@ -37,6 +37,6 @@ export const toUserFederationLdap = ( : UserFederationLdapRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(path, params), }; }; 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 7fa56f73eb9a..6e228be3869d 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationLdapMapper.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationLdapMapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationLdapMapperParams = { @@ -25,5 +25,5 @@ export const UserFederationLdapMapperRoute: AppRouteObject = { export const toUserFederationLdapMapper = ( params: UserFederationLdapMapperParams, ): Partial => ({ - pathname: generateUnencodedPath(UserFederationLdapMapperRoute.path, params), + pathname: generateEncodedPath(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 f5046fcb0736..0b5be749330a 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationsKerberos.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationsKerberos.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationsKerberosParams = { realm: string }; @@ -18,5 +18,5 @@ export const UserFederationsKerberosRoute: AppRouteObject = { export const toUserFederationsKerberos = ( params: UserFederationsKerberosParams, ): Partial => ({ - pathname: generateUnencodedPath(UserFederationsKerberosRoute.path, params), + pathname: generateEncodedPath(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 d8de69afd72c..24494883d0de 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationsLdap.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationsLdap.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserFederationsLdapParams = { realm: string }; @@ -18,5 +18,5 @@ export const UserFederationsLdapRoute: AppRouteObject = { export const toUserFederationsLdap = ( params: UserFederationsLdapParams, ): Partial => ({ - pathname: generateUnencodedPath(UserFederationsLdapRoute.path, params), + pathname: generateEncodedPath(UserFederationsLdapRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user/routes/AddUser.tsx b/js/apps/admin-ui/src/user/routes/AddUser.tsx index 4bf8c34f2efc..dd9e857cfda8 100644 --- a/js/apps/admin-ui/src/user/routes/AddUser.tsx +++ b/js/apps/admin-ui/src/user/routes/AddUser.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; @@ -18,5 +18,5 @@ export const AddUserRoute: AppRouteObject = { }; export const toAddUser = (params: AddUserParams): Partial => ({ - pathname: generateUnencodedPath(AddUserRoute.path, params), + pathname: generateEncodedPath(AddUserRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user/routes/User.tsx b/js/apps/admin-ui/src/user/routes/User.tsx index 8f7bf9ed9b28..5dc20619e819 100644 --- a/js/apps/admin-ui/src/user/routes/User.tsx +++ b/js/apps/admin-ui/src/user/routes/User.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { AppRouteObject } from "../../routes"; export type UserTab = @@ -31,5 +31,5 @@ export const UserRoute: AppRouteObject = { }; export const toUser = (params: UserParams): Partial => ({ - pathname: generateUnencodedPath(UserRoute.path, params), + pathname: generateEncodedPath(UserRoute.path, params), }); diff --git a/js/apps/admin-ui/src/user/routes/Users.tsx b/js/apps/admin-ui/src/user/routes/Users.tsx index e77ff7b3d31f..3601b7207ba9 100644 --- a/js/apps/admin-ui/src/user/routes/Users.tsx +++ b/js/apps/admin-ui/src/user/routes/Users.tsx @@ -1,5 +1,5 @@ import { lazy } from "react"; -import { generateUnencodedPath } from "../../util"; +import { generateEncodedPath } from "../../util"; import type { Path } from "react-router-dom"; import type { AppRouteObject } from "../../routes"; @@ -27,6 +27,6 @@ export const toUsers = (params: UsersParams): Partial => { const path = params.tab ? UsersRouteWithTab.path : UsersRoute.path; return { - pathname: generateUnencodedPath(path, params), + pathname: generateEncodedPath(path, params), }; }; diff --git a/js/apps/admin-ui/src/util.ts b/js/apps/admin-ui/src/util.ts index 986e9b79f3e9..833144788c50 100644 --- a/js/apps/admin-ui/src/util.ts +++ b/js/apps/admin-ui/src/util.ts @@ -172,17 +172,17 @@ export const addTrailingSlash = (url: string) => export const generateId = () => Math.floor(Math.random() * 1000); -type PathParam = { [key: string]: string | null }; +type PathParam = { [key: string]: string }; -export function generateUnencodedPath( +export function generateEncodedPath( originalPath: Path, params: PathParam, ): string { const encodedParams: PathParam = {}; Object.entries(params).forEach( - ([k, v]) => (encodedParams[k] = encodeURIComponent(v || "")), + ([k, v]) => (encodedParams[k] = encodeURIComponent(v)), ); - //@ts-ignore TODO: Fix type annotation once https://github.com/remix-run/react-router/pull/10719 is merged. - return generatePath(originalPath, encodedParams); + //TODO: Fix type once https://github.com/remix-run/react-router/pull/10719 is merged. + return generatePath(originalPath, encodedParams as any); } From 378415e60eeb1d5113ca64c2b0e8ad862113862b Mon Sep 17 00:00:00 2001 From: Jon Koops Date: Mon, 16 Oct 2023 11:58:12 +0200 Subject: [PATCH 5/5] Move to dedicated utility file --- .../authentication/routes/Authentication.tsx | 2 +- .../src/authentication/routes/CreateFlow.tsx | 2 +- .../admin-ui/src/authentication/routes/Flow.tsx | 2 +- .../src/client-scopes/routes/ClientScope.tsx | 2 +- .../src/client-scopes/routes/ClientScopes.tsx | 2 +- .../src/client-scopes/routes/Mapper.tsx | 2 +- .../src/client-scopes/routes/NewClientScope.tsx | 2 +- .../admin-ui/src/clients/routes/AddClient.tsx | 2 +- .../clients/routes/AddRegistrationProvider.tsx | 2 +- .../src/clients/routes/AuthenticationTab.tsx | 2 +- js/apps/admin-ui/src/clients/routes/Client.tsx | 2 +- .../src/clients/routes/ClientRegistration.tsx | 2 +- .../admin-ui/src/clients/routes/ClientRole.tsx | 2 +- .../src/clients/routes/ClientScopeTab.tsx | 2 +- js/apps/admin-ui/src/clients/routes/Clients.tsx | 2 +- .../clients/routes/CreateInitialAccessToken.tsx | 2 +- .../clients/routes/DedicatedScopeDetails.tsx | 2 +- .../src/clients/routes/ImportClient.tsx | 2 +- js/apps/admin-ui/src/clients/routes/Mapper.tsx | 2 +- .../src/clients/routes/NewPermission.tsx | 2 +- .../admin-ui/src/clients/routes/NewPolicy.tsx | 2 +- .../admin-ui/src/clients/routes/NewResource.tsx | 2 +- js/apps/admin-ui/src/clients/routes/NewRole.tsx | 2 +- .../admin-ui/src/clients/routes/NewScope.tsx | 2 +- .../src/clients/routes/PermissionDetails.tsx | 2 +- .../src/clients/routes/PolicyDetails.tsx | 2 +- .../admin-ui/src/clients/routes/Resource.tsx | 2 +- js/apps/admin-ui/src/clients/routes/Scope.tsx | 2 +- .../admin-ui/src/dashboard/routes/Dashboard.tsx | 2 +- js/apps/admin-ui/src/events/routes/Events.tsx | 2 +- js/apps/admin-ui/src/groups/routes/Groups.tsx | 2 +- .../src/identity-providers/routes/AddMapper.tsx | 2 +- .../identity-providers/routes/EditMapper.tsx | 2 +- .../routes/IdentityProvider.tsx | 2 +- .../routes/IdentityProviderCreate.tsx | 2 +- .../routes/IdentityProviderKeycloakOidc.tsx | 2 +- .../routes/IdentityProviderOidc.tsx | 2 +- .../routes/IdentityProviderSaml.tsx | 2 +- .../routes/IdentityProviders.tsx | 2 +- .../admin-ui/src/realm-roles/routes/AddRole.tsx | 2 +- .../src/realm-roles/routes/RealmRole.tsx | 2 +- .../src/realm-roles/routes/RealmRoles.tsx | 2 +- .../src/realm-settings/routes/AddAttribute.tsx | 2 +- .../realm-settings/routes/AddClientPolicy.tsx | 2 +- .../realm-settings/routes/AddClientProfile.tsx | 2 +- .../src/realm-settings/routes/AddCondition.tsx | 2 +- .../src/realm-settings/routes/AddExecutor.tsx | 2 +- .../src/realm-settings/routes/Attribute.tsx | 2 +- .../realm-settings/routes/ClientPolicies.tsx | 2 +- .../src/realm-settings/routes/ClientProfile.tsx | 2 +- .../routes/EditAttributesGroup.tsx | 2 +- .../realm-settings/routes/EditClientPolicy.tsx | 2 +- .../src/realm-settings/routes/EditCondition.tsx | 2 +- .../src/realm-settings/routes/Executor.tsx | 2 +- .../src/realm-settings/routes/KeyProvider.tsx | 2 +- .../src/realm-settings/routes/KeysTab.tsx | 2 +- .../routes/NewAttributesGroup.tsx | 2 +- .../src/realm-settings/routes/RealmSettings.tsx | 2 +- .../src/realm-settings/routes/UserProfile.tsx | 2 +- js/apps/admin-ui/src/realm/routes/AddRealm.tsx | 2 +- .../admin-ui/src/sessions/routes/Sessions.tsx | 2 +- .../routes/CustomUserFederation.tsx | 2 +- .../routes/NewCustomUserFederation.tsx | 2 +- .../routes/NewKerberosUserFederation.tsx | 2 +- .../routes/NewLdapUserFederation.tsx | 2 +- .../user-federation/routes/UserFederation.tsx | 2 +- .../routes/UserFederationKerberos.tsx | 2 +- .../routes/UserFederationLdap.tsx | 2 +- .../routes/UserFederationLdapMapper.tsx | 2 +- .../routes/UserFederationsKerberos.tsx | 2 +- .../routes/UserFederationsLdap.tsx | 2 +- js/apps/admin-ui/src/user/routes/AddUser.tsx | 2 +- js/apps/admin-ui/src/user/routes/User.tsx | 2 +- js/apps/admin-ui/src/user/routes/Users.tsx | 2 +- js/apps/admin-ui/src/util.ts | 16 ---------------- .../admin-ui/src/utils/generateEncodedPath.ts | 17 +++++++++++++++++ 76 files changed, 91 insertions(+), 90 deletions(-) create mode 100644 js/apps/admin-ui/src/utils/generateEncodedPath.ts diff --git a/js/apps/admin-ui/src/authentication/routes/Authentication.tsx b/js/apps/admin-ui/src/authentication/routes/Authentication.tsx index dbb7d26c7563..dd1cae883f40 100644 --- a/js/apps/admin-ui/src/authentication/routes/Authentication.tsx +++ b/js/apps/admin-ui/src/authentication/routes/Authentication.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type AuthenticationTab = "flows" | "required-actions" | "policies"; diff --git a/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx b/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx index 4909c5062c64..29652768f1cf 100644 --- a/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx +++ b/js/apps/admin-ui/src/authentication/routes/CreateFlow.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type CreateFlowParams = { realm: string }; diff --git a/js/apps/admin-ui/src/authentication/routes/Flow.tsx b/js/apps/admin-ui/src/authentication/routes/Flow.tsx index 66ec5f8a9386..aa6f0cc94b30 100644 --- a/js/apps/admin-ui/src/authentication/routes/Flow.tsx +++ b/js/apps/admin-ui/src/authentication/routes/Flow.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type FlowParams = { diff --git a/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx b/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx index 280ce5e62c42..baf4dbf21045 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/ClientScope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ClientScopeTab = "settings" | "mappers" | "scope"; diff --git a/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx b/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx index 2c109df8014c..0738268a101f 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/ClientScopes.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ClientScopesParams = { realm: string }; diff --git a/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx b/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx index 971f6132bd11..53aa93719a42 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/Mapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type MapperParams = { 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 c2ffaa62fc44..205420b8058b 100644 --- a/js/apps/admin-ui/src/client-scopes/routes/NewClientScope.tsx +++ b/js/apps/admin-ui/src/client-scopes/routes/NewClientScope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type NewClientScopeParams = { realm: string }; diff --git a/js/apps/admin-ui/src/clients/routes/AddClient.tsx b/js/apps/admin-ui/src/clients/routes/AddClient.tsx index 85a752339b64..3efd72507cac 100644 --- a/js/apps/admin-ui/src/clients/routes/AddClient.tsx +++ b/js/apps/admin-ui/src/clients/routes/AddClient.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type AddClientParams = { realm: string }; diff --git a/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx b/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx index f30784c27c51..d30b33a700d5 100644 --- a/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx +++ b/js/apps/admin-ui/src/clients/routes/AddRegistrationProvider.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; import { ClientRegistrationTab } from "./ClientRegistration"; diff --git a/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx b/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx index 402e68a232db..16c1f6530496 100644 --- a/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx +++ b/js/apps/admin-ui/src/clients/routes/AuthenticationTab.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type AuthorizationTab = diff --git a/js/apps/admin-ui/src/clients/routes/Client.tsx b/js/apps/admin-ui/src/clients/routes/Client.tsx index fb141c43c403..2701af4f0c00 100644 --- a/js/apps/admin-ui/src/clients/routes/Client.tsx +++ b/js/apps/admin-ui/src/clients/routes/Client.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ClientTab = diff --git a/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx b/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx index 224cea9e114b..b12bd82e36ea 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientRegistration.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ClientRegistrationTab = "anonymous" | "authenticated"; diff --git a/js/apps/admin-ui/src/clients/routes/ClientRole.tsx b/js/apps/admin-ui/src/clients/routes/ClientRole.tsx index a84758243337..d9e5fbb54cc2 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientRole.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ClientRoleTab = diff --git a/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx b/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx index d1f78f8ed2f8..097c13fd4e7e 100644 --- a/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx +++ b/js/apps/admin-ui/src/clients/routes/ClientScopeTab.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ClientScopesTab = "setup" | "evaluate"; diff --git a/js/apps/admin-ui/src/clients/routes/Clients.tsx b/js/apps/admin-ui/src/clients/routes/Clients.tsx index e6e1b9df18be..1ee8ac98f59d 100644 --- a/js/apps/admin-ui/src/clients/routes/Clients.tsx +++ b/js/apps/admin-ui/src/clients/routes/Clients.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ClientsTab = diff --git a/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx b/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx index 8089353f1184..a8d4972d5ffe 100644 --- a/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx +++ b/js/apps/admin-ui/src/clients/routes/CreateInitialAccessToken.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type CreateInitialAccessTokenParams = { realm: string }; diff --git a/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx b/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx index 47799923e35d..11201cfd7c21 100644 --- a/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/DedicatedScopeDetails.tsx @@ -1,7 +1,7 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; import type { AppRouteObject } from "../../routes"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; export type DedicatedScopeTab = "mappers" | "scope"; diff --git a/js/apps/admin-ui/src/clients/routes/ImportClient.tsx b/js/apps/admin-ui/src/clients/routes/ImportClient.tsx index 86d5af3618b6..08357b51a6c3 100644 --- a/js/apps/admin-ui/src/clients/routes/ImportClient.tsx +++ b/js/apps/admin-ui/src/clients/routes/ImportClient.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ImportClientParams = { realm: string }; diff --git a/js/apps/admin-ui/src/clients/routes/Mapper.tsx b/js/apps/admin-ui/src/clients/routes/Mapper.tsx index 675978567826..f101c39aadb0 100644 --- a/js/apps/admin-ui/src/clients/routes/Mapper.tsx +++ b/js/apps/admin-ui/src/clients/routes/Mapper.tsx @@ -1,7 +1,7 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; import type { AppRouteObject } from "../../routes"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; export type MapperParams = { realm: string; diff --git a/js/apps/admin-ui/src/clients/routes/NewPermission.tsx b/js/apps/admin-ui/src/clients/routes/NewPermission.tsx index a535d62e4207..c65dd0106941 100644 --- a/js/apps/admin-ui/src/clients/routes/NewPermission.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewPermission.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type PermissionType = "resource" | "scope"; diff --git a/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx b/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx index 14580c3323d5..5afea2aa30db 100644 --- a/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewPolicy.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type NewPolicyParams = { realm: string; id: string; policyType: string }; diff --git a/js/apps/admin-ui/src/clients/routes/NewResource.tsx b/js/apps/admin-ui/src/clients/routes/NewResource.tsx index 62c3aaf66109..4acf2112595f 100644 --- a/js/apps/admin-ui/src/clients/routes/NewResource.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewResource.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type NewResourceParams = { realm: string; id: string }; diff --git a/js/apps/admin-ui/src/clients/routes/NewRole.tsx b/js/apps/admin-ui/src/clients/routes/NewRole.tsx index ba8482a3f9d7..0015c5f0812d 100644 --- a/js/apps/admin-ui/src/clients/routes/NewRole.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type NewRoleParams = { realm: string; clientId: string }; diff --git a/js/apps/admin-ui/src/clients/routes/NewScope.tsx b/js/apps/admin-ui/src/clients/routes/NewScope.tsx index bc1272597985..488a3bf9b384 100644 --- a/js/apps/admin-ui/src/clients/routes/NewScope.tsx +++ b/js/apps/admin-ui/src/clients/routes/NewScope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type NewScopeParams = { realm: string; id: string }; diff --git a/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx b/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx index 2b78233afb6b..d3673302e1f9 100644 --- a/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/PermissionDetails.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; import type { PermissionType } from "./NewPermission"; diff --git a/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx b/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx index 106bf8df8ef8..5332ce5641cd 100644 --- a/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx +++ b/js/apps/admin-ui/src/clients/routes/PolicyDetails.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type PolicyDetailsParams = { diff --git a/js/apps/admin-ui/src/clients/routes/Resource.tsx b/js/apps/admin-ui/src/clients/routes/Resource.tsx index 901743629712..661e1da1df2c 100644 --- a/js/apps/admin-ui/src/clients/routes/Resource.tsx +++ b/js/apps/admin-ui/src/clients/routes/Resource.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ResourceDetailsParams = { diff --git a/js/apps/admin-ui/src/clients/routes/Scope.tsx b/js/apps/admin-ui/src/clients/routes/Scope.tsx index 679d512e4576..68d1e1222689 100644 --- a/js/apps/admin-ui/src/clients/routes/Scope.tsx +++ b/js/apps/admin-ui/src/clients/routes/Scope.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ScopeDetailsParams = { diff --git a/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx b/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx index b9685230fa16..d6b7e666651e 100644 --- a/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx +++ b/js/apps/admin-ui/src/dashboard/routes/Dashboard.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type DashboardTab = "info" | "providers"; diff --git a/js/apps/admin-ui/src/events/routes/Events.tsx b/js/apps/admin-ui/src/events/routes/Events.tsx index 506af32325a6..377a32762faf 100644 --- a/js/apps/admin-ui/src/events/routes/Events.tsx +++ b/js/apps/admin-ui/src/events/routes/Events.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type EventsTab = "user-events" | "admin-events"; diff --git a/js/apps/admin-ui/src/groups/routes/Groups.tsx b/js/apps/admin-ui/src/groups/routes/Groups.tsx index c880c046c6b2..2d14cc72d8f8 100644 --- a/js/apps/admin-ui/src/groups/routes/Groups.tsx +++ b/js/apps/admin-ui/src/groups/routes/Groups.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type GroupsParams = { realm: string; id?: string; lazy?: string }; 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 bebf760e8a37..3b5afdac54d7 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/AddMapper.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/AddMapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderAddMapperParams = { 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 4db6f6ab4986..a0be6312b908 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/EditMapper.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/EditMapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderEditMapperParams = { 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 3ac6baccad04..31090bd15ead 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProvider.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProvider.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderTab = "settings" | "mappers" | "permissions"; 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 a1128915ce99..e719543ed968 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderCreate.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderCreate.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderCreateParams = { 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 2fe7a486f250..69f5ae3ad161 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderKeycloakOidc.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderKeycloakOidc.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderKeycloakOidcParams = { realm: string }; 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 ab0eedb4d44f..56842791e55d 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderOidc.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderOidc.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderOidcParams = { realm: string }; 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 2c6eb94152e8..801e8cbadbc6 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderSaml.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviderSaml.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type IdentityProviderSamlParams = { realm: string }; 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 585fd1012a44..83708c8b2fbd 100644 --- a/js/apps/admin-ui/src/identity-providers/routes/IdentityProviders.tsx +++ b/js/apps/admin-ui/src/identity-providers/routes/IdentityProviders.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type IdentityProvidersParams = { realm: string }; diff --git a/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx b/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx index e8511d7c1611..9cd53799bd5f 100644 --- a/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx +++ b/js/apps/admin-ui/src/realm-roles/routes/AddRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type AddRoleParams = { realm: string }; diff --git a/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx b/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx index 540a861296a0..19ec0a502a85 100644 --- a/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx +++ b/js/apps/admin-ui/src/realm-roles/routes/RealmRole.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; diff --git a/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx b/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx index 50ed40296fb4..9c906bc9b1fc 100644 --- a/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx +++ b/js/apps/admin-ui/src/realm-roles/routes/RealmRoles.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type RealmRolesParams = { realm: string }; diff --git a/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx b/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx index 2597bcaabafc..f3fbe8075e8a 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddAttribute.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type AddAttributeParams = { 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 66b6e29550c8..7dd0eec2c8c2 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddClientPolicy.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddClientPolicy.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type AddClientPolicyParams = { realm: string }; 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 98f943c2edfd..16b06f0f386d 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type AddClientProfileParams = { 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 34c1cc5f444c..4b030ff0447f 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddCondition.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddCondition.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type NewClientPolicyConditionParams = { diff --git a/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx b/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx index 5c2137a7a1b7..061dcc9af4a3 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/AddExecutor.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type AddExecutorParams = { diff --git a/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx b/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx index 8499826730ec..964f0e537c50 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/Attribute.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type AttributeParams = { 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 eb9027d3bfef..c97cb97a1022 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/ClientPolicies.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/ClientPolicies.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ClientPoliciesTab = "profiles" | "policies"; 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 dd30f35c3c13..1aaec6cf8db4 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/ClientProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/ClientProfile.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ClientProfileParams = { 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 07f9464acc49..346f04903b50 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditAttributesGroup.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditAttributesGroup.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type EditAttributesGroupParams = { 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 d02521e7f15a..218e86fc6e16 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditClientPolicy.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditClientPolicy.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type EditClientPolicyParams = { 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 aff447f7713f..2e966b7baccf 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/EditCondition.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/EditCondition.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type EditClientPolicyConditionParams = { diff --git a/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx b/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx index 17abe30cb81c..ab9933d1e8be 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/Executor.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ExecutorParams = { 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 5a19415f3358..82f34f20f850 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/KeyProvider.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/KeyProvider.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type ProviderType = diff --git a/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx b/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx index 79fa7fbde4a8..e86f0f9a35e6 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/KeysTab.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type KeySubTab = "list" | "providers"; 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 1724cc90eb1e..ceefe5e040b0 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/NewAttributesGroup.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/NewAttributesGroup.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type NewAttributesGroupParams = { diff --git a/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx b/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx index 3506125f9e8d..781bc692236a 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/RealmSettings.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type RealmSettingsTab = diff --git a/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx b/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx index 63547b89cd4a..1a0fe9a33e7d 100644 --- a/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx +++ b/js/apps/admin-ui/src/realm-settings/routes/UserProfile.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type UserProfileTab = "attributes" | "attributes-group" | "json-editor"; diff --git a/js/apps/admin-ui/src/realm/routes/AddRealm.tsx b/js/apps/admin-ui/src/realm/routes/AddRealm.tsx index 1b6b48dd6417..9655d4a1e9c6 100644 --- a/js/apps/admin-ui/src/realm/routes/AddRealm.tsx +++ b/js/apps/admin-ui/src/realm/routes/AddRealm.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type AddRealmParams = { realm: string }; diff --git a/js/apps/admin-ui/src/sessions/routes/Sessions.tsx b/js/apps/admin-ui/src/sessions/routes/Sessions.tsx index 87b68b9d9141..6811b61f5922 100644 --- a/js/apps/admin-ui/src/sessions/routes/Sessions.tsx +++ b/js/apps/admin-ui/src/sessions/routes/Sessions.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type SessionsParams = { realm: string }; 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 c4b24e3d5fd2..47c120e9fe6c 100644 --- a/js/apps/admin-ui/src/user-federation/routes/CustomUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/CustomUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; 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 2bbdede7b571..56af298e6c94 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewCustomUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewCustomUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; 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 05a519614232..7af89e4f0e21 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewKerberosUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewKerberosUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type NewKerberosUserFederationParams = { realm: string }; 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 069d4ef1be61..d21bff621f56 100644 --- a/js/apps/admin-ui/src/user-federation/routes/NewLdapUserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/NewLdapUserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type NewLdapUserFederationParams = { realm: string }; 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 c35a2d52bb11..b010ff0ac045 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederation.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederation.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type UserFederationParams = { realm: string }; 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 aa7c249fe303..cbbe5b68fd19 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationKerberos.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationKerberos.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type UserFederationKerberosParams = { 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 526e7b5c5a74..ff646872cbaa 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationLdap.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationLdap.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type UserFederationLdapTab = "settings" | "mappers"; 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 6e228be3869d..0fa0bc961731 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationLdapMapper.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationLdapMapper.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type UserFederationLdapMapperParams = { 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 0b5be749330a..182ddb48de18 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationsKerberos.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationsKerberos.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type UserFederationsKerberosParams = { realm: string }; 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 24494883d0de..7445273c79e3 100644 --- a/js/apps/admin-ui/src/user-federation/routes/UserFederationsLdap.tsx +++ b/js/apps/admin-ui/src/user-federation/routes/UserFederationsLdap.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type UserFederationsLdapParams = { realm: string }; diff --git a/js/apps/admin-ui/src/user/routes/AddUser.tsx b/js/apps/admin-ui/src/user/routes/AddUser.tsx index dd9e857cfda8..9743c5dae77e 100644 --- a/js/apps/admin-ui/src/user/routes/AddUser.tsx +++ b/js/apps/admin-ui/src/user/routes/AddUser.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; diff --git a/js/apps/admin-ui/src/user/routes/User.tsx b/js/apps/admin-ui/src/user/routes/User.tsx index 5dc20619e819..808e42ef9d1b 100644 --- a/js/apps/admin-ui/src/user/routes/User.tsx +++ b/js/apps/admin-ui/src/user/routes/User.tsx @@ -1,6 +1,6 @@ import { lazy } from "react"; import type { Path } from "react-router-dom"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { AppRouteObject } from "../../routes"; export type UserTab = diff --git a/js/apps/admin-ui/src/user/routes/Users.tsx b/js/apps/admin-ui/src/user/routes/Users.tsx index 3601b7207ba9..26f8d4ff55f5 100644 --- a/js/apps/admin-ui/src/user/routes/Users.tsx +++ b/js/apps/admin-ui/src/user/routes/Users.tsx @@ -1,5 +1,5 @@ import { lazy } from "react"; -import { generateEncodedPath } from "../../util"; +import { generateEncodedPath } from "../../utils/generateEncodedPath"; import type { Path } from "react-router-dom"; import type { AppRouteObject } from "../../routes"; diff --git a/js/apps/admin-ui/src/util.ts b/js/apps/admin-ui/src/util.ts index 833144788c50..9edc1baeaa13 100644 --- a/js/apps/admin-ui/src/util.ts +++ b/js/apps/admin-ui/src/util.ts @@ -5,7 +5,6 @@ import { flatten } from "flat"; import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation"; import type { ProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation"; import type { IFormatter, IFormatterValueType } from "@patternfly/react-table"; -import { generatePath } from "react-router-dom"; import { arrayToKeyValue, @@ -171,18 +170,3 @@ export const addTrailingSlash = (url: string) => url.endsWith("/") ? url : url + "/"; export const generateId = () => Math.floor(Math.random() * 1000); - -type PathParam = { [key: string]: string }; - -export function generateEncodedPath( - originalPath: Path, - params: PathParam, -): string { - const encodedParams: PathParam = {}; - Object.entries(params).forEach( - ([k, v]) => (encodedParams[k] = encodeURIComponent(v)), - ); - - //TODO: Fix type once https://github.com/remix-run/react-router/pull/10719 is merged. - return generatePath(originalPath, encodedParams as any); -} diff --git a/js/apps/admin-ui/src/utils/generateEncodedPath.ts b/js/apps/admin-ui/src/utils/generateEncodedPath.ts new file mode 100644 index 000000000000..98e1ce27d6d0 --- /dev/null +++ b/js/apps/admin-ui/src/utils/generateEncodedPath.ts @@ -0,0 +1,17 @@ +import { generatePath } from "react-router-dom"; + +export type PathParam = { [key: string]: string }; + +export function generateEncodedPath( + originalPath: Path, + params: PathParam, +): string { + const encodedParams: PathParam = {}; + + Object.entries(params).forEach( + ([k, v]) => (encodedParams[k] = encodeURIComponent(v)), + ); + + //TODO: Fix type once https://github.com/remix-run/react-router/pull/10719 is merged. + return generatePath(originalPath, encodedParams as any); +}