theme.keycloak.v2.admin.resources.assets.PageList-s9OtSlkz.js Maven / Gradle / Ivy
import{jsxs as C,jsx as a}from"react/jsx-runtime";import{useState as m}from"react";import{u as L,a as R,f as S,d as x,e as A,c as l,b,B,P as E,a2 as V,i as w,L as d,cF as i}from"./main-C7ps2lmX.js";import{u as N}from"./ConfirmDialog-hx7XKLbN.js";import{L as O}from"./PaginatingTableToolbar-Cjsz5Jh4.js";import{K as U}from"./KeycloakDataTable-DbY4la1D.js";import{V as _}from"./ViewHeader-B7eeFzFA.js";import"react-dom";import"./EmptyStateFooter-DqmBOP2I.js";import"./EmptyStateActions-DWNUFByn.js";import"./Td-D2hVFK0Z.js";import"./grip-vertical-icon-BxF7V59o.js";import"./_baseFlatten-eIEJR-AJ.js";const c="org.keycloak.services.ui.extend.UiPageProvider",te="org.keycloak.services.ui.extend.UiTabProvider",F=r=>{const{realm:t}=l();return a(d,{to:i({realm:t,providerId:r.providerId,id:r.id}),children:r.id},r.id)};function ae(){const{adminClient:r}=L(),{t}=R(),{addAlert:p,addError:u}=S(),f=x(),{providerId:y}=A(),[s,g]=m(0),I=()=>g(s+1),{realm:n,realmRepresentation:v}=l(),[P,h]=m(),{componentTypes:D}=b(),o=D?.[c]?.find(e=>e.id===y),K=async()=>{const e={parent:v?.id,type:c};return await r.components.find({...e})},[k,T]=N({titleKey:"itemDeleteConfirmTitle",messageKey:"itemDeleteConfirm",continueButtonLabel:"delete",continueButtonVariant:B.danger,onConfirm:async()=>{try{await r.components.del({id:P.id}),p(t("itemDeletedSuccess")),I()}catch(e){u("itemSaveError",e)}}});return C(E,{variant:"light",className:"pf-v5-u-p-0",children:[a(T,{}),a(_,{titleKey:o.id,subKey:o.helpText,divider:!1}),a(U,{toolbarItem:a(V,{children:a(w,{component:e=>a(d,{...e,to:i({realm:n,providerId:o.id})}),children:t("createItem")})}),actionResolver:e=>[{title:t("delete"),onClick(){h(e.data),k()}}],searchPlaceholderKey:"searchItem",loader:K,columns:[{name:"id",cellRenderer:F},...o.properties.slice(0,3).map(e=>({name:`config.${e.name}[0]`,displayKey:e.label}))],ariaLabelKey:"list",emptyState:a(O,{hasIcon:!0,message:t("noItems"),instructions:t("noItemsInstructions"),primaryActionText:t("createItem"),onPrimaryAction:()=>f(i({realm:n,providerId:o.id}))})},s)]})}export{c as PAGE_PROVIDER,te as TAB_PROVIDER,ae as default};
//# sourceMappingURL=PageList-s9OtSlkz.js.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy