mantine-datatable 2.5.3 → 2.5.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/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/dist/types/DataTableColumn.d.ts +4 -4
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var Pa=Object.create;var Uo=Object.defineProperty;var wa=Object.getOwnPropertyDescriptor;var ka=Object.getOwnPropertyNames;var Ra=Object.getPrototypeOf,Fa=Object.prototype.hasOwnProperty;var Ma=(o,e)=>()=>(o&&(e=o(o=0)),e);var xe=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),Oa=(o,e)=>{for(var r in e)Uo(o,r,{get:e[r],enumerable:!0})},er=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of ka(e))!Fa.call(o,f)&&f!==r&&Uo(o,f,{get:()=>e[f],enumerable:!(t=wa(e,f))||t.enumerable});return o};var rr=(o,e,r)=>(r=o!=null?Pa(Ra(o)):{},er(e||!o||!o.__esModule?Uo(r,"default",{value:o,enumerable:!0}):r,o)),va=o=>er(Uo({},"__esModule",{value:!0}),o);var s,a=Ma(()=>{"use strict";s=rr(require("react"),1)});var fr=xe((pt,tr)=>{"use strict";a();var La="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";tr.exports=La});var dr=xe((xt,sr)=>{"use strict";a();var Ha=fr();function nr(){}function lr(){}lr.resetWarningCache=nr;sr.exports=function(){function o(t,f,l,n,d,p){if(p!==Ha){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:lr,resetWarningCache:nr};return r.PropTypes=r,r}});var ur=xe((Ct,cr)=>{a();cr.exports=dr()();var it,gt});var lt={};Oa(lt,{DataTable:()=>We,differenceBy:()=>Xo,getValueAtPath:()=>B,humanize:()=>po,uniqBy:()=>mo});module.exports=va(lt);a();a();var j=require("@mantine/core"),_=require("@mantine/hooks"),Q=require("react");a();var ar=require("@mantine/core"),Ie=require("react/jsx-runtime"),Aa=(0,ar.createStyles)({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function ie(){let{classes:o}=Aa();return(0,Ie.jsx)("tr",{className:o.root,children:(0,Ie.jsx)("td",{})})}a();var co=require("@mantine/core");a();a();var ko=require("react"),K=rr(ur());a();var pr={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 Ea=Object.defineProperty,Na=Object.defineProperties,qa=Object.getOwnPropertyDescriptors,Vo=Object.getOwnPropertySymbols,Ir=Object.prototype.hasOwnProperty,ir=Object.prototype.propertyIsEnumerable,mr=(o,e,r)=>e in o?Ea(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,xr=(o,e)=>{for(var r in e||(e={}))Ir.call(e,r)&&mr(o,r,e[r]);if(Vo)for(var r of Vo(e))ir.call(e,r)&&mr(o,r,e[r]);return o},Wa=(o,e)=>Na(o,qa(e)),za=(o,e)=>{var r={};for(var t in o)Ir.call(o,t)&&e.indexOf(t)<0&&(r[t]=o[t]);if(o!=null&&Vo)for(var t of Vo(o))e.indexOf(t)<0&&ir.call(o,t)&&(r[t]=o[t]);return r},$=(o,e,r)=>{let t=(0,ko.forwardRef)((f,l)=>{var n=f,{color:d="currentColor",size:p=24,stroke:x=2,children:c}=n,u=za(n,["color","size","stroke","children"]);return(0,ko.createElement)("svg",xr(Wa(xr({ref:l},pr),{width:p,height:p,stroke:d,strokeWidth:x,className:`tabler-icon tabler-icon-${o}`}),u),[...r.map(([I,m])=>(0,ko.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 ge=$("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 Ce=$("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 Se=$("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 he=$("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"),Ua=(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:d}=Ua();return(0,U.jsx)(co.Center,{pt:r,pb:t,className:d(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)(Se,{})}),(0,U.jsx)(co.Text,{size:"sm",color:"dimmed",children:e})]})})}a();var Ko=require("@mantine/core"),Br=require("react");a();var Qo=require("@mantine/core");a();var gr=require("@mantine/core"),Cr=require("@mantine/hooks"),Go=require("react"),Sr=typeof window<"u"?Go.useLayoutEffect:Go.useEffect;function uo(o){let e=(0,gr.useMantineTheme)(),r=typeof o=="function"?o(e):o;return(0,Cr.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 Xo(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 B(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}var hr=require("react/jsx-runtime"),Va=(0,Qo.createStyles)({noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Be({className:o,sx:e,style:r,visibleMediaQuery:t,title:f,noWrap:l,ellipsis:n,textAlignment:d,width:p}){let{cx:x,classes:c}=Va();return uo(t)?(0,hr.jsx)(Qo.Box,{component:"th",className:x({[c.noWrap]:l||n,[c.ellipsis]:n},o),sx:[{"&&":{textAlign:d},width:p,minWidth:p,maxWidth:p},e],style:r,children:f}):null}a();var Zo=require("@mantine/core"),br=require("react/jsx-runtime"),Ga=(0,Zo.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,Zo.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 De({shadowVisible:o}){let{cx:e,classes:r}=Ga();return(0,br.jsx)("th",{className:e(r.root,{[r.shadowVisible]:o})})}var xo=require("react/jsx-runtime"),Xa=(0,Ko.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"}}}),Dr=(0,Br.forwardRef)(function({className:e,style:r,borderColor:t,columns:f,selectionVisible:l,leftShadowVisible:n,scrollDiff:d},p){let{cx:x,classes:c}=Xa({scrollDiff:d,borderColor:t});return(0,xo.jsx)(Ko.Box,{component:"tfoot",ref:p,className:x(c.root,e),style:r,children:(0,xo.jsxs)("tr",{children:[l&&(0,xo.jsx)(De,{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:k})=>I?null:(0,xo.jsx)(Be,{className:C,style:O,sx:M,visibleMediaQuery:m,textAlignment:S,width:g,title:h,noWrap:L,ellipsis:k},u))]})})});a();var Tr=require("@mantine/core"),Pr=require("react");a();var P=require("@mantine/core"),yr=require("@mantine/hooks");var y=require("react/jsx-runtime"),Qa=(0,P.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 Za({children:o,isActive:e}){let[r,{close:t,toggle:f}]=(0,yr.useDisclosure)(!1);return(0,y.jsxs)(P.Popover,{withArrow:!0,withinPortal:!0,shadow:"md",opened:r,onClose:t,trapFocus:!0,children:[(0,y.jsx)(P.Popover.Target,{children:(0,y.jsx)(P.ActionIcon,{onClick:l=>{l.preventDefault(),f()},variant:e?"default":"subtle",children:(0,y.jsx)(he,{size:14})})}),(0,y.jsx)(P.Popover.Dropdown,{children:typeof o=="function"?o({close:t}):o})]})}function ye({className:o,sx:e,style:r,accessor:t,visibleMediaQuery:f,title:l,sortable:n,sortIcons:d,textAlignment:p,width:x,sortStatus:c,onSortStatusChange:u,filter:I,filtering:m}){let{cx:S,classes:g}=Qa();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)(P.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)(P.Group,{className:g.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[(0,y.jsx)(P.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)(P.Center,{className:S(g.sortableColumnHeaderIcon,{[g.sortableColumnHeaderIconRotated]:c.direction==="desc"}),role:"img","aria-label":`Sorted ${c.direction==="desc"?"descending":"ascending"}`,children:d?.sorted||(0,y.jsx)(ge,{size:14})}):(0,y.jsx)(P.Center,{className:g.sortableColumnHeaderUnsortedIcon,role:"img","aria-label":"Not sorted",children:d?.unsorted||(0,y.jsx)(Ce,{size:14})})}):null,I?(0,y.jsx)(Za,{isActive:!!m,children:I}):null]})})}a();var Io=require("@mantine/core"),Te=require("react/jsx-runtime"),Ka=(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}=Ka();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"),$a=(0,Tr.createStyles)(o=>({root:{zIndex:2,position:"sticky",top:0,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white},textSelectionDisabled:{userSelect:"none"}})),wr=(0,Pr.forwardRef)(function({className:e,style:r,sortStatus:t,sortIcons:f,onSortStatusChange:l,columns:n,selectionVisible:d,selectionChecked:p,selectionIndeterminate:x,onSelectionChange:c,selectionCheckboxProps:u,leftShadowVisible:I},m){let{classes:S,cx:g}=$a();return(0,io.jsx)("thead",{className:g(S.root,e),style:r,ref:m,children:(0,io.jsxs)("tr",{children:[d&&(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:k,sortable:v,titleClassName:R,titleStyle:H,titleSx:E,filter:J,filtering:bo})=>C?null:(0,io.jsx)(ye,{className:R,style:H,sx:E,accessor:h,visibleMediaQuery:O,textAlignment:M,width:L,title:k,sortable:v,sortStatus:t,sortIcons:f,onSortStatusChange:l,filter:J,filtering:bo},h))]})})});a();var go=require("@mantine/core"),we=require("react/jsx-runtime"),Ya=(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:d}){let{classes:p,cx:x}=Ya();return(0,we.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,we.jsx)(go.Loader,{size:l,variant:n,color:d}))})}a();var Y=require("@mantine/core"),Rr=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 Re({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 d=n===t;return(0,q.jsx)(A.Menu.Item,{sx:[{height:kr[o]},p=>({"&&":{color:d?p.white:void 0},background:d?p.colors[l||p.primaryColor][6]:void 0})],disabled:d,onClick:()=>f(n),children:(0,q.jsx)(A.Text,{size:o,children:n})},n)})})]})]})}var Co=require("react/jsx-runtime"),_a=(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}})),Fr=(0,Rr.forwardRef)(function({className:e,style:r,topBorderColor:t,fetching:f,page:l,onPageChange:n,paginationColor:d,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},k){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:R,cx:H}=_a({topBorderColor:t,paginationWrapBreakpoint:M});return(0,Co.jsxs)(Y.Box,{ref:k,px:O??"xs",py:"xs",className:H(R.root,e),style:r,children:[(0,Co.jsx)(Y.Text,{className:R.text,size:p,children:v}),h&&(0,Co.jsx)(Re,{size:p,label:g,values:h,color:d,value:m,onChange:S}),(0,Co.jsx)(Y.Pagination,{color:d,className:H(R.pagination,{[R.paginationFetching]:f||!C}),value:l,onChange:n,size:p,total:Math.ceil(I/m),getControlProps:L})]})});a();var _o=require("@mantine/core");a();var $o=require("@mantine/core");var Mr=require("react/jsx-runtime"),ja=(0,$o.createStyles)({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Fe({className:o,sx:e,style:r,visibleMediaQuery:t,record:f,recordIndex:l,onClick:n,noWrap:d,ellipsis:p,textAlignment:x,width:c,accessor:u,render:I,defaultRender:m,customCellAttributes:S}){let{cx:g,classes:h}=ja();return uo(t)?(0,Mr.jsx)($o.Box,{component:"td",className:g({[h.noWrap]:d||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):B(f,u)}):null}a();var Yo=require("@mantine/core");a();var Me=require("@mantine/hooks"),W=require("react");function Or(o){let[e,r]=(0,W.useState)(null),t=o?.join(":")||"";return(0,W.useEffect)(()=>{r(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function vr(o){let[e,r]=(0,W.useState)(null);return(0,W.useEffect)(()=>{o&&r(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:r}}function Ar({rowExpansion:o,records:e,idAccessor:r}){let t=[];if(o&&e){let{trigger:d,allowMultiple:p,initiallyExpanded:x}=o;e&&d==="always"?t=e.map(c=>B(c,r)):x&&(t=e.filter(x).map(c=>B(c,r)),p||(t=[t[0]]))}let f,l,n=(0,W.useState)(t);if(o){let{trigger:d,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!==B(I,r)));return{expandOnClick:d!=="always"&&d!=="never",isRowExpanded:I=>d==="always"?!0:f.includes(B(I,r)),expandRow:I=>{let m=B(I,r);l?.(p?[...f,m]:[m])},collapseRow:u,collapseProps:x,content:(I,m)=>()=>c({record:I,recordIndex:m,collapse:()=>u(I)})}}}function Lr(o,e){let[r,t]=(0,W.useState)(o),[f,l]=(0,W.useState)(o),n=(0,Me.useTimeout)(()=>t(!0),0),d=(0,Me.useTimeout)(()=>l(!1),e||200);return(0,W.useEffect)(()=>{o?(d.clear(),l(!0),n.start()):(n.clear(),t(!1),d.start())},[n,d,o]),{expanded:r,visible:f}}var V=require("react/jsx-runtime"),Ja=(0,Yo.createStyles)({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function Oe({open:o,colSpan:e,content:r,collapseProps:t}){let{expanded:f,visible:l}=Lr(o,t?.transitionDuration),{cx:n,classes:d}=Ja();return l?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("tr",{}),(0,V.jsx)("tr",{children:(0,V.jsx)("td",{className:n(d.cell,{[d.expandedCell]:f}),colSpan:e,children:(0,V.jsx)(Yo.Collapse,{in:f,...t,children:r()})})})]}):null}a();var So=require("@mantine/core"),ve=require("react/jsx-runtime"),ot=(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 Ae({record:o,recordIndex:e,withRightShadow:r,getCheckboxProps:t,...f}){let{cx:l,classes:n}=ot();return(0,ve.jsx)("td",{className:l(n.root,{[n.withRightShadow]:r}),onClick:d=>d.stopPropagation(),children:(0,ve.jsx)(So.Checkbox,{classNames:{input:n.checkbox},...f,...t(o,e)})})}var G=require("react/jsx-runtime"),et=(0,_o.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 Le({record:o,recordIndex:e,columns:r,defaultColumnRender:t,selectionVisible:f,selectionChecked:l,onSelectionChange:n,isRecordSelectable:d,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}=et();return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(_o.Box,{component:"tr",className:M({[L.withPointerCursor]:x||I?.expandOnClick,[L.selected]:l,[L.contextMenuVisible]:C},typeof S=="function"?S(o,e):S),onClick:k=>{if(I){let{isRowExpanded:v,expandOnClick:R,expandRow:H,collapseRow:E}=I;R&&(v(o)?E(o):H(o))}x?.(k)},style:typeof g=="function"?g(o,e):g,sx:h,...m?.(o,e),onContextMenu:u,children:[f&&(0,G.jsx)(Ae,{record:o,recordIndex:e,withRightShadow:O,checked:l,disabled:!n||(d?!d(o,e):!1),onChange:n,getCheckboxProps:p}),r.map((k,v)=>{let{accessor:R,hidden:H,visibleMediaQuery:E,textAlignment:J,noWrap:bo,ellipsis:jo,width:Jo,render:oe,cellsClassName:Bo,cellsStyle:Do,cellsSx:ee,customCellAttributes:re}=k,Fo;return c&&(Fo=ae=>c({event:ae,record:o,recordIndex:e,column:k,columnIndex:v})),H?null:(0,G.jsx)(Fe,{className:typeof Bo=="function"?Bo(o,e):Bo,style:typeof Do=="function"?Do(o,e):Do,sx:ee,visibleMediaQuery:E,record:o,recordIndex:e,onClick:Fo,accessor:R,textAlignment:J,noWrap:bo,ellipsis:jo,width:Jo,render:oe,defaultRender:t,customCellAttributes:re},R)})]}),I&&(0,G.jsx)(Oe,{colSpan:r.filter(k=>!k.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"),Hr=require("react/jsx-runtime"),rt=(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 He({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 d=(0,X.useClickOutside)(l),{ref:p,width:x,height:c}=(0,X.useElementSize)(),u=(0,X.useMergedRef)(d,p),{innerWidth:I,innerHeight:m}=window,{classes:S,theme:{dir:g,spacing:h}}=rt(),C=(0,ho.px)(h.md);return(0,Hr.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 Er=require("@mantine/core"),Nr=require("react/jsx-runtime"),at=(0,Er.createStyles)(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function Ee(){let{classes:o}=at();return(0,Nr.jsx)("div",{className:o.root})}a();var z=require("@mantine/core"),Ro=require("react/jsx-runtime"),tt=(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 Ne({icon:o,title:e,color:r,disabled:t,onClick:f}){let{classes:l}=tt({color:r});return(0,Ro.jsxs)(z.UnstyledButton,{className:l.root,disabled:t,onClick:f,children:[o&&(0,Ro.jsx)(z.Box,{className:l.icon,children:o}),(0,Ro.jsx)(z.Text,{className:l.title,size:"sm",children:e})]})}a();var no=require("@mantine/core"),fo=require("react/jsx-runtime"),ft=(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 qe({topShadowVisible:o,leftShadowVisible:e,rightShadowVisible:r,bottomShadowVisible:t,headerHeight:f,footerHeight:l,onScrollPositionChange:n,children:d,viewportRef:p}){let x=l?l-1:0,{cx:c,classes:u}=ft();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:[d,(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 w=require("react/jsx-runtime"),qr={},nt=(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 We({withBorder:o,borderRadius:e,borderColor:r=D=>D.colorScheme==="dark"?D.colors.dark[4]:D.colors.gray[3],rowBorderColor:t=D=>D.fn.rgba(D.colorScheme==="dark"?D.colors.dark[4]:D.colors.gray[3],.65),withColumnBorders:f,textSelectionDisabled:l,height:n="100%",minHeight:d,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=(D,oo)=>({"aria-label":`Select record ${oo+1}`}),sortStatus:L,sortIcons:k,onSortStatusChange:v,horizontalSpacing:R,page:H,onPageChange:E,totalRecords:J,recordsPerPage:bo,onRecordsPerPageChange:jo,recordsPerPageOptions:Jo,recordsPerPageLabel:oe="Records per page",paginationColor:Bo,paginationSize:Do="sm",paginationText:ee=({from:D,to:oo,totalRecords:eo})=>`${D} - ${oo} / ${eo}`,paginationWrapBreakpoint:re="sm",getPaginationControlProps:Fo=D=>D==="previous"?{"aria-label":"Previous page"}:D==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:ae,customLoader:Wr,loaderSize:zr,loaderVariant:Ur,loaderColor:Vr,loadingText:Gr="...",emptyState:Xr,noRecordsText:ze="No records",noRecordsIcon:Qr,striped:Zr,noHeader:Kr,onRowClick:te,onCellClick:$r,onScrollToTop:Ue,onScrollToBottom:Ve,onScrollToLeft:Ge,onScrollToRight:Xe,rowContextMenu:N,rowExpansion:Yr,rowClassName:_r,rowStyle:jr,rowSx:Jr,customRowAttributes:oa,scrollViewportRef:ea,bodyRef:ra,m:aa,my:ta,mx:fa,mt:na,mb:la,ml:sa,mr:da,sx:ca,className:ua,classNames:Mo,style:pa,styles:fe,...ma}){let{ref:D,width:oo,height:eo}=(0,_.useElementSize)(),{ref:xa,height:ne}=(0,_.useElementSize)(),{ref:Ia,width:le,height:yo}=(0,_.useElementSize)(),{ref:ia,height:ga}=(0,_.useElementSize)(),{ref:Ca,height:Qe}=(0,_.useElementSize)(),[se,Ze]=(0,Q.useState)(!0),[de,Ke]=(0,Q.useState)(!0),[Oo,$e]=(0,Q.useState)(!0),[ce,Ye]=(0,Q.useState)(!0),{rowContextMenuInfo:ro,setRowContextMenuInfo:lo}=vr(c),Sa=Ar({rowExpansion:Yr,records:S,idAccessor:m}),ue=(0,Q.useCallback)(()=>{if(!c&&N&&lo(null),c||yo<=eo)Ze(!0),Ke(!0);else{let i=D.current.scrollTop,b=i===0,F=yo-i-eo<1;Ze(b),Ke(F),b&&b!==se&&Ue?.(),F&&F!==de&&Ve?.()}if(c||le===oo)$e(!0),Ye(!0);else{let i=D.current.scrollLeft,b=i===0,F=le-i-oo<1;$e(b),Ye(F),b&&b!==Oo&&Ge?.(),F&&F!==ce&&Xe?.()}},[c,Ve,Ge,Xe,Ue,N,eo,D,oo,de,Oo,ce,se,lo,yo,le]);Sr(ue,[ue]);let ha=(0,Q.useCallback)(i=>{D.current.scrollTo({top:0,left:0}),E(i)},[E,D]),vo=S?.length,_e=S?.map(i=>B(i,m)),Ao=!!g,To=g?.map(i=>B(i,m)),je=_e!==void 0&&To!==void 0&&To.length>0,pe=C?S?.filter(C):S,Lo=pe?.map(i=>B(i,m)),Ho=je&&Lo.every(i=>To.includes(i)),ba=je&&Lo.some(i=>To.includes(i)),Ba=(0,Q.useCallback)(()=>{h?.(Ho?g.filter(i=>!Lo.includes(B(i,m))):mo([...g,...pe],i=>B(i,m)))},[Ho,m,h,Lo,pe,g]),{lastSelectionChangeIndex:Eo,setLastSelectionChangeIndex:Da}=Or(_e),me=Ao&&!Oo,{cx:Je,classes:Z,theme:ya}=nt({borderColor:r,rowBorderColor:t}),Ta={m:aa,my:ta,mx:fa,mt:na,mb:la,ml:sa,mr:da},No=typeof fe=="function"?fe(ya,qr,qr):fe;return(0,w.jsxs)(j.Box,{...Ta,className:Je(Z.root,{[Z.tableWithBorder]:o},ua,Mo?.root),sx:[i=>({borderRadius:i.radius[e]||e,boxShadow:i.shadows[p]||p,height:n,minHeight:d}),...(0,j.packSx)(ca)],style:{...No?.root,...pa},children:[(0,w.jsx)(qe,{viewportRef:(0,_.useMergedRef)(D,ea||null),topShadowVisible:!se,leftShadowVisible:!(g||Oo),rightShadowVisible:!ce,bottomShadowVisible:!de,headerHeight:ne,footerHeight:ga,onScrollPositionChange:ue,children:(0,w.jsxs)(j.Table,{ref:Ia,horizontalSpacing:R,className:Je(Z.table,{[Z.tableWithColumnBorders]:f,[Z.lastRowBorderBottomVisible]:yo<eo,[Z.textSelectionDisabled]:l,[Z.verticalAlignmentTop]:x==="top",[Z.verticalAlignmentBottom]:x==="bottom"}),striped:vo?Zr:!1,...ma,children:[Kr?null:(0,w.jsx)(wr,{ref:xa,className:Mo?.header,style:No?.header,columns:u,sortStatus:L,sortIcons:k,onSortStatusChange:v,selectionVisible:Ao,selectionChecked:Ho,selectionIndeterminate:ba&&!Ho,onSelectionChange:Ba,selectionCheckboxProps:O,leftShadowVisible:me}),(0,w.jsx)("tbody",{ref:ra,children:vo?S.map((i,b)=>{let F=B(i,m),Po=To?.includes(F)||!1,qo=!1,Wo=!1;if(N){let{hidden:T}=N;(!T||!(typeof T=="function"?T(i,b):T))&&(N.trigger==="click"?qo=!0:Wo=!0)}let zo;h&&(zo=T=>{if(T.nativeEvent.shiftKey&&Eo!==null){let so=S.filter(b>Eo?(ao,to)=>to>=Eo&&to<=b&&(C?C(ao,to):!0):(ao,to)=>to>=b&&to<=Eo&&(C?C(ao,to):!0));h(Po?Xo(g,so,ao=>B(ao,m)):mo([...g,...so],ao=>B(ao,m)))}else h(Po?g.filter(so=>B(so,m)!==F):mo([...g,i],so=>B(so,m)));Da(b)});let wo;qo?wo=T=>{lo({y:T.clientY,x:T.clientX,record:i,recordIndex:b}),te?.(i,b,T)}:te&&(wo=T=>{te(i,b,T)});let or;return Wo&&(or=T=>{T.preventDefault(),lo({y:T.clientY,x:T.clientX,record:i,recordIndex:b})}),(0,w.jsx)(Le,{record:i,recordIndex:b,columns:u,defaultColumnRender:I,selectionVisible:Ao,selectionChecked:Po,onSelectionChange:zo,isRecordSelectable:C,getSelectionCheckboxProps:M,onClick:wo,onCellClick:$r,onContextMenu:or,contextMenuVisible:ro?B(ro.record,m)===F:!1,expansion:Sa,className:_r,style:jr,sx:Jr,customRowAttributes:oa,leftShadowVisible:me},F)}):(0,w.jsx)(ie,{})}),u.some(i=>i.footer)&&(0,w.jsx)(Dr,{ref:ia,className:Mo?.footer,style:No?.footer,borderColor:r,columns:u,selectionVisible:Ao,leftShadowVisible:me,scrollDiff:yo-eo})]})}),H&&(0,w.jsx)(Fr,{ref:Ca,className:Mo?.pagination,style:No?.pagination,topBorderColor:r,horizontalSpacing:R,fetching:c,page:H,onPageChange:ha,totalRecords:J,recordsPerPage:bo,onRecordsPerPageChange:jo,recordsPerPageOptions:Jo,recordsPerPageLabel:oe,paginationColor:Bo,paginationSize:Do,paginationText:ee,paginationWrapBreakpoint:re,getPaginationControlProps:Fo,noRecordsText:ze,loadingText:Gr,recordsLength:vo}),(0,w.jsx)(ke,{pt:ne,pb:Qe,fetching:c,backgroundBlur:ae,customContent:Wr,size:zr,variant:Ur,color:Vr}),(0,w.jsx)(be,{pt:ne,pb:Qe,icon:Qr,text:ze,active:!c&&!vo,children:Xr}),N&&ro&&(0,w.jsx)(He,{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:Po,color:qo,hidden:Wo,disabled:zo,onClick:wo})=>i?(0,w.jsx)(Ee,{},b):Wo?null:(0,w.jsx)(Ne,{title:F??po(b),icon:Po,color:qo,disabled:zo,onClick:()=>{lo(null),wo()}},b))})]})}a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();
|
|
1
|
+
"use strict";var Ta=Object.create;var Uo=Object.defineProperty;var Pa=Object.getOwnPropertyDescriptor;var Ra=Object.getOwnPropertyNames;var ka=Object.getPrototypeOf,Fa=Object.prototype.hasOwnProperty;var Ma=(o,e)=>()=>(o&&(e=o(o=0)),e);var xe=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),Oa=(o,e)=>{for(var r in e)Uo(o,r,{get:e[r],enumerable:!0})},er=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of Ra(e))!Fa.call(o,f)&&f!==r&&Uo(o,f,{get:()=>e[f],enumerable:!(t=Pa(e,f))||t.enumerable});return o};var rr=(o,e,r)=>(r=o!=null?Ta(ka(o)):{},er(e||!o||!o.__esModule?Uo(r,"default",{value:o,enumerable:!0}):r,o)),va=o=>er(Uo({},"__esModule",{value:!0}),o);var d,a=Ma(()=>{"use strict";d=rr(require("react"),1)});var fr=xe((pt,tr)=>{"use strict";a();var La="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";tr.exports=La});var sr=xe((xt,dr)=>{"use strict";a();var Ha=fr();function nr(){}function lr(){}lr.resetWarningCache=nr;dr.exports=function(){function o(t,f,l,n,s,p){if(p!==Ha){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:lr,resetWarningCache:nr};return r.PropTypes=r,r}});var ur=xe((Ct,cr)=>{a();cr.exports=sr()();var it,gt});var lt={};Oa(lt,{DataTable:()=>We,differenceBy:()=>Xo,getValueAtPath:()=>B,humanize:()=>po,uniqBy:()=>mo});module.exports=va(lt);a();a();var j=require("@mantine/core"),_=require("@mantine/hooks"),Q=require("react");a();var ar=require("@mantine/core"),Ie=require("react/jsx-runtime"),Aa=(0,ar.createStyles)({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function ie(){let{classes:o}=Aa();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=rr(ur());a();var pr={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 Ea=Object.defineProperty,Na=Object.defineProperties,qa=Object.getOwnPropertyDescriptors,Vo=Object.getOwnPropertySymbols,Ir=Object.prototype.hasOwnProperty,ir=Object.prototype.propertyIsEnumerable,mr=(o,e,r)=>e in o?Ea(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,xr=(o,e)=>{for(var r in e||(e={}))Ir.call(e,r)&&mr(o,r,e[r]);if(Vo)for(var r of Vo(e))ir.call(e,r)&&mr(o,r,e[r]);return o},Wa=(o,e)=>Na(o,qa(e)),za=(o,e)=>{var r={};for(var t in o)Ir.call(o,t)&&e.indexOf(t)<0&&(r[t]=o[t]);if(o!=null&&Vo)for(var t of Vo(o))e.indexOf(t)<0&&ir.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=za(n,["color","size","stroke","children"]);return(0,Ro.createElement)("svg",xr(Wa(xr({ref:l},pr),{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 ge=$("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 Ce=$("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 Se=$("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 he=$("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"),Ua=(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}=Ua();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)(Se,{})}),(0,U.jsx)(co.Text,{size:"sm",color:"dimmed",children:e})]})})}a();var Ko=require("@mantine/core"),Br=require("react");a();var Qo=require("@mantine/core");a();var gr=require("@mantine/core"),Cr=require("@mantine/hooks"),Go=require("react"),Sr=typeof window<"u"?Go.useLayoutEffect:Go.useEffect;function uo(o){let e=(0,gr.useMantineTheme)(),r=typeof o=="function"?o(e):o;return(0,Cr.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 Xo(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 B(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}var hr=require("react/jsx-runtime"),Va=(0,Qo.createStyles)({noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Be({className:o,sx:e,style:r,visibleMediaQuery:t,title:f,noWrap:l,ellipsis:n,textAlignment:s,width:p}){let{cx:x,classes:c}=Va();return uo(t)?(0,hr.jsx)(Qo.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 Zo=require("@mantine/core"),br=require("react/jsx-runtime"),Ga=(0,Zo.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,Zo.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 De({shadowVisible:o}){let{cx:e,classes:r}=Ga();return(0,br.jsx)("th",{className:e(r.root,{[r.shadowVisible]:o})})}var xo=require("react/jsx-runtime"),Xa=(0,Ko.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"}}}),Dr=(0,Br.forwardRef)(function({className:e,style:r,borderColor:t,columns:f,selectionVisible:l,leftShadowVisible:n,scrollDiff:s},p){let{cx:x,classes:c}=Xa({scrollDiff:s,borderColor:t});return(0,xo.jsx)(Ko.Box,{component:"tfoot",ref:p,className:x(c.root,e),style:r,children:(0,xo.jsxs)("tr",{children:[l&&(0,xo.jsx)(De,{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)(Be,{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"),Tr=require("react");a();var T=require("@mantine/core"),yr=require("@mantine/hooks");var y=require("react/jsx-runtime"),Qa=(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 Za({children:o,isActive:e}){let[r,{close:t,toggle:f}]=(0,yr.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)(he,{size:14})})}),(0,y.jsx)(T.Popover.Dropdown,{children:typeof o=="function"?o({close:t}):o})]})}function ye({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}=Qa();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)(ge,{size:14})}):(0,y.jsx)(T.Center,{className:g.sortableColumnHeaderUnsortedIcon,role:"img","aria-label":"Not sorted",children:s?.unsorted||(0,y.jsx)(Ce,{size:14})})}):null,I?(0,y.jsx)(Za,{isActive:!!m,children:I}):null]})})}a();var Io=require("@mantine/core"),we=require("react/jsx-runtime"),Ka=(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 Te({shadowVisible:o,checked:e,indeterminate:r,checkboxProps:t,onChange:f}){let{cx:l,classes:n}=Ka();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"),$a=(0,wr.createStyles)(o=>({root:{zIndex:2,position:"sticky",top:0,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white},textSelectionDisabled:{userSelect:"none"}})),Pr=(0,Tr.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}=$a();return(0,io.jsx)("thead",{className:g(S.root,e),style:r,ref:m,children:(0,io.jsxs)("tr",{children:[s&&(0,io.jsx)(Te,{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)(ye,{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"),Pe=require("react/jsx-runtime"),Ya=(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 Re({pt:o,pb:e,fetching:r,customContent:t,backgroundBlur:f,size:l,variant:n,color:s}){let{classes:p,cx:x}=Ya();return(0,Pe.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,Pe.jsx)(go.Loader,{size:l,variant:n,color:s}))})}a();var Y=require("@mantine/core"),kr=require("react");a();var A=require("@mantine/core"),q=require("react/jsx-runtime"),Rr={xs:22,sm:26,md:32,lg:38,xl:44};function ke({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:Rr[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:Rr[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"),_a=(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}})),Fr=(0,kr.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}=_a({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)(ke,{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 _o=require("@mantine/core");a();var $o=require("@mantine/core");var Mr=require("react/jsx-runtime"),ja=(0,$o.createStyles)({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Fe({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,Mr.jsx)($o.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):B(f,u)}):null}a();var Yo=require("@mantine/core");a();var Me=require("@mantine/hooks"),W=require("react");function Or(o){let[e,r]=(0,W.useState)(null),t=o?.join(":")||"";return(0,W.useEffect)(()=>{r(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function vr(o){let[e,r]=(0,W.useState)(null);return(0,W.useEffect)(()=>{o&&r(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:r}}function Ar({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=>B(c,r)):x&&(t=e.filter(x).map(c=>B(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!==B(I,r)));return{expandOnClick:s!=="always"&&s!=="never",isRowExpanded:I=>s==="always"?!0:f.includes(B(I,r)),expandRow:I=>{let m=B(I,r);l?.(p?[...f,m]:[m])},collapseRow:u,collapseProps:x,content:(I,m)=>()=>c({record:I,recordIndex:m,collapse:()=>u(I)})}}}function Lr(o,e){let[r,t]=(0,W.useState)(o),[f,l]=(0,W.useState)(o),n=(0,Me.useTimeout)(()=>t(!0),0),s=(0,Me.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"),Ja=(0,Yo.createStyles)({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function Oe({open:o,colSpan:e,content:r,collapseProps:t}){let{expanded:f,visible:l}=Lr(o,t?.transitionDuration),{cx:n,classes:s}=Ja();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)(Yo.Collapse,{in:f,...t,children:r()})})})]}):null}a();var So=require("@mantine/core"),ve=require("react/jsx-runtime"),ot=(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 Ae({record:o,recordIndex:e,withRightShadow:r,getCheckboxProps:t,...f}){let{cx:l,classes:n}=ot();return(0,ve.jsx)("td",{className:l(n.root,{[n.withRightShadow]:r}),onClick:s=>s.stopPropagation(),children:(0,ve.jsx)(So.Checkbox,{classNames:{input:n.checkbox},...f,...t(o,e)})})}var G=require("react/jsx-runtime"),et=(0,_o.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 Le({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}=et();return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(_o.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)(Ae,{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:Jo,render:oe,cellsClassName:Bo,cellsStyle:Do,cellsSx:ee,customCellAttributes:re}=R,Fo;return c&&(Fo=ae=>c({event:ae,record:o,recordIndex:e,column:R,columnIndex:v})),H?null:(0,G.jsx)(Fe,{className:typeof Bo=="function"?Bo(o,e):Bo,style:typeof Do=="function"?Do(o,e):Do,sx:ee,visibleMediaQuery:E,record:o,recordIndex:e,onClick:Fo,accessor:k,textAlignment:J,noWrap:bo,ellipsis:jo,width:Jo,render:oe,defaultRender:t,customCellAttributes:re},k)})]}),I&&(0,G.jsx)(Oe,{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"),Hr=require("react/jsx-runtime"),rt=(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 He({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}}=rt(),C=(0,ho.px)(h.md);return(0,Hr.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 Er=require("@mantine/core"),Nr=require("react/jsx-runtime"),at=(0,Er.createStyles)(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function Ee(){let{classes:o}=at();return(0,Nr.jsx)("div",{className:o.root})}a();var z=require("@mantine/core"),ko=require("react/jsx-runtime"),tt=(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 Ne({icon:o,title:e,color:r,disabled:t,onClick:f}){let{classes:l}=tt({color:r});return(0,ko.jsxs)(z.UnstyledButton,{className:l.root,disabled:t,onClick:f,children:[o&&(0,ko.jsx)(z.Box,{className:l.icon,children:o}),(0,ko.jsx)(z.Text,{className:l.title,size:"sm",children:e})]})}a();var no=require("@mantine/core"),fo=require("react/jsx-runtime"),ft=(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 qe({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}=ft();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"),qr={},nt=(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 We({withBorder:o,borderRadius:e,borderColor:r=D=>D.colorScheme==="dark"?D.colors.dark[4]:D.colors.gray[3],rowBorderColor:t=D=>D.fn.rgba(D.colorScheme==="dark"?D.colors.dark[4]:D.colors.gray[3],.65),withColumnBorders:f,textSelectionDisabled:l,height: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=(D,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:Jo,recordsPerPageLabel:oe="Records per page",paginationColor:Bo,paginationSize:Do="sm",paginationText:ee=({from:D,to:oo,totalRecords:eo})=>`${D} - ${oo} / ${eo}`,paginationWrapBreakpoint:re="sm",getPaginationControlProps:Fo=D=>D==="previous"?{"aria-label":"Previous page"}:D==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:ae,customLoader:Wr,loaderSize:zr,loaderVariant:Ur,loaderColor:Vr,loadingText:Gr="...",emptyState:Xr,noRecordsText:ze="No records",noRecordsIcon:Qr,striped:Zr,noHeader:Kr,onRowClick:te,onCellClick:$r,onScrollToTop:Ue,onScrollToBottom:Ve,onScrollToLeft:Ge,onScrollToRight:Xe,rowContextMenu:N,rowExpansion:Yr,rowClassName:_r,rowStyle:jr,rowSx:Jr,customRowAttributes:oa,scrollViewportRef:ea,bodyRef:ra,m:aa,my:ta,mx:fa,mt:na,mb:la,ml:da,mr:sa,sx:ca,className:ua,classNames:Mo,style:pa,styles:fe,...ma}){let{ref:D,width:oo,height:eo}=(0,_.useElementSize)(),{ref:xa,height:ne}=(0,_.useElementSize)(),{ref:Ia,width:le,height:yo}=(0,_.useElementSize)(),{ref:ia,height:ga}=(0,_.useElementSize)(),{ref:Ca,height:Qe}=(0,_.useElementSize)(),[de,Ze]=(0,Q.useState)(!0),[se,Ke]=(0,Q.useState)(!0),[Oo,$e]=(0,Q.useState)(!0),[ce,Ye]=(0,Q.useState)(!0),{rowContextMenuInfo:ro,setRowContextMenuInfo:lo}=vr(c),Sa=Ar({rowExpansion:Yr,records:S,idAccessor:m}),ue=(0,Q.useCallback)(()=>{if(!c&&N&&lo(null),c||yo<=eo)Ze(!0),Ke(!0);else{let i=D.current.scrollTop,b=i===0,F=yo-i-eo<1;Ze(b),Ke(F),b&&b!==de&&Ue?.(),F&&F!==se&&Ve?.()}if(c||le===oo)$e(!0),Ye(!0);else{let i=D.current.scrollLeft,b=i===0,F=le-i-oo<1;$e(b),Ye(F),b&&b!==Oo&&Ge?.(),F&&F!==ce&&Xe?.()}},[c,Ve,Ge,Xe,Ue,N,eo,D,oo,se,Oo,ce,de,lo,yo,le]);Sr(ue,[ue]);let ha=(0,Q.useCallback)(i=>{D.current.scrollTo({top:0,left:0}),E(i)},[E,D]),vo=S?.length,_e=S?.map(i=>B(i,m)),Ao=!!g,wo=g?.map(i=>B(i,m)),je=_e!==void 0&&wo!==void 0&&wo.length>0,pe=C?S?.filter(C):S,Lo=pe?.map(i=>B(i,m)),Ho=je&&Lo.every(i=>wo.includes(i)),ba=je&&Lo.some(i=>wo.includes(i)),Ba=(0,Q.useCallback)(()=>{h?.(Ho?g.filter(i=>!Lo.includes(B(i,m))):mo([...g,...pe],i=>B(i,m)))},[Ho,m,h,Lo,pe,g]),{lastSelectionChangeIndex:Eo,setLastSelectionChangeIndex:Da}=Or(_e),me=Ao&&!Oo,{cx:Je,classes:Z,theme:ya}=nt({borderColor:r,rowBorderColor:t}),wa={m:aa,my:ta,mx:fa,mt:na,mb:la,ml:da,mr:sa},No=typeof fe=="function"?fe(ya,qr,qr):fe;return(0,P.jsxs)(j.Box,{...wa,className:Je(Z.root,{[Z.tableWithBorder]:o},ua,Mo?.root),sx:[i=>({borderRadius:i.radius[e]||e,boxShadow:i.shadows[p]||p,height:n,minHeight:s}),...(0,j.packSx)(ca)],style:{...No?.root,...pa},children:[(0,P.jsx)(qe,{viewportRef:(0,_.useMergedRef)(D,ea||null),topShadowVisible:!de,leftShadowVisible:!(g||Oo),rightShadowVisible:!ce,bottomShadowVisible:!se,headerHeight:ne,footerHeight:ga,onScrollPositionChange:ue,children:(0,P.jsxs)(j.Table,{ref:Ia,horizontalSpacing:k,className:Je(Z.table,{[Z.tableWithColumnBorders]:f,[Z.lastRowBorderBottomVisible]:yo<eo,[Z.textSelectionDisabled]:l,[Z.verticalAlignmentTop]:x==="top",[Z.verticalAlignmentBottom]:x==="bottom"}),striped:vo?Zr:!1,...ma,children:[Kr?null:(0,P.jsx)(Pr,{ref:xa,className:Mo?.header,style:No?.header,columns:u,sortStatus:L,sortIcons:R,onSortStatusChange:v,selectionVisible:Ao,selectionChecked:Ho,selectionIndeterminate:ba&&!Ho,onSelectionChange:Ba,selectionCheckboxProps:O,leftShadowVisible:me}),(0,P.jsx)("tbody",{ref:ra,children:vo?S.map((i,b)=>{let F=B(i,m),To=wo?.includes(F)||!1,qo=!1,Wo=!1;if(N){let{hidden:w}=N;(!w||!(typeof w=="function"?w(i,b):w))&&(N.trigger==="click"?qo=!0:Wo=!0)}let zo;h&&(zo=w=>{if(w.nativeEvent.shiftKey&&Eo!==null){let so=S.filter(b>Eo?(ao,to)=>to>=Eo&&to<=b&&(C?C(ao,to):!0):(ao,to)=>to>=b&&to<=Eo&&(C?C(ao,to):!0));h(To?Xo(g,so,ao=>B(ao,m)):mo([...g,...so],ao=>B(ao,m)))}else h(To?g.filter(so=>B(so,m)!==F):mo([...g,i],so=>B(so,m)));Da(b)});let Po;qo?Po=w=>{lo({y:w.clientY,x:w.clientX,record:i,recordIndex:b}),te?.(i,b,w)}:te&&(Po=w=>{te(i,b,w)});let or;return Wo&&(or=w=>{w.preventDefault(),lo({y:w.clientY,x:w.clientX,record:i,recordIndex:b})}),(0,P.jsx)(Le,{record:i,recordIndex:b,columns:u,defaultColumnRender:I,selectionVisible:Ao,selectionChecked:To,onSelectionChange:zo,isRecordSelectable:C,getSelectionCheckboxProps:M,onClick:Po,onCellClick:$r,onContextMenu:or,contextMenuVisible:ro?B(ro.record,m)===F:!1,expansion:Sa,className:_r,style:jr,sx:Jr,customRowAttributes:oa,leftShadowVisible:me},F)}):(0,P.jsx)(ie,{})}),u.some(i=>i.footer)&&(0,P.jsx)(Dr,{ref:ia,className:Mo?.footer,style:No?.footer,borderColor:r,columns:u,selectionVisible:Ao,leftShadowVisible:me,scrollDiff:yo-eo})]})}),H&&(0,P.jsx)(Fr,{ref:Ca,className:Mo?.pagination,style:No?.pagination,topBorderColor:r,horizontalSpacing:k,fetching:c,page:H,onPageChange:ha,totalRecords:J,recordsPerPage:bo,onRecordsPerPageChange:jo,recordsPerPageOptions:Jo,recordsPerPageLabel:oe,paginationColor:Bo,paginationSize:Do,paginationText:ee,paginationWrapBreakpoint:re,getPaginationControlProps:Fo,noRecordsText:ze,loadingText:Gr,recordsLength:vo}),(0,P.jsx)(Re,{pt:ne,pb:Qe,fetching:c,backgroundBlur:ae,customContent:Wr,size:zr,variant:Ur,color:Vr}),(0,P.jsx)(be,{pt:ne,pb:Qe,icon:Qr,text:ze,active:!c&&!vo,children:Xr}),N&&ro&&(0,P.jsx)(He,{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:qo,hidden:Wo,disabled:zo,onClick:Po})=>i?(0,P.jsx)(Ee,{},b):Wo?null:(0,P.jsx)(Ne,{title:F??po(b),icon:To,color:qo,disabled:zo,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
|