mantine-datatable
Advanced tools
Comparing version 7.4.5 to 7.4.6
@@ -1,2 +0,2 @@ | ||
"use strict";"use client";var Mn=Object.create;var ot=Object.defineProperty;var kn=Object.getOwnPropertyDescriptor;var Rn=Object.getOwnPropertyNames;var En=Object.getPrototypeOf,Nn=Object.prototype.hasOwnProperty;var Ln=(e,t)=>{for(var o in t)ot(e,o,{get:t[o],enumerable:!0})},to=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Rn(t))!Nn.call(e,a)&&a!==o&&ot(e,a,{get:()=>t[a],enumerable:!(n=kn(t,a))||n.enumerable});return e};var z=(e,t,o)=>(o=e!=null?Mn(En(e)):{},to(t||!e||!e.__esModule?ot(o,"default",{value:e,enumerable:!0}):o,e)),In=e=>to(ot({},"__esModule",{value:!0}),e);var An={};Ln(An,{DataTable:()=>Da,differenceBy:()=>Nt,getRecordId:()=>k,getValueAtPath:()=>st,humanize:()=>ge,uniqBy:()=>Xe,useDataTableColumns:()=>lt,useDragToggleColumns:()=>Hn});module.exports=In(An);var gt=require("@mantine/core"),zt=require("@mantine/hooks"),Vt=z(require("clsx")),_=require("react");var Mt=require("react");var oo=require("@mantine/core"),[ao,xe]=(0,oo.createSafeContext)("useDataTableColumnsContext must be used within DataTableColumnProvider");var no=require("react/jsx-runtime"),kt=e=>{let{children:t,columnsOrder:o,setColumnsOrder:n,columnsToggle:a,setColumnsToggle:r,resetColumnsOrder:i,resetColumnsToggle:l,setColumnWidth:d,resetColumnsWidth:s}=e,[m,c]=(0,Mt.useState)(""),[u,f]=(0,Mt.useState)("");return(0,no.jsx)(ao,{value:{sourceColumn:m,setSourceColumn:c,targetColumn:u,setTargetColumn:f,columnsToggle:a,setColumnsToggle:r,swapColumns:()=>{if(!o||!n||!m||!u)return;let h=o.indexOf(m),b=o.indexOf(u);if(h!==-1&&b!==-1){let S=o.splice(h,1)[0];o.splice(b,0,S),n([...o])}},resetColumnsOrder:i,resetColumnsToggle:l,setColumnWidth:d,resetColumnsWidth:s},children:t})};var Rt=require("react/jsx-runtime");function lo(){return(0,Rt.jsx)("tr",{className:"mantine-datatable-empty-row",children:(0,Rt.jsx)("td",{})})}var at=require("@mantine/core");var oe=require("react/jsx-runtime");function ro(){return(0,oe.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,oe.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,oe.jsx)("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"}),(0,oe.jsx)("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"}),(0,oe.jsx)("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),(0,oe.jsx)("path",{d:"M3 3l18 18"})]})}var j=require("react/jsx-runtime");function io({icon:e,text:t,pt:o,pb:n,active:a,children:r}){return(0,j.jsx)(at.Center,{pt:o,pb:n,className:"mantine-datatable-empty-state","data-active":a||void 0,children:r||(0,j.jsxs)(j.Fragment,{children:[e||(0,j.jsx)("div",{className:"mantine-datatable-empty-state-icon",children:(0,j.jsx)(ro,{})}),(0,j.jsx)(at.Text,{size:"sm",c:"dimmed",children:t})]})})}var Ee=require("@mantine/core"),Ro=z(require("clsx")),Eo=require("react");var wo=require("@mantine/core"),So=z(require("clsx"));var nt=require("@mantine/hooks"),so=require("react"),lt=({key:e,columns:t=[]})=>{let o=t&&t.map(b=>b.accessor)||[],n=t&&t.map(b=>({[b.accessor]:b.width??"initial"}))||[],a=t&&t.map(b=>({accessor:b.accessor,defaultToggle:b.defaultToggle||!0,toggleable:b.toggleable,toggled:b.defaultToggle===void 0?!0:b.defaultToggle})),[r,i]=(0,nt.useLocalStorage)({key:`${e}-columns-order`,defaultValue:o,getInitialValueInEffect:!0}),[l,d]=(0,nt.useLocalStorage)({key:`${e}-columns-toggle`,defaultValue:a,getInitialValueInEffect:!0}),[s,m]=(0,nt.useLocalStorage)({key:`${e}-columns-width`,defaultValue:n,getInitialValueInEffect:!0}),c=()=>i(o),u=()=>{d(a)},f=()=>m(n);return{effectiveColumns:(0,so.useMemo)(()=>r?r.map(p=>t.find(C=>C.accessor===p)).map(p=>({...p,hidden:!l.find(C=>C.accessor===p?.accessor)?.toggled})).map(p=>({...p,width:s.find(C=>C[p?.accessor])?.[p?.accessor]})):t,[t,r,l,s]),setColumnsOrder:i,columnsOrder:r,resetColumnsOrder:c,columnsToggle:l,setColumnsToggle:d,resetColumnsToggle:u,columnsWidth:s,setColumnsWidth:m,setColumnWidth:(b,S)=>{let p=s.map(C=>C[b]?{[b]:S}:C);m(p)},resetColumnsWidth:f}},Hn=lt;var co=require("@mantine/hooks");function Te(){let[e]=(0,co.useResizeObserver)(),{width:t,height:o}=e.current?.getBoundingClientRect()||{width:0,height:0};return{ref:e,width:t,height:o}}var rt=require("react"),mo=typeof window<"u"?rt.useLayoutEffect:rt.useEffect;var it=require("react");function uo(e){let[t,o]=(0,it.useState)(null),n=e?.join(":")||"";return(0,it.useEffect)(()=>{o(null)},[n]),{lastSelectionChangeIndex:t,setLastSelectionChangeIndex:o}}var ve=require("react");function On(e,t){let o=()=>{t(e.map(a=>a.matches))},n=e.map(a=>{try{return a.addEventListener("change",o),()=>a.removeEventListener("change",o)}catch{return a.addListener(o),()=>a.removeListener(o)}});return()=>{n.forEach(a=>a())}}function Wn(e,t){return t||(typeof window<"u"&&"matchMedia"in window?e.map(o=>window.matchMedia(o).matches):e.map(()=>!1))}function po(e,t,{getInitialValueInEffect:o}={getInitialValueInEffect:!0}){let[n,a]=(0,ve.useState)(o?t:Wn(e,t)),r=(0,ve.useRef)();return(0,ve.useEffect)(()=>{if("matchMedia"in window)return r.current=e.map(i=>window.matchMedia(i)),a(r.current.map(i=>i.matches)),On(r.current,i=>{a(i)})},[e]),n}var fo=require("@mantine/core"),Et=require("react");function bo(e){let t=(0,fo.useMantineTheme)(),o=(0,Et.useMemo)(()=>e.map(a=>(typeof a=="function"?a(t):a)??""),[e,t]),n=(0,Et.useMemo)(()=>e.map(()=>!0),[e]);return po(o,n)}var To=require("@mantine/core"),go=require("@mantine/hooks");function ae(e){let t=(0,To.useMantineTheme)(),o=typeof e=="function"?e(t):e;return(0,go.useMediaQuery)(o||"",!0)}var ho=require("react");function ge(e){let t=e.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${t.charAt(0).toUpperCase()}${t.slice(1)}`}function Nt(e,t,o){return e.filter(n=>!t.map(o).includes(o(n)))}function Xe(e,t){return e.filter((o,n,a)=>n===a.findIndex(r=>t(o)===t(r)))}function st(e,t){return t?t.match(/([^[.\]])+/g).reduce((n,a)=>n&&n[a],e):void 0}function k(e,t){return typeof t=="string"?st(e,t):t(e)}function Co({rowExpansion:e,records:t,idAccessor:o}){let n=[];if(e&&t){let{trigger:l,allowMultiple:d,initiallyExpanded:s}=e;t&&l==="always"?n=t.map(m=>k(m,o)):s&&(n=t.filter((m,c)=>s({record:m,index:c})).map(m=>k(m,o)),d||(n=[n[0]]))}let a,r,i=(0,ho.useState)(n);if(e){let{trigger:l,allowMultiple:d,collapseProps:s,content:m}=e;e.expanded?{recordIds:a,onRecordIdsChange:r}=e.expanded:[a,r]=i;let c=u=>r?.(a.filter(f=>f!==k(u,o)));return{expandOnClick:l!=="always"&&l!=="never",isRowExpanded:u=>l==="always"?!0:a.includes(k(u,o)),expandRow:u=>{let f=k(u,o);r?.(d?[...a,f]:[f])},collapseRow:c,collapseProps:s,content:({record:u,index:f})=>()=>m({record:u,index:f,collapse:()=>c(u)})}}}var Lt=require("@mantine/hooks"),Qe=require("react");function yo(e,t){let[o,n]=(0,Qe.useState)(e),[a,r]=(0,Qe.useState)(e),i=(0,Lt.useTimeout)(()=>n(!0),0),l=(0,Lt.useTimeout)(()=>r(!1),t||200);return(0,Qe.useEffect)(()=>{e?(l.clear(),r(!0),i.start()):(i.clear(),n(!1),l.start())},[i,l,e]),{expanded:o,visible:a}}var Me="mantine-datatable-nowrap",ke="mantine-datatable-ellipsis",$="mantine-datatable-pointer-cursor",dt="mantine-datatable-context-menu-cursor",Do="mantine-datatable-text-selection-disabled",ne="mantine-datatable-text-align-left",le="mantine-datatable-text-align-center",re="mantine-datatable-text-align-right";var xo=require("react/jsx-runtime");function Po({className:e,style:t,visibleMediaQuery:o,title:n,noWrap:a,ellipsis:r,textAlign:i,width:l}){return ae(o)?(0,xo.jsx)(wo.TableTh,{className:(0,So.default)({[Me]:a||r,[ke]:r,[ne]:i==="left",[le]:i==="center",[re]:i==="right"},e),style:[{width:l,minWidth:l,maxWidth:l},t],children:n}):null}var vo=require("@mantine/core"),ko=require("react/jsx-runtime");function Mo({shadowVisible:e}){return(0,ko.jsx)(vo.TableTh,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":e||void 0})}var Re=require("react/jsx-runtime"),No=(0,Eo.forwardRef)(function({className:t,style:o,columns:n,defaultColumnProps:a,selectionVisible:r,selectorCellShadowVisible:i,scrollDiff:l},d){let s=l<0;return(0,Re.jsx)(Ee.TableTfoot,{ref:d,className:(0,Ro.default)("mantine-datatable-footer",t),style:[{position:s?"relative":"sticky",bottom:(0,Ee.rem)(s?l:0)},o],children:(0,Re.jsxs)(Ee.TableTr,{children:[r&&(0,Re.jsx)(Mo,{shadowVisible:i}),n.map(({hidden:m,...c})=>{if(m)return null;let{accessor:u,visibleMediaQuery:f,textAlign:y,width:h,footer:b,footerClassName:S,footerStyle:p,noWrap:C,ellipsis:R}={...a,...c};return(0,Re.jsx)(Po,{className:S,style:p,visibleMediaQuery:f,textAlign:y,width:h,title:b,noWrap:C,ellipsis:R},u)})]})})});var N=require("@mantine/core"),Yo=z(require("clsx")),pt=require("react");var Lo=require("@mantine/core"),Io=z(require("clsx")),It=require("react");var Oo=require("react/jsx-runtime");function Ho({group:{id:e,columns:t,title:o,textAlign:n,className:a,style:r}}){let i=(0,It.useMemo)(()=>t.map(({visibleMediaQuery:s})=>s),[t]),l=bo(i),d=(0,It.useMemo)(()=>t.filter(({hidden:s},m)=>!s&&l?.[m]).length,[t,l]);return d>0?(0,Oo.jsx)(Lo.TableTh,{colSpan:d,className:(0,Io.default)("mantine-datatable-column-group-header-cell",{[ne]:n==="left",[le]:n==="center",[re]:n==="right"},a),style:r,children:o??ge(e)}):null}var H=require("@mantine/core"),Ke=z(require("clsx")),mt=require("react");var ie=require("@mantine/core"),zo=require("@mantine/hooks");var Ue=require("react/jsx-runtime");function Wo(){return(0,Ue.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ue.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,Ue.jsx)("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}var $e=require("react/jsx-runtime");function Ao(){return(0,$e.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$e.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,$e.jsx)("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}var he=require("react/jsx-runtime");function Vo({children:e,isActive:t}){let[o,{close:n,toggle:a}]=(0,zo.useDisclosure)(!1);return(0,he.jsxs)(ie.Popover,{withArrow:!0,withinPortal:!0,shadow:"md",opened:o,onClose:n,trapFocus:!0,children:[(0,he.jsx)(ie.PopoverTarget,{children:(0,he.jsx)(ie.ActionIcon,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":t||void 0,size:"sm",variant:"default",onClick:i=>{i.preventDefault(),a()},children:(0,he.jsx)(t?Ao:Wo,{})})}),(0,he.jsx)(ie.PopoverDropdown,{onClick:i=>i.stopPropagation(),children:typeof e=="function"?e({close:n}):e})]})}var Fo=require("@mantine/core"),ct=require("react");var Bo=require("react/jsx-runtime"),_o=e=>{let{accessor:t,columnRef:o}=e,n=(0,ct.useRef)(null),[a,r]=(0,ct.useState)(0),{setColumnWidth:i}=xe(),l=c=>{c.preventDefault(),c.stopPropagation(),document.addEventListener("mousemove",d),document.addEventListener("mouseup",s),document.body.style.cursor="col-resize"},d=c=>{if(!o.current)return;let u=c.clientX-o.current.getBoundingClientRect().right,y=`${o.current.getBoundingClientRect().width+u}px`;o.current.style.width=y,i(t,o.current.style.width),r(-u)},s=()=>{o.current&&(document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s),document.body.style.cursor="initial",i(t,o.current.style.width),r(0))};return(0,Bo.jsx)("div",{ref:n,onClick:c=>c.stopPropagation(),onMouseDown:l,onDoubleClick:()=>{o.current&&(o.current.style.maxWidth="initial",o.current.style.minWidth="initial",o.current.style.width="initial",i(t,"initial"))},className:"mantine-datatable-header-resizable-handle",style:{right:(0,Fo.rem)(a)}})};var Ce=require("react/jsx-runtime");function Go(){return(0,Ce.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ce.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,Ce.jsx)("path",{d:"M12 5l0 14"}),(0,Ce.jsx)("path",{d:"M16 9l-4 -4"}),(0,Ce.jsx)("path",{d:"M8 9l4 -4"})]})}var ye=require("react/jsx-runtime");function Xo(){return(0,ye.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,ye.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,ye.jsx)("path",{d:"M8 7l4 -4l4 4"}),(0,ye.jsx)("path",{d:"M8 17l4 4l4 -4"}),(0,ye.jsx)("path",{d:"M12 3l0 18"})]})}var K=require("react/jsx-runtime");function Qo(){return(0,K.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,K.jsx)("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,K.jsx)("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,K.jsx)("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,K.jsx)("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,K.jsx)("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,K.jsx)("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}var Ne=require("react/jsx-runtime");function Uo(){return(0,Ne.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ne.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,Ne.jsx)("path",{d:"M18 6l-12 12"}),(0,Ne.jsx)("path",{d:"M6 6l12 12"})]})}var D=require("react/jsx-runtime");function $o({className:e,style:t,accessor:o,visibleMediaQuery:n,title:a,sortable:r,draggable:i,toggleable:l,resizable:d,sortIcons:s,textAlign:m,width:c,sortStatus:u,onSortStatusChange:f,filter:y,filtering:h}){let{setSourceColumn:b,setTargetColumn:S,swapColumns:p,setColumnsToggle:C}=xe(),[R,L]=(0,mt.useState)(!1),v=(0,mt.useRef)(null);if(!ae(n))return null;let O=a??ge(o),U=typeof O=="string"?O:void 0,I=r&&f?E=>{E?.defaultPrevented||f({columnAccessor:o,direction:u?.columnAccessor===o?u.direction==="asc"?"desc":"asc":u?.direction??"asc"})}:void 0,Z=E=>{E.stopPropagation(),b(o),L(!1)},M=E=>{E.preventDefault(),S(o),L(!0)},g=()=>{S(o),L(!1),p()},P=()=>{L(!0)},W=()=>{L(!1)},B=E=>{E.stopPropagation(),C(ce=>ce.map(Y=>Y.accessor===o?{...Y,toggled:!1}:Y))};return(0,D.jsxs)(H.TableTh,{className:(0,Ke.default)({"mantine-datatable-header-cell-sortable":r,"mantine-datatable-header-cell-toggleable":l,"mantine-datatable-header-cell-resizable":d},e),style:[{width:c,...d?{minWidth:"1px"}:{minWidth:c,maxWidth:c}},t],role:r?"button":void 0,tabIndex:r?0:void 0,onClick:I,onKeyDown:E=>E.key==="Enter"&&I?.(),ref:v,children:[(0,D.jsxs)(H.Group,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[(0,D.jsxs)(H.Flex,{align:"center",w:"100%",className:(0,Ke.default)({"mantine-datatable-header-cell-draggable":i,"mantine-datatable-header-cell-drag-over":R}),draggable:i,onDragStart:i?Z:void 0,onDragEnter:i?P:void 0,onDragOver:i?M:void 0,onDrop:i?g:void 0,onDragLeave:i?W:void 0,children:[i?(0,D.jsx)(H.Center,{role:"img","aria-label":"Drag column",children:(0,D.jsx)(H.ActionIcon,{className:"mantine-datatable-header-cell-draggable-action-icon",variant:"subtle",size:"xs",onClick:E=>{E.stopPropagation()},children:(0,D.jsx)(Qo,{})})}):null,(0,D.jsx)(H.Box,{className:(0,Ke.default)("mantine-datatable-header-cell-sortable-text",{[ne]:m==="left",[le]:m==="center",[re]:m==="right"},Me,ke),title:U,children:O})]}),l?(0,D.jsx)(H.Center,{className:"mantine-datatable-header-cell-toggleable-icon",role:"img","aria-label":"Toggle column",children:(0,D.jsx)(H.ActionIcon,{size:"xs",variant:"light",onClick:B,children:(0,D.jsx)(Uo,{})})}):null,r||u?.columnAccessor===o?(0,D.jsx)(D.Fragment,{children:u?.columnAccessor===o?(0,D.jsx)(H.Center,{className:(0,Ke.default)("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":u.direction==="desc"}),role:"img","aria-label":`Sorted ${u.direction==="desc"?"descending":"ascending"}`,children:s?.sorted||(0,D.jsx)(Go,{})}):(0,D.jsx)(H.Center,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:s?.unsorted||(0,D.jsx)(Xo,{})})}):null,y?(0,D.jsx)(Vo,{isActive:!!h,children:y}):null]}),d?(0,D.jsx)(_o,{accessor:o,columnRef:v}):null]})}var ut=require("@mantine/core"),Ko=z(require("clsx")),Jo=require("react");var Ht=require("react/jsx-runtime"),Zo=(0,Jo.forwardRef)(function({className:t,style:o,trigger:n,shadowVisible:a,checked:r,indeterminate:i,checkboxProps:l,onChange:d,rowSpan:s},m){let c=!l.disabled;return(0,Ht.jsx)(ut.TableTh,{ref:m,className:(0,Ko.default)("mantine-datatable-header-selector-cell",{[$]:n==="cell"&&c},t),style:o,rowSpan:s,"data-shadow-visible":a||void 0,onClick:n==="cell"&&c?d:void 0,children:(0,Ht.jsx)(ut.Checkbox,{classNames:c?{input:$}:void 0,checked:r,indeterminate:i,onChange:d,...l,disabled:!(d||l.onChange)||l.disabled})})});var V=require("react/jsx-runtime"),qo=(0,pt.forwardRef)(function({selectionColumnHeaderRef:t,className:o,style:n,sortStatus:a,sortIcons:r,onSortStatusChange:i,columns:l,defaultColumnProps:d,groups:s,selectionTrigger:m,selectionVisible:c,selectionChecked:u,selectionIndeterminate:f,onSelectionChange:y,selectionCheckboxProps:h,selectorCellShadowVisible:b,selectionColumnClassName:S,selectionColumnStyle:p},C){let R=c?(0,V.jsx)(Zo,{ref:t,className:S,style:p,trigger:m,shadowVisible:b,checked:u,indeterminate:f,checkboxProps:h,onChange:y,rowSpan:s?2:void 0}):null,{columnsToggle:L,setColumnsToggle:v}=xe(),[O,U]=(0,pt.useState)(!1),I=l.some(g=>g.toggleable),Z=I?Object.fromEntries(l.map(({accessor:g,title:P})=>[g,P??ge(String(g))])):void 0,M=(0,V.jsxs)(N.TableThead,{className:(0,Yo.default)("mantine-datatable-header",o),style:n,ref:C,onContextMenu:g=>{g.preventDefault(),U(P=>!P)},children:[s&&(0,V.jsxs)(N.TableTr,{children:[R,s.map(g=>(0,V.jsx)(Ho,{group:g},g.id))]}),(0,V.jsxs)(N.TableTr,{children:[!s&&R,l.map(({hidden:g,...P},W)=>{if(g)return null;let{accessor:B,visibleMediaQuery:E,textAlign:ce,width:Y,title:He,sortable:Oe,draggable:me,toggleable:We,resizable:Ae,titleClassName:q,titleStyle:ht,filter:Ct,filtering:yt}={...d,...P};return(0,V.jsx)($o,{accessor:B,className:q,style:ht,visibleMediaQuery:E,textAlign:ce,width:Y,title:He,sortable:Oe,draggable:me,toggleable:We,resizable:Ae&&W<l.length-1,sortStatus:a,sortIcons:r,onSortStatusChange:i,filter:Ct,filtering:yt},B)})]})]});return I?(0,V.jsxs)(N.Popover,{position:"bottom",withArrow:!0,shadow:"md",opened:O,onChange:U,children:[(0,V.jsx)(N.PopoverTarget,{children:M}),(0,V.jsx)(N.PopoverDropdown,{children:(0,V.jsx)(N.Stack,{children:L.filter(g=>g.toggleable).map(g=>(0,V.jsx)(N.Group,{children:(0,V.jsx)(N.Checkbox,{classNames:{label:"mantine-datatable-header-column-toggle-checkbox-label"},size:"xs",label:Z[g.accessor],checked:g.toggled,onChange:P=>{v(L.map(W=>W.accessor===g.accessor?{...W,toggled:P.currentTarget.checked}:W))}})},g.accessor))})})]}):M});var ft=require("@mantine/core"),jo=z(require("clsx")),Ot=require("react/jsx-runtime");function ea({pt:e,pb:t,fetching:o,customContent:n,backgroundBlur:a,size:r,type:i,color:l}){return(0,Ot.jsx)(ft.Center,{pt:e,pb:t,className:(0,jo.default)("mantine-datatable-loader",{"mantine-datatable-loader-fetching":o}),style:[{backdropFilter:a?`blur(${a}px)`:void 0}],children:o&&(n||(0,Ot.jsx)(ft.Loader,{size:r,type:i,color:l}))})}var se=require("@mantine/core"),Wt=z(require("clsx")),sa=require("react");var w=require("@mantine/core"),ra=z(require("clsx"));var ta=require("@mantine/core");function x(e,t,o){return e?(0,ta.parseThemeColor)({color:typeof e=="object"?e[o]:e,theme:t}).value:void 0}function oa({theme:e,c:t,backgroundColor:o,borderColor:n,rowBorderColor:a,stripedColor:r,highlightOnHoverColor:i}){return{"--mantine-datatable-color-light":x(t,e,"light"),"--mantine-datatable-color-dark":x(t,e,"dark"),"--mantine-datatable-background-color-light":x(o,e,"light"),"--mantine-datatable-background-color-dark":x(o,e,"dark"),"--mantine-datatable-border-color-light":x(n,e,"light"),"--mantine-datatable-border-color-dark":x(n,e,"dark"),"--mantine-datatable-row-border-color-light":x(a,e,"light"),"--mantine-datatable-row-border-color-dark":x(a,e,"dark"),"--mantine-datatable-striped-color-light":x(r,e,"light"),"--mantine-datatable-striped-color-dark":x(r,e,"dark"),"--mantine-datatable-highlight-on-hover-color-light":x(i,e,"light"),"--mantine-datatable-highlight-on-hover-color-dark":x(i,e,"dark")}}function bt({theme:e,paginationActiveTextColor:t,paginationActiveBackgroundColor:o}){return{"--mantine-datatable-pagination-active-text-color-light":x(t,e,"light"),"--mantine-datatable-pagination-active-text-color-dark":x(t,e,"dark"),"--mantine-datatable-pagination-active-background-color-light":x(o,e,"light"),"--mantine-datatable-pagination-active-background-color-dark":x(o,e,"dark")}}function aa({theme:e,color:t,backgroundColor:o}){return{"--mantine-datatable-row-color-light":x(t,e,"light"),"--mantine-datatable-row-color-dark":x(t,e,"dark"),"--mantine-datatable-row-background-color-light":x(o,e,"light"),"--mantine-datatable-row-background-color-dark":x(o,e,"dark")}}var Le=require("react/jsx-runtime");function na(){return(0,Le.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Le.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,Le.jsx)("path",{d:"M8 9l4 -4l4 4"}),(0,Le.jsx)("path",{d:"M16 15l-4 4l-4 -4"})]})}var Q=require("react/jsx-runtime"),la={xs:(0,w.rem)(22),sm:(0,w.rem)(26),md:(0,w.rem)(32),lg:(0,w.rem)(38),xl:(0,w.rem)(44)};function ia({size:e,label:t,values:o,value:n,activeTextColor:a,activeBackgroundColor:r,onChange:i}){return(0,Q.jsxs)(w.Group,{gap:"xs",children:[(0,Q.jsx)(w.Text,{size:e,children:t}),(0,Q.jsxs)(w.Menu,{withinPortal:!0,withArrow:!0,classNames:{arrow:"mantine-datatable-page-size-selector-menu-arrow"},children:[(0,Q.jsx)(w.MenuTarget,{children:(0,Q.jsx)(w.Button,{size:e,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:(0,Q.jsx)(na,{}),style:[{fontWeight:"normal"},l=>({height:la[e],paddingLeft:l.spacing[e],paddingRight:l.spacing[e]})],children:n})}),(0,Q.jsx)(w.MenuDropdown,{children:o.map(l=>{let d=l===n;return(0,Q.jsx)(w.MenuItem,{className:(0,ra.default)({"mantine-datatable-page-size-selector-active":d}),style:[{height:la[e]},d&&(a||r)?s=>bt({theme:s,paginationActiveTextColor:a,paginationActiveBackgroundColor:r}):void 0],disabled:d,onClick:()=>i(l),children:(0,Q.jsx)(w.Text,{size:e,children:l})},l)})})]})]})}var Ie=require("react/jsx-runtime"),da=(0,sa.forwardRef)(function({className:t,style:o,fetching:n,page:a,onPageChange:r,paginationWithEdges:i,paginationActiveTextColor:l,paginationActiveBackgroundColor:d,paginationSize:s,loadingText:m,noRecordsText:c,paginationText:u,totalRecords:f,recordsPerPage:y,onRecordsPerPageChange:h,recordsPerPageLabel:b,recordsPerPageOptions:S,recordsLength:p,horizontalSpacing:C,paginationWrapBreakpoint:R,getPaginationControlProps:L},v){let O;if(n)O=m;else if(!f)O=c;else{let I=(a-1)*y+1,Z=I+p-1;O=u({from:I,to:Z,totalRecords:f})}let U=ae(({breakpoints:I})=>`(min-width: ${typeof R=="number"?`${(0,se.rem)(R)}rem`:I[R]||R})`);return(0,Ie.jsxs)(se.Box,{ref:v,px:C??"xs",py:"xs",className:(0,Wt.default)("mantine-datatable-pagination",t),style:[{flexDirection:U?"row":"column"},o],children:[(0,Ie.jsx)(se.Text,{className:"mantine-datatable-pagination-text",size:s,children:O}),S&&(0,Ie.jsx)(ia,{activeTextColor:l,activeBackgroundColor:d,size:s,label:b,values:S,value:y,onChange:h}),(0,Ie.jsx)(se.Pagination,{classNames:{root:(0,Wt.default)("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":n||!p}),control:"mantine-datatable-pagination-pages-control"},style:l||d?I=>bt({theme:I,paginationActiveTextColor:l,paginationActiveBackgroundColor:d}):void 0,withEdges:i,value:a,onChange:r,size:s,total:Math.ceil(f/y),getControlProps:L})]})});var ga=require("@mantine/core"),ha=z(require("clsx"));var ca=require("@mantine/core"),ma=z(require("clsx"));var pa=require("react/jsx-runtime");function ua({className:e,style:t,visibleMediaQuery:o,record:n,index:a,onClick:r,onDoubleClick:i,onContextMenu:l,noWrap:d,ellipsis:s,textAlign:m,width:c,accessor:u,render:f,defaultRender:y,customCellAttributes:h}){return ae(o)?(0,pa.jsx)(ca.TableTd,{className:(0,ma.default)({[Me]:d||s,[ke]:s,[$]:r||i,[dt]:l,[ne]:m==="left",[le]:m==="center",[re]:m==="right"},e),style:[{width:c,minWidth:c,maxWidth:c},t],onClick:r,onDoubleClick:i,onContextMenu:l,...h?.(n,a),children:f?f(n,a):y?y(n,a,u):st(n,u)}):null}var De=require("@mantine/core");var J=require("react/jsx-runtime");function fa({open:e,colSpan:t,content:o,collapseProps:n}){let{expanded:a,visible:r}=yo(e,n?.transitionDuration);return r?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(De.TableTr,{}),(0,J.jsx)(De.TableTr,{children:(0,J.jsx)(De.TableTd,{className:"mantine-datatable-row-expansion-cell",colSpan:t,children:(0,J.jsx)(De.Collapse,{in:a,...n,children:(0,J.jsx)("div",{className:"mantine-datatable-row-expansion-cell-content",children:o()})})})})]}):null}var Tt=require("@mantine/core"),ba=z(require("clsx"));var At=require("react/jsx-runtime");function Ta({className:e,style:t,record:o,index:n,trigger:a,onChange:r,withRightShadow:i,checkboxProps:l,getCheckboxProps:d,...s}){let m={...l,...d(o,n)},c=!s.disabled&&!m.disabled,u=f=>{f.stopPropagation(),a==="cell"&&c&&r?.(f)};return(0,At.jsx)(Tt.TableTd,{className:(0,ba.default)("mantine-datatable-row-selector-cell",{[$]:a==="cell"&&c},e),style:t,"data-shadow-visible":i||void 0,onClick:u,children:(0,At.jsx)(Tt.Checkbox,{classNames:c?{input:$}:void 0,onChange:r,...s,...m})})}var ee=require("react/jsx-runtime");function Ca({record:e,index:t,columns:o,defaultColumnProps:n,defaultColumnRender:a,selectionTrigger:r,selectionVisible:i,selectionChecked:l,onSelectionChange:d,isRecordSelectable:s,selectionCheckboxProps:m,getSelectionCheckboxProps:c,onClick:u,onDoubleClick:f,onContextMenu:y,onCellClick:h,onCellDoubleClick:b,onCellContextMenu:S,expansion:p,customAttributes:C,color:R,backgroundColor:L,className:v,style:O,selectorCellShadowVisible:U,selectionColumnClassName:I,selectionColumnStyle:Z}){return(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)(ga.TableTr,{className:(0,ha.default)("mantine-datatable-row",{[$]:u||f||p?.expandOnClick},{[dt]:y},typeof v=="function"?v(e,t):v),"data-selected":l||void 0,onClick:M=>{if(p){let{isRowExpanded:g,expandOnClick:P,expandRow:W,collapseRow:B}=p;P&&(g(e)?B(e):W(e))}u?.({event:M,record:e,index:t})},onDoubleClick:f?M=>f({event:M,record:e,index:t}):void 0,onContextMenu:y?M=>y({event:M,record:e,index:t}):void 0,style:[R||L?M=>{let g=R?.(e,t),P=L?.(e,t);return aa({theme:M,color:g,backgroundColor:P})}:void 0,O?.(e,t)],...C?.(e,t),children:[i&&(0,ee.jsx)(Ta,{className:I,style:Z,record:e,index:t,trigger:r,withRightShadow:U,checked:l,disabled:!d||(s?!s(e,t):!1),onChange:d,checkboxProps:m,getCheckboxProps:c}),o.map(({hidden:M,...g},P)=>{if(M)return null;let{accessor:W,visibleMediaQuery:B,textAlign:E,noWrap:ce,ellipsis:Y,width:He,render:Oe,cellsClassName:me,cellsStyle:We,customCellAttributes:Ae}={...n,...g};return(0,ee.jsx)(ua,{className:typeof me=="function"?me(e,t):me,style:We?.(e,t),visibleMediaQuery:B,record:e,index:t,onClick:h?q=>h({event:q,record:e,index:t,column:g,columnIndex:P}):void 0,onDoubleClick:b?q=>b({event:q,record:e,index:t,column:g,columnIndex:P}):void 0,onContextMenu:S?q=>S({event:q,record:e,index:t,column:g,columnIndex:P}):void 0,accessor:W,textAlign:E,noWrap:ce,ellipsis:Y,width:He,render:Oe,defaultRender:a,customCellAttributes:Ae},W)})]}),p&&(0,ee.jsx)(fa,{colSpan:o.filter(({hidden:M})=>!M).length+(i?1:0),open:p.isRowExpanded(e),content:p.content({record:e,index:t}),collapseProps:p.collapseProps})]})}var de=require("@mantine/core"),Je=z(require("clsx")),we=require("react/jsx-runtime");function ya({topShadowVisible:e,leftShadowVisible:t,leftShadowBehind:o,rightShadowVisible:n,rightShadowBehind:a,bottomShadowVisible:r,headerHeight:i,footerHeight:l,onScrollPositionChange:d,children:s,viewportRef:m,scrollAreaProps:c}){return(0,we.jsxs)(de.ScrollArea,{...c,viewportRef:m,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:d,children:[s,(0,we.jsx)(de.Box,{className:(0,Je.default)("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow",{"mantine-datatable-scroll-area-shadow-visible":e}),style:{top:i?(0,de.rem)(i):0}}),(0,we.jsx)("div",{className:(0,Je.default)("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-visible":t,"mantine-datatable-scroll-area-shadow-behind":o})}),(0,we.jsx)("div",{className:(0,Je.default)("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-visible":n,"mantine-datatable-scroll-area-shadow-behind":a})}),(0,we.jsx)(de.Box,{className:(0,Je.default)("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow",{"mantine-datatable-scroll-area-shadow-visible":r}),style:{bottom:l?(0,de.rem)(l+1):0}})]})}var A=require("react/jsx-runtime");function Da({withTableBorder:e,borderRadius:t,textSelectionDisabled:o,height:n="100%",minHeight:a,shadow:r,verticalAlign:i="center",fetching:l,columns:d,storeColumnsKey:s,groups:m,pinFirstColumn:c,pinLastColumn:u,defaultColumnProps:f,defaultColumnRender:y,idAccessor:h="id",records:b,selectionTrigger:S="checkbox",selectedRecords:p,onSelectedRecordsChange:C,selectionColumnClassName:R,selectionColumnStyle:L,isRecordSelectable:v,selectionCheckboxProps:O,allRecordsSelectionCheckboxProps:U={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:I=(F,ue)=>({"aria-label":`Select record ${ue+1}`}),sortStatus:Z,sortIcons:M,onSortStatusChange:g,horizontalSpacing:P,page:W,onPageChange:B,totalRecords:E,recordsPerPage:ce,onRecordsPerPageChange:Y,recordsPerPageOptions:He,recordsPerPageLabel:Oe="Records per page",paginationWithEdges:me,paginationActiveTextColor:We,paginationActiveBackgroundColor:Ae,paginationSize:q="sm",paginationText:ht=({from:F,to:ue,totalRecords:pe})=>`${F} - ${ue} / ${pe}`,paginationWrapBreakpoint:Ct="sm",getPaginationControlProps:yt=F=>F==="previous"?{"aria-label":"Previous page"}:F==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:wa,customLoader:Sa,loaderSize:Pa,loaderType:xa,loaderColor:va,loadingText:Ma="...",emptyState:ka,noRecordsText:Ft="No records",noRecordsIcon:Ra,highlightOnHover:Ea,striped:Na,noHeader:La,onRowClick:Ia,onRowDoubleClick:Ha,onRowContextMenu:Oa,onCellClick:Wa,onCellDoubleClick:Aa,onCellContextMenu:za,onScroll:_t,onScrollToTop:Bt,onScrollToBottom:Gt,onScrollToLeft:Xt,onScrollToRight:Qt,c:Va,backgroundColor:Fa,borderColor:_a,rowBorderColor:Ba,stripedColor:Ga,highlightOnHoverColor:Xa,rowColor:Qa,rowBackgroundColor:Ua,rowExpansion:$a,rowClassName:Ka,rowStyle:Ja,customRowAttributes:Za,scrollViewportRef:Ya,scrollAreaProps:qa,tableRef:ja,bodyRef:en,m:tn,my:on,mx:an,mt:nn,mb:ln,ml:rn,mr:sn,className:dn,classNames:ze,style:cn,styles:Ve,...mn}){let{ref:F,width:ue,height:pe}=Te(),Fe=(0,_.useMemo)(()=>m?.flatMap(T=>T.columns)??d,[d,m]),Ut=lt({key:s,columns:Fe}),{ref:un,height:Dt}=Te(),{ref:pn,width:wt,height:_e}=Te(),{ref:fn,height:bn}=Te(),{ref:Tn,height:$t}=Te(),{ref:gn,width:hn}=Te(),Cn=(0,zt.useMergedRef)(pn,ja),[St,Kt]=(0,_.useState)(!0),[Pt,Jt]=(0,_.useState)(!0),[Be,Zt]=(0,_.useState)(!0),[Ze,Yt]=(0,_.useState)(!0),yn=Co({rowExpansion:$a,records:b,idAccessor:h}),Ye=(0,_.useCallback)(()=>{let T=F.current?.scrollTop||0,te=F.current?.scrollLeft||0;if(l||_e<=pe)Kt(!0),Jt(!0);else{let G=T===0,X=_e-T-pe<1;Kt(G),Jt(X),G&&G!==St&&Bt?.(),X&&X!==Pt&&Gt?.()}if(l||wt===ue)Zt(!0),Yt(!0);else{let G=te===0,X=wt-te-ue<1;Zt(G),Yt(X),G&&G!==Be&&Xt?.(),X&&X!==Ze&&Qt?.()}},[l,Gt,Xt,Qt,Bt,pe,F,ue,Pt,Be,Ze,St,_e,wt]);mo(Ye,[Ye]);let Dn=(0,_.useCallback)(T=>{_t?.(T),Ye()},[Ye,_t]),wn=(0,_.useCallback)(T=>{F.current?.scrollTo({top:0,left:0}),B(T)},[B,F]),qe=b?.length,qt=b?.map(T=>k(T,h)),Se=!!p,Ge=p?.map(T=>k(T,h)),jt=qt!==void 0&&Ge!==void 0&&Ge.length>0,xt=v?b?.filter(v):b,je=xt?.map(T=>k(T,h)),et=jt&&je.every(T=>Ge.includes(T)),Sn=jt&&je.some(T=>Ge.includes(T)),Pn=(0,_.useCallback)(()=>{p&&C&&C(et?p.filter(T=>!je.includes(k(T,h))):Xe([...p,...xt],T=>k(T,h)))},[et,h,C,je,xt,p]),{lastSelectionChangeIndex:tt,setLastSelectionChangeIndex:xn}=uo(qt),vt=Se&&!Be&&!c;return(0,A.jsx)(kt,{...Ut,children:(0,A.jsxs)(gt.Box,{...{m:tn,my:on,mx:an,mt:nn,mb:ln,ml:rn,mr:sn},className:(0,Vt.default)("mantine-datatable",{"mantine-datatable-with-border":e},dn,ze?.root),style:[T=>({...oa({theme:T,c:Va,backgroundColor:Fa,borderColor:_a,rowBorderColor:Ba,stripedColor:Ga,highlightOnHoverColor:Xa}),borderRadius:T.radius[t]||t,boxShadow:T.shadows[r]||r,height:n,minHeight:a}),cn,Ve?.root],children:[(0,A.jsx)(ya,{viewportRef:(0,zt.useMergedRef)(F,Ya),topShadowVisible:!St,leftShadowVisible:!Be,leftShadowBehind:Se||!!c,rightShadowVisible:!Ze,rightShadowBehind:u,bottomShadowVisible:!Pt,headerHeight:Dt,footerHeight:bn,onScrollPositionChange:Dn,scrollAreaProps:qa,children:(0,A.jsxs)(gt.Table,{ref:Cn,horizontalSpacing:P,className:(0,Vt.default)("mantine-datatable-table",{[Do]:o,"mantine-datatable-vertical-align-top":i==="top","mantine-datatable-vertical-align-bottom":i==="bottom","mantine-datatable-last-row-border-bottom-visible":_e<pe,"mantine-datatable-pin-last-column":u,"mantine-datatable-pin-last-column-scrolled":!Ze&&u,"mantine-datatable-selection-column-visible":Se,"mantine-datatable-pin-first-column":c,"mantine-datatable-pin-first-column-scrolled":!Be&&c},ze?.table),style:{...Ve?.table,"--mantine-datatable-selection-column-width":`${hn}px`},"data-striped":qe&&Na||void 0,"data-highlight-on-hover":Ea||void 0,...mn,children:[La?null:(0,A.jsx)(kt,{...Ut,children:(0,A.jsx)(qo,{ref:un,selectionColumnHeaderRef:gn,className:ze?.header,style:Ve?.header,columns:Fe,defaultColumnProps:f,groups:m,sortStatus:Z,sortIcons:M,onSortStatusChange:g,selectionTrigger:S,selectionVisible:Se,selectionChecked:et,selectionIndeterminate:Sn&&!et,onSelectionChange:Pn,selectionCheckboxProps:{...O,...U},selectorCellShadowVisible:vt,selectionColumnClassName:R,selectionColumnStyle:L})}),(0,A.jsx)("tbody",{ref:en,children:qe?b.map((T,te)=>{let G=k(T,h),X=Ge?.includes(G)||!1,eo;return C&&p&&(eo=vn=>{if(vn.nativeEvent.shiftKey&&tt!==null){let Pe=b.filter(te>tt?(fe,be)=>be>=tt&&be<=te&&(v?v(fe,be):!0):(fe,be)=>be>=te&&be<=tt&&(v?v(fe,be):!0));C(X?Nt(p,Pe,fe=>k(fe,h)):Xe([...p,...Pe],fe=>k(fe,h)))}else C(X?p.filter(Pe=>k(Pe,h)!==G):Xe([...p,T],Pe=>k(Pe,h)));xn(te)}),(0,A.jsx)(Ca,{record:T,index:te,columns:Fe,defaultColumnProps:f,defaultColumnRender:y,selectionTrigger:S,selectionVisible:Se,selectionChecked:X,onSelectionChange:eo,isRecordSelectable:v,selectionCheckboxProps:O,getSelectionCheckboxProps:I,onClick:Ia,onDoubleClick:Ha,onCellClick:Wa,onCellDoubleClick:Aa,onContextMenu:Oa,onCellContextMenu:za,expansion:yn,color:Qa,backgroundColor:Ua,className:Ka,style:Ja,customAttributes:Za,selectorCellShadowVisible:vt,selectionColumnClassName:R,selectionColumnStyle:L},G)}):(0,A.jsx)(lo,{})}),Fe.some(({footer:T})=>T)&&(0,A.jsx)(No,{ref:fn,className:ze?.footer,style:Ve?.footer,columns:Fe,defaultColumnProps:f,selectionVisible:Se,selectorCellShadowVisible:vt,scrollDiff:_e-pe})]})}),W&&(0,A.jsx)(da,{ref:Tn,className:ze?.pagination,style:Ve?.pagination,horizontalSpacing:P,fetching:l,page:W,onPageChange:wn,totalRecords:E,recordsPerPage:ce,onRecordsPerPageChange:Y,recordsPerPageOptions:He,recordsPerPageLabel:Oe,paginationWithEdges:me,paginationActiveTextColor:We,paginationActiveBackgroundColor:Ae,paginationSize:q,paginationText:ht,paginationWrapBreakpoint:Ct,getPaginationControlProps:yt,noRecordsText:Ft,loadingText:Ma,recordsLength:qe}),(0,A.jsx)(ea,{pt:Dt,pb:$t,fetching:l,backgroundBlur:wa,customContent:Sa,size:Pa,type:xa,color:va}),(0,A.jsx)(io,{pt:Dt,pb:$t,icon:Ra,text:Ft,active:!l&&!qe,children:ka})]})})}0&&(module.exports={DataTable,differenceBy,getRecordId,getValueAtPath,humanize,uniqBy,useDataTableColumns,useDragToggleColumns}); | ||
"use strict";"use client";var Mn=Object.create;var ot=Object.defineProperty;var kn=Object.getOwnPropertyDescriptor;var Rn=Object.getOwnPropertyNames;var En=Object.getPrototypeOf,Nn=Object.prototype.hasOwnProperty;var Ln=(e,t)=>{for(var o in t)ot(e,o,{get:t[o],enumerable:!0})},to=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Rn(t))!Nn.call(e,a)&&a!==o&&ot(e,a,{get:()=>t[a],enumerable:!(n=kn(t,a))||n.enumerable});return e};var z=(e,t,o)=>(o=e!=null?Mn(En(e)):{},to(t||!e||!e.__esModule?ot(o,"default",{value:e,enumerable:!0}):o,e)),In=e=>to(ot({},"__esModule",{value:!0}),e);var An={};Ln(An,{DataTable:()=>Da,differenceBy:()=>Nt,getRecordId:()=>k,getValueAtPath:()=>st,humanize:()=>ge,uniqBy:()=>Xe,useDataTableColumns:()=>lt,useDragToggleColumns:()=>Hn});module.exports=In(An);var gt=require("@mantine/core"),zt=require("@mantine/hooks"),Vt=z(require("clsx")),_=require("react");var Mt=require("react");var oo=require("@mantine/core"),[ao,xe]=(0,oo.createSafeContext)("useDataTableColumnsContext must be used within DataTableColumnProvider");var no=require("react/jsx-runtime"),kt=e=>{let{children:t,columnsOrder:o,setColumnsOrder:n,columnsToggle:a,setColumnsToggle:r,resetColumnsOrder:i,resetColumnsToggle:l,setColumnWidth:d,resetColumnsWidth:s}=e,[m,c]=(0,Mt.useState)(""),[u,f]=(0,Mt.useState)("");return(0,no.jsx)(ao,{value:{sourceColumn:m,setSourceColumn:c,targetColumn:u,setTargetColumn:f,columnsToggle:a,setColumnsToggle:r,swapColumns:()=>{if(!o||!n||!m||!u)return;let h=o.indexOf(m),b=o.indexOf(u);if(h!==-1&&b!==-1){let S=o.splice(h,1)[0];o.splice(b,0,S),n([...o])}},resetColumnsOrder:i,resetColumnsToggle:l,setColumnWidth:d,resetColumnsWidth:s},children:t})};var Rt=require("react/jsx-runtime");function lo(){return(0,Rt.jsx)("tr",{className:"mantine-datatable-empty-row",children:(0,Rt.jsx)("td",{})})}var at=require("@mantine/core");var oe=require("react/jsx-runtime");function ro(){return(0,oe.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,oe.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,oe.jsx)("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"}),(0,oe.jsx)("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"}),(0,oe.jsx)("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),(0,oe.jsx)("path",{d:"M3 3l18 18"})]})}var j=require("react/jsx-runtime");function io({icon:e,text:t,pt:o,pb:n,active:a,children:r}){return(0,j.jsx)(at.Center,{pt:o,pb:n,className:"mantine-datatable-empty-state","data-active":a||void 0,children:r||(0,j.jsxs)(j.Fragment,{children:[e||(0,j.jsx)("div",{className:"mantine-datatable-empty-state-icon",children:(0,j.jsx)(ro,{})}),(0,j.jsx)(at.Text,{size:"sm",c:"dimmed",children:t})]})})}var Ee=require("@mantine/core"),Ro=z(require("clsx")),Eo=require("react");var wo=require("@mantine/core"),So=z(require("clsx"));var nt=require("@mantine/hooks"),so=require("react"),lt=({key:e,columns:t=[]})=>{let o=t&&t.map(b=>b.accessor)||[],n=t&&t.map(b=>({[b.accessor]:b.width??"initial"}))||[],a=t&&t.map(b=>({accessor:b.accessor,defaultToggle:b.defaultToggle||!0,toggleable:b.toggleable,toggled:b.defaultToggle===void 0?!0:b.defaultToggle})),[r,i]=(0,nt.useLocalStorage)({key:`${e}-columns-order`,defaultValue:o,getInitialValueInEffect:!0}),[l,d]=(0,nt.useLocalStorage)({key:`${e}-columns-toggle`,defaultValue:a,getInitialValueInEffect:!0}),[s,m]=(0,nt.useLocalStorage)({key:`${e}-columns-width`,defaultValue:n,getInitialValueInEffect:!0}),c=()=>i(o),u=()=>{d(a)},f=()=>m(n);return{effectiveColumns:(0,so.useMemo)(()=>r?r.map(p=>t.find(C=>C.accessor===p)).map(p=>({...p,hidden:!l.find(C=>C.accessor===p?.accessor)?.toggled})).map(p=>({...p,width:s.find(C=>C[p?.accessor])?.[p?.accessor]})):t,[t,r,l,s]),setColumnsOrder:i,columnsOrder:r,resetColumnsOrder:c,columnsToggle:l,setColumnsToggle:d,resetColumnsToggle:u,columnsWidth:s,setColumnsWidth:m,setColumnWidth:(b,S)=>{let p=s.map(C=>C[b]?{[b]:S}:C);m(p)},resetColumnsWidth:f}},Hn=lt;var co=require("@mantine/hooks");function Te(){let[e]=(0,co.useResizeObserver)(),{width:t,height:o}=e.current?.getBoundingClientRect()||{width:0,height:0};return{ref:e,width:t,height:o}}var rt=require("react"),mo=typeof window<"u"?rt.useLayoutEffect:rt.useEffect;var it=require("react");function uo(e){let[t,o]=(0,it.useState)(null),n=e?.join(":")||"";return(0,it.useEffect)(()=>{o(null)},[n]),{lastSelectionChangeIndex:t,setLastSelectionChangeIndex:o}}var ve=require("react");function On(e,t){let o=()=>{t(e.map(a=>a.matches))},n=e.map(a=>{try{return a.addEventListener("change",o),()=>a.removeEventListener("change",o)}catch{return a.addListener(o),()=>a.removeListener(o)}});return()=>{n.forEach(a=>a())}}function Wn(e,t){return t||(typeof window<"u"&&"matchMedia"in window?e.map(o=>window.matchMedia(o).matches):e.map(()=>!1))}function po(e,t,{getInitialValueInEffect:o}={getInitialValueInEffect:!0}){let[n,a]=(0,ve.useState)(o?t:Wn(e,t)),r=(0,ve.useRef)();return(0,ve.useEffect)(()=>{if("matchMedia"in window)return r.current=e.map(i=>window.matchMedia(i)),a(r.current.map(i=>i.matches)),On(r.current,i=>{a(i)})},[e]),n}var fo=require("@mantine/core"),Et=require("react");function bo(e){let t=(0,fo.useMantineTheme)(),o=(0,Et.useMemo)(()=>e.map(a=>(typeof a=="function"?a(t):a)??""),[e,t]),n=(0,Et.useMemo)(()=>e.map(()=>!0),[e]);return po(o,n)}var To=require("@mantine/core"),go=require("@mantine/hooks");function ae(e){let t=(0,To.useMantineTheme)(),o=typeof e=="function"?e(t):e;return(0,go.useMediaQuery)(o||"",!0)}var ho=require("react");function ge(e){let t=e.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${t.charAt(0).toUpperCase()}${t.slice(1)}`}function Nt(e,t,o){return e.filter(n=>!t.map(o).includes(o(n)))}function Xe(e,t){return e.filter((o,n,a)=>n===a.findIndex(r=>t(o)===t(r)))}function st(e,t){return t?t.match(/([^[.\]])+/g).reduce((n,a)=>n&&n[a],e):void 0}function k(e,t){return typeof t=="string"?st(e,t):t(e)}function Co({rowExpansion:e,records:t,idAccessor:o}){let n=[];if(e&&t){let{trigger:l,allowMultiple:d,initiallyExpanded:s}=e;t&&l==="always"?n=t.map(m=>k(m,o)):s&&(n=t.filter((m,c)=>s({record:m,index:c})).map(m=>k(m,o)),d||(n=[n[0]]))}let a,r,i=(0,ho.useState)(n);if(e){let{trigger:l,allowMultiple:d,collapseProps:s,content:m}=e;e.expanded?{recordIds:a,onRecordIdsChange:r}=e.expanded:[a,r]=i;let c=u=>r?.(a.filter(f=>f!==k(u,o)));return{expandOnClick:l!=="always"&&l!=="never",isRowExpanded:u=>l==="always"?!0:a.includes(k(u,o)),expandRow:u=>{let f=k(u,o);r?.(d?[...a,f]:[f])},collapseRow:c,collapseProps:s,content:({record:u,index:f})=>()=>m({record:u,index:f,collapse:()=>c(u)})}}}var Lt=require("@mantine/hooks"),Qe=require("react");function yo(e,t){let[o,n]=(0,Qe.useState)(e),[a,r]=(0,Qe.useState)(e),i=(0,Lt.useTimeout)(()=>n(!0),0),l=(0,Lt.useTimeout)(()=>r(!1),t||200);return(0,Qe.useEffect)(()=>{e?(l.clear(),r(!0),i.start()):(i.clear(),n(!1),l.start())},[i,l,e]),{expanded:o,visible:a}}var Me="mantine-datatable-nowrap",ke="mantine-datatable-ellipsis",$="mantine-datatable-pointer-cursor",dt="mantine-datatable-context-menu-cursor",Do="mantine-datatable-text-selection-disabled",ne="mantine-datatable-text-align-left",le="mantine-datatable-text-align-center",re="mantine-datatable-text-align-right";var xo=require("react/jsx-runtime");function Po({className:e,style:t,visibleMediaQuery:o,title:n,noWrap:a,ellipsis:r,textAlign:i,width:l}){return ae(o)?(0,xo.jsx)(wo.TableTh,{className:(0,So.default)({[Me]:a||r,[ke]:r,[ne]:i==="left",[le]:i==="center",[re]:i==="right"},e),style:[{width:l,minWidth:l,maxWidth:l},t],children:n}):null}var vo=require("@mantine/core"),ko=require("react/jsx-runtime");function Mo({shadowVisible:e}){return(0,ko.jsx)(vo.TableTh,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":e||void 0})}var Re=require("react/jsx-runtime"),No=(0,Eo.forwardRef)(function({className:t,style:o,columns:n,defaultColumnProps:a,selectionVisible:r,selectorCellShadowVisible:i,scrollDiff:l},d){let s=l<0;return(0,Re.jsx)(Ee.TableTfoot,{ref:d,className:(0,Ro.default)("mantine-datatable-footer",t),style:[{position:s?"relative":"sticky",bottom:(0,Ee.rem)(s?l:0)},o],children:(0,Re.jsxs)(Ee.TableTr,{children:[r&&(0,Re.jsx)(Mo,{shadowVisible:i}),n.map(({hidden:m,...c})=>{if(m)return null;let{accessor:u,visibleMediaQuery:f,textAlign:y,width:h,footer:b,footerClassName:S,footerStyle:p,noWrap:C,ellipsis:R}={...a,...c};return(0,Re.jsx)(Po,{className:S,style:p,visibleMediaQuery:f,textAlign:y,width:h,title:b,noWrap:C,ellipsis:R},u)})]})})});var L=require("@mantine/core"),Yo=z(require("clsx")),pt=require("react");var Lo=require("@mantine/core"),Io=z(require("clsx")),It=require("react");var Oo=require("react/jsx-runtime");function Ho({group:{id:e,columns:t,title:o,textAlign:n,className:a,style:r}}){let i=(0,It.useMemo)(()=>t.map(({visibleMediaQuery:s})=>s),[t]),l=bo(i),d=(0,It.useMemo)(()=>t.filter(({hidden:s},m)=>!s&&l?.[m]).length,[t,l]);return d>0?(0,Oo.jsx)(Lo.TableTh,{colSpan:d,className:(0,Io.default)("mantine-datatable-column-group-header-cell",{[ne]:n==="left",[le]:n==="center",[re]:n==="right"},a),style:r,children:o??ge(e)}):null}var H=require("@mantine/core"),Ke=z(require("clsx")),mt=require("react");var ie=require("@mantine/core"),zo=require("@mantine/hooks");var Ue=require("react/jsx-runtime");function Wo(){return(0,Ue.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ue.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,Ue.jsx)("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}var $e=require("react/jsx-runtime");function Ao(){return(0,$e.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$e.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,$e.jsx)("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}var he=require("react/jsx-runtime");function Vo({children:e,isActive:t}){let[o,{close:n,toggle:a}]=(0,zo.useDisclosure)(!1);return(0,he.jsxs)(ie.Popover,{withArrow:!0,withinPortal:!0,shadow:"md",opened:o,onClose:n,trapFocus:!0,children:[(0,he.jsx)(ie.PopoverTarget,{children:(0,he.jsx)(ie.ActionIcon,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":t||void 0,size:"sm",variant:"default",onClick:i=>{i.preventDefault(),a()},children:(0,he.jsx)(t?Ao:Wo,{})})}),(0,he.jsx)(ie.PopoverDropdown,{onClick:i=>i.stopPropagation(),children:typeof e=="function"?e({close:n}):e})]})}var Fo=require("@mantine/core"),ct=require("react");var Bo=require("react/jsx-runtime"),_o=e=>{let{accessor:t,columnRef:o}=e,n=(0,ct.useRef)(null),[a,r]=(0,ct.useState)(0),{setColumnWidth:i}=xe(),l=c=>{c.preventDefault(),c.stopPropagation(),document.addEventListener("mousemove",d),document.addEventListener("mouseup",s),document.body.style.cursor="col-resize"},d=c=>{if(!o.current)return;let u=c.clientX-o.current.getBoundingClientRect().right,y=`${o.current.getBoundingClientRect().width+u}px`;o.current.style.width=y,i(t,o.current.style.width),r(-u)},s=()=>{o.current&&(document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s),document.body.style.cursor="initial",i(t,o.current.style.width),r(0))};return(0,Bo.jsx)("div",{ref:n,onClick:c=>c.stopPropagation(),onMouseDown:l,onDoubleClick:()=>{o.current&&(o.current.style.maxWidth="initial",o.current.style.minWidth="initial",o.current.style.width="initial",i(t,"initial"))},className:"mantine-datatable-header-resizable-handle",style:{right:(0,Fo.rem)(a)}})};var Ce=require("react/jsx-runtime");function Go(){return(0,Ce.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ce.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,Ce.jsx)("path",{d:"M12 5l0 14"}),(0,Ce.jsx)("path",{d:"M16 9l-4 -4"}),(0,Ce.jsx)("path",{d:"M8 9l4 -4"})]})}var ye=require("react/jsx-runtime");function Xo(){return(0,ye.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,ye.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,ye.jsx)("path",{d:"M8 7l4 -4l4 4"}),(0,ye.jsx)("path",{d:"M8 17l4 4l4 -4"}),(0,ye.jsx)("path",{d:"M12 3l0 18"})]})}var K=require("react/jsx-runtime");function Qo(){return(0,K.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,K.jsx)("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,K.jsx)("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,K.jsx)("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,K.jsx)("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,K.jsx)("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,K.jsx)("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}var Ne=require("react/jsx-runtime");function Uo(){return(0,Ne.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ne.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,Ne.jsx)("path",{d:"M18 6l-12 12"}),(0,Ne.jsx)("path",{d:"M6 6l12 12"})]})}var D=require("react/jsx-runtime");function $o({className:e,style:t,accessor:o,visibleMediaQuery:n,title:a,sortable:r,draggable:i,toggleable:l,resizable:d,sortIcons:s,textAlign:m,width:c,sortStatus:u,onSortStatusChange:f,filter:y,filtering:h}){let{setSourceColumn:b,setTargetColumn:S,swapColumns:p,setColumnsToggle:C}=xe(),[R,I]=(0,mt.useState)(!1),v=(0,mt.useRef)(null);if(!ae(n))return null;let O=a??ge(o),U=typeof O=="string"?O:void 0,E=r&&f?N=>{N?.defaultPrevented||f({columnAccessor:o,direction:u?.columnAccessor===o?u.direction==="asc"?"desc":"asc":u?.direction??"asc"})}:void 0,Z=N=>{N.stopPropagation(),b(o),I(!1)},M=N=>{N.preventDefault(),S(o),I(!0)},g=()=>{S(o),I(!1),p()},P=()=>{I(!0)},W=()=>{I(!1)},B=N=>{N.stopPropagation(),C(ce=>ce.map(Y=>Y.accessor===o?{...Y,toggled:!1}:Y))};return(0,D.jsxs)(H.TableTh,{className:(0,Ke.default)({"mantine-datatable-header-cell-sortable":r,"mantine-datatable-header-cell-toggleable":l,"mantine-datatable-header-cell-resizable":d},e),style:[{width:c,...d?{minWidth:"1px"}:{minWidth:c,maxWidth:c}},t],role:r?"button":void 0,tabIndex:r?0:void 0,onClick:E,onKeyDown:N=>N.key==="Enter"&&E?.(),ref:v,children:[(0,D.jsxs)(H.Group,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[(0,D.jsxs)(H.Flex,{align:"center",w:"100%",className:(0,Ke.default)({"mantine-datatable-header-cell-draggable":i,"mantine-datatable-header-cell-drag-over":R}),draggable:i,onDragStart:i?Z:void 0,onDragEnter:i?P:void 0,onDragOver:i?M:void 0,onDrop:i?g:void 0,onDragLeave:i?W:void 0,children:[i?(0,D.jsx)(H.Center,{role:"img","aria-label":"Drag column",children:(0,D.jsx)(H.ActionIcon,{className:"mantine-datatable-header-cell-draggable-action-icon",variant:"subtle",size:"xs",onClick:N=>{N.stopPropagation()},children:(0,D.jsx)(Qo,{})})}):null,(0,D.jsx)(H.Box,{className:(0,Ke.default)("mantine-datatable-header-cell-sortable-text",{[ne]:m==="left",[le]:m==="center",[re]:m==="right"},Me,ke),title:U,children:O})]}),l?(0,D.jsx)(H.Center,{className:"mantine-datatable-header-cell-toggleable-icon",role:"img","aria-label":"Toggle column",children:(0,D.jsx)(H.ActionIcon,{size:"xs",variant:"light",onClick:B,children:(0,D.jsx)(Uo,{})})}):null,r||u?.columnAccessor===o?(0,D.jsx)(D.Fragment,{children:u?.columnAccessor===o?(0,D.jsx)(H.Center,{className:(0,Ke.default)("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":u.direction==="desc"}),role:"img","aria-label":`Sorted ${u.direction==="desc"?"descending":"ascending"}`,children:s?.sorted||(0,D.jsx)(Go,{})}):(0,D.jsx)(H.Center,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:s?.unsorted||(0,D.jsx)(Xo,{})})}):null,y?(0,D.jsx)(Vo,{isActive:!!h,children:y}):null]}),d?(0,D.jsx)(_o,{accessor:o,columnRef:v}):null]})}var ut=require("@mantine/core"),Ko=z(require("clsx")),Jo=require("react");var Ht=require("react/jsx-runtime"),Zo=(0,Jo.forwardRef)(function({className:t,style:o,trigger:n,shadowVisible:a,checked:r,indeterminate:i,checkboxProps:l,onChange:d,rowSpan:s},m){let c=!l.disabled;return(0,Ht.jsx)(ut.TableTh,{ref:m,className:(0,Ko.default)("mantine-datatable-header-selector-cell",{[$]:n==="cell"&&c},t),style:o,rowSpan:s,"data-shadow-visible":a||void 0,onClick:n==="cell"&&c?d:void 0,children:(0,Ht.jsx)(ut.Checkbox,{classNames:c?{input:$}:void 0,checked:r,indeterminate:i,onChange:d,...l,disabled:!(d||l.onChange)||l.disabled})})});var V=require("react/jsx-runtime"),qo=(0,pt.forwardRef)(function({selectionColumnHeaderRef:t,className:o,style:n,sortStatus:a,sortIcons:r,onSortStatusChange:i,columns:l,defaultColumnProps:d,groups:s,selectionTrigger:m,selectionVisible:c,selectionChecked:u,selectionIndeterminate:f,onSelectionChange:y,selectionCheckboxProps:h,selectorCellShadowVisible:b,selectionColumnClassName:S,selectionColumnStyle:p},C){let R=c?(0,V.jsx)(Zo,{ref:t,className:S,style:p,trigger:m,shadowVisible:b,checked:u,indeterminate:f,checkboxProps:h,onChange:y,rowSpan:s?2:void 0}):null,{columnsToggle:I,setColumnsToggle:v}=xe(),[O,U]=(0,pt.useState)(!1),E=l.some(g=>g.toggleable),Z=E?Object.fromEntries(l.map(({accessor:g,title:P})=>[g,P??ge(String(g))])):void 0,M=(0,V.jsxs)(L.TableThead,{className:(0,Yo.default)("mantine-datatable-header",o),style:n,ref:C,onContextMenu:E?g=>{g.preventDefault(),U(P=>!P)}:void 0,children:[s&&(0,V.jsxs)(L.TableTr,{children:[R,s.map(g=>(0,V.jsx)(Ho,{group:g},g.id))]}),(0,V.jsxs)(L.TableTr,{children:[!s&&R,l.map(({hidden:g,...P},W)=>{if(g)return null;let{accessor:B,visibleMediaQuery:N,textAlign:ce,width:Y,title:He,sortable:Oe,draggable:me,toggleable:We,resizable:Ae,titleClassName:q,titleStyle:ht,filter:Ct,filtering:yt}={...d,...P};return(0,V.jsx)($o,{accessor:B,className:q,style:ht,visibleMediaQuery:N,textAlign:ce,width:Y,title:He,sortable:Oe,draggable:me,toggleable:We,resizable:Ae&&W<l.length-1,sortStatus:a,sortIcons:r,onSortStatusChange:i,filter:Ct,filtering:yt},B)})]})]});return E?(0,V.jsxs)(L.Popover,{position:"bottom",withArrow:!0,shadow:"md",opened:O,onChange:U,children:[(0,V.jsx)(L.PopoverTarget,{children:M}),(0,V.jsx)(L.PopoverDropdown,{children:(0,V.jsx)(L.Stack,{children:I.filter(g=>g.toggleable).map(g=>(0,V.jsx)(L.Group,{children:(0,V.jsx)(L.Checkbox,{classNames:{label:"mantine-datatable-header-column-toggle-checkbox-label"},size:"xs",label:Z[g.accessor],checked:g.toggled,onChange:P=>{v(I.map(W=>W.accessor===g.accessor?{...W,toggled:P.currentTarget.checked}:W))}})},g.accessor))})})]}):M});var ft=require("@mantine/core"),jo=z(require("clsx")),Ot=require("react/jsx-runtime");function ea({pt:e,pb:t,fetching:o,customContent:n,backgroundBlur:a,size:r,type:i,color:l}){return(0,Ot.jsx)(ft.Center,{pt:e,pb:t,className:(0,jo.default)("mantine-datatable-loader",{"mantine-datatable-loader-fetching":o}),style:[{backdropFilter:a?`blur(${a}px)`:void 0}],children:o&&(n||(0,Ot.jsx)(ft.Loader,{size:r,type:i,color:l}))})}var se=require("@mantine/core"),Wt=z(require("clsx")),sa=require("react");var w=require("@mantine/core"),ra=z(require("clsx"));var ta=require("@mantine/core");function x(e,t,o){return e?(0,ta.parseThemeColor)({color:typeof e=="object"?e[o]:e,theme:t}).value:void 0}function oa({theme:e,c:t,backgroundColor:o,borderColor:n,rowBorderColor:a,stripedColor:r,highlightOnHoverColor:i}){return{"--mantine-datatable-color-light":x(t,e,"light"),"--mantine-datatable-color-dark":x(t,e,"dark"),"--mantine-datatable-background-color-light":x(o,e,"light"),"--mantine-datatable-background-color-dark":x(o,e,"dark"),"--mantine-datatable-border-color-light":x(n,e,"light"),"--mantine-datatable-border-color-dark":x(n,e,"dark"),"--mantine-datatable-row-border-color-light":x(a,e,"light"),"--mantine-datatable-row-border-color-dark":x(a,e,"dark"),"--mantine-datatable-striped-color-light":x(r,e,"light"),"--mantine-datatable-striped-color-dark":x(r,e,"dark"),"--mantine-datatable-highlight-on-hover-color-light":x(i,e,"light"),"--mantine-datatable-highlight-on-hover-color-dark":x(i,e,"dark")}}function bt({theme:e,paginationActiveTextColor:t,paginationActiveBackgroundColor:o}){return{"--mantine-datatable-pagination-active-text-color-light":x(t,e,"light"),"--mantine-datatable-pagination-active-text-color-dark":x(t,e,"dark"),"--mantine-datatable-pagination-active-background-color-light":x(o,e,"light"),"--mantine-datatable-pagination-active-background-color-dark":x(o,e,"dark")}}function aa({theme:e,color:t,backgroundColor:o}){return{"--mantine-datatable-row-color-light":x(t,e,"light"),"--mantine-datatable-row-color-dark":x(t,e,"dark"),"--mantine-datatable-row-background-color-light":x(o,e,"light"),"--mantine-datatable-row-background-color-dark":x(o,e,"dark")}}var Le=require("react/jsx-runtime");function na(){return(0,Le.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Le.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,Le.jsx)("path",{d:"M8 9l4 -4l4 4"}),(0,Le.jsx)("path",{d:"M16 15l-4 4l-4 -4"})]})}var Q=require("react/jsx-runtime"),la={xs:(0,w.rem)(22),sm:(0,w.rem)(26),md:(0,w.rem)(32),lg:(0,w.rem)(38),xl:(0,w.rem)(44)};function ia({size:e,label:t,values:o,value:n,activeTextColor:a,activeBackgroundColor:r,onChange:i}){return(0,Q.jsxs)(w.Group,{gap:"xs",children:[(0,Q.jsx)(w.Text,{size:e,children:t}),(0,Q.jsxs)(w.Menu,{withinPortal:!0,withArrow:!0,classNames:{arrow:"mantine-datatable-page-size-selector-menu-arrow"},children:[(0,Q.jsx)(w.MenuTarget,{children:(0,Q.jsx)(w.Button,{size:e,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:(0,Q.jsx)(na,{}),style:[{fontWeight:"normal"},l=>({height:la[e],paddingLeft:l.spacing[e],paddingRight:l.spacing[e]})],children:n})}),(0,Q.jsx)(w.MenuDropdown,{children:o.map(l=>{let d=l===n;return(0,Q.jsx)(w.MenuItem,{className:(0,ra.default)({"mantine-datatable-page-size-selector-active":d}),style:[{height:la[e]},d&&(a||r)?s=>bt({theme:s,paginationActiveTextColor:a,paginationActiveBackgroundColor:r}):void 0],disabled:d,onClick:()=>i(l),children:(0,Q.jsx)(w.Text,{size:e,children:l})},l)})})]})]})}var Ie=require("react/jsx-runtime"),da=(0,sa.forwardRef)(function({className:t,style:o,fetching:n,page:a,onPageChange:r,paginationWithEdges:i,paginationActiveTextColor:l,paginationActiveBackgroundColor:d,paginationSize:s,loadingText:m,noRecordsText:c,paginationText:u,totalRecords:f,recordsPerPage:y,onRecordsPerPageChange:h,recordsPerPageLabel:b,recordsPerPageOptions:S,recordsLength:p,horizontalSpacing:C,paginationWrapBreakpoint:R,getPaginationControlProps:I},v){let O;if(n)O=m;else if(!f)O=c;else{let E=(a-1)*y+1,Z=E+p-1;O=u({from:E,to:Z,totalRecords:f})}let U=ae(({breakpoints:E})=>`(min-width: ${typeof R=="number"?`${(0,se.rem)(R)}rem`:E[R]||R})`);return(0,Ie.jsxs)(se.Box,{ref:v,px:C??"xs",py:"xs",className:(0,Wt.default)("mantine-datatable-pagination",t),style:[{flexDirection:U?"row":"column"},o],children:[(0,Ie.jsx)(se.Text,{className:"mantine-datatable-pagination-text",size:s,children:O}),S&&(0,Ie.jsx)(ia,{activeTextColor:l,activeBackgroundColor:d,size:s,label:b,values:S,value:y,onChange:h}),(0,Ie.jsx)(se.Pagination,{classNames:{root:(0,Wt.default)("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":n||!p}),control:"mantine-datatable-pagination-pages-control"},style:l||d?E=>bt({theme:E,paginationActiveTextColor:l,paginationActiveBackgroundColor:d}):void 0,withEdges:i,value:a,onChange:r,size:s,total:Math.ceil(f/y),getControlProps:I})]})});var ga=require("@mantine/core"),ha=z(require("clsx"));var ca=require("@mantine/core"),ma=z(require("clsx"));var pa=require("react/jsx-runtime");function ua({className:e,style:t,visibleMediaQuery:o,record:n,index:a,onClick:r,onDoubleClick:i,onContextMenu:l,noWrap:d,ellipsis:s,textAlign:m,width:c,accessor:u,render:f,defaultRender:y,customCellAttributes:h}){return ae(o)?(0,pa.jsx)(ca.TableTd,{className:(0,ma.default)({[Me]:d||s,[ke]:s,[$]:r||i,[dt]:l,[ne]:m==="left",[le]:m==="center",[re]:m==="right"},e),style:[{width:c,minWidth:c,maxWidth:c},t],onClick:r,onDoubleClick:i,onContextMenu:l,...h?.(n,a),children:f?f(n,a):y?y(n,a,u):st(n,u)}):null}var De=require("@mantine/core");var J=require("react/jsx-runtime");function fa({open:e,colSpan:t,content:o,collapseProps:n}){let{expanded:a,visible:r}=yo(e,n?.transitionDuration);return r?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(De.TableTr,{}),(0,J.jsx)(De.TableTr,{children:(0,J.jsx)(De.TableTd,{className:"mantine-datatable-row-expansion-cell",colSpan:t,children:(0,J.jsx)(De.Collapse,{in:a,...n,children:(0,J.jsx)("div",{className:"mantine-datatable-row-expansion-cell-content",children:o()})})})})]}):null}var Tt=require("@mantine/core"),ba=z(require("clsx"));var At=require("react/jsx-runtime");function Ta({className:e,style:t,record:o,index:n,trigger:a,onChange:r,withRightShadow:i,checkboxProps:l,getCheckboxProps:d,...s}){let m={...l,...d(o,n)},c=!s.disabled&&!m.disabled,u=f=>{f.stopPropagation(),a==="cell"&&c&&r?.(f)};return(0,At.jsx)(Tt.TableTd,{className:(0,ba.default)("mantine-datatable-row-selector-cell",{[$]:a==="cell"&&c},e),style:t,"data-shadow-visible":i||void 0,onClick:u,children:(0,At.jsx)(Tt.Checkbox,{classNames:c?{input:$}:void 0,onChange:r,...s,...m})})}var ee=require("react/jsx-runtime");function Ca({record:e,index:t,columns:o,defaultColumnProps:n,defaultColumnRender:a,selectionTrigger:r,selectionVisible:i,selectionChecked:l,onSelectionChange:d,isRecordSelectable:s,selectionCheckboxProps:m,getSelectionCheckboxProps:c,onClick:u,onDoubleClick:f,onContextMenu:y,onCellClick:h,onCellDoubleClick:b,onCellContextMenu:S,expansion:p,customAttributes:C,color:R,backgroundColor:I,className:v,style:O,selectorCellShadowVisible:U,selectionColumnClassName:E,selectionColumnStyle:Z}){return(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)(ga.TableTr,{className:(0,ha.default)("mantine-datatable-row",{[$]:u||f||p?.expandOnClick},{[dt]:y},typeof v=="function"?v(e,t):v),"data-selected":l||void 0,onClick:M=>{if(p){let{isRowExpanded:g,expandOnClick:P,expandRow:W,collapseRow:B}=p;P&&(g(e)?B(e):W(e))}u?.({event:M,record:e,index:t})},onDoubleClick:f?M=>f({event:M,record:e,index:t}):void 0,onContextMenu:y?M=>y({event:M,record:e,index:t}):void 0,style:[R||I?M=>{let g=R?.(e,t),P=I?.(e,t);return aa({theme:M,color:g,backgroundColor:P})}:void 0,O?.(e,t)],...C?.(e,t),children:[i&&(0,ee.jsx)(Ta,{className:E,style:Z,record:e,index:t,trigger:r,withRightShadow:U,checked:l,disabled:!d||(s?!s(e,t):!1),onChange:d,checkboxProps:m,getCheckboxProps:c}),o.map(({hidden:M,...g},P)=>{if(M)return null;let{accessor:W,visibleMediaQuery:B,textAlign:N,noWrap:ce,ellipsis:Y,width:He,render:Oe,cellsClassName:me,cellsStyle:We,customCellAttributes:Ae}={...n,...g};return(0,ee.jsx)(ua,{className:typeof me=="function"?me(e,t):me,style:We?.(e,t),visibleMediaQuery:B,record:e,index:t,onClick:h?q=>h({event:q,record:e,index:t,column:g,columnIndex:P}):void 0,onDoubleClick:b?q=>b({event:q,record:e,index:t,column:g,columnIndex:P}):void 0,onContextMenu:S?q=>S({event:q,record:e,index:t,column:g,columnIndex:P}):void 0,accessor:W,textAlign:N,noWrap:ce,ellipsis:Y,width:He,render:Oe,defaultRender:a,customCellAttributes:Ae},W)})]}),p&&(0,ee.jsx)(fa,{colSpan:o.filter(({hidden:M})=>!M).length+(i?1:0),open:p.isRowExpanded(e),content:p.content({record:e,index:t}),collapseProps:p.collapseProps})]})}var de=require("@mantine/core"),Je=z(require("clsx")),we=require("react/jsx-runtime");function ya({topShadowVisible:e,leftShadowVisible:t,leftShadowBehind:o,rightShadowVisible:n,rightShadowBehind:a,bottomShadowVisible:r,headerHeight:i,footerHeight:l,onScrollPositionChange:d,children:s,viewportRef:m,scrollAreaProps:c}){return(0,we.jsxs)(de.ScrollArea,{...c,viewportRef:m,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:d,children:[s,(0,we.jsx)(de.Box,{className:(0,Je.default)("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow",{"mantine-datatable-scroll-area-shadow-visible":e}),style:{top:i?(0,de.rem)(i):0}}),(0,we.jsx)("div",{className:(0,Je.default)("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-visible":t,"mantine-datatable-scroll-area-shadow-behind":o})}),(0,we.jsx)("div",{className:(0,Je.default)("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-visible":n,"mantine-datatable-scroll-area-shadow-behind":a})}),(0,we.jsx)(de.Box,{className:(0,Je.default)("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow",{"mantine-datatable-scroll-area-shadow-visible":r}),style:{bottom:l?(0,de.rem)(l+1):0}})]})}var A=require("react/jsx-runtime");function Da({withTableBorder:e,borderRadius:t,textSelectionDisabled:o,height:n="100%",minHeight:a,shadow:r,verticalAlign:i="center",fetching:l,columns:d,storeColumnsKey:s,groups:m,pinFirstColumn:c,pinLastColumn:u,defaultColumnProps:f,defaultColumnRender:y,idAccessor:h="id",records:b,selectionTrigger:S="checkbox",selectedRecords:p,onSelectedRecordsChange:C,selectionColumnClassName:R,selectionColumnStyle:I,isRecordSelectable:v,selectionCheckboxProps:O,allRecordsSelectionCheckboxProps:U={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:E=(F,ue)=>({"aria-label":`Select record ${ue+1}`}),sortStatus:Z,sortIcons:M,onSortStatusChange:g,horizontalSpacing:P,page:W,onPageChange:B,totalRecords:N,recordsPerPage:ce,onRecordsPerPageChange:Y,recordsPerPageOptions:He,recordsPerPageLabel:Oe="Records per page",paginationWithEdges:me,paginationActiveTextColor:We,paginationActiveBackgroundColor:Ae,paginationSize:q="sm",paginationText:ht=({from:F,to:ue,totalRecords:pe})=>`${F} - ${ue} / ${pe}`,paginationWrapBreakpoint:Ct="sm",getPaginationControlProps:yt=F=>F==="previous"?{"aria-label":"Previous page"}:F==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:wa,customLoader:Sa,loaderSize:Pa,loaderType:xa,loaderColor:va,loadingText:Ma="...",emptyState:ka,noRecordsText:Ft="No records",noRecordsIcon:Ra,highlightOnHover:Ea,striped:Na,noHeader:La,onRowClick:Ia,onRowDoubleClick:Ha,onRowContextMenu:Oa,onCellClick:Wa,onCellDoubleClick:Aa,onCellContextMenu:za,onScroll:_t,onScrollToTop:Bt,onScrollToBottom:Gt,onScrollToLeft:Xt,onScrollToRight:Qt,c:Va,backgroundColor:Fa,borderColor:_a,rowBorderColor:Ba,stripedColor:Ga,highlightOnHoverColor:Xa,rowColor:Qa,rowBackgroundColor:Ua,rowExpansion:$a,rowClassName:Ka,rowStyle:Ja,customRowAttributes:Za,scrollViewportRef:Ya,scrollAreaProps:qa,tableRef:ja,bodyRef:en,m:tn,my:on,mx:an,mt:nn,mb:ln,ml:rn,mr:sn,className:dn,classNames:ze,style:cn,styles:Ve,...mn}){let{ref:F,width:ue,height:pe}=Te(),Fe=(0,_.useMemo)(()=>m?.flatMap(T=>T.columns)??d,[d,m]),Ut=lt({key:s,columns:Fe}),{ref:un,height:Dt}=Te(),{ref:pn,width:wt,height:_e}=Te(),{ref:fn,height:bn}=Te(),{ref:Tn,height:$t}=Te(),{ref:gn,width:hn}=Te(),Cn=(0,zt.useMergedRef)(pn,ja),[St,Kt]=(0,_.useState)(!0),[Pt,Jt]=(0,_.useState)(!0),[Be,Zt]=(0,_.useState)(!0),[Ze,Yt]=(0,_.useState)(!0),yn=Co({rowExpansion:$a,records:b,idAccessor:h}),Ye=(0,_.useCallback)(()=>{let T=F.current?.scrollTop||0,te=F.current?.scrollLeft||0;if(l||_e<=pe)Kt(!0),Jt(!0);else{let G=T===0,X=_e-T-pe<1;Kt(G),Jt(X),G&&G!==St&&Bt?.(),X&&X!==Pt&&Gt?.()}if(l||wt===ue)Zt(!0),Yt(!0);else{let G=te===0,X=wt-te-ue<1;Zt(G),Yt(X),G&&G!==Be&&Xt?.(),X&&X!==Ze&&Qt?.()}},[l,Gt,Xt,Qt,Bt,pe,F,ue,Pt,Be,Ze,St,_e,wt]);mo(Ye,[Ye]);let Dn=(0,_.useCallback)(T=>{_t?.(T),Ye()},[Ye,_t]),wn=(0,_.useCallback)(T=>{F.current?.scrollTo({top:0,left:0}),B(T)},[B,F]),qe=b?.length,qt=b?.map(T=>k(T,h)),Se=!!p,Ge=p?.map(T=>k(T,h)),jt=qt!==void 0&&Ge!==void 0&&Ge.length>0,xt=v?b?.filter(v):b,je=xt?.map(T=>k(T,h)),et=jt&&je.every(T=>Ge.includes(T)),Sn=jt&&je.some(T=>Ge.includes(T)),Pn=(0,_.useCallback)(()=>{p&&C&&C(et?p.filter(T=>!je.includes(k(T,h))):Xe([...p,...xt],T=>k(T,h)))},[et,h,C,je,xt,p]),{lastSelectionChangeIndex:tt,setLastSelectionChangeIndex:xn}=uo(qt),vt=Se&&!Be&&!c;return(0,A.jsx)(kt,{...Ut,children:(0,A.jsxs)(gt.Box,{...{m:tn,my:on,mx:an,mt:nn,mb:ln,ml:rn,mr:sn},className:(0,Vt.default)("mantine-datatable",{"mantine-datatable-with-border":e},dn,ze?.root),style:[T=>({...oa({theme:T,c:Va,backgroundColor:Fa,borderColor:_a,rowBorderColor:Ba,stripedColor:Ga,highlightOnHoverColor:Xa}),borderRadius:T.radius[t]||t,boxShadow:T.shadows[r]||r,height:n,minHeight:a}),cn,Ve?.root],children:[(0,A.jsx)(ya,{viewportRef:(0,zt.useMergedRef)(F,Ya),topShadowVisible:!St,leftShadowVisible:!Be,leftShadowBehind:Se||!!c,rightShadowVisible:!Ze,rightShadowBehind:u,bottomShadowVisible:!Pt,headerHeight:Dt,footerHeight:bn,onScrollPositionChange:Dn,scrollAreaProps:qa,children:(0,A.jsxs)(gt.Table,{ref:Cn,horizontalSpacing:P,className:(0,Vt.default)("mantine-datatable-table",{[Do]:o,"mantine-datatable-vertical-align-top":i==="top","mantine-datatable-vertical-align-bottom":i==="bottom","mantine-datatable-last-row-border-bottom-visible":_e<pe,"mantine-datatable-pin-last-column":u,"mantine-datatable-pin-last-column-scrolled":!Ze&&u,"mantine-datatable-selection-column-visible":Se,"mantine-datatable-pin-first-column":c,"mantine-datatable-pin-first-column-scrolled":!Be&&c},ze?.table),style:{...Ve?.table,"--mantine-datatable-selection-column-width":`${hn}px`},"data-striped":qe&&Na||void 0,"data-highlight-on-hover":Ea||void 0,...mn,children:[La?null:(0,A.jsx)(kt,{...Ut,children:(0,A.jsx)(qo,{ref:un,selectionColumnHeaderRef:gn,className:ze?.header,style:Ve?.header,columns:Fe,defaultColumnProps:f,groups:m,sortStatus:Z,sortIcons:M,onSortStatusChange:g,selectionTrigger:S,selectionVisible:Se,selectionChecked:et,selectionIndeterminate:Sn&&!et,onSelectionChange:Pn,selectionCheckboxProps:{...O,...U},selectorCellShadowVisible:vt,selectionColumnClassName:R,selectionColumnStyle:I})}),(0,A.jsx)("tbody",{ref:en,children:qe?b.map((T,te)=>{let G=k(T,h),X=Ge?.includes(G)||!1,eo;return C&&p&&(eo=vn=>{if(vn.nativeEvent.shiftKey&&tt!==null){let Pe=b.filter(te>tt?(fe,be)=>be>=tt&&be<=te&&(v?v(fe,be):!0):(fe,be)=>be>=te&&be<=tt&&(v?v(fe,be):!0));C(X?Nt(p,Pe,fe=>k(fe,h)):Xe([...p,...Pe],fe=>k(fe,h)))}else C(X?p.filter(Pe=>k(Pe,h)!==G):Xe([...p,T],Pe=>k(Pe,h)));xn(te)}),(0,A.jsx)(Ca,{record:T,index:te,columns:Fe,defaultColumnProps:f,defaultColumnRender:y,selectionTrigger:S,selectionVisible:Se,selectionChecked:X,onSelectionChange:eo,isRecordSelectable:v,selectionCheckboxProps:O,getSelectionCheckboxProps:E,onClick:Ia,onDoubleClick:Ha,onCellClick:Wa,onCellDoubleClick:Aa,onContextMenu:Oa,onCellContextMenu:za,expansion:yn,color:Qa,backgroundColor:Ua,className:Ka,style:Ja,customAttributes:Za,selectorCellShadowVisible:vt,selectionColumnClassName:R,selectionColumnStyle:I},G)}):(0,A.jsx)(lo,{})}),Fe.some(({footer:T})=>T)&&(0,A.jsx)(No,{ref:fn,className:ze?.footer,style:Ve?.footer,columns:Fe,defaultColumnProps:f,selectionVisible:Se,selectorCellShadowVisible:vt,scrollDiff:_e-pe})]})}),W&&(0,A.jsx)(da,{ref:Tn,className:ze?.pagination,style:Ve?.pagination,horizontalSpacing:P,fetching:l,page:W,onPageChange:wn,totalRecords:N,recordsPerPage:ce,onRecordsPerPageChange:Y,recordsPerPageOptions:He,recordsPerPageLabel:Oe,paginationWithEdges:me,paginationActiveTextColor:We,paginationActiveBackgroundColor:Ae,paginationSize:q,paginationText:ht,paginationWrapBreakpoint:Ct,getPaginationControlProps:yt,noRecordsText:Ft,loadingText:Ma,recordsLength:qe}),(0,A.jsx)(ea,{pt:Dt,pb:$t,fetching:l,backgroundBlur:wa,customContent:Sa,size:Pa,type:xa,color:va}),(0,A.jsx)(io,{pt:Dt,pb:$t,icon:Ra,text:Ft,active:!l&&!qe,children:ka})]})})}0&&(module.exports={DataTable,differenceBy,getRecordId,getValueAtPath,humanize,uniqBy,useDataTableColumns,useDragToggleColumns}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "mantine-datatable", | ||
"version": "7.4.5", | ||
"version": "7.4.6", | ||
"description": "The lightweight, dependency-free, dark-theme aware table component for your Mantine UI data-rich applications, featuring asynchronous data loading support, pagination, intuitive Gmail-style additive batch rows selection, column sorting, custom cell data rendering, row expansion, nesting, context menus, and much more", | ||
@@ -85,3 +85,3 @@ "keywords": [ | ||
"@tabler/icons-react": "^2.46.0", | ||
"@tanstack/react-query": "^5.17.15", | ||
"@tanstack/react-query": "^5.17.19", | ||
"@types/lodash": "^4.14.202", | ||
@@ -100,3 +100,3 @@ "@types/node": "^20.11.5", | ||
"lodash": "^4.17.21", | ||
"mantine-contextmenu": "^7.4.0", | ||
"mantine-contextmenu": "^7.4.1", | ||
"next": "14.1.0", | ||
@@ -103,0 +103,0 @@ "postcss": "^8.4.33", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
517531
2731