mantine-datatable 1.8.8 → 2.0.1

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
- 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};
1
+ var vr=Object.create;var ie=Object.defineProperty;var Hr=Object.getOwnPropertyDescriptor;var Nr=Object.getOwnPropertyNames;var Er=Object.getPrototypeOf,qr=Object.prototype.hasOwnProperty;var Wr=(o,e)=>()=>(o&&(e=o(o=0)),e);var vo=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var zr=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of Nr(e))!qr.call(o,f)&&f!==r&&ie(o,f,{get:()=>e[f],enumerable:!(t=Hr(e,f))||t.enumerable});return o};var Vr=(o,e,r)=>(r=o!=null?vr(Er(o)):{},zr(e||!o||!o.__esModule?ie(r,"default",{value:o,enumerable:!0}):r,o));import*as s from"react";var a=Wr(()=>{"use strict"});var Se=vo((Ft,Ce)=>{"use strict";a();var Xr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Ce.exports=Xr});var ye=vo((At,Be)=>{"use strict";a();var Zr=Se();function he(){}function be(){}be.resetWarningCache=he;Be.exports=function(){function o(t,f,n,d,c,m){if(m!==Zr){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((vt,Te)=>{a();Te.exports=ye()();var Lt,Mt});a();a();import{Box as gt,createStyles as Ct,packSx as St,Table as ht}from"@mantine/core";import{useElementSize as ho}from"@mantine/hooks";import{useEffect as bt}from"react";a();import{createStyles as Ur}from"@mantine/core";import{jsx as ge}from"react/jsx-runtime";var Gr=Ur({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function Ho(){let{classes:o}=Gr();return ge("tr",{className:o.root,children:ge("td",{})})}a();import{Center as jr,createStyles as oa,Text as ea}from"@mantine/core";a();a();var M=Vr(we());import{forwardRef as Kr,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 $r=Object.defineProperty,_r=Object.defineProperties,Yr=Object.getOwnPropertyDescriptors,lo=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,De=(o,e,r)=>e in o?$r(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},Qr=(o,e)=>_r(o,Yr(e)),Jr=(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=Kr((f,n)=>{var d=f,{color:c="currentColor",size:m=24,stroke:p=2,children:l}=d,g=Jr(d,["color","size","stroke","children"]);return Oe("svg",Fe(Qr(Fe({ref:n},Re),{width:m,height:m,stroke:c,strokeWidth:p,className:`tabler-icon tabler-icon-${o}`}),g),[...r.map(([x,u])=>Oe(x,u)),...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 aa,jsx as so,jsxs as ta}from"react/jsx-runtime";var ra=oa(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:c}=ra();return so(jr,{pt:r,pb:t,className:c(d.root,{[d.active]:f}),children:n||ta(aa,{children:[o||so("div",{className:d.standardIcon,children:so(qo,{})}),so(ea,{size:"sm",color:"dimmed",children:e})]})})}a();import{Box as la,createStyles as da,Pagination as sa,Text as ca}from"@mantine/core";import{forwardRef as ua}from"react";a();import{Button as fa,Group as na,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(na,{spacing:"xs",children:[U(Pe,{size:o,children:e}),Me(co,{withinPortal:!0,withArrow:!0,children:[U(co.Target,{children:U(fa,{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 c=d===t;return U(co.Item,{sx:[{height:Le[o]},m=>({"&&":{color:c?m.white:void 0},background:c?m.colors[n||m.primaryColor][6]:void 0})],disabled:c,onClick:()=>f(d),children:U(Pe,{size:o,children:d})},d)})})]})]})}import{jsx as Vo,jsxs as ma}from"react/jsx-runtime";var pa=da((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=ua(function({className:e,style:r,topBorderColor:t,fetching:f,page:n,onPageChange:d,paginationColor:c,paginationSize:m,loadingText:p,noRecordsText:l,paginationText:g,totalRecords:x,recordsPerPage:u,onRecordsPerPageChange:i,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)*u+1,X=P+b-1;w=g({from:P,to:X,totalRecords:x})}let{classes:R,cx:F}=pa({topBorderColor:t,paginationWrapBreakpoint:k});return ma(la,{ref:T,px:v??"xs",py:"xs",className:F(R.root,e),style:r,children:[Vo(ca,{className:R.text,size:m,children:w}),h&&Vo(zo,{size:m,label:C,values:h,value:u,onChange:i}),Vo(sa,{color:c,className:F(R.pagination,{[R.paginationFetching]:f||!b}),value:n,onChange:d,size:m,total:Math.ceil(x/u)})]})});a();import{Checkbox as ba,createStyles as Ba}from"@mantine/core";import{forwardRef as ya}from"react";a();import{Box as Uo,Center as ia,createStyles as ga,Group as Ca}from"@mantine/core";a();import{useMantineTheme as xa}from"@mantine/core";import{useMediaQuery as Ia}from"@mantine/hooks";function uo(o){let e=xa(),r=typeof o=="function"?o(e):o;return Ia(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 ha}from"react/jsx-runtime";var Sa=ga(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:c,width:m,sortStatus:p,onSortStatusChange:l}){let{cx:g,classes:x}=Sa();if(!uo(f))return null;let u=n??po(t),i=typeof u=="string"?u:void 0;return G(Uo,{component:"th",className:g({[x.sortableColumnHeader]:d},o),sx:[{"&&":{textAlign:c},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?ha(Ca,{className:x.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[G(Uo,{className:g(x.columnHeaderText,x.sortableColumnHeaderText),title:i,children:u}),G(ia,{children:p?.columnAccessor===t?G(No,{className:g(x.sortableColumnHeaderIcon,{[x.sortableColumnHeaderIconRotated]:p.direction==="desc"}),size:14}):G(Eo,{className:x.sortableColumnHeaderNeutralIcon,size:14})})]}):G(Uo,{className:x.columnHeaderText,title:i,children:u})})}import{jsx as xo,jsxs as wa}from"react/jsx-runtime";var Ta=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=ya(function({className:e,style:r,sortStatus:t,onSortStatusChange:f,columns:n,selectionVisible:d,selectionChecked:c,selectionIndeterminate:m,onSelectionChange:p,leftShadowVisible:l},g){let{classes:x,cx:u}=Ta();return xo("thead",{className:u(x.root,e),style:r,ref:g,children:wa("tr",{children:[d&&xo("th",{className:u(x.selectorColumnHeader,{[x.selectorColumnHeaderWithRightShadow]:l}),children:xo(ba,{classNames:{input:x.selectionCheckboxInput},checked:c,indeterminate:m,disabled:!p,onChange:p})}),n.map(({accessor:i,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:i,visibleMediaQuery:h,textAlignment:b,width:v,title:k,sortable:T,sortStatus:t,onSortStatusChange:f},i))]})})});a();import{Center as Ra,createStyles as Oa,Loader as Da}from"@mantine/core";import{jsx as Ee}from"react/jsx-runtime";var Fa=Oa(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:c}){let{classes:m,cx:p}=Fa();return Ee(Ra,{pt:o,pb:e,className:p(m.root,{[m.fetching]:r}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:r&&(t||Ee(Da,{size:n,variant:d,color:c}))})}a();import{Box as Va,createStyles as Ua}from"@mantine/core";a();import{Box as ka,createStyles as Aa}from"@mantine/core";import{jsx as La}from"react/jsx-runtime";var Pa=Aa({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:c,ellipsis:m,textAlignment:p,width:l,accessor:g,render:x,defaultRender:u,customCellAttributes:i}){let{cx:C,classes:h}=Pa();return uo(t)?La(ka,{component:"td",className:C({[h.noWrap]:c||m,[h.ellipsis]:m,[h.withPointerCursor]:d},o),sx:[{width:l,minWidth:l,maxWidth:l,textAlign:p},e],style:r,onClick:d,...i?.(f,n),children:x?x(f,n):u?u(f,n,g):S(f,g)}):null}a();import{Collapse as Ma,createStyles as va}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,c]=Io(!0,io,go);return{scrolledToTop:o,setScrolledToTop:e,scrolledToBottom:r,setScrolledToBottom:t,scrolledToLeft:f,setScrolledToLeft:n,scrolledToRight:d,setScrolledToRight:c}}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:c,allowMultiple:m,initiallyExpanded:p}=o;e&&c==="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:c,allowMultiple:m,collapseProps:p,content:l}=o;o.expanded?{recordIds:f,onRecordIdsChange:n}=o.expanded:[f,n]=d;let g=x=>n(f.filter(u=>u!==S(x,r)));return{expandOnClick:c!=="always"&&c!=="never",isRowExpanded:x=>c==="always"?!0:f.includes(S(x,r)),expandRow:x=>{let u=S(x,r);n(m?[...f,u]:[u])},collapseRow:g,collapseProps:p,content:(x,u)=>()=>l({record:x,recordIndex:u,collapse:()=>g(x)})}}}function Ge(o,e){let[r,t]=j(o),[f,n]=j(o),d=qe(()=>t(!0),0),c=qe(()=>n(!1),e||200);return Ko(()=>{o?(c.clear(),n(!0),d.start()):(d.clear(),t(!1),c.start())},[d,c,o]),{expanded:r,visible:f}}import{Fragment as Na,jsx as Co,jsxs as Ea}from"react/jsx-runtime";var Ha=va({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:c}=Ha();return n?Ea(Na,{children:[Co("tr",{}),Co("tr",{children:Co("td",{className:d(c.cell,{[c.expandedCell]:f}),colSpan:e,children:Co(Ma,{in:f,...t,children:r()})})})]}):null}a();import{Checkbox as qa,createStyles as Wa}from"@mantine/core";import{jsx as Xe}from"react/jsx-runtime";var za=Wa(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}=za();return Xe("td",{className:r(t.root,{[t.withRightShadow]:o}),children:Xe(qa,{classNames:{input:t.checkbox},...e,onClick:f=>f.stopPropagation()})})}import{Fragment as Xa,jsx as Yo,jsxs as Ze}from"react/jsx-runtime";var Ga=Ua(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:c,onClick:m,onCellClick:p,onContextMenu:l,expansion:g,customRowAttributes:x,className:u,style:i,sx:C,contextMenuVisible:h,leftShadowVisible:b}){let{cx:v,classes:k}=Ga();return Ze(Xa,{children:[Ze(Va,{component:"tr",className:v({[k.withPointerCursor]:m||g?.expandOnClick,[k.selected]:n,[k.contextMenuVisible]:h},typeof u=="function"?u(o,e):u),onClick:T=>{if(g){let{isRowExpanded:w,expandOnClick:R,expandRow:F,collapseRow:P}=g;R&&(w(o)?P(o):F(o))}m?.(T)},style:typeof i=="function"?i(o,e):i,sx:C,...x?.(o,e),onContextMenu:l,children:[f&&Yo(_o,{withRightShadow:b,checked:n,disabled:!d||(c?!c(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)})]}),g&&Yo($o,{colSpan:r.filter(T=>!T.hidden).length+(f?1:0),open:g.isRowExpanded(o),content:g.content(o,e),collapseProps:g.collapseProps})]})}a();import{createStyles as Za,Paper as Ka,px as $a,useMantineTheme as _a}from"@mantine/core";import{useClickOutside as Ya,useElementSize as Qa,useMergedRef as Ja,useWindowEvent as Ke}from"@mantine/hooks";import{jsx as ot}from"react/jsx-runtime";var ja=Za(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 c=Ya(n),{ref:m,width:p,height:l}=Qa(),g=Ja(c,m),{dir:x,spacing:u}=_a(),i=$a(u.md),{innerWidth:C,innerHeight:h}=window,{classes:b}=ja();return ot(Ka,{ref:g,shadow:e,radius:o,className:b.root,sx:{zIndex:r,top:t+l+i>h?h-l-i:t,left:x==="ltr"?f+p+i>C?C-p-i:f:C-i-(f-p-i<0?p+i:f)},children:d})}a();import{createStyles as et}from"@mantine/core";import{jsx as at}from"react/jsx-runtime";var rt=et(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function jo(){let{classes:o}=rt();return at("div",{className:o.root})}a();import{Box as tt,createStyles as ft,px as nt,Text as lt,UnstyledButton as dt}from"@mantine/core";import{jsx as $e,jsxs as ct}from"react/jsx-runtime";var st=ft((o,{color:e})=>{let r=nt(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}=st({color:r});return ct(dt,{className:n.root,disabled:t,onClick:f,children:[o&&$e(tt,{className:n.icon,children:o}),$e(lt,{className:n.title,size:"sm",children:e})]})}a();import{Box as ut,createStyles as pt,ScrollArea as mt}from"@mantine/core";import{forwardRef as xt}from"react";import{jsx as So,jsxs as it}from"react/jsx-runtime";var It=pt(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=xt(function({topShadowVisible:e,leftShadowVisible:r,rightShadowVisible:t,bottomShadowVisible:f,headerHeight:n,onScrollPositionChange:d,children:c},m){let{cx:p,classes:l}=It();return it(mt,{viewportRef:m,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:n}},onScrollPositionChange:d,children:[c,So(ut,{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 Qe}from"react/jsx-runtime";var Ye={},Bt=Ct((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 Je({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:c,shadow:m,verticalAlignment:p="center",fetching:l,columns:g,defaultColumnRender:x,idAccessor:u="id",records:i,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:or,loadingText:er="...",emptyState:rr,noRecordsText:ee="No records",noRecordsIcon:ar,striped:tr,onRowClick:Oo,onCellClick:fr,rowContextMenu:A,rowExpansion:nr,rowClassName:lr,rowStyle:dr,rowSx:sr,customRowAttributes:cr,bodyRef:ur,m:pr,my:mr,mx:xr,mt:Ir,mb:ir,ml:gr,mr:Cr,sx:Sr,className:hr,classNames:Do,style:br,styles:Fo,...Br}){let{ref:B,width:$,height:q}=ho(),{ref:yr,height:ko}=ho(),{ref:Tr,width:Ao,height:eo}=ho(),{ref:wr,height:re}=ho(),{scrolledToTop:Rr,setScrolledToTop:ae,scrolledToBottom:Or,setScrolledToBottom:te,scrolledToLeft:fe,setScrolledToLeft:ne,scrolledToRight:Dr,setScrolledToRight:le}=We(),{rowContextMenuInfo:H,setRowContextMenuInfo:_}=Ve(l),Fr=Ue({rowExpansion:nr,records:i,idAccessor:u}),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($))}};bt(de,[l,q,B,$,eo,Ao]);let kr=I=>{B.current.scrollTo({top:0,left:0}),R(I)},ro=i?.length,se=i?.map(I=>S(I,u)),Y=C?.map(I=>S(I,u)),ce=se!==void 0&&Y!==void 0&&Y.length>0,ue=b?i?.filter(b):i,Po=ue?.map(I=>S(I,u)),Lo=ce&&Po.every(I=>Y.includes(I)),Ar=ce&&Po.some(I=>Y.includes(I)),pe;h&&(pe=()=>{h(Lo?C.filter(I=>!Po.includes(S(I,u))):mo([...C,...ue],I=>S(I,u)))});let{lastSelectionChangeIndex:ao,setLastSelectionChangeIndex:Pr}=ze(se),me=!!C&&!fe,{cx:xe,classes:L,theme:Lr}=Bt({borderColor:r,rowBorderColor:t}),Mr={m:pr,my:mr,mx:xr,mt:Ir,mb:ir,ml:gr,mr:Cr},Mo=typeof Fo=="function"?Fo(Lr,Ye,Ye):Fo;return Qe(gt,{...Mr,className:xe(L.root,{[L.tableWithBorder]:o},hr,Do?.root),sx:[I=>({borderRadius:I.radius[e]||e,boxShadow:I.shadows[m]||m,height:d,minHeight:c}),...St(Sr)],style:{...Mo?.root,...br},children:[D(_e,{ref:B,topShadowVisible:!Rr,leftShadowVisible:!(C||fe),rightShadowVisible:!Dr,bottomShadowVisible:!Or,headerHeight:ko,onScrollPositionChange:de,children:Qe(ht,{ref:Tr,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?tr:!1,...Br,children:[D(Ne,{ref:yr,className:Do?.header,style:Mo?.header,columns:g,sortStatus:v,onSortStatusChange:k,selectionVisible:!!C,selectionChecked:Lo,selectionIndeterminate:Ar&&!Lo,onSelectionChange:pe,leftShadowVisible:me}),D("tbody",{ref:ur,children:ro?i.map((I,y)=>{let W=S(I,u),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=i.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,u)):mo([...C,...z],N=>S(N,u)))}else h(Q?C.filter(z=>S(z,u)!==W):mo([...C,I],z=>S(z,u)));Pr(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:g,defaultColumnRender:x,selectionVisible:!!C,selectionChecked:Q,onSelectionChange:no,isRecordSelectable:b,onClick:J,onCellClick:fr,onContextMenu:Ie,contextMenuVisible:H?S(H.record,u)===W:!1,expansion:Fr,className:lr,style:dr,sx:sr,customRowAttributes:cr,leftShadowVisible:me},W)}):D(Ho,{})})]})}),w&&D(ve,{ref:wr,className:Do?.pagination,style:Mo?.pagination,topBorderColor:r,horizontalSpacing:T,fetching:l,page:w,onPageChange:kr,totalRecords:F,recordsPerPage:P,onRecordsPerPageChange:X,recordsPerPageOptions:bo,recordsPerPageLabel:Bo,paginationColor:yo,paginationSize:To,paginationText:Z,paginationWrapBreakpoint:K,noRecordsText:ee,loadingText:er,recordsLength:ro}),D(Xo,{pt:ko,pb:re,fetching:l,backgroundBlur:wo,customContent:Ro,size:oo,variant:je,color:or}),D(Wo,{pt:ko,pb:re,icon:ar,text:ee,active:!l&&!ro,children:rr}),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{Je as DataTable};
2
2
  //# sourceMappingURL=index.mjs.map