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

theme.keycloak.v2.admin.resources.assets.PageList-D9zZFEpa.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,h as w,L as d,cF as i}from"./index-C1LIsRX7.js";import{u as N}from"./ConfirmDialog-B5qjiAuo.js";import{L as O}from"./PaginatingTableToolbar-CpMLQtqt.js";import{K as U}from"./KeycloakDataTable-jyvvxdb8.js";import{V as _}from"./ViewHeader-qjLr6U82.js";import"react-dom";import"./EmptyStateFooter-Cm2IMTi1.js";import"./EmptyStateActions-DBSnfkAA.js";import"./Td-BwjBKSkH.js";import"./grip-vertical-icon-Bnn0MebT.js";import"./_baseFlatten-BHAcGTxk.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(),[h,P]=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:h.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(){P(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-D9zZFEpa.js.map




© 2015 - 2025 Weber Informatics LLC | Privacy Policy