mantine-datatable 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/DataTable.d.ts +1 -1
- package/dist/DataTable.d.ts.map +1 -1
- package/dist/DataTableHeader.d.ts.map +1 -1
- package/dist/DataTableRowMenu.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +3 -3
- package/dist/utils.d.ts +2 -0
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -84,11 +84,11 @@ Want to [become a code contributor](https://icflorescu.github.io/mantine-datatab
|
|
|
84
84
|
|
|
85
85
|
## Sponsor the project
|
|
86
86
|
|
|
87
|
-
If you find this package useful, please consider ❤️[sponsoring my work](https://github.com/sponsors/icflorescu). Your sponsorship will help me dedicate more time to maintaining the project and will encourage me to add new features and fix existing bugs. If you're a company using Mantine DataTable in a commercial project, you can also [hire my services](https://github.com/icflorescu).
|
|
87
|
+
If you find this package useful, please consider ❤️ [sponsoring my work](https://github.com/sponsors/icflorescu). Your sponsorship will help me dedicate more time to maintaining the project and will encourage me to add new features and fix existing bugs. If you're a company using Mantine DataTable in a commercial project, you can also [hire my services](https://github.com/icflorescu).
|
|
88
88
|
|
|
89
89
|
## Other means of support
|
|
90
90
|
|
|
91
|
-
If you find this package useful, please 🙏star the repository, 💕[tweet about it](http://twitter.com/share?text=Build%20data-rich%20React%20applications%20with%20Mantine%20DataTable&url=https%3A%2F%2Fgithub.com%2Ficflorescu%2Fmantine-datatable&hashtags=mantine%2Cdatatable%2Cdatagrid%2Creact&via=icflorescu), 👍[endorse me on LinkedIn](https://www.linkedin.com/in/icflorescu) or consider hiring my services.
|
|
91
|
+
If you find this package useful, please 🙏 star the repository, 💕 [tweet about it](http://twitter.com/share?text=Build%20data-rich%20React%20applications%20with%20Mantine%20DataTable&url=https%3A%2F%2Fgithub.com%2Ficflorescu%2Fmantine-datatable&hashtags=mantine%2Cdatatable%2Cdatagrid%2Creact&via=icflorescu), 👍 [endorse me on LinkedIn](https://www.linkedin.com/in/icflorescu) or consider hiring my services.
|
|
92
92
|
|
|
93
93
|
The more stars this repository gets, the more visibility it gains among the Mantine users community. The more
|
|
94
94
|
users it gets, the more chances that some of those users will become active code contributors willing to put
|
|
@@ -105,7 +105,7 @@ Mentioning “Mantine DataTable” in your text would help me prioritize your me
|
|
|
105
105
|
|
|
106
106
|
## Acknowledgements
|
|
107
107
|
|
|
108
|
-
🙏Special thanks to [Ani Ravi](https://github.com/aniravi24) for being the first person to sponsor my work on this project!
|
|
108
|
+
🙏 Special thanks to [Ani Ravi](https://github.com/aniravi24) for being the first person to sponsor my work on this project!
|
|
109
109
|
|
|
110
110
|
## License
|
|
111
111
|
|
package/dist/DataTable.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DataTableProps } from './types';
|
|
1
|
+
import type { DataTableProps } from './types';
|
|
2
2
|
export default function DataTable<T>({ withBorder, borderRadius, borderColor, rowBorderColor, withColumnBorders, textSelectionDisabled, height, minHeight, shadow, verticalAlignment, fetching, columns, defaultColumnRender, idAccessor, records, selectedRecords, onSelectedRecordsChange, isRecordSelectable, sortStatus, onSortStatusChange, horizontalSpacing, page, onPageChange, totalRecords, recordsPerPage, onRecordsPerPageChange, recordsPerPageOptions, recordsPerPageLabel, paginationColor, paginationSize, paginationText, paginationWrapBreakpoint, loaderBackgroundBlur, customLoader, loaderSize, loaderVariant, loaderColor, loadingText, emptyState, noRecordsText, noRecordsIcon, striped, onRowClick, onCellClick, onScrollToTop, onScrollToBottom, onScrollToLeft, onScrollToRight, rowContextMenu, rowExpansion, rowClassName, rowStyle, rowSx, customRowAttributes, scrollViewportRef: scrollViewportRefProp, bodyRef, m, my, mx, mt, mb, ml, mr, sx, className, classNames, style, styles, ...otherProps }: DataTableProps<T>): JSX.Element;
|
|
3
3
|
//# sourceMappingURL=DataTable.d.ts.map
|
package/dist/DataTable.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../DataTable.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../DataTable.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA2E9C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,EAAE,EACnC,UAAU,EACV,YAAY,EACZ,WAAqG,EACrG,cACiG,EACjG,iBAAiB,EACjB,qBAAqB,EACrB,MAAe,EACf,SAAS,EACT,MAAM,EACN,iBAA4B,EAC5B,QAAQ,EACR,OAAO,EACP,mBAAmB,EACnB,UAAiB,EACjB,OAAO,EACP,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,mBAAwC,EACxC,eAAe,EACf,cAAqB,EACrB,cAAoF,EACpF,wBAA+B,EAC/B,oBAAoB,EACpB,YAAY,EACZ,UAAU,EACV,aAAa,EACb,WAAW,EACX,WAAmB,EACnB,UAAU,EACV,aAA4B,EAC5B,aAAa,EACb,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,mBAAmB,EACnB,iBAAiB,EAAE,qBAAqB,EACxC,OAAO,EACP,CAAC,EACD,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,SAAS,EACT,UAAU,EACV,KAAK,EACL,MAAM,EACN,GAAG,UAAU,EACd,EAAE,cAAc,CAAC,CAAC,CAAC,eAoVnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableHeader.d.ts","sourceRoot":"","sources":["../DataTableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DataTableHeader.d.ts","sourceRoot":"","sources":["../DataTableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAkC,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAkDpE,KAAK,oBAAoB,CAAC,CAAC,IAAI;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC5C,kBAAkB,EAAE,CAAC,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5E,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,sBAAsB,EAAE,OAAO,CAAC;IAChC,iBAAiB,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5C,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC;;SAsEgD,aAAa,uBAAuB,CAAC;MAAO,WAAW;AApEzG,wBAoE0G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableRowMenu.d.ts","sourceRoot":"","sources":["../DataTableRowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DataTableRowMenu.d.ts","sourceRoot":"","sources":["../DataTableRowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAEpG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvC,KAAK,qBAAqB,GAAG;IAC3B,YAAY,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC5C,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,YAAmB,EACnB,MAAa,EACb,MAAU,EACV,CAAC,EAAE,QAAQ,EACX,CAAC,EAAE,QAAQ,EACX,SAAS,EACT,QAAQ,GACT,EAAE,qBAAqB,eAoCvB"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var ea=Object.create;var Ro=Object.defineProperty;var ra=Object.getOwnPropertyDescriptor;var aa=Object.getOwnPropertyNames;var ta=Object.getPrototypeOf,fa=Object.prototype.hasOwnProperty;var na=(o,e)=>()=>(o&&(e=o(o=0)),e);var re=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),la=(o,e)=>{for(var r in e)Ro(o,r,{get:e[r],enumerable:!0})},ze=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of aa(e))!fa.call(o,f)&&f!==r&&Ro(o,f,{get:()=>e[f],enumerable:!(t=ra(e,f))||t.enumerable});return o};var Ve=(o,e,r)=>(r=o!=null?ea(ta(o)):{},ze(e||!o||!o.__esModule?Ro(r,"default",{value:o,enumerable:!0}):r,o)),da=o=>ze(Ro({},"__esModule",{value:!0}),o);var s,a=na(()=>{"use strict";s=Ve(require("react"),1)});var Ze=re((Ha,Xe)=>{"use strict";a();var ca="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Xe.exports=ca});var Ye=re((Ea,$e)=>{"use strict";a();var ua=Ze();function Qe(){}function Ke(){}Ke.resetWarningCache=Qe;$e.exports=function(){function o(t,f,l,d,p,u){if(u!==ua){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:Ke,resetWarningCache:Qe};return r.PropTypes=r,r}});var je=re((za,_e)=>{a();_e.exports=Ye()();var Wa,Ua});var ka={};la(ka,{DataTable:()=>De});module.exports=da(ka);a();a();var K=require("@mantine/core"),eo=require("@mantine/hooks"),ro=require("react");a();var Ge=require("@mantine/core"),ae=require("react/jsx-runtime"),sa=(0,Ge.createStyles)({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function te(){let{classes:o}=sa();return(0,ae.jsx)("tr",{className:o.root,children:(0,ae.jsx)("td",{})})}a();var lo=require("@mantine/core");a();a();var So=require("react"),X=Ve(je());a();var Je={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 pa=Object.defineProperty,ma=Object.defineProperties,xa=Object.getOwnPropertyDescriptors,Oo=Object.getOwnPropertySymbols,rr=Object.prototype.hasOwnProperty,ar=Object.prototype.propertyIsEnumerable,or=(o,e,r)=>e in o?pa(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,er=(o,e)=>{for(var r in e||(e={}))rr.call(e,r)&&or(o,r,e[r]);if(Oo)for(var r of Oo(e))ar.call(e,r)&&or(o,r,e[r]);return o},Ia=(o,e)=>ma(o,xa(e)),ia=(o,e)=>{var r={};for(var t in o)rr.call(o,t)&&e.indexOf(t)<0&&(r[t]=o[t]);if(o!=null&&Oo)for(var t of Oo(o))e.indexOf(t)<0&&ar.call(o,t)&&(r[t]=o[t]);return r},no=(o,e,r)=>{let t=(0,So.forwardRef)((f,l)=>{var d=f,{color:p="currentColor",size:u=24,stroke:n=2,children:I}=d,g=ia(d,["color","size","stroke","children"]);return(0,So.createElement)("svg",er(Ia(er({ref:l},Je),{width:u,height:u,stroke:p,strokeWidth:n,className:`tabler-icon tabler-icon-${o}`}),g),[...r.map(([m,c])=>(0,So.createElement)(m,c)),...I||[]])});return t.propTypes={color:X.default.string,size:X.default.oneOfType([X.default.string,X.default.number]),stroke:X.default.oneOfType([X.default.string,X.default.number])},t.displayName=`${e}`,t};a();var fe=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 ne=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 le=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 E=require("react/jsx-runtime"),ga=(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 de({icon:o,text:e,pt:r,pb:t,active:f,children:l}){let{classes:d,cx:p}=ga();return(0,E.jsx)(lo.Center,{pt:r,pb:t,className:p(d.root,{[d.active]:f}),children:l||(0,E.jsxs)(E.Fragment,{children:[o||(0,E.jsx)("div",{className:d.standardIcon,children:(0,E.jsx)(le,{})}),(0,E.jsx)(lo.Text,{size:"sm",color:"dimmed",children:e})]})})}a();var Z=require("@mantine/core"),fr=require("react");a();var O=require("@mantine/core"),F=require("react/jsx-runtime"),tr={xs:22,sm:26,md:32,lg:38,xl:44};function se({size:o,label:e,values:r,value:t,onChange:f,color:l}){return(0,F.jsxs)(O.Group,{spacing:"xs",children:[(0,F.jsx)(O.Text,{size:o,children:e}),(0,F.jsxs)(O.Menu,{withinPortal:!0,withArrow:!0,children:[(0,F.jsx)(O.Menu.Target,{children:(0,F.jsx)(O.Button,{size:o,variant:"default",sx:[{fontWeight:"normal"},d=>({height:tr[o],paddingLeft:d.spacing[o],paddingRight:d.spacing[o]})],children:t})}),(0,F.jsx)(O.Menu.Dropdown,{children:r.map(d=>{let p=d===t;return(0,F.jsx)(O.Menu.Item,{sx:[{height:tr[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,F.jsx)(O.Text,{size:o,children:d})},d)})})]})]})}var so=require("react/jsx-runtime"),Ca=(0,Z.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}})),nr=(0,fr.forwardRef)(function({className:e,style:r,topBorderColor:t,fetching:f,page:l,onPageChange:d,paginationColor:p,paginationSize:u,loadingText:n,noRecordsText:I,paginationText:g,totalRecords:m,recordsPerPage:c,onRecordsPerPageChange:i,recordsPerPageLabel:C,recordsPerPageOptions:b,recordsLength:B,horizontalSpacing:$,paginationWrapBreakpoint:N},w){let P;if(f)P=n;else if(!m)P=I;else{let V=(l-1)*c+1,po=V+B-1;P=g({from:V,to:po,totalRecords:m})}let{classes:M,cx:k}=Ca({topBorderColor:t,paginationWrapBreakpoint:N});return(0,so.jsxs)(Z.Box,{ref:w,px:$??"xs",py:"xs",className:k(M.root,e),style:r,children:[(0,so.jsx)(Z.Text,{className:M.text,size:u,children:P}),b&&(0,so.jsx)(se,{size:u,label:C,values:b,value:c,onChange:i}),(0,so.jsx)(Z.Pagination,{color:p,className:k(M.pagination,{[M.paginationFetching]:f||!B}),value:l,onChange:d,size:u,total:Math.ceil(m/c)})]})});a();var Ao=require("@mantine/core"),cr=require("react");a();var A=require("@mantine/core");a();var lr=require("@mantine/core"),dr=require("@mantine/hooks");function ko(o){let e=(0,lr.useMantineTheme)(),r=typeof o=="function"?o(e):o;return(0,dr.useMediaQuery)(r||"",!0)}function vo(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 sr(o,e,r){return o.filter(t=>!e.map(r).includes(r(t)))}function Fo(o,e){return o.filter((r,t,f)=>t===f.findIndex(l=>e(r)===e(l)))}function h(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}var q=require("react/jsx-runtime"),Sa=(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 ce({className:o,sx:e,style:r,accessor:t,visibleMediaQuery:f,title:l,sortable:d,textAlignment:p,width:u,sortStatus:n,onSortStatusChange:I}){let{cx:g,classes:m}=Sa();if(!ko(f))return null;let c=l??vo(t),i=typeof c=="string"?c:void 0;return(0,q.jsx)(A.Box,{component:"th",className:g({[m.sortableColumnHeader]:d},o),sx:[{"&&":{textAlign:p},width:u,minWidth:u,maxWidth:u},e],style:r,role:d?"button":void 0,onClick:d&&I?()=>{I({columnAccessor:t,direction:n?.direction==="asc"?"desc":"asc"})}:void 0,children:d||n?.columnAccessor===t?(0,q.jsxs)(A.Group,{className:m.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[(0,q.jsx)(A.Box,{className:g(m.columnHeaderText,m.sortableColumnHeaderText),title:i,children:c}),(0,q.jsx)(A.Center,{children:n?.columnAccessor===t?(0,q.jsx)(fe,{className:g(m.sortableColumnHeaderIcon,{[m.sortableColumnHeaderIconRotated]:n.direction==="desc"}),size:14}):(0,q.jsx)(ne,{className:m.sortableColumnHeaderNeutralIcon,size:14})})]}):(0,q.jsx)(A.Box,{className:m.columnHeaderText,title:i,children:c})})}var J=require("react/jsx-runtime"),ha=(0,Ao.createStyles)(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white},textSelectionDisabled:{userSelect:"none"},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-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"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),ur=(0,cr.forwardRef)(function({className:e,style:r,sortStatus:t,onSortStatusChange:f,columns:l,selectionVisible:d,selectionChecked:p,selectionIndeterminate:u,onSelectionChange:n,leftShadowVisible:I},g){let{classes:m,cx:c}=ha();return(0,J.jsx)("thead",{className:c(m.root,e),style:r,ref:g,children:(0,J.jsxs)("tr",{children:[d&&(0,J.jsx)("th",{className:c(m.selectorColumnHeader,{[m.selectorColumnHeaderWithRightShadow]:I}),children:(0,J.jsx)(Ao.Checkbox,{classNames:{input:m.selectionCheckboxInput},checked:p,indeterminate:u,disabled:!n,onChange:n})}),l.map(({accessor:i,hidden:C,visibleMediaQuery:b,textAlignment:B,width:$,title:N,sortable:w,titleClassName:P,titleStyle:M,titleSx:k})=>C?null:(0,J.jsx)(ce,{className:P,style:M,sx:k,accessor:i,visibleMediaQuery:b,textAlignment:B,width:$,title:N,sortable:w,sortStatus:t,onSortStatusChange:f},i))]})})});a();var co=require("@mantine/core"),ue=require("react/jsx-runtime"),ba=(0,co.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 pe({pt:o,pb:e,fetching:r,customContent:t,backgroundBlur:f,size:l,variant:d,color:p}){let{classes:u,cx:n}=ba();return(0,ue.jsx)(co.Center,{pt:o,pb:e,className:n(u.root,{[u.fetching]:r}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:r&&(t||(0,ue.jsx)(co.Loader,{size:l,variant:d,color:p}))})}a();var Eo=require("@mantine/core");a();var Lo=require("@mantine/core");var pr=require("react/jsx-runtime"),Ba=(0,Lo.createStyles)({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function me({className:o,sx:e,style:r,visibleMediaQuery:t,record:f,recordIndex:l,onClick:d,noWrap:p,ellipsis:u,textAlignment:n,width:I,accessor:g,render:m,defaultRender:c,customCellAttributes:i}){let{cx:C,classes:b}=Ba();return ko(t)?(0,pr.jsx)(Lo.Box,{component:"td",className:C({[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,...i?.(f,l),children:m?m(f,l):c?c(f,l,g):h(f,g)}):null}a();var Ho=require("@mantine/core");a();var xe=require("@mantine/hooks"),L=require("react");function mr(o){let[e,r]=(0,L.useState)(null),t=o?.join(":")||"";return(0,L.useEffect)(()=>{r(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function xr(o){let[e,r]=(0,L.useState)(null);return(0,L.useEffect)(()=>{o&&r(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:r}}function Ir({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=>h(I,r)):n&&(t=e.filter(n).map(I=>h(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 g=m=>l(f.filter(c=>c!==h(m,r)));return{expandOnClick:p!=="always"&&p!=="never",isRowExpanded:m=>p==="always"?!0:f.includes(h(m,r)),expandRow:m=>{let c=h(m,r);l(u?[...f,c]:[c])},collapseRow:g,collapseProps:n,content:(m,c)=>()=>I({record:m,recordIndex:c,collapse:()=>g(m)})}}}function ir(o,e){let[r,t]=(0,L.useState)(o),[f,l]=(0,L.useState)(o),d=(0,xe.useTimeout)(()=>t(!0),0),p=(0,xe.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"),Da=(0,Ho.createStyles)({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function Ie({open:o,colSpan:e,content:r,collapseProps:t}){let{expanded:f,visible:l}=ir(o,t?.transitionDuration),{cx:d,classes:p}=Da();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)(Ho.Collapse,{in:f,...t,children:r()})})})]}):null}a();var No=require("@mantine/core"),ie=require("react/jsx-runtime"),ya=(0,No.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:-o.spacing.sm,bottom:0,borderLeft:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},withRightShadow:{"&::after":{opacity:1}},checkbox:{cursor:"pointer"}}});function ge({withRightShadow:o,...e}){let{cx:r,classes:t}=ya();return(0,ie.jsx)("td",{className:r(t.root,{[t.withRightShadow]:o}),children:(0,ie.jsx)(No.Checkbox,{classNames:{input:t.checkbox},...e,onClick:f=>f.stopPropagation()})})}var U=require("react/jsx-runtime"),Ta=(0,Eo.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 Ce({record:o,recordIndex:e,columns:r,defaultColumnRender:t,selectionVisible:f,selectionChecked:l,onSelectionChange:d,isRecordSelectable:p,onClick:u,onCellClick:n,onContextMenu:I,expansion:g,customRowAttributes:m,className:c,style:i,sx:C,contextMenuVisible:b,leftShadowVisible:B}){let{cx:$,classes:N}=Ta();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Eo.Box,{component:"tr",className:$({[N.withPointerCursor]:u||g?.expandOnClick,[N.selected]:l,[N.contextMenuVisible]:b},typeof c=="function"?c(o,e):c),onClick:w=>{if(g){let{isRowExpanded:P,expandOnClick:M,expandRow:k,collapseRow:V}=g;M&&(P(o)?V(o):k(o))}u?.(w)},style:typeof i=="function"?i(o,e):i,sx:C,...m?.(o,e),onContextMenu:I,children:[f&&(0,U.jsx)(ge,{withRightShadow:B,checked:l,disabled:!d||(p?!p(o,e):!1),onChange:d}),r.map((w,P)=>{let{accessor:M,hidden:k,visibleMediaQuery:V,textAlignment:po,noWrap:qo,ellipsis:Wo,width:Uo,render:zo,cellsClassName:mo,cellsStyle:xo,cellsSx:Vo,customCellAttributes:Go}=w,bo;return n&&(bo=()=>n({record:o,recordIndex:e,column:w,columnIndex:P})),k?null:(0,U.jsx)(me,{className:typeof mo=="function"?mo(o,e):mo,style:typeof xo=="function"?xo(o,e):xo,sx:Vo,visibleMediaQuery:V,record:o,recordIndex:e,onClick:bo,accessor:M,textAlignment:po,noWrap:qo,ellipsis:Wo,width:Uo,render:zo,defaultRender:t,customCellAttributes:Go},M)})]}),g&&(0,U.jsx)(Ie,{colSpan:r.filter(w=>!w.hidden).length+(f?1:0),open:g.isRowExpanded(o),content:g.content(o,e),collapseProps:g.collapseProps})]})}a();var Q=require("@mantine/core"),z=require("@mantine/hooks"),gr=require("react/jsx-runtime"),wa=(0,Q.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 Se({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)(),g=(0,z.useMergedRef)(p,u),{dir:m,spacing:c}=(0,Q.useMantineTheme)(),i=(0,Q.px)(c.md),{innerWidth:C,innerHeight:b}=window,{classes:B}=wa();return(0,gr.jsx)(Q.Paper,{ref:g,shadow:e,radius:o,className:B.root,sx:{zIndex:r,top:t+I+i>b?b-I-i:t,left:m==="ltr"?f+n+i>C?C-n-i:f:C-i-(f-n-i<0?n+i:f)},children:d})}a();var Cr=require("@mantine/core"),Sr=require("react/jsx-runtime"),Pa=(0,Cr.createStyles)(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function he(){let{classes:o}=Pa();return(0,Sr.jsx)("div",{className:o.root})}a();var H=require("@mantine/core"),ho=require("react/jsx-runtime"),Ma=(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 be({icon:o,title:e,color:r,disabled:t,onClick:f}){let{classes:l}=Ma({color:r});return(0,ho.jsxs)(H.UnstyledButton,{className:l.root,disabled:t,onClick:f,children:[o&&(0,ho.jsx)(H.Box,{className:l.icon,children:o}),(0,ho.jsx)(H.Text,{className:l.title,size:"sm",children:e})]})}a();var uo=require("@mantine/core"),oo=require("react/jsx-runtime"),Ra=(0,uo.createStyles)(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{flex:"1 1 100%"},scrollbar:{'&[data-state="visible"]':{background:"transparent"},"div::before":{pointerEvents:"none"}},corner:{background:"transparent"},thumb:{zIndex:3},shadow:{position:"absolute",pointerEvents:"none",opacity:0,transition:"opacity .15s ease"},topShadow:{zIndex:2,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 Be({topShadowVisible:o,leftShadowVisible:e,rightShadowVisible:r,bottomShadowVisible:t,headerHeight:f,onScrollPositionChange:l,children:d,viewportRef:p}){let{cx:u,classes:n}=Ra();return(0,oo.jsxs)(uo.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,oo.jsx)(uo.Box,{className:u(n.shadow,n.topShadow,{[n.shadowVisible]:o}),sx:{top:f}}),(0,oo.jsx)("div",{className:u(n.shadow,n.leftShadow,{[n.shadowVisible]:e})}),(0,oo.jsx)("div",{className:u(n.shadow,n.rightShadow,{[n.shadowVisible]:r})}),(0,oo.jsx)("div",{className:u(n.shadow,n.bottomShadow,{[n.shadowVisible]:t})})]})}var y=require("react/jsx-runtime"),hr={},Oa=(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 De({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:g,defaultColumnRender:m,idAccessor:c="id",records:i,selectedRecords:C,onSelectedRecordsChange:b,isRecordSelectable:B,sortStatus:$,onSortStatusChange:N,horizontalSpacing:w,page:P,onPageChange:M,totalRecords:k,recordsPerPage:V,onRecordsPerPageChange:po,recordsPerPageOptions:qo,recordsPerPageLabel:Wo="Records per page",paginationColor:Uo,paginationSize:zo="sm",paginationText:mo=({from:D,to:Io,totalRecords:ao})=>`${D} - ${Io} / ${ao}`,paginationWrapBreakpoint:xo="sm",loaderBackgroundBlur:Vo,customLoader:Go,loaderSize:bo,loaderVariant:br,loaderColor:Br,loadingText:Dr="...",emptyState:yr,noRecordsText:ye="No records",noRecordsIcon:Tr,striped:wr,onRowClick:Xo,onCellClick:Pr,onScrollToTop:Te,onScrollToBottom:we,onScrollToLeft:Pe,onScrollToRight:Me,rowContextMenu:v,rowExpansion:Mr,rowClassName:Rr,rowStyle:Or,rowSx:kr,customRowAttributes:vr,scrollViewportRef:Fr,bodyRef:Ar,m:Lr,my:Hr,mx:Nr,mt:Er,mb:qr,ml:Wr,mr:Ur,sx:zr,className:Vr,classNames:Zo,style:Gr,styles:Qo,...Xr}){let{ref:D,width:Io,height:ao}=(0,eo.useElementSize)(),{ref:Zr,height:Ko}=(0,eo.useElementSize)(),{ref:Qr,width:$o,height:Bo}=(0,eo.useElementSize)(),{ref:Kr,height:Re}=(0,eo.useElementSize)(),[Yo,Oe]=(0,ro.useState)(!0),[_o,ke]=(0,ro.useState)(!0),[Do,ve]=(0,ro.useState)(!0),[jo,Fe]=(0,ro.useState)(!0),{rowContextMenuInfo:Y,setRowContextMenuInfo:to}=xr(I),$r=Ir({rowExpansion:Mr,records:i,idAccessor:c}),Ae=()=>{if(!I&&v&&to(null),I||Bo<=ao)Oe(!0),ke(!0);else{let x=D.current.scrollTop,S=x===0,T=Bo-x-ao<1;Oe(S),ke(T),S&&S!==Yo&&Te?.(),T&&T!==_o&&we?.()}if(I||$o===Io)ve(!0),Fe(!0);else{let x=D.current.scrollLeft,S=x===0,T=$o-x-Io<1;ve(S),Fe(T),S&&S!==Do&&Pe?.(),T&&T!==jo&&Me?.()}};(0,ro.useEffect)(Ae,[I,we,Pe,Me,Te,v,ao,D,Io,_o,Do,jo,Yo,to,Bo,$o]);let Yr=x=>{D.current.scrollTo({top:0,left:0}),M(x)},yo=i?.length,Le=i?.map(x=>h(x,c)),io=C?.map(x=>h(x,c)),He=Le!==void 0&&io!==void 0&&io.length>0,Ne=B?i?.filter(B):i,Jo=Ne?.map(x=>h(x,c)),oe=He&&Jo.every(x=>io.includes(x)),_r=He&&Jo.some(x=>io.includes(x)),Ee;b&&(Ee=()=>{b(oe?C.filter(x=>!Jo.includes(h(x,c))):Fo([...C,...Ne],x=>h(x,c)))});let{lastSelectionChangeIndex:To,setLastSelectionChangeIndex:jr}=mr(Le),qe=!!C&&!Do,{cx:We,classes:G,theme:Jr}=Oa({borderColor:r,rowBorderColor:t}),oa={m:Lr,my:Hr,mx:Nr,mt:Er,mb:qr,ml:Wr,mr:Ur},ee=typeof Qo=="function"?Qo(Jr,hr,hr):Qo;return(0,y.jsxs)(K.Box,{...oa,className:We(G.root,{[G.tableWithBorder]:o},Vr,Zo?.root),sx:[x=>({borderRadius:x.radius[e]||e,boxShadow:x.shadows[u]||u,height:d,minHeight:p}),...(0,K.packSx)(zr)],style:{...ee?.root,...Gr},children:[(0,y.jsx)(Be,{viewportRef:(0,eo.useMergedRef)(D,Fr||null),topShadowVisible:!Yo,leftShadowVisible:!(C||Do),rightShadowVisible:!jo,bottomShadowVisible:!_o,headerHeight:Ko,onScrollPositionChange:Ae,children:(0,y.jsxs)(K.Table,{ref:Qr,horizontalSpacing:w,className:We(G.table,{[G.tableWithColumnBorders]:f,[G.lastRowBorderBottomVisible]:Bo<ao,[G.textSelectionDisabled]:l,[G.verticalAlignmentTop]:n==="top",[G.verticalAlignmentBottom]:n==="bottom"}),striped:yo?wr:!1,...Xr,children:[(0,y.jsx)(ur,{ref:Zr,className:Zo?.header,style:ee?.header,columns:g,sortStatus:$,onSortStatusChange:N,selectionVisible:!!C,selectionChecked:oe,selectionIndeterminate:_r&&!oe,onSelectionChange:Ee,leftShadowVisible:qe}),(0,y.jsx)("tbody",{ref:Ar,children:yo?i.map((x,S)=>{let T=h(x,c),go=io?.includes(T)||!1,wo=!1,Po=!1;if(v){let{hidden:R}=v;(!R||!(typeof R=="function"?R(x,S):R))&&(v.trigger==="click"?wo=!0:Po=!0)}let Mo;b&&(Mo=R=>{if(R.nativeEvent.shiftKey&&To!==null){let fo=i.filter(S>To?(_,j)=>j>=To&&j<=S&&(B?B(_,j):!0):(_,j)=>j>=S&&j<=To&&(B?B(_,j):!0));b(go?sr(C,fo,_=>h(_,c)):Fo([...C,...fo],_=>h(_,c)))}else b(go?C.filter(fo=>h(fo,c)!==T):Fo([...C,x],fo=>h(fo,c)));jr(S)});let Co;wo?Co=R=>{to({y:R.clientY,x:R.clientX,record:x,recordIndex:S}),Xo?.(x,S)}:Xo&&(Co=()=>{Xo(x,S)});let Ue;return Po&&(Ue=R=>{R.preventDefault(),to({y:R.clientY,x:R.clientX,record:x,recordIndex:S})}),(0,y.jsx)(Ce,{record:x,recordIndex:S,columns:g,defaultColumnRender:m,selectionVisible:!!C,selectionChecked:go,onSelectionChange:Mo,isRecordSelectable:B,onClick:Co,onCellClick:Pr,onContextMenu:Ue,contextMenuVisible:Y?h(Y.record,c)===T:!1,expansion:$r,className:Rr,style:Or,sx:kr,customRowAttributes:vr,leftShadowVisible:qe},T)}):(0,y.jsx)(te,{})})]})}),P&&(0,y.jsx)(nr,{ref:Kr,className:Zo?.pagination,style:ee?.pagination,topBorderColor:r,horizontalSpacing:w,fetching:I,page:P,onPageChange:Yr,totalRecords:k,recordsPerPage:V,onRecordsPerPageChange:po,recordsPerPageOptions:qo,recordsPerPageLabel:Wo,paginationColor:Uo,paginationSize:zo,paginationText:mo,paginationWrapBreakpoint:xo,noRecordsText:ye,loadingText:Dr,recordsLength:yo}),(0,y.jsx)(pe,{pt:Ko,pb:Re,fetching:I,backgroundBlur:Vo,customContent:Go,size:bo,variant:br,color:Br}),(0,y.jsx)(de,{pt:Ko,pb:Re,icon:Tr,text:ye,active:!I&&!yo,children:yr}),v&&Y&&(0,y.jsx)(Se,{zIndex:v.zIndex,borderRadius:v.borderRadius,shadow:v.shadow,y:Y.y,x:Y.x,onDestroy:()=>to(null),children:v.items(Y.record,Y.recordIndex).map(({divider:x,key:S,title:T,icon:go,color:wo,hidden:Po,disabled:Mo,onClick:Co})=>x?(0,y.jsx)(he,{},S):Po?null:(0,y.jsx)(be,{title:T??vo(S),icon:go,color:wo,disabled:Mo,onClick:()=>{to(null),Co()}},S))})]})}a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();
|
|
1
|
+
"use strict";var aa=Object.create;var Fo=Object.defineProperty;var ta=Object.getOwnPropertyDescriptor;var fa=Object.getOwnPropertyNames;var na=Object.getPrototypeOf,la=Object.prototype.hasOwnProperty;var da=(o,e)=>()=>(o&&(e=o(o=0)),e);var fe=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),sa=(o,e)=>{for(var r in e)Fo(o,r,{get:e[r],enumerable:!0})},ze=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of fa(e))!la.call(o,f)&&f!==r&&Fo(o,f,{get:()=>e[f],enumerable:!(t=ta(e,f))||t.enumerable});return o};var Ve=(o,e,r)=>(r=o!=null?aa(na(o)):{},ze(e||!o||!o.__esModule?Fo(r,"default",{value:o,enumerable:!0}):r,o)),ca=o=>ze(Fo({},"__esModule",{value:!0}),o);var c,a=da(()=>{"use strict";c=Ve(require("react"),1)});var Ze=fe((Na,Xe)=>{"use strict";a();var pa="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Xe.exports=pa});var Ye=fe((Wa,$e)=>{"use strict";a();var ma=Ze();function Qe(){}function Ke(){}Ke.resetWarningCache=Qe;$e.exports=function(){function o(t,f,l,d,p,u){if(u!==ma){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:Ke,resetWarningCache:Qe};return r.PropTypes=r,r}});var je=fe((Ga,_e)=>{a();_e.exports=Ye()();var za,Va});var Fa={};sa(Fa,{DataTable:()=>Te});module.exports=ca(Fa);a();a();var K=require("@mantine/core"),eo=require("@mantine/hooks"),V=require("react");a();var Ge=require("@mantine/core"),ne=require("react/jsx-runtime"),ua=(0,Ge.createStyles)({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function le(){let{classes:o}=ua();return(0,ne.jsx)("tr",{className:o.root,children:(0,ne.jsx)("td",{})})}a();var no=require("@mantine/core");a();a();var bo=require("react"),Z=Ve(je());a();var Je={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 xa=Object.defineProperty,Ia=Object.defineProperties,ia=Object.getOwnPropertyDescriptors,Ao=Object.getOwnPropertySymbols,rr=Object.prototype.hasOwnProperty,ar=Object.prototype.propertyIsEnumerable,or=(o,e,r)=>e in o?xa(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,er=(o,e)=>{for(var r in e||(e={}))rr.call(e,r)&&or(o,r,e[r]);if(Ao)for(var r of Ao(e))ar.call(e,r)&&or(o,r,e[r]);return o},ga=(o,e)=>Ia(o,ia(e)),Ca=(o,e)=>{var r={};for(var t in o)rr.call(o,t)&&e.indexOf(t)<0&&(r[t]=o[t]);if(o!=null&&Ao)for(var t of Ao(o))e.indexOf(t)<0&&ar.call(o,t)&&(r[t]=o[t]);return r},fo=(o,e,r)=>{let t=(0,bo.forwardRef)((f,l)=>{var d=f,{color:p="currentColor",size:u=24,stroke:n=2,children:I}=d,i=Ca(d,["color","size","stroke","children"]);return(0,bo.createElement)("svg",er(ga(er({ref:l},Je),{width:u,height:u,stroke:p,strokeWidth:n,className:`tabler-icon tabler-icon-${o}`}),i),[...r.map(([m,s])=>(0,bo.createElement)(m,s)),...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 de=fo("arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]);a();var se=fo("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 ce=fo("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"),Sa=(0,no.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 ue({icon:o,text:e,pt:r,pb:t,active:f,children:l}){let{classes:d,cx:p}=Sa();return(0,N.jsx)(no.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)(ce,{})}),(0,N.jsx)(no.Text,{size:"sm",color:"dimmed",children:e})]})})}a();var Q=require("@mantine/core"),fr=require("react");a();var O=require("@mantine/core"),F=require("react/jsx-runtime"),tr={xs:22,sm:26,md:32,lg:38,xl:44};function pe({size:o,label:e,values:r,value:t,onChange:f,color:l}){return(0,F.jsxs)(O.Group,{spacing:"xs",children:[(0,F.jsx)(O.Text,{size:o,children:e}),(0,F.jsxs)(O.Menu,{withinPortal:!0,withArrow:!0,children:[(0,F.jsx)(O.Menu.Target,{children:(0,F.jsx)(O.Button,{size:o,variant:"default",sx:[{fontWeight:"normal"},d=>({height:tr[o],paddingLeft:d.spacing[o],paddingRight:d.spacing[o]})],children:t})}),(0,F.jsx)(O.Menu.Dropdown,{children:r.map(d=>{let p=d===t;return(0,F.jsx)(O.Menu.Item,{sx:[{height:tr[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,F.jsx)(O.Text,{size:o,children:d})},d)})})]})]})}var lo=require("react/jsx-runtime"),ha=(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}})),nr=(0,fr.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:s,onRecordsPerPageChange:g,recordsPerPageLabel:C,recordsPerPageOptions:B,recordsLength:S,horizontalSpacing:$,paginationWrapBreakpoint:E},P){let M;if(f)M=n;else if(!m)M=I;else{let G=(l-1)*s+1,xo=G+S-1;M=i({from:G,to:xo,totalRecords:m})}let{classes:w,cx:k}=ha({topBorderColor:t,paginationWrapBreakpoint:E});return(0,lo.jsxs)(Q.Box,{ref:P,px:$??"xs",py:"xs",className:k(w.root,e),style:r,children:[(0,lo.jsx)(Q.Text,{className:w.text,size:u,children:M}),B&&(0,lo.jsx)(pe,{size:u,label:C,values:B,value:s,onChange:g}),(0,lo.jsx)(Q.Pagination,{color:p,className:k(w.pagination,{[w.paginationFetching]:f||!S}),value:l,onChange:d,size:u,total:Math.ceil(m/s)})]})});a();var so=require("@mantine/core"),ur=require("react");a();var A=require("@mantine/core");a();var lr=require("@mantine/core"),dr=require("@mantine/hooks"),Lo=require("react"),sr=typeof window<"u"?Lo.useLayoutEffect:Lo.useEffect;function Ho(o){let e=(0,lr.useMantineTheme)(),r=typeof o=="function"?o(e):o;return(0,dr.useMediaQuery)(r||"",!0)}function Eo(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 cr(o,e,r){return o.filter(t=>!e.map(r).includes(r(t)))}function No(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"),ba=(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 me({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}=ba();if(!Ho(f))return null;let s=l??Eo(t),g=typeof s=="string"?s: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,onClick:d&&I?()=>{I({columnAccessor:t,direction:n?.direction==="asc"?"desc":"asc"})}:void 0,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:g,children:s}),(0,q.jsx)(A.Center,{children:n?.columnAccessor===t?(0,q.jsx)(de,{className:i(m.sortableColumnHeaderIcon,{[m.sortableColumnHeaderIconRotated]:n.direction==="desc"}),size:14}):(0,q.jsx)(se,{className:m.sortableColumnHeaderNeutralIcon,size:14})})]}):(0,q.jsx)(A.Box,{className:m.columnHeaderText,title:g,children:s})})}var J=require("react/jsx-runtime"),Ba=(0,so.createStyles)(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white},textSelectionDisabled:{userSelect:"none"},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-(0,so.px)(o.spacing.sm),bottom:0,borderLeft:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),pr=(0,ur.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:s}=Ba();return(0,J.jsx)("thead",{className:s(m.root,e),style:r,ref:i,children:(0,J.jsxs)("tr",{children:[d&&(0,J.jsx)("th",{className:s(m.selectorColumnHeader,{[m.selectorColumnHeaderWithRightShadow]:I}),children:(0,J.jsx)(so.Checkbox,{classNames:{input:m.selectionCheckboxInput},checked:p,indeterminate:u,disabled:!n,onChange:n})}),l.map(({accessor:g,hidden:C,visibleMediaQuery:B,textAlignment:S,width:$,title:E,sortable:P,titleClassName:M,titleStyle:w,titleSx:k})=>C?null:(0,J.jsx)(me,{className:M,style:w,sx:k,accessor:g,visibleMediaQuery:B,textAlignment:S,width:$,title:E,sortable:P,sortStatus:t,onSortStatusChange:f},g))]})})});a();var co=require("@mantine/core"),xe=require("react/jsx-runtime"),Da=(0,co.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 Ie({pt:o,pb:e,fetching:r,customContent:t,backgroundBlur:f,size:l,variant:d,color:p}){let{classes:u,cx:n}=Da();return(0,xe.jsx)(co.Center,{pt:o,pb:e,className:n(u.root,{[u.fetching]:r}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:r&&(t||(0,xe.jsx)(co.Loader,{size:l,variant:d,color:p}))})}a();var Uo=require("@mantine/core");a();var qo=require("@mantine/core");var mr=require("react/jsx-runtime"),ya=(0,qo.createStyles)({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function ie({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:s,customCellAttributes:g}){let{cx:C,classes:B}=ya();return Ho(t)?(0,mr.jsx)(qo.Box,{component:"td",className:C({[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,...g?.(f,l),children:m?m(f,l):s?s(f,l,i):b(f,i)}):null}a();var Wo=require("@mantine/core");a();var ge=require("@mantine/hooks"),L=require("react");function xr(o){let[e,r]=(0,L.useState)(null),t=o?.join(":")||"";return(0,L.useEffect)(()=>{r(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function Ir(o){let[e,r]=(0,L.useState)(null);return(0,L.useEffect)(()=>{o&&r(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:r}}function ir({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(s=>s!==b(m,r)));return{expandOnClick:p!=="always"&&p!=="never",isRowExpanded:m=>p==="always"?!0:f.includes(b(m,r)),expandRow:m=>{let s=b(m,r);l(u?[...f,s]:[s])},collapseRow:i,collapseProps:n,content:(m,s)=>()=>I({record:m,recordIndex:s,collapse:()=>i(m)})}}}function gr(o,e){let[r,t]=(0,L.useState)(o),[f,l]=(0,L.useState)(o),d=(0,ge.useTimeout)(()=>t(!0),0),p=(0,ge.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"),wa=(0,Wo.createStyles)({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function Ce({open:o,colSpan:e,content:r,collapseProps:t}){let{expanded:f,visible:l}=gr(o,t?.transitionDuration),{cx:d,classes:p}=wa();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)(Wo.Collapse,{in:f,...t,children:r()})})})]}):null}a();var uo=require("@mantine/core"),Se=require("react/jsx-runtime"),Ta=(0,uo.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,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"}},withRightShadow:{"&::after":{opacity:1}},checkbox:{cursor:"pointer"}}});function he({withRightShadow:o,...e}){let{cx:r,classes:t}=Ta();return(0,Se.jsx)("td",{className:r(t.root,{[t.withRightShadow]:o}),children:(0,Se.jsx)(uo.Checkbox,{classNames:{input:t.checkbox},...e,onClick:f=>f.stopPropagation()})})}var U=require("react/jsx-runtime"),Pa=(0,Uo.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 be({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:s,style:g,sx:C,contextMenuVisible:B,leftShadowVisible:S}){let{cx:$,classes:E}=Pa();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Uo.Box,{component:"tr",className:$({[E.withPointerCursor]:u||i?.expandOnClick,[E.selected]:l,[E.contextMenuVisible]:B},typeof s=="function"?s(o,e):s),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 g=="function"?g(o,e):g,sx:C,...m?.(o,e),onContextMenu:I,children:[f&&(0,U.jsx)(he,{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:xo,noWrap:zo,ellipsis:Vo,width:Go,render:Xo,cellsClassName:Io,cellsStyle:io,cellsSx:Zo,customCellAttributes:Qo}=P,Do;return n&&(Do=()=>n({record:o,recordIndex:e,column:P,columnIndex:M})),k?null:(0,U.jsx)(ie,{className:typeof Io=="function"?Io(o,e):Io,style:typeof io=="function"?io(o,e):io,sx:Zo,visibleMediaQuery:G,record:o,recordIndex:e,onClick:Do,accessor:w,textAlignment:xo,noWrap:zo,ellipsis:Vo,width:Go,render:Xo,defaultRender:t,customCellAttributes:Qo},w)})]}),i&&(0,U.jsx)(Ce,{colSpan:r.filter(P=>!P.hidden).length+(f?1:0),open:i.isRowExpanded(o),content:i.content(o,e),collapseProps:i.collapseProps})]})}a();var po=require("@mantine/core"),z=require("@mantine/hooks"),Cr=require("react/jsx-runtime"),Ma=(0,po.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 Be({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:s}=window,{classes:g,theme:{dir:C,spacing:B}}=Ma(),S=(0,po.px)(B.md);return(0,Cr.jsx)(po.Paper,{ref:i,shadow:e,radius:o,className:g.root,sx:{zIndex:r,top:t+I+S>s?s-I-S:t,left:C==="ltr"?f+n+S>m?m-n-S:f:m-S-(f-n-S<0?n+S:f)},children:d})}a();var Sr=require("@mantine/core"),hr=require("react/jsx-runtime"),Ra=(0,Sr.createStyles)(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function De(){let{classes:o}=Ra();return(0,hr.jsx)("div",{className:o.root})}a();var H=require("@mantine/core"),Bo=require("react/jsx-runtime"),Oa=(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 ye({icon:o,title:e,color:r,disabled:t,onClick:f}){let{classes:l}=Oa({color:r});return(0,Bo.jsxs)(H.UnstyledButton,{className:l.root,disabled:t,onClick:f,children:[o&&(0,Bo.jsx)(H.Box,{className:l.icon,children:o}),(0,Bo.jsx)(H.Text,{className:l.title,size:"sm",children:e})]})}a();var mo=require("@mantine/core"),oo=require("react/jsx-runtime"),ka=(0,mo.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 we({topShadowVisible:o,leftShadowVisible:e,rightShadowVisible:r,bottomShadowVisible:t,headerHeight:f,onScrollPositionChange:l,children:d,viewportRef:p}){let{cx:u,classes:n}=ka();return(0,oo.jsxs)(mo.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,oo.jsx)(mo.Box,{className:u(n.shadow,n.topShadow,{[n.shadowVisible]:o}),sx:{top:f}}),(0,oo.jsx)("div",{className:u(n.shadow,n.leftShadow,{[n.shadowVisible]:e})}),(0,oo.jsx)("div",{className:u(n.shadow,n.rightShadow,{[n.shadowVisible]:r})}),(0,oo.jsx)("div",{className:u(n.shadow,n.bottomShadow,{[n.shadowVisible]:t})})]})}var y=require("react/jsx-runtime"),br={},va=(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 Te({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:s="id",records:g,selectedRecords:C,onSelectedRecordsChange:B,isRecordSelectable:S,sortStatus:$,onSortStatusChange:E,horizontalSpacing:P,page:M,onPageChange:w,totalRecords:k,recordsPerPage:G,onRecordsPerPageChange:xo,recordsPerPageOptions:zo,recordsPerPageLabel:Vo="Records per page",paginationColor:Go,paginationSize:Xo="sm",paginationText:Io=({from:D,to:go,totalRecords:ro})=>`${D} - ${go} / ${ro}`,paginationWrapBreakpoint:io="sm",loaderBackgroundBlur:Zo,customLoader:Qo,loaderSize:Do,loaderVariant:Br,loaderColor:Dr,loadingText:yr="...",emptyState:wr,noRecordsText:Pe="No records",noRecordsIcon:Tr,striped:Pr,onRowClick:Ko,onCellClick:Mr,onScrollToTop:Me,onScrollToBottom:Re,onScrollToLeft:Oe,onScrollToRight:ke,rowContextMenu:v,rowExpansion:Rr,rowClassName:Or,rowStyle:kr,rowSx:vr,customRowAttributes:Fr,scrollViewportRef:Ar,bodyRef:Lr,m:Hr,my:Er,mx:Nr,mt:qr,mb:Wr,ml:Ur,mr:zr,sx:Vr,className:Gr,classNames:$o,style:Xr,styles:Yo,...Zr}){let{ref:D,width:go,height:ro}=(0,eo.useElementSize)(),{ref:Qr,height:_o}=(0,eo.useElementSize)(),{ref:Kr,width:jo,height:yo}=(0,eo.useElementSize)(),{ref:$r,height:ve}=(0,eo.useElementSize)(),[Jo,Fe]=(0,V.useState)(!0),[oe,Ae]=(0,V.useState)(!0),[wo,Le]=(0,V.useState)(!0),[ee,He]=(0,V.useState)(!0),{rowContextMenuInfo:Y,setRowContextMenuInfo:ao}=Ir(I),Yr=ir({rowExpansion:Rr,records:g,idAccessor:s}),re=(0,V.useCallback)(()=>{if(!I&&v&&ao(null),I||yo<=ro)Fe(!0),Ae(!0);else{let x=D.current.scrollTop,h=x===0,T=yo-x-ro<1;Fe(h),Ae(T),h&&h!==Jo&&Me?.(),T&&T!==oe&&Re?.()}if(I||jo===go)Le(!0),He(!0);else{let x=D.current.scrollLeft,h=x===0,T=jo-x-go<1;Le(h),He(T),h&&h!==wo&&Oe?.(),T&&T!==ee&&ke?.()}},[I,Re,Oe,ke,Me,v,ro,D,go,oe,wo,ee,Jo,ao,yo,jo]);sr(re,[re]);let _r=(0,V.useCallback)(x=>{D.current.scrollTo({top:0,left:0}),w(x)},[w,D]),To=g?.length,Ee=g?.map(x=>b(x,s)),Co=C?.map(x=>b(x,s)),Ne=Ee!==void 0&&Co!==void 0&&Co.length>0,ae=S?g?.filter(S):g,Po=ae?.map(x=>b(x,s)),Mo=Ne&&Po.every(x=>Co.includes(x)),jr=Ne&&Po.some(x=>Co.includes(x)),Jr=(0,V.useCallback)(()=>{B?.(Mo?C.filter(x=>!Po.includes(b(x,s))):No([...C,...ae],x=>b(x,s)))},[Mo,s,B,Po,ae,C]),{lastSelectionChangeIndex:Ro,setLastSelectionChangeIndex:oa}=xr(Ee),qe=!!C&&!wo,{cx:We,classes:X,theme:ea}=va({borderColor:r,rowBorderColor:t}),ra={m:Hr,my:Er,mx:Nr,mt:qr,mb:Wr,ml:Ur,mr:zr},te=typeof Yo=="function"?Yo(ea,br,br):Yo;return(0,y.jsxs)(K.Box,{...ra,className:We(X.root,{[X.tableWithBorder]:o},Gr,$o?.root),sx:[x=>({borderRadius:x.radius[e]||e,boxShadow:x.shadows[u]||u,height:d,minHeight:p}),...(0,K.packSx)(Vr)],style:{...te?.root,...Xr},children:[(0,y.jsx)(we,{viewportRef:(0,eo.useMergedRef)(D,Ar||null),topShadowVisible:!Jo,leftShadowVisible:!(C||wo),rightShadowVisible:!ee,bottomShadowVisible:!oe,headerHeight:_o,onScrollPositionChange:re,children:(0,y.jsxs)(K.Table,{ref:Kr,horizontalSpacing:P,className:We(X.table,{[X.tableWithColumnBorders]:f,[X.lastRowBorderBottomVisible]:yo<ro,[X.textSelectionDisabled]:l,[X.verticalAlignmentTop]:n==="top",[X.verticalAlignmentBottom]:n==="bottom"}),striped:To?Pr:!1,...Zr,children:[(0,y.jsx)(pr,{ref:Qr,className:$o?.header,style:te?.header,columns:i,sortStatus:$,onSortStatusChange:E,selectionVisible:!!C,selectionChecked:Mo,selectionIndeterminate:jr&&!Mo,onSelectionChange:Jr,leftShadowVisible:qe}),(0,y.jsx)("tbody",{ref:Lr,children:To?g.map((x,h)=>{let T=b(x,s),So=Co?.includes(T)||!1,Oo=!1,ko=!1;if(v){let{hidden:R}=v;(!R||!(typeof R=="function"?R(x,h):R))&&(v.trigger==="click"?Oo=!0:ko=!0)}let vo;B&&(vo=R=>{if(R.nativeEvent.shiftKey&&Ro!==null){let to=g.filter(h>Ro?(_,j)=>j>=Ro&&j<=h&&(S?S(_,j):!0):(_,j)=>j>=h&&j<=Ro&&(S?S(_,j):!0));B(So?cr(C,to,_=>b(_,s)):No([...C,...to],_=>b(_,s)))}else B(So?C.filter(to=>b(to,s)!==T):No([...C,x],to=>b(to,s)));oa(h)});let ho;Oo?ho=R=>{ao({y:R.clientY,x:R.clientX,record:x,recordIndex:h}),Ko?.(x,h)}:Ko&&(ho=()=>{Ko(x,h)});let Ue;return ko&&(Ue=R=>{R.preventDefault(),ao({y:R.clientY,x:R.clientX,record:x,recordIndex:h})}),(0,y.jsx)(be,{record:x,recordIndex:h,columns:i,defaultColumnRender:m,selectionVisible:!!C,selectionChecked:So,onSelectionChange:vo,isRecordSelectable:S,onClick:ho,onCellClick:Mr,onContextMenu:Ue,contextMenuVisible:Y?b(Y.record,s)===T:!1,expansion:Yr,className:Or,style:kr,sx:vr,customRowAttributes:Fr,leftShadowVisible:qe},T)}):(0,y.jsx)(le,{})})]})}),M&&(0,y.jsx)(nr,{ref:$r,className:$o?.pagination,style:te?.pagination,topBorderColor:r,horizontalSpacing:P,fetching:I,page:M,onPageChange:_r,totalRecords:k,recordsPerPage:G,onRecordsPerPageChange:xo,recordsPerPageOptions:zo,recordsPerPageLabel:Vo,paginationColor:Go,paginationSize:Xo,paginationText:Io,paginationWrapBreakpoint:io,noRecordsText:Pe,loadingText:yr,recordsLength:To}),(0,y.jsx)(Ie,{pt:_o,pb:ve,fetching:I,backgroundBlur:Zo,customContent:Qo,size:Do,variant:Br,color:Dr}),(0,y.jsx)(ue,{pt:_o,pb:ve,icon:Tr,text:Pe,active:!I&&!To,children:wr}),v&&Y&&(0,y.jsx)(Be,{zIndex:v.zIndex,borderRadius:v.borderRadius,shadow:v.shadow,y:Y.y,x:Y.x,onDestroy:()=>ao(null),children:v.items(Y.record,Y.recordIndex).map(({divider:x,key:h,title:T,icon:So,color:Oo,hidden:ko,disabled:vo,onClick:ho})=>x?(0,y.jsx)(De,{},h):ko?null:(0,y.jsx)(ye,{title:T??Eo(h),icon:So,color:Oo,disabled:vo,onClick:()=>{ao(null),ho()}},h))})]})}a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|