mantine-datatable 2.0.1 → 2.0.3
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/README.md +2 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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};
|
|
1
|
+
var Lr=Object.create;var ie=Object.defineProperty;var Hr=Object.getOwnPropertyDescriptor;var Er=Object.getOwnPropertyNames;var Nr=Object.getPrototypeOf,qr=Object.prototype.hasOwnProperty;var Wr=(o,e)=>()=>(o&&(e=o(o=0)),e);var Lo=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var Ur=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of Er(e))!qr.call(o,f)&&f!==r&&ie(o,f,{get:()=>e[f],enumerable:!(t=Hr(e,f))||t.enumerable});return o};var zr=(o,e,r)=>(r=o!=null?Lr(Nr(o)):{},Ur(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=Lo((Rt,Ce)=>{"use strict";a();var Xr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Ce.exports=Xr});var De=Lo((kt,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 Te=Lo((Lt,ye)=>{a();ye.exports=De()();var vt,At});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 Vr}from"@mantine/core";import{jsx as ge}from"react/jsx-runtime";var Gr=Vr({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 A=zr(Te());import{forwardRef as Qr,createElement as Pe}from"react";a();var we={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,Oe=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,Me=(o,e,r)=>e in o?Kr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Re=(o,e)=>{for(var r in e||(e={}))Oe.call(e,r)&&Me(o,r,e[r]);if(lo)for(var r of lo(e))ke.call(e,r)&&Me(o,r,e[r]);return o},Yr=(o,e)=>$r(o,_r(e)),jr=(o,e)=>{var r={};for(var t in o)Oe.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&&ke.call(o,t)&&(r[t]=o[t]);return r},z=(o,e,r)=>{let t=Qr((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 Pe("svg",Re(Yr(Re({ref:n},we),{width:m,height:m,stroke:c,strokeWidth:p,className:`tabler-icon tabler-icon-${o}`}),g),[...r.map(([x,u])=>Pe(x,u)),...l||[]])});return t.propTypes={color:A.default.string,size:A.default.oneOfType([A.default.string,A.default.number]),stroke:A.default.oneOfType([A.default.string,A.default.number])},t.displayName=`${e}`,t};a();var Eo=z("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 No=z("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=z("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 Fe}from"@mantine/core";import{jsx as V,jsxs as Ae}from"react/jsx-runtime";var ve={xs:22,sm:26,md:32,lg:38,xl:44};function Uo({size:o,label:e,values:r,value:t,onChange:f,color:n}){return Ae(na,{spacing:"xs",children:[V(Fe,{size:o,children:e}),Ae(co,{withinPortal:!0,withArrow:!0,children:[V(co.Target,{children:V(fa,{size:o,variant:"default",sx:[{fontWeight:"normal"},d=>({height:ve[o],paddingLeft:d.spacing[o],paddingRight:d.spacing[o]})],children:t})}),V(co.Dropdown,{children:r.map(d=>{let c=d===t;return V(co.Item,{sx:[{height:ve[o]},m=>({"&&":{color:c?m.white:void 0},background:c?m.colors[n||m.primaryColor][6]:void 0})],disabled:c,onClick:()=>f(d),children:V(Fe,{size:o,children:d})},d)})})]})]})}import{jsx as zo,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}})),Le=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:L,paginationWrapBreakpoint:O},y){let T;if(f)T=p;else if(!x)T=l;else{let F=(n-1)*u+1,X=F+b-1;T=g({from:F,to:X,totalRecords:x})}let{classes:w,cx:R}=pa({topBorderColor:t,paginationWrapBreakpoint:O});return ma(la,{ref:y,px:L??"xs",py:"xs",className:R(w.root,e),style:r,children:[zo(ca,{className:w.text,size:m,children:T}),h&&zo(Uo,{size:m,label:C,values:h,value:u,onChange:i}),zo(sa,{color:c,className:R(w.pagination,{[w.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 Da}from"react";a();import{Box as Vo,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(Vo,{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(Vo,{className:g(x.columnHeaderText,x.sortableColumnHeaderText),title:i,children:u}),G(ia,{children:p?.columnAccessor===t?G(Eo,{className:g(x.sortableColumnHeaderIcon,{[x.sortableColumnHeaderIconRotated]:p.direction==="desc"}),size:14}):G(No,{className:x.sortableColumnHeaderNeutralIcon,size:14})})]}):G(Vo,{className:x.columnHeaderText,title:i,children:u})})}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"}}}),Ee=Da(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}=ya();return xo("thead",{className:u(x.root,e),style:r,ref:g,children:Ta("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:L,title:O,sortable:y,titleClassName:T,titleStyle:w,titleSx:R})=>C?null:xo(Go,{className:T,style:w,sx:R,accessor:i,visibleMediaQuery:h,textAlignment:b,width:L,title:O,sortable:y,sortStatus:t,onSortStatusChange:f},i))]})})});a();import{Center as wa,createStyles as Pa,Loader as Ma}from"@mantine/core";import{jsx as Ne}from"react/jsx-runtime";var Ra=Pa(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}=Ra();return Ne(wa,{pt:o,pb:e,className:p(m.root,{[m.fetching]:r}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:r&&(t||Ne(Ma,{size:n,variant:d,color:c}))})}a();import{Box as za,createStyles as Va}from"@mantine/core";a();import{Box as Oa,createStyles as ka}from"@mantine/core";import{jsx as va}from"react/jsx-runtime";var Fa=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:c,ellipsis:m,textAlignment:p,width:l,accessor:g,render:x,defaultRender:u,customCellAttributes:i}){let{cx:C,classes:h}=Fa();return uo(t)?va(Oa,{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 Aa,createStyles as La}from"@mantine/core";a();import{useDebouncedState as Io,useTimeout as qe}from"@mantine/hooks";import{useEffect as Qo,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 Ue(o){let[e,r]=J(null),t=o?.join(":")||"";return Qo(()=>{r(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function ze(o){let[e,r]=J(null);return Qo(()=>{o&&r(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:r}}function Ve({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 Qo(()=>{o?(c.clear(),n(!0),d.start()):(d.clear(),t(!1),c.start())},[d,c,o]),{expanded:r,visible:f}}import{Fragment as Ea,jsx as Co,jsxs as Na}from"react/jsx-runtime";var Ha=La({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function Ko({open:o,colSpan:e,content:r,collapseProps:t}){let{expanded:f,visible:n}=Ge(o,t?.transitionDuration),{cx:d,classes:c}=Ha();return n?Na(Ea,{children:[Co("tr",{}),Co("tr",{children:Co("td",{className:d(c.cell,{[c.expandedCell]:f}),colSpan:e,children:Co(Aa,{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 Ua=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}=Ua();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 _o,jsxs as Ze}from"react/jsx-runtime";var Ga=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 Yo({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:L,classes:O}=Ga();return Ze(Xa,{children:[Ze(za,{component:"tr",className:L({[O.withPointerCursor]:m||g?.expandOnClick,[O.selected]:n,[O.contextMenuVisible]:h},typeof u=="function"?u(o,e):u),onClick:y=>{if(g){let{isRowExpanded:T,expandOnClick:w,expandRow:R,collapseRow:F}=g;w&&(T(o)?F(o):R(o))}m?.(y)},style:typeof i=="function"?i(o,e):i,sx:C,...x?.(o,e),onContextMenu:l,children:[f&&_o($o,{withRightShadow:b,checked:n,disabled:!d||(c?!c(o,e):!1),onChange:d}),r.map((y,T)=>{let{accessor:w,hidden:R,visibleMediaQuery:F,textAlignment:X,noWrap:bo,ellipsis:Bo,width:Do,render:yo,cellsClassName:Z,cellsStyle:Q,cellsSx:To,customCellAttributes:wo}=y,oo;return p&&(oo=()=>p({record:o,recordIndex:e,column:y,columnIndex:T})),R?null:_o(Zo,{className:typeof Z=="function"?Z(o,e):Z,style:typeof Q=="function"?Q(o,e):Q,sx:To,visibleMediaQuery:F,record:o,recordIndex:e,onClick:oo,accessor:w,textAlignment:X,noWrap:bo,ellipsis:Bo,width:Do,render:yo,defaultRender:t,customCellAttributes:wo},w)})]}),g&&_o(Ko,{colSpan:r.filter(y=>!y.hidden).length+(f?1:0),open:g.isRowExpanded(o),content:g.content(o,e),collapseProps:g.collapseProps})]})}a();import{createStyles as Za,Paper as Qa,px as Ka,useMantineTheme as $a}from"@mantine/core";import{useClickOutside as _a,useElementSize as Ya,useMergedRef as ja,useWindowEvent as Qe}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}){Qe("resize",n),Qe("scroll",n);let c=_a(n),{ref:m,width:p,height:l}=Ya(),g=ja(c,m),{dir:x,spacing:u}=$a(),i=Ka(u.md),{innerWidth:C,innerHeight:h}=window,{classes:b}=Ja();return ot(Qa,{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 Ke,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&&Ke(tt,{className:n.icon,children:o}),Ke(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 M,jsxs as Ye}from"react/jsx-runtime";var _e={},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:L,onSortStatusChange:O,horizontalSpacing:y,page:T,onPageChange:w,totalRecords:R,recordsPerPage:F,onRecordsPerPageChange:X,recordsPerPageOptions:bo,recordsPerPageLabel:Bo="Records per page",paginationColor:Do,paginationSize:yo="sm",paginationText:Z=({from:B,to:K,totalRecords:q})=>`${B} - ${K} / ${q}`,paginationWrapBreakpoint:Q="sm",loaderBackgroundBlur:To,customLoader:wo,loaderSize:oo,loaderVariant:Je,loaderColor:or,loadingText:er="...",emptyState:rr,noRecordsText:ee="No records",noRecordsIcon:ar,striped:tr,onRowClick:Po,onCellClick:fr,rowContextMenu:k,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:Mo,style:br,styles:Ro,...Br}){let{ref:B,width:K,height:q}=ho(),{ref:Dr,height:Oo}=ho(),{ref:yr,width:ko,height:eo}=ho(),{ref:Tr,height:re}=ho(),{scrolledToTop:wr,setScrolledToTop:ae,scrolledToBottom:Pr,setScrolledToBottom:te,scrolledToLeft:fe,setScrolledToLeft:ne,scrolledToRight:Mr,setScrolledToRight:le}=We(),{rowContextMenuInfo:H,setRowContextMenuInfo:$}=ze(l),Rr=Ve({rowExpansion:nr,records:i,idAccessor:u}),de=()=>{if(!l&&k&&$(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||ko===K)ne(!0),le(!0);else{let I=B.current.scrollLeft;ne(I===0),le(Math.round(ko-I)===Math.round(K))}};bt(de,[l,q,B,K,eo,ko]);let Or=I=>{B.current.scrollTo({top:0,left:0}),w(I)},ro=i?.length,se=i?.map(I=>S(I,u)),_=C?.map(I=>S(I,u)),ce=se!==void 0&&_!==void 0&&_.length>0,ue=b?i?.filter(b):i,Fo=ue?.map(I=>S(I,u)),vo=ce&&Fo.every(I=>_.includes(I)),kr=ce&&Fo.some(I=>_.includes(I)),pe;h&&(pe=()=>{h(vo?C.filter(I=>!Fo.includes(S(I,u))):mo([...C,...ue],I=>S(I,u)))});let{lastSelectionChangeIndex:ao,setLastSelectionChangeIndex:Fr}=Ue(se),me=!!C&&!fe,{cx:xe,classes:v,theme:vr}=Bt({borderColor:r,rowBorderColor:t}),Ar={m:pr,my:mr,mx:xr,mt:Ir,mb:ir,ml:gr,mr:Cr},Ao=typeof Ro=="function"?Ro(vr,_e,_e):Ro;return Ye(gt,{...Ar,className:xe(v.root,{[v.tableWithBorder]:o},hr,Mo?.root),sx:[I=>({borderRadius:I.radius[e]||e,boxShadow:I.shadows[m]||m,height:d,minHeight:c}),...St(Sr)],style:{...Ao?.root,...br},children:[M($e,{ref:B,topShadowVisible:!wr,leftShadowVisible:!(C||fe),rightShadowVisible:!Mr,bottomShadowVisible:!Pr,headerHeight:Oo,onScrollPositionChange:de,children:Ye(ht,{ref:yr,horizontalSpacing:y,className:xe(v.table,{[v.tableWithColumnBorders]:f,[v.lastRowBorderBottomVisible]:eo<q,[v.textSelectionDisabled]:n,[v.verticalAlignmentTop]:p==="top",[v.verticalAlignmentBottom]:p==="bottom"}),striped:ro?tr:!1,...Br,children:[M(Ee,{ref:Dr,className:Mo?.header,style:Ao?.header,columns:g,sortStatus:L,onSortStatusChange:O,selectionVisible:!!C,selectionChecked:vo,selectionIndeterminate:kr&&!vo,onSelectionChange:pe,leftShadowVisible:me}),M("tbody",{ref:ur,children:ro?i.map((I,D)=>{let W=S(I,u),Y=_?.includes(W)||!1,to=!1,fo=!1;if(k){let{hidden:P}=k;(!P||!(typeof P=="function"?P(I,D):P))&&(k.trigger==="click"?to=!0:fo=!0)}let no;h&&(no=P=>{if(P.nativeEvent.shiftKey&&ao!==null){let U=i.filter(D>ao?(E,N)=>N>=ao&&N<=D&&(b?b(E,N):!0):(E,N)=>N>=D&&N<=ao&&(b?b(E,N):!0));h(Y?He(C,U,E=>S(E,u)):mo([...C,...U],E=>S(E,u)))}else h(Y?C.filter(U=>S(U,u)!==W):mo([...C,I],U=>S(U,u)));Fr(D)});let j;to?j=P=>{$({y:P.clientY,x:P.clientX,record:I,recordIndex:D}),Po?.(I,D)}:Po&&(j=()=>{Po(I,D)});let Ie;return fo&&(Ie=P=>{P.preventDefault(),$({y:P.clientY,x:P.clientX,record:I,recordIndex:D})}),M(Yo,{record:I,recordIndex:D,columns:g,defaultColumnRender:x,selectionVisible:!!C,selectionChecked:Y,onSelectionChange:no,isRecordSelectable:b,onClick:j,onCellClick:fr,onContextMenu:Ie,contextMenuVisible:H?S(H.record,u)===W:!1,expansion:Rr,className:lr,style:dr,sx:sr,customRowAttributes:cr,leftShadowVisible:me},W)}):M(Ho,{})})]})}),T&&M(Le,{ref:Tr,className:Mo?.pagination,style:Ao?.pagination,topBorderColor:r,horizontalSpacing:y,fetching:l,page:T,onPageChange:Or,totalRecords:R,recordsPerPage:F,onRecordsPerPageChange:X,recordsPerPageOptions:bo,recordsPerPageLabel:Bo,paginationColor:Do,paginationSize:yo,paginationText:Z,paginationWrapBreakpoint:Q,noRecordsText:ee,loadingText:er,recordsLength:ro}),M(Xo,{pt:Oo,pb:re,fetching:l,backgroundBlur:To,customContent:wo,size:oo,variant:Je,color:or}),M(Wo,{pt:Oo,pb:re,icon:ar,text:ee,active:!l&&!ro,children:rr}),k&&H&&M(jo,{zIndex:k.zIndex,borderRadius:k.borderRadius,shadow:k.shadow,y:H.y,x:H.x,onDestroy:()=>$(null),children:k.items(H.record,H.recordIndex).map(({divider:I,key:D,title:W,icon:Y,color:to,hidden:fo,disabled:no,onClick:j})=>I?M(Jo,{},D):fo?null:M(oe,{title:W??po(D),icon:Y,color:to,disabled:no,onClick:()=>{$(null),j()}},D))})]})}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
|