mantine-datatable 2.5.6 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[![Downloads][downloads-image]][npm-url]
|
|
10
10
|
[![Language][language-image]][repo-url]
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
The "dark-theme aware" **table component** for your Mantine UI data-rich applications, featuring asynchronous data loading support, pagination, multiple rows selection, column sorting, custom cell data rendering, row context menu, row expansion, and more.
|
|
13
13
|
|
|
14
14
|
[](https://icflorescu.github.io/mantine-datatable/)
|
|
15
15
|
|
|
@@ -25,6 +25,8 @@ Install the package and its dependencies:
|
|
|
25
25
|
npm i @mantine/core @mantine/hooks @emotion/react mantine-datatable
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
If you're using Next.js, Vite, CRA, Remix or Gatsby, you might need to install additional dependencies. Please refer to Mantine's [getting started page](https://mantine.dev/pages/getting-started/) for more details.
|
|
29
|
+
|
|
28
30
|
Use it in your code:
|
|
29
31
|
|
|
30
32
|
```ts
|
|
@@ -74,7 +76,7 @@ export default function GettingStartedExample() {
|
|
|
74
76
|
}
|
|
75
77
|
```
|
|
76
78
|
|
|
77
|
-
|
|
79
|
+
Make sure to browse the comprehensive list of [usage examples](https://icflorescu.github.io/mantine-datatable/examples/basic-usage) to learn how to unleash the full power of Mantine DataTable.
|
|
78
80
|
|
|
79
81
|
## Other useful resources
|
|
80
82
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var Pa=Object.create;var Vo=Object.defineProperty;var Ra=Object.getOwnPropertyDescriptor;var ka=Object.getOwnPropertyNames;var Fa=Object.getPrototypeOf,Ma=Object.prototype.hasOwnProperty;var Oa=(o,e)=>()=>(o&&(e=o(o=0)),e);var Ie=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),va=(o,e)=>{for(var r in e)Vo(o,r,{get:e[r],enumerable:!0})},rr=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of ka(e))!Ma.call(o,f)&&f!==r&&Vo(o,f,{get:()=>e[f],enumerable:!(t=Ra(e,f))||t.enumerable});return o};var ar=(o,e,r)=>(r=o!=null?Pa(Fa(o)):{},rr(e||!o||!o.__esModule?Vo(r,"default",{value:o,enumerable:!0}):r,o)),Aa=o=>rr(Vo({},"__esModule",{value:!0}),o);var d,a=Oa(()=>{"use strict";d=ar(require("react"),1)});var nr=Ie((mt,fr)=>{"use strict";a();var Ha="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";fr.exports=Ha});var cr=Ie((It,sr)=>{"use strict";a();var Ea=nr();function lr(){}function dr(){}dr.resetWarningCache=lr;sr.exports=function(){function o(t,f,l,n,s,p){if(p!==Ea){var x=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 x.name="Invariant Violation",x}}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:dr,resetWarningCache:lr};return r.PropTypes=r,r}});var pr=Ie((St,ur)=>{a();ur.exports=cr()();var gt,Ct});var dt={};va(dt,{DataTable:()=>ze,differenceBy:()=>Qo,getValueAtPath:()=>ko,humanize:()=>po,uniqBy:()=>mo});module.exports=Aa(dt);a();a();var j=require("@mantine/core"),_=require("@mantine/hooks"),Q=require("react");a();var tr=require("@mantine/core"),ie=require("react/jsx-runtime"),La=(0,tr.createStyles)({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function ge(){let{classes:o}=La();return(0,ie.jsx)("tr",{className:o.root,children:(0,ie.jsx)("td",{})})}a();var co=require("@mantine/core");a();a();var Ro=require("react"),K=ar(pr());a();var mr={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 Na=Object.defineProperty,qa=Object.defineProperties,Wa=Object.getOwnPropertyDescriptors,Go=Object.getOwnPropertySymbols,ir=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable,xr=(o,e,r)=>e in o?Na(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Ir=(o,e)=>{for(var r in e||(e={}))ir.call(e,r)&&xr(o,r,e[r]);if(Go)for(var r of Go(e))gr.call(e,r)&&xr(o,r,e[r]);return o},za=(o,e)=>qa(o,Wa(e)),Ua=(o,e)=>{var r={};for(var t in o)ir.call(o,t)&&e.indexOf(t)<0&&(r[t]=o[t]);if(o!=null&&Go)for(var t of Go(o))e.indexOf(t)<0&&gr.call(o,t)&&(r[t]=o[t]);return r},$=(o,e,r)=>{let t=(0,Ro.forwardRef)((f,l)=>{var n=f,{color:s="currentColor",size:p=24,stroke:x=2,children:c}=n,u=Ua(n,["color","size","stroke","children"]);return(0,Ro.createElement)("svg",Ir(za(Ir({ref:l},mr),{width:p,height:p,stroke:s,strokeWidth:x,className:`tabler-icon tabler-icon-${o}`}),u),[...r.map(([I,m])=>(0,Ro.createElement)(I,m)),...c||[]])});return t.propTypes={color:K.default.string,size:K.default.oneOfType([K.default.string,K.default.number]),stroke:K.default.oneOfType([K.default.string,K.default.number])},t.displayName=`${e}`,t};a();var Ce=$("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 Se=$("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 he=$("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 be=$("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 U=require("react/jsx-runtime"),Va=(0,co.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 Be({icon:o,text:e,pt:r,pb:t,active:f,children:l}){let{classes:n,cx:s}=Va();return(0,U.jsx)(co.Center,{pt:r,pb:t,className:s(n.root,{[n.active]:f}),children:l||(0,U.jsxs)(U.Fragment,{children:[o||(0,U.jsx)("div",{className:n.standardIcon,children:(0,U.jsx)(he,{})}),(0,U.jsx)(co.Text,{size:"sm",color:"dimmed",children:e})]})})}a();var $o=require("@mantine/core"),Dr=require("react");a();var Zo=require("@mantine/core");a();var Cr=require("@mantine/core"),Sr=require("@mantine/hooks"),Xo=require("react"),hr=typeof window<"u"?Xo.useLayoutEffect:Xo.useEffect;function uo(o){let e=(0,Cr.useMantineTheme)(),r=typeof o=="function"?o(e):o;return(0,Sr.useMediaQuery)(r||"",!0)}function po(o){let e=o.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function Qo(o,e,r){return o.filter(t=>!e.map(r).includes(r(t)))}function mo(o,e){return o.filter((r,t,f)=>t===f.findIndex(l=>e(r)===e(l)))}function ko(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}function D(o,e){return typeof e=="string"?ko(o,e):e(o)}var br=require("react/jsx-runtime"),Ga=(0,Zo.createStyles)({noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function De({className:o,sx:e,style:r,visibleMediaQuery:t,title:f,noWrap:l,ellipsis:n,textAlignment:s,width:p}){let{cx:x,classes:c}=Ga();return uo(t)?(0,br.jsx)(Zo.Box,{component:"th",className:x({[c.noWrap]:l||n,[c.ellipsis]:n},o),sx:[{"&&":{textAlign:s},width:p,minWidth:p,maxWidth:p},e],style:r,children:f}):null}a();var Ko=require("@mantine/core"),Br=require("react/jsx-runtime"),Xa=(0,Ko.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,Ko.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 ye({shadowVisible:o}){let{cx:e,classes:r}=Xa();return(0,Br.jsx)("th",{className:e(r.root,{[r.shadowVisible]:o})})}var xo=require("react/jsx-runtime"),Qa=(0,$o.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"}}}),yr=(0,Dr.forwardRef)(function({className:e,style:r,borderColor:t,columns:f,selectionVisible:l,leftShadowVisible:n,scrollDiff:s},p){let{cx:x,classes:c}=Qa({scrollDiff:s,borderColor:t});return(0,xo.jsx)($o.Box,{component:"tfoot",ref:p,className:x(c.root,e),style:r,children:(0,xo.jsxs)("tr",{children:[l&&(0,xo.jsx)(ye,{shadowVisible:n}),f.map(({accessor:u,hidden:I,visibleMediaQuery:m,textAlignment:S,width:g,footer:h,footerClassName:C,footerStyle:O,footerSx:M,noWrap:L,ellipsis:R})=>I?null:(0,xo.jsx)(De,{className:C,style:O,sx:M,visibleMediaQuery:m,textAlignment:S,width:g,title:h,noWrap:L,ellipsis:R},u))]})})});a();var Tr=require("@mantine/core"),Pr=require("react");a();var T=require("@mantine/core"),wr=require("@mantine/hooks");var y=require("react/jsx-runtime"),Za=(0,T.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 Ka({children:o,isActive:e}){let[r,{close:t,toggle:f}]=(0,wr.useDisclosure)(!1);return(0,y.jsxs)(T.Popover,{withArrow:!0,withinPortal:!0,shadow:"md",opened:r,onClose:t,trapFocus:!0,children:[(0,y.jsx)(T.Popover.Target,{children:(0,y.jsx)(T.ActionIcon,{onClick:l=>{l.preventDefault(),f()},variant:e?"default":"subtle",children:(0,y.jsx)(be,{size:14})})}),(0,y.jsx)(T.Popover.Dropdown,{children:typeof o=="function"?o({close:t}):o})]})}function we({className:o,sx:e,style:r,accessor:t,visibleMediaQuery:f,title:l,sortable:n,sortIcons:s,textAlignment:p,width:x,sortStatus:c,onSortStatusChange:u,filter:I,filtering:m}){let{cx:S,classes:g}=Za();if(!uo(f))return null;let h=l??po(t),C=typeof h=="string"?h:void 0,O=n&&u?M=>{M?.defaultPrevented||u({columnAccessor:t,direction:c?.columnAccessor===t?c.direction==="asc"?"desc":"asc":c?.direction??"asc"})}:void 0;return(0,y.jsx)(T.Box,{component:"th",className:S({[g.sortableColumnHeader]:n},o),sx:[{"&&":{textAlign:p},width:x,minWidth:x,maxWidth:x},e],style:r,role:n?"button":void 0,tabIndex:n?0:void 0,onClick:O,onKeyDown:M=>M.key==="Enter"&&O?.(),children:(0,y.jsxs)(T.Group,{className:g.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[(0,y.jsx)(T.Box,{className:S(g.columnHeaderText,g.sortableColumnHeaderText),title:C,children:h}),n||c?.columnAccessor===t?(0,y.jsx)(y.Fragment,{children:c?.columnAccessor===t?(0,y.jsx)(T.Center,{className:S(g.sortableColumnHeaderIcon,{[g.sortableColumnHeaderIconRotated]:c.direction==="desc"}),role:"img","aria-label":`Sorted ${c.direction==="desc"?"descending":"ascending"}`,children:s?.sorted||(0,y.jsx)(Ce,{size:14})}):(0,y.jsx)(T.Center,{className:g.sortableColumnHeaderUnsortedIcon,role:"img","aria-label":"Not sorted",children:s?.unsorted||(0,y.jsx)(Se,{size:14})})}):null,I?(0,y.jsx)(Ka,{isActive:!!m,children:I}):null]})})}a();var Io=require("@mantine/core"),Te=require("react/jsx-runtime"),$a=(0,Io.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,Io.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 Pe({shadowVisible:o,checked:e,indeterminate:r,checkboxProps:t,onChange:f}){let{cx:l,classes:n}=$a();return(0,Te.jsx)("th",{className:l(n.root,{[n.shadowVisible]:o}),children:(0,Te.jsx)(Io.Checkbox,{classNames:{input:n.checkboxInput},checked:e,indeterminate:r,disabled:!f,onChange:f,...t})})}var io=require("react/jsx-runtime"),Ya=(0,Tr.createStyles)(o=>({root:{zIndex:2,position:"sticky",top:0,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white},textSelectionDisabled:{userSelect:"none"}})),Rr=(0,Pr.forwardRef)(function({className:e,style:r,sortStatus:t,sortIcons:f,onSortStatusChange:l,columns:n,selectionVisible:s,selectionChecked:p,selectionIndeterminate:x,onSelectionChange:c,selectionCheckboxProps:u,leftShadowVisible:I},m){let{classes:S,cx:g}=Ya();return(0,io.jsx)("thead",{className:g(S.root,e),style:r,ref:m,children:(0,io.jsxs)("tr",{children:[s&&(0,io.jsx)(Pe,{shadowVisible:I,checked:p,indeterminate:x,checkboxProps:u,onChange:c}),n.map(({accessor:h,hidden:C,visibleMediaQuery:O,textAlignment:M,width:L,title:R,sortable:v,titleClassName:k,titleStyle:H,titleSx:E,filter:J,filtering:bo})=>C?null:(0,io.jsx)(we,{className:k,style:H,sx:E,accessor:h,visibleMediaQuery:O,textAlignment:M,width:L,title:R,sortable:v,sortStatus:t,sortIcons:f,onSortStatusChange:l,filter:J,filtering:bo},h))]})})});a();var go=require("@mantine/core"),Re=require("react/jsx-runtime"),_a=(0,go.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 ke({pt:o,pb:e,fetching:r,customContent:t,backgroundBlur:f,size:l,variant:n,color:s}){let{classes:p,cx:x}=_a();return(0,Re.jsx)(go.Center,{pt:o,pb:e,className:x(p.root,{[p.fetching]:r}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:r&&(t||(0,Re.jsx)(go.Loader,{size:l,variant:n,color:s}))})}a();var Y=require("@mantine/core"),Fr=require("react");a();var A=require("@mantine/core"),q=require("react/jsx-runtime"),kr={xs:22,sm:26,md:32,lg:38,xl:44};function Fe({size:o,label:e,values:r,value:t,onChange:f,color:l}){return(0,q.jsxs)(A.Group,{spacing:"xs",children:[(0,q.jsx)(A.Text,{size:o,children:e}),(0,q.jsxs)(A.Menu,{withinPortal:!0,withArrow:!0,children:[(0,q.jsx)(A.Menu.Target,{children:(0,q.jsx)(A.Button,{size:o,variant:"default",sx:[{fontWeight:"normal"},n=>({height:kr[o],paddingLeft:n.spacing[o],paddingRight:n.spacing[o]})],children:t})}),(0,q.jsx)(A.Menu.Dropdown,{children:r.map(n=>{let s=n===t;return(0,q.jsx)(A.Menu.Item,{sx:[{height:kr[o]},p=>({"&&":{color:s?p.white:void 0},background:s?p.colors[l||p.primaryColor][6]:void 0})],disabled:s,onClick:()=>f(n),children:(0,q.jsx)(A.Text,{size:o,children:n})},n)})})]})]})}var Co=require("react/jsx-runtime"),ja=(0,Y.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}})),Mr=(0,Fr.forwardRef)(function({className:e,style:r,topBorderColor:t,fetching:f,page:l,onPageChange:n,paginationColor:s,paginationSize:p,loadingText:x,noRecordsText:c,paginationText:u,totalRecords:I,recordsPerPage:m,onRecordsPerPageChange:S,recordsPerPageLabel:g,recordsPerPageOptions:h,recordsLength:C,horizontalSpacing:O,paginationWrapBreakpoint:M,getPaginationControlProps:L},R){let v;if(f)v=x;else if(!I)v=c;else{let E=(l-1)*m+1,J=E+C-1;v=u({from:E,to:J,totalRecords:I})}let{classes:k,cx:H}=ja({topBorderColor:t,paginationWrapBreakpoint:M});return(0,Co.jsxs)(Y.Box,{ref:R,px:O??"xs",py:"xs",className:H(k.root,e),style:r,children:[(0,Co.jsx)(Y.Text,{className:k.text,size:p,children:v}),h&&(0,Co.jsx)(Fe,{size:p,label:g,values:h,color:s,value:m,onChange:S}),(0,Co.jsx)(Y.Pagination,{color:s,className:H(k.pagination,{[k.paginationFetching]:f||!C}),value:l,onChange:n,size:p,total:Math.ceil(I/m),getControlProps:L})]})});a();var jo=require("@mantine/core");a();var Yo=require("@mantine/core");var Or=require("react/jsx-runtime"),Ja=(0,Yo.createStyles)({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Me({className:o,sx:e,style:r,visibleMediaQuery:t,record:f,recordIndex:l,onClick:n,noWrap:s,ellipsis:p,textAlignment:x,width:c,accessor:u,render:I,defaultRender:m,customCellAttributes:S}){let{cx:g,classes:h}=Ja();return uo(t)?(0,Or.jsx)(Yo.Box,{component:"td",className:g({[h.noWrap]:s||p,[h.ellipsis]:p,[h.withPointerCursor]:n},o),sx:[{width:c,minWidth:c,maxWidth:c,textAlign:x},e],style:r,onClick:n,...S?.(f,l),children:I?I(f,l):m?m(f,l,u):ko(f,u)}):null}a();var _o=require("@mantine/core");a();var Oe=require("@mantine/hooks"),W=require("react");function vr(o){let[e,r]=(0,W.useState)(null),t=o?.join(":")||"";return(0,W.useEffect)(()=>{r(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function Ar(o){let[e,r]=(0,W.useState)(null);return(0,W.useEffect)(()=>{o&&r(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:r}}function Lr({rowExpansion:o,records:e,idAccessor:r}){let t=[];if(o&&e){let{trigger:s,allowMultiple:p,initiallyExpanded:x}=o;e&&s==="always"?t=e.map(c=>D(c,r)):x&&(t=e.filter(x).map(c=>D(c,r)),p||(t=[t[0]]))}let f,l,n=(0,W.useState)(t);if(o){let{trigger:s,allowMultiple:p,collapseProps:x,content:c}=o;o.expanded?{recordIds:f,onRecordIdsChange:l}=o.expanded:[f,l]=n;let u=I=>l?.(f.filter(m=>m!==D(I,r)));return{expandOnClick:s!=="always"&&s!=="never",isRowExpanded:I=>s==="always"?!0:f.includes(D(I,r)),expandRow:I=>{let m=D(I,r);l?.(p?[...f,m]:[m])},collapseRow:u,collapseProps:x,content:(I,m)=>()=>c({record:I,recordIndex:m,collapse:()=>u(I)})}}}function Hr(o,e){let[r,t]=(0,W.useState)(o),[f,l]=(0,W.useState)(o),n=(0,Oe.useTimeout)(()=>t(!0),0),s=(0,Oe.useTimeout)(()=>l(!1),e||200);return(0,W.useEffect)(()=>{o?(s.clear(),l(!0),n.start()):(n.clear(),t(!1),s.start())},[n,s,o]),{expanded:r,visible:f}}var V=require("react/jsx-runtime"),ot=(0,_o.createStyles)({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function ve({open:o,colSpan:e,content:r,collapseProps:t}){let{expanded:f,visible:l}=Hr(o,t?.transitionDuration),{cx:n,classes:s}=ot();return l?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("tr",{}),(0,V.jsx)("tr",{children:(0,V.jsx)("td",{className:n(s.cell,{[s.expandedCell]:f}),colSpan:e,children:(0,V.jsx)(_o.Collapse,{in:f,...t,children:r()})})})]}):null}a();var So=require("@mantine/core"),Ae=require("react/jsx-runtime"),et=(0,So.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,So.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 Le({record:o,recordIndex:e,withRightShadow:r,getCheckboxProps:t,...f}){let{cx:l,classes:n}=et();return(0,Ae.jsx)("td",{className:l(n.root,{[n.withRightShadow]:r}),onClick:s=>s.stopPropagation(),children:(0,Ae.jsx)(So.Checkbox,{classNames:{input:n.checkbox},...f,...t(o,e)})})}var G=require("react/jsx-runtime"),rt=(0,jo.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 He({record:o,recordIndex:e,columns:r,defaultColumnRender:t,selectionVisible:f,selectionChecked:l,onSelectionChange:n,isRecordSelectable:s,getSelectionCheckboxProps:p,onClick:x,onCellClick:c,onContextMenu:u,expansion:I,customRowAttributes:m,className:S,style:g,sx:h,contextMenuVisible:C,leftShadowVisible:O}){let{cx:M,classes:L}=rt();return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(jo.Box,{component:"tr",className:M({[L.withPointerCursor]:x||I?.expandOnClick,[L.selected]:l,[L.contextMenuVisible]:C},typeof S=="function"?S(o,e):S),onClick:R=>{if(I){let{isRowExpanded:v,expandOnClick:k,expandRow:H,collapseRow:E}=I;k&&(v(o)?E(o):H(o))}x?.(R)},style:typeof g=="function"?g(o,e):g,sx:h,...m?.(o,e),onContextMenu:u,children:[f&&(0,G.jsx)(Le,{record:o,recordIndex:e,withRightShadow:O,checked:l,disabled:!n||(s?!s(o,e):!1),onChange:n,getCheckboxProps:p}),r.map((R,v)=>{let{accessor:k,hidden:H,visibleMediaQuery:E,textAlignment:J,noWrap:bo,ellipsis:Jo,width:oe,render:ee,cellsClassName:Bo,cellsStyle:Do,cellsSx:re,customCellAttributes:ae}=R,Mo;return c&&(Mo=te=>c({event:te,record:o,recordIndex:e,column:R,columnIndex:v})),H?null:(0,G.jsx)(Me,{className:typeof Bo=="function"?Bo(o,e):Bo,style:typeof Do=="function"?Do(o,e):Do,sx:re,visibleMediaQuery:E,record:o,recordIndex:e,onClick:Mo,accessor:k,textAlignment:J,noWrap:bo,ellipsis:Jo,width:oe,render:ee,defaultRender:t,customCellAttributes:ae},k)})]}),I&&(0,G.jsx)(ve,{colSpan:r.filter(R=>!R.hidden).length+(f?1:0),open:I.isRowExpanded(o),content:I.content(o,e),collapseProps:I.collapseProps})]})}a();var ho=require("@mantine/core"),X=require("@mantine/hooks"),Er=require("react/jsx-runtime"),at=(0,ho.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 Ee({borderRadius:o="xs",shadow:e="sm",zIndex:r=3,y:t,x:f,onDestroy:l,children:n}){(0,X.useWindowEvent)("resize",l),(0,X.useWindowEvent)("scroll",l);let s=(0,X.useClickOutside)(l),{ref:p,width:x,height:c}=(0,X.useElementSize)(),u=(0,X.useMergedRef)(s,p),{innerWidth:I,innerHeight:m}=window,{classes:S,theme:{dir:g,spacing:h}}=at(),C=(0,ho.px)(h.md);return(0,Er.jsx)(ho.Paper,{ref:u,shadow:e,radius:o,className:S.root,sx:{zIndex:r,top:t+c+C>m?m-c-C:t,left:g==="ltr"?f+x+C>I?I-x-C:f:I-C-(f-x-C<0?x+C:f)},children:n})}a();var Nr=require("@mantine/core"),qr=require("react/jsx-runtime"),tt=(0,Nr.createStyles)(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function Ne(){let{classes:o}=tt();return(0,qr.jsx)("div",{className:o.root})}a();var z=require("@mantine/core"),Fo=require("react/jsx-runtime"),ft=(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 qe({icon:o,title:e,color:r,disabled:t,onClick:f}){let{classes:l}=ft({color:r});return(0,Fo.jsxs)(z.UnstyledButton,{className:l.root,disabled:t,onClick:f,children:[o&&(0,Fo.jsx)(z.Box,{className:l.icon,children:o}),(0,Fo.jsx)(z.Text,{className:l.title,size:"sm",children:e})]})}a();var no=require("@mantine/core"),fo=require("react/jsx-runtime"),nt=(0,no.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 We({topShadowVisible:o,leftShadowVisible:e,rightShadowVisible:r,bottomShadowVisible:t,headerHeight:f,footerHeight:l,onScrollPositionChange:n,children:s,viewportRef:p}){let x=l?l-1:0,{cx:c,classes:u}=nt();return(0,fo.jsxs)(no.ScrollArea,{viewportRef:p,classNames:{root:u.root,scrollbar:u.scrollbar,thumb:u.thumb,corner:u.corner},styles:{scrollbar:{marginTop:f,marginBottom:x}},onScrollPositionChange:n,children:[s,(0,fo.jsx)(no.Box,{className:c(u.shadow,u.topShadow,{[u.shadowVisible]:o}),sx:{top:f}}),(0,fo.jsx)("div",{className:c(u.shadow,u.leftShadow,{[u.shadowVisible]:e})}),(0,fo.jsx)("div",{className:c(u.shadow,u.rightShadow,{[u.shadowVisible]:r})}),(0,fo.jsx)(no.Box,{className:c(u.shadow,u.bottomShadow,{[u.shadowVisible]:t}),sx:{bottom:x}})]})}var P=require("react/jsx-runtime"),Wr={},lt=(0,j.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}`}}}},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:p,verticalAlignment:x="center",fetching:c,columns:u,defaultColumnRender:I,idAccessor:m="id",records:S,selectedRecords:g,onSelectedRecordsChange:h,isRecordSelectable:C,allRecordsSelectionCheckboxProps:O={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:M=(B,oo)=>({"aria-label":`Select record ${oo+1}`}),sortStatus:L,sortIcons:R,onSortStatusChange:v,horizontalSpacing:k,page:H,onPageChange:E,totalRecords:J,recordsPerPage:bo,onRecordsPerPageChange:Jo,recordsPerPageOptions:oe,recordsPerPageLabel:ee="Records per page",paginationColor:Bo,paginationSize:Do="sm",paginationText:re=({from:B,to:oo,totalRecords:eo})=>`${B} - ${oo} / ${eo}`,paginationWrapBreakpoint:ae="sm",getPaginationControlProps:Mo=B=>B==="previous"?{"aria-label":"Previous page"}:B==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:te,customLoader:zr,loaderSize:Ur,loaderVariant:Vr,loaderColor:Gr,loadingText:Xr="...",emptyState:Qr,noRecordsText:Ue="No records",noRecordsIcon:Zr,striped:Kr,noHeader:$r,onRowClick:fe,onCellClick:Yr,onScrollToTop:Ve,onScrollToBottom:Ge,onScrollToLeft:Xe,onScrollToRight:Qe,rowContextMenu:N,rowExpansion:_r,rowClassName:jr,rowStyle:Jr,rowSx:oa,customRowAttributes:ea,scrollViewportRef:ra,bodyRef:aa,m:ta,my:fa,mx:na,mt:la,mb:da,ml:sa,mr:ca,sx:ua,className:pa,classNames:Oo,style:ma,styles:ne,...xa}){let{ref:B,width:oo,height:eo}=(0,_.useElementSize)(),{ref:Ia,height:le}=(0,_.useElementSize)(),{ref:ia,width:de,height:yo}=(0,_.useElementSize)(),{ref:ga,height:Ca}=(0,_.useElementSize)(),{ref:Sa,height:Ze}=(0,_.useElementSize)(),[se,Ke]=(0,Q.useState)(!0),[ce,$e]=(0,Q.useState)(!0),[vo,Ye]=(0,Q.useState)(!0),[ue,_e]=(0,Q.useState)(!0),{rowContextMenuInfo:ro,setRowContextMenuInfo:lo}=Ar(c),ha=Lr({rowExpansion:_r,records:S,idAccessor:m}),pe=(0,Q.useCallback)(()=>{if(!c&&N&&lo(null),c||yo<=eo)Ke(!0),$e(!0);else{let i=B.current.scrollTop,b=i===0,F=yo-i-eo<1;Ke(b),$e(F),b&&b!==se&&Ve?.(),F&&F!==ce&&Ge?.()}if(c||de===oo)Ye(!0),_e(!0);else{let i=B.current.scrollLeft,b=i===0,F=de-i-oo<1;Ye(b),_e(F),b&&b!==vo&&Xe?.(),F&&F!==ue&&Qe?.()}},[c,Ge,Xe,Qe,Ve,N,eo,B,oo,ce,vo,ue,se,lo,yo,de]);hr(pe,[pe]);let ba=(0,Q.useCallback)(i=>{B.current.scrollTo({top:0,left:0}),E(i)},[E,B]),Ao=S?.length,je=S?.map(i=>D(i,m)),Lo=!!g,wo=g?.map(i=>D(i,m)),Je=je!==void 0&&wo!==void 0&&wo.length>0,me=C?S?.filter(C):S,Ho=me?.map(i=>D(i,m)),Eo=Je&&Ho.every(i=>wo.includes(i)),Ba=Je&&Ho.some(i=>wo.includes(i)),Da=(0,Q.useCallback)(()=>{h?.(Eo?g.filter(i=>!Ho.includes(D(i,m))):mo([...g,...me],i=>D(i,m)))},[Eo,m,h,Ho,me,g]),{lastSelectionChangeIndex:No,setLastSelectionChangeIndex:ya}=vr(je),xe=Lo&&!vo,{cx:or,classes:Z,theme:wa}=lt({borderColor:r,rowBorderColor:t}),Ta={m:ta,my:fa,mx:na,mt:la,mb:da,ml:sa,mr:ca},qo=typeof ne=="function"?ne(wa,Wr,Wr):ne;return(0,P.jsxs)(j.Box,{...Ta,className:or(Z.root,{[Z.tableWithBorder]:o},pa,Oo?.root),sx:[i=>({borderRadius:i.radius[e]||e,boxShadow:i.shadows[p]||p,height:n,minHeight:s}),...(0,j.packSx)(ua)],style:{...qo?.root,...ma},children:[(0,P.jsx)(We,{viewportRef:(0,_.useMergedRef)(B,ra||null),topShadowVisible:!se,leftShadowVisible:!(g||vo),rightShadowVisible:!ue,bottomShadowVisible:!ce,headerHeight:le,footerHeight:Ca,onScrollPositionChange:pe,children:(0,P.jsxs)(j.Table,{ref:ia,horizontalSpacing:k,className:or(Z.table,{[Z.tableWithColumnBorders]:f,[Z.lastRowBorderBottomVisible]:yo<eo,[Z.textSelectionDisabled]:l,[Z.verticalAlignmentTop]:x==="top",[Z.verticalAlignmentBottom]:x==="bottom"}),striped:Ao?Kr:!1,...xa,children:[$r?null:(0,P.jsx)(Rr,{ref:Ia,className:Oo?.header,style:qo?.header,columns:u,sortStatus:L,sortIcons:R,onSortStatusChange:v,selectionVisible:Lo,selectionChecked:Eo,selectionIndeterminate:Ba&&!Eo,onSelectionChange:Da,selectionCheckboxProps:O,leftShadowVisible:xe}),(0,P.jsx)("tbody",{ref:aa,children:Ao?S.map((i,b)=>{let F=D(i,m),To=wo?.includes(F)||!1,Wo=!1,zo=!1;if(N){let{hidden:w}=N;(!w||!(typeof w=="function"?w(i,b):w))&&(N.trigger==="click"?Wo=!0:zo=!0)}let Uo;h&&(Uo=w=>{if(w.nativeEvent.shiftKey&&No!==null){let so=S.filter(b>No?(ao,to)=>to>=No&&to<=b&&(C?C(ao,to):!0):(ao,to)=>to>=b&&to<=No&&(C?C(ao,to):!0));h(To?Qo(g,so,ao=>D(ao,m)):mo([...g,...so],ao=>D(ao,m)))}else h(To?g.filter(so=>D(so,m)!==F):mo([...g,i],so=>D(so,m)));ya(b)});let Po;Wo?Po=w=>{lo({y:w.clientY,x:w.clientX,record:i,recordIndex:b}),fe?.(i,b,w)}:fe&&(Po=w=>{fe(i,b,w)});let er;return zo&&(er=w=>{w.preventDefault(),lo({y:w.clientY,x:w.clientX,record:i,recordIndex:b})}),(0,P.jsx)(He,{record:i,recordIndex:b,columns:u,defaultColumnRender:I,selectionVisible:Lo,selectionChecked:To,onSelectionChange:Uo,isRecordSelectable:C,getSelectionCheckboxProps:M,onClick:Po,onCellClick:Yr,onContextMenu:er,contextMenuVisible:ro?D(ro.record,m)===F:!1,expansion:ha,className:jr,style:Jr,sx:oa,customRowAttributes:ea,leftShadowVisible:xe},F)}):(0,P.jsx)(ge,{})}),u.some(i=>i.footer)&&(0,P.jsx)(yr,{ref:ga,className:Oo?.footer,style:qo?.footer,borderColor:r,columns:u,selectionVisible:Lo,leftShadowVisible:xe,scrollDiff:yo-eo})]})}),H&&(0,P.jsx)(Mr,{ref:Sa,className:Oo?.pagination,style:qo?.pagination,topBorderColor:r,horizontalSpacing:k,fetching:c,page:H,onPageChange:ba,totalRecords:J,recordsPerPage:bo,onRecordsPerPageChange:Jo,recordsPerPageOptions:oe,recordsPerPageLabel:ee,paginationColor:Bo,paginationSize:Do,paginationText:re,paginationWrapBreakpoint:ae,getPaginationControlProps:Mo,noRecordsText:Ue,loadingText:Xr,recordsLength:Ao}),(0,P.jsx)(ke,{pt:le,pb:Ze,fetching:c,backgroundBlur:te,customContent:zr,size:Ur,variant:Vr,color:Gr}),(0,P.jsx)(Be,{pt:le,pb:Ze,icon:Zr,text:Ue,active:!c&&!Ao,children:Qr}),N&&ro&&(0,P.jsx)(Ee,{zIndex:N.zIndex,borderRadius:N.borderRadius,shadow:N.shadow,y:ro.y,x:ro.x,onDestroy:()=>lo(null),children:N.items(ro.record,ro.recordIndex).map(({divider:i,key:b,title:F,icon:To,color:Wo,hidden:zo,disabled:Uo,onClick:Po})=>i?(0,P.jsx)(Ne,{},b):zo?null:(0,P.jsx)(qe,{title:F??po(b),icon:To,color:Wo,disabled:Uo,onClick:()=>{lo(null),Po()}},b))})]})}a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();
|
|
1
|
+
"use strict";var Pa=Object.create;var Vo=Object.defineProperty;var Ra=Object.getOwnPropertyDescriptor;var ka=Object.getOwnPropertyNames;var Fa=Object.getPrototypeOf,Ma=Object.prototype.hasOwnProperty;var Oa=(o,e)=>()=>(o&&(e=o(o=0)),e);var Ie=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),va=(o,e)=>{for(var r in e)Vo(o,r,{get:e[r],enumerable:!0})},rr=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of ka(e))!Ma.call(o,f)&&f!==r&&Vo(o,f,{get:()=>e[f],enumerable:!(t=Ra(e,f))||t.enumerable});return o};var ar=(o,e,r)=>(r=o!=null?Pa(Fa(o)):{},rr(e||!o||!o.__esModule?Vo(r,"default",{value:o,enumerable:!0}):r,o)),Aa=o=>rr(Vo({},"__esModule",{value:!0}),o);var d,a=Oa(()=>{"use strict";d=ar(require("react"),1)});var nr=Ie((mt,fr)=>{"use strict";a();var Ha="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";fr.exports=Ha});var cr=Ie((It,sr)=>{"use strict";a();var Ea=nr();function lr(){}function dr(){}dr.resetWarningCache=lr;sr.exports=function(){function o(t,f,l,n,s,p){if(p!==Ea){var x=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 x.name="Invariant Violation",x}}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:dr,resetWarningCache:lr};return r.PropTypes=r,r}});var pr=Ie((St,ur)=>{a();ur.exports=cr()();var gt,Ct});var dt={};va(dt,{DataTable:()=>ze,differenceBy:()=>Qo,getValueAtPath:()=>ko,humanize:()=>po,uniqBy:()=>mo});module.exports=Aa(dt);a();a();var j=require("@mantine/core"),_=require("@mantine/hooks"),Q=require("react");a();var tr=require("@mantine/core"),ie=require("react/jsx-runtime"),La=(0,tr.createStyles)({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function ge(){let{classes:o}=La();return(0,ie.jsx)("tr",{className:o.root,children:(0,ie.jsx)("td",{})})}a();var co=require("@mantine/core");a();a();var Ro=require("react"),K=ar(pr());a();var mr={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 Na=Object.defineProperty,qa=Object.defineProperties,Wa=Object.getOwnPropertyDescriptors,Go=Object.getOwnPropertySymbols,ir=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable,xr=(o,e,r)=>e in o?Na(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Ir=(o,e)=>{for(var r in e||(e={}))ir.call(e,r)&&xr(o,r,e[r]);if(Go)for(var r of Go(e))gr.call(e,r)&&xr(o,r,e[r]);return o},za=(o,e)=>qa(o,Wa(e)),Ua=(o,e)=>{var r={};for(var t in o)ir.call(o,t)&&e.indexOf(t)<0&&(r[t]=o[t]);if(o!=null&&Go)for(var t of Go(o))e.indexOf(t)<0&&gr.call(o,t)&&(r[t]=o[t]);return r},$=(o,e,r)=>{let t=(0,Ro.forwardRef)((f,l)=>{var n=f,{color:s="currentColor",size:p=24,stroke:x=2,children:c}=n,u=Ua(n,["color","size","stroke","children"]);return(0,Ro.createElement)("svg",Ir(za(Ir({ref:l},mr),{width:p,height:p,stroke:s,strokeWidth:x,className:`tabler-icon tabler-icon-${o}`}),u),[...r.map(([I,m])=>(0,Ro.createElement)(I,m)),...c||[]])});return t.propTypes={color:K.default.string,size:K.default.oneOfType([K.default.string,K.default.number]),stroke:K.default.oneOfType([K.default.string,K.default.number])},t.displayName=`${e}`,t};a();var Ce=$("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 Se=$("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 he=$("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 be=$("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 U=require("react/jsx-runtime"),Va=(0,co.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 Be({icon:o,text:e,pt:r,pb:t,active:f,children:l}){let{classes:n,cx:s}=Va();return(0,U.jsx)(co.Center,{pt:r,pb:t,className:s(n.root,{[n.active]:f}),children:l||(0,U.jsxs)(U.Fragment,{children:[o||(0,U.jsx)("div",{className:n.standardIcon,children:(0,U.jsx)(he,{})}),(0,U.jsx)(co.Text,{size:"sm",color:"dimmed",children:e})]})})}a();var $o=require("@mantine/core"),Dr=require("react");a();var Zo=require("@mantine/core");a();var Cr=require("@mantine/core"),Sr=require("@mantine/hooks"),Xo=require("react"),hr=typeof window<"u"?Xo.useLayoutEffect:Xo.useEffect;function uo(o){let e=(0,Cr.useMantineTheme)(),r=typeof o=="function"?o(e):o;return(0,Sr.useMediaQuery)(r||"",!0)}function po(o){let e=o.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function Qo(o,e,r){return o.filter(t=>!e.map(r).includes(r(t)))}function mo(o,e){return o.filter((r,t,f)=>t===f.findIndex(l=>e(r)===e(l)))}function ko(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}function D(o,e){return typeof e=="string"?ko(o,e):e(o)}var br=require("react/jsx-runtime"),Ga=(0,Zo.createStyles)({noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function De({className:o,sx:e,style:r,visibleMediaQuery:t,title:f,noWrap:l,ellipsis:n,textAlignment:s,width:p}){let{cx:x,classes:c}=Ga();return uo(t)?(0,br.jsx)(Zo.Box,{component:"th",className:x({[c.noWrap]:l||n,[c.ellipsis]:n},o),sx:[{"&&":{textAlign:s},width:p,minWidth:p,maxWidth:p},e],style:r,children:f}):null}a();var Ko=require("@mantine/core"),Br=require("react/jsx-runtime"),Xa=(0,Ko.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,Ko.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 ye({shadowVisible:o}){let{cx:e,classes:r}=Xa();return(0,Br.jsx)("th",{className:e(r.root,{[r.shadowVisible]:o})})}var xo=require("react/jsx-runtime"),Qa=(0,$o.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"}}}),yr=(0,Dr.forwardRef)(function({className:e,style:r,borderColor:t,columns:f,selectionVisible:l,leftShadowVisible:n,scrollDiff:s},p){let{cx:x,classes:c}=Qa({scrollDiff:s,borderColor:t});return(0,xo.jsx)($o.Box,{component:"tfoot",ref:p,className:x(c.root,e),style:r,children:(0,xo.jsxs)("tr",{children:[l&&(0,xo.jsx)(ye,{shadowVisible:n}),f.map(({accessor:u,hidden:I,visibleMediaQuery:m,textAlignment:S,width:g,footer:h,footerClassName:C,footerStyle:O,footerSx:M,noWrap:L,ellipsis:R})=>I?null:(0,xo.jsx)(De,{className:C,style:O,sx:M,visibleMediaQuery:m,textAlignment:S,width:g,title:h,noWrap:L,ellipsis:R},u))]})})});a();var wr=require("@mantine/core"),Pr=require("react");a();var w=require("@mantine/core"),Tr=require("@mantine/hooks");var y=require("react/jsx-runtime"),Za=(0,w.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 Ka({children:o,isActive:e}){let[r,{close:t,toggle:f}]=(0,Tr.useDisclosure)(!1);return(0,y.jsxs)(w.Popover,{withArrow:!0,withinPortal:!0,shadow:"md",opened:r,onClose:t,trapFocus:!0,children:[(0,y.jsx)(w.Popover.Target,{children:(0,y.jsx)(w.ActionIcon,{onClick:l=>{l.preventDefault(),f()},variant:e?"default":"subtle",children:(0,y.jsx)(be,{size:14})})}),(0,y.jsx)(w.Popover.Dropdown,{children:typeof o=="function"?o({close:t}):o})]})}function Te({className:o,sx:e,style:r,accessor:t,visibleMediaQuery:f,title:l,sortable:n,sortIcons:s,textAlignment:p,width:x,sortStatus:c,onSortStatusChange:u,filter:I,filtering:m}){let{cx:S,classes:g}=Za();if(!uo(f))return null;let h=l??po(t),C=typeof h=="string"?h:void 0,O=n&&u?M=>{M?.defaultPrevented||u({columnAccessor:t,direction:c?.columnAccessor===t?c.direction==="asc"?"desc":"asc":c?.direction??"asc"})}:void 0;return(0,y.jsx)(w.Box,{component:"th",className:S({[g.sortableColumnHeader]:n},o),sx:[{"&&":{textAlign:p},width:x,minWidth:x,maxWidth:x},e],style:r,role:n?"button":void 0,tabIndex:n?0:void 0,onClick:O,onKeyDown:M=>M.key==="Enter"&&O?.(),children:(0,y.jsxs)(w.Group,{className:g.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[(0,y.jsx)(w.Box,{className:S(g.columnHeaderText,g.sortableColumnHeaderText),title:C,children:h}),n||c?.columnAccessor===t?(0,y.jsx)(y.Fragment,{children:c?.columnAccessor===t?(0,y.jsx)(w.Center,{className:S(g.sortableColumnHeaderIcon,{[g.sortableColumnHeaderIconRotated]:c.direction==="desc"}),role:"img","aria-label":`Sorted ${c.direction==="desc"?"descending":"ascending"}`,children:s?.sorted||(0,y.jsx)(Ce,{size:14})}):(0,y.jsx)(w.Center,{className:g.sortableColumnHeaderUnsortedIcon,role:"img","aria-label":"Not sorted",children:s?.unsorted||(0,y.jsx)(Se,{size:14})})}):null,I?(0,y.jsx)(Ka,{isActive:!!m,children:I}):null]})})}a();var Io=require("@mantine/core"),we=require("react/jsx-runtime"),$a=(0,Io.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,Io.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 Pe({shadowVisible:o,checked:e,indeterminate:r,checkboxProps:t,onChange:f}){let{cx:l,classes:n}=$a();return(0,we.jsx)("th",{className:l(n.root,{[n.shadowVisible]:o}),children:(0,we.jsx)(Io.Checkbox,{classNames:{input:n.checkboxInput},checked:e,indeterminate:r,disabled:!f,onChange:f,...t})})}var io=require("react/jsx-runtime"),Ya=(0,wr.createStyles)(o=>({root:{zIndex:2,position:"sticky",top:0,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white},textSelectionDisabled:{userSelect:"none"}})),Rr=(0,Pr.forwardRef)(function({className:e,style:r,sortStatus:t,sortIcons:f,onSortStatusChange:l,columns:n,selectionVisible:s,selectionChecked:p,selectionIndeterminate:x,onSelectionChange:c,selectionCheckboxProps:u,leftShadowVisible:I},m){let{classes:S,cx:g}=Ya();return(0,io.jsx)("thead",{className:g(S.root,e),style:r,ref:m,children:(0,io.jsxs)("tr",{children:[s&&(0,io.jsx)(Pe,{shadowVisible:I,checked:p,indeterminate:x,checkboxProps:u,onChange:c}),n.map(({accessor:h,hidden:C,visibleMediaQuery:O,textAlignment:M,width:L,title:R,sortable:v,titleClassName:k,titleStyle:H,titleSx:E,filter:J,filtering:bo})=>C?null:(0,io.jsx)(Te,{className:k,style:H,sx:E,accessor:h,visibleMediaQuery:O,textAlignment:M,width:L,title:R,sortable:v,sortStatus:t,sortIcons:f,onSortStatusChange:l,filter:J,filtering:bo},h))]})})});a();var go=require("@mantine/core"),Re=require("react/jsx-runtime"),_a=(0,go.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 ke({pt:o,pb:e,fetching:r,customContent:t,backgroundBlur:f,size:l,variant:n,color:s}){let{classes:p,cx:x}=_a();return(0,Re.jsx)(go.Center,{pt:o,pb:e,className:x(p.root,{[p.fetching]:r}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:r&&(t||(0,Re.jsx)(go.Loader,{size:l,variant:n,color:s}))})}a();var Y=require("@mantine/core"),Fr=require("react");a();var A=require("@mantine/core"),q=require("react/jsx-runtime"),kr={xs:22,sm:26,md:32,lg:38,xl:44};function Fe({size:o,label:e,values:r,value:t,onChange:f,color:l}){return(0,q.jsxs)(A.Group,{spacing:"xs",children:[(0,q.jsx)(A.Text,{size:o,children:e}),(0,q.jsxs)(A.Menu,{withinPortal:!0,withArrow:!0,children:[(0,q.jsx)(A.Menu.Target,{children:(0,q.jsx)(A.Button,{size:o,variant:"default",sx:[{fontWeight:"normal"},n=>({height:kr[o],paddingLeft:n.spacing[o],paddingRight:n.spacing[o]})],children:t})}),(0,q.jsx)(A.Menu.Dropdown,{children:r.map(n=>{let s=n===t;return(0,q.jsx)(A.Menu.Item,{sx:[{height:kr[o]},p=>({"&&":{color:s?p.white:void 0},background:s?p.colors[l||p.primaryColor][6]:void 0})],disabled:s,onClick:()=>f(n),children:(0,q.jsx)(A.Text,{size:o,children:n})},n)})})]})]})}var Co=require("react/jsx-runtime"),ja=(0,Y.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}})),Mr=(0,Fr.forwardRef)(function({className:e,style:r,topBorderColor:t,fetching:f,page:l,onPageChange:n,paginationColor:s,paginationSize:p,loadingText:x,noRecordsText:c,paginationText:u,totalRecords:I,recordsPerPage:m,onRecordsPerPageChange:S,recordsPerPageLabel:g,recordsPerPageOptions:h,recordsLength:C,horizontalSpacing:O,paginationWrapBreakpoint:M,getPaginationControlProps:L},R){let v;if(f)v=x;else if(!I)v=c;else{let E=(l-1)*m+1,J=E+C-1;v=u({from:E,to:J,totalRecords:I})}let{classes:k,cx:H}=ja({topBorderColor:t,paginationWrapBreakpoint:M});return(0,Co.jsxs)(Y.Box,{ref:R,px:O??"xs",py:"xs",className:H(k.root,e),style:r,children:[(0,Co.jsx)(Y.Text,{className:k.text,size:p,children:v}),h&&(0,Co.jsx)(Fe,{size:p,label:g,values:h,color:s,value:m,onChange:S}),(0,Co.jsx)(Y.Pagination,{color:s,className:H(k.pagination,{[k.paginationFetching]:f||!C}),value:l,onChange:n,size:p,total:Math.ceil(I/m),getControlProps:L})]})});a();var jo=require("@mantine/core");a();var Yo=require("@mantine/core");var Or=require("react/jsx-runtime"),Ja=(0,Yo.createStyles)({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Me({className:o,sx:e,style:r,visibleMediaQuery:t,record:f,recordIndex:l,onClick:n,noWrap:s,ellipsis:p,textAlignment:x,width:c,accessor:u,render:I,defaultRender:m,customCellAttributes:S}){let{cx:g,classes:h}=Ja();return uo(t)?(0,Or.jsx)(Yo.Box,{component:"td",className:g({[h.noWrap]:s||p,[h.ellipsis]:p,[h.withPointerCursor]:n},o),sx:[{width:c,minWidth:c,maxWidth:c,textAlign:x},e],style:r,onClick:n,...S?.(f,l),children:I?I(f,l):m?m(f,l,u):ko(f,u)}):null}a();var _o=require("@mantine/core");a();var Oe=require("@mantine/hooks"),W=require("react");function vr(o){let[e,r]=(0,W.useState)(null),t=o?.join(":")||"";return(0,W.useEffect)(()=>{r(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function Ar(o){let[e,r]=(0,W.useState)(null);return(0,W.useEffect)(()=>{o&&r(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:r}}function Lr({rowExpansion:o,records:e,idAccessor:r}){let t=[];if(o&&e){let{trigger:s,allowMultiple:p,initiallyExpanded:x}=o;e&&s==="always"?t=e.map(c=>D(c,r)):x&&(t=e.filter(x).map(c=>D(c,r)),p||(t=[t[0]]))}let f,l,n=(0,W.useState)(t);if(o){let{trigger:s,allowMultiple:p,collapseProps:x,content:c}=o;o.expanded?{recordIds:f,onRecordIdsChange:l}=o.expanded:[f,l]=n;let u=I=>l?.(f.filter(m=>m!==D(I,r)));return{expandOnClick:s!=="always"&&s!=="never",isRowExpanded:I=>s==="always"?!0:f.includes(D(I,r)),expandRow:I=>{let m=D(I,r);l?.(p?[...f,m]:[m])},collapseRow:u,collapseProps:x,content:(I,m)=>()=>c({record:I,recordIndex:m,collapse:()=>u(I)})}}}function Hr(o,e){let[r,t]=(0,W.useState)(o),[f,l]=(0,W.useState)(o),n=(0,Oe.useTimeout)(()=>t(!0),0),s=(0,Oe.useTimeout)(()=>l(!1),e||200);return(0,W.useEffect)(()=>{o?(s.clear(),l(!0),n.start()):(n.clear(),t(!1),s.start())},[n,s,o]),{expanded:r,visible:f}}var V=require("react/jsx-runtime"),ot=(0,_o.createStyles)({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function ve({open:o,colSpan:e,content:r,collapseProps:t}){let{expanded:f,visible:l}=Hr(o,t?.transitionDuration),{cx:n,classes:s}=ot();return l?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("tr",{}),(0,V.jsx)("tr",{children:(0,V.jsx)("td",{className:n(s.cell,{[s.expandedCell]:f}),colSpan:e,children:(0,V.jsx)(_o.Collapse,{in:f,...t,children:r()})})})]}):null}a();var So=require("@mantine/core"),Ae=require("react/jsx-runtime"),et=(0,So.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,So.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 Le({record:o,recordIndex:e,withRightShadow:r,getCheckboxProps:t,...f}){let{cx:l,classes:n}=et();return(0,Ae.jsx)("td",{className:l(n.root,{[n.withRightShadow]:r}),onClick:s=>s.stopPropagation(),children:(0,Ae.jsx)(So.Checkbox,{classNames:{input:n.checkbox},...f,...t(o,e)})})}var G=require("react/jsx-runtime"),rt=(0,jo.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 He({record:o,recordIndex:e,columns:r,defaultColumnRender:t,selectionVisible:f,selectionChecked:l,onSelectionChange:n,isRecordSelectable:s,getSelectionCheckboxProps:p,onClick:x,onCellClick:c,onContextMenu:u,expansion:I,customRowAttributes:m,className:S,style:g,sx:h,contextMenuVisible:C,leftShadowVisible:O}){let{cx:M,classes:L}=rt();return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(jo.Box,{component:"tr",className:M({[L.withPointerCursor]:x||I?.expandOnClick,[L.selected]:l,[L.contextMenuVisible]:C},typeof S=="function"?S(o,e):S),onClick:R=>{if(I){let{isRowExpanded:v,expandOnClick:k,expandRow:H,collapseRow:E}=I;k&&(v(o)?E(o):H(o))}x?.(R)},style:typeof g=="function"?g(o,e):g,sx:h,...m?.(o,e),onContextMenu:u,children:[f&&(0,G.jsx)(Le,{record:o,recordIndex:e,withRightShadow:O,checked:l,disabled:!n||(s?!s(o,e):!1),onChange:n,getCheckboxProps:p}),r.map((R,v)=>{let{accessor:k,hidden:H,visibleMediaQuery:E,textAlignment:J,noWrap:bo,ellipsis:Jo,width:oe,render:ee,cellsClassName:Bo,cellsStyle:Do,cellsSx:re,customCellAttributes:ae}=R,Mo;return c&&(Mo=te=>c({event:te,record:o,recordIndex:e,column:R,columnIndex:v})),H?null:(0,G.jsx)(Me,{className:typeof Bo=="function"?Bo(o,e):Bo,style:typeof Do=="function"?Do(o,e):Do,sx:re,visibleMediaQuery:E,record:o,recordIndex:e,onClick:Mo,accessor:k,textAlignment:J,noWrap:bo,ellipsis:Jo,width:oe,render:ee,defaultRender:t,customCellAttributes:ae},k)})]}),I&&(0,G.jsx)(ve,{colSpan:r.filter(R=>!R.hidden).length+(f?1:0),open:I.isRowExpanded(o),content:I.content(o,e),collapseProps:I.collapseProps})]})}a();var ho=require("@mantine/core"),X=require("@mantine/hooks"),Er=require("react/jsx-runtime"),at=(0,ho.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 Ee({borderRadius:o="xs",shadow:e="sm",zIndex:r=3,y:t,x:f,onDestroy:l,children:n}){(0,X.useWindowEvent)("resize",l),(0,X.useWindowEvent)("scroll",l);let s=(0,X.useClickOutside)(l),{ref:p,width:x,height:c}=(0,X.useElementSize)(),u=(0,X.useMergedRef)(s,p),{innerWidth:I,innerHeight:m}=window,{classes:S,theme:{dir:g,spacing:h}}=at(),C=(0,ho.px)(h.md);return(0,Er.jsx)(ho.Paper,{ref:u,shadow:e,radius:o,className:S.root,sx:{zIndex:r,top:t+c+C>m?m-c-C:t,left:g==="ltr"?f+x+C>I?I-x-C:f:I-C-(f-x-C<0?x+C:f)},children:n})}a();var Nr=require("@mantine/core"),qr=require("react/jsx-runtime"),tt=(0,Nr.createStyles)(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function Ne(){let{classes:o}=tt();return(0,qr.jsx)("div",{className:o.root})}a();var z=require("@mantine/core"),Fo=require("react/jsx-runtime"),ft=(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 qe({icon:o,title:e,color:r,disabled:t,onClick:f}){let{classes:l}=ft({color:r});return(0,Fo.jsxs)(z.UnstyledButton,{className:l.root,disabled:t,onClick:f,children:[o&&(0,Fo.jsx)(z.Box,{className:l.icon,children:o}),(0,Fo.jsx)(z.Text,{className:l.title,size:"sm",children:e})]})}a();var no=require("@mantine/core"),fo=require("react/jsx-runtime"),nt=(0,no.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 We({topShadowVisible:o,leftShadowVisible:e,rightShadowVisible:r,bottomShadowVisible:t,headerHeight:f,footerHeight:l,onScrollPositionChange:n,children:s,viewportRef:p}){let x=l?l-1:0,{cx:c,classes:u}=nt();return(0,fo.jsxs)(no.ScrollArea,{viewportRef:p,classNames:{root:u.root,scrollbar:u.scrollbar,thumb:u.thumb,corner:u.corner},styles:{scrollbar:{marginTop:f,marginBottom:x}},onScrollPositionChange:n,children:[s,(0,fo.jsx)(no.Box,{className:c(u.shadow,u.topShadow,{[u.shadowVisible]:o}),sx:{top:f}}),(0,fo.jsx)("div",{className:c(u.shadow,u.leftShadow,{[u.shadowVisible]:e})}),(0,fo.jsx)("div",{className:c(u.shadow,u.rightShadow,{[u.shadowVisible]:r})}),(0,fo.jsx)(no.Box,{className:c(u.shadow,u.bottomShadow,{[u.shadowVisible]:t}),sx:{bottom:x}})]})}var P=require("react/jsx-runtime"),Wr={},lt=(0,j.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}`}}}},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:p,verticalAlignment:x="center",fetching:c,columns:u,defaultColumnRender:I,idAccessor:m="id",records:S,selectedRecords:g,onSelectedRecordsChange:h,isRecordSelectable:C,allRecordsSelectionCheckboxProps:O={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:M=(B,oo)=>({"aria-label":`Select record ${oo+1}`}),sortStatus:L,sortIcons:R,onSortStatusChange:v,horizontalSpacing:k,page:H,onPageChange:E,totalRecords:J,recordsPerPage:bo,onRecordsPerPageChange:Jo,recordsPerPageOptions:oe,recordsPerPageLabel:ee="Records per page",paginationColor:Bo,paginationSize:Do="sm",paginationText:re=({from:B,to:oo,totalRecords:eo})=>`${B} - ${oo} / ${eo}`,paginationWrapBreakpoint:ae="sm",getPaginationControlProps:Mo=B=>B==="previous"?{"aria-label":"Previous page"}:B==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:te,customLoader:zr,loaderSize:Ur,loaderVariant:Vr,loaderColor:Gr,loadingText:Xr="...",emptyState:Qr,noRecordsText:Ue="No records",noRecordsIcon:Zr,striped:Kr,noHeader:$r,onRowClick:fe,onCellClick:Yr,onScrollToTop:Ve,onScrollToBottom:Ge,onScrollToLeft:Xe,onScrollToRight:Qe,rowContextMenu:N,rowExpansion:_r,rowClassName:jr,rowStyle:Jr,rowSx:oa,customRowAttributes:ea,scrollViewportRef:ra,bodyRef:aa,m:ta,my:fa,mx:na,mt:la,mb:da,ml:sa,mr:ca,sx:ua,className:pa,classNames:Oo,style:ma,styles:ne,...xa}){let{ref:B,width:oo,height:eo}=(0,_.useElementSize)(),{ref:Ia,height:le}=(0,_.useElementSize)(),{ref:ia,width:de,height:yo}=(0,_.useElementSize)(),{ref:ga,height:Ca}=(0,_.useElementSize)(),{ref:Sa,height:Ze}=(0,_.useElementSize)(),[se,Ke]=(0,Q.useState)(!0),[ce,$e]=(0,Q.useState)(!0),[vo,Ye]=(0,Q.useState)(!0),[ue,_e]=(0,Q.useState)(!0),{rowContextMenuInfo:ro,setRowContextMenuInfo:lo}=Ar(c),ha=Lr({rowExpansion:_r,records:S,idAccessor:m}),pe=(0,Q.useCallback)(()=>{if(!c&&N&&lo(null),c||yo<=eo)Ke(!0),$e(!0);else{let i=B.current.scrollTop,b=i===0,F=yo-i-eo<1;Ke(b),$e(F),b&&b!==se&&Ve?.(),F&&F!==ce&&Ge?.()}if(c||de===oo)Ye(!0),_e(!0);else{let i=B.current.scrollLeft,b=i===0,F=de-i-oo<1;Ye(b),_e(F),b&&b!==vo&&Xe?.(),F&&F!==ue&&Qe?.()}},[c,Ge,Xe,Qe,Ve,N,eo,B,oo,ce,vo,ue,se,lo,yo,de]);hr(pe,[pe]);let ba=(0,Q.useCallback)(i=>{B.current.scrollTo({top:0,left:0}),E(i)},[E,B]),Ao=S?.length,je=S?.map(i=>D(i,m)),Lo=!!g,To=g?.map(i=>D(i,m)),Je=je!==void 0&&To!==void 0&&To.length>0,me=C?S?.filter(C):S,Ho=me?.map(i=>D(i,m)),Eo=Je&&Ho.every(i=>To.includes(i)),Ba=Je&&Ho.some(i=>To.includes(i)),Da=(0,Q.useCallback)(()=>{h?.(Eo?g.filter(i=>!Ho.includes(D(i,m))):mo([...g,...me],i=>D(i,m)))},[Eo,m,h,Ho,me,g]),{lastSelectionChangeIndex:No,setLastSelectionChangeIndex:ya}=vr(je),xe=Lo&&!vo,{cx:or,classes:Z,theme:Ta}=lt({borderColor:r,rowBorderColor:t}),wa={m:ta,my:fa,mx:na,mt:la,mb:da,ml:sa,mr:ca},qo=typeof ne=="function"?ne(Ta,Wr,Wr):ne;return(0,P.jsxs)(j.Box,{...wa,className:or(Z.root,{[Z.tableWithBorder]:o},pa,Oo?.root),sx:[i=>({borderRadius:i.radius[e]||e,boxShadow:i.shadows[p]||p,height:n,minHeight:s}),...(0,j.packSx)(ua)],style:{...qo?.root,...ma},children:[(0,P.jsx)(We,{viewportRef:(0,_.useMergedRef)(B,ra||null),topShadowVisible:!se,leftShadowVisible:!(g||vo),rightShadowVisible:!ue,bottomShadowVisible:!ce,headerHeight:le,footerHeight:Ca,onScrollPositionChange:pe,children:(0,P.jsxs)(j.Table,{ref:ia,horizontalSpacing:k,className:or(Z.table,{[Z.tableWithColumnBorders]:f,[Z.lastRowBorderBottomVisible]:yo<eo,[Z.textSelectionDisabled]:l,[Z.verticalAlignmentTop]:x==="top",[Z.verticalAlignmentBottom]:x==="bottom"}),striped:Ao?Kr:!1,...xa,children:[$r?null:(0,P.jsx)(Rr,{ref:Ia,className:Oo?.header,style:qo?.header,columns:u,sortStatus:L,sortIcons:R,onSortStatusChange:v,selectionVisible:Lo,selectionChecked:Eo,selectionIndeterminate:Ba&&!Eo,onSelectionChange:Da,selectionCheckboxProps:O,leftShadowVisible:xe}),(0,P.jsx)("tbody",{ref:aa,children:Ao?S.map((i,b)=>{let F=D(i,m),wo=To?.includes(F)||!1,Wo=!1,zo=!1;if(N){let{hidden:T}=N;(!T||!(typeof T=="function"?T(i,b):T))&&(N.trigger==="click"?Wo=!0:zo=!0)}let Uo;h&&(Uo=T=>{if(T.nativeEvent.shiftKey&&No!==null){let so=S.filter(b>No?(ao,to)=>to>=No&&to<=b&&(C?C(ao,to):!0):(ao,to)=>to>=b&&to<=No&&(C?C(ao,to):!0));h(wo?Qo(g,so,ao=>D(ao,m)):mo([...g,...so],ao=>D(ao,m)))}else h(wo?g.filter(so=>D(so,m)!==F):mo([...g,i],so=>D(so,m)));ya(b)});let Po;Wo?Po=T=>{lo({y:T.clientY,x:T.clientX,record:i,recordIndex:b}),fe?.(i,b,T)}:fe&&(Po=T=>{fe(i,b,T)});let er;return zo&&(er=T=>{T.preventDefault(),lo({y:T.clientY,x:T.clientX,record:i,recordIndex:b})}),(0,P.jsx)(He,{record:i,recordIndex:b,columns:u,defaultColumnRender:I,selectionVisible:Lo,selectionChecked:wo,onSelectionChange:Uo,isRecordSelectable:C,getSelectionCheckboxProps:M,onClick:Po,onCellClick:Yr,onContextMenu:er,contextMenuVisible:ro?D(ro.record,m)===F:!1,expansion:ha,className:jr,style:Jr,sx:oa,customRowAttributes:ea,leftShadowVisible:xe},F)}):(0,P.jsx)(ge,{})}),u.some(i=>i.footer)&&(0,P.jsx)(yr,{ref:ga,className:Oo?.footer,style:qo?.footer,borderColor:r,columns:u,selectionVisible:Lo,leftShadowVisible:xe,scrollDiff:yo-eo})]})}),H&&(0,P.jsx)(Mr,{ref:Sa,className:Oo?.pagination,style:qo?.pagination,topBorderColor:r,horizontalSpacing:k,fetching:c,page:H,onPageChange:ba,totalRecords:J,recordsPerPage:bo,onRecordsPerPageChange:Jo,recordsPerPageOptions:oe,recordsPerPageLabel:ee,paginationColor:Bo,paginationSize:Do,paginationText:re,paginationWrapBreakpoint:ae,getPaginationControlProps:Mo,noRecordsText:Ue,loadingText:Xr,recordsLength:Ao}),(0,P.jsx)(ke,{pt:le,pb:Ze,fetching:c,backgroundBlur:te,customContent:zr,size:Ur,variant:Vr,color:Gr}),(0,P.jsx)(Be,{pt:le,pb:Ze,icon:Zr,text:Ue,active:!c&&!Ao,children:Qr}),N&&ro&&(0,P.jsx)(Ee,{zIndex:N.zIndex,borderRadius:N.borderRadius,shadow:N.shadow,y:ro.y,x:ro.x,onDestroy:()=>lo(null),children:N.items(ro.record,ro.recordIndex).map(({divider:i,key:b,title:F,icon:wo,color:Wo,hidden:zo,disabled:Uo,onClick:Po})=>i?(0,P.jsx)(Ne,{},b):zo?null:(0,P.jsx)(qe,{title:F??po(b),icon:wo,color:Wo,disabled:Uo,onClick:()=>{lo(null),Po()}},b))})]})}a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|