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

theme.keycloak.v2.admin.resources.assets.AddIdentityProvider-BMB-B0Ym.js Maven / Gradle / Ivy

There is a newer version: 26.0.7
Show newest version
import{jsxs as i,Fragment as I,jsx as t}from"react/jsx-runtime";import{useMemo as b}from"react";import{u as S,a as k,g as A,b as F,f as C,d as x,c as V,b2 as j,P as w,F as D,A as G,h as p,L as E,cw as H,j as L,cx as T}from"./index-C1LIsRX7.js";import{D as z}from"./DynamicComponents-CIZcko9u.js";import{F as B}from"./FormAccess-BcY70QlP.js";import{V as K}from"./ViewHeader-qjLr6U82.js";import{u as M}from"./useParams-n_2fXkN1.js";import{G as N}from"./GeneralSettings-BttqxNec.js";import"react-dom";import"./ClientSelect-BTkwOwGP.js";import"./FileUpload-T43Q4AfB.js";import"./CodeEditor-CIeIZGz7.js";import"./copy-icon-DOS8MmN7.js";import"./EmptyStateFooter-Cm2IMTi1.js";import"./EmptyStateActions-DBSnfkAA.js";import"./GroupPickerDialog-DmX3SBxL.js";import"./PaginatingTableToolbar-CpMLQtqt.js";import"./DataListItemRow-COCiEHyF.js";import"./FlexItem-DCAd8FXq.js";import"./KeySelect-B2uWUd6C.js";import"./useToggle-K3Kx99tM.js";import"./MultiLineInput-AcwuO_FT.js";import"./AddRoleMappingModal-Ds4yp8lg.js";import"./KeycloakDataTable-jyvvxdb8.js";import"./Td-BwjBKSkH.js";import"./grip-vertical-icon-Bnn0MebT.js";import"./_baseFlatten-BHAcGTxk.js";import"./ConfirmDialog-B5qjiAuo.js";import"./filter-icon-BVyMUArZ.js";import"./DisplayOrder-eyXhXEFD.js";import"./ClientIdSecret-B8yoPK02.js";function hr(){const{adminClient:l}=S(),{t:e}=k(),{providerId:r}=M(),s=A({mode:"onChange"}),n=F(),m=b(()=>{const o=["org.keycloak.broker.social.SocialIdentityProvider","org.keycloak.broker.provider.IdentityProvider"];for(const a of o){const c=n.componentTypes?.[a]?.find(({id:h})=>h===r);if(c)return c}},[n,r]),{handleSubmit:u,formState:{isValid:v}}=s,{addAlert:f,addError:y}=C(),g=x(),{realm:d}=V(),P=async o=>{try{await l.identityProviders.create({...o,providerId:r,alias:r}),f(e("createIdentityProviderSuccess"),L.success),g(T({realm:d,providerId:r,alias:r,tab:"settings"}))}catch(a){y("createError",a)}};return i(I,{children:[t(K,{titleKey:e("addIdentityProvider",{provider:j(r)})}),t(w,{variant:"light",children:i(B,{role:"manage-identity-providers",isHorizontal:!0,onSubmit:u(P),children:[i(D,{...s,children:[t(N,{id:r}),m&&t(z,{stringify:!0,properties:m.properties})]}),i(G,{children:[t(p,{isDisabled:!v,variant:"primary",type:"submit","data-testid":"createProvider",children:e("add")}),t(p,{variant:"link","data-testid":"cancel",component:o=>t(E,{...o,to:H({realm:d})}),children:e("cancel")})]})]})})]})}export{hr as default};
//# sourceMappingURL=AddIdentityProvider-BMB-B0Ym.js.map




© 2015 - 2025 Weber Informatics LLC | Privacy Policy