theme.keycloak.v2.admin.resources.assets.CreateUserFederationLdapSettings-BcUz_ulw.js.map Maven / Gradle / Ivy
{"version":3,"file":"CreateUserFederationLdapSettings-BcUz_ulw.js","sources":["../../src/user-federation/CreateUserFederationLdapSettings.tsx"],"sourcesContent":["import { AlertVariant, PageSection } from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../admin-client\";\nimport { useAlerts } from \"../components/alert/Alerts\";\nimport { useRealm } from \"../context/realm-context/RealmContext\";\nimport {\n LdapComponentRepresentation,\n UserFederationLdapForm,\n serializeFormData,\n} from \"./UserFederationLdapForm\";\nimport { toUserFederation } from \"./routes/UserFederation\";\nimport { ExtendedHeader } from \"./shared/ExtendedHeader\";\n\nexport default function CreateUserFederationLdapSettings() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const form = useForm({ mode: \"onChange\" });\n const navigate = useNavigate();\n const { realm } = useRealm();\n const { addAlert, addError } = useAlerts();\n\n const onSubmit = async (formData: LdapComponentRepresentation) => {\n try {\n await adminClient.components.create(serializeFormData(formData));\n addAlert(t(\"createUserProviderSuccess\"), AlertVariant.success);\n navigate(toUserFederation({ realm }));\n } catch (error) {\n addError(\"createUserProviderError\", error);\n }\n };\n\n return (\n \n form.handleSubmit(onSubmit)()}\n />\n \n \n \n \n \n \n );\n}\n"],"names":["CreateUserFederationLdapSettings","adminClient","useAdminClient","t","useTranslation","form","useForm","navigate","useNavigate","realm","useRealm","addAlert","addError","useAlerts","onSubmit","formData","serializeFormData","AlertVariant","toUserFederation","error","jsxs","FormProvider","jsx","ExtendedHeader","PageSection","UserFederationLdapForm"],"mappings":"8gBAeA,SAAwBA,GAAmC,CACnD,KAAA,CAAE,YAAAC,GAAgBC,IAElB,CAAE,EAAAC,GAAMC,IACRC,EAAOC,EAAqC,CAAE,KAAM,UAAY,CAAA,EAChEC,EAAWC,IACX,CAAE,MAAAC,GAAUC,IACZ,CAAE,SAAAC,EAAU,SAAAC,CAAS,EAAIC,EAAU,EAEnCC,EAAW,MAAOC,GAA0C,CAC5D,GAAA,CACF,MAAMd,EAAY,WAAW,OAAOe,EAAkBD,CAAQ,CAAC,EAC/DJ,EAASR,EAAE,2BAA2B,EAAGc,EAAa,OAAO,EAC7DV,EAASW,EAAiB,CAAE,MAAAT,CAAM,CAAC,CAAC,QAC7BU,EAAO,CACdP,EAAS,0BAA2BO,CAAK,CAC3C,CAAA,EAIA,OAAAC,EAACC,EAAc,CAAA,GAAGhB,EAChB,SAAA,CAAAiB,EAACC,EAAA,CACC,SAAS,OACT,UAAS,GACT,KAAM,IAAMlB,EAAK,aAAaS,CAAQ,EAAE,CAAA,CAC1C,EACCQ,EAAAE,EAAA,CAAY,QAAQ,QAAQ,UAAU,cACrC,SAAAF,EAACE,EAAY,CAAA,QAAQ,QACnB,SAAAF,EAACG,EAAuB,CAAA,SAAAX,CAAA,CAAoB,CAC9C,CAAA,EACF,CACF,CAAA,CAAA,CAEJ"}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy