theme.keycloak.v2.admin.resources.assets.RoleForm-COK3IXcf.js.map Maven / Gradle / Ivy
{"version":3,"file":"RoleForm-COK3IXcf.js","sources":["../../src/components/role-form/RoleForm.tsx"],"sourcesContent":["import { ActionGroup, Button, PageSection } from \"@patternfly/react-core\";\nimport {\n SubmitHandler,\n UseFormReturn,\n useFormContext,\n useWatch,\n} from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, To } from \"react-router-dom\";\nimport {\n FormSubmitButton,\n TextAreaControl,\n TextControl,\n} from \"@keycloak/keycloak-ui-shared\";\n\nimport { FormAccess } from \"../form/FormAccess\";\nimport { AttributeForm } from \"../key-value-form/AttributeForm\";\nimport { ViewHeader } from \"../view-header/ViewHeader\";\n\nexport type RoleFormProps = {\n form: UseFormReturn;\n onSubmit: SubmitHandler;\n cancelLink: To;\n role: \"manage-realm\" | \"manage-clients\";\n editMode: boolean;\n};\n\nexport const RoleForm = ({\n form: { formState },\n onSubmit,\n cancelLink,\n role,\n editMode,\n}: RoleFormProps) => {\n const { t } = useTranslation();\n const { control, handleSubmit } = useFormContext();\n\n const roleName = useWatch({\n control,\n defaultValue: undefined,\n name: \"name\",\n });\n\n return (\n <>\n {!editMode && }\n \n \n \n \n \n \n {t(\"save\")}\n \n \n \n \n \n >\n );\n};\n"],"names":["RoleForm","formState","onSubmit","cancelLink","role","editMode","t","useTranslation","control","handleSubmit","useFormContext","roleName","useWatch","jsxs","Fragment","jsx","ViewHeader","PageSection","FormAccess","TextControl","value","TextAreaControl","ActionGroup","FormSubmitButton","Button","props","Link"],"mappings":"kQA2BO,MAAMA,EAAW,CAAC,CACvB,KAAM,CAAE,UAAAC,CAAU,EAClB,SAAAC,EACA,WAAAC,EACA,KAAAC,EACA,SAAAC,CACF,IAAqB,CACb,KAAA,CAAE,EAAAC,GAAMC,IACR,CAAE,QAAAC,EAAS,aAAAC,CAAa,EAAIC,EAA8B,EAE1DC,EAAWC,EAAS,CACxB,QAAAJ,EACA,aAAc,OACd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