mantine-datatable 2.8.2 → 2.8.5
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/DataTableHeaderCell.d.ts.map +1 -1
- package/dist/DataTableHeaderCellFilter.d.ts +8 -0
- package/dist/DataTableHeaderCellFilter.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +4 -4
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +4 -4
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableHeaderCell.d.ts","sourceRoot":"","sources":["../DataTableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DataTableHeaderCell.d.ts","sourceRoot":"","sources":["../DataTableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,YAAY,EAAE,KAAK,EAAE,EAAE,MAAM,eAAe,CAAC;AAE7F,OAAO,KAAK,EAAsB,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAsCnE,KAAK,wBAAwB,CAAC,CAAC,IAAI;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,EAAE,CAAC;IACR,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,iBAAiB,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,MAAM,CAAC,GAAG,SAAS,CAAC;IAC1E,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC7C,SAAS,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC3C,kBAAkB,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;CAC9D,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC,CAAC;AAE3G,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,CAAC,EAAE,EAC7C,SAAS,EACT,EAAE,EACF,KAAK,EACL,QAAQ,EACR,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,SAAS,EACT,aAAa,EACb,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,MAAM,EACN,SAAS,GACV,EAAE,wBAAwB,CAAC,CAAC,CAAC,kDAmE7B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DataTableColumn } from './types';
|
|
2
|
+
type DataTableHeaderCellFilterProps<T> = {
|
|
3
|
+
children: DataTableColumn<T>['filter'];
|
|
4
|
+
isActive: boolean;
|
|
5
|
+
};
|
|
6
|
+
export default function DataTableHeaderCellFilter<T>({ children, isActive }: DataTableHeaderCellFilterProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=DataTableHeaderCellFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTableHeaderCellFilter.d.ts","sourceRoot":"","sources":["../DataTableHeaderCellFilter.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,KAAK,8BAA8B,CAAC,CAAC,IAAI;IACvC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,8BAA8B,CAAC,CAAC,CAAC,2CAqB7G"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var Na=Object.create;var Yo=Object.defineProperty;var qa=Object.getOwnPropertyDescriptor;var Wa=Object.getOwnPropertyNames;var za=Object.getPrototypeOf,Ua=Object.prototype.hasOwnProperty;var Va=(o,e)=>()=>(o&&(e=o(o=0)),e);var Ce=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),Ga=(o,e)=>{for(var r in e)Yo(o,r,{get:e[r],enumerable:!0})},sr=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of Wa(e))!Ua.call(o,f)&&f!==r&&Yo(o,f,{get:()=>e[f],enumerable:!(t=qa(e,f))||t.enumerable});return o};var dr=(o,e,r)=>(r=o!=null?Na(za(o)):{},sr(e||!o||!o.__esModule?Yo(r,"default",{value:o,enumerable:!0}):r,o)),Xa=o=>sr(Yo({},"__esModule",{value:!0}),o);var d,a=Va(()=>{"use strict";d=dr(require("react"),1)});var pr=Ce((wt,ur)=>{"use strict";a();var Za="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";ur.exports=Za});var ir=Ce((Rt,Ir)=>{"use strict";a();var Ka=pr();function mr(){}function xr(){}xr.resetWarningCache=mr;Ir.exports=function(){function o(t,f,l,n,s,u){if(u!==Ka){var m=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 m.name="Invariant Violation",m}}o.isRequired=o;function e(){return o}var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:e,element:o,elementType:o,instanceOf:e,node:o,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:xr,resetWarningCache:mr};return r.PropTypes=r,r}});var Cr=Ce((Ot,gr)=>{a();gr.exports=ir()();var kt,Ft});var bt={};Ga(bt,{DataTable:()=>Ze,differenceBy:()=>jo,getValueAtPath:()=>Ho,humanize:()=>j,uniqBy:()=>go});module.exports=Xa(bt);a();a();var V=require("@mantine/core"),eo=require("@mantine/hooks"),H=require("react");a();var cr=require("@mantine/core"),he=require("react/jsx-runtime"),Qa=(0,cr.createStyles)({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function Se(){let{classes:o}=Qa();return(0,he.jsx)("tr",{className:o.root,children:(0,he.jsx)("td",{})})}a();var xo=require("@mantine/core");a();a();var Lo=require("react"),Y=dr(Cr());a();var hr={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 $a=Object.defineProperty,Ya=Object.defineProperties,_a=Object.getOwnPropertyDescriptors,_o=Object.getOwnPropertySymbols,Br=Object.prototype.hasOwnProperty,Dr=Object.prototype.propertyIsEnumerable,Sr=(o,e,r)=>e in o?$a(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,br=(o,e)=>{for(var r in e||(e={}))Br.call(e,r)&&Sr(o,r,e[r]);if(_o)for(var r of _o(e))Dr.call(e,r)&&Sr(o,r,e[r]);return o},ja=(o,e)=>Ya(o,_a(e)),Ja=(o,e)=>{var r={};for(var t in o)Br.call(o,t)&&e.indexOf(t)<0&&(r[t]=o[t]);if(o!=null&&_o)for(var t of _o(o))e.indexOf(t)<0&&Dr.call(o,t)&&(r[t]=o[t]);return r},_=(o,e,r)=>{let t=(0,Lo.forwardRef)((f,l)=>{var n=f,{color:s="currentColor",size:u=24,stroke:m=2,children:p}=n,C=Ja(n,["color","size","stroke","children"]);return(0,Lo.createElement)("svg",br(ja(br({ref:l},hr),{width:u,height:u,stroke:s,strokeWidth:m,className:`tabler-icon tabler-icon-${o}`}),C),[...r.map(([c,I])=>(0,Lo.createElement)(c,I)),...p||[]])});return t.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number]),stroke:Y.default.oneOfType([Y.default.string,Y.default.number])},t.displayName=`${e}`,t};a();var be=_("arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]);a();var Be=_("arrows-vertical","IconArrowsVertical",[["path",{d:"M8 7l4 -4l4 4",key:"svg-0"}],["path",{d:"M8 17l4 4l4 -4",key:"svg-1"}],["path",{d:"M12 3l0 18",key:"svg-2"}]]);a();var De=_("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"}]]);a();var ye=_("filter","IconFilter",[["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",key:"svg-0"}]]);var Q=require("react/jsx-runtime"),ot=(0,xo.createStyles)(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 Te({icon:o,text:e,pt:r,pb:t,active:f,children:l}){let{classes:n,cx:s}=ot();return(0,Q.jsx)(xo.Center,{pt:r,pb:t,className:s(n.root,{[n.active]:f}),children:l||(0,Q.jsxs)(Q.Fragment,{children:[o||(0,Q.jsx)("div",{className:n.standardIcon,children:(0,Q.jsx)(De,{})}),(0,Q.jsx)(xo.Text,{size:"sm",color:"dimmed",children:e})]})})}a();var ee=require("@mantine/core"),kr=require("react");a();var Jo=require("@mantine/core");a();var we=require("@mantine/core"),Tr=require("@mantine/hooks"),lo=require("react");a();var Io=require("react");function et(o,e){let r=()=>{e(o.map(f=>f.matches))},t=o.map(f=>{try{return f.addEventListener("change",r),()=>f.removeEventListener("change",r)}catch{return f.addListener(r),()=>f.removeListener(r)}});return()=>{t.forEach(f=>f())}}function rt(o,e){return e||(typeof window<"u"&&"matchMedia"in window?o.map(r=>window.matchMedia(r).matches):o.map(()=>!1))}function yr(o,e,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[t,f]=(0,Io.useState)(r?e:rt(o,e)),l=(0,Io.useRef)();return(0,Io.useEffect)(()=>{if("matchMedia"in window)return l.current=o.map(n=>window.matchMedia(n)),f(l.current.map(n=>n.matches)),et(l.current,n=>{f(n)})},[o]),t}var wr=typeof window<"u"?lo.useLayoutEffect:lo.useEffect;function io(o){let e=(0,we.useMantineTheme)(),r=typeof o=="function"?o(e):o;return(0,Tr.useMediaQuery)(r||"",!0)}function Pr(o){let e=(0,we.useMantineTheme)(),r=(0,lo.useMemo)(()=>o.map(f=>(typeof f=="function"?f(e):f)??""),[o,e]),t=(0,lo.useMemo)(()=>o.map(()=>!0),[o]);return yr(r,t)}function j(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 jo(o,e,r){return o.filter(t=>!e.map(r).includes(r(t)))}function go(o,e){return o.filter((r,t,f)=>t===f.findIndex(l=>e(r)===e(l)))}function Ho(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}function y(o,e){return typeof e=="string"?Ho(o,e):e(o)}var Rr=require("react/jsx-runtime"),at=(0,Jo.createStyles)({noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Pe({className:o,sx:e,style:r,visibleMediaQuery:t,title:f,noWrap:l,ellipsis:n,textAlignment:s,width:u}){let{cx:m,classes:p}=at();return io(t)?(0,Rr.jsx)(Jo.Box,{component:"th",className:m({[p.noWrap]:l||n,[p.ellipsis]:n},o),sx:[{"&&":{textAlign:s},width:u,minWidth:u,maxWidth:u},e],style:r,children:f}):null}a();var oe=require("@mantine/core"),Mr=require("react/jsx-runtime"),tt=(0,oe.createStyles)(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-(0,oe.px)(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"}},shadowVisible:{"&::after":{opacity:1}}}});function Re({shadowVisible:o}){let{cx:e,classes:r}=tt();return(0,Mr.jsx)("th",{className:e(r.root,{[r.shadowVisible]:o})})}var Co=require("react/jsx-runtime"),ft=(0,ee.createStyles)((o,{scrollDiff:e,borderColor:r})=>{let t=e<0,f=typeof r=="function"?r(o):r;return{root:{zIndex:2,position:t?"relative":"sticky",bottom:t?e:-1,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white,"&& tr th":{borderTopColor:f}},relative:{position:"relative"},textSelectionDisabled:{userSelect:"none"}}}),Fr=(0,kr.forwardRef)(function({className:e,style:r,borderColor:t,columns:f,defaultColumnProps:l,selectionVisible:n,leftShadowVisible:s,scrollDiff:u},m){let{cx:p,classes:C}=ft({scrollDiff:u,borderColor:t});return(0,Co.jsx)(ee.Box,{component:"tfoot",ref:m,className:p(C.root,e),style:r,children:(0,Co.jsxs)("tr",{children:[n&&(0,Co.jsx)(Re,{shadowVisible:s}),f.map(({hidden:c,...I})=>{if(c)return null;let{accessor:w,visibleMediaQuery:i,textAlignment:h,width:g,footer:D,footerClassName:S,footerStyle:G,footerSx:v,noWrap:R,ellipsis:F}={...l,...I};return(0,Co.jsx)(Pe,{className:S,style:G,sx:v,visibleMediaQuery:i,textAlignment:h,width:g,title:D,noWrap:R,ellipsis:F},w)})]})})});a();var Lr=require("@mantine/core"),Hr=require("react");a();var Or=require("@mantine/core"),Me=require("react");var vr=require("react/jsx-runtime");function ke({group:{id:o,columns:e,title:r,className:t,style:f,sx:l}}){let n=(0,Me.useMemo)(()=>e.map(({visibleMediaQuery:m})=>m),[e]),s=Pr(n),u=(0,Me.useMemo)(()=>e.filter(({hidden:m},p)=>!m&&s?.[p]).length,[e,s]);return u>0?(0,vr.jsx)(Or.Box,{component:"th",colSpan:u,className:t,sx:l,style:f,children:r??j(o)}):null}a();var k=require("@mantine/core"),Ar=require("@mantine/hooks");var T=require("react/jsx-runtime"),nt=(0,k.createStyles)(o=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover:not(:has(button: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)"},sortableColumnHeaderUnsortedIcon:{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 lt({children:o,isActive:e}){let[r,{close:t,toggle:f}]=(0,Ar.useDisclosure)(!1);return(0,T.jsxs)(k.Popover,{withArrow:!0,withinPortal:!0,shadow:"md",opened:r,onClose:t,trapFocus:!0,children:[(0,T.jsx)(k.Popover.Target,{children:(0,T.jsx)(k.ActionIcon,{onClick:l=>{l.preventDefault(),f()},variant:e?"default":"subtle",children:(0,T.jsx)(ye,{size:14})})}),(0,T.jsx)(k.Popover.Dropdown,{children:typeof o=="function"?o({close:t}):o})]})}function Fe({className:o,sx:e,style:r,accessor:t,visibleMediaQuery:f,title:l,sortable:n,sortIcons:s,textAlignment:u,width:m,sortStatus:p,onSortStatusChange:C,filter:c,filtering:I}){let{cx:w,classes:i}=nt();if(!io(f))return null;let h=l??j(t),g=typeof h=="string"?h:void 0,D=n&&C?S=>{S?.defaultPrevented||C({columnAccessor:t,direction:p?.columnAccessor===t?p.direction==="asc"?"desc":"asc":p?.direction??"asc"})}:void 0;return(0,T.jsx)(k.Box,{component:"th",className:w({[i.sortableColumnHeader]:n},o),sx:[{"&&":{textAlign:u},width:m,minWidth:m,maxWidth:m},e],style:r,role:n?"button":void 0,tabIndex:n?0:void 0,onClick:D,onKeyDown:S=>S.key==="Enter"&&D?.(),children:(0,T.jsxs)(k.Group,{className:i.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[(0,T.jsx)(k.Box,{className:w(i.columnHeaderText,i.sortableColumnHeaderText),title:g,children:h}),n||p?.columnAccessor===t?(0,T.jsx)(T.Fragment,{children:p?.columnAccessor===t?(0,T.jsx)(k.Center,{className:w(i.sortableColumnHeaderIcon,{[i.sortableColumnHeaderIconRotated]:p.direction==="desc"}),role:"img","aria-label":`Sorted ${p.direction==="desc"?"descending":"ascending"}`,children:s?.sorted||(0,T.jsx)(be,{size:14})}):(0,T.jsx)(k.Center,{className:i.sortableColumnHeaderUnsortedIcon,role:"img","aria-label":"Not sorted",children:s?.unsorted||(0,T.jsx)(Be,{size:14})})}):null,c?(0,T.jsx)(lt,{isActive:!!I,children:c}):null]})})}a();var ho=require("@mantine/core"),Oe=require("react/jsx-runtime"),st=(0,ho.createStyles)(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-(0,ho.px)(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"}},shadowVisible:{"&::after":{opacity:1}},checkboxInput:{cursor:"pointer"}}});function ve({shadowVisible:o,checked:e,indeterminate:r,checkboxProps:t,onChange:f,rowSpan:l}){let{cx:n,classes:s}=st();return(0,Oe.jsx)("th",{className:n(s.root,{[s.shadowVisible]:o}),rowSpan:l,children:(0,Oe.jsx)(ho.Checkbox,{classNames:{input:s.checkboxInput},checked:e,indeterminate:r,disabled:!f,onChange:f,...t})})}var J=require("react/jsx-runtime"),dt=(0,Lr.createStyles)(o=>({root:{zIndex:2,position:"sticky",top:0,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white},textSelectionDisabled:{userSelect:"none"}})),Er=(0,Hr.forwardRef)(function({className:e,style:r,sortStatus:t,sortIcons:f,onSortStatusChange:l,columns:n,defaultColumnProps:s,groups:u,selectionVisible:m,selectionChecked:p,selectionIndeterminate:C,onSelectionChange:c,selectionCheckboxProps:I,leftShadowVisible:w},i){let{classes:h,cx:g}=dt(),D=m?(0,J.jsx)(ve,{shadowVisible:w,checked:p,indeterminate:C,checkboxProps:I,onChange:c,rowSpan:u?2:void 0}):null;return(0,J.jsxs)("thead",{className:g(h.root,e),style:r,ref:i,children:[u&&(0,J.jsxs)("tr",{children:[D,u.map(S=>(0,J.jsx)(ke,{group:S},S.id))]}),(0,J.jsxs)("tr",{children:[!u&&D,n.map(({hidden:S,...G})=>{if(S)return null;let{accessor:v,visibleMediaQuery:R,textAlignment:F,width:E,title:A,sortable:N,titleClassName:uo,titleStyle:yo,titleSx:To,filter:wo,filtering:Po}={...s,...G};return(0,J.jsx)(Fe,{accessor:v,className:uo,style:yo,sx:To,visibleMediaQuery:R,textAlignment:F,width:E,title:A,sortable:N,sortStatus:t,sortIcons:f,onSortStatusChange:l,filter:wo,filtering:Po},v)})]})]})});a();var So=require("@mantine/core"),Ae=require("react/jsx-runtime"),ct=(0,So.createStyles)(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 Le({pt:o,pb:e,fetching:r,customContent:t,backgroundBlur:f,size:l,variant:n,color:s}){let{classes:u,cx:m}=ct();return(0,Ae.jsx)(So.Center,{pt:o,pb:e,className:m(u.root,{[u.fetching]:r}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:r&&(t||(0,Ae.jsx)(So.Loader,{size:l,variant:n,color:s}))})}a();var oo=require("@mantine/core"),qr=require("react");a();var L=require("@mantine/core"),W=require("react/jsx-runtime"),Nr={xs:22,sm:26,md:32,lg:38,xl:44};function He({size:o,label:e,values:r,value:t,onChange:f,color:l}){return(0,W.jsxs)(L.Group,{spacing:"xs",children:[(0,W.jsx)(L.Text,{size:o,children:e}),(0,W.jsxs)(L.Menu,{withinPortal:!0,withArrow:!0,children:[(0,W.jsx)(L.Menu.Target,{children:(0,W.jsx)(L.Button,{size:o,variant:"default",sx:[{fontWeight:"normal"},n=>({height:Nr[o],paddingLeft:n.spacing[o],paddingRight:n.spacing[o]})],children:t})}),(0,W.jsx)(L.Menu.Dropdown,{children:r.map(n=>{let s=n===t;return(0,W.jsx)(L.Menu.Item,{sx:[{height:Nr[o]},u=>({"&&":{color:s?u.white:void 0},background:s?u.colors[l||u.primaryColor][6]:void 0})],disabled:s,onClick:()=>f(n),children:(0,W.jsx)(L.Text,{size:o,children:n})},n)})})]})]})}var bo=require("react/jsx-runtime"),ut=(0,oo.createStyles)((o,{topBorderColor:e,paginationWrapBreakpoint:r})=>({root:{background:o.colorScheme==="dark"?o.colors.dark[7]:o.white,borderTop:`1px solid ${typeof e=="function"?e(o):e}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:o.spacing.xs,[o.fn.largerThan(r)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),Wr=(0,qr.forwardRef)(function({className:e,style:r,topBorderColor:t,fetching:f,page:l,onPageChange:n,paginationColor:s,paginationSize:u,loadingText:m,noRecordsText:p,paginationText:C,totalRecords:c,recordsPerPage:I,onRecordsPerPageChange:w,recordsPerPageLabel:i,recordsPerPageOptions:h,recordsLength:g,horizontalSpacing:D,paginationWrapBreakpoint:S,getPaginationControlProps:G},v){let R;if(f)R=m;else if(!c)R=p;else{let A=(l-1)*I+1,N=A+g-1;R=C({from:A,to:N,totalRecords:c})}let{classes:F,cx:E}=ut({topBorderColor:t,paginationWrapBreakpoint:S});return(0,bo.jsxs)(oo.Box,{ref:v,px:D??"xs",py:"xs",className:E(F.root,e),style:r,children:[(0,bo.jsx)(oo.Text,{className:F.text,size:u,children:R}),h&&(0,bo.jsx)(He,{size:u,label:i,values:h,color:s,value:I,onChange:w}),(0,bo.jsx)(oo.Pagination,{color:s,className:E(F.pagination,{[F.paginationFetching]:f||!g}),value:l,onChange:n,size:u,total:Math.ceil(c/I),getControlProps:G})]})});a();var te=require("@mantine/core");a();var re=require("@mantine/core");var zr=require("react/jsx-runtime"),pt=(0,re.createStyles)({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Ee({className:o,sx:e,style:r,visibleMediaQuery:t,record:f,recordIndex:l,onClick:n,noWrap:s,ellipsis:u,textAlignment:m,width:p,accessor:C,render:c,defaultRender:I,customCellAttributes:w}){let{cx:i,classes:h}=pt();return io(t)?(0,zr.jsx)(re.Box,{component:"td",className:i({[h.noWrap]:s||u,[h.ellipsis]:u,[h.withPointerCursor]:n},o),sx:[{width:p,minWidth:p,maxWidth:p,textAlign:m},e],style:r,onClick:n,...w?.(f,l),children:c?c(f,l):I?I(f,l,C):Ho(f,C)}):null}a();var ae=require("@mantine/core");a();var Ne=require("@mantine/hooks"),z=require("react");function Ur(o){let[e,r]=(0,z.useState)(null),t=o?.join(":")||"";return(0,z.useEffect)(()=>{r(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function Vr(o){let[e,r]=(0,z.useState)(null);return(0,z.useEffect)(()=>{o&&r(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:r}}function Gr({rowExpansion:o,records:e,idAccessor:r}){let t=[];if(o&&e){let{trigger:s,allowMultiple:u,initiallyExpanded:m}=o;e&&s==="always"?t=e.map(p=>y(p,r)):m&&(t=e.filter(m).map(p=>y(p,r)),u||(t=[t[0]]))}let f,l,n=(0,z.useState)(t);if(o){let{trigger:s,allowMultiple:u,collapseProps:m,content:p}=o;o.expanded?{recordIds:f,onRecordIdsChange:l}=o.expanded:[f,l]=n;let C=c=>l?.(f.filter(I=>I!==y(c,r)));return{expandOnClick:s!=="always"&&s!=="never",isRowExpanded:c=>s==="always"?!0:f.includes(y(c,r)),expandRow:c=>{let I=y(c,r);l?.(u?[...f,I]:[I])},collapseRow:C,collapseProps:m,content:(c,I)=>()=>p({record:c,recordIndex:I,collapse:()=>C(c)})}}}function Xr(o,e){let[r,t]=(0,z.useState)(o),[f,l]=(0,z.useState)(o),n=(0,Ne.useTimeout)(()=>t(!0),0),s=(0,Ne.useTimeout)(()=>l(!1),e||200);return(0,z.useEffect)(()=>{o?(s.clear(),l(!0),n.start()):(n.clear(),t(!1),s.start())},[n,s,o]),{expanded:r,visible:f}}var Z=require("react/jsx-runtime"),mt=(0,ae.createStyles)({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function qe({open:o,colSpan:e,content:r,collapseProps:t}){let{expanded:f,visible:l}=Xr(o,t?.transitionDuration),{cx:n,classes:s}=mt();return l?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("tr",{}),(0,Z.jsx)("tr",{children:(0,Z.jsx)("td",{className:n(s.cell,{[s.expandedCell]:f}),colSpan:e,children:(0,Z.jsx)(ae.Collapse,{in:f,...t,children:r()})})})]}):null}a();var Bo=require("@mantine/core"),We=require("react/jsx-runtime"),xt=(0,Bo.createStyles)(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:-(0,Bo.px)(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 ze({record:o,recordIndex:e,withRightShadow:r,getCheckboxProps:t,...f}){let{cx:l,classes:n}=xt();return(0,We.jsx)("td",{className:l(n.root,{[n.withRightShadow]:r}),onClick:s=>s.stopPropagation(),children:(0,We.jsx)(Bo.Checkbox,{classNames:{input:n.checkbox},...f,...t(o,e)})})}var K=require("react/jsx-runtime"),It=(0,te.createStyles)(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 Ue({record:o,recordIndex:e,columns:r,defaultColumnProps:t,defaultColumnRender:f,selectionVisible:l,selectionChecked:n,onSelectionChange:s,isRecordSelectable:u,getSelectionCheckboxProps:m,onClick:p,onCellClick:C,onContextMenu:c,expansion:I,customRowAttributes:w,className:i,style:h,sx:g,contextMenuVisible:D,leftShadowVisible:S}){let{cx:G,classes:v}=It();return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(te.Box,{component:"tr",className:G({[v.withPointerCursor]:p||I?.expandOnClick,[v.selected]:n,[v.contextMenuVisible]:D},typeof i=="function"?i(o,e):i),onClick:R=>{if(I){let{isRowExpanded:F,expandOnClick:E,expandRow:A,collapseRow:N}=I;E&&(F(o)?N(o):A(o))}p?.(R)},style:typeof h=="function"?h(o,e):h,sx:g,...w?.(o,e),onContextMenu:c,children:[l&&(0,K.jsx)(ze,{record:o,recordIndex:e,withRightShadow:S,checked:n,disabled:!s||(u?!u(o,e):!1),onChange:s,getCheckboxProps:m}),r.map(({hidden:R,...F},E)=>{if(R)return null;let{accessor:A,visibleMediaQuery:N,textAlignment:uo,noWrap:yo,ellipsis:To,width:wo,render:Po,cellsClassName:Ro,cellsStyle:Mo,cellsSx:fe,customCellAttributes:ne}={...t,...F},No;return C&&(No=le=>C({event:le,record:o,recordIndex:e,column:F,columnIndex:E})),(0,K.jsx)(Ee,{className:typeof Ro=="function"?Ro(o,e):Ro,style:typeof Mo=="function"?Mo(o,e):Mo,sx:fe,visibleMediaQuery:N,record:o,recordIndex:e,onClick:No,accessor:A,textAlignment:uo,noWrap:yo,ellipsis:To,width:wo,render:Po,defaultRender:f,customCellAttributes:ne},A)})]}),I&&(0,K.jsx)(qe,{colSpan:r.filter(({hidden:R})=>!R).length+(l?1:0),open:I.isRowExpanded(o),content:I.content(o,e),collapseProps:I.collapseProps})]})}a();var Do=require("@mantine/core"),$=require("@mantine/hooks"),Qr=require("react/jsx-runtime"),it=(0,Do.createStyles)(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 Ve({borderRadius:o="xs",shadow:e="sm",zIndex:r=3,y:t,x:f,onDestroy:l,children:n}){(0,$.useWindowEvent)("resize",l),(0,$.useWindowEvent)("scroll",l);let s=(0,$.useClickOutside)(l),{ref:u,width:m,height:p}=(0,$.useElementSize)(),C=(0,$.useMergedRef)(s,u),{innerWidth:c,innerHeight:I}=window,{classes:w,theme:{dir:i,spacing:h}}=it(),g=(0,Do.px)(h.md);return(0,Qr.jsx)(Do.Paper,{ref:C,shadow:e,radius:o,className:w.root,sx:{zIndex:r,top:t+p+g>I?I-p-g:t,left:i==="ltr"?f+m+g>c?c-m-g:f:c-g-(f-m-g<0?m+g:f)},children:n})}a();var Zr=require("@mantine/core"),Kr=require("react/jsx-runtime"),gt=(0,Zr.createStyles)(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function Ge(){let{classes:o}=gt();return(0,Kr.jsx)("div",{className:o.root})}a();var U=require("@mantine/core"),Eo=require("react/jsx-runtime"),Ct=(0,U.createStyles)((o,{color:e})=>{let r=(0,U.px)(o.spacing.sm)/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:r,paddingBottom:r,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,color:e&&o.colors[e][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[5]},"&:hover:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:o.spacing.xs},title:{whiteSpace:"nowrap"}}});function Xe({icon:o,title:e,color:r,disabled:t,onClick:f}){let{classes:l}=Ct({color:r});return(0,Eo.jsxs)(U.UnstyledButton,{className:l.root,disabled:t,onClick:f,children:[o&&(0,Eo.jsx)(U.Box,{className:l.icon,children:o}),(0,Eo.jsx)(U.Text,{className:l.title,size:"sm",children:e})]})}a();var co=require("@mantine/core"),so=require("react/jsx-runtime"),ht=(0,co.createStyles)(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,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,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 Qe({topShadowVisible:o,leftShadowVisible:e,rightShadowVisible:r,bottomShadowVisible:t,headerHeight:f,footerHeight:l,onScrollPositionChange:n,children:s,viewportRef:u,scrollAreaProps:m}){let p=l?l-1:0,{cx:C,classes:c}=ht();return(0,so.jsxs)(co.ScrollArea,{...m,viewportRef:u,classNames:{root:c.root,scrollbar:c.scrollbar,thumb:c.thumb,corner:c.corner},styles:{scrollbar:{marginTop:f,marginBottom:p}},onScrollPositionChange:n,children:[s,(0,so.jsx)(co.Box,{className:C(c.shadow,c.topShadow,{[c.shadowVisible]:o}),sx:{top:f}}),(0,so.jsx)("div",{className:C(c.shadow,c.leftShadow,{[c.shadowVisible]:e})}),(0,so.jsx)("div",{className:C(c.shadow,c.rightShadow,{[c.shadowVisible]:r})}),(0,so.jsx)(co.Box,{className:C(c.shadow,c.bottomShadow,{[c.shadowVisible]:t}),sx:{bottom:p}})]})}var P=require("react/jsx-runtime"),$r={},St=(0,V.createStyles)((o,{borderColor:e,rowBorderColor:r})=>{let t=typeof e=="function"?e(o):e,f=typeof r=="function"?r(o):r;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:o.colorScheme==="dark"?o.colors.dark[7]:o.white},"&&":{"thead tr th":{borderBottomColor:t},"tbody tr td":{borderTopColor:f}}},lastRowBorderBottomVisible:{"tbody tr:last-of-type td":{borderBottom:`1px solid ${f}`}},textSelectionDisabled:{userSelect:"none"},table:{borderCollapse:"separate",borderSpacing:0},tableWithBorder:{border:`1px solid ${t}`},tableWithColumnBorders:{"&&":{"th, td":{":not(:first-of-type)":{borderLeft:`1px solid ${f}`}}}},tableWithColumnBordersAndSelectableRecords:{thead:{"tr + tr":{th:{borderLeft:`1px solid ${f}`}}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function Ze({withBorder:o,borderRadius:e,borderColor:r=B=>B.colorScheme==="dark"?B.colors.dark[4]:B.colors.gray[3],rowBorderColor:t=B=>B.fn.rgba(B.colorScheme==="dark"?B.colors.dark[4]:B.colors.gray[3],.65),withColumnBorders:f,textSelectionDisabled:l,height:n="100%",minHeight:s,shadow:u,verticalAlignment:m="center",fetching:p,columns:C,groups:c,defaultColumnProps:I,defaultColumnRender:w,idAccessor:i="id",records:h,selectedRecords:g,onSelectedRecordsChange:D,isRecordSelectable:S,allRecordsSelectionCheckboxProps:G={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:v=(B,ro)=>({"aria-label":`Select record ${ro+1}`}),sortStatus:R,sortIcons:F,onSortStatusChange:E,horizontalSpacing:A,page:N,onPageChange:uo,totalRecords:yo,recordsPerPage:To,onRecordsPerPageChange:wo,recordsPerPageOptions:Po,recordsPerPageLabel:Ro="Records per page",paginationColor:Mo,paginationSize:fe="sm",paginationText:ne=({from:B,to:ro,totalRecords:ao})=>`${B} - ${ro} / ${ao}`,paginationWrapBreakpoint:No="sm",getPaginationControlProps:le=B=>B==="previous"?{"aria-label":"Previous page"}:B==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:Yr,customLoader:_r,loaderSize:jr,loaderVariant:Jr,loaderColor:oa,loadingText:ea="...",emptyState:ra,noRecordsText:Ke="No records",noRecordsIcon:aa,striped:ta,noHeader:fa,onRowClick:se,onCellClick:na,onScrollToTop:$e,onScrollToBottom:Ye,onScrollToLeft:_e,onScrollToRight:je,rowContextMenu:q,rowExpansion:la,rowClassName:sa,rowStyle:da,rowSx:ca,customRowAttributes:ua,scrollViewportRef:pa,scrollAreaProps:ma,bodyRef:xa,m:Ia,my:ia,mx:ga,mt:Ca,mb:ha,ml:Sa,mr:ba,sx:Ba,className:Da,classNames:qo,style:ya,styles:de,...Ta}){let{ref:B,width:ro,height:ao}=(0,eo.useElementSize)(),Wo=(0,H.useMemo)(()=>c?.flatMap(x=>x.columns)??C,[C,c]),{ref:wa,height:ce}=(0,eo.useElementSize)(),{ref:Pa,width:ue,height:ko}=(0,eo.useElementSize)(),{ref:Ra,height:Ma}=(0,eo.useElementSize)(),{ref:ka,height:Je}=(0,eo.useElementSize)(),[pe,or]=(0,H.useState)(!0),[me,er]=(0,H.useState)(!0),[zo,rr]=(0,H.useState)(!0),[xe,ar]=(0,H.useState)(!0),{rowContextMenuInfo:to,setRowContextMenuInfo:po}=Vr(p),Fa=Gr({rowExpansion:la,records:h,idAccessor:i}),Ie=(0,H.useCallback)(()=>{if(!p&&q&&po(null),p||ko<=ao)or(!0),er(!0);else{let x=B.current.scrollTop,b=x===0,O=ko-x-ao<1;or(b),er(O),b&&b!==pe&&$e?.(),O&&O!==me&&Ye?.()}if(p||ue===ro)rr(!0),ar(!0);else{let x=B.current.scrollLeft,b=x===0,O=ue-x-ro<1;rr(b),ar(O),b&&b!==zo&&_e?.(),O&&O!==xe&&je?.()}},[p,Ye,_e,je,$e,q,ao,B,ro,me,zo,xe,pe,po,ko,ue]);wr(Ie,[Ie]);let Oa=(0,H.useCallback)(x=>{B.current.scrollTo({top:0,left:0}),uo(x)},[uo,B]),Uo=h?.length,tr=h?.map(x=>y(x,i)),Fo=!!g,Oo=g?.map(x=>y(x,i)),fr=tr!==void 0&&Oo!==void 0&&Oo.length>0,ie=S?h?.filter(S):h,Vo=ie?.map(x=>y(x,i)),Go=fr&&Vo.every(x=>Oo.includes(x)),va=fr&&Vo.some(x=>Oo.includes(x)),Aa=(0,H.useCallback)(()=>{g&&D&&D(Go?g.filter(x=>!Vo.includes(y(x,i))):go([...g,...ie],x=>y(x,i)))},[Go,i,D,Vo,ie,g]),{lastSelectionChangeIndex:Xo,setLastSelectionChangeIndex:La}=Ur(tr),ge=Fo&&!zo,{cx:nr,classes:X,theme:Ha}=St({borderColor:r,rowBorderColor:t}),Ea={m:Ia,my:ia,mx:ga,mt:Ca,mb:ha,ml:Sa,mr:ba},Qo=typeof de=="function"?de(Ha,$r,$r):de;return(0,P.jsxs)(V.Box,{...Ea,className:nr(X.root,{[X.tableWithBorder]:o},Da,qo?.root),sx:[x=>({borderRadius:x.radius[e]||e,boxShadow:x.shadows[u]||u,height:n,minHeight:s}),...(0,V.packSx)(Ba)],style:{...Qo?.root,...ya},children:[(0,P.jsx)(Qe,{viewportRef:(0,eo.useMergedRef)(B,pa||null),topShadowVisible:!pe,leftShadowVisible:!(g||zo),rightShadowVisible:!xe,bottomShadowVisible:!me,headerHeight:ce,footerHeight:Ma,onScrollPositionChange:Ie,scrollAreaProps:ma,children:(0,P.jsxs)(V.Table,{ref:Pa,horizontalSpacing:A,className:nr(X.table,{[X.tableWithColumnBorders]:f,[X.lastRowBorderBottomVisible]:ko<ao,[X.textSelectionDisabled]:l,[X.verticalAlignmentTop]:m==="top",[X.verticalAlignmentBottom]:m==="bottom",[X.tableWithColumnBordersAndSelectableRecords]:Fo&&f}),striped:Uo?ta:!1,...Ta,children:[fa?null:(0,P.jsx)(Er,{ref:wa,className:qo?.header,style:Qo?.header,columns:Wo,defaultColumnProps:I,groups:c,sortStatus:R,sortIcons:F,onSortStatusChange:E,selectionVisible:Fo,selectionChecked:Go,selectionIndeterminate:va&&!Go,onSelectionChange:Aa,selectionCheckboxProps:G,leftShadowVisible:ge}),(0,P.jsx)("tbody",{ref:xa,children:Uo?h.map((x,b)=>{let O=y(x,i),vo=Oo?.includes(O)||!1,Zo=!1,Ko=!1;if(q){let{hidden:M}=q;(!M||!(typeof M=="function"?M(x,b):M))&&(q.trigger==="click"?Zo=!0:Ko=!0)}let $o;D&&g&&($o=M=>{if(M.nativeEvent.shiftKey&&Xo!==null){let mo=h.filter(b>Xo?(fo,no)=>no>=Xo&&no<=b&&(S?S(fo,no):!0):(fo,no)=>no>=b&&no<=Xo&&(S?S(fo,no):!0));D(vo?jo(g,mo,fo=>y(fo,i)):go([...g,...mo],fo=>y(fo,i)))}else D(vo?g.filter(mo=>y(mo,i)!==O):go([...g,x],mo=>y(mo,i)));La(b)});let Ao;Zo?Ao=M=>{po({y:M.clientY,x:M.clientX,record:x,recordIndex:b}),se?.(x,b,M)}:se&&(Ao=M=>{se(x,b,M)});let lr;return Ko&&(lr=M=>{M.preventDefault(),po({y:M.clientY,x:M.clientX,record:x,recordIndex:b})}),(0,P.jsx)(Ue,{record:x,recordIndex:b,columns:Wo,defaultColumnProps:I,defaultColumnRender:w,selectionVisible:Fo,selectionChecked:vo,onSelectionChange:$o,isRecordSelectable:S,getSelectionCheckboxProps:v,onClick:Ao,onCellClick:na,onContextMenu:lr,contextMenuVisible:to?y(to.record,i)===O:!1,expansion:Fa,className:sa,style:da,sx:ca,customRowAttributes:ua,leftShadowVisible:ge},O)}):(0,P.jsx)(Se,{})}),Wo.some(({footer:x})=>x)&&(0,P.jsx)(Fr,{ref:Ra,className:qo?.footer,style:Qo?.footer,borderColor:r,columns:Wo,defaultColumnProps:I,selectionVisible:Fo,leftShadowVisible:ge,scrollDiff:ko-ao})]})}),N&&(0,P.jsx)(Wr,{ref:ka,className:qo?.pagination,style:Qo?.pagination,topBorderColor:r,horizontalSpacing:A,fetching:p,page:N,onPageChange:Oa,totalRecords:yo,recordsPerPage:To,onRecordsPerPageChange:wo,recordsPerPageOptions:Po,recordsPerPageLabel:Ro,paginationColor:Mo,paginationSize:fe,paginationText:ne,paginationWrapBreakpoint:No,getPaginationControlProps:le,noRecordsText:Ke,loadingText:ea,recordsLength:Uo}),(0,P.jsx)(Le,{pt:ce,pb:Je,fetching:p,backgroundBlur:Yr,customContent:_r,size:jr,variant:Jr,color:oa}),(0,P.jsx)(Te,{pt:ce,pb:Je,icon:aa,text:Ke,active:!p&&!Uo,children:ra}),q&&to&&(0,P.jsx)(V.Portal,{children:(0,P.jsx)(Ve,{zIndex:q.zIndex,borderRadius:q.borderRadius,shadow:q.shadow,y:to.y,x:to.x,onDestroy:()=>po(null),children:q.items(to.record,to.recordIndex).map(({divider:x,key:b,title:O,icon:vo,color:Zo,hidden:Ko,disabled:$o,onClick:Ao})=>x?(0,P.jsx)(Ge,{},b):Ko?null:(0,P.jsx)(Xe,{title:O??j(b),icon:vo,color:Zo,disabled:$o,onClick:()=>{po(null),Ao()}},b))})})]})}a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();
|
|
1
|
+
"use strict";var Ua=Object.create;var jo=Object.defineProperty;var za=Object.getOwnPropertyDescriptor;var Va=Object.getOwnPropertyNames;var Ga=Object.getPrototypeOf,Xa=Object.prototype.hasOwnProperty;var Qa=(o,e)=>()=>(o&&(e=o(o=0)),e);var Se=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),Za=(o,e)=>{for(var r in e)jo(o,r,{get:e[r],enumerable:!0})},ur=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of Va(e))!Xa.call(o,f)&&f!==r&&jo(o,f,{get:()=>e[f],enumerable:!(t=za(e,f))||t.enumerable});return o};var pr=(o,e,r)=>(r=o!=null?Ua(Ga(o)):{},ur(e||!o||!o.__esModule?jo(r,"default",{value:o,enumerable:!0}):r,o)),Ka=o=>ur(jo({},"__esModule",{value:!0}),o);var d,a=Qa(()=>{"use strict";d=pr(require("react"),1)});var Ir=Se((Ft,xr)=>{"use strict";a();var Ya="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";xr.exports=Ya});var hr=Se((Mt,Cr)=>{"use strict";a();var _a=Ir();function ir(){}function gr(){}gr.resetWarningCache=ir;Cr.exports=function(){function o(t,f,n,l,s,u){if(u!==_a){var m=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 m.name="Invariant Violation",m}}o.isRequired=o;function e(){return o}var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:e,element:o,elementType:o,instanceOf:e,node:o,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:gr,resetWarningCache:ir};return r.PropTypes=r,r}});var br=Se((At,Sr)=>{a();Sr.exports=hr()();var vt,Ot});var Dt={};Za(Dt,{DataTable:()=>Ye,differenceBy:()=>oe,getValueAtPath:()=>No,humanize:()=>j,uniqBy:()=>Co});module.exports=Ka(Dt);a();a();var V=require("@mantine/core"),eo=require("@mantine/hooks"),L=require("react");a();var mr=require("@mantine/core"),be=require("react/jsx-runtime"),$a=(0,mr.createStyles)({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function Be(){let{classes:o}=$a();return(0,be.jsx)("tr",{className:o.root,children:(0,be.jsx)("td",{})})}a();var Io=require("@mantine/core");a();a();var Eo=require("react"),Y=pr(br());a();var Br={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 ja=Object.defineProperty,Ja=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,Jo=Object.getOwnPropertySymbols,Tr=Object.prototype.hasOwnProperty,wr=Object.prototype.propertyIsEnumerable,Dr=(o,e,r)=>e in o?ja(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,yr=(o,e)=>{for(var r in e||(e={}))Tr.call(e,r)&&Dr(o,r,e[r]);if(Jo)for(var r of Jo(e))wr.call(e,r)&&Dr(o,r,e[r]);return o},et=(o,e)=>Ja(o,ot(e)),rt=(o,e)=>{var r={};for(var t in o)Tr.call(o,t)&&e.indexOf(t)<0&&(r[t]=o[t]);if(o!=null&&Jo)for(var t of Jo(o))e.indexOf(t)<0&&wr.call(o,t)&&(r[t]=o[t]);return r},_=(o,e,r)=>{let t=(0,Eo.forwardRef)((f,n)=>{var l=f,{color:s="currentColor",size:u=24,stroke:m=2,children:p}=l,C=rt(l,["color","size","stroke","children"]);return(0,Eo.createElement)("svg",yr(et(yr({ref:n},Br),{width:u,height:u,stroke:s,strokeWidth:m,className:`tabler-icon tabler-icon-${o}`}),C),[...r.map(([c,I])=>(0,Eo.createElement)(c,I)),...p||[]])});return t.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number]),stroke:Y.default.oneOfType([Y.default.string,Y.default.number])},t.displayName=`${e}`,t};a();var De=_("arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]);a();var ye=_("arrows-vertical","IconArrowsVertical",[["path",{d:"M8 7l4 -4l4 4",key:"svg-0"}],["path",{d:"M8 17l4 4l4 -4",key:"svg-1"}],["path",{d:"M12 3l0 18",key:"svg-2"}]]);a();var Te=_("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"}]]);a();var we=_("filter","IconFilter",[["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",key:"svg-0"}]]);var Q=require("react/jsx-runtime"),at=(0,Io.createStyles)(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 Pe({icon:o,text:e,pt:r,pb:t,active:f,children:n}){let{classes:l,cx:s}=at();return(0,Q.jsx)(Io.Center,{pt:r,pb:t,className:s(l.root,{[l.active]:f}),children:n||(0,Q.jsxs)(Q.Fragment,{children:[o||(0,Q.jsx)("div",{className:l.standardIcon,children:(0,Q.jsx)(Te,{})}),(0,Q.jsx)(Io.Text,{size:"sm",color:"dimmed",children:e})]})})}a();var ae=require("@mantine/core"),Or=require("react");a();var ee=require("@mantine/core");a();var Fe=require("@mantine/core"),Fr=require("@mantine/hooks"),lo=require("react");a();var io=require("react");function tt(o,e){let r=()=>{e(o.map(f=>f.matches))},t=o.map(f=>{try{return f.addEventListener("change",r),()=>f.removeEventListener("change",r)}catch{return f.addListener(r),()=>f.removeListener(r)}});return()=>{t.forEach(f=>f())}}function ft(o,e){return e||(typeof window<"u"&&"matchMedia"in window?o.map(r=>window.matchMedia(r).matches):o.map(()=>!1))}function Pr(o,e,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[t,f]=(0,io.useState)(r?e:ft(o,e)),n=(0,io.useRef)();return(0,io.useEffect)(()=>{if("matchMedia"in window)return n.current=o.map(l=>window.matchMedia(l)),f(n.current.map(l=>l.matches)),tt(n.current,l=>{f(l)})},[o]),t}var Rr=typeof window<"u"?lo.useLayoutEffect:lo.useEffect;function go(o){let e=(0,Fe.useMantineTheme)(),r=typeof o=="function"?o(e):o;return(0,Fr.useMediaQuery)(r||"",!0)}function Mr(o){let e=(0,Fe.useMantineTheme)(),r=(0,lo.useMemo)(()=>o.map(f=>(typeof f=="function"?f(e):f)??""),[o,e]),t=(0,lo.useMemo)(()=>o.map(()=>!0),[o]);return Pr(r,t)}function j(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 oe(o,e,r){return o.filter(t=>!e.map(r).includes(r(t)))}function Co(o,e){return o.filter((r,t,f)=>t===f.findIndex(n=>e(r)===e(n)))}function No(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}function y(o,e){return typeof e=="string"?No(o,e):e(o)}var kr=require("react/jsx-runtime"),nt=(0,ee.createStyles)({noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Re({className:o,sx:e,style:r,visibleMediaQuery:t,title:f,noWrap:n,ellipsis:l,textAlignment:s,width:u}){let{cx:m,classes:p}=nt();return go(t)?(0,kr.jsx)(ee.Box,{component:"th",className:m({[p.noWrap]:n||l,[p.ellipsis]:l},o),sx:[{"&&":{textAlign:s},width:u,minWidth:u,maxWidth:u},e],style:r,children:f}):null}a();var re=require("@mantine/core"),vr=require("react/jsx-runtime"),lt=(0,re.createStyles)(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-(0,re.px)(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"}},shadowVisible:{"&::after":{opacity:1}}}});function Me({shadowVisible:o}){let{cx:e,classes:r}=lt();return(0,vr.jsx)("th",{className:e(r.root,{[r.shadowVisible]:o})})}var ho=require("react/jsx-runtime"),st=(0,ae.createStyles)((o,{scrollDiff:e,borderColor:r})=>{let t=e<0,f=typeof r=="function"?r(o):r;return{root:{zIndex:2,position:t?"relative":"sticky",bottom:t?e:-1,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white,"&& tr th":{borderTopColor:f}},relative:{position:"relative"},textSelectionDisabled:{userSelect:"none"}}}),Ar=(0,Or.forwardRef)(function({className:e,style:r,borderColor:t,columns:f,defaultColumnProps:n,selectionVisible:l,leftShadowVisible:s,scrollDiff:u},m){let{cx:p,classes:C}=st({scrollDiff:u,borderColor:t});return(0,ho.jsx)(ae.Box,{component:"tfoot",ref:m,className:p(C.root,e),style:r,children:(0,ho.jsxs)("tr",{children:[l&&(0,ho.jsx)(Me,{shadowVisible:s}),f.map(({hidden:c,...I})=>{if(c)return null;let{accessor:T,visibleMediaQuery:i,textAlignment:h,width:g,footer:D,footerClassName:S,footerStyle:G,footerSx:v,noWrap:P,ellipsis:R}={...n,...I};return(0,ho.jsx)(Re,{className:S,style:G,sx:v,visibleMediaQuery:i,textAlignment:h,width:g,title:D,noWrap:P,ellipsis:R},T)})]})})});a();var Nr=require("@mantine/core"),qr=require("react");a();var Lr=require("@mantine/core"),ke=require("react");var Hr=require("react/jsx-runtime");function ve({group:{id:o,columns:e,title:r,className:t,style:f,sx:n}}){let l=(0,ke.useMemo)(()=>e.map(({visibleMediaQuery:m})=>m),[e]),s=Mr(l),u=(0,ke.useMemo)(()=>e.filter(({hidden:m},p)=>!m&&s?.[p]).length,[e,s]);return u>0?(0,Hr.jsx)(Lr.Box,{component:"th",colSpan:u,className:t,sx:n,style:f,children:r??j(o)}):null}a();var q=require("@mantine/core");a();var So=require("@mantine/core"),Er=require("@mantine/hooks");var so=require("react/jsx-runtime");function Oe({children:o,isActive:e}){let[r,{close:t,toggle:f}]=(0,Er.useDisclosure)(!1);return(0,so.jsxs)(So.Popover,{withArrow:!0,withinPortal:!0,shadow:"md",opened:r,onClose:t,trapFocus:!0,children:[(0,so.jsx)(So.Popover.Target,{children:(0,so.jsx)(So.ActionIcon,{onClick:n=>{n.preventDefault(),f()},variant:e?"default":"subtle",children:(0,so.jsx)(we,{size:14})})}),(0,so.jsx)(So.Popover.Dropdown,{onClick:n=>n.preventDefault(),children:typeof o=="function"?o({close:t}):o})]})}var k=require("react/jsx-runtime"),dt=(0,q.createStyles)(o=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover:not(:has(button: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)"},sortableColumnHeaderUnsortedIcon:{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 Ae({className:o,sx:e,style:r,accessor:t,visibleMediaQuery:f,title:n,sortable:l,sortIcons:s,textAlignment:u,width:m,sortStatus:p,onSortStatusChange:C,filter:c,filtering:I}){let{cx:T,classes:i}=dt();if(!go(f))return null;let h=n??j(t),g=typeof h=="string"?h:void 0,D=l&&C?S=>{S?.defaultPrevented||C({columnAccessor:t,direction:p?.columnAccessor===t?p.direction==="asc"?"desc":"asc":p?.direction??"asc"})}:void 0;return(0,k.jsx)(q.Box,{component:"th",className:T({[i.sortableColumnHeader]:l},o),sx:[{"&&":{textAlign:u},width:m,minWidth:m,maxWidth:m},e],style:r,role:l?"button":void 0,tabIndex:l?0:void 0,onClick:D,onKeyDown:S=>S.key==="Enter"&&D?.(),children:(0,k.jsxs)(q.Group,{className:i.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[(0,k.jsx)(q.Box,{className:T(i.columnHeaderText,i.sortableColumnHeaderText),title:g,children:h}),l||p?.columnAccessor===t?(0,k.jsx)(k.Fragment,{children:p?.columnAccessor===t?(0,k.jsx)(q.Center,{className:T(i.sortableColumnHeaderIcon,{[i.sortableColumnHeaderIconRotated]:p.direction==="desc"}),role:"img","aria-label":`Sorted ${p.direction==="desc"?"descending":"ascending"}`,children:s?.sorted||(0,k.jsx)(De,{size:14})}):(0,k.jsx)(q.Center,{className:i.sortableColumnHeaderUnsortedIcon,role:"img","aria-label":"Not sorted",children:s?.unsorted||(0,k.jsx)(ye,{size:14})})}):null,c?(0,k.jsx)(Oe,{isActive:!!I,children:c}):null]})})}a();var bo=require("@mantine/core"),Le=require("react/jsx-runtime"),ct=(0,bo.createStyles)(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-(0,bo.px)(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"}},shadowVisible:{"&::after":{opacity:1}},checkboxInput:{cursor:"pointer"}}});function He({shadowVisible:o,checked:e,indeterminate:r,checkboxProps:t,onChange:f,rowSpan:n}){let{cx:l,classes:s}=ct();return(0,Le.jsx)("th",{className:l(s.root,{[s.shadowVisible]:o}),rowSpan:n,children:(0,Le.jsx)(bo.Checkbox,{classNames:{input:s.checkboxInput},checked:e,indeterminate:r,disabled:!f,onChange:f,...t})})}var J=require("react/jsx-runtime"),ut=(0,Nr.createStyles)(o=>({root:{zIndex:2,position:"sticky",top:0,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white},textSelectionDisabled:{userSelect:"none"}})),Wr=(0,qr.forwardRef)(function({className:e,style:r,sortStatus:t,sortIcons:f,onSortStatusChange:n,columns:l,defaultColumnProps:s,groups:u,selectionVisible:m,selectionChecked:p,selectionIndeterminate:C,onSelectionChange:c,selectionCheckboxProps:I,leftShadowVisible:T},i){let{classes:h,cx:g}=ut(),D=m?(0,J.jsx)(He,{shadowVisible:T,checked:p,indeterminate:C,checkboxProps:I,onChange:c,rowSpan:u?2:void 0}):null;return(0,J.jsxs)("thead",{className:g(h.root,e),style:r,ref:i,children:[u&&(0,J.jsxs)("tr",{children:[D,u.map(S=>(0,J.jsx)(ve,{group:S},S.id))]}),(0,J.jsxs)("tr",{children:[!u&&D,l.map(({hidden:S,...G})=>{if(S)return null;let{accessor:v,visibleMediaQuery:P,textAlignment:R,width:H,title:O,sortable:E,titleClassName:po,titleStyle:wo,titleSx:Po,filter:Fo,filtering:Ro}={...s,...G};return(0,J.jsx)(Ae,{accessor:v,className:po,style:wo,sx:Po,visibleMediaQuery:P,textAlignment:R,width:H,title:O,sortable:E,sortStatus:t,sortIcons:f,onSortStatusChange:n,filter:Fo,filtering:Ro},v)})]})]})});a();var Bo=require("@mantine/core"),Ee=require("react/jsx-runtime"),pt=(0,Bo.createStyles)(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 Ne({pt:o,pb:e,fetching:r,customContent:t,backgroundBlur:f,size:n,variant:l,color:s}){let{classes:u,cx:m}=pt();return(0,Ee.jsx)(Bo.Center,{pt:o,pb:e,className:m(u.root,{[u.fetching]:r}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:r&&(t||(0,Ee.jsx)(Bo.Loader,{size:n,variant:l,color:s}))})}a();var oo=require("@mantine/core"),zr=require("react");a();var A=require("@mantine/core"),W=require("react/jsx-runtime"),Ur={xs:22,sm:26,md:32,lg:38,xl:44};function qe({size:o,label:e,values:r,value:t,onChange:f,color:n}){return(0,W.jsxs)(A.Group,{spacing:"xs",children:[(0,W.jsx)(A.Text,{size:o,children:e}),(0,W.jsxs)(A.Menu,{withinPortal:!0,withArrow:!0,children:[(0,W.jsx)(A.Menu.Target,{children:(0,W.jsx)(A.Button,{size:o,variant:"default",sx:[{fontWeight:"normal"},l=>({height:Ur[o],paddingLeft:l.spacing[o],paddingRight:l.spacing[o]})],children:t})}),(0,W.jsx)(A.Menu.Dropdown,{children:r.map(l=>{let s=l===t;return(0,W.jsx)(A.Menu.Item,{sx:[{height:Ur[o]},u=>({"&&":{color:s?u.white:void 0},background:s?u.colors[n||u.primaryColor][6]:void 0})],disabled:s,onClick:()=>f(l),children:(0,W.jsx)(A.Text,{size:o,children:l})},l)})})]})]})}var Do=require("react/jsx-runtime"),mt=(0,oo.createStyles)((o,{topBorderColor:e,paginationWrapBreakpoint:r})=>({root:{background:o.colorScheme==="dark"?o.colors.dark[7]:o.white,borderTop:`1px solid ${typeof e=="function"?e(o):e}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:o.spacing.xs,[o.fn.largerThan(r)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),Vr=(0,zr.forwardRef)(function({className:e,style:r,topBorderColor:t,fetching:f,page:n,onPageChange:l,paginationColor:s,paginationSize:u,loadingText:m,noRecordsText:p,paginationText:C,totalRecords:c,recordsPerPage:I,onRecordsPerPageChange:T,recordsPerPageLabel:i,recordsPerPageOptions:h,recordsLength:g,horizontalSpacing:D,paginationWrapBreakpoint:S,getPaginationControlProps:G},v){let P;if(f)P=m;else if(!c)P=p;else{let O=(n-1)*I+1,E=O+g-1;P=C({from:O,to:E,totalRecords:c})}let{classes:R,cx:H}=mt({topBorderColor:t,paginationWrapBreakpoint:S});return(0,Do.jsxs)(oo.Box,{ref:v,px:D??"xs",py:"xs",className:H(R.root,e),style:r,children:[(0,Do.jsx)(oo.Text,{className:R.text,size:u,children:P}),h&&(0,Do.jsx)(qe,{size:u,label:i,values:h,color:s,value:I,onChange:T}),(0,Do.jsx)(oo.Pagination,{color:s,className:H(R.pagination,{[R.paginationFetching]:f||!g}),value:n,onChange:l,size:u,total:Math.ceil(c/I),getControlProps:G})]})});a();var ne=require("@mantine/core");a();var te=require("@mantine/core");var Gr=require("react/jsx-runtime"),xt=(0,te.createStyles)({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function We({className:o,sx:e,style:r,visibleMediaQuery:t,record:f,recordIndex:n,onClick:l,noWrap:s,ellipsis:u,textAlignment:m,width:p,accessor:C,render:c,defaultRender:I,customCellAttributes:T}){let{cx:i,classes:h}=xt();return go(t)?(0,Gr.jsx)(te.Box,{component:"td",className:i({[h.noWrap]:s||u,[h.ellipsis]:u,[h.withPointerCursor]:l},o),sx:[{width:p,minWidth:p,maxWidth:p,textAlign:m},e],style:r,onClick:l,...T?.(f,n),children:c?c(f,n):I?I(f,n,C):No(f,C)}):null}a();var fe=require("@mantine/core");a();var Ue=require("@mantine/hooks"),U=require("react");function Xr(o){let[e,r]=(0,U.useState)(null),t=o?.join(":")||"";return(0,U.useEffect)(()=>{r(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function Qr(o){let[e,r]=(0,U.useState)(null);return(0,U.useEffect)(()=>{o&&r(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:r}}function Zr({rowExpansion:o,records:e,idAccessor:r}){let t=[];if(o&&e){let{trigger:s,allowMultiple:u,initiallyExpanded:m}=o;e&&s==="always"?t=e.map(p=>y(p,r)):m&&(t=e.filter(m).map(p=>y(p,r)),u||(t=[t[0]]))}let f,n,l=(0,U.useState)(t);if(o){let{trigger:s,allowMultiple:u,collapseProps:m,content:p}=o;o.expanded?{recordIds:f,onRecordIdsChange:n}=o.expanded:[f,n]=l;let C=c=>n?.(f.filter(I=>I!==y(c,r)));return{expandOnClick:s!=="always"&&s!=="never",isRowExpanded:c=>s==="always"?!0:f.includes(y(c,r)),expandRow:c=>{let I=y(c,r);n?.(u?[...f,I]:[I])},collapseRow:C,collapseProps:m,content:(c,I)=>()=>p({record:c,recordIndex:I,collapse:()=>C(c)})}}}function Kr(o,e){let[r,t]=(0,U.useState)(o),[f,n]=(0,U.useState)(o),l=(0,Ue.useTimeout)(()=>t(!0),0),s=(0,Ue.useTimeout)(()=>n(!1),e||200);return(0,U.useEffect)(()=>{o?(s.clear(),n(!0),l.start()):(l.clear(),t(!1),s.start())},[l,s,o]),{expanded:r,visible:f}}var Z=require("react/jsx-runtime"),It=(0,fe.createStyles)({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function ze({open:o,colSpan:e,content:r,collapseProps:t}){let{expanded:f,visible:n}=Kr(o,t?.transitionDuration),{cx:l,classes:s}=It();return n?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("tr",{}),(0,Z.jsx)("tr",{children:(0,Z.jsx)("td",{className:l(s.cell,{[s.expandedCell]:f}),colSpan:e,children:(0,Z.jsx)(fe.Collapse,{in:f,...t,children:r()})})})]}):null}a();var yo=require("@mantine/core"),Ve=require("react/jsx-runtime"),it=(0,yo.createStyles)(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:-(0,yo.px)(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 Ge({record:o,recordIndex:e,withRightShadow:r,getCheckboxProps:t,...f}){let{cx:n,classes:l}=it();return(0,Ve.jsx)("td",{className:n(l.root,{[l.withRightShadow]:r}),onClick:s=>s.stopPropagation(),children:(0,Ve.jsx)(yo.Checkbox,{classNames:{input:l.checkbox},...f,...t(o,e)})})}var K=require("react/jsx-runtime"),gt=(0,ne.createStyles)(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 Xe({record:o,recordIndex:e,columns:r,defaultColumnProps:t,defaultColumnRender:f,selectionVisible:n,selectionChecked:l,onSelectionChange:s,isRecordSelectable:u,getSelectionCheckboxProps:m,onClick:p,onCellClick:C,onContextMenu:c,expansion:I,customRowAttributes:T,className:i,style:h,sx:g,contextMenuVisible:D,leftShadowVisible:S}){let{cx:G,classes:v}=gt();return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(ne.Box,{component:"tr",className:G({[v.withPointerCursor]:p||I?.expandOnClick,[v.selected]:l,[v.contextMenuVisible]:D},typeof i=="function"?i(o,e):i),onClick:P=>{if(I){let{isRowExpanded:R,expandOnClick:H,expandRow:O,collapseRow:E}=I;H&&(R(o)?E(o):O(o))}p?.(P)},style:typeof h=="function"?h(o,e):h,sx:g,...T?.(o,e),onContextMenu:c,children:[n&&(0,K.jsx)(Ge,{record:o,recordIndex:e,withRightShadow:S,checked:l,disabled:!s||(u?!u(o,e):!1),onChange:s,getCheckboxProps:m}),r.map(({hidden:P,...R},H)=>{if(P)return null;let{accessor:O,visibleMediaQuery:E,textAlignment:po,noWrap:wo,ellipsis:Po,width:Fo,render:Ro,cellsClassName:Mo,cellsStyle:ko,cellsSx:le,customCellAttributes:se}={...t,...R},Wo;return C&&(Wo=de=>C({event:de,record:o,recordIndex:e,column:R,columnIndex:H})),(0,K.jsx)(We,{className:typeof Mo=="function"?Mo(o,e):Mo,style:typeof ko=="function"?ko(o,e):ko,sx:le,visibleMediaQuery:E,record:o,recordIndex:e,onClick:Wo,accessor:O,textAlignment:po,noWrap:wo,ellipsis:Po,width:Fo,render:Ro,defaultRender:f,customCellAttributes:se},O)})]}),I&&(0,K.jsx)(ze,{colSpan:r.filter(({hidden:P})=>!P).length+(n?1:0),open:I.isRowExpanded(o),content:I.content(o,e),collapseProps:I.collapseProps})]})}a();var To=require("@mantine/core"),$=require("@mantine/hooks"),$r=require("react/jsx-runtime"),Ct=(0,To.createStyles)(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 Qe({borderRadius:o="xs",shadow:e="sm",zIndex:r=3,y:t,x:f,onDestroy:n,children:l}){(0,$.useWindowEvent)("resize",n),(0,$.useWindowEvent)("scroll",n);let s=(0,$.useClickOutside)(n),{ref:u,width:m,height:p}=(0,$.useElementSize)(),C=(0,$.useMergedRef)(s,u),{innerWidth:c,innerHeight:I}=window,{classes:T,theme:{dir:i,spacing:h}}=Ct(),g=(0,To.px)(h.md);return(0,$r.jsx)(To.Paper,{ref:C,shadow:e,radius:o,className:T.root,sx:{zIndex:r,top:t+p+g>I?I-p-g:t,left:i==="ltr"?f+m+g>c?c-m-g:f:c-g-(f-m-g<0?m+g:f)},children:l})}a();var Yr=require("@mantine/core"),_r=require("react/jsx-runtime"),ht=(0,Yr.createStyles)(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function Ze(){let{classes:o}=ht();return(0,_r.jsx)("div",{className:o.root})}a();var z=require("@mantine/core"),qo=require("react/jsx-runtime"),St=(0,z.createStyles)((o,{color:e})=>{let r=(0,z.px)(o.spacing.sm)/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:r,paddingBottom:r,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,color:e&&o.colors[e][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[5]},"&:hover:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:o.spacing.xs},title:{whiteSpace:"nowrap"}}});function Ke({icon:o,title:e,color:r,disabled:t,onClick:f}){let{classes:n}=St({color:r});return(0,qo.jsxs)(z.UnstyledButton,{className:n.root,disabled:t,onClick:f,children:[o&&(0,qo.jsx)(z.Box,{className:n.icon,children:o}),(0,qo.jsx)(z.Text,{className:n.title,size:"sm",children:e})]})}a();var uo=require("@mantine/core"),co=require("react/jsx-runtime"),bt=(0,uo.createStyles)(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,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,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 $e({topShadowVisible:o,leftShadowVisible:e,rightShadowVisible:r,bottomShadowVisible:t,headerHeight:f,footerHeight:n,onScrollPositionChange:l,children:s,viewportRef:u,scrollAreaProps:m}){let p=n?n-1:0,{cx:C,classes:c}=bt();return(0,co.jsxs)(uo.ScrollArea,{...m,viewportRef:u,classNames:{root:c.root,scrollbar:c.scrollbar,thumb:c.thumb,corner:c.corner},styles:{scrollbar:{marginTop:f,marginBottom:p}},onScrollPositionChange:l,children:[s,(0,co.jsx)(uo.Box,{className:C(c.shadow,c.topShadow,{[c.shadowVisible]:o}),sx:{top:f}}),(0,co.jsx)("div",{className:C(c.shadow,c.leftShadow,{[c.shadowVisible]:e})}),(0,co.jsx)("div",{className:C(c.shadow,c.rightShadow,{[c.shadowVisible]:r})}),(0,co.jsx)(uo.Box,{className:C(c.shadow,c.bottomShadow,{[c.shadowVisible]:t}),sx:{bottom:p}})]})}var w=require("react/jsx-runtime"),jr={},Bt=(0,V.createStyles)((o,{borderColor:e,rowBorderColor:r})=>{let t=typeof e=="function"?e(o):e,f=typeof r=="function"?r(o):r;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:o.colorScheme==="dark"?o.colors.dark[7]:o.white},"&&":{"thead tr th":{borderBottomColor:t},"tbody tr td":{borderTopColor:f}}},lastRowBorderBottomVisible:{"tbody tr:last-of-type td":{borderBottom:`1px solid ${f}`}},textSelectionDisabled:{userSelect:"none"},table:{borderCollapse:"separate",borderSpacing:0},tableWithBorder:{border:`1px solid ${t}`},tableWithColumnBorders:{"&&":{"th, td":{":not(:first-of-type)":{borderLeft:`1px solid ${f}`}}}},tableWithColumnBordersAndSelectableRecords:{thead:{"tr + tr":{th:{borderLeft:`1px solid ${f}`}}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function Ye({withBorder:o,borderRadius:e,borderColor:r=B=>B.colorScheme==="dark"?B.colors.dark[4]:B.colors.gray[3],rowBorderColor:t=B=>B.fn.rgba(B.colorScheme==="dark"?B.colors.dark[4]:B.colors.gray[3],.65),withColumnBorders:f,textSelectionDisabled:n,height:l="100%",minHeight:s,shadow:u,verticalAlignment:m="center",fetching:p,columns:C,groups:c,defaultColumnProps:I,defaultColumnRender:T,idAccessor:i="id",records:h,selectedRecords:g,onSelectedRecordsChange:D,isRecordSelectable:S,allRecordsSelectionCheckboxProps:G={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:v=(B,ro)=>({"aria-label":`Select record ${ro+1}`}),sortStatus:P,sortIcons:R,onSortStatusChange:H,horizontalSpacing:O,page:E,onPageChange:po,totalRecords:wo,recordsPerPage:Po,onRecordsPerPageChange:Fo,recordsPerPageOptions:Ro,recordsPerPageLabel:Mo="Records per page",paginationColor:ko,paginationSize:le="sm",paginationText:se=({from:B,to:ro,totalRecords:ao})=>`${B} - ${ro} / ${ao}`,paginationWrapBreakpoint:Wo="sm",getPaginationControlProps:de=B=>B==="previous"?{"aria-label":"Previous page"}:B==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:Jr,customLoader:oa,loaderSize:ea,loaderVariant:ra,loaderColor:aa,loadingText:ta="...",emptyState:fa,noRecordsText:_e="No records",noRecordsIcon:na,striped:la,noHeader:sa,onRowClick:ce,onCellClick:da,onScrollToTop:je,onScrollToBottom:Je,onScrollToLeft:or,onScrollToRight:er,rowContextMenu:N,rowExpansion:ca,rowClassName:ua,rowStyle:pa,rowSx:ma,customRowAttributes:xa,scrollViewportRef:Ia,scrollAreaProps:ia,bodyRef:ga,m:Ca,my:ha,mx:Sa,mt:ba,mb:Ba,ml:Da,mr:ya,sx:Ta,className:wa,classNames:Uo,style:Pa,styles:ue,...Fa}){let{ref:B,width:ro,height:ao}=(0,eo.useElementSize)(),zo=(0,L.useMemo)(()=>c?.flatMap(x=>x.columns)??C,[C,c]),{ref:Ra,height:pe}=(0,eo.useElementSize)(),{ref:Ma,width:me,height:vo}=(0,eo.useElementSize)(),{ref:ka,height:va}=(0,eo.useElementSize)(),{ref:Oa,height:rr}=(0,eo.useElementSize)(),[xe,ar]=(0,L.useState)(!0),[Ie,tr]=(0,L.useState)(!0),[Vo,fr]=(0,L.useState)(!0),[ie,nr]=(0,L.useState)(!0),{rowContextMenuInfo:to,setRowContextMenuInfo:mo}=Qr(p),Aa=Zr({rowExpansion:ca,records:h,idAccessor:i}),ge=(0,L.useCallback)(()=>{if(!p&&N&&mo(null),p||vo<=ao)ar(!0),tr(!0);else{let x=B.current.scrollTop,b=x===0,M=vo-x-ao<1;ar(b),tr(M),b&&b!==xe&&je?.(),M&&M!==Ie&&Je?.()}if(p||me===ro)fr(!0),nr(!0);else{let x=B.current.scrollLeft,b=x===0,M=me-x-ro<1;fr(b),nr(M),b&&b!==Vo&&or?.(),M&&M!==ie&&er?.()}},[p,Je,or,er,je,N,ao,B,ro,Ie,Vo,ie,xe,mo,vo,me]);Rr(ge,[ge]);let La=(0,L.useCallback)(x=>{B.current.scrollTo({top:0,left:0}),po(x)},[po,B]),Go=h?.length,lr=h?.map(x=>y(x,i)),Oo=!!g,Ao=g?.map(x=>y(x,i)),sr=lr!==void 0&&Ao!==void 0&&Ao.length>0,Ce=S?h?.filter(S):h,Xo=Ce?.map(x=>y(x,i)),Qo=sr&&Xo.every(x=>Ao.includes(x)),Ha=sr&&Xo.some(x=>Ao.includes(x)),Ea=(0,L.useCallback)(()=>{g&&D&&D(Qo?g.filter(x=>!Xo.includes(y(x,i))):Co([...g,...Ce],x=>y(x,i)))},[Qo,i,D,Xo,Ce,g]),{lastSelectionChangeIndex:Zo,setLastSelectionChangeIndex:Na}=Xr(lr),he=Oo&&!Vo,{cx:dr,classes:X,theme:qa}=Bt({borderColor:r,rowBorderColor:t}),Wa={m:Ca,my:ha,mx:Sa,mt:ba,mb:Ba,ml:Da,mr:ya},Ko=typeof ue=="function"?ue(qa,jr,jr):ue;return(0,w.jsxs)(V.Box,{...Wa,className:dr(X.root,{[X.tableWithBorder]:o},wa,Uo?.root),sx:[x=>({borderRadius:x.radius[e]||e,boxShadow:x.shadows[u]||u,height:l,minHeight:s}),...(0,V.packSx)(Ta)],style:{...Ko?.root,...Pa},children:[(0,w.jsx)($e,{viewportRef:(0,eo.useMergedRef)(B,Ia||null),topShadowVisible:!xe,leftShadowVisible:!(g||Vo),rightShadowVisible:!ie,bottomShadowVisible:!Ie,headerHeight:pe,footerHeight:va,onScrollPositionChange:ge,scrollAreaProps:ia,children:(0,w.jsxs)(V.Table,{ref:Ma,horizontalSpacing:O,className:dr(X.table,{[X.tableWithColumnBorders]:f,[X.lastRowBorderBottomVisible]:vo<ao,[X.textSelectionDisabled]:n,[X.verticalAlignmentTop]:m==="top",[X.verticalAlignmentBottom]:m==="bottom",[X.tableWithColumnBordersAndSelectableRecords]:Oo&&f}),striped:Go?la:!1,...Fa,children:[sa?null:(0,w.jsx)(Wr,{ref:Ra,className:Uo?.header,style:Ko?.header,columns:zo,defaultColumnProps:I,groups:c,sortStatus:P,sortIcons:R,onSortStatusChange:H,selectionVisible:Oo,selectionChecked:Qo,selectionIndeterminate:Ha&&!Qo,onSelectionChange:Ea,selectionCheckboxProps:G,leftShadowVisible:he}),(0,w.jsx)("tbody",{ref:ga,children:Go?h.map((x,b)=>{let M=y(x,i),Lo=Ao?.includes(M)||!1,$o=!1,Yo=!1;if(N){let{hidden:F}=N;(!F||!(typeof F=="function"?F(x,b):F))&&(N.trigger==="click"?$o=!0:Yo=!0)}let _o;D&&g&&(_o=F=>{if(F.nativeEvent.shiftKey&&Zo!==null){let xo=h.filter(b>Zo?(fo,no)=>no>=Zo&&no<=b&&(S?S(fo,no):!0):(fo,no)=>no>=b&&no<=Zo&&(S?S(fo,no):!0));D(Lo?oe(g,xo,fo=>y(fo,i)):Co([...g,...xo],fo=>y(fo,i)))}else D(Lo?g.filter(xo=>y(xo,i)!==M):Co([...g,x],xo=>y(xo,i)));Na(b)});let Ho;$o?Ho=F=>{mo({y:F.clientY,x:F.clientX,record:x,recordIndex:b}),ce?.(x,b,F)}:ce&&(Ho=F=>{ce(x,b,F)});let cr;return Yo&&(cr=F=>{F.preventDefault(),mo({y:F.clientY,x:F.clientX,record:x,recordIndex:b})}),(0,w.jsx)(Xe,{record:x,recordIndex:b,columns:zo,defaultColumnProps:I,defaultColumnRender:T,selectionVisible:Oo,selectionChecked:Lo,onSelectionChange:_o,isRecordSelectable:S,getSelectionCheckboxProps:v,onClick:Ho,onCellClick:da,onContextMenu:cr,contextMenuVisible:to?y(to.record,i)===M:!1,expansion:Aa,className:ua,style:pa,sx:ma,customRowAttributes:xa,leftShadowVisible:he},M)}):(0,w.jsx)(Be,{})}),zo.some(({footer:x})=>x)&&(0,w.jsx)(Ar,{ref:ka,className:Uo?.footer,style:Ko?.footer,borderColor:r,columns:zo,defaultColumnProps:I,selectionVisible:Oo,leftShadowVisible:he,scrollDiff:vo-ao})]})}),E&&(0,w.jsx)(Vr,{ref:Oa,className:Uo?.pagination,style:Ko?.pagination,topBorderColor:r,horizontalSpacing:O,fetching:p,page:E,onPageChange:La,totalRecords:wo,recordsPerPage:Po,onRecordsPerPageChange:Fo,recordsPerPageOptions:Ro,recordsPerPageLabel:Mo,paginationColor:ko,paginationSize:le,paginationText:se,paginationWrapBreakpoint:Wo,getPaginationControlProps:de,noRecordsText:_e,loadingText:ta,recordsLength:Go}),(0,w.jsx)(Ne,{pt:pe,pb:rr,fetching:p,backgroundBlur:Jr,customContent:oa,size:ea,variant:ra,color:aa}),(0,w.jsx)(Pe,{pt:pe,pb:rr,icon:na,text:_e,active:!p&&!Go,children:fa}),N&&to&&(0,w.jsx)(V.Portal,{children:(0,w.jsx)(Qe,{zIndex:N.zIndex,borderRadius:N.borderRadius,shadow:N.shadow,y:to.y,x:to.x,onDestroy:()=>mo(null),children:N.items(to.record,to.recordIndex).map(({divider:x,key:b,title:M,icon:Lo,color:$o,hidden:Yo,disabled:_o,onClick:Ho})=>x?(0,w.jsx)(Ze,{},b):Yo?null:(0,w.jsx)(Ke,{title:M??j(b),icon:Lo,color:$o,disabled:_o,onClick:()=>{mo(null),Ho()}},b))})})]})}a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|