theme.keycloak.v2.admin.resources.assets.RealmRoleTabs-DapqnsQK.js.map Maven / Gradle / Ivy
{"version":3,"file":"RealmRoleTabs-DapqnsQK.js","sources":["../../src/realm-roles/UsersInRoleTab.tsx","../../src/realm-roles/RealmRoleTabs.tsx"],"sourcesContent":["import { Button, PageSection, Popover } from \"@patternfly/react-core\";\nimport { QuestionCircleIcon } from \"@patternfly/react-icons\";\nimport { useTranslation } from \"react-i18next\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useHelp } from \"@keycloak/keycloak-ui-shared\";\nimport { useAdminClient } from \"../admin-client\";\nimport type { ClientRoleParams } from \"../clients/routes/ClientRole\";\nimport { ListEmptyState } from \"../components/list-empty-state/ListEmptyState\";\nimport { KeycloakDataTable } from \"../components/table-toolbar/KeycloakDataTable\";\nimport { useRealm } from \"../context/realm-context/RealmContext\";\nimport { emptyFormatter, upperCaseFormatter } from \"../util\";\nimport { useParams } from \"../utils/useParams\";\n\nexport const UsersInRoleTab = () => {\n const { adminClient } = useAdminClient();\n\n const navigate = useNavigate();\n const { realm } = useRealm();\n\n const { t } = useTranslation();\n const { id, clientId } = useParams();\n\n const loader = async (first?: number, max?: number) => {\n const role = await adminClient.roles.findOneById({ id: id });\n if (!role) {\n throw new Error(t(\"notFound\"));\n }\n\n if (role.clientRole) {\n return adminClient.clients.findUsersWithRole({\n roleName: role.name!,\n id: clientId,\n first,\n max,\n });\n }\n\n return adminClient.roles.findUsersWithRole({\n name: role.name!,\n first,\n max,\n });\n };\n\n const { enabled } = useHelp();\n\n return (\n \n \n {t(\"whoWillAppearPopoverTextRoles\")}\n \n {t(\"or\")}\n \n