@ansible/ansible-ui-framework 2.4.304 → 2.4.305

Sign up to get free protection for your applications and to get access to all the features.
package/index.umd.cjs CHANGED
@@ -314,7 +314,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
314
314
  row-gap: 16px;
315
315
  justify-content: end;
316
316
  }
317
- `;function QH(n){const{itemCount:e,page:t,perPage:i,setPage:r,setPerPage:s,toolbarFilters:o,selectedItems:a,filterState:l,setFilterState:c,openColumnModal:u,bottomBorder:d,sort:h,setSort:f,sortDirection:g,setSortDirection:m,sortOptions:p,clearAllFilters:v}=n,_=T.useCallback(()=>{v?v():c&&c({})},[c,v]),b=ms("md"),{viewType:y,setViewType:w}=n;let{toolbarActions:k}=n;k=k??[];const x=T.useCallback((O,B)=>r?r(B):null,[r]),D=T.useCallback((O,B)=>s?s(B):null,[s]),E=o!==void 0,M=k!==void 0&&k.length>0,N=n.showSelect===!0||a!==void 0&&k&&k.find(O=>"selection"in O&&O.selection===ei.Multiple);return N||E||M?e===void 0?L.jsx(R.Toolbar,{className:"border-bottom dark-2",style:{paddingBottom:b?void 0:8,paddingTop:b?void 0:8,zIndex:400},children:L.jsx(XH,{children:L.jsx(R.ToolbarItem,{style:{width:"100%"},children:L.jsx(R.Skeleton,{height:"36px"})})})}):L.jsx(R.Toolbar,{clearAllFilters:_,className:"dark-2 page-table-toolbar",style:{paddingBottom:b?void 0:8,paddingTop:b?void 0:8,borderBottom:d?"thin solid var(--pf-global--BorderColor--100)":void 0},inset:{default:"insetMd",sm:"insetMd",md:"insetMd",lg:"insetMd",xl:"insetLg","2xl":"insetLg"},children:L.jsxs(XH,{children:[N&&L.jsx(R.ToolbarGroup,{children:L.jsx(R.ToolbarItem,{variant:"bulk-select",children:L.jsx(bH,{...n})})}),l&&c&&L.jsx(YH,{toolbarFilters:o,filterState:l,setFilterState:c}),L.jsx(R.ToolbarGroup,{variant:"button-group",children:L.jsx(Rf,{actions:k,selectedItems:a,wrapper:R.ToolbarItem})}),L.jsxs(G3e,{children:[L.jsx(z3e,{sort:h,setSort:f,sortDirection:g,setSortDirection:m,sortOptions:p}),y&&w&&L.jsx(K3e,{disableTableView:n.disableTableView,disableListView:n.disableListView,disableCardView:n.disableCardView,viewType:y,setViewType:w,openColumnModal:u}),!n.disablePagination&&L.jsx(R.ToolbarItem,{visibility:{default:"hidden","2xl":"visible"},style:{marginLeft:24},children:L.jsx(R.Pagination,{variant:R.PaginationVariant.top,isCompact:!0,itemCount:e,perPage:i,page:t,onSetPage:x,onPerPageSelect:D,style:{marginTop:-8,marginBottom:-8}})})]})]})}):L.jsx(T.Fragment,{})}function Y3e(n){const{t:e}=Us(),t=e("Something went wrong"),i=e("Please refresh the page by using the button below."),r=e("Refresh"),{titleProp:s,message:o}=n;return L.jsxs(R.EmptyState,{variant:R.EmptyStateVariant.small,style:{paddingTop:48},children:[L.jsx(R.EmptyStateIcon,{icon:yt.ExclamationCircleIcon,color:"var(--pf-global--danger-color--100)"}),L.jsx(R.Title,{headingLevel:"h2",size:"lg",children:s||t}),L.jsx(R.EmptyStateBody,{children:o}),L.jsx(R.EmptyStateBody,{children:i}),L.jsx(R.Button,{variant:"primary",onClick:()=>window.location.reload(),children:r})]})}function Z3e(n){const{title:e,description:t,icon:i,button:r,footNote:s,image:o,variant:a,style:l}=n;return L.jsxs(R.EmptyState,{variant:a||R.EmptyStateVariant.full,style:l,children:[i&&L.jsx(R.EmptyStateIcon,{icon:i}),L.jsx(R.Title,{headingLevel:"h4",size:"lg",children:e}),L.jsx(R.EmptyStateBody,{children:t}),r&&L.jsx(R.EmptyStatePrimary,{children:r}),o&&L.jsxs(L.Fragment,{children:[" ",L.jsx("br",{})," ",L.jsx(R.EmptyStateBody,{children:o})]}),s&&L.jsx(R.EmptyStateBody,{children:s})]})}function X3e(n){const{button:e,description:t,title:i,variant:r}=n;return L.jsx(Z3e,{icon:e?yt.PlusCircleIcon:yt.CubesIcon,title:i,description:t,button:e,variant:r,style:{paddingTop:"48px"}})}function wT(n,e,t){var i,r,s,o,a;e==null&&(e=100);function l(){var u=Date.now()-o;u<e&&u>=0?i=setTimeout(l,e-u):(i=null,t||(a=n.apply(s,r),s=r=null))}var c=function(){s=this,r=arguments,o=Date.now();var u=t&&!i;return i||(i=setTimeout(l,e)),u&&(a=n.apply(s,r),s=r=null),a};return c.clear=function(){i&&(clearTimeout(i),i=null)},c.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},c}wT.debounce=wT;var Q3e=wT;const J3e=St(Q3e);function e7e(n,e,t){const{selectedItems:i,selectItem:r,unselectItem:s,isSelected:o,selectItems:a,unselectAll:l,allSelected:c}=ST(n,e),{sorted:u,sort:d,setSort:h}=xT(n),{filtered:f,setFilterFn:g}=LT(u,e),{searched:m,search:p,setSearch:v,setSearchFn:_}=t7e(f,e,t==null?void 0:t.search),{paged:b,page:y,setPage:w,perPage:k,setPerPage:x}=r_(m),D=T.useCallback(()=>a(b),[b,a]),E=T.useCallback(()=>a(m),[m,a]);return T.useMemo(()=>({allSelected:c,filtered:f,isSelected:o,page:y,paged:b,perPage:k,search:p,searched:m,selectAll:E,selectItem:r,selectPage:D,selectedItems:i,setFilterFn:g,setPage:w,setPerPage:x,setSearch:v,setSearchFn:_,setSort:h,sort:d,sorted:u,unselectAll:l,unselectItem:s}),[c,f,o,y,b,k,p,m,E,r,D,i,g,w,x,v,_,h,d,u,l,s])}function ST(n,e,t){const[i,r]=T.useState(()=>t?t.reduce((g,m)=>(g[e(m)]=m,g),{}):{});T.useEffect(()=>{r(g=>{let m=!1;return n.forEach(p=>{const v=e(p);g[v]&&g[v]!==p&&(m=!0,g[v]=p)}),m?{...g}:g})},[n,e]);const s=T.useCallback(g=>{r(m=>{const p=e(g);return m[p]!==g&&(m={...m},m[p]=g),m})},[e]),o=T.useCallback(g=>{r(m=>{const p=e(g);return m[p]&&(m={...m},delete m[p]),m})},[e]),a=T.useCallback(g=>{const m=e(g);return i[m]!==void 0},[e,i]),l=T.useCallback(g=>{r(m=>{m={...m};for(const p of g){const v=e(p);m[v]=p}return m})},[e]),c=T.useCallback(()=>l(n),[n,l]),u=T.useCallback(g=>{for(const m of g)o(m)},[o]),d=T.useCallback(()=>{r(g=>Object.keys(g).length>0?{}:g)},[]),h=T.useMemo(()=>Object.values(i),[i]),f=T.useMemo(()=>h.length===n.length,[n.length,h.length]);return T.useMemo(()=>({selectedItems:h,selectItem:s,unselectItem:o,isSelected:a,selectItems:l,selectAll:c,unselectAll:d,allSelected:f,keyFn:e,unselectItems:u}),[f,a,e,c,s,l,h,d,o,u])}function JH(n,e){const[t,i]=T.useState({});T.useEffect(()=>{i(f=>{let g=!1;const m=n?n.reduce((_,b)=>{const y=e(b);return _[y]=b,f[y]&&f[y]!==b&&(g=!0,f[y]=b),_},{}):{},p={};for(const _ in f)m[_]||(p[_]=!0);const v=Object.keys(p);if(v.length){g=!0;for(const _ of v)delete f[_]}return g?{...f}:f})},[n,e]);const r=T.useCallback(f=>{i(g=>{const m=e(f);return g[m]!==f&&(g={...g},g[m]=f),g})},[e]),s=T.useCallback(f=>{i(g=>{const m=e(f);return g[m]&&(g={...g},delete g[m]),g})},[e]),o=T.useCallback(f=>{for(const g of f)s(g)},[s]),a=T.useCallback(f=>{const g=e(f);return t[g]!==void 0},[e,t]),l=T.useCallback(f=>{i(g=>{g={...g};for(const m of f){const p=e(m);g[p]=m}return g})},[e]),c=T.useCallback(()=>{l(n??[])},[n,l]),u=T.useCallback(()=>{i(f=>Object.keys(f).length>0?{}:f)},[]),d=T.useMemo(()=>Object.values(t),[t]),h=T.useMemo(()=>d.length===(n==null?void 0:n.length),[n,d.length]);return T.useMemo(()=>({selectedItems:d,selectItem:r,unselectItem:s,isSelected:a,selectItems:l,selectAll:c,unselectAll:u,allSelected:h,keyFn:e,unselectItems:o}),[h,a,e,c,r,l,d,u,s,o])}function xT(n){const[e,t]=T.useState(),{direction:i,sortFn:r}=e??{},s=T.useMemo(()=>n?r?i==="asc"?[...n.sort(r)]:[...n.sort(r).reverse()]:n:[],[i,n,r]);return T.useMemo(()=>({sorted:s,sort:e,setSort:t}),[e,s])}function LT(n,e){const t=T.useRef({map:{}}),[i,r]=T.useState(),s=T.useCallback(c=>r(()=>c),[]),[o,a]=T.useState([]);T.useEffect(()=>{t.current.map={}},[i]);const l=T.useCallback(c=>{const u=e(c);let d=t.current.map[u];return d?d.item!==c&&(d.item=c,d.passes=i?i(c):!0):(d={item:c,passes:i?i(c):!0},t.current.map[u]=d),d.passes},[i,e]);return T.useEffect(()=>{a(i?n.filter(l):n)},[n,i,l]),T.useMemo(function(){return{filtered:o,setFilterFn:s}},[o,s])}function t7e(n,e,t){const i=T.useRef({map:{}}),[r,s]=T.useState(),o=T.useCallback(f=>s(()=>f),[]),[a,l]=T.useState([]),[c,u]=T.useState(t??""),d=T.useCallback(J3e(f=>u(f),200),[]);T.useEffect(()=>{i.current.map={}},[c,r]);const h=T.useCallback(f=>{const g=e(f);let m=i.current.map[g];return m?m.item!==f&&(m.item=f,m.score=r?r(f,c):0):(m={item:f,score:r?r(f,c):0},i.current.map[g]=m),m},[e,r,c]);return T.useEffect(()=>{l(r&&c?n.map(h).filter(f=>f.score<.5).sort((f,g)=>f.score-g.score).map(f=>f.item):n)},[c,n,r,h]),T.useMemo(function(){return{searched:a,search:c,setSearch:d,setSearchFn:o}},[a,c,d,o])}function r_(n){const[e,t]=T.useState([]),[i,r]=T.useState(1),[s,o]=T.useState(10);return T.useEffect(()=>{t(a=>{const l=n.slice((i-1)*s,i*s);if(a.length!==l.length)return l;let c=0;for(const u of l)if(a[c++]!==u)return l;return a})},[i,s,n]),T.useEffect(()=>{i>Math.ceil(n.length/s)&&r(1)},[i,s,n.length]),T.useMemo(()=>({paged:e,page:i,setPage:r,perPage:s,setPerPage:o}),[i,e,s])}const iut="",kT={button:"pf-c-button",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",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",expanded:"pf-m-expanded",hoverable:"pf-m-hoverable",selected:"pf-m-selected",firstCellOffsetReset:"pf-m-first-cell-offset-reset",dragOver:"pf-m-drag-over",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-c-table",tableAction:"pf-c-table__action",tableButton:"pf-c-table__button",tableButtonContent:"pf-c-table__button-content",tableCheck:"pf-c-table__check",tableColumnHelp:"pf-c-table__column-help",tableColumnHelpAction:"pf-c-table__column-help-action",tableCompoundExpansionToggle:"pf-c-table__compound-expansion-toggle",tableControlRow:"pf-c-table__control-row",tableDraggable:"pf-c-table__draggable",tableExpandableRow:"pf-c-table__expandable-row",tableExpandableRowContent:"pf-c-table__expandable-row-content",tableFavorite:"pf-c-table__favorite",tableIcon:"pf-c-table__icon",tableIconInline:"pf-c-table__icon-inline",tableInlineEditAction:"pf-c-table__inline-edit-action",tableSort:"pf-c-table__sort",tableSortIndicator:"pf-c-table__sort-indicator",tableSubhead:"pf-c-table__subhead",tableText:"pf-c-table__text",tableToggle:"pf-c-table__toggle",tableToggleIcon:"pf-c-table__toggle-icon",themeDark:"pf-theme-dark"};function n7e(n){const{t:e}=Us(),{columns:t,keyFn:i,items:r,setItems:s,isSelected:o,selectItem:a,unselectItem:l,allSelected:c,selectAll:u,unselectAll:d,hideColumnHeaders:h,isSelectableWithCheckbox:f}=n,[g,m]=T.useState(null),[p,v]=T.useState(null),[_,b]=T.useState(!1),y=T.useRef(null),w=B=>{if(y.current){const W=y.current.getBoundingClientRect();return B.clientX>W.x&&B.clientX<W.x+W.width&&B.clientY>W.y&&B.clientY<W.y+W.height}return!1},k=B=>{w(B)||x()},x=()=>{y.current&&Array.from(y.current.children).forEach(B=>{B.classList.remove(kT.modifiers.ghostRow),B.setAttribute("aria-pressed","false")}),v(null),m(null),b(!1)},D=B=>{B.preventDefault();const W=B.target.closest("tr");if(!W||!(y.current&&y.current.contains(W))||W.id===p)return null;{const J=W.id,re=Array.from(y.current.children).findIndex(se=>se.id===J);if(re!==g&&p){const se=E([...r],p,re);s(se)}}return null},E=(B,W,J)=>{const re=B.findIndex(ie=>i(ie)===W);if(re===J)return B;const se=B.splice(re,1);return B.splice(J,0,se[0]),B},M=B=>{w(B)||m(null)},N=B=>{const W=B.target;W.classList.remove(kT.modifiers.ghostRow),W.setAttribute("aria-pressed","false"),v(null),m(null),b(!1)},I=B=>{if(y.current){B.dataTransfer.effectAllowed="move";const W=B.currentTarget.id,J=Array.from(y.current.children).findIndex(re=>re.id===B.currentTarget.id);B.currentTarget.setAttribute("aria-pressed","true"),v(W),m(J)}},O=T.useCallback(B=>{const W=r.findIndex(re=>i(re)===i(B)),J=[...r];J[W]=B,s(J)},[r,s,i]);return L.jsxs(Wt.TableComposable,{"aria-label":e("Table with draggable rows"),className:_?kT.modifiers.dragOver:"",variant:"compact",children:[!h&&L.jsx(Wt.Thead,{children:L.jsxs(Wt.Tr,{children:[L.jsx(Wt.Th,{}),f&&L.jsx(Wt.Th,{select:{onSelect:(B,W)=>{W?u():d()},isSelected:c}}),t.map((B,W)=>L.jsx(Wt.Th,{children:B.header},W))]})}),L.jsx(Wt.Tbody,{ref:y,onDragOver:D,onDragLeave:M,children:r.map((B,W)=>{const J=i(B);return L.jsxs(Wt.Tr,{id:J.toString(),draggable:!0,onDrop:k,onDragEnd:N,onDragStart:I,children:[L.jsx(Wt.Td,{draggableRow:{id:`draggable-row-${J.toString()}`}}),f&&L.jsx(Wt.Td,{select:{rowIndex:W,variant:"checkbox",onSelect:(re,se)=>{se?a(B):l(B)},isSelected:o(B)}}),t.map(re=>L.jsx(Wt.Td,{children:re.cell(B,O)},re.header))]},J)})})]})}function i7e(n){const[e,t]=Oa(),[i]=T.useState(()=>n.keyFn),[r]=T.useState(()=>n.isSelected),[s]=T.useState(()=>n.setSelected),[o]=T.useState(()=>n.saveFn),[a]=T.useState(()=>n.loadFn),[l,c]=T.useState(()=>{try{const m=localStorage.getItem(n.id);if(typeof m=="string"){const p=JSON.parse(m);if(Array.isArray(p)&&p.every(v=>typeof v=="object"))if(a){const v=[...n.items];return a(v,p),v}else return p}return n.items}catch{return n.items}});T.useEffect(()=>{c(m=>{const p=[...m];for(const v of n.items){const _=i(v),b=m.find(y=>i(y)===_);b?Object.assign(b,v):p.push(v)}return p})},[i,a,n.items,o]);const u=T.useCallback(m=>{c(m),o?localStorage.setItem(n.id,JSON.stringify(o(m))):localStorage.setItem(n.id,JSON.stringify(m))},[n.id,o,c]),d=()=>t(L.jsx(r7e,{...n,keyFn:i,items:l,defaultSelectedItems:l.filter(m=>r==null?void 0:r(m)),onApplyChanges:u})),h=T.useMemo(()=>l.filter(m=>r?r(m):!0),[r,l]),f=T.useCallback(()=>s?m=>{s(m,!0),c(p=>[...p])}:()=>{alert("No setSelected callback provided")},[s]),g=T.useCallback(()=>s?m=>{s(m,!1),c(p=>[...p])}:()=>{alert("No setSelected callback provided")},[s]);return{openModal:d,items:h,isSelected:r||(()=>!1),selectItem:f,unselectItem:g}}function r7e(n){const{t:e}=Us(),{title:t,description:i,columns:r,onApplyChanges:s}=n,[o]=T.useState(()=>n.keyFn),[a,l]=Oa(),c=()=>l(void 0),[u,d]=T.useState(()=>n.items),{selectedItems:h,isSelected:f,selectItem:g,unselectItem:m,allSelected:p,selectAll:v,unselectAll:_}=ST(u,o,n.defaultSelectedItems),b=()=>{var y,w;for(const k of u)h.includes(k)?(w=n.setSelected)==null||w.call(n,k,!0):(y=n.setSelected)==null||y.call(n,k,!1);s(u,h),l(void 0)};return L.jsxs(R.Modal,{title:t,"aria-label":t,description:L.jsx("div",{style:{marginBottom:16},children:i}),variant:n.variant??R.ModalVariant.medium,isOpen:!0,onClose:c,actions:[L.jsx(R.Button,{variant:"primary",onClick:b,children:e`Apply`},"apply"),L.jsx(R.Button,{variant:"link",onClick:c,children:e`Cancel`},"cancel")],hasNoBodyWrapper:!0,children:[L.jsx(R.Divider,{}),L.jsx(R.ModalBoxBody,{style:{padding:0},children:L.jsx(n7e,{keyFn:o,items:u,setItems:d,columns:r,isSelected:f,selectItem:g,unselectItem:m,allSelected:p,selectAll:v,unselectAll:_,hideColumnHeaders:n.hideColumnHeaders,isSelectableWithCheckbox:n.isSelected!==void 0&&n.setSelected!==void 0})}),L.jsx(R.Divider,{})]})}function s7e(n,e,t,i,r){const{t:s}=Us(),o=T.useMemo(()=>{const d=[{header:s("Column Name"),cell:h=>h.header}];return t||d.push({header:s("Table View"),cell:(h,f)=>L.jsx(oh,{value:h.table??"",onSelect:g=>{switch(g){case"":f({...h,table:void 0});break;case fu.Description:case fu.Expanded:case fu.Hidden:f({...h,table:g});break}},placeholder:s("Column"),options:[{value:"",label:s("Column"),description:s("Show the column in the table.")},{value:fu.Description,label:s("Description"),description:s("Show the column when the item is expanded as a full width description.")},{value:fu.Expanded,label:s("Expanded"),description:s("Show the column when the item is expandedas a detail.")},{value:fu.Hidden,label:s("Hidden"),description:s("Hide the column.")}]})}),i||d.push({header:s("List View"),cell:(h,f)=>L.jsx(oh,{value:h.list??"",onSelect:g=>{switch(g){case"":f({...h,list:void 0});break;case"name":case"subtitle":case"description":case"primary":case"secondary":case"hidden":f({...h,list:g});break}},options:[{value:"name",label:s("Name"),description:s("Show the column as the name of the list item.")},{value:"subtitle",label:s("Subtitle"),description:s("Show the column as the subtitle under the name on the list.")},{value:"description",label:s("Description"),description:s("Show the column as the list item description.")},{value:"",label:s("Left side"),description:s("Show the column on the left side of the list.")},{value:"primary",label:s("Left side"),description:s("Show the column on the left side of the list.")},{value:"secondary",label:s("Right side"),description:s("Show the column on the right side of the list.")},{value:"hidden",label:s("Hidden"),description:s("Hide the column on the list.")}],placeholder:s("Left side")})}),r||d.push({header:s("Card View"),cell:(h,f)=>L.jsx(oh,{value:h.card??"",onSelect:g=>{switch(g){case"":f({...h,card:void 0});break;case"name":case"subtitle":case"description":case"hidden":f({...h,card:g});break}},placeholder:s("Detail"),options:[{value:"name",label:s("Name"),description:s("Show the column as the name on the card.")},{value:"subtitle",label:s("Subtitle"),description:s("Show the column as the subtitle under the name on the card.")},{value:"description",label:s("Description"),description:s("Show the column as the card description.")},{value:"",label:s("Detail"),description:s("Show the column one of the details on the card.")},{value:"hidden",label:s("Hidden"),description:s("Hide the column on the card.")}]})}),d},[r,i,t,s]),a=T.useCallback((d,h)=>{const f=h;for(const g of d)if(g.id){const m=f.find(p=>p.id===g.id);m&&(g.table=m.table,g.list=m.list,g.card=m.card)}else{const m=f.find(p=>p.header===g.header);m&&(g.table=m.table,g.list=m.list,g.card=m.card)}d.sort((g,m)=>{if(g.id&&m.id){const p=f.findIndex(_=>_.id===g.id),v=f.findIndex(_=>_.id===m.id);return p-v}else{const p=f.findIndex(_=>_.header===g.header),v=f.findIndex(_=>_.header===m.header);return p-v}})},[]),l=T.useCallback(d=>d.map(h=>{const{id:f,header:g,table:m,list:p,card:v}=h;return{id:f,header:g,table:m,list:p,card:v}}),[]),{openModal:c,items:u}=i7e({id:n,title:s("Manage Columns"),description:s("Manage the order, placement, and format of columns."),items:e,keyFn:d=>d.id??d.header,columns:o,loadFn:a,saveFn:l});return{openColumnManagement:c,managedColumns:u}}function o7e(n){const{setPage:e,setPerPage:t}=n,i=T.useCallback((o,a)=>e(a),[e]),r=T.useCallback((o,a)=>t(a),[t]),s=!ms("md");return L.jsx(R.Pagination,{variant:R.PaginationVariant.bottom,itemCount:n.itemCount,page:n.page,perPage:n.perPage,onSetPage:i,onPerPageSelect:r,style:{...n.style,boxShadow:"none",zIndex:400,paddingTop:s?4:6,paddingBottom:s?4:6,borderTop:n.topBorder?"thin solid var(--pf-global--BorderColor--100)":void 0},className:"dark-2"})}const rut="";function a7e(n){const e=n.size??350,t=T.useRef(null),[i,r]=T.useState("1fr"),s=T.useCallback(a=>{let l=Math.min(n.maxColumns??12,Math.max(Math.floor(a/e),1));l<1&&(l=1),r(()=>new Array(l).fill("1fr").join(" "))},[n.maxColumns,e]);Zf(t,a=>s(a.contentRect.width)),T.useLayoutEffect(()=>{var a;s(((a=t.current)==null?void 0:a.clientWidth)??0)},[s]);const o=16;return L.jsx("div",{ref:t,style:{display:"grid",gridAutoRows:"1fr",gridTemplateColumns:i,gap:o},children:n.children})}const l7e=gn.small`
317
+ `;function QH(n){const{itemCount:e,page:t,perPage:i,setPage:r,setPerPage:s,toolbarFilters:o,selectedItems:a,filterState:l,setFilterState:c,openColumnModal:u,bottomBorder:d,sort:h,setSort:f,sortDirection:g,setSortDirection:m,sortOptions:p,clearAllFilters:v}=n,_=T.useCallback(()=>{v?v():c&&c({})},[c,v]),b=ms("md"),{viewType:y,setViewType:w}=n;let{toolbarActions:k}=n;k=k??[];const x=T.useCallback((O,B)=>r?r(B):null,[r]),D=T.useCallback((O,B)=>s?s(B):null,[s]),E=o!==void 0,M=k!==void 0&&k.length>0,N=n.showSelect===!0||a!==void 0&&k&&k.find(O=>"selection"in O&&O.selection===ei.Multiple);return N||E||M?e===void 0?L.jsx(R.Toolbar,{className:"border-bottom dark-2",style:{paddingBottom:b?void 0:8,paddingTop:b?void 0:8,zIndex:400},children:L.jsx(XH,{children:L.jsx(R.ToolbarItem,{style:{width:"100%"},children:L.jsx(R.Skeleton,{height:"36px"})})})}):L.jsx(R.Toolbar,{clearAllFilters:_,className:"dark-2 page-table-toolbar",style:{paddingBottom:b?void 0:8,paddingTop:b?void 0:8,borderBottom:d?"thin solid var(--pf-global--BorderColor--100)":void 0},inset:{default:"insetMd",sm:"insetMd",md:"insetMd",lg:"insetMd",xl:"insetLg","2xl":"insetLg"},children:L.jsxs(XH,{children:[N&&L.jsx(R.ToolbarGroup,{children:L.jsx(R.ToolbarItem,{variant:"bulk-select",children:L.jsx(bH,{...n})})}),l&&c&&L.jsx(YH,{toolbarFilters:o,filterState:l,setFilterState:c}),L.jsx(R.ToolbarGroup,{variant:"button-group",children:L.jsx(Rf,{actions:k,selectedItems:a,wrapper:R.ToolbarItem})}),L.jsxs(G3e,{children:[L.jsx(z3e,{sort:h,setSort:f,sortDirection:g,setSortDirection:m,sortOptions:p}),y&&w&&L.jsx(K3e,{disableTableView:n.disableTableView,disableListView:n.disableListView,disableCardView:n.disableCardView,viewType:y,setViewType:w,openColumnModal:u}),!n.disablePagination&&L.jsx(R.ToolbarItem,{visibility:{default:"hidden","2xl":"visible"},style:{marginLeft:24},children:L.jsx(R.Pagination,{variant:R.PaginationVariant.top,isCompact:!0,itemCount:e,perPage:i,page:t,onSetPage:x,onPerPageSelect:D,style:{marginTop:-8,marginBottom:-8}})})]})]})}):L.jsx(T.Fragment,{})}function Y3e(n){const{t:e}=Us(),t=e("Something went wrong"),i=e("Please refresh the page by using the button below."),r=e("Refresh"),{titleProp:s,message:o}=n;return L.jsxs(R.EmptyState,{variant:R.EmptyStateVariant.small,style:{paddingTop:48},children:[L.jsx(R.EmptyStateIcon,{icon:yt.ExclamationCircleIcon,color:"var(--pf-global--danger-color--100)"}),L.jsx(R.Title,{headingLevel:"h2",size:"lg",children:s||t}),L.jsx(R.EmptyStateBody,{children:o}),L.jsx(R.EmptyStateBody,{children:i}),L.jsx(R.Button,{variant:"primary",onClick:()=>window.location.reload(),children:r})]})}function Z3e(n){const{title:e,description:t,icon:i,button:r,footNote:s,image:o,variant:a,style:l}=n;return L.jsxs(R.EmptyState,{variant:a||R.EmptyStateVariant.full,style:l,children:[i&&L.jsx(R.EmptyStateIcon,{icon:i}),L.jsx(R.Title,{headingLevel:"h4",size:"lg",children:e}),L.jsx(R.EmptyStateBody,{children:t}),r&&L.jsx(R.EmptyStatePrimary,{children:r}),o&&L.jsxs(L.Fragment,{children:[" ",L.jsx("br",{})," ",L.jsx(R.EmptyStateBody,{children:o})]}),s&&L.jsx(R.EmptyStateBody,{children:s})]})}function X3e(n){const{button:e,description:t,title:i,variant:r}=n;return L.jsx(Z3e,{icon:e?yt.PlusCircleIcon:yt.CubesIcon,title:i,description:t,button:e,variant:r,style:{paddingTop:"48px"}})}function wT(n,e,t){var i,r,s,o,a;e==null&&(e=100);function l(){var u=Date.now()-o;u<e&&u>=0?i=setTimeout(l,e-u):(i=null,t||(a=n.apply(s,r),s=r=null))}var c=function(){s=this,r=arguments,o=Date.now();var u=t&&!i;return i||(i=setTimeout(l,e)),u&&(a=n.apply(s,r),s=r=null),a};return c.clear=function(){i&&(clearTimeout(i),i=null)},c.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},c}wT.debounce=wT;var Q3e=wT;const J3e=St(Q3e);function e7e(n,e,t){const{selectedItems:i,selectItem:r,unselectItem:s,isSelected:o,selectItems:a,unselectAll:l,allSelected:c}=ST(n,e),{sorted:u,sort:d,setSort:h}=xT(n),{filtered:f,setFilterFn:g}=LT(u,e),{searched:m,search:p,setSearch:v,setSearchFn:_}=t7e(f,e,t==null?void 0:t.search),{paged:b,page:y,setPage:w,perPage:k,setPerPage:x}=r_(m),D=T.useCallback(()=>a(b),[b,a]),E=T.useCallback(()=>a(m),[m,a]);return T.useMemo(()=>({allSelected:c,filtered:f,isSelected:o,page:y,paged:b,perPage:k,search:p,searched:m,selectAll:E,selectItem:r,selectPage:D,selectedItems:i,setFilterFn:g,setPage:w,setPerPage:x,setSearch:v,setSearchFn:_,setSort:h,sort:d,sorted:u,unselectAll:l,unselectItem:s}),[c,f,o,y,b,k,p,m,E,r,D,i,g,w,x,v,_,h,d,u,l,s])}function ST(n,e,t){const[i,r]=T.useState(()=>t?t.reduce((g,m)=>(g[e(m)]=m,g),{}):{});T.useEffect(()=>{r(g=>{let m=!1;return n.forEach(p=>{const v=e(p);g[v]&&g[v]!==p&&(m=!0,g[v]=p)}),m?{...g}:g})},[n,e]);const s=T.useCallback(g=>{r(m=>{const p=e(g);return m[p]!==g&&(m={...m},m[p]=g),m})},[e]),o=T.useCallback(g=>{r(m=>{const p=e(g);return m[p]&&(m={...m},delete m[p]),m})},[e]),a=T.useCallback(g=>{const m=e(g);return i[m]!==void 0},[e,i]),l=T.useCallback(g=>{r(m=>{m={...m};for(const p of g){const v=e(p);m[v]=p}return m})},[e]),c=T.useCallback(()=>l(n),[n,l]),u=T.useCallback(g=>{for(const m of g)o(m)},[o]),d=T.useCallback(()=>{r(g=>Object.keys(g).length>0?{}:g)},[]),h=T.useMemo(()=>Object.values(i),[i]),f=T.useMemo(()=>h.length===n.length,[n.length,h.length]);return T.useMemo(()=>({selectedItems:h,selectItem:s,unselectItem:o,isSelected:a,selectItems:l,selectAll:c,unselectAll:d,allSelected:f,keyFn:e,unselectItems:u}),[f,a,e,c,s,l,h,d,o,u])}function JH(n,e){const[t,i]=T.useState({});T.useEffect(()=>{i(f=>{let g=!1;const m=n?n.reduce((_,b)=>{const y=e(b);return _[y]=b,f[y]&&f[y]!==b&&(g=!0,f[y]=b),_},{}):{},p={};for(const _ in f)m[_]||(p[_]=!0);const v=Object.keys(p);if(v.length){g=!0;for(const _ of v)delete f[_]}return g?{...f}:f})},[n,e]);const r=T.useCallback(f=>{i(g=>{const m=e(f);return g[m]!==f&&(g={...g},g[m]=f),g})},[e]),s=T.useCallback(f=>{i(g=>{const m=e(f);return g[m]&&(g={...g},delete g[m]),g})},[e]),o=T.useCallback(f=>{for(const g of f)s(g)},[s]),a=T.useCallback(f=>{const g=e(f);return t[g]!==void 0},[e,t]),l=T.useCallback(f=>{i(g=>{g={...g};for(const m of f){const p=e(m);g[p]=m}return g})},[e]),c=T.useCallback(()=>{l(n??[])},[n,l]),u=T.useCallback(()=>{i(f=>Object.keys(f).length>0?{}:f)},[]),d=T.useMemo(()=>Object.values(t),[t]),h=T.useMemo(()=>d.length===(n==null?void 0:n.length),[n,d.length]);return T.useMemo(()=>({selectedItems:d,selectItem:r,unselectItem:s,isSelected:a,selectItems:l,selectAll:c,unselectAll:u,allSelected:h,keyFn:e,unselectItems:o}),[h,a,e,c,r,l,d,u,s,o])}function xT(n){const[e,t]=T.useState(),{direction:i,sortFn:r}=e??{},s=T.useMemo(()=>n?r?i==="asc"?[...n.sort(r)]:[...n.sort(r).reverse()]:n:[],[i,n,r]);return T.useMemo(()=>({sorted:s,sort:e,setSort:t}),[e,s])}function LT(n,e){const t=T.useRef({map:{}}),[i,r]=T.useState(),s=T.useCallback(c=>r(()=>c),[]),[o,a]=T.useState([]);T.useEffect(()=>{t.current.map={}},[i]);const l=T.useCallback(c=>{const u=e(c);let d=t.current.map[u];return d?d.item!==c&&(d.item=c,d.passes=i?i(c):!0):(d={item:c,passes:i?i(c):!0},t.current.map[u]=d),d.passes},[i,e]);return T.useEffect(()=>{a(i?n.filter(l):n)},[n,i,l]),T.useMemo(function(){return{filtered:o,setFilterFn:s}},[o,s])}function t7e(n,e,t){const i=T.useRef({map:{}}),[r,s]=T.useState(),o=T.useCallback(f=>s(()=>f),[]),[a,l]=T.useState([]),[c,u]=T.useState(t??""),d=T.useCallback(J3e(f=>u(f),200),[]);T.useEffect(()=>{i.current.map={}},[c,r]);const h=T.useCallback(f=>{const g=e(f);let m=i.current.map[g];return m?m.item!==f&&(m.item=f,m.score=r?r(f,c):0):(m={item:f,score:r?r(f,c):0},i.current.map[g]=m),m},[e,r,c]);return T.useEffect(()=>{l(r&&c?n.map(h).filter(f=>f.score<.5).sort((f,g)=>f.score-g.score).map(f=>f.item):n)},[c,n,r,h]),T.useMemo(function(){return{searched:a,search:c,setSearch:d,setSearchFn:o}},[a,c,d,o])}function r_(n){const[e,t]=T.useState([]),[i,r]=T.useState(1),[s,o]=T.useState(10);return T.useEffect(()=>{t(a=>{const l=n.slice((i-1)*s,i*s);if(a.length!==l.length)return l;let c=0;for(const u of l)if(a[c++]!==u)return l;return a})},[i,s,n]),T.useEffect(()=>{i>Math.ceil(n.length/s)&&r(1)},[i,s,n.length]),T.useMemo(()=>({paged:e,page:i,setPage:r,perPage:s,setPerPage:o}),[i,e,s])}const iut="",kT={button:"pf-c-button",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",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",expanded:"pf-m-expanded",hoverable:"pf-m-hoverable",selected:"pf-m-selected",firstCellOffsetReset:"pf-m-first-cell-offset-reset",dragOver:"pf-m-drag-over",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-c-table",tableAction:"pf-c-table__action",tableButton:"pf-c-table__button",tableButtonContent:"pf-c-table__button-content",tableCheck:"pf-c-table__check",tableColumnHelp:"pf-c-table__column-help",tableColumnHelpAction:"pf-c-table__column-help-action",tableCompoundExpansionToggle:"pf-c-table__compound-expansion-toggle",tableControlRow:"pf-c-table__control-row",tableDraggable:"pf-c-table__draggable",tableExpandableRow:"pf-c-table__expandable-row",tableExpandableRowContent:"pf-c-table__expandable-row-content",tableFavorite:"pf-c-table__favorite",tableIcon:"pf-c-table__icon",tableIconInline:"pf-c-table__icon-inline",tableInlineEditAction:"pf-c-table__inline-edit-action",tableSort:"pf-c-table__sort",tableSortIndicator:"pf-c-table__sort-indicator",tableSubhead:"pf-c-table__subhead",tableText:"pf-c-table__text",tableToggle:"pf-c-table__toggle",tableToggleIcon:"pf-c-table__toggle-icon",themeDark:"pf-theme-dark"};function n7e(n){const{t:e}=Us(),{columns:t,keyFn:i,items:r,setItems:s,isSelected:o,selectItem:a,unselectItem:l,allSelected:c,selectAll:u,unselectAll:d,hideColumnHeaders:h,isSelectableWithCheckbox:f}=n,[g,m]=T.useState(null),[p,v]=T.useState(null),[_,b]=T.useState(!1),y=T.useRef(null),w=B=>{if(y.current){const W=y.current.getBoundingClientRect();return B.clientX>W.x&&B.clientX<W.x+W.width&&B.clientY>W.y&&B.clientY<W.y+W.height}return!1},k=B=>{w(B)||x()},x=()=>{y.current&&Array.from(y.current.children).forEach(B=>{B.classList.remove(kT.modifiers.ghostRow),B.setAttribute("aria-pressed","false")}),v(null),m(null),b(!1)},D=B=>{B.preventDefault();const W=B.target.closest("tr");if(!W||!(y.current&&y.current.contains(W))||W.id===p)return null;{const J=W.id,re=Array.from(y.current.children).findIndex(se=>se.id===J);if(re!==g&&p){const se=E([...r],p,re);s(se)}}return null},E=(B,W,J)=>{const re=B.findIndex(ie=>i(ie)===W);if(re===J)return B;const se=B.splice(re,1);return B.splice(J,0,se[0]),B},M=B=>{w(B)||m(null)},N=B=>{const W=B.target;W.classList.remove(kT.modifiers.ghostRow),W.setAttribute("aria-pressed","false"),v(null),m(null),b(!1)},I=B=>{if(y.current){B.dataTransfer.effectAllowed="move";const W=B.currentTarget.id,J=Array.from(y.current.children).findIndex(re=>re.id===B.currentTarget.id);B.currentTarget.setAttribute("aria-pressed","true"),v(W),m(J)}},O=T.useCallback(B=>{const W=r.findIndex(re=>i(re)===i(B)),J=[...r];J[W]=B,s(J)},[r,s,i]);return L.jsxs(Wt.TableComposable,{"aria-label":e("Table with draggable rows"),className:_?kT.modifiers.dragOver:"",variant:"compact",gridBreakPoint:"",children:[!h&&L.jsx(Wt.Thead,{children:L.jsxs(Wt.Tr,{children:[L.jsx(Wt.Th,{}),f&&L.jsx(Wt.Th,{select:{onSelect:(B,W)=>{W?u():d()},isSelected:c}}),t.map((B,W)=>L.jsx(Wt.Th,{children:B.header},W))]})}),L.jsx(Wt.Tbody,{ref:y,onDragOver:D,onDragLeave:M,children:r.map((B,W)=>{const J=i(B);return L.jsxs(Wt.Tr,{id:J.toString(),draggable:!0,onDrop:k,onDragEnd:N,onDragStart:I,children:[L.jsx(Wt.Td,{draggableRow:{id:`draggable-row-${J.toString()}`}}),f&&L.jsx(Wt.Td,{select:{rowIndex:W,variant:"checkbox",onSelect:(re,se)=>{se?a(B):l(B)},isSelected:o(B)}}),t.map(re=>L.jsx(Wt.Td,{children:re.cell(B,O)},re.header))]},J)})})]})}function i7e(n){const[e,t]=Oa(),[i]=T.useState(()=>n.keyFn),[r]=T.useState(()=>n.saveFn),[s]=T.useState(()=>n.loadFn),[o,a]=T.useState(()=>{try{const h=localStorage.getItem(n.id);if(typeof h=="string"){const f=JSON.parse(h);if(Array.isArray(f)&&f.every(g=>typeof g=="object")&&f.every(g=>"key"in g&&"enabled"in g))return f}}catch{}}),l=T.useMemo(()=>o?n.items.map(h=>{if(s){const f=o.find(g=>g.key===i(h));f&&f.state&&s(h,f.state)}return h}).sort((h,f)=>{const g=o.findIndex(p=>p.key===i(h)),m=o.findIndex(p=>p.key===i(f));return g===-1&&m===-1?0:g===-1?1:m===-1?-1:g-m}):n.items,[o,i,s,n.items]),c=T.useMemo(()=>o?l.filter(h=>{const f=o.find(g=>g.key===i(h));return f?f.enabled:!0}):l,[l,o,i]),u=T.useCallback((h,f)=>{const g=h.map(m=>({key:i(m),enabled:f.includes(m),state:r?r(m):void 0}));a(g),localStorage.setItem(n.id,JSON.stringify(g))},[i,n.id,r]);return{openManageItems:()=>t(L.jsx(r7e,{...n,keyFn:i,items:l,defaultSelectedItems:c,onApplyChanges:u})),managedItems:c}}function r7e(n){const{t:e}=Us(),{title:t,description:i,columns:r,onApplyChanges:s}=n,[o]=T.useState(()=>n.keyFn),[a,l]=Oa(),c=()=>l(void 0),[u,d]=T.useState(()=>n.items),{selectedItems:h,isSelected:f,selectItem:g,unselectItem:m,allSelected:p,selectAll:v,unselectAll:_}=ST(u,o,n.defaultSelectedItems),b=()=>{s(u,h),l(void 0)};return L.jsxs(R.Modal,{title:t,"aria-label":t,description:L.jsx("div",{style:{marginBottom:16},children:i}),variant:n.variant??R.ModalVariant.medium,isOpen:!0,onClose:c,actions:[L.jsx(R.Button,{variant:"primary",onClick:b,children:e`Apply`},"apply"),L.jsx(R.Button,{variant:"link",onClick:c,children:e`Cancel`},"cancel")],hasNoBodyWrapper:!0,children:[L.jsx(R.Divider,{}),L.jsx(R.ModalBoxBody,{style:{padding:0},children:L.jsx(n7e,{keyFn:o,items:u,setItems:d,columns:r,isSelected:f,selectItem:g,unselectItem:m,allSelected:p,selectAll:v,unselectAll:_,hideColumnHeaders:n.hideColumnHeaders,isSelectableWithCheckbox:n.hideSelection!==!0})}),L.jsx(R.Divider,{})]})}function s7e(n,e,t,i,r){const{t:s}=Us(),o=T.useMemo(()=>{const d=[{header:s("Column Name"),cell:h=>h.header}];return t||d.push({header:s("Table View"),cell:(h,f)=>L.jsx(oh,{value:h.table??"",onSelect:g=>{switch(g){case"":f({...h,table:void 0});break;case fu.Description:case fu.Expanded:case fu.Hidden:f({...h,table:g});break}},placeholder:s("Column"),options:[{value:"",label:s("Column"),description:s("Show the column in the table.")},{value:fu.Description,label:s("Description"),description:s("Show the column when the item is expanded as a full width description.")},{value:fu.Expanded,label:s("Expanded"),description:s("Show the column when the item is expandedas a detail.")},{value:fu.Hidden,label:s("Hidden"),description:s("Hide the column.")}]})}),i||d.push({header:s("List View"),cell:(h,f)=>L.jsx(oh,{value:h.list??"",onSelect:g=>{switch(g){case"":f({...h,list:void 0});break;case"name":case"subtitle":case"description":case"primary":case"secondary":case"hidden":f({...h,list:g});break}},options:[{value:"name",label:s("Name"),description:s("Show the column as the name of the list item.")},{value:"subtitle",label:s("Subtitle"),description:s("Show the column as the subtitle under the name on the list.")},{value:"description",label:s("Description"),description:s("Show the column as the list item description.")},{value:"",label:s("Left side"),description:s("Show the column on the left side of the list.")},{value:"primary",label:s("Left side"),description:s("Show the column on the left side of the list.")},{value:"secondary",label:s("Right side"),description:s("Show the column on the right side of the list.")},{value:"hidden",label:s("Hidden"),description:s("Hide the column on the list.")}],placeholder:s("Left side")})}),r||d.push({header:s("Card View"),cell:(h,f)=>L.jsx(oh,{value:h.card??"",onSelect:g=>{switch(g){case"":f({...h,card:void 0});break;case"name":case"subtitle":case"description":case"hidden":f({...h,card:g});break}},placeholder:s("Detail"),options:[{value:"name",label:s("Name"),description:s("Show the column as the name on the card.")},{value:"subtitle",label:s("Subtitle"),description:s("Show the column as the subtitle under the name on the card.")},{value:"description",label:s("Description"),description:s("Show the column as the card description.")},{value:"",label:s("Detail"),description:s("Show the column one of the details on the card.")},{value:"hidden",label:s("Hidden"),description:s("Hide the column on the card.")}]})}),d},[r,i,t,s]),a=T.useCallback((d,h)=>{typeof h=="object"&&h!==null&&("table"in h&&typeof h.table=="string"?d.table=h.table:d.table=void 0,"list"in h&&typeof h.list=="string"?d.list=h.list:d.list=void 0,"card"in h&&typeof h.card=="string"?d.card=h.card:d.card=void 0)},[]),l=T.useCallback(d=>{const{table:h,list:f,card:g}=d;return{table:h,list:f,card:g}},[]),{openManageItems:c,managedItems:u}=i7e({id:n,title:s("Manage Columns"),description:s("Manage the order, placement, and format of columns."),items:e,keyFn:d=>d.id??d.header,columns:o,loadFn:a,saveFn:l,hideSelection:!0});return{openColumnManagement:c,managedColumns:u}}function o7e(n){const{setPage:e,setPerPage:t}=n,i=T.useCallback((o,a)=>e(a),[e]),r=T.useCallback((o,a)=>t(a),[t]),s=!ms("md");return L.jsx(R.Pagination,{variant:R.PaginationVariant.bottom,itemCount:n.itemCount,page:n.page,perPage:n.perPage,onSetPage:i,onPerPageSelect:r,style:{...n.style,boxShadow:"none",zIndex:400,paddingTop:s?4:6,paddingBottom:s?4:6,borderTop:n.topBorder?"thin solid var(--pf-global--BorderColor--100)":void 0},className:"dark-2"})}const rut="";function a7e(n){const e=n.size??350,t=T.useRef(null),[i,r]=T.useState("1fr"),s=T.useCallback(a=>{let l=Math.min(n.maxColumns??12,Math.max(Math.floor(a/e),1));l<1&&(l=1),r(()=>new Array(l).fill("1fr").join(" "))},[n.maxColumns,e]);Zf(t,a=>s(a.contentRect.width)),T.useLayoutEffect(()=>{var a;s(((a=t.current)==null?void 0:a.clientWidth)??0)},[s]);const o=16;return L.jsx("div",{ref:t,style:{display:"grid",gridAutoRows:"1fr",gridTemplateColumns:i,gap:o},children:n.children})}const l7e=gn.small`
318
318
  opacity: 0.7;
319
319
  `,c7e=gn.div`
320
320
  display: flex;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ansible/ansible-ui-framework",
3
3
  "description": "A framework for building applications using PatternFly.",
4
- "version": "2.4.304",
4
+ "version": "2.4.305",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",