@ansible/ansible-ui-framework 2.4.2640 → 2.4.2642

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ export type FormGroupSingleSelectTypeAheadProps = {
20
20
  onHandleSelection: (value: {
21
21
  name: string;
22
22
  }) => void;
23
- isSubmitting: boolean;
23
+ isSubmitting?: boolean;
24
24
  value: string | string[] | Partial<{
25
25
  name: string;
26
26
  }> | null;
package/index.js CHANGED
@@ -34136,8 +34136,9 @@ function __(e) {
34136
34136
  labelOrientation: "vertical",
34137
34137
  isCompact: !0,
34138
34138
  disableScroll: !0,
34139
- children: /* @__PURE__ */ m.jsx(Fme, { item: D, columns: y }, o(D))
34140
- }
34139
+ children: /* @__PURE__ */ m.jsx(Fme, { item: D, columns: y })
34140
+ },
34141
+ o(D)
34141
34142
  ) : null), e.expandedRow && A.push(e.expandedRow), A.length === 0 ? void 0 : (D) => A.map(($) => $(D)).filter(($) => $ != null).length === 0 ? null : /* @__PURE__ */ m.jsx(Or, { hasGutter: !0, children: A.map(($) => $(D)) });
34142
34143
  }, [p, y, o, e.expandedRow]), [b] = Nt(), _ = e.showSelect || (l == null ? void 0 : l.find(
34143
34144
  (A) => "selection" in A && A.selection === Qe.Multiple
package/index.umd.cjs CHANGED
@@ -437,7 +437,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[bu]+=1);const xu=Me.button`
437
437
  align-items: baseline;
438
438
  `;function V6(e){const{item:t,itemToCardFn:n,isSelected:r,selectItem:i,unselectItem:o,itemActions:a,showSelect:s,defaultCardSubtitle:l}=e,c=v.useMemo(()=>n(t),[t,n]),u=!!(r!=null&&r(t)),d=v.useCallback(()=>{r!=null&&r(t)?o==null||o(t):i==null||i(t)},[r,t,i,o]);return m.jsxs(C.Card,{id:`card-${c.id}`,ouiaId:c.id,isFlat:!0,isLarge:!0,isRounded:!0,isSelectable:s,isSelected:u,isClickable:s,style:{transition:"box-shadow 0.25s",cursor:"default",maxWidth:"100%"},children:[m.jsx(C.CardHeader,{selectableActions:s?{selectableActionId:`card-${c.id}-checkbox`,onChange:d}:void 0,style:{display:"flex",flexWrap:"nowrap",maxWidth:"100%"},children:m.jsxs(vfe,{children:[m.jsxs(xfe,{children:[c.iconAboveTitle?null:c.icon&&m.jsx(vl,{size:"xl",children:c.icon}),m.jsxs(_fe,{children:[c.iconAboveTitle?m.jsx(bfe,{children:c.icon&&m.jsx(vl,{size:"xl",children:c.icon})}):null,m.jsx(C.CardTitle,{children:c.title}),c.subtitle?m.jsx(C.Text,{component:"small",style:{opacity:.7},children:c.subtitle}):l&&m.jsx(C.Text,{component:"small",style:{opacity:.7},children:l})]})]}),c.badge&&c.badgeTooltip&&m.jsx(C.FlexItem,{children:m.jsx("div",{onClick:f=>f.stopPropagation(),children:m.jsx(C.Popover,{headerContent:c.badgeTooltipTitle,bodyContent:c.badgeTooltip,children:m.jsx(C.Label,{color:c.badgeColor,children:c.badge})})})}),c.badge&&!c.badgeTooltip&&m.jsx(C.FlexItem,{children:m.jsx(C.Label,{color:c.badgeColor,children:c.badge})})]})}),m.jsx("div",{style:{overflow:"hidden",display:"flex",paddingBottom:16,flexGrow:1},children:m.jsx(tr,{children:c.cardBody})}),c.labels||a&&a.length?m.jsx(C.CardFooter,{children:m.jsxs(Sfe,{children:[m.jsx(wfe,{children:c.labels&&m.jsx(C.LabelGroup,{numLabels:999,children:c.labels.map(f=>m.jsx(C.Label,{color:f.color,icon:f.icon,variant:f.variant,children:m.jsx(C.Truncate,{content:f.label,style:{minWidth:0}})},f.label))})}),a&&a.length?m.jsx("div",{style:{marginRight:-16,alignSelf:"end",justifySelf:"flex-end",flexGrow:1},children:m.jsx(Hr,{actions:a,position:"right",selectedItem:t,iconOnly:!0})}):null]})}):null,c.alertTitle&&m.jsx(C.Alert,{title:c.alertTitle,isInline:!0,variant:c.alertVariant,children:c.alertContent})]},c.id??c.title)}function H6(e,t){const n=v.useMemo(()=>{let c,u,d;const f=[];let h;const g=[];for(const p of e)if(p.card!=="hidden")switch(p.type){case"description":d||(d=p);break;case"labels":h||(h=p);break;case"count":f.push(p);break;default:switch(p.card){case"name":c=p;break;case"subtitle":u=p;break;case"description":d=p;break;default:g.push(p);break}break}return{nameColumn:c,subtitleColumn:u,descriptionColumn:d,countColumns:f,cardColumns:g,labelColumn:h}},[e]),{nameColumn:r,subtitleColumn:i,descriptionColumn:o,countColumns:a,cardColumns:s,labelColumn:l}=n;return v.useMemo(()=>c=>{var y,b;let u=!!o;o!=null&&o.value&&!o.value(c)&&(u=!1);const d=s.filter(x=>!x.value||x.value(c)),f=r&&"to"in r?r.to:void 0;let h=r&&"value"in r?r.value:void 0;h||(h=r&&"cell"in r?r.cell:void 0);const g=(h==null?void 0:h(c))??"",p={id:t(c),icon:(y=r==null?void 0:r.icon)==null?void 0:y.call(r,c),title:m.jsx(Tt.Link,{to:(f==null?void 0:f(c))??"",style:{whiteSpace:"normal",textWrap:"balance"},children:typeof g=="string"?g.split("/").map((x,S)=>m.jsx("div",{children:x},S)):(h==null?void 0:h(c))??""}),subtitle:i&&(!i.value||i.value(c))&&m.jsx(cn,{column:i,item:c}),cardBody:m.jsxs(C.DescriptionList,{isCompact:!0,style:{paddingLeft:32,paddingRight:32},children:[u&&o&&m.jsx(Rs,{children:o.type==="description"?m.jsx("div",{children:o.value(c)}):m.jsx(cn,{column:o,item:c})},o.id??o.header),d.map(x=>m.jsx(Rs,{label:x.header,children:m.jsx(cn,{column:x,item:c})},x.id??x.header)),a.length>0&&m.jsx(Rs,{children:m.jsx(B6,{children:a.map((x,S)=>m.jsxs(z6,{children:[m.jsx(cn,{column:x,item:c}),m.jsx(R6,{children:x.header})]},S))})},"count-columns")]}),labels:l&&((b=l.value(c))==null?void 0:b.map(x=>({label:x})))};return!u&&d.length===0&&a.length===0&&(p.cardBody=m.jsx("div",{style:{flexGrow:1}})),p},[s,a,o,l,r,i,t])}function U6(e){return m.jsxs(C.EmptyState,{isFullHeight:!0,children:[m.jsx(C.EmptyStateHeader,{titleText:e.title,icon:m.jsx(C.EmptyStateIcon,{icon:e.icon??ve.PlusCircleIcon})}),e.description&&m.jsx(C.EmptyStateBody,{children:e.description}),e.children&&m.jsx(C.EmptyStateFooter,{children:m.jsx(C.EmptyStateActions,{children:e.children})})]})}function Sy(e){const{keyFn:t,pageItems:n,tableColumns:r,isSelected:i,selectItem:o,unselectItem:a,rowActions:s,showSelect:l,defaultSubtitle:c,itemCount:u,clearAllFilters:d}=e,[f]=kt(),h=H6(r,t),g=v.useMemo(()=>m.jsx(yfe,{size:400,children:n==null?void 0:n.map(p=>m.jsx(V6,{item:p,itemToCardFn:h,isSelected:i,selectItem:o,unselectItem:a,itemActions:s,showSelect:l,defaultCardSubtitle:c},t(p)))}),[n,t,h,i,o,a,s,l,c]);return m.jsx(m.Fragment,{children:u===0?m.jsx(U6,{icon:ve.SearchIcon,title:f.noResultsFound,description:f.noResultsMatchCriteria,children:m.jsx(C.Button,{variant:"primary",onClick:d,children:f.clearAllFilters})}):m.jsx(C.PageSection,{style:{flexGrow:1},children:g})})}function G6(e){const{keyFn:t,pageItems:n,tableColumns:r,isSelected:i,selectItem:o,unselectItem:a,rowActions:s,defaultSubtitle:l,showSelect:c,itemCount:u,clearAllFilters:d}=e,[f]=kt(),h=Cfe(r,t,i,o,a,s,l,c);return m.jsx(m.Fragment,{children:u===0?m.jsx(U6,{icon:ve.SearchIcon,title:f.noResultsFound,description:f.noResultsMatchCriteria,children:m.jsx(C.Button,{variant:"primary",onClick:d,children:f.clearAllFilters})}):m.jsx(C.DataList,{"aria-label":"TODO",style:{marginTop:-1,maxWidth:"100%",overflow:"hidden"},children:n==null?void 0:n.map(h)})})}function Cfe(e,t,n,r,i,o,a,s){const l=v.useMemo(()=>{let b,x,S;const w=[];let _;const E=[],O=[];for(const k of e)if(k.list!=="hidden")switch(k.type){case"description":S||(S=k);break;case"labels":_||(_=k);break;case"count":w.push(k);break;default:switch(k.list){case"name":b=k;break;case"subtitle":x=k;break;case"description":S=k;break;case"secondary":O.push(k);break;default:E.push(k);break}break}return{nameColumn:b,subtitleColumn:x,descriptionColumn:S,countColumns:w,primaryColumns:E,secondaryColumns:O,labelColumn:_}},[e]),c=v.useCallback(b=>{n!=null&&n(b)?i==null||i(b):r==null||r(b)},[n,r,i]),{nameColumn:u,subtitleColumn:d,descriptionColumn:f,countColumns:h,primaryColumns:g,secondaryColumns:p,labelColumn:y}=l;return v.useCallback(b=>{const x=t(b),S=n==null?void 0:n(b);return m.jsx(C.DataListItem,{"aria-labelledby":`data-list-${x}`,isExpanded:S,children:m.jsxs(C.DataListItemRow,{children:[s&&m.jsx(C.DataListCheck,{"aria-labelledby":`data-list-check-${x}`,name:`data-list-check-${x}`,isChecked:n==null?void 0:n(b),onClick:()=>c(b),"data-cy":"data-list-check"}),m.jsx(C.DataListItemCells,{dataListCells:[m.jsx(C.DataListCell,{width:5,children:m.jsx(C.Flex,{children:m.jsxs(C.Stack,{hasGutter:!0,children:[m.jsxs(C.Flex,{alignItems:{default:"alignItemsCenter"},children:[(u==null?void 0:u.icon)&&m.jsx(vl,{size:"xl",children:u==null?void 0:u.icon(b)}),m.jsxs(C.Stack,{children:[m.jsx(C.Title,{headingLevel:"h2",style:{marginTop:-4,fontWeight:"bold"},"data-cy":"data-list-name",children:m.jsx("span",{id:`data-list-${x}`,children:m.jsx(cn,{column:u,item:b})})}),d?m.jsx(C.Text,{component:"small",style:{opacity:.7},children:m.jsx(cn,{column:d,item:b})}):a&&m.jsx(C.Text,{component:"small",style:{opacity:.7},children:a})]})]}),(f||g.length>0||h.length>0||y)&&m.jsxs(C.DescriptionList,{isCompact:!0,children:[f&&(!f.value||f.value(b))&&m.jsx(C.DescriptionListGroup,{children:m.jsx(C.DescriptionListDescription,{children:m.jsx(cn,{column:f,item:b})})},f.header),g.map(w=>w.value&&!w.value(b)?m.jsx(m.Fragment,{}):m.jsxs(C.DescriptionListGroup,{children:[m.jsx(C.DescriptionListTerm,{style:{whiteSpace:"nowrap",opacity:.6},children:w.header}),m.jsx(C.DescriptionListDescription,{children:m.jsx(cn,{column:w,item:b})})]},w.header)),h.length>0&&m.jsx(C.DescriptionListGroup,{children:m.jsx(C.DescriptionListDescription,{children:m.jsx("div",{style:{display:"flex",gap:16,marginTop:8,flexWrap:"wrap"},children:h.map((w,_)=>m.jsxs("div",{style:{display:"flex",gap:6,alignItems:"baseline"},children:[m.jsx(cn,{column:w,item:b}),m.jsx("small",{style:{opacity:.7},children:w.header})]},_))})})},"counts"),y&&m.jsxs(m.Fragment,{children:[m.jsx("div",{style:{flexGrow:1}}),m.jsx(C.DescriptionListGroup,{children:m.jsx(C.DescriptionListDescription,{children:m.jsx(cn,{column:y,item:b})})},y.header)]})]})]})})},"primary"),p.length>0?m.jsx(C.DataListCell,{children:m.jsx(C.DescriptionList,{isCompact:!0,children:p.map(w=>w.value&&!w.value(b)?m.jsx(m.Fragment,{}):m.jsxs(C.DescriptionListGroup,{children:[m.jsx(C.DescriptionListTerm,{style:{whiteSpace:"nowrap",opacity:.6},children:w.header}),m.jsx(C.DescriptionListDescription,{children:m.jsx(cn,{column:w,item:b})})]},w.header))})},"secondary"):null]}),o&&m.jsx(C.DataListAction,{"aria-labelledby":"check-action-item1 check-action-action1",id:"check-action-action1","aria-label":"Actions",isPlainButtonAction:!0,style:{whiteSpace:"nowrap"},"data-cy":"data-list-action",children:m.jsx(Hr,{actions:o,position:"right",selectedItem:b,iconOnly:!0,collapse:"always"})})]})},x)},[t,n,s,u,d,a,g,f,h,y,p,o,c])}const Efe=Me.div`
439
439
  flex: 1;
440
- `;function pc(e){const{id:t,toolbarActions:n,filterState:r,error:i,itemCount:o}=e,{t:a}=$e(),s=e.showSelect||(n==null?void 0:n.find(b=>"selection"in b&&b.selection===qe.Multiple))!==void 0,l=!e.disableTableView,c=!e.disableListView,[u,d]=v.useState(()=>{switch(e.id?localStorage.getItem(e.id+"-view"):void 0){case"table":return it.Table;case"list":return it.List;case"cards":return it.Cards}return e.defaultTableView??(l?it.Table:c?it.List:it.Cards)}),f=v.useCallback(b=>{d(b),e.id&&localStorage.setItem(e.id+"-view",b)},[e.id]),{openColumnManagement:h,managedColumns:g}=mfe((t??"")+"-columns",e.tableColumns,u!==it.Table,u!==it.List,u!==it.Cards),p=rfe(e.tableColumns);if(i)return m.jsx(afe,{titleProp:e.errorStateTitle,message:i.message});if(o===0&&Object.keys(r??{}).length===0)return e.emptyState?e.emptyState:m.jsx(lfe,{title:e.emptyStateTitle??a`No data`,description:e.emptyStateDescription,icon:e.emptyStateNoDataIcon,button:e.emptyStateButtonClick&&m.jsx(C.Button,{"data-cy":e.emptyStateButtonText?Afe(e.emptyStateButtonText):"create-resource",variant:"primary",onClick:e.emptyStateButtonClick,icon:e.emptyStateButtonIcon?e.emptyStateButtonIcon:null,children:e.emptyStateButtonText})||e.emptyStateActions&&m.jsx(C.Flex,{justifyContent:{default:"justifyContentCenter"},children:m.jsx(Hr,{actions:e.emptyStateActions})})});let y=e.topContent;return y&&(y=m.jsx(C.PageSection,{variant:"light",padding:{default:"noPadding"},style:{borderBottom:"thin solid var(--pf-v5-global--BorderColor--100)"},children:e.topContent})),m.jsxs(m.Fragment,{children:[m.jsx(L6,{...e,openColumnModal:e.id?h:void 0,showSelect:s,viewType:u,setViewType:f,sortOptions:p,limitFiltersToOneOrOperation:e.limitFiltersToOneOrOperation}),u===it.Table&&m.jsx(m.Fragment,{children:e.scrollTopContent?m.jsxs(tr,{children:[y,!e.hideTable&&m.jsx(q6,{...e,tableColumns:g})]}):m.jsxs(m.Fragment,{children:[y,!e.hideTable&&m.jsx(q6,{...e,tableColumns:g})]})}),u===it.List&&m.jsx(m.Fragment,{children:e.scrollTopContent?m.jsxs(tr,{children:[y,m.jsx(C.PageSection,{padding:{default:"noPadding"},variant:"light",children:!e.hideTable&&m.jsx(G6,{...e,showSelect:s,tableColumns:g})})]}):m.jsxs(m.Fragment,{children:[y,m.jsx(tr,{children:m.jsx(C.PageSection,{padding:{default:"noPadding"},variant:"light",children:!e.hideTable&&m.jsx(G6,{...e,showSelect:s,tableColumns:g})})})]})}),u===it.Cards&&m.jsx(m.Fragment,{children:e.scrollTopContent?m.jsxs(tr,{children:[y,!e.hideTable&&m.jsx(Sy,{...e,showSelect:s,tableColumns:g})]}):m.jsxs(m.Fragment,{children:[y,m.jsx(tr,{children:!e.hideTable&&m.jsx(Sy,{...e,showSelect:s,tableColumns:g})})]})}),!e.disablePagination&&(!e.autoHidePagination||(e.itemCount??0)>e.perPage)&&m.jsx(pfe,{...e,topBorder:!e.autoHidePagination})]})}function q6(e){const{pageItems:t,selectItem:n,unselectItem:r,isSelected:i,isSelectMultiple:o,keyFn:a,rowActions:s,toolbarActions:l,itemCount:c,clearAllFilters:u,onSelect:d,unselectAll:f,maxSelections:h}=e,g=my(e.tableColumns),p=h6(e.tableColumns),y=m6(e.tableColumns),b=v.useMemo(()=>{const P=[];if(p.length)for(const D of p)"value"in D?P.push($=>{var H;const L=(H=D.value)==null?void 0:H.call(D,$);if(L)return m.jsx("div",{children:L},D.id??D.header)}):P.push($=>D.cell($));return y.length&&P.push(D=>y.some(L=>{var H;return((H=L.value)==null?void 0:H.call(L,D))!==void 0})?m.jsx(a6,{disablePadding:!0,numberOfColumns:"multiple",labelOrientation:"vertical",isCompact:!0,disableScroll:!0,children:m.jsx(y6,{item:D,columns:y},a(D))}):null),e.expandedRow&&P.push(e.expandedRow),P.length===0?void 0:D=>P.map(L=>L(D)).filter(L=>L!=null).length===0?null:m.jsx(C.Stack,{hasGutter:!0,children:P.map(L=>L(D))})},[p,y,a,e.expandedRow]),[x]=kt(),S=e.showSelect||(l==null?void 0:l.find(P=>"selection"in P&&P.selection===qe.Multiple))!==void 0,w=v.useRef(null),[_,E]=v.useState({left:0,right:0,top:0,bottom:0}),O=v.useCallback(P=>{P&&E({top:P.scrollTop,bottom:P.scrollHeight-P.clientHeight-P.scrollTop,left:P.scrollLeft,right:P.scrollWidth-P.clientWidth-P.scrollLeft})},[]),k=v.useCallback(P=>O(P.currentTarget),[O]);Wa(w,()=>O(w.current)),v.useEffect(()=>O(w.current),[O]);const M=Go();let A;return c===void 0||t===void 0?A=m.jsx(gfe,{}):c===0?A=m.jsxs(C.EmptyState,{isFullHeight:!0,children:[m.jsx(C.EmptyStateHeader,{titleText:m.jsx(m.Fragment,{children:x.noResultsFound}),icon:m.jsx(C.EmptyStateIcon,{icon:e.emptyStateIcon??ve.SearchIcon})}),m.jsx(C.EmptyStateBody,{children:x.noResultsMatchCriteria}),m.jsx(C.EmptyStateFooter,{children:u&&m.jsx(C.EmptyStateActions,{children:m.jsx(C.Button,{variant:"primary",onClick:u,children:x.clearAllFilters})})})]}):A=m.jsxs(Fe.Table,{"aria-label":"Simple table",ouiaId:"simple-table",variant:e.compact||M.tableLayout==="compact"?"compact":void 0,borders:!e.borderless,gridBreakPoint:"",isStickyHeader:!0,className:"page-table",children:[m.jsx(Ofe,{...e,showSelect:S,scrollLeft:_.left>0,scrollRight:_.right>1,tableColumns:g,onSelect:d,expandedRow:b}),m.jsx(Fe.Tbody,{children:t.map((P,j)=>m.jsx(Tfe,{columns:g,item:P,isItemSelected:i==null?void 0:i(P),isSelectMultiple:o,selectItem:n,unselectItem:r,rowActions:s,rowIndex:j,showSelect:S,scrollLeft:_.left>0,scrollRight:_.right>1,unselectAll:f,onSelect:d,expandedRow:b,isLastRow:j===t.length-1,disableLastRowBorder:e.disableLastRowBorder,maxSelections:h,selectedItems:e.selectedItems,defaultExpandedRows:e.defaultExpandedRows},a?a(P):j))})]}),e.scrollTopContent||(A=m.jsx(Efe,{className:"pf-v5-c-scroll-inner-wrapper",ref:w,onScroll:k,style:{backgroundColor:"var(--pf-v5-global--BackgroundColor--100)"},children:A})),A}function Ofe(e){const{tableColumns:t,rowActions:n,sort:r,setSort:i,sortDirection:o,setSortDirection:a,showSelect:s,onSelect:l,expandedRow:c}=e,u=v.useCallback((d,f)=>{if(f.sort)return{onSort:(h,g,p)=>{f.sort&&(i==null||i(f.sort),a==null||a(p))},sortBy:{index:f.sort===r?d:void 0,direction:f.sort===r?o:void 0,defaultDirection:f.defaultSortDirection},columnIndex:d}},[i,a,r,o]);return m.jsx(Fe.Thead,{children:m.jsxs(Fe.Tr,{className:"bg-lighten",children:[c&&m.jsx(Fe.Th,{style:{padding:0},"aria-label":"Expand",className:"bg-lighten"}),(s||l)&&m.jsx(Fe.Th,{"aria-label":"Select",isStickyColumn:!0,stickyMinWidth:"0px",hasRightBorder:e.scrollLeft,"data-cy":"selections-column-header",className:e.scrollLeft?"bg-lighten-2":"bg-lighten",children:" "}),t.map((d,f)=>m.jsx(Fe.Th,{"aria-label":d.header,sort:u(f,d),modifier:"nowrap",style:{minWidth:d.minWidth===0?"1%":d.minWidth!==void 0?d.minWidth:void 0,maxWidth:d.maxWidth!==void 0?d.maxWidth:void 0,width:d.fullWidth?"100%":void 0},"data-cy":Vr(d.header+"-column-header"),className:"bg-lighten",children:d.header},d.header)),n!==void 0&&m.jsx(Fe.Td,{"aria-label":"Actions",isActionCell:!0,isStickyColumn:!0,stickyMinWidth:"0px",style:{right:0,padding:0,paddingRight:0,zIndex:302},className:e.scrollRight?"pf-m-border-left bg-lighten-2":"bg-lighten","data-cy":"action-column-header",children:" "})]})})}function Tfe(e){const{columns:t,unselectAll:n,selectItem:r,unselectItem:i,isItemSelected:o,isSelectMultiple:a,item:s,rowActions:l,rowIndex:c,showSelect:u,onSelect:d,expandedRow:f,disableLastRowBorder:h,maxSelections:g,selectedItems:p}=e,y=f==null?void 0:f(s),[b,x]=v.useState(!!e.defaultExpandedRows&&!!y),S=Go(),w=v.useCallback(_=>(p==null?void 0:p.length)===g?!(p!=null&&p.includes(_)):!1,[g,p]);return m.jsxs(m.Fragment,{children:[m.jsxs(Fe.Tr,{style:{boxShadow:"unset",borderBottom:b||e.isLastRow&&h?"unset":void 0,cursor:d?"pointer":"default"},"data-cy":"id"in s&&(typeof s.id=="string"||typeof s.id=="number")?`row-id-${s.id.toString()}`:`row-${c}`,className:o?"selected":void 0,onClick:()=>{d&&(a||n==null||n(),a&&o?i==null||i(s):r==null||r(s),d(s))},children:[f&&m.jsx(Fe.Td,{expand:y?{rowIndex:c,isExpanded:b,onToggle:()=>x(_=>!_)}:void 0,style:{paddingLeft:y?8:4},"data-cy":"expand-column-cell"}),u&&m.jsx(Fe.Td,{select:o!==void 0?{rowIndex:c,onSelect:(_,E)=>{E?r==null||r(s):i==null||i(s)},isSelected:o,isDisabled:g&&p?w(s):!1}:void 0,isStickyColumn:e.scrollLeft,stickyMinWidth:"0px",hasRightBorder:e.scrollLeft,"data-cy":"checkbox-column-cell",className:e.scrollLeft?"bg-lighten":void 0}),d&&m.jsx(Fe.Td,{select:{rowIndex:c,isSelected:o??!1,variant:a?"checkbox":"radio",isDisabled:g&&p?w(s):!1,props:{"aria-label":"Select row"}},isStickyColumn:e.scrollLeft,stickyMinWidth:"0px",hasRightBorder:e.scrollLeft,"data-cy":"checkbox-column-cell",className:e.scrollLeft?"bg-lighten":void 0}),m.jsx(kfe,{columns:t,item:s,rowActions:l,scrollLeft:e.scrollLeft,scrollRight:e.scrollRight})]}),f&&b&&y&&m.jsxs(Fe.Tr,{isExpanded:b,style:{boxShadow:"unset"},className:o?"selected":void 0,children:[m.jsx(Fe.Td,{}),u&&m.jsx(Fe.Th,{"aria-label":"Select",isStickyColumn:e.scrollLeft,stickyMinWidth:"0px",hasRightBorder:e.scrollLeft,className:e.scrollLeft?"bg-lighten":void 0}),d&&m.jsx(Fe.Td,{isStickyColumn:!0,stickyMinWidth:"0px",hasRightBorder:e.scrollLeft}),m.jsx(Fe.Td,{colSpan:t.length,style:{paddingBottom:S.tableLayout==="compact"?12:24,paddingTop:0},children:m.jsx(Fe.CollapseColumn,{children:y})}),l!==void 0&&l.length>0&&m.jsx(Fe.Td,{isActionCell:!0,isStickyColumn:e.scrollRight,stickyMinWidth:"0px",style:{right:0,padding:0,paddingRight:0},className:e.scrollRight?"pf-m-border-left bg-lighten":void 0,children:" "})]})]})}function kfe(e){const{columns:t,item:n,rowActions:r}=e,[i,o]=v.useState(!1);return m.jsxs(v.Fragment,{children:[t.map(a=>m.jsx(Fe.Td,{dataLabel:a.header,modifier:"nowrap",style:{width:a.minWidth===0?"0%":void 0},"data-cy":Vr(a.header+"-column-cell"),children:m.jsx(cn,{item:n,column:a})},a.header)),r!==void 0&&r.length>0&&m.jsx(Fe.Td,{isActionCell:!0,isStickyColumn:e.scrollRight,stickyMinWidth:"0px",style:{right:0,padding:0,paddingRight:8,zIndex:i?400:void 0},"data-cy":"actions-column-cell",className:e.scrollRight?"pf-m-border-left bg-lighten":void 0,children:m.jsx(Hr,{actions:r,selectedItem:n,position:"right",iconOnly:!0,onOpen:o})})]})}function Afe(e){return e.toLowerCase().split(" ").join("-")}function Pfe(){const e=v.useRef(new AbortController);return v.useEffect(()=>{const t=e.current;return()=>t.abort()},[]),e.current}function Y6(e){const{title:t,keyFn:n,actionColumns:r,actionFn:i,onComplete:o,onClose:a,processingText:s,isDanger:l,errorAdapter:c=mc,description:u,statusParser:d}=e,{t:f}=$e(),[h,g]=v.useState(e.items),[p]=kt(),[y,b]=v.useState(!0),[x,S]=v.useState(0),[w,_]=v.useState(!1),[E,O]=v.useState(0),[k,M]=v.useState(""),[A,P]=v.useState(),j=Pfe(),[D,$]=Wi(),[L,H]=v.useState([]),U=v.useCallback(()=>{_(!0),j.abort(),b(!1),P(K=>{const re={...K};for(const ae of h){const le=n(ae);re[le]===void 0&&(re[le]=f("Cancelled"))}return re})},[j,h,n,f]),B=v.useCallback(()=>{$(void 0),a==null||a(w?"canceled":k?"failures":"success",h.filter(K=>(A==null?void 0:A[n(K)])===null||(A==null?void 0:A[n(K)]).message),h.filter(K=>(A==null?void 0:A[n(K)])!==null&&typeof(A==null?void 0:A[n(K)])=="string"),h.filter(K=>(A==null?void 0:A[n(K)])===void 0)),o==null||o(L)},[k,w,h,n,a,o,$,A,L]),z=v.useCallback(()=>{M(""),b(!0),P(void 0),g(h.filter(K=>(A==null?void 0:A[n(K)])!==null&&typeof(A==null?void 0:A[n(K)])=="string")),S(x+1)},[h,n,x,A]),N=v.useMemo(()=>j.signal.aborted?p.canceledText:k?p.errorText:y?s??p.processingText:p.successText,[j.signal.aborted,k,y,s,p.canceledText,p.errorText,p.processingText,p.successText]),V=v.useMemo(()=>{if(k||w)return C.ProgressVariant.danger;if(E===h.length)return C.ProgressVariant.success},[k,w,h.length,E]);v.useEffect(()=>{function K(le,X){if(j.signal.aborted)return;let te;d&&(te=d(X)),P(ge=>({...ge??{},[le]:te!==void 0?te:null}))}function re(le,X,te){if(!j.signal.aborted){if(te instanceof Error){const ge=typeof X[0].message=="string"&&X.length===1?X[0].message:f("Unknown error");P(W=>({...W??{},[le]:ge}))}else P(ge=>({...ge??{},[le]:f("Unknown error")}));M(p.errorText)}}async function ae(){const le=Yde(5);let X=0;const te=[];await Promise.all(h.map(ge=>le(async()=>{if(j.signal.aborted)return;const W=n(ge);try{const we=await i(ge,j.signal);K(W,we),te.push(ge)}catch(we){const{genericErrors:oe,fieldErrors:Ie}=c(we),Pe=[...oe,...Ie.filter(Ge=>Ge.message)];re(W,Pe,we)}finally{j.signal.aborted||O(++X)}}))),H([...L,...te]),j.signal.aborted||b(!1)}ae()},[j,i,h,n,o,p.errorText,f,c,d,x]),v.useEffect(()=>{let K;return!y&&!k&&(K=setTimeout(()=>{B()},1e3)),()=>clearTimeout(K)},[y,k,B]);const Q=gc(h),ne=Zf(r),ee=v.useMemo(()=>y?[m.jsx(C.Button,{variant:"link",onClick:U,children:f("Cancel")},"cancel")]:k?[m.jsx(C.Button,{variant:"primary",onClick:z,children:f("Retry")},"retry"),m.jsx(C.Button,{variant:"secondary",onClick:B,children:f("Close")},"close")]:[],[k,y,U,B,z,f]);return m.jsxs(C.Modal,{titleIconVariant:l?"warning":void 0,title:t,ouiaId:t,"aria-label":t,description:u,variant:C.ModalVariant.medium,isOpen:!0,onClose:()=>{U(),B()},actions:ee,hasNoBodyWrapper:!0,children:[m.jsx(C.ModalBoxBody,{style:{paddingBottom:0,paddingLeft:0,paddingRight:0},children:m.jsx("div",{style:{display:"flex",flexDirection:"column",maxHeight:560,overflow:"hidden",borderTop:"thin solid var(--pf-v5-global--BorderColor--100)"},children:m.jsx(pc,{pageItems:[...Q.paged],itemCount:h.length,tableColumns:[...ne,{header:f("Status"),cell:K=>{const re=n(K),ae=A==null?void 0:A[re];return ae===void 0?m.jsxs("span",{style:{color:mm},children:[m.jsx(ve.PendingIcon,{}),"  ",p.pendingText]}):ae===null?m.jsxs("span",{style:{color:fm},children:[m.jsx(ve.CheckCircleIcon,{}),"  ",p.successText]}):ae.message&&ae.url?m.jsx("a",{href:ae.url,children:ae.message}):m.jsxs("span",{style:{color:hm},children:[m.jsx(ve.ExclamationCircleIcon,{}),"  ",A==null?void 0:A[re]]})}}],keyFn:n,compact:!0,errorStateTitle:"",emptyStateTitle:f("No items"),autoHidePagination:!0,disableBodyPadding:!0,...Q},"status")})}),m.jsx(C.ModalBoxBody,{style:{paddingTop:0},children:m.jsx(C.Progress,{"data-cy":"progress",value:E/h.length*100,title:N,size:C.ProgressSize.lg,variant:V})})]})}function K6(e=mc,t){const[n,r]=Wi(),[i,o]=v.useState();return v.useEffect(()=>{if(i){const a=(s,l,c,u)=>{var d;o(void 0),(d=i.onClose)==null||d.call(i,s,l,c,u)};r(m.jsx(Y6,{...i,errorAdapter:i.errorAdapter??e,statusParser:i.statusParser??t,onClose:a}))}else r(void 0)},[i,r,e,t]),o}function X6(e,t){if(e===void 0&&t===void 0)return 0;if(e===void 0)return 1;if(t===void 0)return-1;if(typeof e=="string"){if(typeof t=="string")return yc(e,t);if(typeof t=="number")return yc(e,t.toString())}else if(typeof e=="number"){if(typeof t=="number")return Z6(e,t);if(typeof t=="string")return yc(e.toString(),t)}return 0}function yc(e,t){return e===void 0&&t===void 0?0:e==null?1:t==null||e<t?-1:e>t?1:0}function Z6(e,t){return e===void 0&&t===void 0?0:e==null?1:t==null||e<t?-1:e>t?1:0}const Mfe=Me.div`
440
+ `;function pc(e){const{id:t,toolbarActions:n,filterState:r,error:i,itemCount:o}=e,{t:a}=$e(),s=e.showSelect||(n==null?void 0:n.find(b=>"selection"in b&&b.selection===qe.Multiple))!==void 0,l=!e.disableTableView,c=!e.disableListView,[u,d]=v.useState(()=>{switch(e.id?localStorage.getItem(e.id+"-view"):void 0){case"table":return it.Table;case"list":return it.List;case"cards":return it.Cards}return e.defaultTableView??(l?it.Table:c?it.List:it.Cards)}),f=v.useCallback(b=>{d(b),e.id&&localStorage.setItem(e.id+"-view",b)},[e.id]),{openColumnManagement:h,managedColumns:g}=mfe((t??"")+"-columns",e.tableColumns,u!==it.Table,u!==it.List,u!==it.Cards),p=rfe(e.tableColumns);if(i)return m.jsx(afe,{titleProp:e.errorStateTitle,message:i.message});if(o===0&&Object.keys(r??{}).length===0)return e.emptyState?e.emptyState:m.jsx(lfe,{title:e.emptyStateTitle??a`No data`,description:e.emptyStateDescription,icon:e.emptyStateNoDataIcon,button:e.emptyStateButtonClick&&m.jsx(C.Button,{"data-cy":e.emptyStateButtonText?Afe(e.emptyStateButtonText):"create-resource",variant:"primary",onClick:e.emptyStateButtonClick,icon:e.emptyStateButtonIcon?e.emptyStateButtonIcon:null,children:e.emptyStateButtonText})||e.emptyStateActions&&m.jsx(C.Flex,{justifyContent:{default:"justifyContentCenter"},children:m.jsx(Hr,{actions:e.emptyStateActions})})});let y=e.topContent;return y&&(y=m.jsx(C.PageSection,{variant:"light",padding:{default:"noPadding"},style:{borderBottom:"thin solid var(--pf-v5-global--BorderColor--100)"},children:e.topContent})),m.jsxs(m.Fragment,{children:[m.jsx(L6,{...e,openColumnModal:e.id?h:void 0,showSelect:s,viewType:u,setViewType:f,sortOptions:p,limitFiltersToOneOrOperation:e.limitFiltersToOneOrOperation}),u===it.Table&&m.jsx(m.Fragment,{children:e.scrollTopContent?m.jsxs(tr,{children:[y,!e.hideTable&&m.jsx(q6,{...e,tableColumns:g})]}):m.jsxs(m.Fragment,{children:[y,!e.hideTable&&m.jsx(q6,{...e,tableColumns:g})]})}),u===it.List&&m.jsx(m.Fragment,{children:e.scrollTopContent?m.jsxs(tr,{children:[y,m.jsx(C.PageSection,{padding:{default:"noPadding"},variant:"light",children:!e.hideTable&&m.jsx(G6,{...e,showSelect:s,tableColumns:g})})]}):m.jsxs(m.Fragment,{children:[y,m.jsx(tr,{children:m.jsx(C.PageSection,{padding:{default:"noPadding"},variant:"light",children:!e.hideTable&&m.jsx(G6,{...e,showSelect:s,tableColumns:g})})})]})}),u===it.Cards&&m.jsx(m.Fragment,{children:e.scrollTopContent?m.jsxs(tr,{children:[y,!e.hideTable&&m.jsx(Sy,{...e,showSelect:s,tableColumns:g})]}):m.jsxs(m.Fragment,{children:[y,m.jsx(tr,{children:!e.hideTable&&m.jsx(Sy,{...e,showSelect:s,tableColumns:g})})]})}),!e.disablePagination&&(!e.autoHidePagination||(e.itemCount??0)>e.perPage)&&m.jsx(pfe,{...e,topBorder:!e.autoHidePagination})]})}function q6(e){const{pageItems:t,selectItem:n,unselectItem:r,isSelected:i,isSelectMultiple:o,keyFn:a,rowActions:s,toolbarActions:l,itemCount:c,clearAllFilters:u,onSelect:d,unselectAll:f,maxSelections:h}=e,g=my(e.tableColumns),p=h6(e.tableColumns),y=m6(e.tableColumns),b=v.useMemo(()=>{const P=[];if(p.length)for(const D of p)"value"in D?P.push($=>{var H;const L=(H=D.value)==null?void 0:H.call(D,$);if(L)return m.jsx("div",{children:L},D.id??D.header)}):P.push($=>D.cell($));return y.length&&P.push(D=>y.some(L=>{var H;return((H=L.value)==null?void 0:H.call(L,D))!==void 0})?m.jsx(a6,{disablePadding:!0,numberOfColumns:"multiple",labelOrientation:"vertical",isCompact:!0,disableScroll:!0,children:m.jsx(y6,{item:D,columns:y})},a(D)):null),e.expandedRow&&P.push(e.expandedRow),P.length===0?void 0:D=>P.map(L=>L(D)).filter(L=>L!=null).length===0?null:m.jsx(C.Stack,{hasGutter:!0,children:P.map(L=>L(D))})},[p,y,a,e.expandedRow]),[x]=kt(),S=e.showSelect||(l==null?void 0:l.find(P=>"selection"in P&&P.selection===qe.Multiple))!==void 0,w=v.useRef(null),[_,E]=v.useState({left:0,right:0,top:0,bottom:0}),O=v.useCallback(P=>{P&&E({top:P.scrollTop,bottom:P.scrollHeight-P.clientHeight-P.scrollTop,left:P.scrollLeft,right:P.scrollWidth-P.clientWidth-P.scrollLeft})},[]),k=v.useCallback(P=>O(P.currentTarget),[O]);Wa(w,()=>O(w.current)),v.useEffect(()=>O(w.current),[O]);const M=Go();let A;return c===void 0||t===void 0?A=m.jsx(gfe,{}):c===0?A=m.jsxs(C.EmptyState,{isFullHeight:!0,children:[m.jsx(C.EmptyStateHeader,{titleText:m.jsx(m.Fragment,{children:x.noResultsFound}),icon:m.jsx(C.EmptyStateIcon,{icon:e.emptyStateIcon??ve.SearchIcon})}),m.jsx(C.EmptyStateBody,{children:x.noResultsMatchCriteria}),m.jsx(C.EmptyStateFooter,{children:u&&m.jsx(C.EmptyStateActions,{children:m.jsx(C.Button,{variant:"primary",onClick:u,children:x.clearAllFilters})})})]}):A=m.jsxs(Fe.Table,{"aria-label":"Simple table",ouiaId:"simple-table",variant:e.compact||M.tableLayout==="compact"?"compact":void 0,borders:!e.borderless,gridBreakPoint:"",isStickyHeader:!0,className:"page-table",children:[m.jsx(Ofe,{...e,showSelect:S,scrollLeft:_.left>0,scrollRight:_.right>1,tableColumns:g,onSelect:d,expandedRow:b}),m.jsx(Fe.Tbody,{children:t.map((P,j)=>m.jsx(Tfe,{columns:g,item:P,isItemSelected:i==null?void 0:i(P),isSelectMultiple:o,selectItem:n,unselectItem:r,rowActions:s,rowIndex:j,showSelect:S,scrollLeft:_.left>0,scrollRight:_.right>1,unselectAll:f,onSelect:d,expandedRow:b,isLastRow:j===t.length-1,disableLastRowBorder:e.disableLastRowBorder,maxSelections:h,selectedItems:e.selectedItems,defaultExpandedRows:e.defaultExpandedRows},a?a(P):j))})]}),e.scrollTopContent||(A=m.jsx(Efe,{className:"pf-v5-c-scroll-inner-wrapper",ref:w,onScroll:k,style:{backgroundColor:"var(--pf-v5-global--BackgroundColor--100)"},children:A})),A}function Ofe(e){const{tableColumns:t,rowActions:n,sort:r,setSort:i,sortDirection:o,setSortDirection:a,showSelect:s,onSelect:l,expandedRow:c}=e,u=v.useCallback((d,f)=>{if(f.sort)return{onSort:(h,g,p)=>{f.sort&&(i==null||i(f.sort),a==null||a(p))},sortBy:{index:f.sort===r?d:void 0,direction:f.sort===r?o:void 0,defaultDirection:f.defaultSortDirection},columnIndex:d}},[i,a,r,o]);return m.jsx(Fe.Thead,{children:m.jsxs(Fe.Tr,{className:"bg-lighten",children:[c&&m.jsx(Fe.Th,{style:{padding:0},"aria-label":"Expand",className:"bg-lighten"}),(s||l)&&m.jsx(Fe.Th,{"aria-label":"Select",isStickyColumn:!0,stickyMinWidth:"0px",hasRightBorder:e.scrollLeft,"data-cy":"selections-column-header",className:e.scrollLeft?"bg-lighten-2":"bg-lighten",children:" "}),t.map((d,f)=>m.jsx(Fe.Th,{"aria-label":d.header,sort:u(f,d),modifier:"nowrap",style:{minWidth:d.minWidth===0?"1%":d.minWidth!==void 0?d.minWidth:void 0,maxWidth:d.maxWidth!==void 0?d.maxWidth:void 0,width:d.fullWidth?"100%":void 0},"data-cy":Vr(d.header+"-column-header"),className:"bg-lighten",children:d.header},d.header)),n!==void 0&&m.jsx(Fe.Td,{"aria-label":"Actions",isActionCell:!0,isStickyColumn:!0,stickyMinWidth:"0px",style:{right:0,padding:0,paddingRight:0,zIndex:302},className:e.scrollRight?"pf-m-border-left bg-lighten-2":"bg-lighten","data-cy":"action-column-header",children:" "})]})})}function Tfe(e){const{columns:t,unselectAll:n,selectItem:r,unselectItem:i,isItemSelected:o,isSelectMultiple:a,item:s,rowActions:l,rowIndex:c,showSelect:u,onSelect:d,expandedRow:f,disableLastRowBorder:h,maxSelections:g,selectedItems:p}=e,y=f==null?void 0:f(s),[b,x]=v.useState(!!e.defaultExpandedRows&&!!y),S=Go(),w=v.useCallback(_=>(p==null?void 0:p.length)===g?!(p!=null&&p.includes(_)):!1,[g,p]);return m.jsxs(m.Fragment,{children:[m.jsxs(Fe.Tr,{style:{boxShadow:"unset",borderBottom:b||e.isLastRow&&h?"unset":void 0,cursor:d?"pointer":"default"},"data-cy":"id"in s&&(typeof s.id=="string"||typeof s.id=="number")?`row-id-${s.id.toString()}`:`row-${c}`,className:o?"selected":void 0,onClick:()=>{d&&(a||n==null||n(),a&&o?i==null||i(s):r==null||r(s),d(s))},children:[f&&m.jsx(Fe.Td,{expand:y?{rowIndex:c,isExpanded:b,onToggle:()=>x(_=>!_)}:void 0,style:{paddingLeft:y?8:4},"data-cy":"expand-column-cell"}),u&&m.jsx(Fe.Td,{select:o!==void 0?{rowIndex:c,onSelect:(_,E)=>{E?r==null||r(s):i==null||i(s)},isSelected:o,isDisabled:g&&p?w(s):!1}:void 0,isStickyColumn:e.scrollLeft,stickyMinWidth:"0px",hasRightBorder:e.scrollLeft,"data-cy":"checkbox-column-cell",className:e.scrollLeft?"bg-lighten":void 0}),d&&m.jsx(Fe.Td,{select:{rowIndex:c,isSelected:o??!1,variant:a?"checkbox":"radio",isDisabled:g&&p?w(s):!1,props:{"aria-label":"Select row"}},isStickyColumn:e.scrollLeft,stickyMinWidth:"0px",hasRightBorder:e.scrollLeft,"data-cy":"checkbox-column-cell",className:e.scrollLeft?"bg-lighten":void 0}),m.jsx(kfe,{columns:t,item:s,rowActions:l,scrollLeft:e.scrollLeft,scrollRight:e.scrollRight})]}),f&&b&&y&&m.jsxs(Fe.Tr,{isExpanded:b,style:{boxShadow:"unset"},className:o?"selected":void 0,children:[m.jsx(Fe.Td,{}),u&&m.jsx(Fe.Th,{"aria-label":"Select",isStickyColumn:e.scrollLeft,stickyMinWidth:"0px",hasRightBorder:e.scrollLeft,className:e.scrollLeft?"bg-lighten":void 0}),d&&m.jsx(Fe.Td,{isStickyColumn:!0,stickyMinWidth:"0px",hasRightBorder:e.scrollLeft}),m.jsx(Fe.Td,{colSpan:t.length,style:{paddingBottom:S.tableLayout==="compact"?12:24,paddingTop:0},children:m.jsx(Fe.CollapseColumn,{children:y})}),l!==void 0&&l.length>0&&m.jsx(Fe.Td,{isActionCell:!0,isStickyColumn:e.scrollRight,stickyMinWidth:"0px",style:{right:0,padding:0,paddingRight:0},className:e.scrollRight?"pf-m-border-left bg-lighten":void 0,children:" "})]})]})}function kfe(e){const{columns:t,item:n,rowActions:r}=e,[i,o]=v.useState(!1);return m.jsxs(v.Fragment,{children:[t.map(a=>m.jsx(Fe.Td,{dataLabel:a.header,modifier:"nowrap",style:{width:a.minWidth===0?"0%":void 0},"data-cy":Vr(a.header+"-column-cell"),children:m.jsx(cn,{item:n,column:a})},a.header)),r!==void 0&&r.length>0&&m.jsx(Fe.Td,{isActionCell:!0,isStickyColumn:e.scrollRight,stickyMinWidth:"0px",style:{right:0,padding:0,paddingRight:8,zIndex:i?400:void 0},"data-cy":"actions-column-cell",className:e.scrollRight?"pf-m-border-left bg-lighten":void 0,children:m.jsx(Hr,{actions:r,selectedItem:n,position:"right",iconOnly:!0,onOpen:o})})]})}function Afe(e){return e.toLowerCase().split(" ").join("-")}function Pfe(){const e=v.useRef(new AbortController);return v.useEffect(()=>{const t=e.current;return()=>t.abort()},[]),e.current}function Y6(e){const{title:t,keyFn:n,actionColumns:r,actionFn:i,onComplete:o,onClose:a,processingText:s,isDanger:l,errorAdapter:c=mc,description:u,statusParser:d}=e,{t:f}=$e(),[h,g]=v.useState(e.items),[p]=kt(),[y,b]=v.useState(!0),[x,S]=v.useState(0),[w,_]=v.useState(!1),[E,O]=v.useState(0),[k,M]=v.useState(""),[A,P]=v.useState(),j=Pfe(),[D,$]=Wi(),[L,H]=v.useState([]),U=v.useCallback(()=>{_(!0),j.abort(),b(!1),P(K=>{const re={...K};for(const ae of h){const le=n(ae);re[le]===void 0&&(re[le]=f("Cancelled"))}return re})},[j,h,n,f]),B=v.useCallback(()=>{$(void 0),a==null||a(w?"canceled":k?"failures":"success",h.filter(K=>(A==null?void 0:A[n(K)])===null||(A==null?void 0:A[n(K)]).message),h.filter(K=>(A==null?void 0:A[n(K)])!==null&&typeof(A==null?void 0:A[n(K)])=="string"),h.filter(K=>(A==null?void 0:A[n(K)])===void 0)),o==null||o(L)},[k,w,h,n,a,o,$,A,L]),z=v.useCallback(()=>{M(""),b(!0),P(void 0),g(h.filter(K=>(A==null?void 0:A[n(K)])!==null&&typeof(A==null?void 0:A[n(K)])=="string")),S(x+1)},[h,n,x,A]),N=v.useMemo(()=>j.signal.aborted?p.canceledText:k?p.errorText:y?s??p.processingText:p.successText,[j.signal.aborted,k,y,s,p.canceledText,p.errorText,p.processingText,p.successText]),V=v.useMemo(()=>{if(k||w)return C.ProgressVariant.danger;if(E===h.length)return C.ProgressVariant.success},[k,w,h.length,E]);v.useEffect(()=>{function K(le,X){if(j.signal.aborted)return;let te;d&&(te=d(X)),P(ge=>({...ge??{},[le]:te!==void 0?te:null}))}function re(le,X,te){if(!j.signal.aborted){if(te instanceof Error){const ge=typeof X[0].message=="string"&&X.length===1?X[0].message:f("Unknown error");P(W=>({...W??{},[le]:ge}))}else P(ge=>({...ge??{},[le]:f("Unknown error")}));M(p.errorText)}}async function ae(){const le=Yde(5);let X=0;const te=[];await Promise.all(h.map(ge=>le(async()=>{if(j.signal.aborted)return;const W=n(ge);try{const we=await i(ge,j.signal);K(W,we),te.push(ge)}catch(we){const{genericErrors:oe,fieldErrors:Ie}=c(we),Pe=[...oe,...Ie.filter(Ge=>Ge.message)];re(W,Pe,we)}finally{j.signal.aborted||O(++X)}}))),H([...L,...te]),j.signal.aborted||b(!1)}ae()},[j,i,h,n,o,p.errorText,f,c,d,x]),v.useEffect(()=>{let K;return!y&&!k&&(K=setTimeout(()=>{B()},1e3)),()=>clearTimeout(K)},[y,k,B]);const Q=gc(h),ne=Zf(r),ee=v.useMemo(()=>y?[m.jsx(C.Button,{variant:"link",onClick:U,children:f("Cancel")},"cancel")]:k?[m.jsx(C.Button,{variant:"primary",onClick:z,children:f("Retry")},"retry"),m.jsx(C.Button,{variant:"secondary",onClick:B,children:f("Close")},"close")]:[],[k,y,U,B,z,f]);return m.jsxs(C.Modal,{titleIconVariant:l?"warning":void 0,title:t,ouiaId:t,"aria-label":t,description:u,variant:C.ModalVariant.medium,isOpen:!0,onClose:()=>{U(),B()},actions:ee,hasNoBodyWrapper:!0,children:[m.jsx(C.ModalBoxBody,{style:{paddingBottom:0,paddingLeft:0,paddingRight:0},children:m.jsx("div",{style:{display:"flex",flexDirection:"column",maxHeight:560,overflow:"hidden",borderTop:"thin solid var(--pf-v5-global--BorderColor--100)"},children:m.jsx(pc,{pageItems:[...Q.paged],itemCount:h.length,tableColumns:[...ne,{header:f("Status"),cell:K=>{const re=n(K),ae=A==null?void 0:A[re];return ae===void 0?m.jsxs("span",{style:{color:mm},children:[m.jsx(ve.PendingIcon,{}),"  ",p.pendingText]}):ae===null?m.jsxs("span",{style:{color:fm},children:[m.jsx(ve.CheckCircleIcon,{}),"  ",p.successText]}):ae.message&&ae.url?m.jsx("a",{href:ae.url,children:ae.message}):m.jsxs("span",{style:{color:hm},children:[m.jsx(ve.ExclamationCircleIcon,{}),"  ",A==null?void 0:A[re]]})}}],keyFn:n,compact:!0,errorStateTitle:"",emptyStateTitle:f("No items"),autoHidePagination:!0,disableBodyPadding:!0,...Q},"status")})}),m.jsx(C.ModalBoxBody,{style:{paddingTop:0},children:m.jsx(C.Progress,{"data-cy":"progress",value:E/h.length*100,title:N,size:C.ProgressSize.lg,variant:V})})]})}function K6(e=mc,t){const[n,r]=Wi(),[i,o]=v.useState();return v.useEffect(()=>{if(i){const a=(s,l,c,u)=>{var d;o(void 0),(d=i.onClose)==null||d.call(i,s,l,c,u)};r(m.jsx(Y6,{...i,errorAdapter:i.errorAdapter??e,statusParser:i.statusParser??t,onClose:a}))}else r(void 0)},[i,r,e,t]),o}function X6(e,t){if(e===void 0&&t===void 0)return 0;if(e===void 0)return 1;if(t===void 0)return-1;if(typeof e=="string"){if(typeof t=="string")return yc(e,t);if(typeof t=="number")return yc(e,t.toString())}else if(typeof e=="number"){if(typeof t=="number")return Z6(e,t);if(typeof t=="string")return yc(e.toString(),t)}return 0}function yc(e,t){return e===void 0&&t===void 0?0:e==null?1:t==null||e<t?-1:e>t?1:0}function Z6(e,t){return e===void 0&&t===void 0?0:e==null?1:t==null||e<t?-1:e>t?1:0}const Mfe=Me.div`
441
441
  display: flex;
442
442
  flex-direction: column;
443
443
  max-height: 560px;
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.2640",
4
+ "version": "2.4.2642",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",