All Downloads are FREE. Search and download functionalities are using the official Maven repository.

theme.keycloak.v2.admin.resources.assets.NewOrganization-IHbXwz1P.js.map Maven / Gradle / Ivy

There is a newer version: 26.0.7
Show newest version
{"version":3,"file":"NewOrganization-IHbXwz1P.js","sources":["../../src/organizations/NewOrganization.tsx"],"sourcesContent":["import { FormSubmitButton } from \"@keycloak/keycloak-ui-shared\";\nimport { ActionGroup, Button, PageSection } from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../admin-client\";\nimport { useAlerts } from \"../components/alert/Alerts\";\nimport { FormAccess } from \"../components/form/FormAccess\";\nimport { ViewHeader } from \"../components/view-header/ViewHeader\";\nimport { useRealm } from \"../context/realm-context/RealmContext\";\nimport {\n  OrganizationForm,\n  OrganizationFormType,\n  convertToOrg,\n} from \"./OrganizationForm\";\nimport { toEditOrganization } from \"./routes/EditOrganization\";\nimport { toOrganizations } from \"./routes/Organizations\";\n\nexport default function NewOrganization() {\n  const { adminClient } = useAdminClient();\n  const { addAlert, addError } = useAlerts();\n  const { t } = useTranslation();\n  const navigate = useNavigate();\n  const { realm } = useRealm();\n  const form = useForm();\n  const { handleSubmit, formState } = form;\n\n  const save = async (org: OrganizationFormType) => {\n    try {\n      const organization = convertToOrg(org);\n      const { id } = await adminClient.organizations.create(organization);\n      addAlert(t(\"organizationSaveSuccess\"));\n      navigate(toEditOrganization({ realm, id, tab: \"settings\" }));\n    } catch (error) {\n      addError(\"organizationSaveError\", error);\n    }\n  };\n\n  return (\n    <>\n      \n      \n        \n          \n            \n            \n              \n                {t(\"save\")}\n              \n               (\n                  \n                )}\n              >\n                {t(\"cancel\")}\n              \n            \n          \n        \n      \n    \n  );\n}\n"],"names":["NewOrganization","adminClient","useAdminClient","addAlert","addError","useAlerts","useTranslation","navigate","useNavigate","realm","useRealm","form","useForm","handleSubmit","formState","jsxs","Fragment","jsx","ViewHeader","PageSection","FormAccess","org","organization","convertToOrg","id","toEditOrganization","error","FormProvider","OrganizationForm","ActionGroup","FormSubmitButton","Button","props","Link","toOrganizations"],"mappings":"wbAkBA,SAAwBA,GAAkB,CAClC,KAAA,CAAE,YAAAC,GAAgBC,IAClB,CAAE,SAAAC,EAAU,SAAAC,CAAS,EAAIC,EAAU,EACnC,CAAE,GAAMC,IACRC,EAAWC,IACX,CAAE,MAAAC,GAAUC,IACZC,EAAOC,IACP,CAAE,aAAAC,EAAc,UAAAC,CAAc,EAAAH,EAapC,OAEII,EAAAC,EAAA,CAAA,SAAA,CAACC,EAAAC,EAAA,CAAW,SAAS,oBAAqB,CAAA,IACzCC,EAAY,CAAA,QAAQ,QACnB,SAAAF,EAACG,GAAW,KAAK,SAAS,SAAUP,EAf7B,MAAOQ,GAA8B,CAC5C,GAAA,CACI,MAAAC,EAAeC,EAAaF,CAAG,EAC/B,CAAE,GAAAG,CAAG,EAAI,MAAMvB,EAAY,cAAc,OAAOqB,CAAY,EACzDnB,EAAA,EAAE,yBAAyB,CAAC,EACrCI,EAASkB,EAAmB,CAAE,MAAAhB,EAAO,GAAAe,EAAI,IAAK,UAAY,CAAA,CAAC,QACpDE,EAAO,CACdtB,EAAS,wBAAyBsB,CAAK,CACzC,CAAA,CAOyD,EAAG,aAAY,GAClE,SAACX,EAAAY,EAAA,CAAc,GAAGhB,EAChB,SAAA,CAAAM,EAACW,EAAiB,EAAA,IACjBC,EACC,CAAA,SAAA,CAAAZ,EAACa,GAAiB,UAAAhB,EAAsB,cAAY,OACjD,SAAA,EAAE,MAAM,EACX,EACAG,EAACc,EAAA,CACC,cAAY,SACZ,QAAQ,OACR,UAAYC,GACVf,EAACgB,EAAM,CAAA,GAAGD,EAAO,GAAIE,EAAgB,CAAE,MAAAzB,CAAM,CAAC,CAAG,CAAA,EAGlD,WAAE,QAAQ,CAAA,CACb,CAAA,EACF,CAAA,CACF,CAAA,CACF,CAAA,EACF,CACF,CAAA,CAAA,CAEJ"}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy