asma-core-ui 2.16.1 → 2.16.2
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.
package/dist/asma-core-ui.es.js
CHANGED
|
@@ -213,4 +213,4 @@ function(e,t){const n=re(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
|
|
|
213
213
|
*
|
|
214
214
|
* @license MIT
|
|
215
215
|
*/
|
|
216
|
-
function OP(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 kP=()=>{const[e,t]=p(null),n=!!e,o=r((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:r((()=>{t(null)}),[]),handleOpen:o,anchorEl:e}},IP="select",TP=({actions:t,columns:n,data:r,customSubRowData:i,initialState:a,enableRowSelection:s,disableHeaderPin:u,tableInstanceRef:d,tdClassName:p,thClassName:f,renderSubRows:m,...g})=>{const{anchorEl:b,open:v,handleClose:y,handleOpen:w}=kP(),{anchorEl:x,open:C,handleClose:R,handleOpen:S}=kP(),E=t&&t.length>0,O=o(null),k={id:"actions",enableHiding:!1,enableSorting:!1,maxSize:50,header:()=>!u&&Ce.jsx(Ss,{icon:"mdi:pin",className:"text-delta-600",width:20,height:20,onClick:S}),cell:e=>E?Ce.jsx(rM,{className:"m-auto",variant:"text",size:"small",onClick:t=>{t.stopPropagation(),w(t),O.current=e.row},children:Ce.jsx($c,{className:"!text-delta-800",width:24,height:24})}):null};!u&&!n.find((e=>e.id===k.id))&&n.push(k),s&&!n.find((e=>e.id===IP))&&n.unshift({id:IP,maxSize:50,header:({table:e})=>Ce.jsx(fM,{checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({row:e})=>Ce.jsx("div",{className:"px-1",children:Ce.jsx(fM,{checked:e.getIsSelected(),disabled:!e.getCanSelect(),indeterminate:e.getIsSomeSelected(),onChange:e.getToggleSelectedHandler()})})});const I=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:RP(n)}))),[r,l]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{l(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({...g,columns:n,data:r,defaultColumn:{minSize:0,size:Number.MAX_SAFE_INTEGER,maxSize:Number.MAX_SAFE_INTEGER},initialState:{...a,columnVisibility:{...null==a?void 0:a.columnVisibility,[IP]:!1}},enableRowSelection:s,getCoreRowModel:e=>VM((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,l){void 0===r&&(r=0);const i=[];for(let s=0;s<t.length;s++){const c=SP(e,e._getRowId(t[s],s,l),t[s],s,r,void 0,null==l?void 0:l.id);var a;n.flatRows.push(c),n.rowsById[c.id]=c,i.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=c.originalSubRows)&&a.length&&(c.subRows=o(c.originalSubRows,r+1,c)))}return i};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=>VM((()=>[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=>VM((()=>[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=[],l=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const l=o.getFilterFn();l?r.push({id:t.id,filterFn:l,resolvedValue:null!=(n=null==l.resolveFilterValue?void 0:l.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 i=n.map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let c,u;o&&a&&s.length&&(i.push("__global__"),s.forEach((e=>{var t;l.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++){c=r[e];const t=c.id;n.columnFilters[t]=c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(l.length){for(let e=0;e<l.length;e++){u=l[e];const t=u.id;if(u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return EP(t.rows,(e=>{for(let t=0;t<i.length;t++)if(!1===e.columnFilters[i[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=>VM((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],l=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),i={};l.forEach((t=>{const n=e.getColumn(t.id);n&&(i[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<l.length;o+=1){var n;const r=l[o],a=i[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let c=0;if(a.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(c=n&&o?0:n?a.sortUndefined:-a.sortUndefined)}if(0===c&&(c=a.sortingFn(e,t,r.id)),0!==c)return s&&(c*=-1),a.invertSorting&&(c*=-1),c}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()}})});d&&(d.current=I);const T=c((()=>[]),[]);return l((()=>{E&&t.length!==T.length&&t.forEach((e=>T.push(Ce.jsx(TM,{disabled:e.disabled,onClick:()=>e.onClick(O.current),children:e.label},e.label))))}),[t,E,T]),Ce.jsxs(Ce.Fragment,{children:[Ce.jsxs("table",{className:"border-collapse table-fixed w-full",children:[Ce.jsx("thead",{className:"table-header-group bg-[#fcfcfd] border-x-0 border-y border-solid border-y-delta-300",children:I.getHeaderGroups().map((e=>Ce.jsx("tr",{children:e.headers.map((e=>Ce.jsx("th",{colSpan:e.colSpan,className:Ko("px-2.5 text-delta-500 text-[10px] font-semibold uppercase overflow-hidden whitespace-nowrap overflow-ellipsis",f),style:{width:e.getSize()===Number.MAX_SAFE_INTEGER?"auto":e.getSize()},children:e.isPlaceholder?null:Ce.jsxs("div",{className:Ko("flex justify-center items-center h-[30px]",e.column.getCanSort()?"cursor-pointer select-none":""),onClick:e.column.getToggleSortingHandler(),children:[OP(e.column.columnDef.header,e.getContext()),{asc:Ce.jsx(Ac,{className:"text-delta-800"}),desc:Ce.jsx(zc,{className:"text-delta-800"})}[e.column.getIsSorted()]??null]})},e.id)))},e.id)))}),Ce.jsx("tbody",{className:"table-row-group",children:I.getRowModel().rows.map((e=>Ce.jsxs(h,{children:[Ce.jsx("tr",{className:Ko("border-x-0 border-y border-solid border-delta-300 h-[50px] hover:cursor-pointer hover:bg-primary-25",(e.getIsExpanded()||e.getIsSelected())&&"bg-primary-50"),onClick:e.getToggleExpandedHandler(),children:e.getVisibleCells().map((e=>Ce.jsx("td",{className:Ko("text-center align-middle text-sm text-delta-900",p),style:{width:e.column.getSize()===Number.MAX_SAFE_INTEGER?"auto":e.column.getSize()},children:OP(e.column.columnDef.cell,e.getContext())},e.id)))}),e.getIsExpanded()&&Ce.jsx("tr",{children:Ce.jsx("td",{colSpan:e.getVisibleCells().length,className:"border-t border-delta-300",children:i&&m&&m({rows:i.get(e.original.id)??[]})})})]},e.id)))})]}),!u&&Ce.jsx(IM,{anchorEl:x,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:C,onClose:R,children:I.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==IP)).map((e=>e.columnDef.header?Ce.jsxs(TM,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),children:[Ce.jsx(fM,{disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))}),E&&Ce.jsx(IM,{anchorEl:b,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:v,onClick:y,onClose:y,children:T.map((e=>e))})]})},MP="_title_17oo0_1",PP=function(e){return Ce.jsx("div",{className:MP,children:e.children})},NP=function(e){return Ce.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{Hc as ArchiveIcon,Rc as AssignmentIcon,Sc as AssignmentOutlineIcon,ac as BellIcon,ic as BellOutlineIcon,xc as CalendarIcon,Cc as CalendarRangeIcon,Bc as CheckBoxCheckedIcon,wc as CheckFactOutlineIcon,Uc as CheckIcon,yc as CheckOutlineIcon,dc as ChevronDoubleLeftIcon,pc as ChevronDoubleRightIcon,qc as ChevronDownIcon,uc as ChevronLeftIcon,cc as ChevronRightIcon,Gc as ChevronUpIcon,Wc as CloseIcon,gc as DashboardViewIcon,hc as DashboardViewOutlineIcon,$c as DotsVerticalIcon,_c as DownloadIcon,zc as DropDownIcon,Ac as DropUpIcon,Nc as FindReplaceIcon,jc as FindReplacePeopleIcon,pO as GridRow,sc as HamburgerIcon,Xc as InboxOutboxIcon,Zc as InboxOutboxOutlineIcon,Ec as ListNumberedIcon,Lc as LoadingIcon,Oc as MessageProcessingIcon,kc as MessageProcessingOutlineIcon,mc as PdfIcon,vc as PeopleIcon,bc as PeopleOutlineIcon,Kc as PermMediaIcon,Yc as PermMediaOutline,Fc as PersonIcon,Dc as PersonOutlineIcon,fc as QnrIcon,Ic as ReportBoxIcon,Tc as ReportBoxOutlineIcon,Vc as SearchIcon,Mc as SettingsIcon,Pc as SettingsOutlineIcon,Is as SnackbarProvider,PM as StyledAccordion,jM as StyledAccordionDetails,NM as StyledAccordionSummary,Es as StyledAlert,Os as StyledAlertTitle,Ms as StyledBadge,rM as StyledButton,fM as StyledCheckbox,tM as StyledDataGrid,lM as StyledDialog,iM as StyledDialogActions,aM as StyledDialogContent,sM as StyledDialogTitle,Vn as StyledEngineProvider,RM as StyledFormControl,SM as StyledFormControlLabel,HT as StyledFormGroup,EM as StyledFormHelperText,wM as StyledFormLabel,nM as StyledGridActionsCellItem,mM as StyledInput,hM as StyledInputField,OM as StyledInputLabel,IM as StyledMenu,TM as StyledMenuItem,MM as StyledMenuList,NP as StyledModuleTitle,bM as StyledSelect,vM as StyledSelectItem,yM as StyledSlider,cM as StyledSnackbar,kM as StyledStack,CM as StyledSwitch,TP as StyledTable,xM as StyledTextField,oc as StyledTooltip,Jc as StyledTypography,PP as StyledWidgetTitle,Ts as ThemeProvider,Qc as TopicIcon,Pi as closeSnackbar,Xr as createTheme,ce as customPalettes,Mi as enqueueSnackbar,Jv as gridDateComparator,le as omit,ie as pick,he as theme,ae as tokenOptimizer,Gi as useSnackbar};
|
|
216
|
+
function OP(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 kP=()=>{const[e,t]=p(null),n=!!e,o=r((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:r((()=>{t(null)}),[]),handleOpen:o,anchorEl:e}},IP="select",TP=({actions:t,columns:n,data:r,customSubRowData:i,initialState:a,enableRowSelection:s,disableHeaderPin:u,tableInstanceRef:d,tdClassName:p,thClassName:f,renderSubRows:m,...g})=>{const{anchorEl:b,open:v,handleClose:y,handleOpen:w}=kP(),{anchorEl:x,open:C,handleClose:R,handleOpen:S}=kP(),E=t&&t.length>0,O=o(null),k={id:"actions",enableHiding:!1,enableSorting:!1,maxSize:50,header:()=>!u&&Ce.jsx(Ss,{icon:"mdi:pin",className:"text-delta-600",width:20,height:20,onClick:S}),cell:e=>E?Ce.jsx(rM,{className:"m-auto",variant:"text",size:"small",onClick:t=>{t.stopPropagation(),w(t),O.current=e.row},children:Ce.jsx($c,{className:"!text-delta-800",width:24,height:24})}):null};!u&&!n.find((e=>e.id===k.id))&&n.push(k),s&&!n.find((e=>e.id===IP))&&n.unshift({id:IP,maxSize:50,header:({table:e})=>Ce.jsx(fM,{checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({row:e})=>Ce.jsx("div",{className:"px-1",children:Ce.jsx(fM,{checked:e.getIsSelected(),disabled:!e.getCanSelect(),indeterminate:e.getIsSomeSelected(),onChange:e.getToggleSelectedHandler()})})});const I=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:RP(n)}))),[r,l]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{l(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({...g,columns:n,data:r,defaultColumn:{minSize:0,size:Number.MAX_SAFE_INTEGER,maxSize:Number.MAX_SAFE_INTEGER},initialState:{...a,columnVisibility:{...null==a?void 0:a.columnVisibility,[IP]:!1}},enableRowSelection:s,getCoreRowModel:e=>VM((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,l){void 0===r&&(r=0);const i=[];for(let s=0;s<t.length;s++){const c=SP(e,e._getRowId(t[s],s,l),t[s],s,r,void 0,null==l?void 0:l.id);var a;n.flatRows.push(c),n.rowsById[c.id]=c,i.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=c.originalSubRows)&&a.length&&(c.subRows=o(c.originalSubRows,r+1,c)))}return i};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=>VM((()=>[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=>VM((()=>[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=[],l=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const l=o.getFilterFn();l?r.push({id:t.id,filterFn:l,resolvedValue:null!=(n=null==l.resolveFilterValue?void 0:l.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 i=n.map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let c,u;o&&a&&s.length&&(i.push("__global__"),s.forEach((e=>{var t;l.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++){c=r[e];const t=c.id;n.columnFilters[t]=c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(l.length){for(let e=0;e<l.length;e++){u=l[e];const t=u.id;if(u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return EP(t.rows,(e=>{for(let t=0;t<i.length;t++)if(!1===e.columnFilters[i[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=>VM((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],l=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),i={};l.forEach((t=>{const n=e.getColumn(t.id);n&&(i[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<l.length;o+=1){var n;const r=l[o],a=i[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let c=0;if(a.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(c=n&&o?0:n?a.sortUndefined:-a.sortUndefined)}if(0===c&&(c=a.sortingFn(e,t,r.id)),0!==c)return s&&(c*=-1),a.invertSorting&&(c*=-1),c}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()}})});d&&(d.current=I);const T=c((()=>[]),[]);return l((()=>{E&&t.length!==T.length&&t.forEach((e=>T.push(Ce.jsx(TM,{disabled:e.disabled,onClick:()=>{var t;O.current&&(null==(t=e.onClick)||t.call(e,O.current))},children:e.label},e.label))))}),[t,E,T]),Ce.jsxs(Ce.Fragment,{children:[Ce.jsxs("table",{className:"border-collapse table-fixed w-full",children:[Ce.jsx("thead",{className:"table-header-group bg-[#fcfcfd] border-x-0 border-y border-solid border-y-delta-300",children:I.getHeaderGroups().map((e=>Ce.jsx("tr",{children:e.headers.map((e=>Ce.jsx("th",{colSpan:e.colSpan,className:Ko("px-2.5 text-delta-500 text-[10px] font-semibold uppercase overflow-hidden whitespace-nowrap overflow-ellipsis",f),style:{width:e.getSize()===Number.MAX_SAFE_INTEGER?"auto":e.getSize()},children:e.isPlaceholder?null:Ce.jsxs("div",{className:Ko("flex justify-center items-center h-[30px]",e.column.getCanSort()?"cursor-pointer select-none":""),onClick:e.column.getToggleSortingHandler(),children:[OP(e.column.columnDef.header,e.getContext()),{asc:Ce.jsx(Ac,{className:"text-delta-800"}),desc:Ce.jsx(zc,{className:"text-delta-800"})}[e.column.getIsSorted()]??null]})},e.id)))},e.id)))}),Ce.jsx("tbody",{className:"table-row-group",children:I.getRowModel().rows.map((e=>Ce.jsxs(h,{children:[Ce.jsx("tr",{className:Ko("border-x-0 border-y border-solid border-delta-300 h-[50px] hover:cursor-pointer hover:bg-primary-25",(e.getIsExpanded()||e.getIsSelected())&&"bg-primary-50"),onClick:e.getToggleExpandedHandler(),children:e.getVisibleCells().map((e=>Ce.jsx("td",{className:Ko("text-center align-middle text-sm text-delta-900",p),style:{width:e.column.getSize()===Number.MAX_SAFE_INTEGER?"auto":e.column.getSize()},children:OP(e.column.columnDef.cell,e.getContext())},e.id)))}),e.getIsExpanded()&&Ce.jsx("tr",{children:Ce.jsx("td",{colSpan:e.getVisibleCells().length,className:"border-t border-delta-300",children:i&&m&&m({rows:i.get(e.original.id)??[]})})})]},e.id)))})]}),!u&&Ce.jsx(IM,{anchorEl:x,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:C,onClose:R,children:I.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==IP)).map((e=>e.columnDef.header?Ce.jsxs(TM,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),children:[Ce.jsx(fM,{disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))}),E&&Ce.jsx(IM,{anchorEl:b,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:v,onClick:y,onClose:y,children:T.map((e=>e))})]})},MP="_title_17oo0_1",PP=function(e){return Ce.jsx("div",{className:MP,children:e.children})},NP=function(e){return Ce.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{Hc as ArchiveIcon,Rc as AssignmentIcon,Sc as AssignmentOutlineIcon,ac as BellIcon,ic as BellOutlineIcon,xc as CalendarIcon,Cc as CalendarRangeIcon,Bc as CheckBoxCheckedIcon,wc as CheckFactOutlineIcon,Uc as CheckIcon,yc as CheckOutlineIcon,dc as ChevronDoubleLeftIcon,pc as ChevronDoubleRightIcon,qc as ChevronDownIcon,uc as ChevronLeftIcon,cc as ChevronRightIcon,Gc as ChevronUpIcon,Wc as CloseIcon,gc as DashboardViewIcon,hc as DashboardViewOutlineIcon,$c as DotsVerticalIcon,_c as DownloadIcon,zc as DropDownIcon,Ac as DropUpIcon,Nc as FindReplaceIcon,jc as FindReplacePeopleIcon,pO as GridRow,sc as HamburgerIcon,Xc as InboxOutboxIcon,Zc as InboxOutboxOutlineIcon,Ec as ListNumberedIcon,Lc as LoadingIcon,Oc as MessageProcessingIcon,kc as MessageProcessingOutlineIcon,mc as PdfIcon,vc as PeopleIcon,bc as PeopleOutlineIcon,Kc as PermMediaIcon,Yc as PermMediaOutline,Fc as PersonIcon,Dc as PersonOutlineIcon,fc as QnrIcon,Ic as ReportBoxIcon,Tc as ReportBoxOutlineIcon,Vc as SearchIcon,Mc as SettingsIcon,Pc as SettingsOutlineIcon,Is as SnackbarProvider,PM as StyledAccordion,jM as StyledAccordionDetails,NM as StyledAccordionSummary,Es as StyledAlert,Os as StyledAlertTitle,Ms as StyledBadge,rM as StyledButton,fM as StyledCheckbox,tM as StyledDataGrid,lM as StyledDialog,iM as StyledDialogActions,aM as StyledDialogContent,sM as StyledDialogTitle,Vn as StyledEngineProvider,RM as StyledFormControl,SM as StyledFormControlLabel,HT as StyledFormGroup,EM as StyledFormHelperText,wM as StyledFormLabel,nM as StyledGridActionsCellItem,mM as StyledInput,hM as StyledInputField,OM as StyledInputLabel,IM as StyledMenu,TM as StyledMenuItem,MM as StyledMenuList,NP as StyledModuleTitle,bM as StyledSelect,vM as StyledSelectItem,yM as StyledSlider,cM as StyledSnackbar,kM as StyledStack,CM as StyledSwitch,TP as StyledTable,xM as StyledTextField,oc as StyledTooltip,Jc as StyledTypography,PP as StyledWidgetTitle,Ts as ThemeProvider,Qc as TopicIcon,Pi as closeSnackbar,Xr as createTheme,ce as customPalettes,Mi as enqueueSnackbar,Jv as gridDateComparator,le as omit,ie as pick,he as theme,ae as tokenOptimizer,Gi as useSnackbar};
|
|
@@ -4,7 +4,7 @@ interface StyledTableProps<TData, TCustomData> extends Omit<TableOptions<TData>,
|
|
|
4
4
|
actions?: {
|
|
5
5
|
label: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
|
-
onClick
|
|
7
|
+
onClick?: (row: Row<TData>) => void;
|
|
8
8
|
}[];
|
|
9
9
|
customSubRowData?: Map<string, TCustomData[]>;
|
|
10
10
|
disableHeaderPin?: boolean;
|