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

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

There is a newer version: 26.0.7
Show newest version
import{jsxs as r,Fragment as w,jsx as t}from"react/jsx-runtime";import{u as h,a as v,d as F,c as b,f as g,g as y,P as A,F as S,v as C,A as I,h as T,i as k,L as H,j as L,k as i,l as N}from"./main-C7ps2lmX.js";import{F as P}from"./FormAccess-DyLNkc18.js";import{V}from"./ViewHeader-B7eeFzFA.js";import{N as j}from"./NameDescription-C0ru_aK0.js";import"react";import"react-dom";import"./copy-icon-ACZmDH8e.js";const c=["basic-flow","client-flow"];function U(){const{adminClient:m}=h(),{t:e}=v(),u=F(),{realm:n}=b(),{addAlert:l}=g(),s=y(),{handleSubmit:d,formState:p}=s;return r(w,{children:[t(V,{titleKey:"createFlow",subKey:"authenticationCreateFlowHelp"}),t(A,{variant:"light",children:t(S,{...s,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);l(e("flowCreatedSuccess"),i.success),u(N({realm:n,id:o,usedBy:"notInUse"}))}catch(o){l(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-DkchnrT9.js.map




© 2015 - 2025 Weber Informatics LLC | Privacy Policy