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

theme.keycloak.v2.admin.resources.assets.ViewHeader-qjLr6U82.js Maven / Gradle / Ivy

import{jsxs as t,jsx as e,Fragment as W}from"react/jsx-runtime";import*as E from"react";import{useState as D,Fragment as T,isValidElement as m}from"react";import{_ as G,l as Z,cR as q,a as B,at as Q,P as X,aa as b,Z as O,bG as Y,a0 as y,a1 as U,a2 as C,a4 as K,ad as ee,J as _,K as I,N as F,h as ae,ar as ne}from"./index-C1LIsRX7.js";const j={level:"pf-v5-l-level",modifiers:{gutter:"pf-m-gutter"}},v=r=>{var{hasGutter:s,className:n="",children:l=null}=r,h=G(r,["hasGutter","className","children"]);return E.createElement("div",Object.assign({},h,{className:Z(j.level,s&&j.modifiers.gutter,n)}),l)};v.displayName="Level";const o=r=>{var{children:s=null}=r,n=G(r,["children"]);return E.createElement("div",Object.assign({},n),s)};o.displayName="LevelItem";const re=({title:r,href:s,isInline:n,...l})=>t("a",{href:s,target:"_blank",rel:"noreferrer noopener",className:n?"pf-m-link pf-m-inline":"",...l,children:[r||s," ",s?.startsWith("http")&&e(q,{})]}),le=({actionsDropdownId:r,className:s,titleKey:n,badges:l,isDropdownDisabled:h,subKey:d,helpUrl:u,dropdownItems:f,lowerDropdownMenuTitle:$,lowerDropdownItems:g,lowerButton:c,isEnabled:P=!0,onToggle:w,divider:R=!0,helpTextKey:k,isReadOnly:S=!1})=>{const{t:i,i18n:V}=B(),{enabled:H}=Q(),[x,M]=D(!1),[N,z]=D(!1),A=()=>{M(!x)},J=()=>{z(!N)},L=a=>a.replace(/\s/g,"-");return t(W,{children:[t(X,{variant:"light",children:[t(v,{hasGutter:!0,children:[e(o,{children:t(v,{children:[e(o,{children:e(b,{className:"pf-v5-u-mr-sm",children:e(O,{className:s,component:"h1","data-testid":"view-header",children:V.exists(n)?i(n):n})})}),l&&e(o,{children:l.map((a,p)=>t(T,{children:[!m(a.text)&&t(T,{children:[e(Y,{"data-testid":a.id,isRead:a.readonly,children:a.text})," "]},a.text),m(a.text)&&a.text," "]},p))})]})}),e(o,{children:e(y,{className:"pf-v5-u-p-0",children:t(U,{children:[w&&t(C,{children:[e(K,{id:`${L(n)}-switch`,"data-testid":`${n}-switch`,label:i("enabled"),labelOff:i("disabled"),className:"pf-v5-u-mr-lg",isDisabled:S,isChecked:P,"aria-label":i("enabled"),onChange:(a,p)=>{w(p)}}),k&&e(ee,{helpText:i(k),fieldLabelId:`${L(n)}-switch`})]}),f&&e(C,{children:e(_,{popperProps:{position:"right"},toggle:a=>e(I,{ref:a,isDisabled:h,id:r,onClick:A,"data-testid":"action-dropdown",children:i("action")}),isOpen:x,children:e(F,{children:f})})})]})})})]}),H&&e(b,{id:"view-header-subkey",children:t(O,{children:[m(d)?d:d?i(d):"",u&&e(re,{title:i("learnMore"),href:u,isInline:!0,className:"pf-v5-u-ml-md"})]})}),g&&e(_,{className:"keycloak__user-federation__dropdown",toggle:a=>e(I,{ref:a,onClick:J,variant:"primary",id:"ufToggleId",children:i($)}),isOpen:N,children:e(F,{children:g})}),c&&e(ae,{variant:c.variant,onClick:c.onClick,"data-testid":"viewHeader-lower-btn",children:c.lowerButtonTitle})]}),R&&e(ne,{component:"div"})]})};export{re as F,le as V};
//# sourceMappingURL=ViewHeader-qjLr6U82.js.map




© 2015 - 2025 Weber Informatics LLC | Privacy Policy