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

theme.keycloak.v2.admin.resources.assets.ClientScopeTypes-d24d11d6.js Maven / Gradle / Ivy

There is a newer version: 25.0.1
Show newest version
import{j as t,u,r as w,g as s,at as r,G as h}from"./index-0cda761d.js";import{b as y,S as O}from"./Select-68736f55.js";var c=(e=>(e.default="default",e.optional="optional",e))(c||{}),m=(e=>(e.none="none",e))(m||{});const i=Object.keys(c),j=Object.keys({...m,...c}),x=(e,n=i)=>n.map(a=>t.jsx(y,{value:a,children:e(`common:clientScope.${a}`)},a)),v=(e,n)=>i.map(a=>t.jsx(h,{onClick:()=>n(a),children:e(`common:clientScope.${a}`)},a)),N=({clientScope:e,type:n,onSelect:a,all:o=!1,...f})=>{const{t:C}=u(),[l,p]=w.useState(!1);return t.jsx(O,{className:`keycloak__client-scope__${n}`,onToggle:()=>p(!l),isOpen:l,selections:[n],onSelect:(D,d)=>{a(d),p(!1)},...f,children:x(C,o?j:i)},e.id)},A=async(e,n)=>{await $(e),await g(e,n)},S=()=>s.clientScopes,$=async e=>{e.type!=="none"&&await S()[`delDefault${e.type==="optional"?"Optional":""}ClientScope`]({id:e.id})},g=async(e,n)=>{n!=="none"&&await S()[`addDefault${n==="optional"?"Optional":""}ClientScope`]({id:e.id})},E=async(e,n,a,o)=>{a!=="none"&&await T(e,n,a),await k(e,n,o)},T=async(e,n,a)=>{const o=`del${r(a)}ClientScope`;await s.clients[o]({id:e,clientScopeId:n.id})},k=async(e,n,a)=>{const o=`add${r(a)}ClientScope`;await s.clients[o]({id:e,clientScopeId:n.id})};export{m as A,c as C,N as a,j as b,A as c,x as d,T as e,k as f,E as g,v as h,$ as r};
//# sourceMappingURL=ClientScopeTypes-d24d11d6.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy