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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy