theme.keycloak.v2.admin.resources.assets.Td-D2hVFK0Z.js Maven / Gradle / Ivy
import{o as pe,_ as S,i as V,J as ya,K as Ta,aB as wa,N as xa,ar as Oa,D as Ca,I as X,m as T,cS as qr,cT as Rt,a9 as Ea,cU as Sa,cV as Lr,bS as Ra,cW as Pa,aO as Mr,cg as Aa,cX as ue,E as Ia}from"./main-C7ps2lmX.js";import*as i from"react";import{G as ja}from"./grip-vertical-icon-BxF7V59o.js";const ka={name:"ArrowsAltVIcon",height:512,width:256,svgPath:"M214.059 377.941H168V134.059h46.059c21.382 0 32.09-25.851 16.971-40.971L144.971 7.029c-9.373-9.373-24.568-9.373-33.941 0L24.971 93.088c-15.119 15.119-4.411 40.971 16.971 40.971H88v243.882H41.941c-21.382 0-32.09 25.851-16.971 40.971l86.059 86.059c9.373 9.373 24.568 9.373 33.941 0l86.059-86.059c15.12-15.119 4.412-40.971-16.97-40.971z",yOffset:0,xOffset:0},$a=pe(ka),Na={name:"EllipsisHIcon",height:512,width:512,svgPath:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z",yOffset:0,xOffset:0},qa=pe(Na),La={name:"LongArrowAltDownIcon",height:512,width:256,svgPath:"M168 345.941V44c0-6.627-5.373-12-12-12h-56c-6.627 0-12 5.373-12 12v301.941H41.941c-21.382 0-32.09 25.851-16.971 40.971l86.059 86.059c9.373 9.373 24.569 9.373 33.941 0l86.059-86.059c15.119-15.119 4.411-40.971-16.971-40.971H168z",yOffset:0,xOffset:0},Ma=pe(La),Ba={name:"LongArrowAltUpIcon",height:512,width:256,svgPath:"M88 166.059V468c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12V166.059h46.059c21.382 0 32.09-25.851 16.971-40.971l-86.059-86.059c-9.373-9.373-24.569-9.373-33.941 0l-86.059 86.059c-15.119 15.119-4.411 40.971 16.971 40.971H88z",yOffset:0,xOffset:0},Va=pe(Ba),Da=e=>{var{items:t,isDisabled:r,rowData:a,extraData:n,actionsToggle:o,popperProps:l={position:"end",direction:"down"},innerRef:s,firstActionItemRef:d,isOnOpenChangeDisabled:c=!1}=e,u=S(e,["items","isDisabled","rowData","extraData","actionsToggle","popperProps","innerRef","firstActionItemRef","isOnOpenChangeDisabled"]);const[p,f]=i.useState(!1),_=()=>{f(!p)},m=(v,g)=>{g&&(v.preventDefault(),g(v,n&&n.rowIndex,a,n))};return i.createElement(i.Fragment,null,t.filter(v=>v.isOutsideDropdown).map((v,g)=>{var{title:y,itemKey:h,onClick:x,isOutsideDropdown:C}=v,R=S(v,["title","itemKey","onClick","isOutsideDropdown"]);return typeof y=="string"?i.createElement(V,Object.assign({onClick:A=>m(A,x)},R,{isDisabled:r,key:h||`outside_dropdown_${g}`,"data-key":h||`outside_dropdown_${g}`}),y):i.cloneElement(y,Object.assign({onClick:x,isDisabled:r},R))}),i.createElement(ya,Object.assign({isOpen:p,onOpenChange:c?void 0:v=>f(v),toggle:v=>o?o({onToggle:_,isOpen:p,isDisabled:r,toggleRef:v}):i.createElement(Ta,{"aria-label":"Kebab toggle",ref:v,onClick:_,isExpanded:p,isDisabled:r,variant:"plain"},i.createElement(wa,null))},a&&a.actionProps,{ref:s},u,{popperProps:l}),i.createElement(xa,null,t.filter(v=>!v.isOutsideDropdown).map((v,g)=>{var{title:y,itemKey:h,onClick:x,tooltipProps:C,isSeparator:R,shouldCloseOnClick:A=!0}=v,O=S(v,["title","itemKey","onClick","tooltipProps","isSeparator","shouldCloseOnClick"]);if(R)return i.createElement(Oa,{key:h||g,"data-key":h||g});const $=i.createElement(Ca,Object.assign({onClick:P=>{m(P,x),A&&_()}},O,{key:h||g,"data-key":h||g,ref:g===0?d:void 0}),y);return C?.content?i.createElement(X,Object.assign({key:h||g},C),$):$}))))},Br=i.forwardRef((e,t)=>i.createElement(Da,Object.assign({},e,{innerRef:t})));Br.displayName="ActionsColumn";const b={button:"pf-v5-c-button",check:"pf-v5-c-check",checkInput:"pf-v5-c-check__input",dirRtl:"pf-v5-m-dir-rtl",modifiers:{hidden:"pf-m-hidden",hiddenOnSm:"pf-m-hidden-on-sm",visibleOnSm:"pf-m-visible-on-sm",hiddenOnMd:"pf-m-hidden-on-md",visibleOnMd:"pf-m-visible-on-md",hiddenOnLg:"pf-m-hidden-on-lg",visibleOnLg:"pf-m-visible-on-lg",hiddenOnXl:"pf-m-hidden-on-xl",visibleOnXl:"pf-m-visible-on-xl",hiddenOn_2xl:"pf-m-hidden-on-2xl",visibleOn_2xl:"pf-m-visible-on-2xl",fixed:"pf-m-fixed",stickyHeader:"pf-m-sticky-header",nestedColumnHeader:"pf-m-nested-column-header",borderRow:"pf-m-border-row",striped:"pf-m-striped",expandable:"pf-m-expandable",stripedEven:"pf-m-striped-even",ghostRow:"pf-m-ghost-row",center:"pf-m-center",help:"pf-m-help",favorite:"pf-m-favorite",borderRight:"pf-m-border-right",borderLeft:"pf-m-border-left",expanded:"pf-m-expanded",truncate:"pf-m-truncate",wrap:"pf-m-wrap",nowrap:"pf-m-nowrap",fitContent:"pf-m-fit-content",breakWord:"pf-m-break-word",noBorderRows:"pf-m-no-border-rows",clickable:"pf-m-clickable",selected:"pf-m-selected",firstCellOffsetReset:"pf-m-first-cell-offset-reset",dragOver:"pf-m-drag-over",standalone:"pf-m-standalone",favorited:"pf-m-favorited",noPadding:"pf-m-no-padding",compact:"pf-m-compact",width_10:"pf-m-width-10",width_15:"pf-m-width-15",width_20:"pf-m-width-20",width_25:"pf-m-width-25",width_30:"pf-m-width-30",width_35:"pf-m-width-35",width_40:"pf-m-width-40",width_45:"pf-m-width-45",width_50:"pf-m-width-50",width_60:"pf-m-width-60",width_70:"pf-m-width-70",width_80:"pf-m-width-80",width_90:"pf-m-width-90",width_100:"pf-m-width-100"},table:"pf-v5-c-table",tableAction:"pf-v5-c-table__action",tableButton:"pf-v5-c-table__button",tableButtonContent:"pf-v5-c-table__button-content",tableCaption:"pf-v5-c-table__caption",tableCheck:"pf-v5-c-table__check",tableColumnHelp:"pf-v5-c-table__column-help",tableColumnHelpAction:"pf-v5-c-table__column-help-action",tableCompoundExpansionToggle:"pf-v5-c-table__compound-expansion-toggle",tableControlRow:"pf-v5-c-table__control-row",tableDraggable:"pf-v5-c-table__draggable",tableExpandableRow:"pf-v5-c-table__expandable-row",tableExpandableRowContent:"pf-v5-c-table__expandable-row-content",tableFavorite:"pf-v5-c-table__favorite",tableIcon:"pf-v5-c-table__icon",tableIconInline:"pf-v5-c-table__icon-inline",tableInlineEditAction:"pf-v5-c-table__inline-edit-action",tableSort:"pf-v5-c-table__sort",tableSortIndicator:"pf-v5-c-table__sort-indicator",tableSubhead:"pf-v5-c-table__subhead",tableTbody:"pf-v5-c-table__tbody",tableTd:"pf-v5-c-table__td",tableText:"pf-v5-c-table__text",tableTh:"pf-v5-c-table__th",tableThead:"pf-v5-c-table__thead",tableToggle:"pf-v5-c-table__toggle",tableToggleIcon:"pf-v5-c-table__toggle-icon",tableTr:"pf-v5-c-table__tr",themeDark:"pf-v5-theme-dark"},Vr=e=>{var{className:t="",children:r=null,isOpen:a,onToggle:n}=e,o=S(e,["className","children","isOpen","onToggle"]);return i.createElement(i.Fragment,null,a!==void 0&&i.createElement(V,Object.assign({className:T(t,a&&b.modifiers.expanded)},o,{variant:"plain","aria-label":o["aria-label"]||"Details",onClick:n,"aria-expanded":a}),i.createElement("div",{className:T(b.tableToggleIcon)},i.createElement(qr,null))),r)};Vr.displayName="CollapseColumn";const Dr=e=>{var{className:t,onClick:r,"aria-label":a,id:n}=e,o=S(e,["className","onClick","aria-label","id"]);return i.createElement(V,Object.assign({id:n,variant:"plain",className:t,type:"button","aria-label":a||"Draggable row draggable button",onClick:r},o),i.createElement(ja,{"aria-hidden":!0}))};Dr.displayName="DraggableCell";const Fa={button:"pf-v5-c-button",inlineEdit:"pf-v5-c-inline-edit",inlineEditAction:"pf-v5-c-inline-edit__action",inlineEditEditableText:"pf-v5-c-inline-edit__editable-text",inlineEditGroup:"pf-v5-c-inline-edit__group",inlineEditInput:"pf-v5-c-inline-edit__input",inlineEditLabel:"pf-v5-c-inline-edit__label",inlineEditValue:"pf-v5-c-inline-edit__value",modifiers:{iconGroup:"pf-m-icon-group",footer:"pf-m-footer",column:"pf-m-column",valid:"pf-m-valid",plain:"pf-m-plain",actionGroup:"pf-m-action-group",enableEditable:"pf-m-enable-editable",inlineEditable:"pf-m-inline-editable",enable:"pf-m-enable",bold:"pf-m-bold"}};var Pt;(function(e){e.div="div",e.nav="nav"})(Pt||(Pt={}));var At;(function(e){e.wrap="wrap",e.nowrap="nowrap",e.truncate="truncate",e.breakWord="breakWord",e.fitContent="fitContent"})(At||(At={}));const be=e=>{var{children:t=null,className:r="",variant:a="span",wrapModifier:n=null,tooltip:o="",tooltipProps:l={},onMouseEnter:s=()=>{},focused:d=!1,tooltipHasDefaultBehavior:c=!1}=e,u=S(e,["children","className","variant","wrapModifier","tooltip","tooltipProps","onMouseEnter","focused","tooltipHasDefaultBehavior"]);const p=a,f=i.createRef(),[_,m]=i.useState(o),v=h=>{h.target.offsetWidth{h.offsetWidth{c||(d?g(f.current):m(""))},[d,c]),_!==""?i.createElement(X,Object.assign({triggerRef:f,content:_},!c&&{isVisible:!0},l),y):y};be.displayName="TableText";const vt=({children:e,info:t,className:r,variant:a="tooltip",popoverProps:n,tooltipProps:o,ariaLabel:l})=>i.createElement("div",{className:T(b.tableColumnHelp,r)},typeof e=="string"?i.createElement(be,null,e):e,i.createElement("span",{className:T(b.tableColumnHelpAction)},a==="tooltip"?i.createElement(X,Object.assign({content:t},o),i.createElement(V,{variant:"plain","aria-label":l||typeof t=="string"&&t||"More info"},i.createElement(Rt,null))):i.createElement(Ea,Object.assign({bodyContent:t},n),i.createElement(V,{variant:"plain","aria-label":l||typeof t=="string"&&t||"More info"},i.createElement(Rt,null)))));vt.displayName="HeaderCellInfoWrapper";const Ha={button:"pf-v5-c-button",modifiers:{grid:"pf-m-grid",compact:"pf-m-compact",expanded:"pf-m-expanded",selected:"pf-m-selected",noPadding:"pf-m-no-padding",hoverable:"pf-m-hoverable",nowrap:"pf-m-nowrap",fitContent:"pf-m-fit-content",truncate:"pf-m-truncate",gridMd:"pf-m-grid-md",gridLg:"pf-m-grid-lg",gridXl:"pf-m-grid-xl",grid_2xl:"pf-m-grid-2xl"},table:"pf-v5-c-table",tableAction:"pf-v5-c-table__action",tableButton:"pf-v5-c-table__button",tableCheck:"pf-v5-c-table__check",tableCompoundExpansionToggle:"pf-v5-c-table__compound-expansion-toggle",tableExpandableRow:"pf-v5-c-table__expandable-row",tableExpandableRowContent:"pf-v5-c-table__expandable-row-content",tableFavorite:"pf-v5-c-table__favorite",tableIcon:"pf-v5-c-table__icon",tableInlineEditAction:"pf-v5-c-table__inline-edit-action",tableTbody:"pf-v5-c-table__tbody",tableTd:"pf-v5-c-table__td",tableText:"pf-v5-c-table__text",tableTh:"pf-v5-c-table__th",tableThead:"pf-v5-c-table__thead",tableToggle:"pf-v5-c-table__toggle",tableToggleIcon:"pf-v5-c-table__toggle-icon",tableTr:"pf-v5-c-table__tr"},j={dirRtl:"pf-v5-m-dir-rtl",dropdown:"pf-v5-c-dropdown",modifiers:{treeView:"pf-m-tree-view",noInset:"pf-m-no-inset",treeViewGrid:"pf-m-tree-view-grid",treeViewDetailsExpanded:"pf-m-tree-view-details-expanded",treeViewGridMd:"pf-m-tree-view-grid-md",treeViewGridLg:"pf-m-tree-view-grid-lg",treeViewGridXl:"pf-m-tree-view-grid-xl",treeViewGrid_2xl:"pf-m-tree-view-grid-2xl"},table:"pf-v5-c-table",tableAction:"pf-v5-c-table__action",tableCheck:"pf-v5-c-table__check",tableTbody:"pf-v5-c-table__tbody",tableTd:"pf-v5-c-table__td",tableTh:"pf-v5-c-table__th",tableThead:"pf-v5-c-table__thead",tableToggle:"pf-v5-c-table__toggle",tableToggleIcon:"pf-v5-c-table__toggle-icon",tableTr:"pf-v5-c-table__tr",tableTreeViewDetailsToggle:"pf-v5-c-table__tree-view-details-toggle",tableTreeViewIcon:"pf-v5-c-table__tree-view-icon",tableTreeViewMain:"pf-v5-c-table__tree-view-main",tableTreeViewText:"pf-v5-c-table__tree-view-text",tableTreeViewTitleCell:"pf-v5-c-table__tree-view-title-cell",tableTreeViewTitleHeaderCell:"pf-v5-c-table__tree-view-title-header-cell"};var mt;(function(e){e.radio="radio",e.checkbox="checkbox"})(mt||(mt={}));const Fr=e=>{var{children:t=null,className:r,onSelect:a=null,selectVariant:n,tooltip:o,tooltipProps:l}=e,s=S(e,["children","className","onSelect","selectVariant","tooltip","tooltipProps"]);const d=i.createRef(),c=i.createElement(i.Fragment,null,i.createElement("label",null,i.createElement("input",Object.assign({},s,{ref:d,type:n,onChange:a}))),t);return o?i.createElement(X,Object.assign({triggerRef:d,content:o},l),c):c};Fr.displayName="SelectColumn";const Hr=(e,{rowIndex:t,columnIndex:r,rowData:a,column:n,property:o,tooltip:l})=>{const{extraParams:{onSelect:s,selectVariant:d,allRowsSelected:c,isHeaderSelectDisabled:u}}=n,p={rowIndex:t,columnIndex:r,column:n,property:o};if(a&&a.hasOwnProperty("parent")&&!a.showSelect&&!a.fullWidth)return{component:"td",isVisible:!0};const f=t!==void 0?t:-1;function _(g){const y=t===void 0?g.currentTarget.checked:a&&!a.selected;s&&s(g,y,f,a,p)}const m=Object.assign(Object.assign(Object.assign({},f!==-1?{checked:a&&!!a.selected,"aria-label":`Select row ${t}`}:{checked:c,"aria-label":"Select all rows"}),a&&(a.disableCheckbox||a.disableSelection)&&{disabled:!0,className:Sa.checkInput}),!a&&u&&{disabled:!0});let v="check-all";return f!==-1&&d===mt.checkbox?v=`checkrow${t}`:f!==-1&&(v="radioGroup"),{className:T(b.tableCheck),component:f!==-1?"td":"th",isVisible:!a||!a.fullWidth,children:i.createElement(Fr,Object.assign({},m,{selectVariant:d,onSelect:_,name:v,tooltip:l}),e)}};var G;(function(e){e.asc="asc",e.desc="desc"})(G||(G={}));const Gr=e=>{var{children:t=null,className:r="",isSortedBy:a=!1,onSort:n=null,sortDirection:o="",type:l="button",tooltip:s,tooltipProps:d,tooltipHasDefaultBehavior:c}=e,u=S(e,["children","className","isSortedBy","onSort","sortDirection","type","tooltip","tooltipProps","tooltipHasDefaultBehavior"]);let p;const[f,_]=i.useState(!1);return a?p=o===G.asc?Va:Ma:p=$a,i.createElement("button",Object.assign({},u,{type:l,className:T(r,b.tableButton),onClick:m=>n&&n(m),onFocus:()=>_(!0),onBlur:()=>_(!1)}),i.createElement("div",{className:T(r,b.tableButtonContent)},i.createElement(be,{tooltip:s,tooltipProps:d,tooltipHasDefaultBehavior:c,focused:f},t),i.createElement("span",{className:T(b.tableSortIndicator)},i.createElement(p,null))))};Gr.displayName="SortColumn";const Ga=e=>()=>Wr(i.createElement(Lr,{"aria-hidden":!0}),{columnIndex:e.columnIndex,className:b.modifiers.favorite,ariaLabel:"Sort favorites",column:{extraParams:{sortBy:e.sortBy,onSort:e?.onSort}},tooltip:e.tooltip,tooltipProps:e.tooltipProps,tooltipHasDefaultBehavior:!0}),Wr=(e,{columnIndex:t,column:r,property:a,className:n,ariaLabel:o,tooltip:l,tooltipProps:s,tooltipHasDefaultBehavior:d})=>{const{extraParams:{sortBy:c,onSort:u}}=r,p={columnIndex:t,column:r,property:a},f=c&&t===c.index;function _(m){let v;f?v=c.direction===G.asc?G.desc:G.asc:v=c.defaultDirection?c.defaultDirection:G.asc,u&&u(m,t,v,p)}return{className:T(b.tableSort,f&&b.modifiers.selected,n),"aria-sort":f?`${c.direction}ending`:"none",children:i.createElement(Gr,{isSortedBy:f,sortDirection:f?c.direction:"",onSort:_,"aria-label":o,tooltip:l,tooltipProps:s,tooltipHasDefaultBehavior:d},e)}},It=(e,t,r,a)=>t,Wa=(e,t,r)=>(a,{rowData:n,column:o,rowIndex:l,columnIndex:s,column:{extraParams:{actionsToggle:d,actionsPopperProps:c}},property:u})=>{const p={rowIndex:l,columnIndex:s,column:o,property:u},f=It(t,e),_=It(r,n&&n.disableActions),m=f&&f.length>0?{children:i.createElement(Br,{items:f,isDisabled:_,rowData:n,extraData:p,actionsToggle:d,popperProps:c},a)}:{};return Object.assign({className:T(b.tableAction),style:{paddingRight:0},isVisible:!0},m)},Ua=e=>e.toUpperCase().replace("-","").replace("_",""),jt=e=>e.replace(/([-_][a-z])/gi,Ua);function Ka(e){return e[0].toUpperCase()+e.substring(1)}const Ur=e=>()=>({className:T(b.modifiers[typeof e=="number"?`width_${e}`:`width${Ka(e)}`])}),Kr=(e,{rowIndex:t,columnIndex:r,rowData:a,column:n,property:o})=>{const{extraParams:{onCollapse:l,rowLabeledBy:s="simple-node",expandId:d="expand-toggle",allRowsExpanded:c,collapseAllAriaLabel:u}}=n,p={rowIndex:t,columnIndex:r,column:n,property:o},f=t!==void 0?t:-1,_=Object.assign({},f!==-1?{isOpen:a?.isOpen,"aria-labelledby":`${s}${f} ${d}${f}`}:{isOpen:c,"aria-label":u||"Expand all rows"});function m(v){const g=a?!a.isOpen:!c;l&&l(v,t,g,a,p)}return{className:(a?.isOpen!==void 0||f===-1)&&T(b.tableToggle),isVisible:!a?.fullWidth,children:i.createElement(Vr,Object.assign({"aria-labelledby":`${s}${f} ${d}${f}`,onToggle:m,id:d+f},_),e)}},za=(e,{rowIndex:t,columnIndex:r,rowData:a,column:n,property:o})=>{if(!e)return null;const{title:l,props:s}=e,{extraParams:{onExpand:d,expandId:c="expand-toggle"}}=n,u={rowIndex:t,columnIndex:r,column:n,property:o};function p(f){d&&d(f,t,r,s.isOpen,a,u)}return{className:T(b.tableCompoundExpansionToggle,s.isOpen&&b.modifiers.expanded),children:s.isOpen!==void 0&&i.createElement("button",{type:"button",className:T(b.tableButton),onClick:p,"aria-expanded":s.isOpen,"aria-controls":s.ariaControls,id:`${c}-${t}-${r}`},i.createElement(be,null,l))}},Xa=["hidden","hiddenOnSm","hiddenOnMd","hiddenOnLg","hiddenOnXl","hiddenOn_2xl","visibleOnSm","visibleOnMd","visibleOnLg","visibleOnXl","visibleOn_2xl"],zr=Xa.filter(e=>b.modifiers[e]).reduce((e,t)=>{const r=t.replace("_2xl","2Xl");return e[r]=b.modifiers[t],e},{}),Xr=(...e)=>()=>({className:T(...e)}),Ja=({tooltip:e,tooltipProps:t,popover:r,popoverProps:a,className:n,ariaLabel:o})=>s=>({className:b.modifiers.help,children:e?i.createElement(vt,{variant:"tooltip",info:e,tooltipProps:t,ariaLabel:o,className:n},s):i.createElement(vt,{variant:"popover",info:r,popoverProps:a,ariaLabel:o,className:n},s)}),Jr=e=>{var{className:t="",onFavorite:r,isFavorited:a,rowIndex:n}=e,o=S(e,["className","onFavorite","isFavorited","rowIndex"]);const l=n===void 0?{}:{id:`favorites-button-${n}`,"aria-labelledby":`favorites-button-${n}`};return i.createElement(V,Object.assign({variant:"plain",className:t,type:"button","aria-label":a?"Starred":"Not starred",onClick:r},l,o),i.createElement(Lr,{"aria-hidden":!0}))};Jr.displayName="FavoritesCell";const Ya=(e,{rowIndex:t,columnIndex:r,rowData:a,column:n,property:o})=>{const{extraParams:{onFavorite:l}}=n,s={rowIndex:t,columnIndex:r,column:n,property:o};if(a&&a.hasOwnProperty("parent")&&!a.fullWidth)return{component:"td",isVisible:!0};function d(u){l&&l(u,a&&!a.favorited,t,a,s)}const c=a.favoritesProps||{};return{className:T(b.tableFavorite,a&&a.favorited&&b.modifiers.favorited),isVisible:!a||!a.fullWidth,children:i.createElement(Jr,Object.assign({rowIndex:t,onFavorite:d,isFavorited:a&&a.favorited},c))}},Za=(e,t,r)=>(a,{rowIndex:n,rowData:o})=>{const{isExpanded:l,isDetailsExpanded:s,"aria-level":d,"aria-setsize":c,toggleAriaLabel:u,checkAriaLabel:p,showDetailsAriaLabel:f,isChecked:_,checkboxId:m,icon:v}=o.props,g=a.title||a,y=i.createElement("div",{className:T(j.tableTreeViewText),key:"tree-view-text"},v&&i.createElement("span",{className:T(j.tableTreeViewIcon),key:"tree-view-text-icon"},v),i.createElement("span",{className:b.tableText,key:"table-text"},g)),h=(x,C)=>{t(C,x,n,g,o)};return{component:"th",className:j.tableTreeViewTitleCell,children:d!==void 0?i.createElement("div",{className:T(j.tableTreeViewMain)},c>0&&i.createElement("span",{className:T(j.tableToggle),key:"table-toggle"},i.createElement(V,{variant:"plain",onClick:x=>e&&e(x,n,g,o),className:T(l&&b.modifiers.expanded),"aria-expanded":l,"aria-label":u||`${l?"Collapse":"Expand"} row ${n}`},i.createElement("div",{className:T(j.tableToggleIcon)},i.createElement(qr,{"aria-hidden":"true"})))),!!t&&i.createElement("span",{className:T(j.tableCheck),key:"table-check"},i.createElement("label",{htmlFor:m||`checkbox_${n}`},i.createElement(Ra,{id:m||`checkbox_${n}`,"aria-label":p||`Row ${n} checkbox`,isChecked:_,onChange:(x,C)=>h(C,x)}))),y,!!r&&i.createElement("span",{className:T(j.tableTreeViewDetailsToggle),key:"view-details-toggle"},i.createElement(V,{variant:"plain","aria-expanded":s,"aria-label":f||"Show row details",onClick:x=>r&&r(x,n,g,o)},i.createElement("span",{className:`${b.table}__details-toggle-icon`},i.createElement(qa,{"aria-hidden":!0}))))):y}};var ht;(function(e){e.none="",e.grid="grid",e.gridMd="grid-md",e.gridLg="grid-lg",e.gridXl="grid-xl",e.grid2xl="grid-2xl"})(ht||(ht={}));var kt;(function(e){e.compact="compact"})(kt||(kt={}));const Yr=i.createContext({registerSelectableRow:()=>{}}),Qa=e=>{var t,r,{children:a,className:n,variant:o,borders:l=!0,isStickyHeader:s=!1,gridBreakPoint:d=ht.gridMd,"aria-label":c,role:u="grid",innerRef:p,ouiaId:f,ouiaSafe:_=!0,isTreeTable:m=!1,isNested:v=!1,isStriped:g=!1,isExpandable:y=!1,hasNoInset:h=!1,nestedHeaderColumnSpans:x,selectableRowCaptionText:C}=e,R=S(e,["children","className","variant","borders","isStickyHeader","gridBreakPoint","aria-label","role","innerRef","ouiaId","ouiaSafe","isTreeTable","isNested","isStriped","isExpandable","hasNoInset","nestedHeaderColumnSpans","selectableRowCaptionText"]);const A=i.useRef(null),O=p||A,[$,P]=i.useState(!1),[D,B]=i.useState();i.useEffect(()=>{if(document.addEventListener("keydown",I),O&&O.current&&O.current.classList.contains("pf-m-tree-view")){const E=O.current.querySelector("tbody");E&&Pa(Array.from(E.querySelectorAll("button, a, input")))}return function(){document.removeEventListener("keydown",I)}},[O,O.current]),i.useEffect(()=>{B(C?i.createElement("caption",null,C,i.createElement("div",{className:"pf-v5-screen-reader"},"This table has selectable rows. It can be navigated by row using tab, and each row can be selected using space or enter.")):i.createElement("caption",{className:"pf-v5-screen-reader"},"This table has selectable rows. It can be navigated by row using tab, and each row can be selected using space or enter."))},[C]);const L=Mr("Table",f,_),M=(t=Ha.modifiers)===null||t===void 0?void 0:t[jt(d||"").replace(/-?2xl/,"_2xl")],te=`treeView${d.charAt(0).toUpperCase()+d.slice(1)}`,re=(r=j.modifiers)===null||r===void 0?void 0:r[jt(te||"").replace(/-?2xl/,"_2xl")],I=E=>{if(v||!(O&&O.current&&O.current.classList.contains(j.modifiers.treeView))||O&&O.current!==E.target.closest(`.${b.table}:not(.pf-m-nested)`))return;const N=document.activeElement,q=E.key,U=Array.from(O.current.querySelectorAll("tbody tr")).filter(k=>!k.classList.contains("pf-m-disabled")&&!k.hidden);(q==="Space"||q==="Enter")&&(N.click(),E.preventDefault()),Aa(E,U,k=>k===N.closest("tr"),k=>k.querySelectorAll("button:not(:disabled), input:not(:disabled), a:not(:disabled)")[0],["button","input","a"],void 0,!1,!0,!1)},F=()=>{!$&&P(!0)};return i.createElement(Yr.Provider,{value:{registerSelectableRow:F}},i.createElement("table",Object.assign({"aria-label":c,role:u,className:T(n,b.table,m?re:M,b.modifiers[o],!l&&b.modifiers.noBorderRows,s&&b.modifiers.stickyHeader,m&&j.modifiers.treeView,g&&b.modifiers.striped,y&&b.modifiers.expandable,h&&j.modifiers.noInset,v&&"pf-m-nested"),ref:O},m&&{role:"treegrid"},L,R),$&&D,a))},en=i.forwardRef((e,t)=>i.createElement(Qa,Object.assign({},e,{innerRef:t})));en.displayName="Table";const tn=e=>{var{children:t,className:r,isExpanded:a,isEditable:n,isHidden:o=!1,isClickable:l=!1,isRowSelected:s=!1,isStriped:d=!1,isBorderRow:c=!1,innerRef:u,ouiaId:p,ouiaSafe:f=!0,resetOffset:_=!1,onRowClick:m,isSelectable:v,"aria-label":g}=e,y=S(e,["children","className","isExpanded","isEditable","isHidden","isClickable","isRowSelected","isStriped","isBorderRow","innerRef","ouiaId","ouiaSafe","resetOffset","onRowClick","isSelectable","aria-label"]);const h=Mr("TableRow",p,f),[x,C]=i.useState("");let R=null;m&&(R=P=>{(P.key==="Enter"||P.key===" ")&&(m(P),P.preventDefault())});const A=o||a!==void 0&&!a,{registerSelectableRow:O}=i.useContext(Yr);i.useEffect(()=>{v&&!A?(C(`${s?"Row selected":""}`),O()):C(void 0)},[s,v,O,A]);const $=g||x;return i.createElement(i.Fragment,null,i.createElement("tr",Object.assign({className:T(b.tableTr,r,a!==void 0&&b.tableExpandableRow,a&&b.modifiers.expanded,n&&Fa.modifiers.inlineEditable,l&&b.modifiers.clickable,s&&b.modifiers.selected,d&&b.modifiers.striped,c&&b.modifiers.borderRow,_&&b.modifiers.firstCellOffsetReset),hidden:A},l&&{tabIndex:0},{"aria-label":$,ref:u},m&&{onClick:m,onKeyDown:R},h,y),t))},rn=i.forwardRef((e,t)=>i.createElement(tn,Object.assign({},e,{innerRef:t})));rn.displayName="Tr";const an=e=>{var{children:t,className:r,noWrap:a=!1,innerRef:n,hasNestedHeader:o}=e,l=S(e,["children","className","noWrap","innerRef","hasNestedHeader"]);return i.createElement("thead",Object.assign({className:T(b.tableThead,r,a&&b.modifiers.nowrap,o&&b.modifiers.nestedColumnHeader),ref:n},l),t)},nn=i.forwardRef((e,t)=>i.createElement(an,Object.assign({},e,{innerRef:t})));nn.displayName="Thead";const on=e=>{var{children:t,className:r,isExpanded:a,innerRef:n,isEvenStriped:o=!1,isOddStriped:l=!1}=e,s=S(e,["children","className","isExpanded","innerRef","isEvenStriped","isOddStriped"]);return i.createElement("tbody",Object.assign({role:"rowgroup",className:T(b.tableTbody,r,a&&b.modifiers.expanded,l&&b.modifiers.striped,o&&b.modifiers.stripedEven),ref:n},s),t)},sn=i.forwardRef((e,t)=>i.createElement(on,Object.assign({},e,{innerRef:t})));sn.displayName="Tbody";const z={modifiers:{borderRight:"pf-m-border-right",borderLeft:"pf-m-border-left",right:"pf-m-right",inlineEnd:"pf-m-inline-end",left:"pf-m-left",inlineStart:"pf-m-inline-start"},scrollInnerWrapper:"pf-v5-c-scroll-inner-wrapper",scrollOuterWrapper:"pf-v5-c-scroll-outer-wrapper",table:"pf-v5-c-table",tableStickyCell:"pf-v5-c-table__sticky-cell"};function ln(){this.__data__=[],this.size=0}var cn=ln,we,$t;function ve(){if($t)return we;$t=1;function e(t,r){return t===r||t!==t&&r!==r}return we=e,we}var dn=ve();function un(e,t){for(var r=e.length;r--;)if(dn(e[r][0],t))return r;return-1}var me=un,fn=me,pn=Array.prototype,bn=pn.splice;function vn(e){var t=this.__data__,r=fn(t,e);if(r<0)return!1;var a=t.length-1;return r==a?t.pop():bn.call(t,r,1),--this.size,!0}var mn=vn,hn=me;function gn(e){var t=this.__data__,r=hn(t,e);return r<0?void 0:t[r][1]}var _n=gn,yn=me;function Tn(e){return yn(this.__data__,e)>-1}var wn=Tn,xn=me;function On(e,t){var r=this.__data__,a=xn(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}var Cn=On,En=cn,Sn=mn,Rn=_n,Pn=wn,An=Cn;function J(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&r%1==0&&r<=e}return Ke=t,Ke}var ze,cr;function Tt(){if(cr)return ze;cr=1;var e=gt(),t=sa();function r(a){return a!=null&&t(a.length)&&!e(a)}return ze=r,ze}var Uo=Tt(),Ko=se;function zo(e){return Ko(e)&&Uo(e)}var Xo=zo,oe={exports:{}},Xe,dr;function Jo(){if(dr)return Xe;dr=1;function e(){return!1}return Xe=e,Xe}oe.exports;var ur;function la(){return ur||(ur=1,function(e,t){var r=Y(),a=Jo(),n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===n,s=l?r.Buffer:void 0,d=s?s.isBuffer:void 0,c=d||a;e.exports=c}(oe,oe.exports)),oe.exports}var Yo=ge(),Zo=aa(),Qo=se,es="[object Object]",ts=Function.prototype,rs=Object.prototype,ca=ts.toString,as=rs.hasOwnProperty,ns=ca.call(Object);function is(e){if(!Qo(e)||Yo(e)!=es)return!1;var t=Zo(e);if(t===null)return!0;var r=as.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ca.call(r)==ns}var os=is,ss=ge(),ls=sa(),cs=se,ds="[object Arguments]",us="[object Array]",fs="[object Boolean]",ps="[object Date]",bs="[object Error]",vs="[object Function]",ms="[object Map]",hs="[object Number]",gs="[object Object]",_s="[object RegExp]",ys="[object Set]",Ts="[object String]",ws="[object WeakMap]",xs="[object ArrayBuffer]",Os="[object DataView]",Cs="[object Float32Array]",Es="[object Float64Array]",Ss="[object Int8Array]",Rs="[object Int16Array]",Ps="[object Int32Array]",As="[object Uint8Array]",Is="[object Uint8ClampedArray]",js="[object Uint16Array]",ks="[object Uint32Array]",w={};w[Cs]=w[Es]=w[Ss]=w[Rs]=w[Ps]=w[As]=w[Is]=w[js]=w[ks]=!0;w[ds]=w[us]=w[xs]=w[fs]=w[Os]=w[ps]=w[bs]=w[vs]=w[ms]=w[hs]=w[gs]=w[_s]=w[ys]=w[Ts]=w[ws]=!1;function $s(e){return cs(e)&&ls(e.length)&&!!w[ss(e)]}var Ns=$s,Je,fr;function qs(){if(fr)return Je;fr=1;function e(t){return function(r){return t(r)}}return Je=e,Je}var fe={exports:{}};fe.exports;(function(e,t){var r=Zr(),a=t&&!t.nodeType&&t,n=a&&!0&&e&&!e.nodeType&&e,o=n&&n.exports===a,l=o&&r.process,s=function(){try{var d=n&&n.require&&n.require("util").types;return d||l&&l.binding&&l.binding("util")}catch{}}();e.exports=s})(fe,fe.exports);var Ls=fe.exports,Ms=Ns,Bs=qs(),pr=Ls,br=pr&&pr.isTypedArray,Vs=br?Bs(br):Ms,da=Vs;function Ds(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ua=Ds,Ye,vr;function Fs(){if(vr)return Ye;vr=1;var e=yt(),t=ve(),r=Object.prototype,a=r.hasOwnProperty;function n(o,l,s){var d=o[l];(!(a.call(o,l)&&t(d,s))||s===void 0&&!(l in o))&&e(o,l,s)}return Ye=n,Ye}var Ze,mr;function Hs(){if(mr)return Ze;mr=1;var e=Fs(),t=yt();function r(a,n,o,l){var s=!o;o||(o={});for(var d=-1,c=n.length;++d-1&&a%1==0&&a0){if(++o>=e)return arguments[0]}else o=0;return n.apply(void 0,arguments)}}return dt=a,dt}var ut,kr;function Ol(){if(kr)return ut;kr=1;var e=wl(),t=xl(),r=t(e);return ut=r,ut}var ft,$r;function Cl(){if($r)return ft;$r=1;var e=va(),t=yl(),r=Ol();function a(n,o){return r(t(n,o,e),n+"")}return ft=a,ft}var pt,Nr;function El(){if(Nr)return pt;Nr=1;var e=ve(),t=Tt(),r=fa(),a=W;function n(o,l,s){if(!a(s))return!1;var d=typeof l;return(d=="number"?t(s)&&r(l,s.length):d=="string"&&l in s)?e(s[l],o):!1}return pt=n,pt}var Sl=Cl(),Rl=El();function Pl(e){return Sl(function(t,r){var a=-1,n=r.length,o=n>1?r[n-1]:void 0,l=n>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(n--,o):void 0,l&&Rl(r[0],r[1],l)&&(o=n<3?void 0:o,n=1),t=Object(t);++a{if(o==="children")return a&&n?i.cloneElement(a,{children:n}):Object.assign(Object.assign({},n),a);if(o==="className")return T(a,n)}):bt({},t)}const ha={name:"--pf-v5-c-table__sticky-cell--MinWidth",value:"12.5rem",var:"var(--pf-v5-c-table__sticky-cell--MinWidth)"},ga={name:"--pf-v5-c-table__sticky-cell--Left",value:"0",var:"var(--pf-v5-c-table__sticky-cell--Left)"},_a={name:"--pf-v5-c-table__sticky-cell--Right",value:"0",var:"var(--pf-v5-c-table__sticky-cell--Right)"},Nl=e=>{var{children:t,className:r,component:a="th",dataLabel:n,scope:o="col",textCenter:l=!1,sort:s=null,modifier:d,select:c=null,expand:u=null,tooltip:p="",tooltipProps:f,onMouseEnter:_=()=>{},width:m,visibility:v,innerRef:g,info:y,isStickyColumn:h=!1,hasRightBorder:x=!1,hasLeftBorder:C=!1,stickyMinWidth:R="120px",stickyLeftOffset:A,stickyRightOffset:O,isSubheader:$=!1,screenReaderText:P,"aria-label":D}=e,B=S(e,["children","className","component","dataLabel","scope","textCenter","sort","modifier","select","expand","tooltip","tooltipProps","onMouseEnter","width","visibility","innerRef","info","isStickyColumn","hasRightBorder","hasLeftBorder","stickyMinWidth","stickyLeftOffset","stickyRightOffset","isSubheader","screenReaderText","aria-label"]);!t&&!P&&!D&&console.warn("Th: Table headers must have an accessible name. If the Th is intended to be visually empty, pass in screenReaderText. If the Th contains only non-text, interactive content such as a checkbox or expand toggle, pass in an aria-label.");const[L,M]=i.useState(!1),[te,re]=i.useState(!1),I=g||i.createRef(),F=H=>{H.target.offsetWidthzr[H]))():null;let k=E?.children||N?.children||q?.children||t,ae=null;y&&(ae=Ja(y)(k),k=ae.children);const ce=ma(E,N,q,U,le,ae),{children:wt=null,isVisible:xt=null,className:de="",component:Ot=a}=ce,Te=S(ce,["children","isVisible","className","component"]);i.useEffect(()=>{re(I.current.offsetWidthM(!1),"data-label":n,onMouseEnter:p!==null?F:_,scope:a==="th"?o:null,ref:I,"aria-label":D,className:T(b.tableTh,r,l&&b.modifiers.center,$&&b.tableSubhead,h&&z.tableStickyCell,x&&z.modifiers.borderRight,C&&z.modifiers.borderLeft,d&&b.modifiers[d],de)},Te,B,h&&{style:Object.assign({[ha.name]:R||void 0,[ga.name]:A||0,[_a.name]:O||0},B.style)}),k||P&&i.createElement("span",{className:"pf-v5-screen-reader"},P));return p!==null&&(p===""?typeof k=="string":!0)&&!(E||N)&&L?i.createElement(i.Fragment,null,K,i.createElement(X,Object.assign({triggerRef:I,content:p||p===""&&t,isVisible:!0},f))):K},ql=i.forwardRef((e,t)=>i.createElement(Nl,Object.assign({},e,{innerRef:t})));ql.displayName="Th";const Ll=(e,{rowData:t})=>{const{id:r}=t;return{className:"",children:i.createElement(Dr,{id:r})}},Ml=e=>{var{children:t,className:r,isActionCell:a=!1,component:n="td",dataLabel:o,textCenter:l=!1,modifier:s,select:d=null,actions:c=null,expand:u=null,treeRow:p=null,compoundExpand:f=null,noPadding:_,width:m,visibility:v,innerRef:g,favorites:y=null,draggableRow:h=null,tooltip:x="",onMouseEnter:C=()=>{},isStickyColumn:R=!1,hasRightBorder:A=!1,hasLeftBorder:O=!1,stickyMinWidth:$="120px",stickyLeftOffset:P,stickyRightOffset:D}=e,B=S(e,["children","className","isActionCell","component","dataLabel","textCenter","modifier","select","actions","expand","treeRow","compoundExpand","noPadding","width","visibility","innerRef","favorites","draggableRow","tooltip","onMouseEnter","isStickyColumn","hasRightBorder","hasLeftBorder","stickyMinWidth","stickyLeftOffset","stickyRightOffset"]);const[L,M]=i.useState(!1),[te,re]=i.useState(!1),I=g||i.createRef(),F=ne=>{ne.target.offsetWidthzr[ne]))():null,xt=p!==null?Za(p.onCollapse,p.onCheckChange,p.onToggleRowDetails)({title:t},{rowIndex:p.rowIndex,rowData:{props:p.props}}):null,de=ma(E,le,k,ae,ce,wt,N,xt,q),{isVisible:Ot=null,children:Te=null,className:K="",component:Ct=n}=de,Et=S(de,["isVisible","children","className","component"]),H=r&&r.includes(j.tableTreeViewTitleCell)||K&&K.includes(j.tableTreeViewTitleCell);i.useEffect(()=>{re(I.current.offsetWidthM(!1),onMouseEnter:x!==null?F:C,className:T(b.tableTd,r,a&&b.tableAction,l&&b.modifiers.center,_&&b.modifiers.noPadding,R&&z.tableStickyCell,A&&z.modifiers.borderRight,O&&z.modifiers.borderLeft,b.modifiers[s],q&&b.tableDraggable,K),ref:I},Et,B,R&&{style:Object.assign({[ha.name]:$||void 0,[ga.name]:P||0,[_a.name]:D||0},B.style)}),Te||t);return x!==null&&(x===""?typeof t=="string":!0)&&L?i.createElement(i.Fragment,null,St,i.createElement(X,{triggerRef:I,content:x||x===""&&t,isVisible:!0})):St},Bl=i.forwardRef((e,t)=>i.createElement(Ml,Object.assign({},e,{innerRef:t})));Bl.displayName="Td";export{b as $,va as A,vo as B,No as C,ve as D,da as E,ia as F,fa as G,sa as H,Do as I,gt as J,Cl as K,Xo as L,Tl as M,El as N,yt as O,Al as P,gl as Q,Ol as R,yl as S,Ur as T,en as U,nn as V,rn as W,ql as X,sn as Y,Bl as Z,_t as _,na as a,be as a0,kt as a1,Br as a2,Ws as b,Tt as c,Hs as d,pa as e,aa as f,oa as g,Y as h,ge as i,ea as j,zn as k,qo as l,Qr as m,Bo as n,se as o,qs as p,Ls as q,Fo as r,Fs as s,$o as t,Ho as u,la as v,Ro as w,Vo as x,W as y,ko as z};
//# sourceMappingURL=Td-D2hVFK0Z.js.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy