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