mantine-datatable 1.8.6 → 1.8.8
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/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as p from"react";import{Box as qa,createStyles as Va,packSx as Ga,Table as Ua}from"@mantine/core";import{useElementSize as he}from"@mantine/hooks";import{useEffect as Za}from"react";import{createStyles as So}from"@mantine/core";import{jsx as cr}from"react/jsx-runtime";var ho=So({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function Ne(){let{classes:e}=ho();return cr("tr",{className:e.root,children:cr("td",{})})}import{Center as Oo,createStyles as Do,Text as Ro}from"@mantine/core";function v(){return v=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},v.apply(this,arguments)}function Bo(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 q(e,r){if(e==null)return{};var o=Bo(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 yo=["size","color"];function Fe(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=q(e,yo);return _.createElement("svg",v({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 ee from"react";var To=["size","color"];function Ee(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=q(e,To);return ee.createElement("svg",v({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),ee.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),ee.createElement("polyline",{points:"8 7 12 3 16 7"}),ee.createElement("polyline",{points:"8 17 12 21 16 17"}),ee.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"21"}))}import V from"react";var wo=["size","color"];function We(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=q(e,wo);return V.createElement("svg",v({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),V.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),V.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"}),V.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"}),V.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"}),V.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}))}import{Fragment as Po,jsx as ue,jsxs as Lo}from"react/jsx-runtime";var ko=Do(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 Ie({icon:e,text:r,pt:o,pb:a,active:t,children:f}){let{classes:d,cx:u}=ko();return ue(Oo,{pt:o,pb:a,className:u(d.root,{[d.active]:t}),children:f||Lo(Po,{children:[e||ue("div",{className:d.standardIcon,children:ue(We,{})}),ue(Ro,{size:"sm",color:"dimmed",children:r})]})})}import{Box as vo,createStyles as Ho,Pagination as No,Text as Fo}from"@mantine/core";import{forwardRef as Eo}from"react";import{Button as Mo,Group as Ao,Menu as pe,Text as gr}from"@mantine/core";import{jsx as G,jsxs as br}from"react/jsx-runtime";var Cr={xs:22,sm:26,md:32,lg:38,xl:44};function ze({size:e,label:r,values:o,value:a,onChange:t,color:f}){return br(Ao,{spacing:"xs",children:[G(gr,{size:e,children:r}),br(pe,{withinPortal:!0,withArrow:!0,children:[G(pe.Target,{children:G(Mo,{size:e,variant:"default",sx:[{fontWeight:"normal"},d=>({height:Cr[e],paddingLeft:d.spacing[e],paddingRight:d.spacing[e]})],children:a})}),G(pe.Dropdown,{children:o.map(d=>{let u=d===a;return G(pe.Item,{sx:[{height:Cr[e]},i=>({"&&":{color:u?i.white:void 0},background:u?i.colors[f||i.primaryColor][6]:void 0})],disabled:u,onClick:()=>t(d),children:G(gr,{size:e,children:d})},d)})})]})]})}import{jsx as qe,jsxs as Io}from"react/jsx-runtime";var Wo=Ho((e,{topBorderColor:r,paginationWrapBreakpoint:o})=>({root:{background:e.colorScheme==="dark"?e.colors.dark[7]:e.white,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}})),Sr=Eo(function({className:r,style:o,topBorderColor:a,fetching:t,page:f,onPageChange:d,paginationColor:u,paginationSize:i,loadingText:x,noRecordsText:l,paginationText:c,totalRecords:n,recordsPerPage:s,onRecordsPerPageChange:g,recordsPerPageLabel:C,recordsPerPageOptions:S,recordsLength:B,horizontalSpacing:H,paginationWrapBreakpoint:P},T){let w;if(t)w=x;else if(!n)w=l;else{let M=(f-1)*s+1,Z=M+B-1;w=c({from:M,to:Z,totalRecords:n})}let{classes:O,cx:k}=Wo({topBorderColor:a,paginationWrapBreakpoint:P});return Io(vo,{ref:T,px:H??"xs",py:"xs",className:k(O.root,r),style:o,children:[qe(Fo,{className:O.text,size:i,children:w}),S&&qe(ze,{size:i,label:C,values:S,value:s,onChange:g}),qe(No,{color:u,className:k(O.pagination,{[O.paginationFetching]:t||!B}),page:f,onChange:d,size:i,total:Math.ceil(n/s)})]})});import{Checkbox as $o,createStyles as Ko}from"@mantine/core";import{forwardRef as Yo}from"react";import{Box as Ve,Center as Vo,createStyles as Go,Group as Uo}from"@mantine/core";import{useMantineTheme as zo}from"@mantine/core";import{useMediaQuery as qo}from"@mantine/hooks";function me(e){let r=zo(),o=typeof e=="function"?e(r):e;return qo(o||"",!0)}function xe(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 hr(e,r,o){return e.filter(a=>!r.map(o).includes(o(a)))}function ne(e,r){return e.filter((o,a,t)=>a===t.findIndex(f=>r(o)===r(f)))}function b(e,r){return r?r.match(/([^[.\]])+/g).reduce((a,t)=>a&&a[t],e):void 0}import{jsx as U,jsxs as Xo}from"react/jsx-runtime";var Zo=Go(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 Ge({className:e,sx:r,style:o,accessor:a,visibleMediaQuery:t,title:f,sortable:d,textAlignment:u,width:i,sortStatus:x,onSortStatusChange:l}){let{cx:c,classes:n}=Zo();if(!me(t))return null;let s=f??xe(a),g=typeof s=="string"?s:void 0;return U(Ve,{component:"th",className:c({[n.sortableColumnHeader]:d},e),sx:[{"&&":{textAlign:u},width:i,minWidth:i,maxWidth:i},r],style:o,role:d?"button":void 0,onClick:d&&l?()=>{l({columnAccessor:a,direction:x?.direction==="asc"?"desc":"asc"})}:void 0,children:d||x?.columnAccessor===a?Xo(Uo,{position:"apart",noWrap:!0,spacing:"xs",children:[U(Ve,{className:c(n.columnHeaderText,n.sortableColumnHeaderText),title:g,children:s}),U(Vo,{children:x?.columnAccessor===a?U(Fe,{className:c(n.sortableColumnHeaderIcon,{[n.sortableColumnHeaderIconRotated]:x.direction==="desc"}),size:14}):U(Ee,{className:n.sortableColumnHeaderNeutralIcon,size:14})})]}):U(Ve,{className:n.columnHeaderText,title:g,children:s})})}import{jsx as ie,jsxs as jo}from"react/jsx-runtime";var Qo=Ko(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"}}}),Br=Yo(function({className:r,style:o,sortStatus:a,onSortStatusChange:t,columns:f,selectionVisible:d,selectionChecked:u,selectionIndeterminate:i,onSelectionChange:x,leftShadowVisible:l},c){let{classes:n,cx:s}=Qo();return ie("thead",{className:s(n.root,r),style:o,ref:c,children:jo("tr",{children:[d&&ie("th",{className:s(n.selectorColumnHeader,{[n.selectorColumnHeaderWithRightShadow]:l}),children:ie($o,{classNames:{input:n.selectionCheckboxInput},checked:u,indeterminate:i,disabled:!x,onChange:x})}),f.map(({accessor:g,hidden:C,visibleMediaQuery:S,textAlignment:B,width:H,title:P,sortable:T,titleClassName:w,titleStyle:O,titleSx:k})=>C?null:ie(Ge,{className:w,style:O,sx:k,accessor:g,visibleMediaQuery:S,textAlignment:B,width:H,title:P,sortable:T,sortStatus:a,onSortStatusChange:t},g))]})})});import{Center as Jo,createStyles as _o,Loader as ea}from"@mantine/core";import{jsx as yr}from"react/jsx-runtime";var ra=_o(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 Ue({pt:e,pb:r,fetching:o,customContent:a,backgroundBlur:t,size:f,variant:d,color:u}){let{classes:i,cx:x}=ra();return yr(Jo,{pt:e,pb:r,className:x(i.root,{[i.fetching]:o}),sx:t?{backdropFilter:`blur(${t}px)`}:void 0,children:o&&(a||yr(ea,{size:f,variant:d,color:u}))})}import{Box as ia,createStyles as ca}from"@mantine/core";import{Box as oa,createStyles as aa}from"@mantine/core";import{jsx as fa}from"react/jsx-runtime";var ta=aa({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Ze({className:e,sx:r,style:o,visibleMediaQuery:a,record:t,recordIndex:f,onClick:d,noWrap:u,ellipsis:i,textAlignment:x,width:l,accessor:c,render:n,defaultRender:s,customCellAttributes:g}){let{cx:C,classes:S}=ta();return me(a)?fa(oa,{component:"td",className:C({[S.noWrap]:u||i,[S.ellipsis]:i,[S.withPointerCursor]:d},e),sx:[{width:l,minWidth:l,maxWidth:l,textAlign:x},r],style:o,onClick:d,...g?.(t,f),children:n?n(t,f):s?s(t,f,c):b(t,c)}):null}import{Collapse as la,createStyles as sa}from"@mantine/core";import{useDebouncedState as ce,useTimeout as Tr}from"@mantine/hooks";import{useEffect as Xe,useState as re}from"react";var ge=200,Ce={leading:!0};function wr(){let[e,r]=ce(!0,ge,Ce),[o,a]=ce(!0,ge,Ce),[t,f]=ce(!0,ge,Ce),[d,u]=ce(!0,ge,Ce);return{scrolledToTop:e,setScrolledToTop:r,scrolledToBottom:o,setScrolledToBottom:a,scrolledToLeft:t,setScrolledToLeft:f,scrolledToRight:d,setScrolledToRight:u}}function Or(e){let[r,o]=re(null),a=e?.join(":")||"";return Xe(()=>{o(null)},[a]),{lastSelectionChangeIndex:r,setLastSelectionChangeIndex:o}}function Dr(e){let[r,o]=re(null);return Xe(()=>{e&&o(null)},[e]),{rowContextMenuInfo:r,setRowContextMenuInfo:o}}function Rr({rowExpansion:e,records:r,idAccessor:o}){let a=[];if(e&&r){let{trigger:u,allowMultiple:i,initiallyExpanded:x}=e;r&&u==="always"?a=r.map(l=>b(l,o)):x&&(a=r.filter(x).map(l=>b(l,o)),i||(a=[a[0]]))}let t,f,d=re(a);if(e){let{trigger:u,allowMultiple:i,collapseProps:x,content:l}=e;e.expanded?{recordIds:t,onRecordIdsChange:f}=e.expanded:[t,f]=d;let c=n=>f(t.filter(s=>s!==b(n,o)));return{expandOnClick:u!=="always"&&u!=="never",isRowExpanded:n=>u==="always"?!0:t.includes(b(n,o)),expandRow:n=>{let s=b(n,o);f(i?[...t,s]:[s])},collapseRow:c,collapseProps:x,content:(n,s)=>()=>l({record:n,recordIndex:s,collapse:()=>c(n)})}}}function kr(e,r){let[o,a]=re(e),[t,f]=re(e),d=Tr(()=>a(!0),0),u=Tr(()=>f(!1),r||200);return Xe(()=>{e?(u.clear(),f(!0),d.start()):(d.clear(),a(!1),u.start())},[d,u,e]),{expanded:o,visible:t}}import{Fragment as ua,jsx as be,jsxs as pa}from"react/jsx-runtime";var da=sa({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function $e({open:e,colSpan:r,content:o,collapseProps:a}){let{expanded:t,visible:f}=kr(e,a?.transitionDuration),{cx:d,classes:u}=da();return f?pa(ua,{children:[be("tr",{}),be("tr",{children:be("td",{className:d(u.cell,{[u.expandedCell]:t}),colSpan:r,children:be(la,{in:t,...a,children:o()})})})]}):null}import{Checkbox as ma,createStyles as xa}from"@mantine/core";import{jsx as Pr}from"react/jsx-runtime";var na=xa(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 Ke({withRightShadow:e,...r}){let{cx:o,classes:a}=na();return Pr("td",{className:o(a.root,{[a.withRightShadow]:e}),children:Pr(ma,{classNames:{input:a.checkbox},...r,onClick:t=>t.stopPropagation()})})}import{Fragment as Ca,jsx as Ye,jsxs as Lr}from"react/jsx-runtime";var ga=ca(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 Qe({record:e,recordIndex:r,columns:o,defaultColumnRender:a,selectionVisible:t,selectionChecked:f,onSelectionChange:d,isRecordSelectable:u,onClick:i,onCellClick:x,onContextMenu:l,expansion:c,customRowAttributes:n,className:s,style:g,sx:C,contextMenuVisible:S,leftShadowVisible:B}){let{cx:H,classes:P}=ga();return Lr(Ca,{children:[Lr(ia,{component:"tr",className:H({[P.withPointerCursor]:i||c?.expandOnClick,[P.selected]:f,[P.contextMenuVisible]:S},typeof s=="function"?s(e,r):s),onClick:T=>{if(c){let{isRowExpanded:w,expandOnClick:O,expandRow:k,collapseRow:M}=c;O&&(w(e)?M(e):k(e))}i?.(T)},style:typeof g=="function"?g(e,r):g,sx:C,...n?.(e,r),onContextMenu:l,children:[t&&Ye(Ke,{withRightShadow:B,checked:f,disabled:!d||(u?!u(e,r):!1),onChange:d}),o.map((T,w)=>{let{accessor:O,hidden:k,visibleMediaQuery:M,textAlignment:Z,noWrap:Be,ellipsis:ye,width:Te,render:we,cellsClassName:X,cellsStyle:$,cellsSx:Oe,customCellAttributes:De}=T,oe;return x&&(oe=()=>x({record:e,recordIndex:r,column:T,columnIndex:w})),k?null:Ye(Ze,{className:typeof X=="function"?X(e,r):X,style:typeof $=="function"?$(e,r):$,sx:Oe,visibleMediaQuery:M,record:e,recordIndex:r,onClick:oe,accessor:O,textAlignment:Z,noWrap:Be,ellipsis:ye,width:Te,render:we,defaultRender:a,customCellAttributes:De},O)})]}),c&&Ye($e,{colSpan:o.filter(T=>!T.hidden).length+(t?1:0),open:c.isRowExpanded(e),content:c.content(e,r),collapseProps:c.collapseProps})]})}import{createStyles as ba,Paper as Sa,useMantineTheme as ha}from"@mantine/core";import{useClickOutside as Ba,useElementSize as ya,useMergedRef as Ta,useWindowEvent as Mr}from"@mantine/hooks";import{jsx as Oa}from"react/jsx-runtime";var wa=ba(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 je({borderRadius:e="xs",shadow:r="sm",zIndex:o=3,y:a,x:t,onDestroy:f,children:d}){Mr("resize",f),Mr("scroll",f);let u=Ba(f),{ref:i,width:x,height:l}=ya(),c=Ta(u,i),{dir:n,spacing:{md:s}}=ha(),{innerWidth:g,innerHeight:C}=window,{classes:S}=wa();return Oa(Sa,{ref:c,shadow:r,radius:e,className:S.root,sx:{zIndex:o,top:a+l+s>C?C-l-s:a,left:n==="ltr"?t+x+s>g?g-x-s:t:g-s-(t-x-s<0?x+s:t)},children:d})}import{createStyles as Da}from"@mantine/core";import{jsx as ka}from"react/jsx-runtime";var Ra=Da(e=>({root:{height:1,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}}));function Je(){let{classes:e}=Ra();return ka("div",{className:e.root})}import{Box as Pa,createStyles as La,Text as Ma,UnstyledButton as Aa}from"@mantine/core";import{jsx as Ar,jsxs as Ha}from"react/jsx-runtime";var va=La((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}=va({color:o});return Ha(Aa,{className:f.root,disabled:a,onClick:t,children:[e&&Ar(Pa,{className:f.icon,children:e}),Ar(Ma,{className:f.title,size:"sm",children:r})]})}import{Box as Na,createStyles as Fa,ScrollArea as Ea}from"@mantine/core";import{forwardRef as Wa}from"react";import{jsx as Se,jsxs as za}from"react/jsx-runtime";var Ia=Fa(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}}}),vr=Wa(function({topShadowVisible:r,leftShadowVisible:o,rightShadowVisible:a,bottomShadowVisible:t,headerHeight:f,onScrollPositionChange:d,children:u},i){let{cx:x,classes:l}=Ia();return za(Ea,{viewportRef:i,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:f}},onScrollPositionChange:d,children:[u,Se(Na,{className:x(l.shadow,l.topShadow,{[l.shadowVisible]:r}),sx:{top:f}}),Se("div",{className:x(l.shadow,l.leftShadow,{[l.shadowVisible]:o})}),Se("div",{className:x(l.shadow,l.rightShadow,{[l.shadowVisible]:a})}),Se("div",{className:x(l.shadow,l.bottomShadow,{[l.shadowVisible]:t})})]})});import{jsx as R,jsxs as Hr}from"react/jsx-runtime";var Xa={},$a=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":{borderTopColor: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 Nr({withBorder:e,borderRadius:r,borderColor:o=h=>h.colorScheme==="dark"?h.colors.dark[4]:h.colors.gray[3],rowBorderColor:a=h=>h.fn.rgba(h.colorScheme==="dark"?h.colors.dark[4]:h.colors.gray[3],.65),withColumnBorders:t,textSelectionDisabled:f,height:d="100%",minHeight:u,shadow:i,verticalAlignment:x="center",fetching:l,columns:c,defaultColumnRender:n,idAccessor:s="id",records:g,selectedRecords:C,onSelectedRecordsChange:S,isRecordSelectable:B,sortStatus:H,onSortStatusChange:P,horizontalSpacing:T,page:w,onPageChange:O,totalRecords:k,recordsPerPage:M,onRecordsPerPageChange:Z,recordsPerPageOptions:Be,recordsPerPageLabel:ye="Records per page",paginationColor:Te,paginationSize:we="sm",paginationText:X=({from:h,to:K,totalRecords:W})=>`${h} - ${K} / ${W}`,paginationWrapBreakpoint:$="sm",loaderBackgroundBlur:Oe,customLoader:De,loaderSize:oe,loaderVariant:Fr,loaderColor:Er,loadingText:Wr="...",emptyState:Ir,noRecordsText:er="No records",noRecordsIcon:zr,striped:qr,onRowClick:Re,onCellClick:Vr,rowContextMenu:L,rowExpansion:Gr,rowClassName:Ur,rowStyle:Zr,rowSx:Xr,customRowAttributes:$r,bodyRef:Kr,m:Yr,my:Qr,mx:jr,mt:Jr,mb:_r,ml:eo,mr:ro,sx:oo,className:ao,classNames:ke,style:to,styles:Pe,...fo}){let{ref:h,width:K,height:W}=he(),{ref:lo,height:Le}=he(),{ref:so,width:Me,height:ae}=he(),{ref:uo,height:rr}=he(),{scrolledToTop:po,setScrolledToTop:or,scrolledToBottom:mo,setScrolledToBottom:ar,scrolledToLeft:tr,setScrolledToLeft:fr,scrolledToRight:xo,setScrolledToRight:lr}=wr(),{rowContextMenuInfo:N,setRowContextMenuInfo:Y}=Dr(l),no=Rr({rowExpansion:Gr,records:g,idAccessor:s}),sr=()=>{if(!l&&L&&Y(null),l||ae<=W)or(!0),ar(!0);else{let m=h.current.scrollTop;or(m===0),ar(Math.round(ae-m)===Math.round(W))}if(l||Me===K)fr(!0),lr(!0);else{let m=h.current.scrollLeft;fr(m===0),lr(Math.round(Me-m)===Math.round(K))}};Za(sr,[l,W,h,K,ae,Me]);let io=m=>{h.current.scrollTo({top:0,left:0}),O(m)},te=g?.length,dr=g?.map(m=>b(m,s)),Q=C?.map(m=>b(m,s)),ur=dr!==void 0&&Q!==void 0&&Q.length>0,pr=B?g?.filter(B):g,Ae=pr?.map(m=>b(m,s)),ve=ur&&Ae.every(m=>Q.includes(m)),co=ur&&Ae.some(m=>Q.includes(m)),mr;S&&(mr=()=>{S(ve?C.filter(m=>!Ae.includes(b(m,s))):ne([...C,...pr],m=>b(m,s)))});let{lastSelectionChangeIndex:fe,setLastSelectionChangeIndex:go}=Or(dr),xr=!!C&&!tr,{cx:nr,classes:A,theme:Co}=$a({borderColor:o,rowBorderColor:a}),bo={m:Yr,my:Qr,mx:jr,mt:Jr,mb:_r,ml:eo,mr:ro},He=typeof Pe=="function"?Pe(Co,Xa):Pe;return Hr(qa,{...bo,className:nr(A.root,{[A.tableWithBorder]:e},ao,ke?.root),sx:[m=>({borderRadius:m.radius[r]||r,boxShadow:m.shadows[i]||i,height:d,minHeight:u}),...Ga(oo)],style:{...He?.root,...to},children:[R(vr,{ref:h,topShadowVisible:!po,leftShadowVisible:!(C||tr),rightShadowVisible:!xo,bottomShadowVisible:!mo,headerHeight:Le,onScrollPositionChange:sr,children:Hr(Ua,{ref:so,horizontalSpacing:T,className:nr(A.table,{[A.tableWithColumnBorders]:t,[A.lastRowBorderBottomVisible]:ae<W,[A.textSelectionDisabled]:f,[A.verticalAlignmentTop]:x==="top",[A.verticalAlignmentBottom]:x==="bottom"}),striped:te?qr:!1,...fo,children:[R(Br,{ref:lo,className:ke?.header,style:He?.header,columns:c,sortStatus:H,onSortStatusChange:P,selectionVisible:!!C,selectionChecked:ve,selectionIndeterminate:co&&!ve,onSelectionChange:mr,leftShadowVisible:xr}),R("tbody",{ref:Kr,children:te?g.map((m,y)=>{let I=b(m,s),j=Q?.includes(I)||!1,le=!1,se=!1;if(L){let{hidden:D}=L;(!D||!(typeof D=="function"?D(m,y):D))&&(L.trigger==="click"?le=!0:se=!0)}let de;S&&(de=D=>{if(D.nativeEvent.shiftKey&&fe!==null){let z=g.filter(y>fe?(F,E)=>E>=fe&&E<=y&&(B?B(F,E):!0):(F,E)=>E>=y&&E<=fe&&(B?B(F,E):!0));S(j?hr(C,z,F=>b(F,s)):ne([...C,...z],F=>b(F,s)))}else S(j?C.filter(z=>b(z,s)!==I):ne([...C,m],z=>b(z,s)));go(y)});let J;le?J=D=>{Y({y:D.clientY,x:D.clientX,record:m,recordIndex:y}),Re?.(m,y)}:Re&&(J=()=>{Re(m,y)});let ir;return se&&(ir=D=>{D.preventDefault(),Y({y:D.clientY,x:D.clientX,record:m,recordIndex:y})}),R(Qe,{record:m,recordIndex:y,columns:c,defaultColumnRender:n,selectionVisible:!!C,selectionChecked:j,onSelectionChange:de,isRecordSelectable:B,onClick:J,onCellClick:Vr,onContextMenu:ir,contextMenuVisible:N?b(N.record,s)===I:!1,expansion:no,className:Ur,style:Zr,sx:Xr,customRowAttributes:$r,leftShadowVisible:xr},I)}):R(Ne,{})})]})}),w&&R(Sr,{ref:uo,className:ke?.pagination,style:He?.pagination,topBorderColor:o,horizontalSpacing:T,fetching:l,page:w,onPageChange:io,totalRecords:k,recordsPerPage:M,onRecordsPerPageChange:Z,recordsPerPageOptions:Be,recordsPerPageLabel:ye,paginationColor:Te,paginationSize:we,paginationText:X,paginationWrapBreakpoint:$,noRecordsText:er,loadingText:Wr,recordsLength:te}),R(Ue,{pt:Le,pb:rr,fetching:l,backgroundBlur:Oe,customContent:De,size:oe,variant:Fr,color:Er}),R(Ie,{pt:Le,pb:rr,icon:zr,text:er,active:!l&&!te,children:Ir}),L&&N&&R(je,{zIndex:L.zIndex,borderRadius:L.borderRadius,shadow:L.shadow,y:N.y,x:N.x,onDestroy:()=>Y(null),children:L.items(N.record,N.recordIndex).map(({divider:m,key:y,title:I,icon:j,color:le,hidden:se,disabled:de,onClick:J})=>m?R(Je,{},y):se?null:R(_e,{title:I??xe(y),icon:j,color:le,disabled:de,onClick:()=>{Y(null),J()}},y))})]})}export{Nr as DataTable};
|
|
1
|
+
var Mr=Object.create;var ie=Object.defineProperty;var vr=Object.getOwnPropertyDescriptor;var Hr=Object.getOwnPropertyNames;var Nr=Object.getPrototypeOf,Er=Object.prototype.hasOwnProperty;var qr=(o,e)=>()=>(o&&(e=o(o=0)),e);var vo=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var Wr=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of Hr(e))!Er.call(o,f)&&f!==r&&ie(o,f,{get:()=>e[f],enumerable:!(t=vr(e,f))||t.enumerable});return o};var zr=(o,e,r)=>(r=o!=null?Mr(Nr(o)):{},Wr(e||!o||!o.__esModule?ie(r,"default",{value:o,enumerable:!0}):r,o));import*as c from"react";var a=qr(()=>{"use strict"});var Se=vo((Ot,Ce)=>{"use strict";a();var Gr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Ce.exports=Gr});var ye=vo((Ft,Be)=>{"use strict";a();var Xr=Se();function he(){}function be(){}be.resetWarningCache=he;Be.exports=function(){function o(t,f,n,d,u,m){if(m!==Xr){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}o.isRequired=o;function e(){return o}var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:e,element:o,elementType:o,instanceOf:e,node:o,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:be,resetWarningCache:he};return r.PropTypes=r,r}});var we=vo((Lt,Te)=>{a();Te.exports=ye()();var At,Pt});a();a();import{Box as xt,createStyles as It,packSx as it,Table as gt}from"@mantine/core";import{useElementSize as ho}from"@mantine/hooks";import{useEffect as Ct}from"react";a();import{createStyles as Vr}from"@mantine/core";import{jsx as ge}from"react/jsx-runtime";var Ur=Vr({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function Ho(){let{classes:o}=Ur();return ge("tr",{className:o.root,children:ge("td",{})})}a();import{Center as Jr,createStyles as jr,Text as oa}from"@mantine/core";a();a();var M=zr(we());import{forwardRef as Zr,createElement as Oe}from"react";a();var Re={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Kr=Object.defineProperty,$r=Object.defineProperties,_r=Object.getOwnPropertyDescriptors,lo=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,De=(o,e,r)=>e in o?Kr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Fe=(o,e)=>{for(var r in e||(e={}))ke.call(e,r)&&De(o,r,e[r]);if(lo)for(var r of lo(e))Ae.call(e,r)&&De(o,r,e[r]);return o},Yr=(o,e)=>$r(o,_r(e)),Qr=(o,e)=>{var r={};for(var t in o)ke.call(o,t)&&e.indexOf(t)<0&&(r[t]=o[t]);if(o!=null&&lo)for(var t of lo(o))e.indexOf(t)<0&&Ae.call(o,t)&&(r[t]=o[t]);return r},V=(o,e,r)=>{let t=Zr((f,n)=>{var d=f,{color:u="currentColor",size:m=24,stroke:p=2,children:l}=d,i=Qr(d,["color","size","stroke","children"]);return Oe("svg",Fe(Yr(Fe({ref:n},Re),{width:m,height:m,stroke:u,strokeWidth:p,className:`tabler-icon tabler-icon-${o}`}),i),[...r.map(([x,s])=>Oe(x,s)),...l||[]])});return t.propTypes={color:M.default.string,size:M.default.oneOfType([M.default.string,M.default.number]),stroke:M.default.oneOfType([M.default.string,M.default.number])},t.displayName=`${e}`,t};a();var No=V("arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]);a();var Eo=V("arrows-vertical","IconArrowsVertical",[["path",{d:"M8 7l4 -4l4 4",key:"svg-0"}],["path",{d:"M8 17l4 4l4 -4",key:"svg-1"}],["path",{d:"M12 3l0 18",key:"svg-2"}]]);a();var qo=V("database-off","IconDatabaseOff",[["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",key:"svg-0"}],["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",key:"svg-1"}],["path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]);import{Fragment as ra,jsx as so,jsxs as aa}from"react/jsx-runtime";var ea=jr(o=>({root:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"column",pointerEvents:"none",color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[6],opacity:0,transition:"opacity .15s ease"},active:{opacity:1},standardIcon:{fontSize:0,borderRadius:"50%",padding:o.spacing.xs,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[2]}}));function Wo({icon:o,text:e,pt:r,pb:t,active:f,children:n}){let{classes:d,cx:u}=ea();return so(Jr,{pt:r,pb:t,className:u(d.root,{[d.active]:f}),children:n||aa(ra,{children:[o||so("div",{className:d.standardIcon,children:so(qo,{})}),so(oa,{size:"sm",color:"dimmed",children:e})]})})}a();import{Box as na,createStyles as la,Pagination as da,Text as sa}from"@mantine/core";import{forwardRef as ca}from"react";a();import{Button as ta,Group as fa,Menu as co,Text as Pe}from"@mantine/core";import{jsx as U,jsxs as Me}from"react/jsx-runtime";var Le={xs:22,sm:26,md:32,lg:38,xl:44};function zo({size:o,label:e,values:r,value:t,onChange:f,color:n}){return Me(fa,{spacing:"xs",children:[U(Pe,{size:o,children:e}),Me(co,{withinPortal:!0,withArrow:!0,children:[U(co.Target,{children:U(ta,{size:o,variant:"default",sx:[{fontWeight:"normal"},d=>({height:Le[o],paddingLeft:d.spacing[o],paddingRight:d.spacing[o]})],children:t})}),U(co.Dropdown,{children:r.map(d=>{let u=d===t;return U(co.Item,{sx:[{height:Le[o]},m=>({"&&":{color:u?m.white:void 0},background:u?m.colors[n||m.primaryColor][6]:void 0})],disabled:u,onClick:()=>f(d),children:U(Pe,{size:o,children:d})},d)})})]})]})}import{jsx as Vo,jsxs as pa}from"react/jsx-runtime";var ua=la((o,{topBorderColor:e,paginationWrapBreakpoint:r})=>({root:{background:o.colorScheme==="dark"?o.colors.dark[7]:o.white,borderTop:`1px solid ${typeof e=="function"?e(o):e}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:o.spacing.xs,[o.fn.largerThan(r)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),ve=ca(function({className:e,style:r,topBorderColor:t,fetching:f,page:n,onPageChange:d,paginationColor:u,paginationSize:m,loadingText:p,noRecordsText:l,paginationText:i,totalRecords:x,recordsPerPage:s,onRecordsPerPageChange:g,recordsPerPageLabel:C,recordsPerPageOptions:h,recordsLength:B,horizontalSpacing:v,paginationWrapBreakpoint:k},T){let w;if(f)w=p;else if(!x)w=l;else{let P=(n-1)*s+1,X=P+B-1;w=i({from:P,to:X,totalRecords:x})}let{classes:R,cx:F}=ua({topBorderColor:t,paginationWrapBreakpoint:k});return pa(na,{ref:T,px:v??"xs",py:"xs",className:F(R.root,e),style:r,children:[Vo(sa,{className:R.text,size:m,children:w}),h&&Vo(zo,{size:m,label:C,values:h,value:s,onChange:g}),Vo(da,{color:u,className:F(R.pagination,{[R.paginationFetching]:f||!B}),page:n,onChange:d,size:m,total:Math.ceil(x/s)})]})});a();import{Checkbox as ha,createStyles as ba}from"@mantine/core";import{forwardRef as Ba}from"react";a();import{Box as Uo,Center as Ia,createStyles as ia,Group as ga}from"@mantine/core";a();import{useMantineTheme as ma}from"@mantine/core";import{useMediaQuery as xa}from"@mantine/hooks";function uo(o){let e=ma(),r=typeof o=="function"?o(e):o;return xa(r||"",!0)}function po(o){let e=o.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function He(o,e,r){return o.filter(t=>!e.map(r).includes(r(t)))}function mo(o,e){return o.filter((r,t,f)=>t===f.findIndex(n=>e(r)===e(n)))}function S(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}import{jsx as G,jsxs as Sa}from"react/jsx-runtime";var Ca=ia(o=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:o.colorScheme==="dark"?o.colors.dark[6]:o.colors.gray[0]}},sortableColumnHeaderGroup:{gap:"0.25em"},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:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[5],transition:"color .15s ease","th:hover &":{color:o.colorScheme==="dark"?o.colors.dark[2]:o.colors.gray[6]}}}));function Go({className:o,sx:e,style:r,accessor:t,visibleMediaQuery:f,title:n,sortable:d,textAlignment:u,width:m,sortStatus:p,onSortStatusChange:l}){let{cx:i,classes:x}=Ca();if(!uo(f))return null;let s=n??po(t),g=typeof s=="string"?s:void 0;return G(Uo,{component:"th",className:i({[x.sortableColumnHeader]:d},o),sx:[{"&&":{textAlign:u},width:m,minWidth:m,maxWidth:m},e],style:r,role:d?"button":void 0,onClick:d&&l?()=>{l({columnAccessor:t,direction:p?.direction==="asc"?"desc":"asc"})}:void 0,children:d||p?.columnAccessor===t?Sa(ga,{className:x.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[G(Uo,{className:i(x.columnHeaderText,x.sortableColumnHeaderText),title:g,children:s}),G(Ia,{children:p?.columnAccessor===t?G(No,{className:i(x.sortableColumnHeaderIcon,{[x.sortableColumnHeaderIconRotated]:p.direction==="desc"}),size:14}):G(Eo,{className:x.sortableColumnHeaderNeutralIcon,size:14})})]}):G(Uo,{className:x.columnHeaderText,title:g,children:s})})}import{jsx as xo,jsxs as Ta}from"react/jsx-runtime";var ya=ba(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white},textSelectionDisabled:{userSelect:"none"},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-o.spacing.sm,bottom:0,borderLeft:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),Ne=Ba(function({className:e,style:r,sortStatus:t,onSortStatusChange:f,columns:n,selectionVisible:d,selectionChecked:u,selectionIndeterminate:m,onSelectionChange:p,leftShadowVisible:l},i){let{classes:x,cx:s}=ya();return xo("thead",{className:s(x.root,e),style:r,ref:i,children:Ta("tr",{children:[d&&xo("th",{className:s(x.selectorColumnHeader,{[x.selectorColumnHeaderWithRightShadow]:l}),children:xo(ha,{classNames:{input:x.selectionCheckboxInput},checked:u,indeterminate:m,disabled:!p,onChange:p})}),n.map(({accessor:g,hidden:C,visibleMediaQuery:h,textAlignment:B,width:v,title:k,sortable:T,titleClassName:w,titleStyle:R,titleSx:F})=>C?null:xo(Go,{className:w,style:R,sx:F,accessor:g,visibleMediaQuery:h,textAlignment:B,width:v,title:k,sortable:T,sortStatus:t,onSortStatusChange:f},g))]})})});a();import{Center as wa,createStyles as Ra,Loader as Oa}from"@mantine/core";import{jsx as Ee}from"react/jsx-runtime";var Da=Ra(o=>({root:{zIndex:3,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",background:o.fn.rgba(o.colorScheme==="dark"?o.colors.dark[8]:o.white,.75),opacity:0,transition:"opacity .15s ease"},fetching:{pointerEvents:"all",opacity:1}}));function Xo({pt:o,pb:e,fetching:r,customContent:t,backgroundBlur:f,size:n,variant:d,color:u}){let{classes:m,cx:p}=Da();return Ee(wa,{pt:o,pb:e,className:p(m.root,{[m.fetching]:r}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:r&&(t||Ee(Oa,{size:n,variant:d,color:u}))})}a();import{Box as za,createStyles as Va}from"@mantine/core";a();import{Box as Fa,createStyles as ka}from"@mantine/core";import{jsx as Pa}from"react/jsx-runtime";var Aa=ka({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Zo({className:o,sx:e,style:r,visibleMediaQuery:t,record:f,recordIndex:n,onClick:d,noWrap:u,ellipsis:m,textAlignment:p,width:l,accessor:i,render:x,defaultRender:s,customCellAttributes:g}){let{cx:C,classes:h}=Aa();return uo(t)?Pa(Fa,{component:"td",className:C({[h.noWrap]:u||m,[h.ellipsis]:m,[h.withPointerCursor]:d},o),sx:[{width:l,minWidth:l,maxWidth:l,textAlign:p},e],style:r,onClick:d,...g?.(f,n),children:x?x(f,n):s?s(f,n,i):S(f,i)}):null}a();import{Collapse as La,createStyles as Ma}from"@mantine/core";a();import{useDebouncedState as Io,useTimeout as qe}from"@mantine/hooks";import{useEffect as Ko,useState as j}from"react";var io=200,go={leading:!0};function We(){let[o,e]=Io(!0,io,go),[r,t]=Io(!0,io,go),[f,n]=Io(!0,io,go),[d,u]=Io(!0,io,go);return{scrolledToTop:o,setScrolledToTop:e,scrolledToBottom:r,setScrolledToBottom:t,scrolledToLeft:f,setScrolledToLeft:n,scrolledToRight:d,setScrolledToRight:u}}function ze(o){let[e,r]=j(null),t=o?.join(":")||"";return Ko(()=>{r(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function Ve(o){let[e,r]=j(null);return Ko(()=>{o&&r(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:r}}function Ue({rowExpansion:o,records:e,idAccessor:r}){let t=[];if(o&&e){let{trigger:u,allowMultiple:m,initiallyExpanded:p}=o;e&&u==="always"?t=e.map(l=>S(l,r)):p&&(t=e.filter(p).map(l=>S(l,r)),m||(t=[t[0]]))}let f,n,d=j(t);if(o){let{trigger:u,allowMultiple:m,collapseProps:p,content:l}=o;o.expanded?{recordIds:f,onRecordIdsChange:n}=o.expanded:[f,n]=d;let i=x=>n(f.filter(s=>s!==S(x,r)));return{expandOnClick:u!=="always"&&u!=="never",isRowExpanded:x=>u==="always"?!0:f.includes(S(x,r)),expandRow:x=>{let s=S(x,r);n(m?[...f,s]:[s])},collapseRow:i,collapseProps:p,content:(x,s)=>()=>l({record:x,recordIndex:s,collapse:()=>i(x)})}}}function Ge(o,e){let[r,t]=j(o),[f,n]=j(o),d=qe(()=>t(!0),0),u=qe(()=>n(!1),e||200);return Ko(()=>{o?(u.clear(),n(!0),d.start()):(d.clear(),t(!1),u.start())},[d,u,o]),{expanded:r,visible:f}}import{Fragment as Ha,jsx as Co,jsxs as Na}from"react/jsx-runtime";var va=Ma({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function $o({open:o,colSpan:e,content:r,collapseProps:t}){let{expanded:f,visible:n}=Ge(o,t?.transitionDuration),{cx:d,classes:u}=va();return n?Na(Ha,{children:[Co("tr",{}),Co("tr",{children:Co("td",{className:d(u.cell,{[u.expandedCell]:f}),colSpan:e,children:Co(La,{in:f,...t,children:r()})})})]}):null}a();import{Checkbox as Ea,createStyles as qa}from"@mantine/core";import{jsx as Xe}from"react/jsx-runtime";var Wa=qa(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",zIndex:1,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-o.spacing.sm,bottom:0,borderLeft:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},withRightShadow:{"&::after":{opacity:1}},checkbox:{cursor:"pointer"}}});function _o({withRightShadow:o,...e}){let{cx:r,classes:t}=Wa();return Xe("td",{className:r(t.root,{[t.withRightShadow]:o}),children:Xe(Ea,{classNames:{input:t.checkbox},...e,onClick:f=>f.stopPropagation()})})}import{Fragment as Ga,jsx as Yo,jsxs as Ze}from"react/jsx-runtime";var Ua=Va(o=>{let e=o.colors[o.primaryColor][6];return{withPointerCursor:{cursor:"pointer"},selected:{"&&":{"tr&":{background:o.colorScheme==="dark"?o.fn.darken(e,.6):o.fn.lighten(e,.9)},"table[data-striped] tbody &:nth-of-type(odd)":{background:o.colorScheme==="dark"?o.fn.darken(e,.55):o.fn.lighten(e,.85)}}},contextMenuVisible:{"&&":{"tr&":{background:o.colorScheme==="dark"?o.fn.darken(e,.5):o.fn.lighten(e,.7)},"table[data-striped] tbody &:nth-of-type(odd)":{background:o.colorScheme==="dark"?o.fn.darken(e,.45):o.fn.lighten(e,.65)}}}}});function Qo({record:o,recordIndex:e,columns:r,defaultColumnRender:t,selectionVisible:f,selectionChecked:n,onSelectionChange:d,isRecordSelectable:u,onClick:m,onCellClick:p,onContextMenu:l,expansion:i,customRowAttributes:x,className:s,style:g,sx:C,contextMenuVisible:h,leftShadowVisible:B}){let{cx:v,classes:k}=Ua();return Ze(Ga,{children:[Ze(za,{component:"tr",className:v({[k.withPointerCursor]:m||i?.expandOnClick,[k.selected]:n,[k.contextMenuVisible]:h},typeof s=="function"?s(o,e):s),onClick:T=>{if(i){let{isRowExpanded:w,expandOnClick:R,expandRow:F,collapseRow:P}=i;R&&(w(o)?P(o):F(o))}m?.(T)},style:typeof g=="function"?g(o,e):g,sx:C,...x?.(o,e),onContextMenu:l,children:[f&&Yo(_o,{withRightShadow:B,checked:n,disabled:!d||(u?!u(o,e):!1),onChange:d}),r.map((T,w)=>{let{accessor:R,hidden:F,visibleMediaQuery:P,textAlignment:X,noWrap:bo,ellipsis:Bo,width:yo,render:To,cellsClassName:Z,cellsStyle:K,cellsSx:wo,customCellAttributes:Ro}=T,oo;return p&&(oo=()=>p({record:o,recordIndex:e,column:T,columnIndex:w})),F?null:Yo(Zo,{className:typeof Z=="function"?Z(o,e):Z,style:typeof K=="function"?K(o,e):K,sx:wo,visibleMediaQuery:P,record:o,recordIndex:e,onClick:oo,accessor:R,textAlignment:X,noWrap:bo,ellipsis:Bo,width:yo,render:To,defaultRender:t,customCellAttributes:Ro},R)})]}),i&&Yo($o,{colSpan:r.filter(T=>!T.hidden).length+(f?1:0),open:i.isRowExpanded(o),content:i.content(o,e),collapseProps:i.collapseProps})]})}a();import{createStyles as Xa,Paper as Za,useMantineTheme as Ka}from"@mantine/core";import{useClickOutside as $a,useElementSize as _a,useMergedRef as Ya,useWindowEvent as Ke}from"@mantine/hooks";import{jsx as Ja}from"react/jsx-runtime";var Qa=Xa(o=>({root:{position:"fixed",border:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,overflow:"hidden",transition:"all .15s ease"}}));function Jo({borderRadius:o="xs",shadow:e="sm",zIndex:r=3,y:t,x:f,onDestroy:n,children:d}){Ke("resize",n),Ke("scroll",n);let u=$a(n),{ref:m,width:p,height:l}=_a(),i=Ya(u,m),{dir:x,spacing:{md:s}}=Ka(),{innerWidth:g,innerHeight:C}=window,{classes:h}=Qa();return Ja(Za,{ref:i,shadow:e,radius:o,className:h.root,sx:{zIndex:r,top:t+l+s>C?C-l-s:t,left:x==="ltr"?f+p+s>g?g-p-s:f:g-s-(f-p-s<0?p+s:f)},children:d})}a();import{createStyles as ja}from"@mantine/core";import{jsx as et}from"react/jsx-runtime";var ot=ja(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function jo(){let{classes:o}=ot();return et("div",{className:o.root})}a();import{Box as rt,createStyles as at,Text as tt,UnstyledButton as ft}from"@mantine/core";import{jsx as $e,jsxs as lt}from"react/jsx-runtime";var nt=at((o,{color:e})=>{let r=o.spacing.sm/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:r,paddingBottom:r,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,color:e&&o.colors[e][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[5]},"&:hover:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:o.spacing.xs},title:{whiteSpace:"nowrap"}}});function oe({icon:o,title:e,color:r,disabled:t,onClick:f}){let{classes:n}=nt({color:r});return lt(ft,{className:n.root,disabled:t,onClick:f,children:[o&&$e(rt,{className:n.icon,children:o}),$e(tt,{className:n.title,size:"sm",children:e})]})}a();import{Box as dt,createStyles as st,ScrollArea as ct}from"@mantine/core";import{forwardRef as ut}from"react";import{jsx as So,jsxs as mt}from"react/jsx-runtime";var pt=st(o=>{let e=o.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:o.spacing.sm,background:`linear-gradient(${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},leftShadow:{zIndex:3,top:0,left:0,bottom:0,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},rightShadow:{zIndex:2,top:0,bottom:0,right:0,width:o.spacing.sm,background:`linear-gradient(to left, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to left, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},bottomShadow:{zIndex:2,left:0,right:0,bottom:0,height:o.spacing.sm,background:`linear-gradient(${o.fn.rgba(o.black,0)}, ${o.fn.rgba(o.black,e)}), linear-gradient(${o.fn.rgba(o.black,0)} 30%, ${o.fn.rgba(o.black,e)})`},shadowVisible:{opacity:1}}}),_e=ut(function({topShadowVisible:e,leftShadowVisible:r,rightShadowVisible:t,bottomShadowVisible:f,headerHeight:n,onScrollPositionChange:d,children:u},m){let{cx:p,classes:l}=pt();return mt(ct,{viewportRef:m,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:n}},onScrollPositionChange:d,children:[u,So(dt,{className:p(l.shadow,l.topShadow,{[l.shadowVisible]:e}),sx:{top:n}}),So("div",{className:p(l.shadow,l.leftShadow,{[l.shadowVisible]:r})}),So("div",{className:p(l.shadow,l.rightShadow,{[l.shadowVisible]:t})}),So("div",{className:p(l.shadow,l.bottomShadow,{[l.shadowVisible]:f})})]})});import{jsx as D,jsxs as Ye}from"react/jsx-runtime";var St={},ht=It((o,{borderColor:e,rowBorderColor:r})=>{let t=typeof e=="function"?e(o):e,f=typeof r=="function"?r(o):r;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:o.colorScheme==="dark"?o.colors.dark[7]:o.white},"&&":{"thead tr th":{borderBottomColor:t},"tbody tr td":{borderTopColor:f}}},lastRowBorderBottomVisible:{"tbody tr:last-of-type td":{borderBottom:`1px solid ${f}`}},textSelectionDisabled:{userSelect:"none"},table:{borderCollapse:"separate",borderSpacing:0},tableWithBorder:{border:`1px solid ${t}`},tableWithColumnBorders:{"&&":{"th, td":{":not(:first-of-type)":{borderLeft:`1px solid ${f}`}}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function Qe({withBorder:o,borderRadius:e,borderColor:r=b=>b.colorScheme==="dark"?b.colors.dark[4]:b.colors.gray[3],rowBorderColor:t=b=>b.fn.rgba(b.colorScheme==="dark"?b.colors.dark[4]:b.colors.gray[3],.65),withColumnBorders:f,textSelectionDisabled:n,height:d="100%",minHeight:u,shadow:m,verticalAlignment:p="center",fetching:l,columns:i,defaultColumnRender:x,idAccessor:s="id",records:g,selectedRecords:C,onSelectedRecordsChange:h,isRecordSelectable:B,sortStatus:v,onSortStatusChange:k,horizontalSpacing:T,page:w,onPageChange:R,totalRecords:F,recordsPerPage:P,onRecordsPerPageChange:X,recordsPerPageOptions:bo,recordsPerPageLabel:Bo="Records per page",paginationColor:yo,paginationSize:To="sm",paginationText:Z=({from:b,to:$,totalRecords:q})=>`${b} - ${$} / ${q}`,paginationWrapBreakpoint:K="sm",loaderBackgroundBlur:wo,customLoader:Ro,loaderSize:oo,loaderVariant:Je,loaderColor:je,loadingText:or="...",emptyState:er,noRecordsText:ee="No records",noRecordsIcon:rr,striped:ar,onRowClick:Oo,onCellClick:tr,rowContextMenu:A,rowExpansion:fr,rowClassName:nr,rowStyle:lr,rowSx:dr,customRowAttributes:sr,bodyRef:cr,m:ur,my:pr,mx:mr,mt:xr,mb:Ir,ml:ir,mr:gr,sx:Cr,className:Sr,classNames:Do,style:hr,styles:Fo,...br}){let{ref:b,width:$,height:q}=ho(),{ref:Br,height:ko}=ho(),{ref:yr,width:Ao,height:eo}=ho(),{ref:Tr,height:re}=ho(),{scrolledToTop:wr,setScrolledToTop:ae,scrolledToBottom:Rr,setScrolledToBottom:te,scrolledToLeft:fe,setScrolledToLeft:ne,scrolledToRight:Or,setScrolledToRight:le}=We(),{rowContextMenuInfo:H,setRowContextMenuInfo:_}=Ve(l),Dr=Ue({rowExpansion:fr,records:g,idAccessor:s}),de=()=>{if(!l&&A&&_(null),l||eo<=q)ae(!0),te(!0);else{let I=b.current.scrollTop;ae(I===0),te(Math.round(eo-I)===Math.round(q))}if(l||Ao===$)ne(!0),le(!0);else{let I=b.current.scrollLeft;ne(I===0),le(Math.round(Ao-I)===Math.round($))}};Ct(de,[l,q,b,$,eo,Ao]);let Fr=I=>{b.current.scrollTo({top:0,left:0}),R(I)},ro=g?.length,se=g?.map(I=>S(I,s)),Y=C?.map(I=>S(I,s)),ce=se!==void 0&&Y!==void 0&&Y.length>0,ue=B?g?.filter(B):g,Po=ue?.map(I=>S(I,s)),Lo=ce&&Po.every(I=>Y.includes(I)),kr=ce&&Po.some(I=>Y.includes(I)),pe;h&&(pe=()=>{h(Lo?C.filter(I=>!Po.includes(S(I,s))):mo([...C,...ue],I=>S(I,s)))});let{lastSelectionChangeIndex:ao,setLastSelectionChangeIndex:Ar}=ze(se),me=!!C&&!fe,{cx:xe,classes:L,theme:Pr}=ht({borderColor:r,rowBorderColor:t}),Lr={m:ur,my:pr,mx:mr,mt:xr,mb:Ir,ml:ir,mr:gr},Mo=typeof Fo=="function"?Fo(Pr,St):Fo;return Ye(xt,{...Lr,className:xe(L.root,{[L.tableWithBorder]:o},Sr,Do?.root),sx:[I=>({borderRadius:I.radius[e]||e,boxShadow:I.shadows[m]||m,height:d,minHeight:u}),...it(Cr)],style:{...Mo?.root,...hr},children:[D(_e,{ref:b,topShadowVisible:!wr,leftShadowVisible:!(C||fe),rightShadowVisible:!Or,bottomShadowVisible:!Rr,headerHeight:ko,onScrollPositionChange:de,children:Ye(gt,{ref:yr,horizontalSpacing:T,className:xe(L.table,{[L.tableWithColumnBorders]:f,[L.lastRowBorderBottomVisible]:eo<q,[L.textSelectionDisabled]:n,[L.verticalAlignmentTop]:p==="top",[L.verticalAlignmentBottom]:p==="bottom"}),striped:ro?ar:!1,...br,children:[D(Ne,{ref:Br,className:Do?.header,style:Mo?.header,columns:i,sortStatus:v,onSortStatusChange:k,selectionVisible:!!C,selectionChecked:Lo,selectionIndeterminate:kr&&!Lo,onSelectionChange:pe,leftShadowVisible:me}),D("tbody",{ref:cr,children:ro?g.map((I,y)=>{let W=S(I,s),Q=Y?.includes(W)||!1,to=!1,fo=!1;if(A){let{hidden:O}=A;(!O||!(typeof O=="function"?O(I,y):O))&&(A.trigger==="click"?to=!0:fo=!0)}let no;h&&(no=O=>{if(O.nativeEvent.shiftKey&&ao!==null){let z=g.filter(y>ao?(N,E)=>E>=ao&&E<=y&&(B?B(N,E):!0):(N,E)=>E>=y&&E<=ao&&(B?B(N,E):!0));h(Q?He(C,z,N=>S(N,s)):mo([...C,...z],N=>S(N,s)))}else h(Q?C.filter(z=>S(z,s)!==W):mo([...C,I],z=>S(z,s)));Ar(y)});let J;to?J=O=>{_({y:O.clientY,x:O.clientX,record:I,recordIndex:y}),Oo?.(I,y)}:Oo&&(J=()=>{Oo(I,y)});let Ie;return fo&&(Ie=O=>{O.preventDefault(),_({y:O.clientY,x:O.clientX,record:I,recordIndex:y})}),D(Qo,{record:I,recordIndex:y,columns:i,defaultColumnRender:x,selectionVisible:!!C,selectionChecked:Q,onSelectionChange:no,isRecordSelectable:B,onClick:J,onCellClick:tr,onContextMenu:Ie,contextMenuVisible:H?S(H.record,s)===W:!1,expansion:Dr,className:nr,style:lr,sx:dr,customRowAttributes:sr,leftShadowVisible:me},W)}):D(Ho,{})})]})}),w&&D(ve,{ref:Tr,className:Do?.pagination,style:Mo?.pagination,topBorderColor:r,horizontalSpacing:T,fetching:l,page:w,onPageChange:Fr,totalRecords:F,recordsPerPage:P,onRecordsPerPageChange:X,recordsPerPageOptions:bo,recordsPerPageLabel:Bo,paginationColor:yo,paginationSize:To,paginationText:Z,paginationWrapBreakpoint:K,noRecordsText:ee,loadingText:or,recordsLength:ro}),D(Xo,{pt:ko,pb:re,fetching:l,backgroundBlur:wo,customContent:Ro,size:oo,variant:Je,color:je}),D(Wo,{pt:ko,pb:re,icon:rr,text:ee,active:!l&&!ro,children:er}),A&&H&&D(Jo,{zIndex:A.zIndex,borderRadius:A.borderRadius,shadow:A.shadow,y:H.y,x:H.x,onDestroy:()=>_(null),children:A.items(H.record,H.recordIndex).map(({divider:I,key:y,title:W,icon:Q,color:to,hidden:fo,disabled:no,onClick:J})=>I?D(jo,{},y):fo?null:D(oe,{title:W??po(y),icon:Q,color:to,disabled:no,onClick:()=>{_(null),J()}},y))})]})}a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();export{Qe as DataTable};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|