mantine-datatable 1.0.10 → 1.1.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../DataTable.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAiDnD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACnE,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,MAAe,EACf,SAAS,EACT,MAAM,EACN,iBAA4B,EAC5B,QAAQ,EACR,OAAO,EACP,UAAiB,EACjB,OAAO,EACP,eAAe,EACf,uBAAuB,EACvB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,cAAqB,EACrB,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,aAA4B,EAC5B,OAAO,EACP,UAAU,EACV,cAAc,EACd,GAAG,UAAU,EACd,EAAE,cAAc,CAAC,CAAC,CAAC,eA6QnB"}
1
+ {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../DataTable.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAsDnD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACnE,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,MAAe,EACf,SAAS,EACT,MAAM,EACN,iBAA4B,EAC5B,QAAQ,EACR,OAAO,EACP,UAAiB,EACjB,OAAO,EACP,eAAe,EACf,uBAAuB,EACvB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,cAAqB,EACrB,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,aAA4B,EAC5B,OAAO,EACP,UAAU,EACV,cAAc,EACd,GAAG,UAAU,EACd,EAAE,cAAc,CAAC,CAAC,CAAC,eAsSnB"}
@@ -46,7 +46,7 @@ export declare type DataTablePaginationProps = {
46
46
  export declare type DataTableColumn<T> = {
47
47
  /**
48
48
  * Column accessor; you can use dot-notation for nested objects property drilling
49
- * (i.e. `department.name` or `department.company.name` - see https://lodash.com/docs#get)
49
+ * (i.e. `department.name` or `department.company.name`)
50
50
  */
51
51
  accessor: string;
52
52
  /**
@@ -54,8 +54,9 @@ export declare type DataTableColumn<T> = {
54
54
  */
55
55
  visibleMediaQuery?: string | ((theme: MantineTheme) => string);
56
56
  /**
57
- * Optional column header title; if not present, one will be generated by applying `lodash`'s
58
- * `upperFirst` & `lowerCase` to the provided column accessor
57
+ * Optional column header title; if not present, one will be generated by "humanizing"
58
+ * the provided column accessor
59
+ * (i.e. `firstName` -> `First name`; `user.firstName` -> `User first name`)
59
60
  */
60
61
  title?: ReactNode;
61
62
  /**
@@ -82,7 +83,7 @@ export declare type DataTableColumn<T> = {
82
83
  export declare type DataTableSortStatus = {
83
84
  /**
84
85
  * Sort column accessor; you can use dot-notation for nested objects property drilling
85
- * (i.e. `department.name` or `department.company.name` - see https://lodash.com/docs#get)
86
+ * (i.e. `department.name` or `department.company.name`)
86
87
  */
87
88
  columnAccessor: string;
88
89
  /**
@@ -139,7 +140,9 @@ export declare type DataTableContextMenuItemProps = ({
139
140
  */
140
141
  icon?: ReactNode;
141
142
  /**
142
- * Item title
143
+ * Item title; if not present, one will be generated by "humanizing"
144
+ * the provided item key
145
+ * (i.e. `viewRecord` -> `View record`)
143
146
  */
144
147
  title?: ReactNode;
145
148
  /**
@@ -190,7 +193,7 @@ export declare type DataTableProps<T> = {
190
193
  columns: DataTableColumn<T>[];
191
194
  /**
192
195
  * Accessor to use as unique record key; you can use dot-notation for nested objects property drilling
193
- * (i.e. `department.name` or `department.company.name` - see https://lodash.com/docs#get);
196
+ * (i.e. `department.name` or `department.company.name`);
194
197
  * defaults to `id`
195
198
  */
196
199
  idAccessor?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.props.d.ts","sourceRoot":"","sources":["../DataTable.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACzG,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,oBAAY,4BAA4B,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AACvE,oBAAY,0BAA0B,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAErE,oBAAY,oBAAoB,GAC5B;IACE,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB,GACD;IACE;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAClC,CAAC;AAEN,oBAAY,wBAAwB,GAChC;IACE,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,cAAc,CAAC,EAAE,KAAK,CAAC;IACvB,cAAc,CAAC,EAAE,KAAK,CAAC;CACxB,GACD;IACE;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,cAAc,CAAC,EAAE,iBAAiB,CAAC;CACpC,CAAC;AAEN,oBAAY,eAAe,CAAC,CAAC,IAAI;IAC/B;;;OAGG;IACH,QAAQ,EA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EAAE,CAAC,KAAK,OAAO,CAAC,CAAC;QAE5C;;WAEG;QACH,KAAK,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,6BAA6B,EAAE,CAAC;KACvD,CAAC;CACH,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,GAC5B,oBAAoB,GACpB,wBAAwB,GACxB,kBAAkB,GAClB,uBAAuB,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default function DataTableEmptyRow(): JSX.Element;
2
+ //# sourceMappingURL=DataTableEmptyRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableEmptyRow.d.ts","sourceRoot":"","sources":["../DataTableEmptyRow.tsx"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,iBAAiB,gBAOxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableHeaderCell.d.ts","sourceRoot":"","sources":["../DataTableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,YAAY,EAAE,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAoCzE,aAAK,mBAAmB,CAAC,CAAC,IAAI;IAC5B,iBAAiB,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,MAAM,CAAC,GAAG,SAAS,CAAC;IAC1E,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC5C,kBAAkB,EAAE,CAAC,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC7E,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,OAAO,CAAC,CAAC;AAElF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,CAAC,EAAE,EAC7C,QAAQ,EACR,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,aAAa,EACb,KAAK,EACL,UAAU,EACV,kBAAkB,GACnB,EAAE,mBAAmB,CAAC,CAAC,CAAC,sBA+CxB"}
1
+ {"version":3,"file":"DataTableHeaderCell.d.ts","sourceRoot":"","sources":["../DataTableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,YAAY,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAoCzE,aAAK,mBAAmB,CAAC,CAAC,IAAI;IAC5B,iBAAiB,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,MAAM,CAAC,GAAG,SAAS,CAAC;IAC1E,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC5C,kBAAkB,EAAE,CAAC,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC7E,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,OAAO,CAAC,CAAC;AAElF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,CAAC,EAAE,EAC7C,QAAQ,EACR,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,aAAa,EACb,KAAK,EACL,UAAU,EACV,kBAAkB,GACnB,EAAE,mBAAmB,CAAC,CAAC,CAAC,sBA+CxB"}
@@ -0,0 +1,9 @@
1
+ declare type DataTableNoRecordsProps = {
2
+ text: string;
3
+ pt: number;
4
+ pb: number;
5
+ active: boolean;
6
+ };
7
+ export default function DataTableNoRecords({ text, pt, pb, active }: DataTableNoRecordsProps): JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=DataTableNoRecords.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableNoRecords.d.ts","sourceRoot":"","sources":["../DataTableNoRecords.tsx"],"names":[],"mappings":"AA2BA,aAAK,uBAAuB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,uBAAuB,eAY3F"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableRowCell.d.ts","sourceRoot":"","sources":["../DataTableRowCell.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAWpD,aAAK,qBAAqB,CAAC,CAAC,IAAI;IAC9B,MAAM,EAAE,CAAC,CAAC;CACX,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,mBAAmB,GAAG,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC,CAAC;AAEnH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,EAAE,EAC1C,iBAAiB,EACjB,MAAM,EACN,QAAQ,EACR,aAAa,EACb,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE,qBAAqB,CAAC,CAAC,CAAC,sBAkB1B"}
1
+ {"version":3,"file":"DataTableRowCell.d.ts","sourceRoot":"","sources":["../DataTableRowCell.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAWpD,aAAK,qBAAqB,CAAC,CAAC,IAAI;IAC9B,MAAM,EAAE,CAAC,CAAC;CACX,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,mBAAmB,GAAG,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC,CAAC;AAEnH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,EAAE,EAC1C,iBAAiB,EACjB,MAAM,EACN,QAAQ,EACR,aAAa,EACb,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE,qBAAqB,CAAC,CAAC,CAAC,sBAkB1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableScrollArea.d.ts","sourceRoot":"","sources":["../DataTableScrollArea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAiE5D,aAAK,wBAAwB,GAAG;IAC9B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB,EAAE,MAAM,IAAI,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;gCA2BY,wBAAwB,GAAG;IAAE,GAAG,EAAE,aAAa,cAAc,CAAC,CAAA;CAAE,KAAK,WAAW;AAzB9F,wBAyB+F"}
1
+ {"version":3,"file":"DataTableScrollArea.d.ts","sourceRoot":"","sources":["../DataTableScrollArea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAkE5D,aAAK,wBAAwB,GAAG;IAC9B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB,EAAE,MAAM,IAAI,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;gCA2BY,wBAAwB,GAAG;IAAE,GAAG,EAAE,aAAa,cAAc,CAAC,CAAA;CAAE,KAAK,WAAW;AAzB9F,wBAyB+F"}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var Or=Object.create;var de=Object.defineProperty;var Tr=Object.getOwnPropertyDescriptor;var yr=Object.getOwnPropertyNames;var kr=Object.getPrototypeOf,Dr=Object.prototype.hasOwnProperty;var Ar=(e,r)=>{for(var o in r)de(e,o,{get:r[o],enumerable:!0})},Ke=(e,r,o,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of yr(r))!Dr.call(e,t)&&t!==o&&de(e,t,{get:()=>r[t],enumerable:!(a=Tr(r,t))||a.enumerable});return e};var ue=(e,r,o)=>(o=e!=null?Or(kr(e)):{},Ke(r||!e||!e.__esModule?de(o,"default",{value:e,enumerable:!0}):o,e)),Lr=e=>Ke(de({},"__esModule",{value:!0}),e);var jr={};Ar(jr,{DataTable:()=>He});module.exports=Lr(jr);var c=ue(require("react"),1);var q=require("@mantine/core"),oe=require("@mantine/hooks"),x=require("lodash"),C=require("react");var W=require("@mantine/core");function A(){return A=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},A.apply(this,arguments)}function Rr(e,r){if(e==null)return{};var o={},a=Object.keys(e),t,f;for(f=0;f<a.length;f++)t=a[f],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function E(e,r){if(e==null)return{};var o=Rr(e,r),a,t;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(t=0;t<f.length;t++)a=f[t],!(r.indexOf(a)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,a)||(o[a]=e[a]))}return o}var z=ue(require("react")),Pr=["size","color"];function Te(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=E(e,Pr);return z.default.createElement("svg",A({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrow-down",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),z.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),z.default.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),z.default.createElement("line",{x1:"18",y1:"13",x2:"12",y2:"19"}),z.default.createElement("line",{x1:"6",y1:"13",x2:"12",y2:"19"}))}var V=ue(require("react")),Mr=["size","color"];function ye(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=E(e,Mr);return V.default.createElement("svg",A({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrows-vertical",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),V.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),V.default.createElement("polyline",{points:"8 7 12 3 16 7"}),V.default.createElement("polyline",{points:"8 17 12 21 16 17"}),V.default.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"21"}))}var M=ue(require("react")),vr=["size","color"];function ke(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=E(e,vr);return M.default.createElement("svg",A({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-database-off",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),M.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.default.createElement("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"}),M.default.createElement("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"}),M.default.createElement("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),M.default.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}))}var Y=require("react/jsx-runtime"),Fr=(0,W.createStyles)(e=>({root:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"column",pointerEvents:"none",opacity:0,transition:"opacity .15s ease"},active:{opacity:1},icon:{fontSize:0,borderRadius:"50%",padding:e.spacing.xs,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[6]}}));function De({text:e,pt:r,pb:o,active:a}){let{classes:t,cx:f}=Fr();return(0,Y.jsxs)(W.Center,{pt:r,pb:o,className:f(t.root,{[t.active]:a}),children:[(0,Y.jsx)("div",{className:t.icon,children:(0,Y.jsx)(ke,{})}),(0,Y.jsx)(W.Text,{size:"sm",color:"dimmed",children:e})]})}var L=require("@mantine/core"),Xe=require("react"),pe=require("react/jsx-runtime"),Hr=(0,L.createStyles)(e=>({root:{borderTop:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:e.spacing.xs,[e.fn.largerThan("xs")]:{flexDirection:"row"}},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),je=(0,Xe.forwardRef)(function({fetching:r,page:o,onPageChange:a,paginationSize:t,totalRecords:f,recordsPerPage:m,recordsLength:u,horizontalSpacing:n},l){let p;if(r)p="...";else{let h=(o-1)*m+1,S=h+u-1;p=`${h} - ${S}`,f&&(p+=` / ${f}`)}let{classes:d,cx:i}=Hr();return(0,pe.jsxs)(L.Box,{ref:l,px:n??"xs",py:"xs",className:d.root,children:[(0,pe.jsx)(L.Text,{size:t,children:p}),(0,pe.jsx)(L.Pagination,{className:i(d.pagination,{[d.paginationFetching]:r||!u}),page:o,onChange:a,size:t,total:Math.ceil(f/m)})]})});var xe=require("@mantine/core"),Ye=require("react");var B=require("@mantine/core"),me=require("lodash");var Qe=require("@mantine/core"),_e=require("@mantine/hooks");function J(e){let r=(0,Qe.useMantineTheme)(),o=typeof e=="function"?e(r):e;return(0,_e.useMediaQuery)(o||"",!0)}var R=require("react/jsx-runtime"),Nr=(0,B.createStyles)(e=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]}},columnHeaderText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",userSelect:"none"},sortableColumnHeaderText:{minWidth:0,flexGrow:1},sortableColumnHeaderIcon:{transition:"transform .15s ease"},sortableColumnHeaderIconRotated:{transform:"rotate3d(0, 0, 1, 180deg)"},sortableColumnHeaderNeutralIcon:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],transition:"color .15s ease","th:hover &":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}}}));function Ae({accessor:e,visibleMediaQuery:r,title:o,sortable:a,textAlignment:t,width:f,sortStatus:m,onSortStatusChange:u}){let{cx:n,classes:l}=Nr();if(!J(r))return null;let p=o??(0,me.upperFirst)((0,me.lowerCase)(e));return(0,R.jsx)(B.Box,{component:"th",className:n({[l.sortableColumnHeader]:a}),sx:{"&&":{textAlign:t},width:f,minWidth:f,maxWidth:f},role:a?"button":void 0,onClick:a&&u?()=>{u({columnAccessor:e,direction:m?.direction==="asc"?"desc":"asc"})}:void 0,children:a||m?.columnAccessor===e?(0,R.jsxs)(B.Group,{position:"apart",noWrap:!0,spacing:"xs",children:[(0,R.jsx)(B.Box,{className:n(l.columnHeaderText,l.sortableColumnHeaderText),children:p}),(0,R.jsx)(B.Center,{children:m?.columnAccessor===e?(0,R.jsx)(Te,{className:n(l.sortableColumnHeaderIcon,{[l.sortableColumnHeaderIconRotated]:m.direction==="desc"}),size:14}):(0,R.jsx)(ye,{className:l.sortableColumnHeaderNeutralIcon,size:14})})]}):(0,R.jsx)(B.Box,{className:l.columnHeaderText,children:p})})}var I=require("react/jsx-runtime"),Er=(0,xe.createStyles)(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:e.colorScheme==="dark"?e.colors.dark[7]:e.white,"&::after":{content:'""',position:"absolute",left:0,right:0,bottom:-e.spacing.sm+1,height:e.spacing.sm,borderTop:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,background:`linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},bottomShadowVisible:{"&::after":{opacity:1}},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),Je=(0,Ye.forwardRef)(function({sortStatus:r,onSortStatusChange:o,columns:a,selectionVisible:t,selectionChecked:f,selectionIndeterminate:m,onSelectionChange:u,leftShadowVisible:n,bottomShadowVisible:l},p){let{classes:d,cx:i}=Er();return(0,I.jsx)("thead",{className:i(d.root,{[d.bottomShadowVisible]:l}),ref:p,children:(0,I.jsxs)("tr",{children:[t&&(0,I.jsx)("th",{className:i(d.selectorColumnHeader,{[d.selectorColumnHeaderWithRightShadow]:n}),children:(0,I.jsx)(xe.Checkbox,{classNames:{input:d.selectionCheckboxInput},checked:f,indeterminate:m,disabled:!u,onChange:u})}),a.map(({accessor:h,visibleMediaQuery:S,textAlignment:O,width:T,title:$,sortable:be})=>(0,I.jsx)(Ae,{accessor:h,visibleMediaQuery:S,textAlignment:O,width:T,title:$,sortable:be,sortStatus:r,onSortStatusChange:o},h))]})})});var G=require("@mantine/core"),er=require("react/jsx-runtime"),zr=(0,G.createStyles)(e=>({root:{zIndex:3,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",background:e.fn.rgba(e.colorScheme==="dark"?e.colors.dark[8]:e.white,.75),opacity:0,transition:"opacity .15s ease"},fetching:{pointerEvents:"all",opacity:1}}));function Le({pt:e,pb:r,fetching:o,loaderBackgroundBlur:a,loaderSize:t,loaderVariant:f}){let{classes:m,cx:u}=zr();return(0,er.jsx)(G.Center,{pt:e,pb:r,className:u(m.root,{[m.fetching]:o}),sx:a?{backdropFilter:`blur(${a}px)`}:void 0,children:o&&(0,er.jsx)(G.Loader,{size:t,variant:f})})}var ie=require("@mantine/core");var ne=require("@mantine/core"),rr=require("lodash");var Wr=require("react/jsx-runtime"),Vr=(0,ne.createStyles)({ellipsis:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}});function Re({visibleMediaQuery:e,record:r,ellipsis:o,textAlignment:a,width:t,accessor:f,render:m}){let{cx:u,classes:n}=Vr();return J(e)?(0,Wr.jsx)(ne.Box,{component:"td",className:u({[n.ellipsis]:o}),sx:{width:t,minWidth:t,maxWidth:t,textAlign:a},children:m?m(r):(0,rr.get)(r,f)}):null}var ee=require("react/jsx-runtime"),Ir=(0,ie.createStyles)(e=>{let r=e.colors[e.primaryColor][6],o=e.colorScheme==="dark"?.5:.05;return{withClickHandler:{cursor:"pointer"},selectorCell:{position:"sticky",left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,o)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,o)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorCellWithRightShadow:{"&::after":{opacity:1}},selectorCheckboxInput:{cursor:"pointer"},selected:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.6):e.fn.lighten(r,.9)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.55):e.fn.lighten(r,.85)}}},contextMenuVisible:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.5):e.fn.lighten(r,.7)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.45):e.fn.lighten(r,.65)}}}}});function Pe({record:e,columns:r,selectionVisible:o,selectionChecked:a,onSelectionChange:t,onClick:f,onContextMenu:m,contextMenuVisible:u,leftShadowVisible:n}){let{cx:l,classes:p}=Ir();return(0,ee.jsxs)("tr",{className:l({[p.withClickHandler]:f,[p.selected]:a,[p.contextMenuVisible]:u}),onClick:f,onContextMenu:m,children:[o&&(0,ee.jsx)("td",{className:l(p.selectorCell,{[p.selectorCellWithRightShadow]:n}),children:(0,ee.jsx)(ie.Checkbox,{classNames:{input:p.selectorCheckboxInput},checked:a,disabled:!t,onChange:t,onClick:d=>d.stopPropagation()})}),r.map(({accessor:d,visibleMediaQuery:i,textAlignment:h,ellipsis:S,width:O,render:T})=>(0,ee.jsx)(Re,{visibleMediaQuery:i,record:e,accessor:d,textAlignment:h,ellipsis:S,width:O,render:T},d))]})}var U=require("@mantine/core"),w=require("@mantine/hooks"),Ur=require("react/jsx-runtime"),Gr=(0,U.createStyles)(e=>({root:{position:"fixed",border:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,overflow:"hidden",transition:"all .15s ease"}}));function Me({borderRadius:e="xs",shadow:r="sm",zIndex:o=3,top:a,left:t,onDestroy:f,children:m}){(0,w.useWindowEvent)("resize",f),(0,w.useWindowEvent)("scroll",f);let u=(0,w.useClickOutside)(f),{ref:n,width:l,height:p}=(0,w.useElementSize)(),d=(0,w.useMergedRef)(u,n),{spacing:{xs:i}}=(0,U.useMantineTheme)(),{innerWidth:h,innerHeight:S}=window,O=a+p+i>S?S-p-i:a,T=t+l+i>h?h-l-i:t,{classes:$}=Gr();return(0,Ur.jsx)(U.Paper,{ref:d,shadow:r,radius:e,className:$.root,sx:{top:O,left:T,zIndex:o},children:m})}var or=require("@mantine/core"),$r=require("react/jsx-runtime"),qr=(0,or.createStyles)(e=>({root:{height:1,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}}));function ve(){let{classes:e}=qr();return(0,$r.jsx)("div",{className:e.root})}var P=require("@mantine/core"),ce=require("react/jsx-runtime"),Zr=(0,P.createStyles)((e,{color:r})=>{let o=e.spacing.sm/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:o,paddingBottom:o,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,color:r&&e.colors[r][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:hover:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:e.spacing.xs},title:{whiteSpace:"nowrap"}}});function Fe({icon:e,title:r,color:o,disabled:a,onClick:t}){let{classes:f}=Zr({color:o});return(0,ce.jsxs)(P.UnstyledButton,{className:f.root,disabled:a,onClick:t,children:[e&&(0,ce.jsx)(P.Box,{className:f.icon,children:e}),(0,ce.jsx)(P.Text,{className:f.title,size:"sm",children:r})]})}var ge=require("@mantine/core"),ar=require("react"),re=require("react/jsx-runtime"),Kr=(0,ge.createStyles)(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{flex:"1 1 100%"},scrollbar:{'&[data-state="visible"]':{background:"transparent"},"div::before":{pointerEvents:"none"}},thumb:{zIndex:3},shadow:{position:"absolute",pointerEvents:"none",opacity:0,transition:"opacity .15s ease"},leftShadow:{top:0,left:0,bottom:0,width:e.spacing.sm,zIndex:3,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},rightShadow:{top:0,bottom:0,right:0,width:e.spacing.sm,zIndex:2,background:`linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},bottomShadow:{left:0,right:0,bottom:0,height:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,0)}, ${e.fn.rgba(e.black,r)}), linear-gradient(${e.fn.rgba(e.black,0)} 30%, ${e.fn.rgba(e.black,r)})`},shadowVisible:{opacity:1}}}),tr=(0,ar.forwardRef)(function({leftShadowVisible:r,rightShadowVisible:o,bottomShadowVisible:a,headerHeight:t,onScrollPositionChange:f,children:m},u){let{cx:n,classes:l}=Kr();return(0,re.jsxs)(ge.ScrollArea,{viewportRef:u,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb},styles:{scrollbar:{marginTop:t}},onScrollPositionChange:f,children:[m,(0,re.jsx)("div",{className:n(l.shadow,l.leftShadow,{[l.shadowVisible]:r})}),(0,re.jsx)("div",{className:n(l.shadow,l.rightShadow,{[l.shadowVisible]:o})}),(0,re.jsx)("div",{className:n(l.shadow,l.bottomShadow,{[l.shadowVisible]:a})})]})});var b=require("react/jsx-runtime"),Xr=(0,q.createStyles)(e=>{let r=`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}},browserSelectionDisabled:{userSelect:"none"},tableWithBorder:{border:r},tableWithColumnBorders:{"th, td":{":not(:first-of-type)":{borderLeft:r}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function He({withBorder:e,borderRadius:r,withColumnBorders:o,height:a="100%",minHeight:t,shadow:f,verticalAlignment:m="center",fetching:u,columns:n,idAccessor:l="id",records:p,selectedRecords:d,onSelectedRecordsChange:i,sortStatus:h,onSortStatusChange:S,horizontalSpacing:O,page:T,onPageChange:$,totalRecords:be,recordsPerPage:fr,paginationSize:lr="sm",loaderSize:sr,loaderVariant:dr,loaderBackgroundBlur:ur,noRecordsText:pr="No records",striped:mr,onRowClick:ae,rowContextMenu:y,...xr}){let{ref:Z,width:he,height:Ce}=(0,oe.useElementSize)(),{ref:nr,height:Se}=(0,oe.useElementSize)(),{ref:ir,width:Be,height:we}=(0,oe.useElementSize)(),{ref:cr,height:Ne}=(0,oe.useElementSize)(),[gr,Ee]=(0,C.useState)(!0),[br,ze]=(0,C.useState)(!0),[Ve,We]=(0,C.useState)(!0),[hr,Ie]=(0,C.useState)(!0),[v,F]=(0,C.useState)(null);(0,C.useEffect)(()=>{u&&F(null)},[u]);let Ge=()=>{if(u||F(null),u||we<=Ce)Ee(!0),ze(!0);else{let s=Z.current.scrollTop;Ee(s===0),ze(Math.round(we-s)===Math.round(Ce))}if(u||Be===he)We(!0),Ie(!0);else{let s=Z.current.scrollLeft;We(s===0),Ie(Math.round(Be-s)===Math.round(he))}};(0,C.useEffect)(Ge,[u,Ce,Z,he,we,Be]);let Cr=(0,x.throttle)(Ge,200,{leading:!0,trailing:!0}),Sr=s=>{Z.current.scrollTo({top:0,left:0}),$(s)},te=p?.length,K=p?.map(s=>(0,x.get)(s,l)),X=d?.map(s=>(0,x.get)(s,l)),Ue=K!==void 0&&X!==void 0&&X.length>0,Oe=Ue&&K.every(s=>X.includes(s)),Br=Ue&&K.some(s=>X.includes(s)),[fe,qe]=(0,C.useState)(null),wr=K?.join(":")||"";(0,C.useEffect)(()=>{qe(null)},[wr]);let $e=!!d&&!Ve,{cx:Ze,classes:H}=Xr();return(0,b.jsxs)(q.Box,{className:Ze(H.root,{[H.tableWithBorder]:e}),sx:s=>({borderRadius:s.radius[r]||r,boxShadow:s.shadows[f]||f,height:a,minHeight:t}),children:[(0,b.jsx)(tr,{ref:Z,leftShadowVisible:!(d||Ve),rightShadowVisible:!hr,bottomShadowVisible:!br,headerHeight:Se,onScrollPositionChange:Cr,children:(0,b.jsxs)(q.Table,{ref:ir,horizontalSpacing:O,className:Ze({[H.browserSelectionDisabled]:ae||d,[H.tableWithColumnBorders]:o,[H.verticalAlignmentTop]:m==="top",[H.verticalAlignmentBottom]:m==="bottom"}),striped:te?mr:!1,...xr,children:[(0,b.jsx)(Je,{ref:nr,columns:n,sortStatus:h,onSortStatusChange:S,selectionVisible:!!d,selectionChecked:Oe,selectionIndeterminate:Br&&!Oe,onSelectionChange:i?()=>{i(Oe?d.filter(s=>!K.includes((0,x.get)(s,l))):(0,x.uniqBy)([...d,...p],s=>(0,x.get)(s,l)))}:void 0,leftShadowVisible:$e,bottomShadowVisible:!gr}),(0,b.jsx)("tbody",{children:te?p.map((s,k)=>{let N=(0,x.get)(s,l),j=X?.includes(N)||!1,le=!1,se=!1;if(y){let{hidden:g}=y;(!g||!(typeof g=="function"?g(s):g))&&(y.trigger==="click"?le=!0:se=!0)}return(0,b.jsx)(Pe,{record:s,columns:n,selectionVisible:!!d,selectionChecked:j,onSelectionChange:i?g=>{if(g.nativeEvent.shiftKey&&fe!==null){let D=p.filter(k>fe?(Q,_)=>_>=fe&&_<=k:(Q,_)=>_>=k&&_<=fe);i(j?(0,x.differenceBy)(d,D,Q=>(0,x.get)(Q,l)):(0,x.uniqBy)([...d,...D],Q=>(0,x.get)(Q,l)))}else i(j?d.filter(D=>(0,x.get)(D,l)!==N):(0,x.uniqBy)([...d,s],D=>(0,x.get)(D,l)));qe(k)}:void 0,onClick:le?g=>{F({top:g.clientY,left:g.clientX,record:s}),ae?.(s)}:ae?()=>{ae(s)}:void 0,onContextMenu:se?g=>{g.preventDefault(),F({top:g.clientY,left:g.clientX,record:s})}:void 0,contextMenuVisible:v?(0,x.get)(v.record,l)===N:!1,leftShadowVisible:$e},N)}):(0,b.jsx)("tr",{children:(0,b.jsx)("td",{})})})]})}),T&&(0,b.jsx)(je,{ref:cr,horizontalSpacing:O,fetching:u,page:T,onPageChange:Sr,totalRecords:be,recordsPerPage:fr,paginationSize:lr,recordsLength:te}),(0,b.jsx)(Le,{pt:Se,pb:Ne,fetching:u,loaderBackgroundBlur:ur,loaderSize:sr,loaderVariant:dr}),(0,b.jsx)(De,{pt:Se,pb:Ne,text:pr,active:!u&&!te}),y&&v&&(0,b.jsx)(Me,{zIndex:y.zIndex,borderRadius:y.borderRadius,shadow:y.shadow,top:v.top,left:v.left,onDestroy:()=>F(null),children:y.items(v.record).map(({divider:s,key:k,title:N,icon:j,color:le,hidden:se,disabled:g,onClick:D})=>s?(0,b.jsx)(ve,{},k):se?null:(0,b.jsx)(Fe,{title:N??(0,x.upperFirst)((0,x.lowerCase)(k)),icon:j,color:le,disabled:g,onClick:()=>{F(null),D()}},k))})]})}
1
+ "use strict";var Ar=Object.create;var se=Object.defineProperty;var Rr=Object.getOwnPropertyDescriptor;var Lr=Object.getOwnPropertyNames;var Pr=Object.getPrototypeOf,Mr=Object.prototype.hasOwnProperty;var vr=(e,r)=>{for(var o in r)se(e,o,{get:r[o],enumerable:!0})},je=(e,r,o,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of Lr(r))!Mr.call(e,t)&&t!==o&&se(e,t,{get:()=>r[t],enumerable:!(a=Rr(r,t))||a.enumerable});return e};var de=(e,r,o)=>(o=e!=null?Ar(Pr(e)):{},je(r||!e||!e.__esModule?se(o,"default",{value:e,enumerable:!0}):o,e)),Fr=e=>je(se({},"__esModule",{value:!0}),e);var ro={};vr(ro,{DataTable:()=>Ve});module.exports=Fr(ro);var n=de(require("react"),1);var $=require("@mantine/core"),B=require("@mantine/hooks"),v=require("react");var Je=require("@mantine/core"),Ye=require("react/jsx-runtime"),Hr=(0,Je.createStyles)({root:{"&&":{background:"transparent"}}});function De(){let{classes:e}=Hr();return(0,Ye.jsx)("tr",{className:e.root,children:(0,Ye.jsx)("td",{})})}var A=require("@mantine/core"),er=require("react"),ue=require("react/jsx-runtime"),Nr=(0,A.createStyles)(e=>({root:{borderTop:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:e.spacing.xs,[e.fn.largerThan("xs")]:{flexDirection:"row"}},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),rr=(0,er.forwardRef)(function({fetching:r,page:o,onPageChange:a,paginationSize:t,totalRecords:f,recordsPerPage:m,recordsLength:u,horizontalSpacing:x},l){let p;if(r)p="...";else{let h=(o-1)*m+1,C=h+u-1;p=`${h} - ${C}`,f&&(p+=` / ${f}`)}let{classes:d,cx:i}=Nr();return(0,ue.jsxs)(A.Box,{ref:l,px:x??"xs",py:"xs",className:d.root,children:[(0,ue.jsx)(A.Text,{size:t,children:p}),(0,ue.jsx)(A.Pagination,{className:i(d.pagination,{[d.paginationFetching]:r||!u}),page:o,onChange:a,size:t,total:Math.ceil(f/m)})]})});var ne=require("@mantine/core"),fr=require("react");var S=require("@mantine/core");function R(){return R=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},R.apply(this,arguments)}function Er(e,r){if(e==null)return{};var o={},a=Object.keys(e),t,f;for(f=0;f<a.length;f++)t=a[f],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function z(e,r){if(e==null)return{};var o=Er(e,r),a,t;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(t=0;t<f.length;t++)a=f[t],!(r.indexOf(a)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,a)||(o[a]=e[a]))}return o}var V=de(require("react")),zr=["size","color"];function Ae(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=z(e,zr);return V.default.createElement("svg",R({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrow-down",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),V.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),V.default.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),V.default.createElement("line",{x1:"18",y1:"13",x2:"12",y2:"19"}),V.default.createElement("line",{x1:"6",y1:"13",x2:"12",y2:"19"}))}var W=de(require("react")),Vr=["size","color"];function Re(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=z(e,Vr);return W.default.createElement("svg",R({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrows-vertical",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),W.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),W.default.createElement("polyline",{points:"8 7 12 3 16 7"}),W.default.createElement("polyline",{points:"8 17 12 21 16 17"}),W.default.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"21"}))}var M=de(require("react")),Wr=["size","color"];function Le(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=z(e,Wr);return M.default.createElement("svg",R({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-database-off",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),M.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.default.createElement("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"}),M.default.createElement("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"}),M.default.createElement("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),M.default.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}))}var or=require("@mantine/core"),ar=require("@mantine/hooks");function pe(e){let r=(0,or.useMantineTheme)(),o=typeof e=="function"?e(r):e;return(0,ar.useMediaQuery)(o||"",!0)}function me(e){let r=e.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${r.charAt(0).toUpperCase()}${r.slice(1)}`}function tr(e,r,o){if(typeof o=="string"){let a=o;o=t=>t[a]}return e.filter(a=>!r.map(o).includes(o(a)))}function xe(e,r){if(typeof r=="string"){let o=r;r=a=>a[o]}return e.filter((o,a,t)=>a===t.findIndex(f=>r(o)===r(f)))}function b(e,r){return r?r.match(/([^[.\]])+/g).reduce((a,t)=>a&&a[t],e):void 0}var L=require("react/jsx-runtime"),Ir=(0,S.createStyles)(e=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]}},columnHeaderText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",userSelect:"none"},sortableColumnHeaderText:{minWidth:0,flexGrow:1},sortableColumnHeaderIcon:{transition:"transform .15s ease"},sortableColumnHeaderIconRotated:{transform:"rotate3d(0, 0, 1, 180deg)"},sortableColumnHeaderNeutralIcon:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],transition:"color .15s ease","th:hover &":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}}}));function Pe({accessor:e,visibleMediaQuery:r,title:o,sortable:a,textAlignment:t,width:f,sortStatus:m,onSortStatusChange:u}){let{cx:x,classes:l}=Ir();if(!pe(r))return null;let p=o??me(e);return(0,L.jsx)(S.Box,{component:"th",className:x({[l.sortableColumnHeader]:a}),sx:{"&&":{textAlign:t},width:f,minWidth:f,maxWidth:f},role:a?"button":void 0,onClick:a&&u?()=>{u({columnAccessor:e,direction:m?.direction==="asc"?"desc":"asc"})}:void 0,children:a||m?.columnAccessor===e?(0,L.jsxs)(S.Group,{position:"apart",noWrap:!0,spacing:"xs",children:[(0,L.jsx)(S.Box,{className:x(l.columnHeaderText,l.sortableColumnHeaderText),children:p}),(0,L.jsx)(S.Center,{children:m?.columnAccessor===e?(0,L.jsx)(Ae,{className:x(l.sortableColumnHeaderIcon,{[l.sortableColumnHeaderIconRotated]:m.direction==="desc"}),size:14}):(0,L.jsx)(Re,{className:l.sortableColumnHeaderNeutralIcon,size:14})})]}):(0,L.jsx)(S.Box,{className:l.columnHeaderText,children:p})})}var I=require("react/jsx-runtime"),Gr=(0,ne.createStyles)(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:e.colorScheme==="dark"?e.colors.dark[7]:e.white,"&::after":{content:'""',position:"absolute",left:0,right:0,bottom:-e.spacing.sm+1,height:e.spacing.sm,borderTop:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,background:`linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},bottomShadowVisible:{"&::after":{opacity:1}},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),lr=(0,fr.forwardRef)(function({sortStatus:r,onSortStatusChange:o,columns:a,selectionVisible:t,selectionChecked:f,selectionIndeterminate:m,onSelectionChange:u,leftShadowVisible:x,bottomShadowVisible:l},p){let{classes:d,cx:i}=Gr();return(0,I.jsx)("thead",{className:i(d.root,{[d.bottomShadowVisible]:l}),ref:p,children:(0,I.jsxs)("tr",{children:[t&&(0,I.jsx)("th",{className:i(d.selectorColumnHeader,{[d.selectorColumnHeaderWithRightShadow]:x}),children:(0,I.jsx)(ne.Checkbox,{classNames:{input:d.selectionCheckboxInput},checked:f,indeterminate:m,disabled:!u,onChange:u})}),a.map(({accessor:h,visibleMediaQuery:C,textAlignment:O,width:T,title:Z,sortable:Se})=>(0,I.jsx)(Pe,{accessor:h,visibleMediaQuery:C,textAlignment:O,width:T,title:Z,sortable:Se,sortStatus:r,onSortStatusChange:o},h))]})})});var G=require("@mantine/core"),sr=require("react/jsx-runtime"),Ur=(0,G.createStyles)(e=>({root:{zIndex:3,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",background:e.fn.rgba(e.colorScheme==="dark"?e.colors.dark[8]:e.white,.75),opacity:0,transition:"opacity .15s ease"},fetching:{pointerEvents:"all",opacity:1}}));function Me({pt:e,pb:r,fetching:o,loaderBackgroundBlur:a,loaderSize:t,loaderVariant:f}){let{classes:m,cx:u}=Ur();return(0,sr.jsx)(G.Center,{pt:e,pb:r,className:u(m.root,{[m.fetching]:o}),sx:a?{backdropFilter:`blur(${a}px)`}:void 0,children:o&&(0,sr.jsx)(G.Loader,{size:t,variant:f})})}var U=require("@mantine/core");var J=require("react/jsx-runtime"),qr=(0,U.createStyles)(e=>({root:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"column",pointerEvents:"none",opacity:0,transition:"opacity .15s ease"},active:{opacity:1},icon:{fontSize:0,borderRadius:"50%",padding:e.spacing.xs,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[6]}}));function ve({text:e,pt:r,pb:o,active:a}){let{classes:t,cx:f}=qr();return(0,J.jsxs)(U.Center,{pt:r,pb:o,className:f(t.root,{[t.active]:a}),children:[(0,J.jsx)("div",{className:t.icon,children:(0,J.jsx)(Le,{})}),(0,J.jsx)(U.Text,{size:"sm",color:"dimmed",children:e})]})}var ce=require("@mantine/core");var ie=require("@mantine/core");var Zr=require("react/jsx-runtime"),$r=(0,ie.createStyles)({ellipsis:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}});function Fe({visibleMediaQuery:e,record:r,ellipsis:o,textAlignment:a,width:t,accessor:f,render:m}){let{cx:u,classes:x}=$r();return pe(e)?(0,Zr.jsx)(ie.Box,{component:"td",className:u({[x.ellipsis]:o}),sx:{width:t,minWidth:t,maxWidth:t,textAlign:a},children:m?m(r):b(r,f)}):null}var ee=require("react/jsx-runtime"),Kr=(0,ce.createStyles)(e=>{let r=e.colors[e.primaryColor][6],o=e.colorScheme==="dark"?.5:.05;return{withClickHandler:{cursor:"pointer"},selectorCell:{position:"sticky",left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,o)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,o)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorCellWithRightShadow:{"&::after":{opacity:1}},selectorCheckboxInput:{cursor:"pointer"},selected:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.6):e.fn.lighten(r,.9)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.55):e.fn.lighten(r,.85)}}},contextMenuVisible:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.5):e.fn.lighten(r,.7)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.45):e.fn.lighten(r,.65)}}}}});function He({record:e,columns:r,selectionVisible:o,selectionChecked:a,onSelectionChange:t,onClick:f,onContextMenu:m,contextMenuVisible:u,leftShadowVisible:x}){let{cx:l,classes:p}=Kr();return(0,ee.jsxs)("tr",{className:l({[p.withClickHandler]:f,[p.selected]:a,[p.contextMenuVisible]:u}),onClick:f,onContextMenu:m,children:[o&&(0,ee.jsx)("td",{className:l(p.selectorCell,{[p.selectorCellWithRightShadow]:x}),children:(0,ee.jsx)(ce.Checkbox,{classNames:{input:p.selectorCheckboxInput},checked:a,disabled:!t,onChange:t,onClick:d=>d.stopPropagation()})}),r.map(({accessor:d,visibleMediaQuery:i,textAlignment:h,ellipsis:C,width:O,render:T})=>(0,ee.jsx)(Fe,{visibleMediaQuery:i,record:e,accessor:d,textAlignment:h,ellipsis:C,width:O,render:T},d))]})}var q=require("@mantine/core"),w=require("@mantine/hooks"),_r=require("react/jsx-runtime"),Xr=(0,q.createStyles)(e=>({root:{position:"fixed",border:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,overflow:"hidden",transition:"all .15s ease"}}));function Ne({borderRadius:e="xs",shadow:r="sm",zIndex:o=3,top:a,left:t,onDestroy:f,children:m}){(0,w.useWindowEvent)("resize",f),(0,w.useWindowEvent)("scroll",f);let u=(0,w.useClickOutside)(f),{ref:x,width:l,height:p}=(0,w.useElementSize)(),d=(0,w.useMergedRef)(u,x),{spacing:{xs:i}}=(0,q.useMantineTheme)(),{innerWidth:h,innerHeight:C}=window,O=a+p+i>C?C-p-i:a,T=t+l+i>h?h-l-i:t,{classes:Z}=Xr();return(0,_r.jsx)(q.Paper,{ref:d,shadow:r,radius:e,className:Z.root,sx:{top:O,left:T,zIndex:o},children:m})}var dr=require("@mantine/core"),jr=require("react/jsx-runtime"),Qr=(0,dr.createStyles)(e=>({root:{height:1,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}}));function Ee(){let{classes:e}=Qr();return(0,jr.jsx)("div",{className:e.root})}var P=require("@mantine/core"),ge=require("react/jsx-runtime"),Yr=(0,P.createStyles)((e,{color:r})=>{let o=e.spacing.sm/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:o,paddingBottom:o,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,color:r&&e.colors[r][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:hover:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:e.spacing.xs},title:{whiteSpace:"nowrap"}}});function ze({icon:e,title:r,color:o,disabled:a,onClick:t}){let{classes:f}=Yr({color:o});return(0,ge.jsxs)(P.UnstyledButton,{className:f.root,disabled:a,onClick:t,children:[e&&(0,ge.jsx)(P.Box,{className:f.icon,children:e}),(0,ge.jsx)(P.Text,{className:f.title,size:"sm",children:r})]})}var be=require("@mantine/core"),ur=require("react"),re=require("react/jsx-runtime"),Jr=(0,be.createStyles)(e=>{let r=e.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"},leftShadow:{top:0,left:0,bottom:0,width:e.spacing.sm,zIndex:3,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},rightShadow:{top:0,bottom:0,right:0,width:e.spacing.sm,zIndex:2,background:`linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},bottomShadow:{left:0,right:0,bottom:0,height:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,0)}, ${e.fn.rgba(e.black,r)}), linear-gradient(${e.fn.rgba(e.black,0)} 30%, ${e.fn.rgba(e.black,r)})`},shadowVisible:{opacity:1}}}),pr=(0,ur.forwardRef)(function({leftShadowVisible:r,rightShadowVisible:o,bottomShadowVisible:a,headerHeight:t,onScrollPositionChange:f,children:m},u){let{cx:x,classes:l}=Jr();return(0,re.jsxs)(be.ScrollArea,{viewportRef:u,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:t}},onScrollPositionChange:f,children:[m,(0,re.jsx)("div",{className:x(l.shadow,l.leftShadow,{[l.shadowVisible]:r})}),(0,re.jsx)("div",{className:x(l.shadow,l.rightShadow,{[l.shadowVisible]:o})}),(0,re.jsx)("div",{className:x(l.shadow,l.bottomShadow,{[l.shadowVisible]:a})})]})});var g=require("react/jsx-runtime"),he=200,Ce={leading:!0},eo=(0,$.createStyles)(e=>{let r=`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}},browserSelectionDisabled:{userSelect:"none"},tableWithBorder:{border:r},tableWithColumnBorders:{"th, td":{":not(:first-of-type)":{borderLeft:r}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function Ve({withBorder:e,borderRadius:r,withColumnBorders:o,height:a="100%",minHeight:t,shadow:f,verticalAlignment:m="center",fetching:u,columns:x,idAccessor:l="id",records:p,selectedRecords:d,onSelectedRecordsChange:i,sortStatus:h,onSortStatusChange:C,horizontalSpacing:O,page:T,onPageChange:Z,totalRecords:Se,recordsPerPage:mr,paginationSize:xr="sm",loaderSize:nr,loaderVariant:ir,loaderBackgroundBlur:cr,noRecordsText:gr="No records",striped:br,onRowClick:oe,rowContextMenu:y,...hr}){let{ref:K,width:Be,height:we}=(0,B.useElementSize)(),{ref:Cr,height:Oe}=(0,B.useElementSize)(),{ref:Sr,width:Te,height:ye}=(0,B.useElementSize)(),{ref:Br,height:We}=(0,B.useElementSize)(),[wr,Ie]=(0,B.useDebouncedState)(!0,he,Ce),[Or,Ge]=(0,B.useDebouncedState)(!0,he,Ce),[Ue,qe]=(0,B.useDebouncedState)(!0,he,Ce),[Tr,$e]=(0,B.useDebouncedState)(!0,he,Ce),[F,H]=(0,v.useState)(null);(0,v.useEffect)(()=>{u&&H(null)},[u]);let Ze=()=>{if(u||H(null),u||ye<=we)Ie(!0),Ge(!0);else{let s=K.current.scrollTop;Ie(s===0),Ge(Math.round(ye-s)===Math.round(we))}if(u||Te===Be)qe(!0),$e(!0);else{let s=K.current.scrollLeft;qe(s===0),$e(Math.round(Te-s)===Math.round(Be))}};(0,v.useEffect)(Ze,[u,we,K,Be,ye,Te]);let yr=s=>{K.current.scrollTo({top:0,left:0}),Z(s)},ae=p?.length,X=p?.map(s=>b(s,l)),_=d?.map(s=>b(s,l)),Ke=X!==void 0&&_!==void 0&&_.length>0,ke=Ke&&X.every(s=>_.includes(s)),kr=Ke&&X.some(s=>_.includes(s)),[te,Xe]=(0,v.useState)(null),Dr=X?.join(":")||"";(0,v.useEffect)(()=>{Xe(null)},[Dr]);let _e=!!d&&!Ue,{cx:Qe,classes:N}=eo();return(0,g.jsxs)($.Box,{className:Qe(N.root,{[N.tableWithBorder]:e}),sx:s=>({borderRadius:s.radius[r]||r,boxShadow:s.shadows[f]||f,height:a,minHeight:t}),children:[(0,g.jsx)(pr,{ref:K,leftShadowVisible:!(d||Ue),rightShadowVisible:!Tr,bottomShadowVisible:!Or,headerHeight:Oe,onScrollPositionChange:Ze,children:(0,g.jsxs)($.Table,{ref:Sr,horizontalSpacing:O,className:Qe({[N.browserSelectionDisabled]:oe||d,[N.tableWithColumnBorders]:o,[N.verticalAlignmentTop]:m==="top",[N.verticalAlignmentBottom]:m==="bottom"}),striped:ae?br:!1,...hr,children:[(0,g.jsx)(lr,{ref:Cr,columns:x,sortStatus:h,onSortStatusChange:C,selectionVisible:!!d,selectionChecked:ke,selectionIndeterminate:kr&&!ke,onSelectionChange:i?()=>{i(ke?d.filter(s=>!X.includes(b(s,l))):xe([...d,...p],s=>b(s,l)))}:void 0,leftShadowVisible:_e,bottomShadowVisible:!wr}),(0,g.jsx)("tbody",{children:ae?p.map((s,k)=>{let E=b(s,l),Q=_?.includes(E)||!1,fe=!1,le=!1;if(y){let{hidden:c}=y;(!c||!(typeof c=="function"?c(s):c))&&(y.trigger==="click"?fe=!0:le=!0)}return(0,g.jsx)(He,{record:s,columns:x,selectionVisible:!!d,selectionChecked:Q,onSelectionChange:i?c=>{if(c.nativeEvent.shiftKey&&te!==null){let D=p.filter(k>te?(j,Y)=>Y>=te&&Y<=k:(j,Y)=>Y>=k&&Y<=te);i(Q?tr(d,D,j=>b(j,l)):xe([...d,...D],j=>b(j,l)))}else i(Q?d.filter(D=>b(D,l)!==E):xe([...d,s],D=>b(D,l)));Xe(k)}:void 0,onClick:fe?c=>{H({top:c.clientY,left:c.clientX,record:s}),oe?.(s)}:oe?()=>{oe(s)}:void 0,onContextMenu:le?c=>{c.preventDefault(),H({top:c.clientY,left:c.clientX,record:s})}:void 0,contextMenuVisible:F?b(F.record,l)===E:!1,leftShadowVisible:_e},E)}):(0,g.jsx)(De,{})})]})}),T&&(0,g.jsx)(rr,{ref:Br,horizontalSpacing:O,fetching:u,page:T,onPageChange:yr,totalRecords:Se,recordsPerPage:mr,paginationSize:xr,recordsLength:ae}),(0,g.jsx)(Me,{pt:Oe,pb:We,fetching:u,loaderBackgroundBlur:cr,loaderSize:nr,loaderVariant:ir}),(0,g.jsx)(ve,{pt:Oe,pb:We,text:gr,active:!u&&!ae}),y&&F&&(0,g.jsx)(Ne,{zIndex:y.zIndex,borderRadius:y.borderRadius,shadow:y.shadow,top:F.top,left:F.left,onDestroy:()=>H(null),children:y.items(F.record).map(({divider:s,key:k,title:E,icon:Q,color:fe,hidden:le,disabled:c,onClick:D})=>s?(0,g.jsx)(Ee,{},k):le?null:(0,g.jsx)(ze,{title:E??me(k),icon:Q,color:fe,disabled:c,onClick:()=>{H(null),D()}},k))})]})}
2
2
  //# sourceMappingURL=index.cjs.map