From 2e64f144d5534e2ba07cedc0bccc1624aabc20b8 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Tue, 24 Nov 2020 21:45:12 +0100 Subject: [PATCH] update to latest keycloak-admin (#234) * update to latest keycloak-admin also fix name of project * removed workaround type --- package.json | 4 ++-- src/user-federation/UserFederationSection.tsx | 10 ++-------- yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 4e73cbe540..a1ef30372d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "keycloak-admin", + "name": "keycloak-admin-ui", "version": "1.0.0", "main": "index.js", "license": "MIT", @@ -22,7 +22,7 @@ "@patternfly/react-table": "4.16.20", "file-saver": "^2.0.2", "i18next": "^19.6.2", - "keycloak-admin": "^1.14.1", + "keycloak-admin": "1.14.2", "react": "^16.8.5", "react-dom": "^16.8.5", "react-hook-form": "^6.8.2", diff --git a/src/user-federation/UserFederationSection.tsx b/src/user-federation/UserFederationSection.tsx index f2f456a450..8acaf8e820 100644 --- a/src/user-federation/UserFederationSection.tsx +++ b/src/user-federation/UserFederationSection.tsx @@ -26,10 +26,6 @@ import { useAdminClient } from "../context/auth/AdminClient"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import "./user-federation.css"; -type Config = { - enabled: string[]; -}; - export const UserFederationSection = () => { const [userFederations, setUserFederations] = useState< ComponentRepresentation[] @@ -112,14 +108,12 @@ export const UserFederationSection = () => { userFederation.providerId === "ldap" ? "LDAP" : "Kerberos" } labelText={ - (userFederation.config as Config)!.enabled[0] !== "false" + userFederation.config!["enabled"][0] !== "false" ? `${t("common:enabled")}` : `${t("common:disabled")}` } labelColor={ - (userFederation.config as Config)!.enabled[0] !== "false" - ? "blue" - : "gray" + userFederation.config!["enabled"][0] !== "false" ? "blue" : "gray" } /> diff --git a/yarn.lock b/yarn.lock index b8ea78f582..32f7e0347f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12489,10 +12489,10 @@ jsx-ast-utils@^2.2.1, jsx-ast-utils@^2.2.3, jsx-ast-utils@^2.4.1: array-includes "^3.1.1" object.assign "^4.1.0" -keycloak-admin@^1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/keycloak-admin/-/keycloak-admin-1.14.1.tgz#d30507b1b89270e42dc2e1ab73842afe3df5c0af" - integrity sha512-duQYY+I8iSeSOYtsJnyfQ9LUuKeY5oZCp2rkfH4tJ71VYuk0bon4liN2OBGmLO8PBsZ2TXW95rSydZumysuP/g== +keycloak-admin@1.14.2: + version "1.14.2" + resolved "https://registry.yarnpkg.com/keycloak-admin/-/keycloak-admin-1.14.2.tgz#5b983a10bcc01573c79d4f3d6eefe74bd35c8d3f" + integrity sha512-eO0jLEVQJ+yk2Xw6B73dDQWhHwR5CjGsdx3zu1csJTTehCy0ftLJVX/BFnlGmQnF1sVYKpXomoCbUtesYYXntQ== dependencies: axios "^0.21.0" camelize "^1.0.0"