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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy