asma-core-ui 2.18.18 → 2.18.19

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.
@@ -219,4 +219,4 @@ function(e,t){const n=ce(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
219
219
  *
220
220
  * @license MIT
221
221
  */
222
- function MA(t,n){return t?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(t)?e.createElement(t,n):t:null}const AA=()=>{const[e,t]=l(null),n=!!e,o=u((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:u((()=>{t(null)}),[]),handleOpen:o,anchorEl:e}};const FA="select",DA=({actions:t,autoSize:n=!0,columns:o,data:r,customSubRowData:i,initialState:l,enableRowSelection:a,disableHeaderPin:c,loading:d,noRowsOverlay:f,tableInstanceRef:h,className:m,rowHeight:b,tdClassName:v,thClassName:y,getRowClassName:w,onRowClick:x,renderSubRows:C,...O})=>{const{anchorEl:S,open:E,handleClose:k,handleOpen:R}=AA(),{anchorEl:T,open:I,handleClose:P,handleOpen:N}=AA(),_=s(null),j="function"==typeof t;n&&!o.find((e=>"width_stabilizer"===e.id))&&o.push({id:"width_stabilizer",header:"",cell:()=>null,size:NaN}),!c&&!o.find((e=>"actions"===e.id))&&o.push(function(e){const{disableHeaderPin:t,hasActions:n,handleOpenPin:o,handleOpenCellAction:r}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,size:50,headerAlign:"center",header:()=>!t&&Pe.jsx(el,{icon:"mdi:pin",className:"text-delta-600",width:20,height:20,onClick:o}),cell:e=>n?Pe.jsx("div",{className:"flex justify-center items-center",children:Pe.jsx(cR,{variant:"text",size:"small",onClick:t=>{r(t,e)},children:Pe.jsx(jl,{className:"!text-delta-800",width:24,height:24})})}):null}}({disableHeaderPin:c,hasActions:j,handleOpenPin:N,handleOpenCellAction:(e,t)=>{e.stopPropagation(),R(e),_.current=t.row,F(_.current)}})),a&&!o.find((e=>e.id===FA))&&o.unshift({id:FA,maxSize:50,header:({table:e})=>Pe.jsx(pI,{checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({row:e})=>Pe.jsx(pI,{checked:e.getIsSelected(),disabled:!e.getCanSelect(),indeterminate:e.getIsSomeSelected(),onClick:e=>e.stopPropagation(),onChange:e.getToggleSelectedHandler()})});const M=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:PA(n)}))),[r,i]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{i(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({...O,columns:o,data:r,defaultColumn:{minSize:0,size:Number.MAX_SAFE_INTEGER,maxSize:Number.MAX_SAFE_INTEGER},initialState:{...l,columnVisibility:{...null==l?void 0:l.columnVisibility,[FA]:!1}},enableRowSelection:a,getCoreRowModel:e=>BM((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const l=[];for(let s=0;s<t.length;s++){const u=NA(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return l};return n.rows=o(t),n}),{key:"development"===process.env.NODE_ENV&&"getRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e=>BM((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?function(e){const t=[],n=e=>{var o;t.push(e),null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>BM((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const i=o.getFilterFn();i?r.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const l=n.map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;o&&a&&s.length&&(l.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){c=i[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return jA(t.rows,(e=>{for(let t=0;t<l.length;t++)if(!1===e.columnFilters[l[t]])return!1;return!0}),e)}),{key:"development"===process.env.NODE_ENV&&"getFilteredRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>BM((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],i=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),l={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(l[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const a=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],a=l[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(a.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?a.sortUndefined:-a.sortUndefined)}if(0===u&&(u=a.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),a.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}}),{key:"development"===process.env.NODE_ENV&&"getSortedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})});h&&(h.current=M);const A=p((()=>[]),[]),F=u((e=>{if(!j||!e)return;const n=t(e),o=n.filter((e=>e.hide)).length??0;j&&n.length!==A.length+o&&(A.splice(0,A.length),n.forEach((e=>{e.hide||A.push(Pe.jsx(NM,{className:e.className,disabled:e.disabled,onClick:()=>{var t;_.current&&(null==(t=e.onClick)||t.call(e,_.current))},children:e.label},e.label))})))}),[t,j,A]);return Pe.jsxs(Pe.Fragment,{children:[Pe.jsxs("table",{className:bo("animate-opacity-appear-3 border-collapse overflow-y-auto",m),children:[Pe.jsx("thead",{className:"table-header-group bg-[#fcfcfd] border-t-solid border-b-solid border-y-delta-300 border-y cursor-default",children:0===r.length&&d?Pe.jsx("tr",{children:Pe.jsx("th",{colSpan:o.length,children:Pe.jsx(te,{variant:"text"})})}):M.getHeaderGroups().map((e=>Pe.jsx("tr",{children:e.headers.map((e=>{let t=e.getSize();return t=isNaN(t)||t>1200?"100%":`${t}px`,Pe.jsx("th",{colSpan:e.colSpan,className:bo("px-2.5 text-delta-500 text-[10px] font-semibold uppercase truncate",y),style:{width:t||"100%",maxWidth:t||"100%",minWidth:t||"100%"},children:e.isPlaceholder?null:Pe.jsxs("div",{className:bo("flex items-center h-[30px]",e.column.getCanSort()||"actions"===e.column.id?"cursor-pointer select-none":"",e.column.columnDef.className),style:{justifyContent:e.column.columnDef.headerAlign??"left"},onClick:e.column.getToggleSortingHandler(),children:[MA(e.column.columnDef.header,e.getContext()),{asc:Pe.jsx(Fl,{className:"text-delta-800"}),desc:Pe.jsx(Dl,{className:"text-delta-800"})}[e.column.getIsSorted()]??null]})},e.id)}))},e.id)))}),Pe.jsxs("tbody",{className:"table-row-group",children:[r.length>0&&d?Pe.jsx(Al,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-primary-500 z-10",width:50,height:50}):null,0===r.length&&d?Pe.jsx(Pe.Fragment,{children:Array.from({length:5}).map(((e,t)=>Pe.jsx("tr",{children:Pe.jsx("td",{colSpan:o.length,children:Pe.jsx(te,{variant:"text",width:"100%",height:50},t)})},t)))}):r.length>0?M.getRowModel().rows.map((e=>Pe.jsxs(g,{children:[Pe.jsx("tr",{className:bo("border-x-0 border-y border-solid border-delta-300 hover:cursor-pointer hover:bg-primary-25",(e.getIsExpanded()||e.getIsSelected())&&"bg-primary-50",d&&"opacity-50",null==w?void 0:w(e)),style:{height:b?`${b}px`:"50px"},onClick:t=>{e.getCanExpand()&&e.getToggleExpandedHandler()(),x&&x(t,e)},children:e.getVisibleCells().map((e=>{let t=e.column.getSize();return t=isNaN(t)||t>1200?"100%":`${t}px`,Pe.jsx("td",{className:bo("align-middle text-sm text-delta-900 px-2.5",e.column.id!==FA&&"truncate",v),style:{textAlign:e.column.columnDef.cellAlign??"left",width:t||"100%",maxWidth:t||"100%",minWidth:t||"100%"},children:MA(e.column.columnDef.cell,e.getContext())},e.id)}))}),e.getIsExpanded()&&Pe.jsx(Pe.Fragment,{children:i&&C&&C({rows:i.get(e.original.id.toString())??[]})})]},e.id))):Pe.jsx("tr",{className:"h-28",children:Pe.jsx("td",{colSpan:o.length,className:"text-center align-middle text-sm text-delta-900",children:f})})]})]}),!c&&Pe.jsx(PM,{anchorEl:T,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:I,onClose:P,children:M.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==FA)).map((e=>e.columnDef.header?Pe.jsxs(NM,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),children:[Pe.jsx(pI,{disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))}),j&&Pe.jsx(PM,{anchorEl:S,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:E,onClick:k,onClose:k,children:A.map((e=>e))})]})},LA=e=>Pe.jsx(C,{...e}),VA="_title_17oo0_1",$A=function(e){return Pe.jsx("div",{className:VA,children:e.children})},qA=function(e){return Pe.jsx("h1",{"data-test":e.dataTest,className:"font-roboto md:mb-2 mb-5 text-2xl font-bold leading-10 text-[#17232E]",children:e.children})};export{Ll as ArchiveIcon,wl as AssignmentIcon,xl as AssignmentOutlineIcon,rl as BellIcon,ol as BellOutlineIcon,vl as CalendarIcon,yl as CalendarRangeIcon,$l as CheckBoxCheckedIcon,bl as CheckFactOutlineIcon,Bl as CheckIcon,gl as CheckOutlineIcon,sl as ChevronDoubleLeftIcon,ul as ChevronDoubleRightIcon,ql as ChevronDownIcon,al as ChevronLeftIcon,ll as ChevronRightIcon,Hl as ChevronUpIcon,zl as CloseIcon,pl as DashboardViewIcon,fl as DashboardViewOutlineIcon,Jl as DeleteOutlineIcon,jl as DotsVerticalIcon,Vl as DownloadIcon,Xl as DragHorizontalIcon,Dl as DropDownIcon,Fl as DropUpIcon,Zl as EmptyPageIcon,Ql as FilePdfIcon,Il as FindReplaceIcon,Pl as FindReplacePeopleIcon,vO as GridRow,il as HamburgerIcon,Gl as InboxOutboxIcon,Kl as InboxOutboxOutlineIcon,Cl as ListNumberedIcon,Al as LoadingIcon,Ol as MessageProcessingIcon,Sl as MessageProcessingOutlineIcon,dl as PdfIcon,ml as PeopleIcon,hl as PeopleOutlineIcon,Ul as PermMediaIcon,Wl as PermMediaOutline,Nl as PersonIcon,_l as PersonOutlineIcon,cl as QnrIcon,El as ReportBoxIcon,kl as ReportBoxOutlineIcon,mM as RichInput,Ml as SearchIcon,Rl as SettingsIcon,Tl as SettingsOutlineIcon,rI as SnackbarProvider,LM as StyledAccordion,$M as StyledAccordionDetails,VM as StyledAccordionSummary,mR as StyledAlert,gR as StyledAlertTitle,Ne as StyledBadge,cR as StyledButton,pI as StyledCheckbox,_e as StyledChip,DM as StyledContainer,aR as StyledDataGrid,dR as StyledDialog,pR as StyledDialogActions,fR as StyledDialogContent,hR as StyledDialogTitle,IM as StyledDrawer,OM as StyledFormControl,SM as StyledFormControlLabel,Gk as StyledFormGroup,EM as StyledFormHelperText,kM as StyledFormLabel,sR as StyledGridActionsCellItem,hI as StyledInput,mI as StyledInputField,RM as StyledInputLabel,MM as StyledLink,PM as StyledMenu,NM as StyledMenuItem,_M as StyledMenuList,qA as StyledModuleTitle,LA as StyledPopover,xM as StyledRadio,CM as StyledRadioGroup,gM as StyledSelect,vM as StyledSelectAutocomplete,bM as StyledSelectItem,yM as StyledSlider,iI as StyledSnackbar,TM as StyledStack,wM as StyledSwitch,AM as StyledTab,DA as StyledTable,FM as StyledTabs,bI as StyledTextarea,xr as StyledTooltip,ea as StyledTypography,$A as StyledWidgetTitle,Yl as TopicIcon,HT as closeSnackbar,_A as createColumnHelper,me as customPalettes,qT as enqueueSnackbar,ig as gridDateComparator,de as omit,pe as pick,lI as processAlertSnackBar,aI as processInfoSnackbar,Ce as theme,fe as tokenOptimizer,nI as useSnackbar};
222
+ function MA(t,n){return t?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(t)?e.createElement(t,n):t:null}const AA=()=>{const[e,t]=l(null),n=!!e,o=u((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:u((()=>{t(null)}),[]),handleOpen:o,anchorEl:e}};const FA="select",DA=({actions:t,autoSize:n=!0,columns:o,data:r,customSubRowData:i,initialState:l,enableRowSelection:a,disableHeaderPin:c,loading:d,noRowsOverlay:f,tableInstanceRef:h,className:m,rowHeight:b,tdClassName:v,thClassName:y,getRowClassName:w,onRowClick:x,renderSubRows:C,...O})=>{const{anchorEl:S,open:E,handleClose:k,handleOpen:R}=AA(),{anchorEl:T,open:I,handleClose:P,handleOpen:N}=AA(),_=s(null),j="function"==typeof t;n&&!o.find((e=>"width_stabilizer"===e.id))&&o.push({id:"width_stabilizer",header:"",cell:()=>null,size:NaN}),!c&&!o.find((e=>"actions"===e.id))&&o.push(function(e){const{disableHeaderPin:t,hasActions:n,handleOpenPin:o,handleOpenCellAction:r}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,size:50,headerAlign:"center",header:()=>!t&&Pe.jsx(el,{icon:"mdi:pin",className:"text-delta-600",width:20,height:20,onClick:o}),cell:e=>n?Pe.jsx("div",{className:"flex justify-center items-center",children:Pe.jsx(cR,{variant:"text",size:"small",onClick:t=>{r(t,e)},children:Pe.jsx(jl,{className:"!text-delta-800",width:24,height:24})})}):null}}({disableHeaderPin:c,hasActions:j,handleOpenPin:N,handleOpenCellAction:(e,t)=>{e.stopPropagation(),R(e),_.current=t.row,F(_.current)}})),a&&!o.find((e=>e.id===FA))&&o.unshift({id:FA,maxSize:50,header:({table:e})=>Pe.jsx(pI,{checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({row:e})=>Pe.jsx(pI,{checked:e.getIsSelected(),disabled:!e.getCanSelect(),indeterminate:e.getIsSomeSelected(),onClick:e=>e.stopPropagation(),onChange:e.getToggleSelectedHandler()})});const M=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:PA(n)}))),[r,i]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{i(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({...O,columns:o,data:r,defaultColumn:{minSize:0,size:Number.MAX_SAFE_INTEGER,maxSize:Number.MAX_SAFE_INTEGER},initialState:{...l,columnVisibility:{...null==l?void 0:l.columnVisibility,[FA]:!1}},enableRowSelection:a,getCoreRowModel:e=>BM((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const l=[];for(let s=0;s<t.length;s++){const u=NA(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return l};return n.rows=o(t),n}),{key:"development"===process.env.NODE_ENV&&"getRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e=>BM((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?function(e){const t=[],n=e=>{var o;t.push(e),null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>BM((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const i=o.getFilterFn();i?r.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const l=n.map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;o&&a&&s.length&&(l.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){c=i[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return jA(t.rows,(e=>{for(let t=0;t<l.length;t++)if(!1===e.columnFilters[l[t]])return!1;return!0}),e)}),{key:"development"===process.env.NODE_ENV&&"getFilteredRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>BM((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],i=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),l={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(l[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const a=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],a=l[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(a.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?a.sortUndefined:-a.sortUndefined)}if(0===u&&(u=a.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),a.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}}),{key:"development"===process.env.NODE_ENV&&"getSortedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getRowId:O.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString())});h&&(h.current=M);const A=p((()=>[]),[]),F=u((e=>{if(!j||!e)return;const n=t(e),o=n.filter((e=>e.hide)).length??0;j&&n.length!==A.length+o&&(A.splice(0,A.length),n.forEach((e=>{e.hide||A.push(Pe.jsx(NM,{className:e.className,disabled:e.disabled,onClick:()=>{var t;_.current&&(null==(t=e.onClick)||t.call(e,_.current))},children:e.label},e.label))})))}),[t,j,A]);return Pe.jsxs(Pe.Fragment,{children:[Pe.jsxs("table",{className:bo("animate-opacity-appear-3 border-collapse overflow-y-auto",m),children:[Pe.jsx("thead",{className:"table-header-group bg-[#fcfcfd] border-t-solid border-b-solid border-y-delta-300 border-y cursor-default",children:0===r.length&&d?Pe.jsx("tr",{children:Pe.jsx("th",{colSpan:o.length,children:Pe.jsx(te,{variant:"text"})})}):M.getHeaderGroups().map((e=>Pe.jsx("tr",{children:e.headers.map((e=>{let t=e.getSize();return t=isNaN(t)||t>1200?"100%":`${t}px`,Pe.jsx("th",{colSpan:e.colSpan,className:bo("px-2.5 text-delta-500 text-[10px] font-semibold uppercase truncate",y),style:{width:t||"100%",maxWidth:t||"100%",minWidth:t||"100%"},children:e.isPlaceholder?null:Pe.jsxs("div",{className:bo("flex items-center h-[30px]",e.column.getCanSort()||"actions"===e.column.id?"cursor-pointer select-none":"",e.column.columnDef.className),style:{justifyContent:e.column.columnDef.headerAlign??"left"},onClick:e.column.getToggleSortingHandler(),children:[MA(e.column.columnDef.header,e.getContext()),{asc:Pe.jsx(Fl,{className:"text-delta-800"}),desc:Pe.jsx(Dl,{className:"text-delta-800"})}[e.column.getIsSorted()]??null]})},e.id)}))},e.id)))}),Pe.jsxs("tbody",{className:"table-row-group",children:[r.length>0&&d?Pe.jsx(Al,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-primary-500 z-10",width:50,height:50}):null,0===r.length&&d?Pe.jsx(Pe.Fragment,{children:Array.from({length:5}).map(((e,t)=>Pe.jsx("tr",{children:Pe.jsx("td",{colSpan:o.length,children:Pe.jsx(te,{variant:"text",width:"100%",height:50},t)})},t)))}):r.length>0?M.getRowModel().rows.map((e=>Pe.jsxs(g,{children:[Pe.jsx("tr",{className:bo("border-x-0 border-y border-solid border-delta-300 hover:cursor-pointer hover:bg-primary-25",(e.getIsExpanded()||e.getIsSelected())&&"bg-primary-50",d&&"opacity-50",null==w?void 0:w(e)),style:{height:b?`${b}px`:"50px"},onClick:t=>{e.getCanExpand()&&e.getToggleExpandedHandler()(),x&&x(t,e)},children:e.getVisibleCells().map((e=>{let t=e.column.getSize();return t=isNaN(t)||t>1200?"100%":`${t}px`,Pe.jsx("td",{className:bo("align-middle text-sm text-delta-900 px-2.5",e.column.id!==FA&&"truncate",v),style:{textAlign:e.column.columnDef.cellAlign??"left",width:t||"100%",maxWidth:t||"100%",minWidth:t||"100%"},children:MA(e.column.columnDef.cell,e.getContext())},e.id)}))}),e.getIsExpanded()&&Pe.jsx(Pe.Fragment,{children:i&&C&&C({rows:i.get(e.original.id.toString())??[]})})]},e.id))):Pe.jsx("tr",{className:"h-28",children:Pe.jsx("td",{colSpan:o.length,className:"text-center align-middle text-sm text-delta-900",children:f})})]})]}),!c&&Pe.jsx(PM,{anchorEl:T,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:I,onClose:P,children:M.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==FA)).map((e=>e.columnDef.header?Pe.jsxs(NM,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),children:[Pe.jsx(pI,{disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))}),j&&Pe.jsx(PM,{anchorEl:S,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:E,onClick:k,onClose:k,children:A.map((e=>e))})]})},LA=e=>Pe.jsx(C,{...e}),VA="_title_17oo0_1",$A=function(e){return Pe.jsx("div",{className:VA,children:e.children})},qA=function(e){return Pe.jsx("h1",{"data-test":e.dataTest,className:"font-roboto md:mb-2 mb-5 text-2xl font-bold leading-10 text-[#17232E]",children:e.children})};export{Ll as ArchiveIcon,wl as AssignmentIcon,xl as AssignmentOutlineIcon,rl as BellIcon,ol as BellOutlineIcon,vl as CalendarIcon,yl as CalendarRangeIcon,$l as CheckBoxCheckedIcon,bl as CheckFactOutlineIcon,Bl as CheckIcon,gl as CheckOutlineIcon,sl as ChevronDoubleLeftIcon,ul as ChevronDoubleRightIcon,ql as ChevronDownIcon,al as ChevronLeftIcon,ll as ChevronRightIcon,Hl as ChevronUpIcon,zl as CloseIcon,pl as DashboardViewIcon,fl as DashboardViewOutlineIcon,Jl as DeleteOutlineIcon,jl as DotsVerticalIcon,Vl as DownloadIcon,Xl as DragHorizontalIcon,Dl as DropDownIcon,Fl as DropUpIcon,Zl as EmptyPageIcon,Ql as FilePdfIcon,Il as FindReplaceIcon,Pl as FindReplacePeopleIcon,vO as GridRow,il as HamburgerIcon,Gl as InboxOutboxIcon,Kl as InboxOutboxOutlineIcon,Cl as ListNumberedIcon,Al as LoadingIcon,Ol as MessageProcessingIcon,Sl as MessageProcessingOutlineIcon,dl as PdfIcon,ml as PeopleIcon,hl as PeopleOutlineIcon,Ul as PermMediaIcon,Wl as PermMediaOutline,Nl as PersonIcon,_l as PersonOutlineIcon,cl as QnrIcon,El as ReportBoxIcon,kl as ReportBoxOutlineIcon,mM as RichInput,Ml as SearchIcon,Rl as SettingsIcon,Tl as SettingsOutlineIcon,rI as SnackbarProvider,LM as StyledAccordion,$M as StyledAccordionDetails,VM as StyledAccordionSummary,mR as StyledAlert,gR as StyledAlertTitle,Ne as StyledBadge,cR as StyledButton,pI as StyledCheckbox,_e as StyledChip,DM as StyledContainer,aR as StyledDataGrid,dR as StyledDialog,pR as StyledDialogActions,fR as StyledDialogContent,hR as StyledDialogTitle,IM as StyledDrawer,OM as StyledFormControl,SM as StyledFormControlLabel,Gk as StyledFormGroup,EM as StyledFormHelperText,kM as StyledFormLabel,sR as StyledGridActionsCellItem,hI as StyledInput,mI as StyledInputField,RM as StyledInputLabel,MM as StyledLink,PM as StyledMenu,NM as StyledMenuItem,_M as StyledMenuList,qA as StyledModuleTitle,LA as StyledPopover,xM as StyledRadio,CM as StyledRadioGroup,gM as StyledSelect,vM as StyledSelectAutocomplete,bM as StyledSelectItem,yM as StyledSlider,iI as StyledSnackbar,TM as StyledStack,wM as StyledSwitch,AM as StyledTab,DA as StyledTable,FM as StyledTabs,bI as StyledTextarea,xr as StyledTooltip,ea as StyledTypography,$A as StyledWidgetTitle,Yl as TopicIcon,HT as closeSnackbar,_A as createColumnHelper,me as customPalettes,qT as enqueueSnackbar,ig as gridDateComparator,de as omit,pe as pick,lI as processAlertSnackBar,aI as processInfoSnackbar,Ce as theme,fe as tokenOptimizer,nI as useSnackbar};
@@ -23,6 +23,7 @@ export interface StyledTableProps<TData, TCustomData> extends Omit<TableOptions<
23
23
  renderSubRows?: (props: {
24
24
  rows: TCustomData[];
25
25
  }) => ReactElement;
26
+ getRowSelectionIds?: (ids: string[]) => void;
26
27
  }
27
28
  export declare const StyledTable: <TData extends {
28
29
  id: string | number;
@@ -1,3 +1,3 @@
1
1
  export * from './types';
2
2
  export * from './StyledTable';
3
- export { createColumnHelper, type Table } from '@tanstack/react-table';
3
+ export { createColumnHelper, type Table, type Row } from '@tanstack/react-table';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "2.18.18",
6
+ "version": "2.18.19",
7
7
  "type": "module",
8
8
  "files": [
9
9
  "dist/**/*",