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

theme.keycloak.v2.admin.resources.assets.CreateFlow-Jjlzqfdt.js Maven / Gradle / Ivy

import{jsxs as r,Fragment as w,jsx as t}from"react/jsx-runtime";import{u as h,a as F,d as y,c as v,f as b,g,P as A,F as S,y as C,A as I,p as T,h as k,L as H,i as L,j as i,k as N}from"./index-C1LIsRX7.js";import{F as P}from"./FormAccess-BcY70QlP.js";import{V}from"./ViewHeader-qjLr6U82.js";import{N as j}from"./NameDescription-CQ_fNXVs.js";import"react";import"react-dom";import"./copy-icon-DOS8MmN7.js";const c=["basic-flow","client-flow"];function U(){const{adminClient:m}=h(),{t:e}=F(),u=y(),{realm:n}=v(),{addAlert:s}=b(),l=g(),{handleSubmit:d,formState:p}=l;return r(w,{children:[t(V,{titleKey:"createFlow",subKey:"authenticationCreateFlowHelp"}),t(A,{variant:"light",children:t(S,{...l,children:r(P,{isHorizontal:!0,role:"manage-authorization",onSubmit:d(async a=>{const f={...a,builtIn:!1,topLevel:!0};try{const{id:o}=await m.authenticationManagement.createFlow(f);s(e("flowCreatedSuccess"),i.success),u(N({realm:n,id:o,usedBy:"notInUse"}))}catch(o){s(e("flowCreateError",{error:o.response?.data?.errorMessage||o}),i.danger)}}),children:[t(j,{}),t(C,{name:"providerId",label:e("flowType"),labelIcon:e("topLevelFlowTypeHelp"),"aria-label":e("selectFlowType"),controller:{defaultValue:c[0]},options:c.map(a=>({key:a,value:e(`top-level-flow-type.${a}`)}))}),r(I,{children:[t(T,{formState:p,"data-testid":"create",allowInvalid:!0,allowNonDirty:!0,children:e("create")}),t(k,{"data-testid":"cancel",variant:"link",component:a=>t(H,{...a,to:L({realm:n})}),children:e("cancel")})]})]})})})]})}export{U as default};
//# sourceMappingURL=CreateFlow-Jjlzqfdt.js.map




© 2015 - 2025 Weber Informatics LLC | Privacy Policy