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

theme.keycloak.v2.admin.resources.assets.CreateRealmRole-6_RXvG1e.js Maven / Gradle / Ivy

There is a newer version: 26.0.7
Show newest version
import{jsx as s}from"react/jsx-runtime";import{u as d,a as u,g as R,d as p,c as f,f as b,F as C,bL as g,j as F,bO as h}from"./index-C1LIsRX7.js";import{R as w}from"./RoleForm-CyM9-qEe.js";import"react";import"react-dom";import"./FormAccess-BcY70QlP.js";import"./copy-icon-DOS8MmN7.js";import"./ViewHeader-qjLr6U82.js";function S(){const{adminClient:r}=d(),{t}=u(),o=R({mode:"onChange"}),i=p(),{realm:n}=f(),{addAlert:m,addError:l}=b();return s(C,{...o,children:s(w,{form:o,onSubmit:async a=>{const c={...a,name:a.name?.trim(),attributes:{}};try{await r.roles.create(c);const e=await r.roles.findOneByName({name:a.name});if(!e)throw new Error(t("notFound"));m(t("roleCreated"),F.success),i(h({realm:n,id:e.id,tab:"details"}))}catch(e){l("roleCreateError",e)}},cancelLink:g({realm:n}),role:"manage-realm",editMode:!1})})}export{S as default};
//# sourceMappingURL=CreateRealmRole-6_RXvG1e.js.map




© 2015 - 2025 Weber Informatics LLC | Privacy Policy