mantine-datatable 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DataTable.d.ts +1 -1
- package/dist/DataTable.d.ts.map +1 -1
- package/dist/DataTableScrollArea.d.ts +4 -5
- package/dist/DataTableScrollArea.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +3 -3
- package/dist/types/DataTableProps.d.ts +4 -0
- package/dist/types/DataTableProps.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Hr=Object.create;var be=Object.defineProperty;var Nr=Object.getOwnPropertyDescriptor;var Er=Object.getOwnPropertyNames;var qr=Object.getPrototypeOf,Wr=Object.prototype.hasOwnProperty;var Ur=(o,e)=>()=>(o&&(e=o(o=0)),e);var No=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var zr=(o,e,a,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of Er(e))!Wr.call(o,f)&&f!==a&&be(o,f,{get:()=>e[f],enumerable:!(t=Nr(e,f))||t.enumerable});return o};var Vr=(o,e,a)=>(a=o!=null?Hr(qr(o)):{},zr(e||!o||!o.__esModule?be(a,"default",{value:o,enumerable:!0}):a,o));import*as s from"react";var r=Ur(()=>{"use strict"});var ye=No((Ot,De)=>{"use strict";r();var Zr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";De.exports=Zr});var Me=No((Ft,Pe)=>{"use strict";r();var Qr=ye();function Te(){}function we(){}we.resetWarningCache=Te;Pe.exports=function(){function o(t,f,l,d,u,m){if(m!==Qr){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 a={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:we,resetWarningCache:Te};return a.PropTypes=a,a}});var Oe=No((Ht,Re)=>{r();Re.exports=Me()();var At,Lt});r();r();import{Box as Ct,createStyles as St,packSx as ht,Table as bt}from"@mantine/core";import{useElementSize as Co}from"@mantine/hooks";import{useEffect as Bt,useState as So}from"react";r();import{createStyles as Gr}from"@mantine/core";import{jsx as Be}from"react/jsx-runtime";var Xr=Gr({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function Eo(){let{classes:o}=Xr();return Be("tr",{className:o.root,children:Be("td",{})})}r();import{Center as oa,createStyles as ea,Text as ra}from"@mantine/core";r();r();var L=Vr(Oe());import{forwardRef as Kr,createElement as Fe}from"react";r();var ke={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,Yr=Object.defineProperties,_r=Object.getOwnPropertyDescriptors,so=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,ve=(o,e,a)=>e in o?$r(o,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[e]=a,Ae=(o,e)=>{for(var a in e||(e={}))Le.call(e,a)&&ve(o,a,e[a]);if(so)for(var a of so(e))He.call(e,a)&&ve(o,a,e[a]);return o},jr=(o,e)=>Yr(o,_r(e)),Jr=(o,e)=>{var a={};for(var t in o)Le.call(o,t)&&e.indexOf(t)<0&&(a[t]=o[t]);if(o!=null&&so)for(var t of so(o))e.indexOf(t)<0&&He.call(o,t)&&(a[t]=o[t]);return a},V=(o,e,a)=>{let t=Kr((f,l)=>{var d=f,{color:u="currentColor",size:m=24,stroke:p=2,children:n}=d,g=Jr(d,["color","size","stroke","children"]);return Fe("svg",Ae(jr(Ae({ref:l},ke),{width:m,height:m,stroke:u,strokeWidth:p,className:`tabler-icon tabler-icon-${o}`}),g),[...a.map(([x,c])=>Fe(x,c)),...n||[]])});return t.propTypes={color:L.default.string,size:L.default.oneOfType([L.default.string,L.default.number]),stroke:L.default.oneOfType([L.default.string,L.default.number])},t.displayName=`${e}`,t};r();var qo=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"}]]);r();var Wo=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"}]]);r();var Uo=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 ta,jsx as co,jsxs as fa}from"react/jsx-runtime";var aa=ea(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 zo({icon:o,text:e,pt:a,pb:t,active:f,children:l}){let{classes:d,cx:u}=aa();return co(oa,{pt:a,pb:t,className:u(d.root,{[d.active]:f}),children:l||fa(ta,{children:[o||co("div",{className:d.standardIcon,children:co(Uo,{})}),co(ra,{size:"sm",color:"dimmed",children:e})]})})}r();import{Box as da,createStyles as sa,Pagination as ca,Text as ua}from"@mantine/core";import{forwardRef as pa}from"react";r();import{Button as na,Group as la,Menu as uo,Text as Ne}from"@mantine/core";import{jsx as G,jsxs as qe}from"react/jsx-runtime";var Ee={xs:22,sm:26,md:32,lg:38,xl:44};function Vo({size:o,label:e,values:a,value:t,onChange:f,color:l}){return qe(la,{spacing:"xs",children:[G(Ne,{size:o,children:e}),qe(uo,{withinPortal:!0,withArrow:!0,children:[G(uo.Target,{children:G(na,{size:o,variant:"default",sx:[{fontWeight:"normal"},d=>({height:Ee[o],paddingLeft:d.spacing[o],paddingRight:d.spacing[o]})],children:t})}),G(uo.Dropdown,{children:a.map(d=>{let u=d===t;return G(uo.Item,{sx:[{height:Ee[o]},m=>({"&&":{color:u?m.white:void 0},background:u?m.colors[l||m.primaryColor][6]:void 0})],disabled:u,onClick:()=>f(d),children:G(Ne,{size:o,children:d})},d)})})]})]})}import{jsx as Go,jsxs as xa}from"react/jsx-runtime";var ma=sa((o,{topBorderColor:e,paginationWrapBreakpoint:a})=>({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(a)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),We=pa(function({className:e,style:a,topBorderColor:t,fetching:f,page:l,onPageChange:d,paginationColor:u,paginationSize:m,loadingText:p,noRecordsText:n,paginationText:g,totalRecords:x,recordsPerPage:c,onRecordsPerPageChange:i,recordsPerPageLabel:C,recordsPerPageOptions:b,recordsLength:B,horizontalSpacing:H,paginationWrapBreakpoint:F},T){let w;if(f)w=p;else if(!x)w=n;else{let v=(l-1)*c+1,Z=v+B-1;w=g({from:v,to:Z,totalRecords:x})}let{classes:P,cx:O}=ma({topBorderColor:t,paginationWrapBreakpoint:F});return xa(da,{ref:T,px:H??"xs",py:"xs",className:O(P.root,e),style:a,children:[Go(ua,{className:P.text,size:m,children:w}),b&&Go(Vo,{size:m,label:C,values:b,value:c,onChange:i}),Go(ca,{color:u,className:O(P.pagination,{[P.paginationFetching]:f||!B}),value:l,onChange:d,size:m,total:Math.ceil(x/c)})]})});r();import{Checkbox as Ba,createStyles as Da}from"@mantine/core";import{forwardRef as ya}from"react";r();import{Box as Xo,Center as ga,createStyles as Ca,Group as Sa}from"@mantine/core";r();import{useMantineTheme as Ia}from"@mantine/core";import{useMediaQuery as ia}from"@mantine/hooks";function po(o){let e=Ia(),a=typeof o=="function"?o(e):o;return ia(a||"",!0)}function mo(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 Ue(o,e,a){return o.filter(t=>!e.map(a).includes(a(t)))}function xo(o,e){return o.filter((a,t,f)=>t===f.findIndex(l=>e(a)===e(l)))}function h(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}import{jsx as X,jsxs as ba}from"react/jsx-runtime";var ha=Ca(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 Zo({className:o,sx:e,style:a,accessor:t,visibleMediaQuery:f,title:l,sortable:d,textAlignment:u,width:m,sortStatus:p,onSortStatusChange:n}){let{cx:g,classes:x}=ha();if(!po(f))return null;let c=l??mo(t),i=typeof c=="string"?c:void 0;return X(Xo,{component:"th",className:g({[x.sortableColumnHeader]:d},o),sx:[{"&&":{textAlign:u},width:m,minWidth:m,maxWidth:m},e],style:a,role:d?"button":void 0,onClick:d&&n?()=>{n({columnAccessor:t,direction:p?.direction==="asc"?"desc":"asc"})}:void 0,children:d||p?.columnAccessor===t?ba(Sa,{className:x.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[X(Xo,{className:g(x.columnHeaderText,x.sortableColumnHeaderText),title:i,children:c}),X(ga,{children:p?.columnAccessor===t?X(qo,{className:g(x.sortableColumnHeaderIcon,{[x.sortableColumnHeaderIconRotated]:p.direction==="desc"}),size:14}):X(Wo,{className:x.sortableColumnHeaderNeutralIcon,size:14})})]}):X(Xo,{className:x.columnHeaderText,title:i,children:c})})}import{jsx as Io,jsxs as wa}from"react/jsx-runtime";var Ta=Da(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"}}}),ze=ya(function({className:e,style:a,sortStatus:t,onSortStatusChange:f,columns:l,selectionVisible:d,selectionChecked:u,selectionIndeterminate:m,onSelectionChange:p,leftShadowVisible:n},g){let{classes:x,cx:c}=Ta();return Io("thead",{className:c(x.root,e),style:a,ref:g,children:wa("tr",{children:[d&&Io("th",{className:c(x.selectorColumnHeader,{[x.selectorColumnHeaderWithRightShadow]:n}),children:Io(Ba,{classNames:{input:x.selectionCheckboxInput},checked:u,indeterminate:m,disabled:!p,onChange:p})}),l.map(({accessor:i,hidden:C,visibleMediaQuery:b,textAlignment:B,width:H,title:F,sortable:T,titleClassName:w,titleStyle:P,titleSx:O})=>C?null:Io(Zo,{className:w,style:P,sx:O,accessor:i,visibleMediaQuery:b,textAlignment:B,width:H,title:F,sortable:T,sortStatus:t,onSortStatusChange:f},i))]})})});r();import{Center as Pa,createStyles as Ma,Loader as Ra}from"@mantine/core";import{jsx as Ve}from"react/jsx-runtime";var Oa=Ma(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 Qo({pt:o,pb:e,fetching:a,customContent:t,backgroundBlur:f,size:l,variant:d,color:u}){let{classes:m,cx:p}=Oa();return Ve(Pa,{pt:o,pb:e,className:p(m.root,{[m.fetching]:a}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:a&&(t||Ve(Ra,{size:l,variant:d,color:u}))})}r();import{Box as Va,createStyles as Ga}from"@mantine/core";r();import{Box as ka,createStyles as Fa}from"@mantine/core";import{jsx as Aa}from"react/jsx-runtime";var va=Fa({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Ko({className:o,sx:e,style:a,visibleMediaQuery:t,record:f,recordIndex:l,onClick:d,noWrap:u,ellipsis:m,textAlignment:p,width:n,accessor:g,render:x,defaultRender:c,customCellAttributes:i}){let{cx:C,classes:b}=va();return po(t)?Aa(ka,{component:"td",className:C({[b.noWrap]:u||m,[b.ellipsis]:m,[b.withPointerCursor]:d},o),sx:[{width:n,minWidth:n,maxWidth:n,textAlign:p},e],style:a,onClick:d,...i?.(f,l),children:x?x(f,l):c?c(f,l,g):h(f,g)}):null}r();import{Collapse as La,createStyles as Ha}from"@mantine/core";r();import{useTimeout as Ge}from"@mantine/hooks";import{useEffect as $o,useState as J}from"react";function Xe(o){let[e,a]=J(null),t=o?.join(":")||"";return $o(()=>{a(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:a}}function Ze(o){let[e,a]=J(null);return $o(()=>{o&&a(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:a}}function Qe({rowExpansion:o,records:e,idAccessor:a}){let t=[];if(o&&e){let{trigger:u,allowMultiple:m,initiallyExpanded:p}=o;e&&u==="always"?t=e.map(n=>h(n,a)):p&&(t=e.filter(p).map(n=>h(n,a)),m||(t=[t[0]]))}let f,l,d=J(t);if(o){let{trigger:u,allowMultiple:m,collapseProps:p,content:n}=o;o.expanded?{recordIds:f,onRecordIdsChange:l}=o.expanded:[f,l]=d;let g=x=>l(f.filter(c=>c!==h(x,a)));return{expandOnClick:u!=="always"&&u!=="never",isRowExpanded:x=>u==="always"?!0:f.includes(h(x,a)),expandRow:x=>{let c=h(x,a);l(m?[...f,c]:[c])},collapseRow:g,collapseProps:p,content:(x,c)=>()=>n({record:x,recordIndex:c,collapse:()=>g(x)})}}}function Ke(o,e){let[a,t]=J(o),[f,l]=J(o),d=Ge(()=>t(!0),0),u=Ge(()=>l(!1),e||200);return $o(()=>{o?(u.clear(),l(!0),d.start()):(d.clear(),t(!1),u.start())},[d,u,o]),{expanded:a,visible:f}}import{Fragment as Ea,jsx as io,jsxs as qa}from"react/jsx-runtime";var Na=Ha({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function Yo({open:o,colSpan:e,content:a,collapseProps:t}){let{expanded:f,visible:l}=Ke(o,t?.transitionDuration),{cx:d,classes:u}=Na();return l?qa(Ea,{children:[io("tr",{}),io("tr",{children:io("td",{className:d(u.cell,{[u.expandedCell]:f}),colSpan:e,children:io(La,{in:f,...t,children:a()})})})]}):null}r();import{Checkbox as Wa,createStyles as Ua}from"@mantine/core";import{jsx as $e}from"react/jsx-runtime";var za=Ua(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:a,classes:t}=za();return $e("td",{className:a(t.root,{[t.withRightShadow]:o}),children:$e(Wa,{classNames:{input:t.checkbox},...e,onClick:f=>f.stopPropagation()})})}import{Fragment as Za,jsx as jo,jsxs as Ye}from"react/jsx-runtime";var Xa=Ga(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 Jo({record:o,recordIndex:e,columns:a,defaultColumnRender:t,selectionVisible:f,selectionChecked:l,onSelectionChange:d,isRecordSelectable:u,onClick:m,onCellClick:p,onContextMenu:n,expansion:g,customRowAttributes:x,className:c,style:i,sx:C,contextMenuVisible:b,leftShadowVisible:B}){let{cx:H,classes:F}=Xa();return Ye(Za,{children:[Ye(Va,{component:"tr",className:H({[F.withPointerCursor]:m||g?.expandOnClick,[F.selected]:l,[F.contextMenuVisible]:b},typeof c=="function"?c(o,e):c),onClick:T=>{if(g){let{isRowExpanded:w,expandOnClick:P,expandRow:O,collapseRow:v}=g;P&&(w(o)?v(o):O(o))}m?.(T)},style:typeof i=="function"?i(o,e):i,sx:C,...x?.(o,e),onContextMenu:n,children:[f&&jo(_o,{withRightShadow:B,checked:l,disabled:!d||(u?!u(o,e):!1),onChange:d}),a.map((T,w)=>{let{accessor:P,hidden:O,visibleMediaQuery:v,textAlignment:Z,noWrap:ho,ellipsis:bo,width:Bo,render:Do,cellsClassName:Q,cellsStyle:K,cellsSx:yo,customCellAttributes:To}=T,oo;return p&&(oo=()=>p({record:o,recordIndex:e,column:T,columnIndex:w})),O?null:jo(Ko,{className:typeof Q=="function"?Q(o,e):Q,style:typeof K=="function"?K(o,e):K,sx:yo,visibleMediaQuery:v,record:o,recordIndex:e,onClick:oo,accessor:P,textAlignment:Z,noWrap:ho,ellipsis:bo,width:Bo,render:Do,defaultRender:t,customCellAttributes:To},P)})]}),g&&jo(Yo,{colSpan:a.filter(T=>!T.hidden).length+(f?1:0),open:g.isRowExpanded(o),content:g.content(o,e),collapseProps:g.collapseProps})]})}r();import{createStyles as Qa,Paper as Ka,px as $a,useMantineTheme as Ya}from"@mantine/core";import{useClickOutside as _a,useElementSize as ja,useMergedRef as Ja,useWindowEvent as _e}from"@mantine/hooks";import{jsx as et}from"react/jsx-runtime";var ot=Qa(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 oe({borderRadius:o="xs",shadow:e="sm",zIndex:a=3,y:t,x:f,onDestroy:l,children:d}){_e("resize",l),_e("scroll",l);let u=_a(l),{ref:m,width:p,height:n}=ja(),g=Ja(u,m),{dir:x,spacing:c}=Ya(),i=$a(c.md),{innerWidth:C,innerHeight:b}=window,{classes:B}=ot();return et(Ka,{ref:g,shadow:e,radius:o,className:B.root,sx:{zIndex:a,top:t+n+i>b?b-n-i:t,left:x==="ltr"?f+p+i>C?C-p-i:f:C-i-(f-p-i<0?p+i:f)},children:d})}r();import{createStyles as rt}from"@mantine/core";import{jsx as tt}from"react/jsx-runtime";var at=rt(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function ee(){let{classes:o}=at();return tt("div",{className:o.root})}r();import{Box as ft,createStyles as nt,px as lt,Text as dt,UnstyledButton as st}from"@mantine/core";import{jsx as je,jsxs as ut}from"react/jsx-runtime";var ct=nt((o,{color:e})=>{let a=lt(o.spacing.sm)/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:a,paddingBottom:a,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 re({icon:o,title:e,color:a,disabled:t,onClick:f}){let{classes:l}=ct({color:a});return ut(st,{className:l.root,disabled:t,onClick:f,children:[o&&je(ft,{className:l.icon,children:o}),je(dt,{className:l.title,size:"sm",children:e})]})}r();import{Box as pt,createStyles as mt,ScrollArea as xt}from"@mantine/core";import{forwardRef as It}from"react";import{jsx as go,jsxs as gt}from"react/jsx-runtime";var it=mt(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}}}),Je=It(function({topShadowVisible:e,leftShadowVisible:a,rightShadowVisible:t,bottomShadowVisible:f,headerHeight:l,onScrollPositionChange:d,children:u},m){let{cx:p,classes:n}=it();return gt(xt,{viewportRef:m,classNames:{root:n.root,scrollbar:n.scrollbar,thumb:n.thumb,corner:n.corner},styles:{scrollbar:{marginTop:l}},onScrollPositionChange:d,children:[u,go(pt,{className:p(n.shadow,n.topShadow,{[n.shadowVisible]:e}),sx:{top:l}}),go("div",{className:p(n.shadow,n.leftShadow,{[n.shadowVisible]:a})}),go("div",{className:p(n.shadow,n.rightShadow,{[n.shadowVisible]:t})}),go("div",{className:p(n.shadow,n.bottomShadow,{[n.shadowVisible]:f})})]})});import{jsx as R,jsxs as er}from"react/jsx-runtime";var or={},Dt=St((o,{borderColor:e,rowBorderColor:a})=>{let t=typeof e=="function"?e(o):e,f=typeof a=="function"?a(o):a;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 rr({withBorder:o,borderRadius:e,borderColor:a=D=>D.colorScheme==="dark"?D.colors.dark[4]:D.colors.gray[3],rowBorderColor:t=D=>D.fn.rgba(D.colorScheme==="dark"?D.colors.dark[4]:D.colors.gray[3],.65),withColumnBorders:f,textSelectionDisabled:l,height:d="100%",minHeight:u,shadow:m,verticalAlignment:p="center",fetching:n,columns:g,defaultColumnRender:x,idAccessor:c="id",records:i,selectedRecords:C,onSelectedRecordsChange:b,isRecordSelectable:B,sortStatus:H,onSortStatusChange:F,horizontalSpacing:T,page:w,onPageChange:P,totalRecords:O,recordsPerPage:v,onRecordsPerPageChange:Z,recordsPerPageOptions:ho,recordsPerPageLabel:bo="Records per page",paginationColor:Bo,paginationSize:Do="sm",paginationText:Q=({from:D,to:$,totalRecords:W})=>`${D} - ${$} / ${W}`,paginationWrapBreakpoint:K="sm",loaderBackgroundBlur:yo,customLoader:To,loaderSize:oo,loaderVariant:ar,loaderColor:tr,loadingText:fr="...",emptyState:nr,noRecordsText:ae="No records",noRecordsIcon:lr,striped:dr,onRowClick:wo,onCellClick:sr,onScrollToTop:te,onScrollToBottom:fe,onScrollToLeft:ne,onScrollToRight:le,rowContextMenu:k,rowExpansion:cr,rowClassName:ur,rowStyle:pr,rowSx:mr,customRowAttributes:xr,bodyRef:Ir,m:ir,my:gr,mx:Cr,mt:Sr,mb:hr,ml:br,mr:Br,sx:Dr,className:yr,classNames:Po,style:Tr,styles:Mo,...wr}){let{ref:D,width:$,height:W}=Co(),{ref:Pr,height:Ro}=Co(),{ref:Mr,width:Oo,height:eo}=Co(),{ref:Rr,height:de}=Co(),[ko,se]=So(!0),[Fo,ce]=So(!0),[ro,ue]=So(!0),[vo,pe]=So(!0),{rowContextMenuInfo:N,setRowContextMenuInfo:U}=Ze(n),Or=Qe({rowExpansion:cr,records:i,idAccessor:c}),me=()=>{if(!n&&k&&U(null),n||eo<=W)se(!0),ce(!0);else{let I=D.current.scrollTop,S=I===0,y=eo-I-W<1;se(S),ce(y),S&&S!==ko&&te?.(),y&&y!==Fo&&fe?.()}if(n||Oo===$)ue(!0),pe(!0);else{let I=D.current.scrollLeft,S=I===0,y=Oo-I-$<1;ue(S),pe(y),S&&S!==ro&&ne?.(),y&&y!==vo&&le?.()}};Bt(me,[n,fe,ne,le,te,k,W,D,$,Fo,ro,vo,ko,U,eo,Oo]);let kr=I=>{D.current.scrollTo({top:0,left:0}),P(I)},ao=i?.length,xe=i?.map(I=>h(I,c)),Y=C?.map(I=>h(I,c)),Ie=xe!==void 0&&Y!==void 0&&Y.length>0,ie=B?i?.filter(B):i,Ao=ie?.map(I=>h(I,c)),Lo=Ie&&Ao.every(I=>Y.includes(I)),Fr=Ie&&Ao.some(I=>Y.includes(I)),ge;b&&(ge=()=>{b(Lo?C.filter(I=>!Ao.includes(h(I,c))):xo([...C,...ie],I=>h(I,c)))});let{lastSelectionChangeIndex:to,setLastSelectionChangeIndex:vr}=Xe(xe),Ce=!!C&&!ro,{cx:Se,classes:A,theme:Ar}=Dt({borderColor:a,rowBorderColor:t}),Lr={m:ir,my:gr,mx:Cr,mt:Sr,mb:hr,ml:br,mr:Br},Ho=typeof Mo=="function"?Mo(Ar,or,or):Mo;return er(Ct,{...Lr,className:Se(A.root,{[A.tableWithBorder]:o},yr,Po?.root),sx:[I=>({borderRadius:I.radius[e]||e,boxShadow:I.shadows[m]||m,height:d,minHeight:u}),...ht(Dr)],style:{...Ho?.root,...Tr},children:[R(Je,{ref:D,topShadowVisible:!ko,leftShadowVisible:!(C||ro),rightShadowVisible:!vo,bottomShadowVisible:!Fo,headerHeight:Ro,onScrollPositionChange:me,children:er(bt,{ref:Mr,horizontalSpacing:T,className:Se(A.table,{[A.tableWithColumnBorders]:f,[A.lastRowBorderBottomVisible]:eo<W,[A.textSelectionDisabled]:l,[A.verticalAlignmentTop]:p==="top",[A.verticalAlignmentBottom]:p==="bottom"}),striped:ao?dr:!1,...wr,children:[R(ze,{ref:Pr,className:Po?.header,style:Ho?.header,columns:g,sortStatus:H,onSortStatusChange:F,selectionVisible:!!C,selectionChecked:Lo,selectionIndeterminate:Fr&&!Lo,onSelectionChange:ge,leftShadowVisible:Ce}),R("tbody",{ref:Ir,children:ao?i.map((I,S)=>{let y=h(I,c),_=Y?.includes(y)||!1,fo=!1,no=!1;if(k){let{hidden:M}=k;(!M||!(typeof M=="function"?M(I,S):M))&&(k.trigger==="click"?fo=!0:no=!0)}let lo;b&&(lo=M=>{if(M.nativeEvent.shiftKey&&to!==null){let z=i.filter(S>to?(E,q)=>q>=to&&q<=S&&(B?B(E,q):!0):(E,q)=>q>=S&&q<=to&&(B?B(E,q):!0));b(_?Ue(C,z,E=>h(E,c)):xo([...C,...z],E=>h(E,c)))}else b(_?C.filter(z=>h(z,c)!==y):xo([...C,I],z=>h(z,c)));vr(S)});let j;fo?j=M=>{U({y:M.clientY,x:M.clientX,record:I,recordIndex:S}),wo?.(I,S)}:wo&&(j=()=>{wo(I,S)});let he;return no&&(he=M=>{M.preventDefault(),U({y:M.clientY,x:M.clientX,record:I,recordIndex:S})}),R(Jo,{record:I,recordIndex:S,columns:g,defaultColumnRender:x,selectionVisible:!!C,selectionChecked:_,onSelectionChange:lo,isRecordSelectable:B,onClick:j,onCellClick:sr,onContextMenu:he,contextMenuVisible:N?h(N.record,c)===y:!1,expansion:Or,className:ur,style:pr,sx:mr,customRowAttributes:xr,leftShadowVisible:Ce},y)}):R(Eo,{})})]})}),w&&R(We,{ref:Rr,className:Po?.pagination,style:Ho?.pagination,topBorderColor:a,horizontalSpacing:T,fetching:n,page:w,onPageChange:kr,totalRecords:O,recordsPerPage:v,onRecordsPerPageChange:Z,recordsPerPageOptions:ho,recordsPerPageLabel:bo,paginationColor:Bo,paginationSize:Do,paginationText:Q,paginationWrapBreakpoint:K,noRecordsText:ae,loadingText:fr,recordsLength:ao}),R(Qo,{pt:Ro,pb:de,fetching:n,backgroundBlur:yo,customContent:To,size:oo,variant:ar,color:tr}),R(zo,{pt:Ro,pb:de,icon:lr,text:ae,active:!n&&!ao,children:nr}),k&&N&&R(oe,{zIndex:k.zIndex,borderRadius:k.borderRadius,shadow:k.shadow,y:N.y,x:N.x,onDestroy:()=>U(null),children:k.items(N.record,N.recordIndex).map(({divider:I,key:S,title:y,icon:_,color:fo,hidden:no,disabled:lo,onClick:j})=>I?R(ee,{},S):no?null:R(re,{title:y??mo(S),icon:_,color:fo,disabled:lo,onClick:()=>{U(null),j()}},S))})]})}r();r();r();r();r();r();r();r();r();r();r();r();r();r();r();r();export{rr as DataTable};
|
|
1
|
+
var Nr=Object.create;var Be=Object.defineProperty;var Er=Object.getOwnPropertyDescriptor;var qr=Object.getOwnPropertyNames;var Wr=Object.getPrototypeOf,Ur=Object.prototype.hasOwnProperty;var zr=(o,e)=>()=>(o&&(e=o(o=0)),e);var No=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var Vr=(o,e,a,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of qr(e))!Ur.call(o,f)&&f!==a&&Be(o,f,{get:()=>e[f],enumerable:!(t=Er(e,f))||t.enumerable});return o};var Gr=(o,e,a)=>(a=o!=null?Nr(Wr(o)):{},Vr(e||!o||!o.__esModule?Be(a,"default",{value:o,enumerable:!0}):a,o));import*as s from"react";var r=zr(()=>{"use strict"});var Te=No((kt,ye)=>{"use strict";r();var Qr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";ye.exports=Qr});var Re=No((Ft,Me)=>{"use strict";r();var Kr=Te();function we(){}function Pe(){}Pe.resetWarningCache=we;Me.exports=function(){function o(t,f,l,d,p,u){if(u!==Kr){var n=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 n.name="Invariant Violation",n}}o.isRequired=o;function e(){return o}var a={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:Pe,resetWarningCache:we};return a.PropTypes=a,a}});var ke=No((Nt,Oe)=>{r();Oe.exports=Re()();var Lt,Ht});r();r();import{Box as Ct,createStyles as St,packSx as ht,Table as bt}from"@mantine/core";import{useElementSize as Co,useMergedRef as Bt}from"@mantine/hooks";import{useEffect as Dt,useState as So}from"react";r();import{createStyles as Xr}from"@mantine/core";import{jsx as De}from"react/jsx-runtime";var Zr=Xr({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function Eo(){let{classes:o}=Zr();return De("tr",{className:o.root,children:De("td",{})})}r();import{Center as ea,createStyles as ra,Text as aa}from"@mantine/core";r();r();var L=Gr(ke());import{forwardRef as $r,createElement as Fe}from"react";r();var ve={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 Yr=Object.defineProperty,_r=Object.defineProperties,jr=Object.getOwnPropertyDescriptors,so=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Ae=(o,e,a)=>e in o?Yr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[e]=a,Le=(o,e)=>{for(var a in e||(e={}))He.call(e,a)&&Ae(o,a,e[a]);if(so)for(var a of so(e))Ne.call(e,a)&&Ae(o,a,e[a]);return o},Jr=(o,e)=>_r(o,jr(e)),oa=(o,e)=>{var a={};for(var t in o)He.call(o,t)&&e.indexOf(t)<0&&(a[t]=o[t]);if(o!=null&&so)for(var t of so(o))e.indexOf(t)<0&&Ne.call(o,t)&&(a[t]=o[t]);return a},V=(o,e,a)=>{let t=$r((f,l)=>{var d=f,{color:p="currentColor",size:u=24,stroke:n=2,children:I}=d,g=oa(d,["color","size","stroke","children"]);return Fe("svg",Le(Jr(Le({ref:l},ve),{width:u,height:u,stroke:p,strokeWidth:n,className:`tabler-icon tabler-icon-${o}`}),g),[...a.map(([m,c])=>Fe(m,c)),...I||[]])});return t.propTypes={color:L.default.string,size:L.default.oneOfType([L.default.string,L.default.number]),stroke:L.default.oneOfType([L.default.string,L.default.number])},t.displayName=`${e}`,t};r();var qo=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"}]]);r();var Wo=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"}]]);r();var Uo=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 fa,jsx as co,jsxs as na}from"react/jsx-runtime";var ta=ra(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 zo({icon:o,text:e,pt:a,pb:t,active:f,children:l}){let{classes:d,cx:p}=ta();return co(ea,{pt:a,pb:t,className:p(d.root,{[d.active]:f}),children:l||na(fa,{children:[o||co("div",{className:d.standardIcon,children:co(Uo,{})}),co(aa,{size:"sm",color:"dimmed",children:e})]})})}r();import{Box as sa,createStyles as ca,Pagination as ua,Text as pa}from"@mantine/core";import{forwardRef as ma}from"react";r();import{Button as la,Group as da,Menu as uo,Text as Ee}from"@mantine/core";import{jsx as G,jsxs as We}from"react/jsx-runtime";var qe={xs:22,sm:26,md:32,lg:38,xl:44};function Vo({size:o,label:e,values:a,value:t,onChange:f,color:l}){return We(da,{spacing:"xs",children:[G(Ee,{size:o,children:e}),We(uo,{withinPortal:!0,withArrow:!0,children:[G(uo.Target,{children:G(la,{size:o,variant:"default",sx:[{fontWeight:"normal"},d=>({height:qe[o],paddingLeft:d.spacing[o],paddingRight:d.spacing[o]})],children:t})}),G(uo.Dropdown,{children:a.map(d=>{let p=d===t;return G(uo.Item,{sx:[{height:qe[o]},u=>({"&&":{color:p?u.white:void 0},background:p?u.colors[l||u.primaryColor][6]:void 0})],disabled:p,onClick:()=>f(d),children:G(Ee,{size:o,children:d})},d)})})]})]})}import{jsx as Go,jsxs as Ia}from"react/jsx-runtime";var xa=ca((o,{topBorderColor:e,paginationWrapBreakpoint:a})=>({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(a)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),Ue=ma(function({className:e,style:a,topBorderColor:t,fetching:f,page:l,onPageChange:d,paginationColor:p,paginationSize:u,loadingText:n,noRecordsText:I,paginationText:g,totalRecords:m,recordsPerPage:c,onRecordsPerPageChange:i,recordsPerPageLabel:C,recordsPerPageOptions:b,recordsLength:B,horizontalSpacing:H,paginationWrapBreakpoint:v},T){let w;if(f)w=n;else if(!m)w=I;else{let F=(l-1)*c+1,Z=F+B-1;w=g({from:F,to:Z,totalRecords:m})}let{classes:P,cx:O}=xa({topBorderColor:t,paginationWrapBreakpoint:v});return Ia(sa,{ref:T,px:H??"xs",py:"xs",className:O(P.root,e),style:a,children:[Go(pa,{className:P.text,size:u,children:w}),b&&Go(Vo,{size:u,label:C,values:b,value:c,onChange:i}),Go(ua,{color:p,className:O(P.pagination,{[P.paginationFetching]:f||!B}),value:l,onChange:d,size:u,total:Math.ceil(m/c)})]})});r();import{Checkbox as Da,createStyles as ya}from"@mantine/core";import{forwardRef as Ta}from"react";r();import{Box as Xo,Center as Ca,createStyles as Sa,Group as ha}from"@mantine/core";r();import{useMantineTheme as ia}from"@mantine/core";import{useMediaQuery as ga}from"@mantine/hooks";function po(o){let e=ia(),a=typeof o=="function"?o(e):o;return ga(a||"",!0)}function mo(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 ze(o,e,a){return o.filter(t=>!e.map(a).includes(a(t)))}function xo(o,e){return o.filter((a,t,f)=>t===f.findIndex(l=>e(a)===e(l)))}function h(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}import{jsx as X,jsxs as Ba}from"react/jsx-runtime";var ba=Sa(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 Zo({className:o,sx:e,style:a,accessor:t,visibleMediaQuery:f,title:l,sortable:d,textAlignment:p,width:u,sortStatus:n,onSortStatusChange:I}){let{cx:g,classes:m}=ba();if(!po(f))return null;let c=l??mo(t),i=typeof c=="string"?c:void 0;return X(Xo,{component:"th",className:g({[m.sortableColumnHeader]:d},o),sx:[{"&&":{textAlign:p},width:u,minWidth:u,maxWidth:u},e],style:a,role:d?"button":void 0,onClick:d&&I?()=>{I({columnAccessor:t,direction:n?.direction==="asc"?"desc":"asc"})}:void 0,children:d||n?.columnAccessor===t?Ba(ha,{className:m.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[X(Xo,{className:g(m.columnHeaderText,m.sortableColumnHeaderText),title:i,children:c}),X(Ca,{children:n?.columnAccessor===t?X(qo,{className:g(m.sortableColumnHeaderIcon,{[m.sortableColumnHeaderIconRotated]:n.direction==="desc"}),size:14}):X(Wo,{className:m.sortableColumnHeaderNeutralIcon,size:14})})]}):X(Xo,{className:m.columnHeaderText,title:i,children:c})})}import{jsx as Io,jsxs as Pa}from"react/jsx-runtime";var wa=ya(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"}}}),Ve=Ta(function({className:e,style:a,sortStatus:t,onSortStatusChange:f,columns:l,selectionVisible:d,selectionChecked:p,selectionIndeterminate:u,onSelectionChange:n,leftShadowVisible:I},g){let{classes:m,cx:c}=wa();return Io("thead",{className:c(m.root,e),style:a,ref:g,children:Pa("tr",{children:[d&&Io("th",{className:c(m.selectorColumnHeader,{[m.selectorColumnHeaderWithRightShadow]:I}),children:Io(Da,{classNames:{input:m.selectionCheckboxInput},checked:p,indeterminate:u,disabled:!n,onChange:n})}),l.map(({accessor:i,hidden:C,visibleMediaQuery:b,textAlignment:B,width:H,title:v,sortable:T,titleClassName:w,titleStyle:P,titleSx:O})=>C?null:Io(Zo,{className:w,style:P,sx:O,accessor:i,visibleMediaQuery:b,textAlignment:B,width:H,title:v,sortable:T,sortStatus:t,onSortStatusChange:f},i))]})})});r();import{Center as Ma,createStyles as Ra,Loader as Oa}from"@mantine/core";import{jsx as Ge}from"react/jsx-runtime";var ka=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 Qo({pt:o,pb:e,fetching:a,customContent:t,backgroundBlur:f,size:l,variant:d,color:p}){let{classes:u,cx:n}=ka();return Ge(Ma,{pt:o,pb:e,className:n(u.root,{[u.fetching]:a}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:a&&(t||Ge(Oa,{size:l,variant:d,color:p}))})}r();import{Box as Ga,createStyles as Xa}from"@mantine/core";r();import{Box as va,createStyles as Fa}from"@mantine/core";import{jsx as La}from"react/jsx-runtime";var Aa=Fa({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Ko({className:o,sx:e,style:a,visibleMediaQuery:t,record:f,recordIndex:l,onClick:d,noWrap:p,ellipsis:u,textAlignment:n,width:I,accessor:g,render:m,defaultRender:c,customCellAttributes:i}){let{cx:C,classes:b}=Aa();return po(t)?La(va,{component:"td",className:C({[b.noWrap]:p||u,[b.ellipsis]:u,[b.withPointerCursor]:d},o),sx:[{width:I,minWidth:I,maxWidth:I,textAlign:n},e],style:a,onClick:d,...i?.(f,l),children:m?m(f,l):c?c(f,l,g):h(f,g)}):null}r();import{Collapse as Ha,createStyles as Na}from"@mantine/core";r();import{useTimeout as Xe}from"@mantine/hooks";import{useEffect as $o,useState as J}from"react";function Ze(o){let[e,a]=J(null),t=o?.join(":")||"";return $o(()=>{a(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:a}}function Qe(o){let[e,a]=J(null);return $o(()=>{o&&a(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:a}}function Ke({rowExpansion:o,records:e,idAccessor:a}){let t=[];if(o&&e){let{trigger:p,allowMultiple:u,initiallyExpanded:n}=o;e&&p==="always"?t=e.map(I=>h(I,a)):n&&(t=e.filter(n).map(I=>h(I,a)),u||(t=[t[0]]))}let f,l,d=J(t);if(o){let{trigger:p,allowMultiple:u,collapseProps:n,content:I}=o;o.expanded?{recordIds:f,onRecordIdsChange:l}=o.expanded:[f,l]=d;let g=m=>l(f.filter(c=>c!==h(m,a)));return{expandOnClick:p!=="always"&&p!=="never",isRowExpanded:m=>p==="always"?!0:f.includes(h(m,a)),expandRow:m=>{let c=h(m,a);l(u?[...f,c]:[c])},collapseRow:g,collapseProps:n,content:(m,c)=>()=>I({record:m,recordIndex:c,collapse:()=>g(m)})}}}function $e(o,e){let[a,t]=J(o),[f,l]=J(o),d=Xe(()=>t(!0),0),p=Xe(()=>l(!1),e||200);return $o(()=>{o?(p.clear(),l(!0),d.start()):(d.clear(),t(!1),p.start())},[d,p,o]),{expanded:a,visible:f}}import{Fragment as qa,jsx as io,jsxs as Wa}from"react/jsx-runtime";var Ea=Na({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function Yo({open:o,colSpan:e,content:a,collapseProps:t}){let{expanded:f,visible:l}=$e(o,t?.transitionDuration),{cx:d,classes:p}=Ea();return l?Wa(qa,{children:[io("tr",{}),io("tr",{children:io("td",{className:d(p.cell,{[p.expandedCell]:f}),colSpan:e,children:io(Ha,{in:f,...t,children:a()})})})]}):null}r();import{Checkbox as Ua,createStyles as za}from"@mantine/core";import{jsx as Ye}from"react/jsx-runtime";var Va=za(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:a,classes:t}=Va();return Ye("td",{className:a(t.root,{[t.withRightShadow]:o}),children:Ye(Ua,{classNames:{input:t.checkbox},...e,onClick:f=>f.stopPropagation()})})}import{Fragment as Qa,jsx as jo,jsxs as _e}from"react/jsx-runtime";var Za=Xa(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 Jo({record:o,recordIndex:e,columns:a,defaultColumnRender:t,selectionVisible:f,selectionChecked:l,onSelectionChange:d,isRecordSelectable:p,onClick:u,onCellClick:n,onContextMenu:I,expansion:g,customRowAttributes:m,className:c,style:i,sx:C,contextMenuVisible:b,leftShadowVisible:B}){let{cx:H,classes:v}=Za();return _e(Qa,{children:[_e(Ga,{component:"tr",className:H({[v.withPointerCursor]:u||g?.expandOnClick,[v.selected]:l,[v.contextMenuVisible]:b},typeof c=="function"?c(o,e):c),onClick:T=>{if(g){let{isRowExpanded:w,expandOnClick:P,expandRow:O,collapseRow:F}=g;P&&(w(o)?F(o):O(o))}u?.(T)},style:typeof i=="function"?i(o,e):i,sx:C,...m?.(o,e),onContextMenu:I,children:[f&&jo(_o,{withRightShadow:B,checked:l,disabled:!d||(p?!p(o,e):!1),onChange:d}),a.map((T,w)=>{let{accessor:P,hidden:O,visibleMediaQuery:F,textAlignment:Z,noWrap:ho,ellipsis:bo,width:Bo,render:Do,cellsClassName:Q,cellsStyle:K,cellsSx:yo,customCellAttributes:To}=T,oo;return n&&(oo=()=>n({record:o,recordIndex:e,column:T,columnIndex:w})),O?null:jo(Ko,{className:typeof Q=="function"?Q(o,e):Q,style:typeof K=="function"?K(o,e):K,sx:yo,visibleMediaQuery:F,record:o,recordIndex:e,onClick:oo,accessor:P,textAlignment:Z,noWrap:ho,ellipsis:bo,width:Bo,render:Do,defaultRender:t,customCellAttributes:To},P)})]}),g&&jo(Yo,{colSpan:a.filter(T=>!T.hidden).length+(f?1:0),open:g.isRowExpanded(o),content:g.content(o,e),collapseProps:g.collapseProps})]})}r();import{createStyles as Ka,Paper as $a,px as Ya,useMantineTheme as _a}from"@mantine/core";import{useClickOutside as ja,useElementSize as Ja,useMergedRef as ot,useWindowEvent as je}from"@mantine/hooks";import{jsx as rt}from"react/jsx-runtime";var et=Ka(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 oe({borderRadius:o="xs",shadow:e="sm",zIndex:a=3,y:t,x:f,onDestroy:l,children:d}){je("resize",l),je("scroll",l);let p=ja(l),{ref:u,width:n,height:I}=Ja(),g=ot(p,u),{dir:m,spacing:c}=_a(),i=Ya(c.md),{innerWidth:C,innerHeight:b}=window,{classes:B}=et();return rt($a,{ref:g,shadow:e,radius:o,className:B.root,sx:{zIndex:a,top:t+I+i>b?b-I-i:t,left:m==="ltr"?f+n+i>C?C-n-i:f:C-i-(f-n-i<0?n+i:f)},children:d})}r();import{createStyles as at}from"@mantine/core";import{jsx as ft}from"react/jsx-runtime";var tt=at(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function ee(){let{classes:o}=tt();return ft("div",{className:o.root})}r();import{Box as nt,createStyles as lt,px as dt,Text as st,UnstyledButton as ct}from"@mantine/core";import{jsx as Je,jsxs as pt}from"react/jsx-runtime";var ut=lt((o,{color:e})=>{let a=dt(o.spacing.sm)/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:a,paddingBottom:a,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 re({icon:o,title:e,color:a,disabled:t,onClick:f}){let{classes:l}=ut({color:a});return pt(ct,{className:l.root,disabled:t,onClick:f,children:[o&&Je(nt,{className:l.icon,children:o}),Je(st,{className:l.title,size:"sm",children:e})]})}r();import{Box as mt,createStyles as xt,ScrollArea as It}from"@mantine/core";import{jsx as go,jsxs as gt}from"react/jsx-runtime";var it=xt(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}}});function ae({topShadowVisible:o,leftShadowVisible:e,rightShadowVisible:a,bottomShadowVisible:t,headerHeight:f,onScrollPositionChange:l,children:d,viewportRef:p}){let{cx:u,classes:n}=it();return gt(It,{viewportRef:p,classNames:{root:n.root,scrollbar:n.scrollbar,thumb:n.thumb,corner:n.corner},styles:{scrollbar:{marginTop:f}},onScrollPositionChange:l,children:[d,go(mt,{className:u(n.shadow,n.topShadow,{[n.shadowVisible]:o}),sx:{top:f}}),go("div",{className:u(n.shadow,n.leftShadow,{[n.shadowVisible]:e})}),go("div",{className:u(n.shadow,n.rightShadow,{[n.shadowVisible]:a})}),go("div",{className:u(n.shadow,n.bottomShadow,{[n.shadowVisible]:t})})]})}import{jsx as R,jsxs as er}from"react/jsx-runtime";var or={},yt=St((o,{borderColor:e,rowBorderColor:a})=>{let t=typeof e=="function"?e(o):e,f=typeof a=="function"?a(o):a;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 rr({withBorder:o,borderRadius:e,borderColor:a=D=>D.colorScheme==="dark"?D.colors.dark[4]:D.colors.gray[3],rowBorderColor:t=D=>D.fn.rgba(D.colorScheme==="dark"?D.colors.dark[4]:D.colors.gray[3],.65),withColumnBorders:f,textSelectionDisabled:l,height:d="100%",minHeight:p,shadow:u,verticalAlignment:n="center",fetching:I,columns:g,defaultColumnRender:m,idAccessor:c="id",records:i,selectedRecords:C,onSelectedRecordsChange:b,isRecordSelectable:B,sortStatus:H,onSortStatusChange:v,horizontalSpacing:T,page:w,onPageChange:P,totalRecords:O,recordsPerPage:F,onRecordsPerPageChange:Z,recordsPerPageOptions:ho,recordsPerPageLabel:bo="Records per page",paginationColor:Bo,paginationSize:Do="sm",paginationText:Q=({from:D,to:$,totalRecords:W})=>`${D} - ${$} / ${W}`,paginationWrapBreakpoint:K="sm",loaderBackgroundBlur:yo,customLoader:To,loaderSize:oo,loaderVariant:ar,loaderColor:tr,loadingText:fr="...",emptyState:nr,noRecordsText:te="No records",noRecordsIcon:lr,striped:dr,onRowClick:wo,onCellClick:sr,onScrollToTop:fe,onScrollToBottom:ne,onScrollToLeft:le,onScrollToRight:de,rowContextMenu:k,rowExpansion:cr,rowClassName:ur,rowStyle:pr,rowSx:mr,customRowAttributes:xr,scrollViewportRef:Ir,bodyRef:ir,m:gr,my:Cr,mx:Sr,mt:hr,mb:br,ml:Br,mr:Dr,sx:yr,className:Tr,classNames:Po,style:wr,styles:Mo,...Pr}){let{ref:D,width:$,height:W}=Co(),{ref:Mr,height:Ro}=Co(),{ref:Rr,width:Oo,height:eo}=Co(),{ref:Or,height:se}=Co(),[ko,ce]=So(!0),[vo,ue]=So(!0),[ro,pe]=So(!0),[Fo,me]=So(!0),{rowContextMenuInfo:N,setRowContextMenuInfo:U}=Qe(I),kr=Ke({rowExpansion:cr,records:i,idAccessor:c}),xe=()=>{if(!I&&k&&U(null),I||eo<=W)ce(!0),ue(!0);else{let x=D.current.scrollTop,S=x===0,y=eo-x-W<1;ce(S),ue(y),S&&S!==ko&&fe?.(),y&&y!==vo&&ne?.()}if(I||Oo===$)pe(!0),me(!0);else{let x=D.current.scrollLeft,S=x===0,y=Oo-x-$<1;pe(S),me(y),S&&S!==ro&&le?.(),y&&y!==Fo&&de?.()}};Dt(xe,[I,ne,le,de,fe,k,W,D,$,vo,ro,Fo,ko,U,eo,Oo]);let vr=x=>{D.current.scrollTo({top:0,left:0}),P(x)},ao=i?.length,Ie=i?.map(x=>h(x,c)),Y=C?.map(x=>h(x,c)),ie=Ie!==void 0&&Y!==void 0&&Y.length>0,ge=B?i?.filter(B):i,Ao=ge?.map(x=>h(x,c)),Lo=ie&&Ao.every(x=>Y.includes(x)),Fr=ie&&Ao.some(x=>Y.includes(x)),Ce;b&&(Ce=()=>{b(Lo?C.filter(x=>!Ao.includes(h(x,c))):xo([...C,...ge],x=>h(x,c)))});let{lastSelectionChangeIndex:to,setLastSelectionChangeIndex:Ar}=Ze(Ie),Se=!!C&&!ro,{cx:he,classes:A,theme:Lr}=yt({borderColor:a,rowBorderColor:t}),Hr={m:gr,my:Cr,mx:Sr,mt:hr,mb:br,ml:Br,mr:Dr},Ho=typeof Mo=="function"?Mo(Lr,or,or):Mo;return er(Ct,{...Hr,className:he(A.root,{[A.tableWithBorder]:o},Tr,Po?.root),sx:[x=>({borderRadius:x.radius[e]||e,boxShadow:x.shadows[u]||u,height:d,minHeight:p}),...ht(yr)],style:{...Ho?.root,...wr},children:[R(ae,{viewportRef:Bt(D,Ir||null),topShadowVisible:!ko,leftShadowVisible:!(C||ro),rightShadowVisible:!Fo,bottomShadowVisible:!vo,headerHeight:Ro,onScrollPositionChange:xe,children:er(bt,{ref:Rr,horizontalSpacing:T,className:he(A.table,{[A.tableWithColumnBorders]:f,[A.lastRowBorderBottomVisible]:eo<W,[A.textSelectionDisabled]:l,[A.verticalAlignmentTop]:n==="top",[A.verticalAlignmentBottom]:n==="bottom"}),striped:ao?dr:!1,...Pr,children:[R(Ve,{ref:Mr,className:Po?.header,style:Ho?.header,columns:g,sortStatus:H,onSortStatusChange:v,selectionVisible:!!C,selectionChecked:Lo,selectionIndeterminate:Fr&&!Lo,onSelectionChange:Ce,leftShadowVisible:Se}),R("tbody",{ref:ir,children:ao?i.map((x,S)=>{let y=h(x,c),_=Y?.includes(y)||!1,fo=!1,no=!1;if(k){let{hidden:M}=k;(!M||!(typeof M=="function"?M(x,S):M))&&(k.trigger==="click"?fo=!0:no=!0)}let lo;b&&(lo=M=>{if(M.nativeEvent.shiftKey&&to!==null){let z=i.filter(S>to?(E,q)=>q>=to&&q<=S&&(B?B(E,q):!0):(E,q)=>q>=S&&q<=to&&(B?B(E,q):!0));b(_?ze(C,z,E=>h(E,c)):xo([...C,...z],E=>h(E,c)))}else b(_?C.filter(z=>h(z,c)!==y):xo([...C,x],z=>h(z,c)));Ar(S)});let j;fo?j=M=>{U({y:M.clientY,x:M.clientX,record:x,recordIndex:S}),wo?.(x,S)}:wo&&(j=()=>{wo(x,S)});let be;return no&&(be=M=>{M.preventDefault(),U({y:M.clientY,x:M.clientX,record:x,recordIndex:S})}),R(Jo,{record:x,recordIndex:S,columns:g,defaultColumnRender:m,selectionVisible:!!C,selectionChecked:_,onSelectionChange:lo,isRecordSelectable:B,onClick:j,onCellClick:sr,onContextMenu:be,contextMenuVisible:N?h(N.record,c)===y:!1,expansion:kr,className:ur,style:pr,sx:mr,customRowAttributes:xr,leftShadowVisible:Se},y)}):R(Eo,{})})]})}),w&&R(Ue,{ref:Or,className:Po?.pagination,style:Ho?.pagination,topBorderColor:a,horizontalSpacing:T,fetching:I,page:w,onPageChange:vr,totalRecords:O,recordsPerPage:F,onRecordsPerPageChange:Z,recordsPerPageOptions:ho,recordsPerPageLabel:bo,paginationColor:Bo,paginationSize:Do,paginationText:Q,paginationWrapBreakpoint:K,noRecordsText:te,loadingText:fr,recordsLength:ao}),R(Qo,{pt:Ro,pb:se,fetching:I,backgroundBlur:yo,customContent:To,size:oo,variant:ar,color:tr}),R(zo,{pt:Ro,pb:se,icon:lr,text:te,active:!I&&!ao,children:nr}),k&&N&&R(oe,{zIndex:k.zIndex,borderRadius:k.borderRadius,shadow:k.shadow,y:N.y,x:N.x,onDestroy:()=>U(null),children:k.items(N.record,N.recordIndex).map(({divider:x,key:S,title:y,icon:_,color:fo,hidden:no,disabled:lo,onClick:j})=>x?R(ee,{},S):no?null:R(re,{title:y??mo(S),icon:_,color:fo,disabled:lo,onClick:()=>{U(null),j()}},S))})]})}r();r();r();r();r();r();r();r();r();r();r();r();r();r();r();r();export{rr as DataTable};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|