PageSourceSearch

https://auth.deeproot.ai/resources/zrj36/admin/keycloak.v2/assets/DedicatedScopes-C9InAo0-.js

js deeproot.ai collected 2026-10-05 12:06:27 UTC 3,659 bytes, 2 lines download raw bytes

1import{jsxs as b,jsx as e,Fragment as y}from"react/jsx-runtime";import{u as v,a as C,B as R,br as I,P as D,R as x,_ as P,S as F,aa as L,s as h,b as O,m as B,v as H,bC as A,cK as w}from"./main-_ihRb8Qg.js";import{useState as E}from"react";import{M as K}from"./MapperList-CCs5PjUz.js";import{R as N,u as V}from"./RoutableTabs-DhXzPJJE.js";import{V as j}from"./ViewHeader-BKbUCfZV.js";import{u as k}from"./useParams-CZh4xVl7.js";import{F as G}from"./FormAccess-nKSssynu.js";import{R as _}from"./AddRoleMappingModal-CyI9hBlp.js";import{a as M,b as T}from"./Tabs-CrFbOwgg.js";import"react-dom";import"./useLocaleSort-CDjIXEHs.js";import"./DataListItemRow-Dy_s8uJK.js";import"./PageHandler-m6Hyx9jP.js";import"./DynamicComponents-BaJRoKWf.js";import"./ClientSelect-B1O_K1Bm.js";import"./FileUpload-CsLjB0m6.js";import"./GroupPickerDialog-Re0MvBrh.js";import"./KeySelect-CCez0SUD.js";import"./MultiLineInput-CsIbzFmn.js";import"./index-DtAnyQJg.js";import"./constants-BclHbWtx.js";import"./translationFormatter-BuoX761Q.js";import"./ConfirmDialog-C_CyRe0B.js";import"./filter-icon-BJy6kb4G.js";const z=({client:p})=>{const{adminClient:r}=v(),{t:s}=C(),{addAlert:l,addError:m}=R(),[t,f]=E(p),{hasAccess:a}=I(),u=a("manage-clients")||t.access?.manage,S=async c=>{try{const n=c.filter(i=>i.client===void 0).map(i=>i.role).flat();await Promise.all([r.clients.addRealmScopeMappings({id:t.id},n),...c.filter(i=>i.client!==void 0).map(i=>r.clients.addClientScopeMappings({id:t.id,client:i.client.id},[i.role]))]),l(s("clientScopeSuccess"),h.success)}catch(n){m("clientScopeError",n)}},g=async()=>{const c={...t,fullScopeAllowed:!t.fullScopeAllowed};try{await r.clients.update({id:t.id},c),l(s("clientScopeSuccess"),h.success),f(c)}catch(n){m("clientScopeError",n)}};return b(D,{children:[e(G,{role:"manage-clients",fineGrainedAccess:t.access?.manage,isHorizontal:!0,children:e(x,{hasNoPaddingTop:!0,label:s("fullScopeAllowed"),labelIcon:e(P,{helpText:s("fullScopeAllowedHelp"),fieldLabelId:"fullScopeAllowed"}),fieldId:"fullScopeAllowed",children:e(F,{id:"fullScopeAllowed",label:s("on"),labelOff:s("off"),isChecked:t.fullScopeAllowed,onChange:g,"aria-label":s("fullScopeAllowed")})})}),!t.fullScopeAllowed&&b(y,{children:[e(L,{}),e(_,{name:t.clientId,id:t.id,type:"clients",save:S,isManager:u})]})]})};function be(){const{adminClient:p}=v(),{t:r}=C(),s=O(),{realm:l,clientId:m}=k(),{addAlert:t,addError:f}=R(),[a,u]=E();B(()=>p.clients.findOne({id:m}),u,[]);const S=o=>V(A({realm:l,clientId:m,tab:o})),g=S("mappers"),c=S("scope");if(!a)return e(H,{});const n=async o=>{if(Array.isArray(o))try{await p.clients.addMultipleProtocolMappers({id:a.id},o),u(await p.clients.findOne({id:a.id})),t(r("mappingCreatedSuccess"),h.success)}catch(d){f("mappingCreatedError",d)}else{const d=o;s(w({realm:l,id:a.id,mapperId:d.id,viewMode:"new"}))}},i=async o=>{try{await p.clients.delProtocolMapper({id:a.id,mapperId:o.id}),u({...a,protocolMappers:a.protocolMappers?.filter(d=>d.id!==o.id)}),t(r("mappingDeletedSuccess"),h.success)}catch(d){f("mappingDeletedError",d)}return!0};return b(y,{children:[e(j,{titleKey:a.clientId+"-dedicated",subKey:"dedicatedScopeExplain",divider:!1}),e(D,{variant:"light",className:"pf-v5-u-p-0",children:b(N,{isBox:!0,mountOnEnter:!0,defaultLocation:A({realm:l,clientId:m,tab:"mappers"}),children:[e(M,{title:e(T,{children:r("mappers")}),"data-testid":"mappersTab",...g,children:e(K,{model:a,onAdd:n,onDelete:i,detailLink:o=>w({realm:l,id:a.id,mapperId:o,viewMode:"edit"})})}),e(M,{title:e(T,{children:r("scope")}),"data-testid":"scopeTab",...c,children:e(z,{client:a})})]})})]})}export{be as default};
2//# sourceMappingURL=DedicatedScopes-C9InAo0-.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.