mantine-datatable 1.7.12 → 1.7.13

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.
Files changed (63) hide show
  1. package/dist/DataTable.d.ts +2 -2
  2. package/dist/DataTable.d.ts.map +1 -1
  3. package/dist/DataTableFooter.d.ts +3 -3
  4. package/dist/DataTableFooter.d.ts.map +1 -1
  5. package/dist/DataTableHeader.d.ts +1 -1
  6. package/dist/DataTableHeader.d.ts.map +1 -1
  7. package/dist/DataTableHeaderCell.d.ts +1 -1
  8. package/dist/DataTableHeaderCell.d.ts.map +1 -1
  9. package/dist/DataTablePageSizeSelector.d.ts +12 -0
  10. package/dist/DataTablePageSizeSelector.d.ts.map +1 -0
  11. package/dist/DataTableRow.d.ts +1 -1
  12. package/dist/DataTableRow.d.ts.map +1 -1
  13. package/dist/DataTableRowCell.d.ts +1 -1
  14. package/dist/DataTableRowCell.d.ts.map +1 -1
  15. package/dist/DataTableRowExpansion.d.ts +1 -1
  16. package/dist/DataTableRowExpansion.d.ts.map +1 -1
  17. package/dist/hooks.d.ts +2 -2
  18. package/dist/hooks.d.ts.map +1 -1
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.cjs.map +4 -4
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.mjs +1 -1
  24. package/dist/index.mjs.map +4 -4
  25. package/dist/types/DataTableCellClickHandler.d.ts +20 -0
  26. package/dist/types/DataTableCellClickHandler.d.ts.map +1 -0
  27. package/dist/types/DataTableColumn.d.ts +71 -0
  28. package/dist/types/DataTableColumn.d.ts.map +1 -0
  29. package/dist/types/DataTableColumnTextAlignment.d.ts +2 -0
  30. package/dist/types/DataTableColumnTextAlignment.d.ts.map +1 -0
  31. package/dist/types/DataTableContextMenuItemProps.d.ts +48 -0
  32. package/dist/types/DataTableContextMenuItemProps.d.ts.map +1 -0
  33. package/dist/types/DataTableContextMenuProps.d.ts +30 -0
  34. package/dist/types/DataTableContextMenuProps.d.ts.map +1 -0
  35. package/dist/types/DataTableEmptyStateProps.d.ts +16 -0
  36. package/dist/types/DataTableEmptyStateProps.d.ts.map +1 -0
  37. package/dist/types/DataTableOuterBorderProps.d.ts +15 -0
  38. package/dist/types/DataTableOuterBorderProps.d.ts.map +1 -0
  39. package/dist/types/DataTablePageSizeSelectorProps.d.ts +19 -0
  40. package/dist/types/DataTablePageSizeSelectorProps.d.ts.map +1 -0
  41. package/dist/types/DataTablePaginationProps.d.ts +59 -0
  42. package/dist/types/DataTablePaginationProps.d.ts.map +1 -0
  43. package/dist/types/DataTableProps.d.ts +97 -0
  44. package/dist/types/DataTableProps.d.ts.map +1 -0
  45. package/dist/types/DataTableRowExpansionCollapseProps.d.ts +3 -0
  46. package/dist/types/DataTableRowExpansionCollapseProps.d.ts.map +1 -0
  47. package/dist/types/DataTableRowExpansionProps.d.ts +45 -0
  48. package/dist/types/DataTableRowExpansionProps.d.ts.map +1 -0
  49. package/dist/types/DataTableSelectionProps.d.ts +20 -0
  50. package/dist/types/DataTableSelectionProps.d.ts.map +1 -0
  51. package/dist/types/DataTableSortProps.d.ts +15 -0
  52. package/dist/types/DataTableSortProps.d.ts.map +1 -0
  53. package/dist/types/DataTableSortStatus.d.ts +12 -0
  54. package/dist/types/DataTableSortStatus.d.ts.map +1 -0
  55. package/dist/types/DataTableVerticalAlignment.d.ts +2 -0
  56. package/dist/types/DataTableVerticalAlignment.d.ts.map +1 -0
  57. package/dist/types/index.d.ts +16 -0
  58. package/dist/types/index.d.ts.map +1 -0
  59. package/dist/types/utils.d.ts +5 -0
  60. package/dist/types/utils.d.ts.map +1 -0
  61. package/package.json +1 -1
  62. package/dist/DataTable.props.d.ts +0 -407
  63. package/dist/DataTable.props.d.ts.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import*as c from"react";import{Box as Sa,createStyles as Ba,packSx as Oa,Table as wa}from"@mantine/core";import{useElementSize as ge}from"@mantine/hooks";import{useEffect as Ta}from"react";import{createStyles as eo}from"@mantine/core";import{jsx as tr}from"react/jsx-runtime";var ro=eo({root:{"&&":{background:"transparent"}}});function ke(){let{classes:e}=ro();return tr("tr",{className:e.root,children:tr("td",{})})}import{Center as lo,createStyles as so,Text as uo}from"@mantine/core";function A(){return A=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o])}return e},A.apply(this,arguments)}function oo(e,r){if(e==null)return{};var a={},o=Object.keys(e),t,f;for(f=0;f<o.length;f++)t=o[f],!(r.indexOf(t)>=0)&&(a[t]=e[t]);return a}function W(e,r){if(e==null)return{};var a=oo(e,r),o,t;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(t=0;t<f.length;t++)o=f[t],!(r.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,o)||(a[o]=e[o]))}return a}import Y from"react";var ao=["size","color"];function De(e){var r=e.size,a=r===void 0?24:r,o=e.color,t=o===void 0?"currentColor":o,f=W(e,ao);return Y.createElement("svg",A({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrow-down",width:a,height:a,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),Y.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Y.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),Y.createElement("line",{x1:"18",y1:"13",x2:"12",y2:"19"}),Y.createElement("line",{x1:"6",y1:"13",x2:"12",y2:"19"}))}import _ from"react";var to=["size","color"];function Pe(e){var r=e.size,a=r===void 0?24:r,o=e.color,t=o===void 0?"currentColor":o,f=W(e,to);return _.createElement("svg",A({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrows-vertical",width:a,height:a,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),_.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),_.createElement("polyline",{points:"8 7 12 3 16 7"}),_.createElement("polyline",{points:"8 17 12 21 16 17"}),_.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"21"}))}import I from"react";var fo=["size","color"];function Re(e){var r=e.size,a=r===void 0?24:r,o=e.color,t=o===void 0?"currentColor":o,f=W(e,fo);return I.createElement("svg",A({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-database-off",width:a,height:a,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),I.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),I.createElement("path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74"}),I.createElement("path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6"}),I.createElement("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),I.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}))}import{Fragment as mo,jsx as le,jsxs as xo}from"react/jsx-runtime";var po=so(e=>({root:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"column",pointerEvents:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[6],opacity:0,transition:"opacity .15s ease"},active:{opacity:1},standardIcon:{fontSize:0,borderRadius:"50%",padding:e.spacing.xs,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}}));function Ae({icon:e,text:r,pt:a,pb:o,active:t,children:f}){let{classes:d,cx:p}=po();return le(lo,{pt:a,pb:o,className:p(d.root,{[d.active]:t}),children:f||xo(mo,{children:[e||le("div",{className:d.standardIcon,children:le(Re,{})}),le(uo,{size:"sm",color:"dimmed",children:r})]})})}import{Box as no,createStyles as io,Pagination as co,Text as go}from"@mantine/core";import{forwardRef as Co}from"react";import{jsx as fr,jsxs as bo}from"react/jsx-runtime";var ho=io((e,{topBorderColor:r})=>({root:{borderTop:`1px solid ${typeof r=="function"?r(e):r}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:e.spacing.xs,[e.fn.largerThan("xs")]:{flexDirection:"row"}},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),lr=Co(function({className:r,style:a,topBorderColor:o,fetching:t,page:f,onPageChange:d,paginationColor:p,paginationSize:i,loadingText:x,noRecordsText:l,paginationText:g,totalRecords:s,recordsPerPage:u,recordsLength:n,horizontalSpacing:h},b){let O;if(t)O=x;else if(!s)O=l;else{let D=(f-1)*u+1,M=D+n-1;O=g({from:D,to:M,totalRecords:s})}let{classes:T,cx:y}=ho({topBorderColor:o});return bo(no,{ref:b,px:h??"xs",py:"xs",className:y(T.root,r),style:a,children:[fr(go,{size:i,children:O}),fr(co,{color:p,className:y(T.pagination,{[T.paginationFetching]:t||!n}),page:f,onChange:d,size:i,total:Math.ceil(s/u)})]})});import{Checkbox as Do,createStyles as Po}from"@mantine/core";import{forwardRef as Ro}from"react";import{Box as Me,Center as Oo,createStyles as wo,Group as To}from"@mantine/core";import{useMantineTheme as So}from"@mantine/core";import{useMediaQuery as Bo}from"@mantine/hooks";function se(e){let r=So(),a=typeof e=="function"?e(r):e;return Bo(a||"",!0)}function de(e){let r=e.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${r.charAt(0).toUpperCase()}${r.slice(1)}`}function sr(e,r,a){return e.filter(o=>!r.map(a).includes(a(o)))}function ue(e,r){return e.filter((a,o,t)=>o===t.findIndex(f=>r(a)===r(f)))}function C(e,r){return r?r.match(/([^[.\]])+/g).reduce((o,t)=>o&&o[t],e):void 0}import{jsx as z,jsxs as ko}from"react/jsx-runtime";var yo=wo(e=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]}},columnHeaderText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},sortableColumnHeaderText:{minWidth:0,flexGrow:1},sortableColumnHeaderIcon:{transition:"transform .15s ease"},sortableColumnHeaderIconRotated:{transform:"rotate3d(0, 0, 1, 180deg)"},sortableColumnHeaderNeutralIcon:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],transition:"color .15s ease","th:hover &":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}}}));function Le({className:e,sx:r,style:a,accessor:o,visibleMediaQuery:t,title:f,sortable:d,textAlignment:p,width:i,sortStatus:x,onSortStatusChange:l}){let{cx:g,classes:s}=yo();if(!se(t))return null;let u=f??de(o);return z(Me,{component:"th",className:g({[s.sortableColumnHeader]:d},e),sx:[{"&&":{textAlign:p},width:i,minWidth:i,maxWidth:i},r],style:a,role:d?"button":void 0,onClick:d&&l?()=>{l({columnAccessor:o,direction:x?.direction==="asc"?"desc":"asc"})}:void 0,children:d||x?.columnAccessor===o?ko(To,{position:"apart",noWrap:!0,spacing:"xs",children:[z(Me,{className:g(s.columnHeaderText,s.sortableColumnHeaderText),children:u}),z(Oo,{children:x?.columnAccessor===o?z(De,{className:g(s.sortableColumnHeaderIcon,{[s.sortableColumnHeaderIconRotated]:x.direction==="desc"}),size:14}):z(Pe,{className:s.sortableColumnHeaderNeutralIcon,size:14})})]}):z(Me,{className:s.columnHeaderText,children:u})})}import{jsx as pe,jsxs as Mo}from"react/jsx-runtime";var Ao=Po(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:e.colorScheme==="dark"?e.colors.dark[7]:e.white},textSelectionDisabled:{userSelect:"none"},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),dr=Ro(function({className:r,style:a,sortStatus:o,onSortStatusChange:t,columns:f,selectionVisible:d,selectionChecked:p,selectionIndeterminate:i,onSelectionChange:x,leftShadowVisible:l},g){let{classes:s,cx:u}=Ao();return pe("thead",{className:u(s.root,r),style:a,ref:g,children:Mo("tr",{children:[d&&pe("th",{className:u(s.selectorColumnHeader,{[s.selectorColumnHeaderWithRightShadow]:l}),children:pe(Do,{classNames:{input:s.selectionCheckboxInput},checked:p,indeterminate:i,disabled:!x,onChange:x})}),f.map(({accessor:n,hidden:h,visibleMediaQuery:b,textAlignment:O,width:T,title:y,sortable:D,titleClassName:M,titleStyle:V,titleSx:G})=>h?null:pe(Le,{className:M,style:V,sx:G,accessor:n,visibleMediaQuery:b,textAlignment:O,width:T,title:y,sortable:D,sortStatus:o,onSortStatusChange:t},n))]})})});import{Center as Lo,createStyles as vo,Loader as Ho}from"@mantine/core";import{jsx as ur}from"react/jsx-runtime";var Fo=vo(e=>({root:{zIndex:3,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",background:e.fn.rgba(e.colorScheme==="dark"?e.colors.dark[8]:e.white,.75),opacity:0,transition:"opacity .15s ease"},fetching:{pointerEvents:"all",opacity:1}}));function ve({pt:e,pb:r,fetching:a,loaderBackgroundBlur:o,loaderSize:t,loaderVariant:f}){let{classes:d,cx:p}=Fo();return ur(Lo,{pt:e,pb:r,className:p(d.root,{[d.fetching]:a}),sx:o?{backdropFilter:`blur(${o}px)`}:void 0,children:a&&ur(Ho,{size:t,variant:f})})}import{createStyles as Ko}from"@mantine/core";import{Box as Eo,createStyles as No}from"@mantine/core";import{jsx as Io}from"react/jsx-runtime";var Wo=No({withPointerCursor:{cursor:"pointer"},ellipsis:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}});function He({className:e,sx:r,style:a,visibleMediaQuery:o,record:t,recordIndex:f,onClick:d,ellipsis:p,textAlignment:i,width:x,accessor:l,render:g}){let{cx:s,classes:u}=Wo();return se(o)?Io(Eo,{component:"td",className:s({[u.ellipsis]:p,[u.withPointerCursor]:d},e),sx:[{width:x,minWidth:x,maxWidth:x,textAlign:i},r],style:a,onClick:d,children:g?g(t,f):C(t,l)}):null}import{Collapse as zo,createStyles as Vo}from"@mantine/core";import{useDebouncedState as me,useTimeout as pr}from"@mantine/hooks";import{useEffect as Fe,useState as j}from"react";var xe=200,ne={leading:!0};function mr(){let[e,r]=me(!0,xe,ne),[a,o]=me(!0,xe,ne),[t,f]=me(!0,xe,ne),[d,p]=me(!0,xe,ne);return{scrolledToTop:e,setScrolledToTop:r,scrolledToBottom:a,setScrolledToBottom:o,scrolledToLeft:t,setScrolledToLeft:f,scrolledToRight:d,setScrolledToRight:p}}function xr(e){let[r,a]=j(null),o=e?.join(":")||"";return Fe(()=>{a(null)},[o]),{lastSelectionChangeIndex:r,setLastSelectionChangeIndex:a}}function nr(e){let[r,a]=j(null);return Fe(()=>{e&&a(null)},[e]),{rowContextMenuInfo:r,setRowContextMenuInfo:a}}function ir({rowExpansion:e,records:r,idAccessor:a}){let o=[];if(e&&r){let{trigger:p,allowMultiple:i,initiallyExpanded:x}=e;r&&p==="always"?o=r.map(l=>C(l,a)):x&&(o=r.filter(x).map(l=>C(l,a)),i||(o=[o[0]]))}let t,f,d=j(o);if(e){let{trigger:p,allowMultiple:i,collapseProps:x,content:l}=e;e.expanded?{recordIds:t,onRecordIdsChange:f}=e.expanded:[t,f]=d;let g=s=>f(t.filter(u=>u!==C(s,a)));return{expandOnClick:p!=="always"&&p!=="never",isRowExpanded:s=>p==="always"?!0:t.includes(C(s,a)),expandRow:s=>{let u=C(s,a);f(i?[...t,u]:[u])},collapseRow:g,collapseProps:x,content:(s,u)=>()=>l({record:s,recordIndex:u,collapse:()=>g(s)})}}}function cr(e,r){let[a,o]=j(e),[t,f]=j(e),d=pr(()=>o(!0),0),p=pr(()=>f(!1),r||200);return Fe(()=>{e?(p.clear(),f(!0),d.start()):(d.clear(),o(!1),p.start())},[d,p,e]),{expanded:a,visible:t}}import{Fragment as Uo,jsx as ie,jsxs as qo}from"react/jsx-runtime";var Go=Vo({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function Ee({open:e,colSpan:r,content:a,collapseProps:o}){let{expanded:t,visible:f}=cr(e,o?.transitionDuration),{cx:d,classes:p}=Go();return f?qo(Uo,{children:[ie("tr",{}),ie("tr",{children:ie("td",{className:d(p.cell,{[p.expandedCell]:t}),colSpan:r,children:ie(zo,{in:t,...o,children:a()})})})]}):null}import{Checkbox as Zo,createStyles as $o}from"@mantine/core";import{jsx as gr}from"react/jsx-runtime";var Xo=$o(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",zIndex:1,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},withRightShadow:{"&::after":{opacity:1}},checkbox:{cursor:"pointer"}}});function Ne({withRightShadow:e,...r}){let{cx:a,classes:o}=Xo();return gr("td",{className:a(o.root,{[o.withRightShadow]:e}),children:gr(Zo,{classNames:{input:o.checkbox},...r,onClick:t=>t.stopPropagation()})})}import{Fragment as Yo,jsx as We,jsxs as Cr}from"react/jsx-runtime";var Qo=Ko(e=>{let r=e.colors[e.primaryColor][6];return{withPointerCursor:{cursor:"pointer"},selected:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.6):e.fn.lighten(r,.9)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.55):e.fn.lighten(r,.85)}}},contextMenuVisible:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.5):e.fn.lighten(r,.7)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.45):e.fn.lighten(r,.65)}}}}});function Ie({record:e,recordIndex:r,columns:a,selectionVisible:o,selectionChecked:t,onSelectionChange:f,isRecordSelectable:d,onClick:p,onCellClick:i,onContextMenu:x,expansion:l,contextMenuVisible:g,leftShadowVisible:s}){let{cx:u,classes:n}=Qo();return Cr(Yo,{children:[Cr("tr",{className:u({[n.withPointerCursor]:p||l?.expandOnClick,[n.selected]:t,[n.contextMenuVisible]:g}),onClick:h=>{if(l){let{isRowExpanded:b,expandOnClick:O,expandRow:T,collapseRow:y}=l;O&&(b(e)?y(e):T(e))}p?.(h)},onContextMenu:x,children:[o&&We(Ne,{withRightShadow:s,checked:t,disabled:!f||(d?!d(e,r):!1),onChange:f}),a.map((h,b)=>{let{accessor:O,hidden:T,visibleMediaQuery:y,textAlignment:D,ellipsis:M,width:V,render:G,cellsClassName:U,cellsStyle:q,cellsSx:Ce}=h,J;return i&&(J=()=>i({record:e,recordIndex:r,column:h,columnIndex:b})),T?null:We(He,{className:typeof U=="function"?U(e,r):U,style:typeof q=="function"?q(e,r):q,sx:Ce,visibleMediaQuery:y,record:e,recordIndex:r,onClick:J,accessor:O,textAlignment:D,ellipsis:M,width:V,render:G},O)})]}),l&&We(Ee,{colSpan:a.filter(h=>!h.hidden).length+(o?1:0),open:l.isRowExpanded(e),content:l.content(e,r),collapseProps:l.collapseProps})]})}import{createStyles as _o,Paper as jo,useMantineTheme as Jo}from"@mantine/core";import{useClickOutside as ea,useElementSize as ra,useMergedRef as oa,useWindowEvent as hr}from"@mantine/hooks";import{jsx as ta}from"react/jsx-runtime";var aa=_o(e=>({root:{position:"fixed",border:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,overflow:"hidden",transition:"all .15s ease"}}));function ze({borderRadius:e="xs",shadow:r="sm",zIndex:a=3,y:o,x:t,onDestroy:f,children:d}){hr("resize",f),hr("scroll",f);let p=ea(f),{ref:i,width:x,height:l}=ra(),g=oa(p,i),{dir:s,spacing:{md:u}}=Jo(),{innerWidth:n,innerHeight:h}=window,{classes:b}=aa();return ta(jo,{ref:g,shadow:r,radius:e,className:b.root,sx:{zIndex:a,top:o+l+u>h?h-l-u:o,left:s==="ltr"?t+x+u>n?n-x-u:t:n-u-(t-x-u<0?x+u:t)},children:d})}import{createStyles as fa}from"@mantine/core";import{jsx as sa}from"react/jsx-runtime";var la=fa(e=>({root:{height:1,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}}));function Ve(){let{classes:e}=la();return sa("div",{className:e.root})}import{Box as da,createStyles as ua,Text as pa,UnstyledButton as ma}from"@mantine/core";import{jsx as br,jsxs as na}from"react/jsx-runtime";var xa=ua((e,{color:r})=>{let a=e.spacing.sm/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:a,paddingBottom:a,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,color:r&&e.colors[r][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:hover:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:e.spacing.xs},title:{whiteSpace:"nowrap"}}});function Ge({icon:e,title:r,color:a,disabled:o,onClick:t}){let{classes:f}=xa({color:a});return na(ma,{className:f.root,disabled:o,onClick:t,children:[e&&br(da,{className:f.icon,children:e}),br(pa,{className:f.title,size:"sm",children:r})]})}import{Box as ia,createStyles as ca,ScrollArea as ga}from"@mantine/core";import{forwardRef as Ca}from"react";import{jsx as ce,jsxs as ba}from"react/jsx-runtime";var ha=ca(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{flex:"1 1 100%"},scrollbar:{'&[data-state="visible"]':{background:"transparent"},"div::before":{pointerEvents:"none"}},corner:{background:"transparent"},thumb:{zIndex:3},shadow:{position:"absolute",pointerEvents:"none",opacity:0,transition:"opacity .15s ease"},topShadow:{zIndex:2,top:0,left:0,right:0,height:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},leftShadow:{zIndex:3,top:0,left:0,bottom:0,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},rightShadow:{zIndex:2,top:0,bottom:0,right:0,width:e.spacing.sm,background:`linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},bottomShadow:{zIndex:2,left:0,right:0,bottom:0,height:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,0)}, ${e.fn.rgba(e.black,r)}), linear-gradient(${e.fn.rgba(e.black,0)} 30%, ${e.fn.rgba(e.black,r)})`},shadowVisible:{opacity:1}}}),Sr=Ca(function({topShadowVisible:r,leftShadowVisible:a,rightShadowVisible:o,bottomShadowVisible:t,headerHeight:f,onScrollPositionChange:d,children:p},i){let{cx:x,classes:l}=ha();return ba(ga,{viewportRef:i,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:f}},onScrollPositionChange:d,children:[p,ce(ia,{className:x(l.shadow,l.topShadow,{[l.shadowVisible]:r}),sx:{top:f}}),ce("div",{className:x(l.shadow,l.leftShadow,{[l.shadowVisible]:a})}),ce("div",{className:x(l.shadow,l.rightShadow,{[l.shadowVisible]:o})}),ce("div",{className:x(l.shadow,l.bottomShadow,{[l.shadowVisible]:t})})]})});import{jsx as k,jsxs as Br}from"react/jsx-runtime";var ya={},ka=Ba((e,{borderColor:r,rowBorderColor:a})=>{let o=typeof r=="function"?r(e):r,t=typeof a=="function"?a(e):a;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white},"&&":{"thead tr th":{borderBottomColor:o},"tbody tr td":{borderBottomColor:t}}},lastRowBorderBottomVisible:{"tbody tr:last-of-type td":{borderBottom:`1px solid ${t}`}},textSelectionDisabled:{userSelect:"none"},table:{borderCollapse:"separate",borderSpacing:0},tableWithBorder:{border:`1px solid ${o}`},tableWithColumnBorders:{"th, td":{":not(:first-of-type)":{borderLeft:`1px solid ${t}`}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function Or({withBorder:e,borderRadius:r,borderColor:a=S=>S.colorScheme==="dark"?S.colors.dark[4]:S.colors.gray[3],rowBorderColor:o=S=>S.fn.rgba(S.colorScheme==="dark"?S.colors.dark[4]:S.colors.gray[3],.65),withColumnBorders:t,textSelectionDisabled:f,height:d="100%",minHeight:p,shadow:i,verticalAlignment:x="center",fetching:l,columns:g,idAccessor:s="id",records:u,selectedRecords:n,onSelectedRecordsChange:h,isRecordSelectable:b,sortStatus:O,onSortStatusChange:T,horizontalSpacing:y,page:D,onPageChange:M,totalRecords:V,recordsPerPage:G,paginationColor:U,paginationSize:q="sm",paginationText:Ce=({from:S,to:Z,totalRecords:F})=>`${S} - ${Z} / ${F}`,loaderSize:J,loaderVariant:wr,loaderBackgroundBlur:Tr,loadingText:yr="...",emptyState:kr,noRecordsText:Ue="No records",noRecordsIcon:Dr,striped:Pr,onRowClick:he,onCellClick:Rr,rowContextMenu:P,rowExpansion:Ar,m:Mr,my:Lr,mx:vr,mt:Hr,mb:Fr,ml:Er,mr:Nr,sx:Wr,className:Ir,classNames:be,style:zr,styles:Se,...Vr}){let{ref:S,width:Z,height:F}=ge(),{ref:Gr,height:Be}=ge(),{ref:Ur,width:Oe,height:ee}=ge(),{ref:qr,height:qe}=ge(),{scrolledToTop:Zr,setScrolledToTop:Ze,scrolledToBottom:$r,setScrolledToBottom:$e,scrolledToLeft:Xe,setScrolledToLeft:Ke,scrolledToRight:Xr,setScrolledToRight:Qe}=mr(),{rowContextMenuInfo:L,setRowContextMenuInfo:$}=nr(l),Kr=ir({rowExpansion:Ar,records:u,idAccessor:s}),Ye=()=>{if(!l&&P&&$(null),l||ee<=F)Ze(!0),$e(!0);else{let m=S.current.scrollTop;Ze(m===0),$e(Math.round(ee-m)===Math.round(F))}if(l||Oe===Z)Ke(!0),Qe(!0);else{let m=S.current.scrollLeft;Ke(m===0),Qe(Math.round(Oe-m)===Math.round(Z))}};Ta(Ye,[l,F,S,Z,ee,Oe]);let Qr=m=>{S.current.scrollTo({top:0,left:0}),M(m)},re=u?.length,_e=u?.map(m=>C(m,s)),X=n?.map(m=>C(m,s)),je=_e!==void 0&&X!==void 0&&X.length>0,Je=b?u?.filter(b):u,we=Je?.map(m=>C(m,s)),Te=je&&we.every(m=>X.includes(m)),Yr=je&&we.some(m=>X.includes(m)),er;h&&(er=()=>{h(Te?n.filter(m=>!we.includes(C(m,s))):ue([...n,...Je],m=>C(m,s)))});let{lastSelectionChangeIndex:oe,setLastSelectionChangeIndex:_r}=xr(_e),rr=!!n&&!Xe,{cx:or,classes:R,theme:jr}=ka({borderColor:a,rowBorderColor:o}),Jr={m:Mr,my:Lr,mx:vr,mt:Hr,mb:Fr,ml:Er,mr:Nr},ye=typeof Se=="function"?Se(jr,ya):Se;return Br(Sa,{...Jr,className:or(R.root,{[R.tableWithBorder]:e},Ir,be?.root),sx:[m=>({borderRadius:m.radius[r]||r,boxShadow:m.shadows[i]||i,height:d,minHeight:p}),...Oa(Wr)],style:{...ye?.root,...zr},children:[k(Sr,{ref:S,topShadowVisible:!Zr,leftShadowVisible:!(n||Xe),rightShadowVisible:!Xr,bottomShadowVisible:!$r,headerHeight:Be,onScrollPositionChange:Ye,children:Br(wa,{ref:Ur,horizontalSpacing:y,className:or(R.table,{[R.tableWithColumnBorders]:t,[R.lastRowBorderBottomVisible]:ee<F,[R.textSelectionDisabled]:f,[R.verticalAlignmentTop]:x==="top",[R.verticalAlignmentBottom]:x==="bottom"}),striped:re?Pr:!1,...Vr,children:[k(dr,{ref:Gr,className:be?.header,style:ye?.header,columns:g,sortStatus:O,onSortStatusChange:T,selectionVisible:!!n,selectionChecked:Te,selectionIndeterminate:Yr&&!Te,onSelectionChange:er,leftShadowVisible:rr}),k("tbody",{children:re?u.map((m,B)=>{let E=C(m,s),K=X?.includes(E)||!1,ae=!1,te=!1;if(P){let{hidden:w}=P;(!w||!(typeof w=="function"?w(m,B):w))&&(P.trigger==="click"?ae=!0:te=!0)}let fe;h&&(fe=w=>{if(w.nativeEvent.shiftKey&&oe!==null){let N=u.filter(B>oe?(v,H)=>H>=oe&&H<=B&&(b?b(v,H):!0):(v,H)=>H>=B&&H<=oe&&(b?b(v,H):!0));h(K?sr(n,N,v=>C(v,s)):ue([...n,...N],v=>C(v,s)))}else h(K?n.filter(N=>C(N,s)!==E):ue([...n,m],N=>C(N,s)));_r(B)});let Q;ae?Q=w=>{$({y:w.clientY,x:w.clientX,record:m,recordIndex:B}),he?.(m,B)}:he&&(Q=()=>{he(m,B)});let ar;return te&&(ar=w=>{w.preventDefault(),$({y:w.clientY,x:w.clientX,record:m,recordIndex:B})}),k(Ie,{record:m,recordIndex:B,columns:g,selectionVisible:!!n,selectionChecked:K,onSelectionChange:fe,isRecordSelectable:b,onClick:Q,onCellClick:Rr,onContextMenu:ar,contextMenuVisible:L?C(L.record,s)===E:!1,expansion:Kr,leftShadowVisible:rr},E)}):k(ke,{})})]})}),D&&k(lr,{ref:qr,className:be?.pagination,style:ye?.pagination,topBorderColor:a,horizontalSpacing:y,fetching:l,page:D,onPageChange:Qr,totalRecords:V,recordsPerPage:G,paginationColor:U,paginationSize:q,paginationText:Ce,noRecordsText:Ue,loadingText:yr,recordsLength:re}),k(ve,{pt:Be,pb:qe,fetching:l,loaderBackgroundBlur:Tr,loaderSize:J,loaderVariant:wr}),k(Ae,{pt:Be,pb:qe,icon:Dr,text:Ue,active:!l&&!re,children:kr}),P&&L&&k(ze,{zIndex:P.zIndex,borderRadius:P.borderRadius,shadow:P.shadow,y:L.y,x:L.x,onDestroy:()=>$(null),children:P.items(L.record,L.recordIndex).map(({divider:m,key:B,title:E,icon:K,color:ae,hidden:te,disabled:fe,onClick:Q})=>m?k(Ve,{},B):te?null:k(Ge,{title:E??de(B),icon:K,color:ae,disabled:fe,onClick:()=>{$(null),Q()}},B))})]})}export{Or as DataTable};
1
+ import*as m from"react";import{Box as La,createStyles as va,packSx as Ha,Table as Fa}from"@mantine/core";import{useElementSize as he}from"@mantine/hooks";import{useEffect as Ea}from"react";import{createStyles as mo}from"@mantine/core";import{jsx as dr}from"react/jsx-runtime";var xo=mo({root:{"&&":{background:"transparent"}}});function Pe(){let{classes:e}=xo();return dr("tr",{className:e.root,children:dr("td",{})})}import{Center as Co,createStyles as ho,Text as bo}from"@mantine/core";function H(){return H=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},H.apply(this,arguments)}function no(e,r){if(e==null)return{};var o={},a=Object.keys(e),t,f;for(f=0;f<a.length;f++)t=a[f],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function G(e,r){if(e==null)return{};var o=no(e,r),a,t;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(t=0;t<f.length;t++)a=f[t],!(r.indexOf(a)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,a)||(o[a]=e[a]))}return o}import _ from"react";var io=["size","color"];function Re(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=G(e,io);return _.createElement("svg",H({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrow-down",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),_.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),_.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),_.createElement("line",{x1:"18",y1:"13",x2:"12",y2:"19"}),_.createElement("line",{x1:"6",y1:"13",x2:"12",y2:"19"}))}import J from"react";var co=["size","color"];function Me(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=G(e,co);return J.createElement("svg",H({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrows-vertical",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),J.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),J.createElement("polyline",{points:"8 7 12 3 16 7"}),J.createElement("polyline",{points:"8 17 12 21 16 17"}),J.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"21"}))}import U from"react";var go=["size","color"];function Ae(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=G(e,go);return U.createElement("svg",H({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-database-off",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),U.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),U.createElement("path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74"}),U.createElement("path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6"}),U.createElement("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),U.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}))}import{Fragment as Bo,jsx as se,jsxs as To}from"react/jsx-runtime";var So=ho(e=>({root:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"column",pointerEvents:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[6],opacity:0,transition:"opacity .15s ease"},active:{opacity:1},standardIcon:{fontSize:0,borderRadius:"50%",padding:e.spacing.xs,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}}));function Le({icon:e,text:r,pt:o,pb:a,active:t,children:f}){let{classes:s,cx:u}=So();return se(Co,{pt:o,pb:a,className:u(s.root,{[s.active]:t}),children:f||To(Bo,{children:[e||se("div",{className:s.standardIcon,children:se(Ae,{})}),se(bo,{size:"sm",color:"dimmed",children:r})]})})}import{Box as wo,createStyles as Do,Pagination as ko,Text as Po}from"@mantine/core";import{forwardRef as Ro}from"react";import{Button as Oo,Group as yo,Menu as de,Text as ur}from"@mantine/core";import{jsx as q,jsxs as mr}from"react/jsx-runtime";var pr={xs:22,sm:26,md:32,lg:38,xl:44};function ve({size:e,label:r,values:o,value:a,onChange:t,color:f}){return mr(yo,{spacing:"xs",children:[q(ur,{size:e,children:r}),mr(de,{withinPortal:!0,withArrow:!0,children:[q(de.Target,{children:q(Oo,{size:e,variant:"default",sx:[{fontWeight:"normal"},s=>({height:pr[e],paddingLeft:s.spacing[e],paddingRight:s.spacing[e]})],children:a})}),q(de.Dropdown,{children:o.map(s=>{let u=s===a;return q(de.Item,{sx:[{height:pr[e]},i=>({"&&":{color:u?i.white:void 0},background:u?i.colors[f||i.primaryColor][6]:void 0})],disabled:u,onClick:()=>t(s),children:q(ur,{size:e,children:s})},s)})})]})]})}import{jsx as He,jsxs as Ao}from"react/jsx-runtime";var Mo=Do((e,{topBorderColor:r,paginationWrapBreakpoint:o})=>({root:{borderTop:`1px solid ${typeof r=="function"?r(e):r}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:e.spacing.xs,[e.fn.largerThan(o)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),xr=Ro(function({className:r,style:o,topBorderColor:a,fetching:t,page:f,onPageChange:s,paginationColor:u,paginationSize:i,loadingText:n,noRecordsText:l,paginationText:g,totalRecords:d,recordsPerPage:p,onRecordsPerPageChange:c,recordsPerPageLabel:h,recordsPerPageOptions:b,recordsLength:O,horizontalSpacing:P,paginationWrapBreakpoint:w},M){let D;if(t)D=n;else if(!d)D=l;else{let L=(f-1)*p+1,F=L+O-1;D=g({from:L,to:F,totalRecords:d})}let{classes:k,cx:A}=Mo({topBorderColor:a,paginationWrapBreakpoint:w});return Ao(wo,{ref:M,px:P??"xs",py:"xs",className:A(k.root,r),style:o,children:[He(Po,{className:k.text,size:i,children:D}),b&&He(ve,{size:i,label:h,values:b,value:p,onChange:c}),He(ko,{color:u,className:A(k.pagination,{[k.paginationFetching]:t||!O}),page:f,onChange:s,size:i,total:Math.ceil(d/p)})]})});import{Checkbox as zo,createStyles as Io}from"@mantine/core";import{forwardRef as Vo}from"react";import{Box as Fe,Center as Ho,createStyles as Fo,Group as Eo}from"@mantine/core";import{useMantineTheme as Lo}from"@mantine/core";import{useMediaQuery as vo}from"@mantine/hooks";function ue(e){let r=Lo(),o=typeof e=="function"?e(r):e;return vo(o||"",!0)}function pe(e){let r=e.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${r.charAt(0).toUpperCase()}${r.slice(1)}`}function nr(e,r,o){return e.filter(a=>!r.map(o).includes(o(a)))}function me(e,r){return e.filter((o,a,t)=>a===t.findIndex(f=>r(o)===r(f)))}function C(e,r){return r?r.match(/([^[.\]])+/g).reduce((a,t)=>a&&a[t],e):void 0}import{jsx as Z,jsxs as Wo}from"react/jsx-runtime";var No=Fo(e=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]}},columnHeaderText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},sortableColumnHeaderText:{minWidth:0,flexGrow:1},sortableColumnHeaderIcon:{transition:"transform .15s ease"},sortableColumnHeaderIconRotated:{transform:"rotate3d(0, 0, 1, 180deg)"},sortableColumnHeaderNeutralIcon:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],transition:"color .15s ease","th:hover &":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}}}));function Ee({className:e,sx:r,style:o,accessor:a,visibleMediaQuery:t,title:f,sortable:s,textAlignment:u,width:i,sortStatus:n,onSortStatusChange:l}){let{cx:g,classes:d}=No();if(!ue(t))return null;let p=f??pe(a);return Z(Fe,{component:"th",className:g({[d.sortableColumnHeader]:s},e),sx:[{"&&":{textAlign:u},width:i,minWidth:i,maxWidth:i},r],style:o,role:s?"button":void 0,onClick:s&&l?()=>{l({columnAccessor:a,direction:n?.direction==="asc"?"desc":"asc"})}:void 0,children:s||n?.columnAccessor===a?Wo(Eo,{position:"apart",noWrap:!0,spacing:"xs",children:[Z(Fe,{className:g(d.columnHeaderText,d.sortableColumnHeaderText),children:p}),Z(Ho,{children:n?.columnAccessor===a?Z(Re,{className:g(d.sortableColumnHeaderIcon,{[d.sortableColumnHeaderIconRotated]:n.direction==="desc"}),size:14}):Z(Me,{className:d.sortableColumnHeaderNeutralIcon,size:14})})]}):Z(Fe,{className:d.columnHeaderText,children:p})})}import{jsx as xe,jsxs as Uo}from"react/jsx-runtime";var Go=Io(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:e.colorScheme==="dark"?e.colors.dark[7]:e.white},textSelectionDisabled:{userSelect:"none"},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),ir=Vo(function({className:r,style:o,sortStatus:a,onSortStatusChange:t,columns:f,selectionVisible:s,selectionChecked:u,selectionIndeterminate:i,onSelectionChange:n,leftShadowVisible:l},g){let{classes:d,cx:p}=Go();return xe("thead",{className:p(d.root,r),style:o,ref:g,children:Uo("tr",{children:[s&&xe("th",{className:p(d.selectorColumnHeader,{[d.selectorColumnHeaderWithRightShadow]:l}),children:xe(zo,{classNames:{input:d.selectionCheckboxInput},checked:u,indeterminate:i,disabled:!n,onChange:n})}),f.map(({accessor:c,hidden:h,visibleMediaQuery:b,textAlignment:O,width:P,title:w,sortable:M,titleClassName:D,titleStyle:k,titleSx:A})=>h?null:xe(Ee,{className:D,style:k,sx:A,accessor:c,visibleMediaQuery:b,textAlignment:O,width:P,title:w,sortable:M,sortStatus:a,onSortStatusChange:t},c))]})})});import{Center as qo,createStyles as Zo,Loader as $o}from"@mantine/core";import{jsx as cr}from"react/jsx-runtime";var Xo=Zo(e=>({root:{zIndex:3,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",background:e.fn.rgba(e.colorScheme==="dark"?e.colors.dark[8]:e.white,.75),opacity:0,transition:"opacity .15s ease"},fetching:{pointerEvents:"all",opacity:1}}));function Ne({pt:e,pb:r,fetching:o,loaderBackgroundBlur:a,loaderSize:t,loaderVariant:f}){let{classes:s,cx:u}=Xo();return cr(qo,{pt:e,pb:r,className:u(s.root,{[s.fetching]:o}),sx:a?{backdropFilter:`blur(${a}px)`}:void 0,children:o&&cr($o,{size:t,variant:f})})}import{createStyles as la}from"@mantine/core";import{Box as Ko,createStyles as Qo}from"@mantine/core";import{jsx as _o}from"react/jsx-runtime";var Yo=Qo({withPointerCursor:{cursor:"pointer"},ellipsis:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}});function We({className:e,sx:r,style:o,visibleMediaQuery:a,record:t,recordIndex:f,onClick:s,ellipsis:u,textAlignment:i,width:n,accessor:l,render:g}){let{cx:d,classes:p}=Yo();return ue(a)?_o(Ko,{component:"td",className:d({[p.ellipsis]:u,[p.withPointerCursor]:s},e),sx:[{width:n,minWidth:n,maxWidth:n,textAlign:i},r],style:o,onClick:s,children:g?g(t,f):C(t,l)}):null}import{Collapse as Jo,createStyles as jo}from"@mantine/core";import{useDebouncedState as ne,useTimeout as gr}from"@mantine/hooks";import{useEffect as ze,useState as j}from"react";var ie=200,ce={leading:!0};function Cr(){let[e,r]=ne(!0,ie,ce),[o,a]=ne(!0,ie,ce),[t,f]=ne(!0,ie,ce),[s,u]=ne(!0,ie,ce);return{scrolledToTop:e,setScrolledToTop:r,scrolledToBottom:o,setScrolledToBottom:a,scrolledToLeft:t,setScrolledToLeft:f,scrolledToRight:s,setScrolledToRight:u}}function hr(e){let[r,o]=j(null),a=e?.join(":")||"";return ze(()=>{o(null)},[a]),{lastSelectionChangeIndex:r,setLastSelectionChangeIndex:o}}function br(e){let[r,o]=j(null);return ze(()=>{e&&o(null)},[e]),{rowContextMenuInfo:r,setRowContextMenuInfo:o}}function Sr({rowExpansion:e,records:r,idAccessor:o}){let a=[];if(e&&r){let{trigger:u,allowMultiple:i,initiallyExpanded:n}=e;r&&u==="always"?a=r.map(l=>C(l,o)):n&&(a=r.filter(n).map(l=>C(l,o)),i||(a=[a[0]]))}let t,f,s=j(a);if(e){let{trigger:u,allowMultiple:i,collapseProps:n,content:l}=e;e.expanded?{recordIds:t,onRecordIdsChange:f}=e.expanded:[t,f]=s;let g=d=>f(t.filter(p=>p!==C(d,o)));return{expandOnClick:u!=="always"&&u!=="never",isRowExpanded:d=>u==="always"?!0:t.includes(C(d,o)),expandRow:d=>{let p=C(d,o);f(i?[...t,p]:[p])},collapseRow:g,collapseProps:n,content:(d,p)=>()=>l({record:d,recordIndex:p,collapse:()=>g(d)})}}}function Br(e,r){let[o,a]=j(e),[t,f]=j(e),s=gr(()=>a(!0),0),u=gr(()=>f(!1),r||200);return ze(()=>{e?(u.clear(),f(!0),s.start()):(s.clear(),a(!1),u.start())},[s,u,e]),{expanded:o,visible:t}}import{Fragment as ra,jsx as ge,jsxs as oa}from"react/jsx-runtime";var ea=jo({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function Ie({open:e,colSpan:r,content:o,collapseProps:a}){let{expanded:t,visible:f}=Br(e,a?.transitionDuration),{cx:s,classes:u}=ea();return f?oa(ra,{children:[ge("tr",{}),ge("tr",{children:ge("td",{className:s(u.cell,{[u.expandedCell]:t}),colSpan:r,children:ge(Jo,{in:t,...a,children:o()})})})]}):null}import{Checkbox as aa,createStyles as ta}from"@mantine/core";import{jsx as Tr}from"react/jsx-runtime";var fa=ta(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",zIndex:1,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},withRightShadow:{"&::after":{opacity:1}},checkbox:{cursor:"pointer"}}});function Ve({withRightShadow:e,...r}){let{cx:o,classes:a}=fa();return Tr("td",{className:o(a.root,{[a.withRightShadow]:e}),children:Tr(aa,{classNames:{input:a.checkbox},...r,onClick:t=>t.stopPropagation()})})}import{Fragment as da,jsx as Ge,jsxs as Or}from"react/jsx-runtime";var sa=la(e=>{let r=e.colors[e.primaryColor][6];return{withPointerCursor:{cursor:"pointer"},selected:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.6):e.fn.lighten(r,.9)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.55):e.fn.lighten(r,.85)}}},contextMenuVisible:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.5):e.fn.lighten(r,.7)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.45):e.fn.lighten(r,.65)}}}}});function Ue({record:e,recordIndex:r,columns:o,selectionVisible:a,selectionChecked:t,onSelectionChange:f,isRecordSelectable:s,onClick:u,onCellClick:i,onContextMenu:n,expansion:l,contextMenuVisible:g,leftShadowVisible:d}){let{cx:p,classes:c}=sa();return Or(da,{children:[Or("tr",{className:p({[c.withPointerCursor]:u||l?.expandOnClick,[c.selected]:t,[c.contextMenuVisible]:g}),onClick:h=>{if(l){let{isRowExpanded:b,expandOnClick:O,expandRow:P,collapseRow:w}=l;O&&(b(e)?w(e):P(e))}u?.(h)},onContextMenu:n,children:[a&&Ge(Ve,{withRightShadow:d,checked:t,disabled:!f||(s?!s(e,r):!1),onChange:f}),o.map((h,b)=>{let{accessor:O,hidden:P,visibleMediaQuery:w,textAlignment:M,ellipsis:D,width:k,render:A,cellsClassName:L,cellsStyle:F,cellsSx:be}=h,ee;return i&&(ee=()=>i({record:e,recordIndex:r,column:h,columnIndex:b})),P?null:Ge(We,{className:typeof L=="function"?L(e,r):L,style:typeof F=="function"?F(e,r):F,sx:be,visibleMediaQuery:w,record:e,recordIndex:r,onClick:ee,accessor:O,textAlignment:M,ellipsis:D,width:k,render:A},O)})]}),l&&Ge(Ie,{colSpan:o.filter(h=>!h.hidden).length+(a?1:0),open:l.isRowExpanded(e),content:l.content(e,r),collapseProps:l.collapseProps})]})}import{createStyles as ua,Paper as pa,useMantineTheme as ma}from"@mantine/core";import{useClickOutside as xa,useElementSize as na,useMergedRef as ia,useWindowEvent as yr}from"@mantine/hooks";import{jsx as ga}from"react/jsx-runtime";var ca=ua(e=>({root:{position:"fixed",border:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,overflow:"hidden",transition:"all .15s ease"}}));function qe({borderRadius:e="xs",shadow:r="sm",zIndex:o=3,y:a,x:t,onDestroy:f,children:s}){yr("resize",f),yr("scroll",f);let u=xa(f),{ref:i,width:n,height:l}=na(),g=ia(u,i),{dir:d,spacing:{md:p}}=ma(),{innerWidth:c,innerHeight:h}=window,{classes:b}=ca();return ga(pa,{ref:g,shadow:r,radius:e,className:b.root,sx:{zIndex:o,top:a+l+p>h?h-l-p:a,left:d==="ltr"?t+n+p>c?c-n-p:t:c-p-(t-n-p<0?n+p:t)},children:s})}import{createStyles as Ca}from"@mantine/core";import{jsx as ba}from"react/jsx-runtime";var ha=Ca(e=>({root:{height:1,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}}));function Ze(){let{classes:e}=ha();return ba("div",{className:e.root})}import{Box as Sa,createStyles as Ba,Text as Ta,UnstyledButton as Oa}from"@mantine/core";import{jsx as wr,jsxs as wa}from"react/jsx-runtime";var ya=Ba((e,{color:r})=>{let o=e.spacing.sm/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:o,paddingBottom:o,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,color:r&&e.colors[r][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:hover:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:e.spacing.xs},title:{whiteSpace:"nowrap"}}});function $e({icon:e,title:r,color:o,disabled:a,onClick:t}){let{classes:f}=ya({color:o});return wa(Oa,{className:f.root,disabled:a,onClick:t,children:[e&&wr(Sa,{className:f.icon,children:e}),wr(Ta,{className:f.title,size:"sm",children:r})]})}import{Box as Da,createStyles as ka,ScrollArea as Pa}from"@mantine/core";import{forwardRef as Ra}from"react";import{jsx as Ce,jsxs as Aa}from"react/jsx-runtime";var Ma=ka(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{flex:"1 1 100%"},scrollbar:{'&[data-state="visible"]':{background:"transparent"},"div::before":{pointerEvents:"none"}},corner:{background:"transparent"},thumb:{zIndex:3},shadow:{position:"absolute",pointerEvents:"none",opacity:0,transition:"opacity .15s ease"},topShadow:{zIndex:2,top:0,left:0,right:0,height:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},leftShadow:{zIndex:3,top:0,left:0,bottom:0,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},rightShadow:{zIndex:2,top:0,bottom:0,right:0,width:e.spacing.sm,background:`linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},bottomShadow:{zIndex:2,left:0,right:0,bottom:0,height:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,0)}, ${e.fn.rgba(e.black,r)}), linear-gradient(${e.fn.rgba(e.black,0)} 30%, ${e.fn.rgba(e.black,r)})`},shadowVisible:{opacity:1}}}),Dr=Ra(function({topShadowVisible:r,leftShadowVisible:o,rightShadowVisible:a,bottomShadowVisible:t,headerHeight:f,onScrollPositionChange:s,children:u},i){let{cx:n,classes:l}=Ma();return Aa(Pa,{viewportRef:i,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:f}},onScrollPositionChange:s,children:[u,Ce(Da,{className:n(l.shadow,l.topShadow,{[l.shadowVisible]:r}),sx:{top:f}}),Ce("div",{className:n(l.shadow,l.leftShadow,{[l.shadowVisible]:o})}),Ce("div",{className:n(l.shadow,l.rightShadow,{[l.shadowVisible]:a})}),Ce("div",{className:n(l.shadow,l.bottomShadow,{[l.shadowVisible]:t})})]})});import{jsx as y,jsxs as kr}from"react/jsx-runtime";var Na={},Wa=va((e,{borderColor:r,rowBorderColor:o})=>{let a=typeof r=="function"?r(e):r,t=typeof o=="function"?o(e):o;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white},"&&":{"thead tr th":{borderBottomColor:a},"tbody tr td":{borderBottomColor:t}}},lastRowBorderBottomVisible:{"tbody tr:last-of-type td":{borderBottom:`1px solid ${t}`}},textSelectionDisabled:{userSelect:"none"},table:{borderCollapse:"separate",borderSpacing:0},tableWithBorder:{border:`1px solid ${a}`},tableWithColumnBorders:{"th, td":{":not(:first-of-type)":{borderLeft:`1px solid ${t}`}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function Pr({withBorder:e,borderRadius:r,borderColor:o=S=>S.colorScheme==="dark"?S.colors.dark[4]:S.colors.gray[3],rowBorderColor:a=S=>S.fn.rgba(S.colorScheme==="dark"?S.colors.dark[4]:S.colors.gray[3],.65),withColumnBorders:t,textSelectionDisabled:f,height:s="100%",minHeight:u,shadow:i,verticalAlignment:n="center",fetching:l,columns:g,idAccessor:d="id",records:p,selectedRecords:c,onSelectedRecordsChange:h,isRecordSelectable:b,sortStatus:O,onSortStatusChange:P,horizontalSpacing:w,page:M,onPageChange:D,totalRecords:k,recordsPerPage:A,onRecordsPerPageChange:L,recordsPerPageOptions:F,recordsPerPageLabel:be="Records per page",paginationColor:ee,paginationSize:Rr="sm",paginationText:Mr=({from:S,to:$,totalRecords:z})=>`${S} - ${$} / ${z}`,paginationWrapBreakpoint:Ar="sm",loaderSize:Lr,loaderVariant:vr,loaderBackgroundBlur:Hr,loadingText:Fr="...",emptyState:Er,noRecordsText:Xe="No records",noRecordsIcon:Nr,striped:Wr,onRowClick:Se,onCellClick:zr,rowContextMenu:R,rowExpansion:Ir,m:Vr,my:Gr,mx:Ur,mt:qr,mb:Zr,ml:$r,mr:Xr,sx:Kr,className:Qr,classNames:Be,style:Yr,styles:Te,..._r}){let{ref:S,width:$,height:z}=he(),{ref:Jr,height:Oe}=he(),{ref:jr,width:ye,height:re}=he(),{ref:eo,height:Ke}=he(),{scrolledToTop:ro,setScrolledToTop:Qe,scrolledToBottom:oo,setScrolledToBottom:Ye,scrolledToLeft:_e,setScrolledToLeft:Je,scrolledToRight:ao,setScrolledToRight:je}=Cr(),{rowContextMenuInfo:E,setRowContextMenuInfo:X}=br(l),to=Sr({rowExpansion:Ir,records:p,idAccessor:d}),er=()=>{if(!l&&R&&X(null),l||re<=z)Qe(!0),Ye(!0);else{let x=S.current.scrollTop;Qe(x===0),Ye(Math.round(re-x)===Math.round(z))}if(l||ye===$)Je(!0),je(!0);else{let x=S.current.scrollLeft;Je(x===0),je(Math.round(ye-x)===Math.round($))}};Ea(er,[l,z,S,$,re,ye]);let fo=x=>{S.current.scrollTo({top:0,left:0}),D(x)},oe=p?.length,rr=p?.map(x=>C(x,d)),K=c?.map(x=>C(x,d)),or=rr!==void 0&&K!==void 0&&K.length>0,ar=b?p?.filter(b):p,we=ar?.map(x=>C(x,d)),De=or&&we.every(x=>K.includes(x)),lo=or&&we.some(x=>K.includes(x)),tr;h&&(tr=()=>{h(De?c.filter(x=>!we.includes(C(x,d))):me([...c,...ar],x=>C(x,d)))});let{lastSelectionChangeIndex:ae,setLastSelectionChangeIndex:so}=hr(rr),fr=!!c&&!_e,{cx:lr,classes:v,theme:uo}=Wa({borderColor:o,rowBorderColor:a}),po={m:Vr,my:Gr,mx:Ur,mt:qr,mb:Zr,ml:$r,mr:Xr},ke=typeof Te=="function"?Te(uo,Na):Te;return kr(La,{...po,className:lr(v.root,{[v.tableWithBorder]:e},Qr,Be?.root),sx:[x=>({borderRadius:x.radius[r]||r,boxShadow:x.shadows[i]||i,height:s,minHeight:u}),...Ha(Kr)],style:{...ke?.root,...Yr},children:[y(Dr,{ref:S,topShadowVisible:!ro,leftShadowVisible:!(c||_e),rightShadowVisible:!ao,bottomShadowVisible:!oo,headerHeight:Oe,onScrollPositionChange:er,children:kr(Fa,{ref:jr,horizontalSpacing:w,className:lr(v.table,{[v.tableWithColumnBorders]:t,[v.lastRowBorderBottomVisible]:re<z,[v.textSelectionDisabled]:f,[v.verticalAlignmentTop]:n==="top",[v.verticalAlignmentBottom]:n==="bottom"}),striped:oe?Wr:!1,..._r,children:[y(ir,{ref:Jr,className:Be?.header,style:ke?.header,columns:g,sortStatus:O,onSortStatusChange:P,selectionVisible:!!c,selectionChecked:De,selectionIndeterminate:lo&&!De,onSelectionChange:tr,leftShadowVisible:fr}),y("tbody",{children:oe?p.map((x,B)=>{let I=C(x,d),Q=K?.includes(I)||!1,te=!1,fe=!1;if(R){let{hidden:T}=R;(!T||!(typeof T=="function"?T(x,B):T))&&(R.trigger==="click"?te=!0:fe=!0)}let le;h&&(le=T=>{if(T.nativeEvent.shiftKey&&ae!==null){let V=p.filter(B>ae?(N,W)=>W>=ae&&W<=B&&(b?b(N,W):!0):(N,W)=>W>=B&&W<=ae&&(b?b(N,W):!0));h(Q?nr(c,V,N=>C(N,d)):me([...c,...V],N=>C(N,d)))}else h(Q?c.filter(V=>C(V,d)!==I):me([...c,x],V=>C(V,d)));so(B)});let Y;te?Y=T=>{X({y:T.clientY,x:T.clientX,record:x,recordIndex:B}),Se?.(x,B)}:Se&&(Y=()=>{Se(x,B)});let sr;return fe&&(sr=T=>{T.preventDefault(),X({y:T.clientY,x:T.clientX,record:x,recordIndex:B})}),y(Ue,{record:x,recordIndex:B,columns:g,selectionVisible:!!c,selectionChecked:Q,onSelectionChange:le,isRecordSelectable:b,onClick:Y,onCellClick:zr,onContextMenu:sr,contextMenuVisible:E?C(E.record,d)===I:!1,expansion:to,leftShadowVisible:fr},I)}):y(Pe,{})})]})}),M&&y(xr,{ref:eo,className:Be?.pagination,style:ke?.pagination,topBorderColor:o,horizontalSpacing:w,fetching:l,page:M,onPageChange:fo,totalRecords:k,recordsPerPage:A,onRecordsPerPageChange:L,recordsPerPageOptions:F,recordsPerPageLabel:be,paginationColor:ee,paginationSize:Rr,paginationText:Mr,paginationWrapBreakpoint:Ar,noRecordsText:Xe,loadingText:Fr,recordsLength:oe}),y(Ne,{pt:Oe,pb:Ke,fetching:l,loaderBackgroundBlur:Hr,loaderSize:Lr,loaderVariant:vr}),y(Le,{pt:Oe,pb:Ke,icon:Nr,text:Xe,active:!l&&!oe,children:Er}),R&&E&&y(qe,{zIndex:R.zIndex,borderRadius:R.borderRadius,shadow:R.shadow,y:E.y,x:E.x,onDestroy:()=>X(null),children:R.items(E.record,E.recordIndex).map(({divider:x,key:B,title:I,icon:Q,color:te,hidden:fe,disabled:le,onClick:Y})=>x?y(Ze,{},B):fe?null:y($e,{title:I??pe(B),icon:Q,color:te,disabled:le,onClick:()=>{X(null),Y()}},B))})]})}export{Pr as DataTable};
2
2
  //# sourceMappingURL=index.mjs.map