keycloak-scim/src/realm-settings/LocalizationTab.tsx

403 lines
14 KiB
TypeScript
Raw Normal View History

import React, { useState } from "react";
import { useTranslation } from "react-i18next";
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
import { Controller, useForm, useFormContext, useWatch } from "react-hook-form";
import {
ActionGroup,
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
AlertVariant,
Button,
Divider,
FormGroup,
PageSection,
Select,
SelectGroup,
SelectOption,
SelectVariant,
Switch,
TextContent,
ToolbarItem,
} from "@patternfly/react-core";
import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import { FormAccess } from "../components/form-access/FormAccess";
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
import { FormPanel } from "../components/scroll-form/FormPanel";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { useAdminClient } from "../context/auth/AdminClient";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
import { AddMessageBundleModal } from "./AddMessageBundleModal";
import { useAlerts } from "../components/alert/Alerts";
import { HelpItem } from "../components/help-enabler/HelpItem";
import { useRealm } from "../context/realm-context/RealmContext";
import { DEFAULT_LOCALE } from "../i18n";
type LocalizationTabProps = {
save: (realm: RealmRepresentation) => void;
reset: () => void;
refresh: () => void;
realm: RealmRepresentation;
};
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
export type KeyValueType = { key: string; value: string };
export type BundleForm = {
messageBundle: KeyValueType;
};
export const LocalizationTab = ({
save,
reset,
realm,
}: LocalizationTabProps) => {
const { t } = useTranslation("realm-settings");
const adminClient = useAdminClient();
const [addMessageBundleModalOpen, setAddMessageBundleModalOpen] =
useState(false);
const [supportedLocalesOpen, setSupportedLocalesOpen] = useState(false);
const [defaultLocaleOpen, setDefaultLocaleOpen] = useState(false);
const [filterDropdownOpen, setFilterDropdownOpen] = useState(false);
const [selectMenuLocale, setSelectMenuLocale] = useState(DEFAULT_LOCALE);
const { getValues, control, handleSubmit, formState } = useFormContext();
const [selectMenuValueSelected, setSelectMenuValueSelected] = useState(false);
const themeTypes = useServerInfo().themes!;
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
const bundleForm = useForm<BundleForm>({ mode: "onChange" });
const { addAlert, addError } = useAlerts();
const { realm: currentRealm } = useRealm();
const watchSupportedLocales = useWatch<string[]>({
control,
name: "supportedLocales",
});
const internationalizationEnabled = useWatch({
control,
name: "internationalizationEnabled",
defaultValue: false,
});
const loader = async () => {
try {
const result = await adminClient.realms.getRealmLocalizationTexts({
realm: realm.realm!,
selectedLocale:
selectMenuLocale || getValues("defaultLocale") || DEFAULT_LOCALE,
});
return Object.entries(result);
} catch (error) {
return [];
}
};
const tableLoader = async () => {
try {
const result = await adminClient.realms.getRealmLocalizationTexts({
realm: currentRealm,
selectedLocale: selectMenuLocale,
});
return Object.entries(result);
} catch (error) {
return [];
}
};
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
const handleModalToggle = () => {
setAddMessageBundleModalOpen(!addMessageBundleModalOpen);
};
const options = [
<SelectGroup label={t("defaultLocale")} key="group1">
{watchSupportedLocales
?.filter((item) => item === realm.defaultLocale)
.map((locale) => (
<SelectOption key={locale} value={locale}>
{t(`allSupportedLocales.${locale}`)}
</SelectOption>
))}
</SelectGroup>,
<Divider key="divider" />,
<SelectGroup label={t("supportedLocales")} key="group2">
{watchSupportedLocales
?.filter((item) => item !== realm.defaultLocale)
.map((locale) => (
<SelectOption key={locale} value={locale}>
{t(`allSupportedLocales.${locale}`)}
</SelectOption>
))}
</SelectGroup>,
];
const [tableKey, setTableKey] = useState(0);
const refreshTable = () => {
setTableKey(new Date().getTime());
};
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
const addKeyValue = async (pair: KeyValueType): Promise<void> => {
try {
adminClient.setConfig({
requestConfig: { headers: { "Content-Type": "text/plain" } },
});
await adminClient.realms.addLocalization(
{
realm: currentRealm!,
selectedLocale:
selectMenuLocale || getValues("defaultLocale") || DEFAULT_LOCALE,
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
key: pair.key,
},
pair.value
);
adminClient.setConfig({
realmName: currentRealm!,
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
});
refreshTable();
addAlert(t("pairCreatedSuccess"), AlertVariant.success);
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
} catch (error) {
addError("realm-settings:pairCreatedError", error);
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
}
};
return (
<>
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
{addMessageBundleModalOpen && (
<AddMessageBundleModal
handleModalToggle={handleModalToggle}
save={(pair: any) => {
addKeyValue(pair);
handleModalToggle();
}}
form={bundleForm}
/>
)}
<PageSection variant="light">
<FormAccess
isHorizontal
role="manage-realm"
className="pf-u-mt-lg"
onSubmit={handleSubmit(save)}
>
<FormGroup
label={t("internationalization")}
fieldId="kc-internationalization"
labelIcon={
<HelpItem
helpText="realm-settings-help:internationalization"
2021-12-14 14:56:36 +00:00
fieldLabelId="realm-settings:internationalization"
/>
}
>
<Controller
name="internationalizationEnabled"
control={control}
defaultValue={false}
render={({ onChange, value }) => (
<Switch
id="kc-l-internationalization"
label={t("common:enabled")}
labelOff={t("common:disabled")}
isChecked={internationalizationEnabled}
data-testid={
value
? "internationalization-enabled"
: "internationalization-disabled"
}
onChange={onChange}
/>
)}
/>
</FormGroup>
{internationalizationEnabled && (
<>
<FormGroup
label={t("supportedLocales")}
fieldId="kc-l-supported-locales"
>
<Controller
name="supportedLocales"
control={control}
defaultValue={[DEFAULT_LOCALE]}
render={({ onChange, value }) => (
<Select
toggleId="kc-l-supported-locales"
onToggle={(open) => {
setSupportedLocalesOpen(open);
}}
onSelect={(_, v) => {
const option = v as string;
if (value.includes(option)) {
onChange(
value.filter(
(item: string) =>
item !== option || option === DEFAULT_LOCALE
)
);
} else {
onChange([...value, option]);
}
}}
onClear={() => {
onChange([]);
}}
selections={value}
variant={SelectVariant.typeaheadMulti}
aria-label={t("supportedLocales")}
isOpen={supportedLocalesOpen}
placeholderText={t("selectLocales")}
>
{themeTypes.login![0].locales.map(
(locale: string, idx: number) => (
<SelectOption
selected={value.includes(locale)}
key={`locale-${idx}`}
value={locale}
>
{t(`allSupportedLocales.${locale}`)}
</SelectOption>
)
)}
</Select>
)}
/>
</FormGroup>
<FormGroup
label={t("defaultLocale")}
fieldId="kc-l-default-locale"
>
<Controller
name="defaultLocale"
control={control}
defaultValue={DEFAULT_LOCALE}
render={({ onChange, value }) => (
<Select
toggleId="kc-default-locale"
onToggle={() => setDefaultLocaleOpen(!defaultLocaleOpen)}
onSelect={(_, value) => {
onChange(value as string);
setDefaultLocaleOpen(false);
}}
selections={
value
? t(`allSupportedLocales.${value}`)
: realm.defaultLocale !== ""
? t(
`allSupportedLocales.${
realm.defaultLocale || DEFAULT_LOCALE
}`
)
: t("placeholderText")
}
variant={SelectVariant.single}
aria-label={t("defaultLocale")}
isOpen={defaultLocaleOpen}
placeholderText={t("placeholderText")}
data-testid="select-default-locale"
>
{watchSupportedLocales?.map(
(locale: string, idx: number) => (
<SelectOption
key={`default-locale-${idx}`}
value={locale}
>
{t(`allSupportedLocales.${locale}`)}
</SelectOption>
)
)}
</Select>
)}
/>
</FormGroup>
</>
)}
<ActionGroup>
<Button
variant="primary"
isDisabled={!formState.isDirty}
type="submit"
data-testid="localization-tab-save"
>
{t("common:save")}
</Button>
<Button variant="link" onClick={reset}>
{t("common:revert")}
</Button>
</ActionGroup>
</FormAccess>
<FormPanel className="kc-message-bundles" title="Edit message bundles">
<TextContent className="messageBundleDescription">
{t("messageBundleDescription")}
</TextContent>
<div className="tableBorder">
<KeycloakDataTable
key={tableKey}
loader={selectMenuValueSelected ? tableLoader : loader}
ariaLabelKey="realm-settings:localization"
searchTypeComponent={
<ToolbarItem>
<Select
width={180}
data-testid="filter-by-locale-select"
isOpen={filterDropdownOpen}
className="kc-filter-by-locale-select"
variant={SelectVariant.single}
isDisabled={!formState.isSubmitSuccessful}
onToggle={(isExpanded) => setFilterDropdownOpen(isExpanded)}
onSelect={(_, value) => {
setSelectMenuLocale(value.toString());
setSelectMenuValueSelected(true);
refreshTable();
setFilterDropdownOpen(false);
}}
selections={
selectMenuValueSelected
? t(`allSupportedLocales.${selectMenuLocale}`)
: realm.defaultLocale !== ""
? t(`allSupportedLocales.${DEFAULT_LOCALE}`)
: t("placeholderText")
}
>
{options}
</Select>
</ToolbarItem>
}
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
toolbarItem={
<Button
data-testid="add-bundle-button"
isDisabled={!formState.isSubmitSuccessful}
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
onClick={() => setAddMessageBundleModalOpen(true)}
>
{t("addMessageBundle")}
</Button>
}
searchPlaceholderKey=" "
emptyState={
<ListEmptyState
hasIcon={true}
message={t("noMessageBundles")}
instructions={t("noMessageBundlesInstructions")}
Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format
2021-07-01 06:48:30 +00:00
onPrimaryAction={handleModalToggle}
primaryActionText={t("addMessageBundle")}
/>
}
canSelectAll
columns={[
{
name: "Key",
cellRenderer: (row) => row[0],
},
{
name: "Value",
cellRenderer: (row) => row[1],
},
]}
/>
</div>
</FormPanel>
</PageSection>
</>
);
};