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