mantine-datatable 7.1.1 → 7.1.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/dist/index.d.ts +794 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/{css/styles.css → styles.css} +2 -0
- package/dist/styles.css.map +1 -0
- package/dist/{css/styles.layer.css → styles.layer.css} +2 -0
- package/dist/styles.layer.css.map +1 -0
- package/package.json +20 -13
- package/dist/esm/DataTable.js +0 -175
- package/dist/esm/DataTable.js.map +0 -1
- package/dist/esm/DataTableColumnGroupHeaderCell.js +0 -19
- package/dist/esm/DataTableColumnGroupHeaderCell.js.map +0 -1
- package/dist/esm/DataTableEmptyRow.js +0 -5
- package/dist/esm/DataTableEmptyRow.js.map +0 -1
- package/dist/esm/DataTableEmptyState.js +0 -7
- package/dist/esm/DataTableEmptyState.js.map +0 -1
- package/dist/esm/DataTableFooter.js +0 -22
- package/dist/esm/DataTableFooter.js.map +0 -1
- package/dist/esm/DataTableFooterCell.js +0 -24
- package/dist/esm/DataTableFooterCell.js.map +0 -1
- package/dist/esm/DataTableFooterSelectorPlaceholderCell.js +0 -6
- package/dist/esm/DataTableFooterSelectorPlaceholderCell.js.map +0 -1
- package/dist/esm/DataTableHeader.js +0 -18
- package/dist/esm/DataTableHeader.js.map +0 -1
- package/dist/esm/DataTableHeaderCell.js +0 -40
- package/dist/esm/DataTableHeaderCell.js.map +0 -1
- package/dist/esm/DataTableHeaderCellFilter.js +0 -15
- package/dist/esm/DataTableHeaderCellFilter.js.map +0 -1
- package/dist/esm/DataTableHeaderSelectorCell.js +0 -8
- package/dist/esm/DataTableHeaderSelectorCell.js.map +0 -1
- package/dist/esm/DataTableLoader.js +0 -7
- package/dist/esm/DataTableLoader.js.map +0 -1
- package/dist/esm/DataTablePageSizeSelector.js +0 -30
- package/dist/esm/DataTablePageSizeSelector.js.map +0 -1
- package/dist/esm/DataTablePagination.js +0 -34
- package/dist/esm/DataTablePagination.js.map +0 -1
- package/dist/esm/DataTableRow.js +0 -44
- package/dist/esm/DataTableRow.js.map +0 -1
- package/dist/esm/DataTableRowCell.js +0 -31
- package/dist/esm/DataTableRowCell.js.map +0 -1
- package/dist/esm/DataTableRowExpansion.js +0 -9
- package/dist/esm/DataTableRowExpansion.js.map +0 -1
- package/dist/esm/DataTableRowSelectorCell.js +0 -8
- package/dist/esm/DataTableRowSelectorCell.js.map +0 -1
- package/dist/esm/DataTableScrollArea.js +0 -22
- package/dist/esm/DataTableScrollArea.js.map +0 -1
- package/dist/esm/cssVariables.js +0 -43
- package/dist/esm/cssVariables.js.map +0 -1
- package/dist/esm/hooks/index.js +0 -9
- package/dist/esm/hooks/index.js.map +0 -1
- package/dist/esm/hooks/useElementOuterSize.js +0 -8
- package/dist/esm/hooks/useElementOuterSize.js.map +0 -1
- package/dist/esm/hooks/useIsomorphicLayoutEffect.js +0 -4
- package/dist/esm/hooks/useIsomorphicLayoutEffect.js.map +0 -1
- package/dist/esm/hooks/useLastSelectionChangeIndex.js +0 -11
- package/dist/esm/hooks/useLastSelectionChangeIndex.js.map +0 -1
- package/dist/esm/hooks/useMediaQueries.js +0 -52
- package/dist/esm/hooks/useMediaQueries.js.map +0 -1
- package/dist/esm/hooks/useMediaQueriesStringOrFunction.js +0 -11
- package/dist/esm/hooks/useMediaQueriesStringOrFunction.js.map +0 -1
- package/dist/esm/hooks/useMediaQueryStringOrFunction.js +0 -9
- package/dist/esm/hooks/useMediaQueryStringOrFunction.js.map +0 -1
- package/dist/esm/hooks/useRowExpansion.js +0 -45
- package/dist/esm/hooks/useRowExpansion.js.map +0 -1
- package/dist/esm/hooks/useRowExpansionStatus.js +0 -23
- package/dist/esm/hooks/useRowExpansionStatus.js.map +0 -1
- package/dist/esm/icons/IconArrowUp.js +0 -5
- package/dist/esm/icons/IconArrowUp.js.map +0 -1
- package/dist/esm/icons/IconArrowsVertical.js +0 -5
- package/dist/esm/icons/IconArrowsVertical.js.map +0 -1
- package/dist/esm/icons/IconDatabaseOff.js +0 -5
- package/dist/esm/icons/IconDatabaseOff.js.map +0 -1
- package/dist/esm/icons/IconFilter.js +0 -5
- package/dist/esm/icons/IconFilter.js.map +0 -1
- package/dist/esm/icons/IconFilterFilled.js +0 -5
- package/dist/esm/icons/IconFilterFilled.js.map +0 -1
- package/dist/esm/icons/IconSelector.js +0 -5
- package/dist/esm/icons/IconSelector.js.map +0 -1
- package/dist/esm/index.js +0 -4
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/types/DataTableCellClickHandler.js +0 -2
- package/dist/esm/types/DataTableCellClickHandler.js.map +0 -1
- package/dist/esm/types/DataTableColorProps.js +0 -2
- package/dist/esm/types/DataTableColorProps.js.map +0 -1
- package/dist/esm/types/DataTableColumn.js +0 -2
- package/dist/esm/types/DataTableColumn.js.map +0 -1
- package/dist/esm/types/DataTableColumnGroup.js +0 -2
- package/dist/esm/types/DataTableColumnGroup.js.map +0 -1
- package/dist/esm/types/DataTableColumnProps.js +0 -2
- package/dist/esm/types/DataTableColumnProps.js.map +0 -1
- package/dist/esm/types/DataTableColumnTextAlign.js +0 -2
- package/dist/esm/types/DataTableColumnTextAlign.js.map +0 -1
- package/dist/esm/types/DataTableDefaultColumnProps.js +0 -2
- package/dist/esm/types/DataTableDefaultColumnProps.js.map +0 -1
- package/dist/esm/types/DataTableEmptyStateProps.js +0 -2
- package/dist/esm/types/DataTableEmptyStateProps.js.map +0 -1
- package/dist/esm/types/DataTableLoaderProps.js +0 -2
- package/dist/esm/types/DataTableLoaderProps.js.map +0 -1
- package/dist/esm/types/DataTableOuterBorderProps.js +0 -2
- package/dist/esm/types/DataTableOuterBorderProps.js.map +0 -1
- package/dist/esm/types/DataTablePageSizeSelectorProps.js +0 -2
- package/dist/esm/types/DataTablePageSizeSelectorProps.js.map +0 -1
- package/dist/esm/types/DataTablePaginationProps.js +0 -2
- package/dist/esm/types/DataTablePaginationProps.js.map +0 -1
- package/dist/esm/types/DataTableProps.js +0 -2
- package/dist/esm/types/DataTableProps.js.map +0 -1
- package/dist/esm/types/DataTableRowClickHandler.js +0 -2
- package/dist/esm/types/DataTableRowClickHandler.js.map +0 -1
- package/dist/esm/types/DataTableRowExpansionCollapseProps.js +0 -2
- package/dist/esm/types/DataTableRowExpansionCollapseProps.js.map +0 -1
- package/dist/esm/types/DataTableRowExpansionProps.js +0 -2
- package/dist/esm/types/DataTableRowExpansionProps.js.map +0 -1
- package/dist/esm/types/DataTableScrollProps.js +0 -2
- package/dist/esm/types/DataTableScrollProps.js.map +0 -1
- package/dist/esm/types/DataTableSelectionProps.js +0 -2
- package/dist/esm/types/DataTableSelectionProps.js.map +0 -1
- package/dist/esm/types/DataTableSortProps.js +0 -2
- package/dist/esm/types/DataTableSortProps.js.map +0 -1
- package/dist/esm/types/DataTableSortStatus.js +0 -2
- package/dist/esm/types/DataTableSortStatus.js.map +0 -1
- package/dist/esm/types/DataTableVerticalAlign.js +0 -2
- package/dist/esm/types/DataTableVerticalAlign.js.map +0 -1
- package/dist/esm/types/index.js +0 -18
- package/dist/esm/types/index.js.map +0 -1
- package/dist/esm/types/utils.js +0 -2
- package/dist/esm/types/utils.js.map +0 -1
- package/dist/esm/utilityClasses.js +0 -8
- package/dist/esm/utilityClasses.js.map +0 -1
- package/dist/esm/utils.js +0 -41
- package/dist/esm/utils.js.map +0 -1
- package/dist/types/DataTable.d.ts +0 -2
- package/dist/types/DataTableColumnGroupHeaderCell.d.ts +0 -6
- package/dist/types/DataTableEmptyRow.d.ts +0 -1
- package/dist/types/DataTableEmptyState.d.ts +0 -11
- package/dist/types/DataTableFooter.d.ts +0 -15
- package/dist/types/DataTableFooterCell.d.ts +0 -11
- package/dist/types/DataTableFooterSelectorPlaceholderCell.d.ts +0 -5
- package/dist/types/DataTableHeader.d.ts +0 -22
- package/dist/types/DataTableHeaderCell.d.ts +0 -14
- package/dist/types/DataTableHeaderCellFilter.d.ts +0 -7
- package/dist/types/DataTableHeaderSelectorCell.d.ts +0 -11
- package/dist/types/DataTableLoader.d.ts +0 -14
- package/dist/types/DataTablePageSizeSelector.d.ts +0 -18
- package/dist/types/DataTablePagination.d.ts +0 -16
- package/dist/types/DataTableRow.d.ts +0 -35
- package/dist/types/DataTableRowCell.d.ts +0 -14
- package/dist/types/DataTableRowExpansion.d.ts +0 -10
- package/dist/types/DataTableRowSelectorCell.d.ts +0 -13
- package/dist/types/DataTableScrollArea.d.ts +0 -16
- package/dist/types/cssVariables.d.ts +0 -46
- package/dist/types/hooks/index.d.ts +0 -8
- package/dist/types/hooks/useElementOuterSize.d.ts +0 -6
- package/dist/types/hooks/useIsomorphicLayoutEffect.d.ts +0 -2
- package/dist/types/hooks/useLastSelectionChangeIndex.d.ts +0 -5
- package/dist/types/hooks/useMediaQueries.d.ts +0 -4
- package/dist/types/hooks/useMediaQueriesStringOrFunction.d.ts +0 -2
- package/dist/types/hooks/useMediaQueryStringOrFunction.d.ts +0 -2
- package/dist/types/hooks/useRowExpansion.d.ts +0 -17
- package/dist/types/hooks/useRowExpansionStatus.d.ts +0 -4
- package/dist/types/icons/IconArrowUp.d.ts +0 -1
- package/dist/types/icons/IconArrowsVertical.d.ts +0 -1
- package/dist/types/icons/IconDatabaseOff.d.ts +0 -1
- package/dist/types/icons/IconFilter.d.ts +0 -1
- package/dist/types/icons/IconFilterFilled.d.ts +0 -1
- package/dist/types/icons/IconSelector.d.ts +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/types/DataTableCellClickHandler.d.ts +0 -24
- package/dist/types/types/DataTableColorProps.d.ts +0 -77
- package/dist/types/types/DataTableColumn.d.ts +0 -134
- package/dist/types/types/DataTableColumnGroup.d.ts +0 -33
- package/dist/types/types/DataTableColumnProps.d.ts +0 -15
- package/dist/types/types/DataTableColumnTextAlign.d.ts +0 -1
- package/dist/types/types/DataTableDefaultColumnProps.d.ts +0 -2
- package/dist/types/types/DataTableEmptyStateProps.d.ts +0 -18
- package/dist/types/types/DataTableLoaderProps.d.ts +0 -31
- package/dist/types/types/DataTableOuterBorderProps.d.ts +0 -14
- package/dist/types/types/DataTablePageSizeSelectorProps.d.ts +0 -19
- package/dist/types/types/DataTablePaginationProps.d.ts +0 -90
- package/dist/types/types/DataTableProps.d.ts +0 -155
- package/dist/types/types/DataTableRowClickHandler.d.ts +0 -15
- package/dist/types/types/DataTableRowExpansionCollapseProps.d.ts +0 -2
- package/dist/types/types/DataTableRowExpansionProps.d.ts +0 -52
- package/dist/types/types/DataTableScrollProps.d.ts +0 -25
- package/dist/types/types/DataTableSelectionProps.d.ts +0 -33
- package/dist/types/types/DataTableSortProps.d.ts +0 -31
- package/dist/types/types/DataTableSortStatus.d.ts +0 -12
- package/dist/types/types/DataTableVerticalAlign.d.ts +0 -1
- package/dist/types/types/index.d.ts +0 -17
- package/dist/types/types/utils.d.ts +0 -4
- package/dist/types/utilityClasses.d.ts +0 -7
- package/dist/types/utils.d.ts +0 -21
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";"use client";var Qo=Object.create;var We=Object.defineProperty;var Xo=Object.getOwnPropertyDescriptor;var $o=Object.getOwnPropertyNames;var Uo=Object.getPrototypeOf,Ko=Object.prototype.hasOwnProperty;var Jo=(e,t)=>{for(var a in t)We(e,a,{get:t[a],enumerable:!0})},Lt=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of $o(t))!Ko.call(e,o)&&o!==a&&We(e,o,{get:()=>t[o],enumerable:!(n=Xo(t,o))||n.enumerable});return e};var N=(e,t,a)=>(a=e!=null?Qo(Uo(e)):{},Lt(t||!e||!e.__esModule?We(a,"default",{value:e,enumerable:!0}):a,e)),Zo=e=>Lt(We({},"__esModule",{value:!0}),e);var jo={};Jo(jo,{DataTable:()=>Ga,differenceBy:()=>ct,getRecordId:()=>C,getValueAtPath:()=>Xe,humanize:()=>ke,uniqBy:()=>Re});module.exports=Zo(jo);var Ye=require("@mantine/core"),Wa=require("@mantine/hooks"),gt=N(require("clsx")),I=require("react");var dt=require("react/jsx-runtime");function Ht(){return(0,dt.jsx)("tr",{className:"mantine-datatable-empty-row",children:(0,dt.jsx)("td",{})})}var Ge=require("@mantine/core");var B=require("react/jsx-runtime");function Ft(){return(0,B.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("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"}),(0,B.jsx)("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"}),(0,B.jsx)("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),(0,B.jsx)("path",{d:"M3 3l18 18"})]})}var O=require("react/jsx-runtime");function Vt({icon:e,text:t,pt:a,pb:n,active:o,children:r}){return(0,O.jsx)(Ge.Center,{pt:a,pb:n,className:"mantine-datatable-empty-state","data-active":o||void 0,children:r||(0,O.jsxs)(O.Fragment,{children:[e||(0,O.jsx)("div",{className:"mantine-datatable-empty-state-icon",children:(0,O.jsx)(Ft,{})}),(0,O.jsx)(Ge.Text,{size:"sm",c:"dimmed",children:t})]})})}var be=require("@mantine/core"),aa=N(require("clsx")),oa=require("react");var Jt=require("@mantine/core"),Zt=N(require("clsx"));var At=require("@mantine/hooks");function pe(){let[e]=(0,At.useResizeObserver)(),{width:t,height:a}=e.current?.getBoundingClientRect()||{width:0,height:0};return{ref:e,width:t,height:a}}var Be=require("react"),_t=typeof window<"u"?Be.useLayoutEffect:Be.useEffect;var Qe=require("react");function Ot(e){let[t,a]=(0,Qe.useState)(null),n=e?.join(":")||"";return(0,Qe.useEffect)(()=>{a(null)},[n]),{lastSelectionChangeIndex:t,setLastSelectionChangeIndex:a}}var ce=require("react");function Yo(e,t){let a=()=>{t(e.map(o=>o.matches))},n=e.map(o=>{try{return o.addEventListener("change",a),()=>o.removeEventListener("change",a)}catch{return o.addListener(a),()=>o.removeListener(a)}});return()=>{n.forEach(o=>o())}}function qo(e,t){return t||(typeof window<"u"&&"matchMedia"in window?e.map(a=>window.matchMedia(a).matches):e.map(()=>!1))}function zt(e,t,{getInitialValueInEffect:a}={getInitialValueInEffect:!0}){let[n,o]=(0,ce.useState)(a?t:qo(e,t)),r=(0,ce.useRef)();return(0,ce.useEffect)(()=>{if("matchMedia"in window)return r.current=e.map(i=>window.matchMedia(i)),o(r.current.map(i=>i.matches)),Yo(r.current,i=>{o(i)})},[e]),n}var Wt=require("@mantine/core"),pt=require("react");function Gt(e){let t=(0,Wt.useMantineTheme)(),a=(0,pt.useMemo)(()=>e.map(o=>(typeof o=="function"?o(t):o)??""),[e,t]),n=(0,pt.useMemo)(()=>e.map(()=>!0),[e]);return zt(a,n)}var Bt=require("@mantine/core"),Qt=require("@mantine/hooks");function Q(e){let t=(0,Bt.useMantineTheme)(),a=typeof e=="function"?e(t):e;return(0,Qt.useMediaQuery)(a||"",!0)}var Xt=require("react");function ke(e){let t=e.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${t.charAt(0).toUpperCase()}${t.slice(1)}`}function ct(e,t,a){return e.filter(n=>!t.map(a).includes(a(n)))}function Re(e,t){return e.filter((a,n,o)=>n===o.findIndex(r=>t(a)===t(r)))}function Xe(e,t){return t?t.match(/([^[.\]])+/g).reduce((n,o)=>n&&n[o],e):void 0}function C(e,t){return typeof t=="string"?Xe(e,t):t(e)}function $t({rowExpansion:e,records:t,idAccessor:a}){let n=[];if(e&&t){let{trigger:l,allowMultiple:d,initiallyExpanded:s}=e;t&&l==="always"?n=t.map(u=>C(u,a)):s&&(n=t.filter((u,b)=>s({record:u,index:b})).map(u=>C(u,a)),d||(n=[n[0]]))}let o,r,i=(0,Xt.useState)(n);if(e){let{trigger:l,allowMultiple:d,collapseProps:s,content:u}=e;e.expanded?{recordIds:o,onRecordIdsChange:r}=e.expanded:[o,r]=i;let b=p=>r?.(o.filter(c=>c!==C(p,a)));return{expandOnClick:l!=="always"&&l!=="never",isRowExpanded:p=>l==="always"?!0:o.includes(C(p,a)),expandRow:p=>{let c=C(p,a);r?.(d?[...o,c]:[c])},collapseRow:b,collapseProps:s,content:({record:p,index:c})=>()=>u({record:p,index:c,collapse:()=>b(p)})}}}var mt=require("@mantine/hooks"),ve=require("react");function Ut(e,t){let[a,n]=(0,ve.useState)(e),[o,r]=(0,ve.useState)(e),i=(0,mt.useTimeout)(()=>n(!0),0),l=(0,mt.useTimeout)(()=>r(!1),t||200);return(0,ve.useEffect)(()=>{e?(l.clear(),r(!0),i.start()):(i.clear(),n(!1),l.start())},[i,l,e]),{expanded:a,visible:o}}var me="mantine-datatable-nowrap",ue="mantine-datatable-ellipsis",X="mantine-datatable-pointer-cursor",Kt="mantine-datatable-text-selection-disabled",$="mantine-datatable-text-align-left",U="mantine-datatable-text-align-center",K="mantine-datatable-text-align-right";var qt=require("react/jsx-runtime");function Yt({className:e,style:t,visibleMediaQuery:a,title:n,noWrap:o,ellipsis:r,textAlign:i,width:l}){return Q(a)?(0,qt.jsx)(Jt.TableTh,{className:(0,Zt.default)({[me]:o||r,[ue]:r,[$]:i==="left",[U]:i==="center",[K]:i==="right"},e),style:[{width:l,minWidth:l,maxWidth:l},t],children:n}):null}var jt=require("@mantine/core"),ta=require("react/jsx-runtime");function ea({shadowVisible:e}){return(0,ta.jsx)(jt.TableTh,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":e||void 0})}var fe=require("react/jsx-runtime"),na=(0,oa.forwardRef)(function({className:t,style:a,columns:n,defaultColumnProps:o,selectionVisible:r,leftShadowVisible:i,scrollDiff:l},d){let s=l<0;return(0,fe.jsx)(be.TableTfoot,{ref:d,className:(0,aa.default)("mantine-datatable-footer",t),style:[{position:s?"relative":"sticky",bottom:(0,be.rem)(s?l:0)},a],children:(0,fe.jsxs)(be.TableTr,{children:[r&&(0,fe.jsx)(ea,{shadowVisible:i}),n.map(({hidden:u,...b})=>{if(u)return null;let{accessor:p,visibleMediaQuery:c,textAlign:f,width:y,footer:T,footerClassName:P,footerStyle:R,noWrap:A,ellipsis:v}={...o,...b};return(0,fe.jsx)(Yt,{className:P,style:R,visibleMediaQuery:c,textAlign:f,width:y,title:T,noWrap:A,ellipsis:v},p)})]})})});var Ie=require("@mantine/core"),ha=N(require("clsx")),ga=require("react");var ra=require("@mantine/core"),la=N(require("clsx")),ut=require("react");var sa=require("react/jsx-runtime");function ia({group:{id:e,columns:t,title:a,textAlign:n,className:o,style:r}}){let i=(0,ut.useMemo)(()=>t.map(({visibleMediaQuery:s})=>s),[t]),l=Gt(i),d=(0,ut.useMemo)(()=>t.filter(({hidden:s},u)=>!s&&l?.[u]).length,[t,l]);return d>0?(0,sa.jsx)(ra.TableTh,{colSpan:d,className:(0,la.default)({[$]:n==="left",[U]:n==="center",[K]:n==="right"},o),style:r,children:a??ke(e)}):null}var z=require("@mantine/core"),$e=N(require("clsx"));var ne=require("@mantine/core"),ca=require("@mantine/hooks");var Ee=require("react/jsx-runtime");function da(){return(0,Ee.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ee.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,Ee.jsx)("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}var Ne=require("react/jsx-runtime");function pa(){return(0,Ne.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ne.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,Ne.jsx)("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}var oe=require("react/jsx-runtime");function ma({children:e,isActive:t}){let[a,{close:n,toggle:o}]=(0,ca.useDisclosure)(!1);return(0,oe.jsxs)(ne.Popover,{withArrow:!0,withinPortal:!0,shadow:"md",opened:a,onClose:n,trapFocus:!0,children:[(0,oe.jsx)(ne.PopoverTarget,{children:(0,oe.jsx)(ne.ActionIcon,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":t||void 0,size:"sm",variant:"default",onClick:i=>{i.preventDefault(),o()},children:(0,oe.jsx)(t?pa:da,{})})}),(0,oe.jsx)(ne.Popover.Dropdown,{onClick:i=>i.preventDefault(),children:typeof e=="function"?e({close:n}):e})]})}var re=require("react/jsx-runtime");function ua(){return(0,re.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,re.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,re.jsx)("path",{d:"M12 5l0 14"}),(0,re.jsx)("path",{d:"M16 9l-4 -4"}),(0,re.jsx)("path",{d:"M8 9l4 -4"})]})}var le=require("react/jsx-runtime");function fa(){return(0,le.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,le.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,le.jsx)("path",{d:"M8 7l4 -4l4 4"}),(0,le.jsx)("path",{d:"M8 17l4 4l4 -4"}),(0,le.jsx)("path",{d:"M12 3l0 18"})]})}var D=require("react/jsx-runtime");function ba({className:e,style:t,accessor:a,visibleMediaQuery:n,title:o,sortable:r,sortIcons:i,textAlign:l,width:d,sortStatus:s,onSortStatusChange:u,filter:b,filtering:p}){if(!Q(n))return null;let c=o??ke(a),f=typeof c=="string"?c:void 0,y=r&&u?T=>{T?.defaultPrevented||u({columnAccessor:a,direction:s?.columnAccessor===a?s.direction==="asc"?"desc":"asc":s?.direction??"asc"})}:void 0;return(0,D.jsx)(z.TableTh,{className:(0,$e.default)({"mantine-datatable-header-cell-sortable":r},e),style:[{width:d,minWidth:d,maxWidth:d},t],role:r?"button":void 0,tabIndex:r?0:void 0,onClick:y,onKeyDown:T=>T.key==="Enter"&&y?.(),children:(0,D.jsxs)(z.Group,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[(0,D.jsx)(z.Box,{className:(0,$e.default)("mantine-datatable-header-cell-sortable-text",{[$]:l==="left",[U]:l==="center",[K]:l==="right"},me,ue),title:f,children:c}),r||s?.columnAccessor===a?(0,D.jsx)(D.Fragment,{children:s?.columnAccessor===a?(0,D.jsx)(z.Center,{className:(0,$e.default)("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":s.direction==="desc"}),role:"img","aria-label":`Sorted ${s.direction==="desc"?"descending":"ascending"}`,children:i?.sorted||(0,D.jsx)(ua,{})}):(0,D.jsx)(z.Center,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:i?.unsorted||(0,D.jsx)(fa,{})})}):null,b?(0,D.jsx)(ma,{isActive:!!p,children:b}):null]})})}var Ue=require("@mantine/core");var ft=require("react/jsx-runtime");function Ta({shadowVisible:e,checked:t,indeterminate:a,checkboxProps:n,onChange:o,rowSpan:r}){return(0,ft.jsx)(Ue.TableTh,{className:"mantine-datatable-header-selector-cell",rowSpan:r,"data-shadow-visible":e||void 0,children:(0,ft.jsx)(Ue.Checkbox,{classNames:{input:X},checked:t,indeterminate:a,onChange:o,...n,disabled:!(o||n.onChange)||n.disabled})})}var J=require("react/jsx-runtime"),Ca=(0,ga.forwardRef)(function({className:t,style:a,sortStatus:n,sortIcons:o,onSortStatusChange:r,columns:i,defaultColumnProps:l,groups:d,selectionVisible:s,selectionChecked:u,selectionIndeterminate:b,onSelectionChange:p,selectionCheckboxProps:c,leftShadowVisible:f},y){let T=s?(0,J.jsx)(Ta,{shadowVisible:f,checked:u,indeterminate:b,checkboxProps:c,onChange:p,rowSpan:d?2:void 0}):null;return(0,J.jsxs)(Ie.TableThead,{className:(0,ha.default)("mantine-datatable-header",t),style:a,ref:y,children:[d&&(0,J.jsxs)(Ie.TableTr,{children:[T,d.map(P=>(0,J.jsx)(ia,{group:P},P.id))]}),(0,J.jsxs)(Ie.TableTr,{children:[!d&&T,i.map(({hidden:P,...R})=>{if(P)return null;let{accessor:A,visibleMediaQuery:v,textAlign:S,width:x,title:w,sortable:L,titleClassName:M,titleStyle:q,filter:ge,filtering:Ce}={...l,...R};return(0,J.jsx)(ba,{accessor:A,className:M,style:q,visibleMediaQuery:v,textAlign:S,width:x,title:w,sortable:L,sortStatus:n,sortIcons:o,onSortStatusChange:r,filter:ge,filtering:Ce},A)})]})]})});var Ke=require("@mantine/core"),ya=N(require("clsx")),bt=require("react/jsx-runtime");function wa({pt:e,pb:t,fetching:a,customContent:n,backgroundBlur:o,size:r,type:i,color:l}){return(0,bt.jsx)(Ke.Center,{pt:e,pb:t,className:(0,ya.default)("mantine-datatable-loader",{"mantine-datatable-loader-fetching":a}),style:[{backdropFilter:o?`blur(${o}px)`:void 0}],children:a&&(n||(0,bt.jsx)(Ke.Loader,{size:r,type:i,color:l}))})}var Z=require("@mantine/core"),Tt=N(require("clsx")),va=require("react");var h=require("@mantine/core"),ka=N(require("clsx"));var Sa=require("@mantine/core");function g(e,t,a){return e?(0,Sa.parseThemeColor)({color:typeof e=="object"?e[a]:e,theme:t}).value:void 0}function Pa({theme:e,c:t,backgroundColor:a,borderColor:n,rowBorderColor:o,stripedColor:r,highlightOnHoverColor:i}){return{"--mantine-datatable-color-light":g(t,e,"light"),"--mantine-datatable-color-dark":g(t,e,"dark"),"--mantine-datatable-background-color-light":g(a,e,"light"),"--mantine-datatable-background-color-dark":g(a,e,"dark"),"--mantine-datatable-border-color-light":g(n,e,"light"),"--mantine-datatable-border-color-dark":g(n,e,"dark"),"--mantine-datatable-row-border-color-light":g(o,e,"light"),"--mantine-datatable-row-border-color-dark":g(o,e,"dark"),"--mantine-datatable-striped-color-light":g(r,e,"light"),"--mantine-datatable-striped-color-dark":g(r,e,"dark"),"--mantine-datatable-highlight-on-hover-color-light":g(i,e,"light"),"--mantine-datatable-highlight-on-hover-color-dark":g(i,e,"dark")}}function Je({theme:e,paginationActiveTextColor:t,paginationActiveBackgroundColor:a}){return{"--mantine-datatable-pagination-active-text-color-light":g(t,e,"light"),"--mantine-datatable-pagination-active-text-color-dark":g(t,e,"dark"),"--mantine-datatable-pagination-active-background-color-light":g(a,e,"light"),"--mantine-datatable-pagination-active-background-color-dark":g(a,e,"dark")}}function xa({theme:e,color:t,backgroundColor:a}){return{"--mantine-datatable-row-color-light":g(t,e,"light"),"--mantine-datatable-row-color-dark":g(t,e,"dark"),"--mantine-datatable-row-background-color-light":g(a,e,"light"),"--mantine-datatable-row-background-color-dark":g(a,e,"dark")}}var Te=require("react/jsx-runtime");function Ma(){return(0,Te.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Te.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,Te.jsx)("path",{d:"M8 9l4 -4l4 4"}),(0,Te.jsx)("path",{d:"M16 15l-4 4l-4 -4"})]})}var V=require("react/jsx-runtime"),Da={xs:(0,h.rem)(22),sm:(0,h.rem)(26),md:(0,h.rem)(32),lg:(0,h.rem)(38),xl:(0,h.rem)(44)};function Ra({size:e,label:t,values:a,value:n,activeTextColor:o,activeBackgroundColor:r,onChange:i}){return(0,V.jsxs)(h.Group,{gap:"xs",children:[(0,V.jsx)(h.Text,{size:e,children:t}),(0,V.jsxs)(h.Menu,{withinPortal:!0,withArrow:!0,children:[(0,V.jsx)(h.MenuTarget,{children:(0,V.jsx)(h.Button,{size:e,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:(0,V.jsx)(Ma,{}),style:[{fontWeight:"normal"},l=>({height:Da[e],paddingLeft:l.spacing[e],paddingRight:l.spacing[e]})],children:n})}),(0,V.jsx)(h.MenuDropdown,{children:a.map(l=>{let d=l===n;return(0,V.jsx)(h.MenuItem,{className:(0,ka.default)({"mantine-datatable-page-size-selector-active":d}),style:[{height:Da[e]},d&&(o||r)?s=>Je({theme:s,paginationActiveTextColor:o,paginationActiveBackgroundColor:r}):void 0],disabled:d,onClick:()=>i(l),children:(0,V.jsx)(h.Text,{size:e,children:l})},l)})})]})]})}var he=require("react/jsx-runtime"),Ea=(0,va.forwardRef)(function({className:t,style:a,fetching:n,page:o,onPageChange:r,paginationWithEdges:i,paginationActiveTextColor:l,paginationActiveBackgroundColor:d,paginationSize:s,loadingText:u,noRecordsText:b,paginationText:p,totalRecords:c,recordsPerPage:f,onRecordsPerPageChange:y,recordsPerPageLabel:T,recordsPerPageOptions:P,recordsLength:R,horizontalSpacing:A,paginationWrapBreakpoint:v,getPaginationControlProps:S},x){let w;if(n)w=u;else if(!c)w=b;else{let M=(o-1)*f+1,q=M+R-1;w=p({from:M,to:q,totalRecords:c})}let L=Q(({breakpoints:M})=>`(min-width: ${typeof v=="number"?`${(0,Z.rem)(v)}rem`:M[v]||v})`);return(0,he.jsxs)(Z.Box,{ref:x,px:A??"xs",py:"xs",className:(0,Tt.default)("mantine-datatable-pagination",t),style:[{flexDirection:L?"row":"column"},a],children:[(0,he.jsx)(Z.Text,{className:"mantine-datatable-pagination-text",size:s,children:w}),P&&(0,he.jsx)(Ra,{activeTextColor:l,activeBackgroundColor:d,size:s,label:T,values:P,value:f,onChange:y}),(0,he.jsx)(Z.Pagination,{classNames:{root:(0,Tt.default)("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":n||!R}),control:"mantine-datatable-pagination-pages-control"},style:l||d?M=>Je({theme:M,paginationActiveTextColor:l,paginationActiveBackgroundColor:d}):void 0,withEdges:i,value:o,onChange:r,size:s,total:Math.ceil(c/f),getControlProps:S})]})});var Aa=require("@mantine/core"),_a=N(require("clsx"));var Na=require("@mantine/core"),Ia=N(require("clsx"));var Ha=require("react/jsx-runtime");function La({className:e,style:t,visibleMediaQuery:a,record:n,index:o,onClick:r,onContextMenu:i,noWrap:l,ellipsis:d,textAlign:s,width:u,accessor:b,render:p,defaultRender:c,customCellAttributes:f}){return Q(a)?(0,Ha.jsx)(Na.TableTd,{className:(0,Ia.default)({[me]:l||d,[ue]:d,[X]:r,[$]:s==="left",[U]:s==="center",[K]:s==="right"},e),style:[{width:u,minWidth:u,maxWidth:u},t],onClick:r,onContextMenu:i,...f?.(n,o),children:p?p(n,o):c?c(n,o,b):Xe(n,b)}):null}var ie=require("@mantine/core");var _=require("react/jsx-runtime");function Fa({open:e,colSpan:t,content:a,collapseProps:n}){let{expanded:o,visible:r}=Ut(e,n?.transitionDuration);return r?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ie.TableTr,{}),(0,_.jsx)(ie.TableTr,{children:(0,_.jsx)(ie.TableTd,{className:"mantine-datatable-row-expansion-cell",colSpan:t,children:(0,_.jsx)(ie.Collapse,{in:o,...n,children:(0,_.jsx)("div",{className:"mantine-datatable-row-expansion-cell-content",children:a()})})})})]}):null}var Ze=require("@mantine/core");var ht=require("react/jsx-runtime");function Va({record:e,index:t,withRightShadow:a,getCheckboxProps:n,...o}){return(0,ht.jsx)(Ze.TableTd,{className:"mantine-datatable-row-selector-cell","data-shadow-visible":a||void 0,onClick:r=>r.stopPropagation(),children:(0,ht.jsx)(Ze.Checkbox,{classNames:{input:X},...o,...n(e,t)})})}var W=require("react/jsx-runtime");function Oa({record:e,index:t,columns:a,defaultColumnProps:n,defaultColumnRender:o,selectionVisible:r,selectionChecked:i,onSelectionChange:l,isRecordSelectable:d,getSelectionCheckboxProps:s,onClick:u,onContextMenu:b,onCellClick:p,onCellContextMenu:c,expansion:f,customAttributes:y,color:T,backgroundColor:P,className:R,style:A,leftShadowVisible:v}){return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(Aa.TableTr,{className:(0,_a.default)("mantine-datatable-row",{[X]:u||f?.expandOnClick},typeof R=="function"?R(e,t):R),"data-selected":i||void 0,onClick:S=>{if(f){let{isRowExpanded:x,expandOnClick:w,expandRow:L,collapseRow:M}=f;w&&(x(e)?M(e):L(e))}u?.({event:S,record:e,index:t})},onContextMenu:b?S=>b({event:S,record:e,index:t}):void 0,style:[T||P?S=>{let x=T?.(e,t),w=P?.(e,t);return xa({theme:S,color:x,backgroundColor:w})}:void 0,A?.(e,t)],...y?.(e,t),children:[r&&(0,W.jsx)(Va,{record:e,index:t,withRightShadow:v,checked:i,disabled:!l||(d?!d(e,t):!1),onChange:l,getCheckboxProps:s}),a.map(({hidden:S,...x},w)=>{if(S)return null;let{accessor:L,visibleMediaQuery:M,textAlign:q,noWrap:ge,ellipsis:Ce,width:qe,render:je,cellsClassName:ye,cellsStyle:et,customCellAttributes:tt}={...n,...x};return(0,W.jsx)(La,{className:typeof ye=="function"?ye(e,t):ye,style:et?.(e,t),visibleMediaQuery:M,record:e,index:t,onClick:p?we=>p({event:we,record:e,index:t,column:x,columnIndex:w}):void 0,onContextMenu:c?we=>c({event:we,record:e,index:t,column:x,columnIndex:w}):void 0,accessor:L,textAlign:q,noWrap:ge,ellipsis:Ce,width:qe,render:je,defaultRender:o,customCellAttributes:tt},L)})]}),f&&(0,W.jsx)(Fa,{colSpan:a.filter(({hidden:S})=>!S).length+(r?1:0),open:f.isRowExpanded(e),content:f.content({record:e,index:t}),collapseProps:f.collapseProps})]})}var Y=require("@mantine/core"),Le=N(require("clsx")),se=require("react/jsx-runtime");function za({topShadowVisible:e,leftShadowVisible:t,leftShadowBehind:a,rightShadowVisible:n,bottomShadowVisible:o,headerHeight:r,footerHeight:i,onScrollPositionChange:l,children:d,viewportRef:s,scrollAreaProps:u}){return(0,se.jsxs)(Y.ScrollArea,{...u,viewportRef:s,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:l,children:[d,(0,se.jsx)(Y.Box,{className:(0,Le.default)("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow",{"mantine-datatable-scroll-area-shadow-visible":e}),style:{top:r?(0,Y.rem)(r):0}}),(0,se.jsx)("div",{className:(0,Le.default)("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-visible":t,"mantine-datatable-scroll-area-left-shadow-behind":a})}),(0,se.jsx)("div",{className:(0,Le.default)("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-visible":n})}),(0,se.jsx)(Y.Box,{className:(0,Le.default)("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow",{"mantine-datatable-scroll-area-shadow-visible":o}),style:{bottom:i?(0,Y.rem)(i):0}})]})}var k=require("react/jsx-runtime");function Ga({withTableBorder:e,borderRadius:t,textSelectionDisabled:a,height:n="100%",minHeight:o,shadow:r,verticalAlign:i="center",fetching:l,columns:d,groups:s,defaultColumnProps:u,defaultColumnRender:b,idAccessor:p="id",records:c,selectedRecords:f,onSelectedRecordsChange:y,isRecordSelectable:T,allRecordsSelectionCheckboxProps:P={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:R=(E,j)=>({"aria-label":`Select record ${j+1}`}),sortStatus:A,sortIcons:v,onSortStatusChange:S,horizontalSpacing:x,page:w,onPageChange:L,totalRecords:M,recordsPerPage:q,onRecordsPerPageChange:ge,recordsPerPageOptions:Ce,recordsPerPageLabel:qe="Records per page",paginationWithEdges:je,paginationActiveTextColor:ye,paginationActiveBackgroundColor:et,paginationSize:tt="sm",paginationText:we=({from:E,to:j,totalRecords:ee})=>`${E} - ${j} / ${ee}`,paginationWrapBreakpoint:Ba="sm",getPaginationControlProps:Qa=E=>E==="previous"?{"aria-label":"Previous page"}:E==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:Xa,customLoader:$a,loaderSize:Ua,loaderType:Ka,loaderColor:Ja,loadingText:Za="...",emptyState:Ya,noRecordsText:Ct="No records",noRecordsIcon:qa,highlightOnHover:ja,striped:eo,noHeader:to,onRowClick:ao,onRowContextMenu:oo,onCellClick:no,onCellContextMenu:ro,onScroll:yt,onScrollToTop:wt,onScrollToBottom:St,onScrollToLeft:Pt,onScrollToRight:xt,c:lo,backgroundColor:io,borderColor:so,rowBorderColor:po,stripedColor:co,highlightOnHoverColor:mo,rowColor:uo,rowBackgroundColor:fo,rowExpansion:bo,rowClassName:To,rowStyle:ho,customRowAttributes:go,scrollViewportRef:Co,scrollAreaProps:yo,bodyRef:wo,m:So,my:Po,mx:xo,mt:Mo,mb:Do,ml:ko,mr:Ro,className:vo,classNames:Se,style:Eo,styles:Pe,...No}){let{ref:E,width:j,height:ee}=pe(),He=(0,I.useMemo)(()=>s?.flatMap(m=>m.columns)??d,[d,s]),{ref:Io,height:at}=pe(),{ref:Lo,width:ot,height:xe}=pe(),{ref:Ho,height:Fo}=pe(),{ref:Vo,height:Mt}=pe(),[nt,Dt]=(0,I.useState)(!0),[rt,kt]=(0,I.useState)(!0),[Fe,Rt]=(0,I.useState)(!0),[lt,vt]=(0,I.useState)(!0),Ao=$t({rowExpansion:bo,records:c,idAccessor:p}),Ve=(0,I.useCallback)(()=>{let m=E.current?.scrollTop||0,G=E.current?.scrollLeft||0;if(l||xe<=ee)Dt(!0),kt(!0);else{let H=m===0,F=xe-m-ee<1;Dt(H),kt(F),H&&H!==nt&&wt?.(),F&&F!==rt&&St?.()}if(l||ot===j)Rt(!0),vt(!0);else{let H=G===0,F=ot-G-j<1;Rt(H),vt(F),H&&H!==Fe&&Pt?.(),F&&F!==lt&&xt?.()}},[l,St,Pt,xt,wt,ee,E,j,rt,Fe,lt,nt,xe,ot]);_t(Ve,[Ve]);let _o=(0,I.useCallback)(m=>{yt?.(m),Ve()},[Ve,yt]),Oo=(0,I.useCallback)(m=>{E.current?.scrollTo({top:0,left:0}),L(m)},[L,E]),Ae=c?.length,Et=c?.map(m=>C(m,p)),Me=!!f,De=f?.map(m=>C(m,p)),Nt=Et!==void 0&&De!==void 0&&De.length>0,it=T?c?.filter(T):c,_e=it?.map(m=>C(m,p)),Oe=Nt&&_e.every(m=>De.includes(m)),zo=Nt&&_e.some(m=>De.includes(m)),Wo=(0,I.useCallback)(()=>{f&&y&&y(Oe?f.filter(m=>!_e.includes(C(m,p))):Re([...f,...it],m=>C(m,p)))},[Oe,p,y,_e,it,f]),{lastSelectionChangeIndex:ze,setLastSelectionChangeIndex:Go}=Ot(Et),st=Me&&!Fe;return(0,k.jsxs)(Ye.Box,{...{m:So,my:Po,mx:xo,mt:Mo,mb:Do,ml:ko,mr:Ro},className:(0,gt.default)("mantine-datatable",{"mantine-datatable-with-border":e},vo,Se?.root),style:[m=>({...Pa({theme:m,c:lo,backgroundColor:io,borderColor:so,rowBorderColor:po,stripedColor:co,highlightOnHoverColor:mo}),borderRadius:m.radius[t]||t,boxShadow:m.shadows[r]||r,height:n,minHeight:o}),Eo,Pe?.root],children:[(0,k.jsx)(za,{viewportRef:(0,Wa.useMergedRef)(E,Co),topShadowVisible:!nt,leftShadowVisible:!Fe,leftShadowBehind:Me,rightShadowVisible:!lt,bottomShadowVisible:!rt,headerHeight:at,footerHeight:Fo,onScrollPositionChange:_o,scrollAreaProps:yo,children:(0,k.jsxs)(Ye.Table,{ref:Lo,horizontalSpacing:x,className:(0,gt.default)("mantine-datatable-table",{[Kt]:a,"mantine-datatable-vertical-align-top":i==="top","mantine-datatable-vertical-align-bottom":i==="bottom","mantine-datatable-table-last-row-border-bottom-visible":xe<ee},Se?.table),style:Pe?.table,"data-striped":Ae&&eo||void 0,"data-highlight-on-hover":ja||void 0,...No,children:[to?null:(0,k.jsx)(Ca,{ref:Io,className:Se?.header,style:Pe?.header,columns:He,defaultColumnProps:u,groups:s,sortStatus:A,sortIcons:v,onSortStatusChange:S,selectionVisible:Me,selectionChecked:Oe,selectionIndeterminate:zo&&!Oe,onSelectionChange:Wo,selectionCheckboxProps:P,leftShadowVisible:st}),(0,k.jsx)("tbody",{ref:wo,children:Ae?c.map((m,G)=>{let H=C(m,p),F=De?.includes(H)||!1,It;return y&&f&&(It=Bo=>{if(Bo.nativeEvent.shiftKey&&ze!==null){let de=c.filter(G>ze?(te,ae)=>ae>=ze&&ae<=G&&(T?T(te,ae):!0):(te,ae)=>ae>=G&&ae<=ze&&(T?T(te,ae):!0));y(F?ct(f,de,te=>C(te,p)):Re([...f,...de],te=>C(te,p)))}else y(F?f.filter(de=>C(de,p)!==H):Re([...f,m],de=>C(de,p)));Go(G)}),(0,k.jsx)(Oa,{record:m,index:G,columns:He,defaultColumnProps:u,defaultColumnRender:b,selectionVisible:Me,selectionChecked:F,onSelectionChange:It,isRecordSelectable:T,getSelectionCheckboxProps:R,onClick:ao,onCellClick:no,onContextMenu:oo,onCellContextMenu:ro,expansion:Ao,color:uo,backgroundColor:fo,className:To,style:ho,customAttributes:go,leftShadowVisible:st},H)}):(0,k.jsx)(Ht,{})}),He.some(({footer:m})=>m)&&(0,k.jsx)(na,{ref:Ho,className:Se?.footer,style:Pe?.footer,columns:He,defaultColumnProps:u,selectionVisible:Me,leftShadowVisible:st,scrollDiff:xe-ee})]})}),w&&(0,k.jsx)(Ea,{ref:Vo,className:Se?.pagination,style:Pe?.pagination,horizontalSpacing:x,fetching:l,page:w,onPageChange:Oo,totalRecords:M,recordsPerPage:q,onRecordsPerPageChange:ge,recordsPerPageOptions:Ce,recordsPerPageLabel:qe,paginationWithEdges:je,paginationActiveTextColor:ye,paginationActiveBackgroundColor:et,paginationSize:tt,paginationText:we,paginationWrapBreakpoint:Ba,getPaginationControlProps:Qa,noRecordsText:Ct,loadingText:Za,recordsLength:Ae}),(0,k.jsx)(wa,{pt:at,pb:Mt,fetching:l,backgroundBlur:Xa,customContent:$a,size:Ua,type:Ka,color:Ja}),(0,k.jsx)(Vt,{pt:at,pb:Mt,icon:qa,text:Ct,active:!l&&!Ae,children:Ya})]})}0&&(module.exports={DataTable,differenceBy,getRecordId,getValueAtPath,humanize,uniqBy});
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../package/index.ts","../package/DataTable.tsx","../package/DataTableEmptyRow.tsx","../package/DataTableEmptyState.tsx","../package/icons/IconDatabaseOff.tsx","../package/DataTableFooter.tsx","../package/DataTableFooterCell.tsx","../package/hooks/useElementOuterSize.ts","../package/hooks/useIsomorphicLayoutEffect.ts","../package/hooks/useLastSelectionChangeIndex.ts","../package/hooks/useMediaQueries.ts","../package/hooks/useMediaQueriesStringOrFunction.ts","../package/hooks/useMediaQueryStringOrFunction.ts","../package/hooks/useRowExpansion.ts","../package/utils.ts","../package/hooks/useRowExpansionStatus.ts","../package/utilityClasses.ts","../package/DataTableFooterSelectorPlaceholderCell.tsx","../package/DataTableHeader.tsx","../package/DataTableColumnGroupHeaderCell.tsx","../package/DataTableHeaderCell.tsx","../package/DataTableHeaderCellFilter.tsx","../package/icons/IconFilter.tsx","../package/icons/IconFilterFilled.tsx","../package/icons/IconArrowUp.tsx","../package/icons/IconArrowsVertical.tsx","../package/DataTableHeaderSelectorCell.tsx","../package/DataTableLoader.tsx","../package/DataTablePagination.tsx","../package/DataTablePageSizeSelector.tsx","../package/cssVariables.ts","../package/icons/IconSelector.tsx","../package/DataTableRow.tsx","../package/DataTableRowCell.tsx","../package/DataTableRowExpansion.tsx","../package/DataTableRowSelectorCell.tsx","../package/DataTableScrollArea.tsx"],"sourcesContent":["'use client';\n\nexport { DataTable } from './DataTable';\nexport * from './types';\nexport * from './utils';\n","import { Box, Table, type MantineSize } from '@mantine/core';\nimport { useMergedRef } from '@mantine/hooks';\nimport clsx from 'clsx';\nimport { useCallback, useMemo, useState } from 'react';\nimport { DataTableEmptyRow } from './DataTableEmptyRow';\nimport { DataTableEmptyState } from './DataTableEmptyState';\nimport { DataTableFooter } from './DataTableFooter';\nimport { DataTableHeader } from './DataTableHeader';\nimport { DataTableLoader } from './DataTableLoader';\nimport { DataTablePagination } from './DataTablePagination';\nimport { DataTableRow } from './DataTableRow';\nimport { DataTableScrollArea } from './DataTableScrollArea';\nimport { getTableCssVariables } from './cssVariables';\nimport { useElementOuterSize, useIsomorphicLayoutEffect, useLastSelectionChangeIndex, useRowExpansion } from './hooks';\nimport type { DataTableProps } from './types';\nimport { TEXT_SELECTION_DISABLED } from './utilityClasses';\nimport { differenceBy, getRecordId, uniqBy } from './utils';\n\nexport function DataTable<T>({\n withTableBorder,\n borderRadius,\n textSelectionDisabled,\n height = '100%',\n minHeight,\n shadow,\n verticalAlign = 'center',\n fetching,\n columns,\n groups,\n defaultColumnProps,\n defaultColumnRender,\n idAccessor = 'id',\n records,\n selectedRecords,\n onSelectedRecordsChange,\n isRecordSelectable,\n allRecordsSelectionCheckboxProps = { 'aria-label': 'Select all records' },\n getRecordSelectionCheckboxProps = (_, index) => ({ 'aria-label': `Select record ${index + 1}` }),\n sortStatus,\n sortIcons,\n onSortStatusChange,\n horizontalSpacing,\n page,\n onPageChange,\n totalRecords,\n recordsPerPage,\n onRecordsPerPageChange,\n recordsPerPageOptions,\n recordsPerPageLabel = 'Records per page',\n paginationWithEdges,\n paginationActiveTextColor,\n paginationActiveBackgroundColor,\n paginationSize = 'sm',\n paginationText = ({ from, to, totalRecords }) => `${from} - ${to} / ${totalRecords}`,\n paginationWrapBreakpoint = 'sm',\n getPaginationControlProps = (control) => {\n if (control === 'previous') {\n return { 'aria-label': 'Previous page' };\n } else if (control === 'next') {\n return { 'aria-label': 'Next page' };\n }\n return {};\n },\n loaderBackgroundBlur,\n customLoader,\n loaderSize,\n loaderType,\n loaderColor,\n loadingText = '...',\n emptyState,\n noRecordsText = 'No records',\n noRecordsIcon,\n highlightOnHover,\n striped,\n noHeader,\n onRowClick,\n onRowContextMenu,\n onCellClick,\n onCellContextMenu,\n onScroll,\n onScrollToTop,\n onScrollToBottom,\n onScrollToLeft,\n onScrollToRight,\n c,\n backgroundColor,\n borderColor,\n rowBorderColor,\n stripedColor,\n highlightOnHoverColor,\n rowColor,\n rowBackgroundColor,\n rowExpansion,\n rowClassName,\n rowStyle,\n customRowAttributes,\n scrollViewportRef: scrollViewportRefProp,\n scrollAreaProps,\n bodyRef,\n m,\n my,\n mx,\n mt,\n mb,\n ml,\n mr,\n className,\n classNames,\n style,\n styles,\n ...otherProps\n}: DataTableProps<T>) {\n const {\n ref: scrollViewportRef,\n width: scrollViewportWidth,\n height: scrollViewportHeight,\n } = useElementOuterSize<HTMLDivElement>();\n\n const effectiveColumns = useMemo(() => {\n return groups?.flatMap((group) => group.columns) ?? columns!;\n }, [columns, groups]);\n\n const { ref: headerRef, height: headerHeight } = useElementOuterSize<HTMLTableSectionElement>();\n const { ref: tableRef, width: tableWidth, height: tableHeight } = useElementOuterSize<HTMLTableElement>();\n const { ref: footerRef, height: footerHeight } = useElementOuterSize<HTMLTableSectionElement>();\n const { ref: paginationRef, height: paginationHeight } = useElementOuterSize<HTMLDivElement>();\n\n const [scrolledToTop, setScrolledToTop] = useState(true);\n const [scrolledToBottom, setScrolledToBottom] = useState(true);\n const [scrolledToLeft, setScrolledToLeft] = useState(true);\n const [scrolledToRight, setScrolledToRight] = useState(true);\n\n const rowExpansionInfo = useRowExpansion<T>({ rowExpansion, records, idAccessor });\n\n const processScrolling = useCallback(() => {\n const scrollTop = scrollViewportRef.current?.scrollTop || 0;\n const scrollLeft = scrollViewportRef.current?.scrollLeft || 0;\n\n if (fetching || tableHeight <= scrollViewportHeight) {\n setScrolledToTop(true);\n setScrolledToBottom(true);\n } else {\n const newScrolledToTop = scrollTop === 0;\n const newScrolledToBottom = tableHeight - scrollTop - scrollViewportHeight < 1;\n setScrolledToTop(newScrolledToTop);\n setScrolledToBottom(newScrolledToBottom);\n if (newScrolledToTop && newScrolledToTop !== scrolledToTop) onScrollToTop?.();\n if (newScrolledToBottom && newScrolledToBottom !== scrolledToBottom) onScrollToBottom?.();\n }\n\n if (fetching || tableWidth === scrollViewportWidth) {\n setScrolledToLeft(true);\n setScrolledToRight(true);\n } else {\n const newScrolledToLeft = scrollLeft === 0;\n const newScrolledToRight = tableWidth - scrollLeft - scrollViewportWidth < 1;\n setScrolledToLeft(newScrolledToLeft);\n setScrolledToRight(newScrolledToRight);\n if (newScrolledToLeft && newScrolledToLeft !== scrolledToLeft) onScrollToLeft?.();\n if (newScrolledToRight && newScrolledToRight !== scrolledToRight) onScrollToRight?.();\n }\n }, [\n fetching,\n onScrollToBottom,\n onScrollToLeft,\n onScrollToRight,\n onScrollToTop,\n scrollViewportHeight,\n scrollViewportRef,\n scrollViewportWidth,\n scrolledToBottom,\n scrolledToLeft,\n scrolledToRight,\n scrolledToTop,\n tableHeight,\n tableWidth,\n ]);\n\n useIsomorphicLayoutEffect(processScrolling, [processScrolling]);\n\n const handleScrollPositionChange = useCallback(\n (e: { x: number; y: number }) => {\n onScroll?.(e);\n processScrolling();\n },\n [processScrolling, onScroll]\n );\n\n const handlePageChange = useCallback(\n (page: number) => {\n scrollViewportRef.current?.scrollTo({ top: 0, left: 0 });\n onPageChange!(page);\n },\n [onPageChange, scrollViewportRef]\n );\n\n const recordsLength = records?.length;\n const recordIds = records?.map((record) => getRecordId(record, idAccessor));\n const selectionColumnVisible = !!selectedRecords;\n const selectedRecordIds = selectedRecords?.map((record) => getRecordId(record, idAccessor));\n const hasRecordsAndSelectedRecords =\n recordIds !== undefined && selectedRecordIds !== undefined && selectedRecordIds.length > 0;\n\n const selectableRecords = isRecordSelectable ? records?.filter(isRecordSelectable) : records;\n const selectableRecordIds = selectableRecords?.map((record) => getRecordId(record, idAccessor));\n\n const allSelectableRecordsSelected =\n hasRecordsAndSelectedRecords && selectableRecordIds!.every((id) => selectedRecordIds.includes(id));\n const someRecordsSelected =\n hasRecordsAndSelectedRecords && selectableRecordIds!.some((id) => selectedRecordIds.includes(id));\n\n const handleHeaderSelectionChange = useCallback(() => {\n if (selectedRecords && onSelectedRecordsChange) {\n onSelectedRecordsChange(\n allSelectableRecordsSelected\n ? selectedRecords.filter((record) => !selectableRecordIds!.includes(getRecordId(record, idAccessor)))\n : uniqBy([...selectedRecords, ...selectableRecords!], (record) => getRecordId(record, idAccessor))\n );\n }\n }, [\n allSelectableRecordsSelected,\n idAccessor,\n onSelectedRecordsChange,\n selectableRecordIds,\n selectableRecords,\n selectedRecords,\n ]);\n\n const { lastSelectionChangeIndex, setLastSelectionChangeIndex } = useLastSelectionChangeIndex(recordIds);\n const selectionVisibleAndNotScrolledToLeft = selectionColumnVisible && !scrolledToLeft;\n\n const marginProperties = { m, my, mx, mt, mb, ml, mr };\n\n return (\n <Box\n {...marginProperties}\n className={clsx(\n 'mantine-datatable',\n { 'mantine-datatable-with-border': withTableBorder },\n className,\n classNames?.root\n )}\n style={[\n (theme) => ({\n ...getTableCssVariables({\n theme,\n c,\n backgroundColor,\n borderColor,\n rowBorderColor,\n stripedColor,\n highlightOnHoverColor,\n }),\n borderRadius: theme.radius[borderRadius as MantineSize] || borderRadius,\n boxShadow: theme.shadows[shadow as MantineSize] || shadow,\n height,\n minHeight,\n }),\n style,\n styles?.root,\n ]}\n >\n <DataTableScrollArea\n viewportRef={useMergedRef(scrollViewportRef, scrollViewportRefProp)}\n topShadowVisible={!scrolledToTop}\n leftShadowVisible={!scrolledToLeft}\n leftShadowBehind={selectionColumnVisible}\n rightShadowVisible={!scrolledToRight}\n bottomShadowVisible={!scrolledToBottom}\n headerHeight={headerHeight}\n footerHeight={footerHeight}\n onScrollPositionChange={handleScrollPositionChange}\n scrollAreaProps={scrollAreaProps}\n >\n <Table\n ref={tableRef}\n horizontalSpacing={horizontalSpacing}\n className={clsx(\n 'mantine-datatable-table',\n {\n [TEXT_SELECTION_DISABLED]: textSelectionDisabled,\n 'mantine-datatable-vertical-align-top': verticalAlign === 'top',\n 'mantine-datatable-vertical-align-bottom': verticalAlign === 'bottom',\n 'mantine-datatable-table-last-row-border-bottom-visible': tableHeight < scrollViewportHeight,\n },\n classNames?.table\n )}\n style={styles?.table}\n data-striped={(recordsLength && striped) || undefined}\n data-highlight-on-hover={highlightOnHover || undefined}\n {...otherProps}\n >\n {noHeader ? null : (\n <DataTableHeader<T>\n ref={headerRef}\n className={classNames?.header}\n style={styles?.header}\n columns={effectiveColumns}\n defaultColumnProps={defaultColumnProps}\n groups={groups}\n sortStatus={sortStatus}\n sortIcons={sortIcons}\n onSortStatusChange={onSortStatusChange}\n selectionVisible={selectionColumnVisible}\n selectionChecked={allSelectableRecordsSelected}\n selectionIndeterminate={someRecordsSelected && !allSelectableRecordsSelected}\n onSelectionChange={handleHeaderSelectionChange}\n selectionCheckboxProps={allRecordsSelectionCheckboxProps}\n leftShadowVisible={selectionVisibleAndNotScrolledToLeft}\n />\n )}\n <tbody ref={bodyRef}>\n {recordsLength ? (\n records.map((record, index) => {\n const recordId = getRecordId(record, idAccessor);\n const isSelected = selectedRecordIds?.includes(recordId) || false;\n\n let handleSelectionChange: React.ChangeEventHandler<HTMLInputElement> | undefined;\n if (onSelectedRecordsChange && selectedRecords) {\n handleSelectionChange = (e) => {\n if ((e.nativeEvent as PointerEvent).shiftKey && lastSelectionChangeIndex !== null) {\n const targetRecords = records.filter(\n index > lastSelectionChangeIndex\n ? (rec, idx) =>\n idx >= lastSelectionChangeIndex &&\n idx <= index &&\n (isRecordSelectable ? isRecordSelectable(rec, idx) : true)\n : (rec, idx) =>\n idx >= index &&\n idx <= lastSelectionChangeIndex &&\n (isRecordSelectable ? isRecordSelectable(rec, idx) : true)\n );\n onSelectedRecordsChange(\n isSelected\n ? differenceBy(selectedRecords, targetRecords, (r) => getRecordId(r, idAccessor))\n : uniqBy([...selectedRecords, ...targetRecords], (r) => getRecordId(r, idAccessor))\n );\n } else {\n onSelectedRecordsChange(\n isSelected\n ? selectedRecords.filter((rec) => getRecordId(rec, idAccessor) !== recordId)\n : uniqBy([...selectedRecords, record], (rec) => getRecordId(rec, idAccessor))\n );\n }\n setLastSelectionChangeIndex(index);\n };\n }\n\n return (\n <DataTableRow<T>\n key={recordId as React.Key}\n record={record}\n index={index}\n columns={effectiveColumns}\n defaultColumnProps={defaultColumnProps}\n defaultColumnRender={defaultColumnRender}\n selectionVisible={selectionColumnVisible}\n selectionChecked={isSelected}\n onSelectionChange={handleSelectionChange}\n isRecordSelectable={isRecordSelectable}\n getSelectionCheckboxProps={getRecordSelectionCheckboxProps}\n onClick={onRowClick}\n onCellClick={onCellClick}\n onContextMenu={onRowContextMenu}\n onCellContextMenu={onCellContextMenu}\n expansion={rowExpansionInfo}\n color={rowColor}\n backgroundColor={rowBackgroundColor}\n className={rowClassName}\n style={rowStyle}\n customAttributes={customRowAttributes}\n leftShadowVisible={selectionVisibleAndNotScrolledToLeft}\n />\n );\n })\n ) : (\n <DataTableEmptyRow />\n )}\n </tbody>\n {effectiveColumns.some(({ footer }) => footer) && (\n <DataTableFooter<T>\n ref={footerRef}\n className={classNames?.footer}\n style={styles?.footer}\n columns={effectiveColumns}\n defaultColumnProps={defaultColumnProps}\n selectionVisible={selectionColumnVisible}\n leftShadowVisible={selectionVisibleAndNotScrolledToLeft}\n scrollDiff={tableHeight - scrollViewportHeight}\n />\n )}\n </Table>\n </DataTableScrollArea>\n {page && (\n <DataTablePagination\n ref={paginationRef}\n className={classNames?.pagination}\n style={styles?.pagination}\n horizontalSpacing={horizontalSpacing}\n fetching={fetching}\n page={page}\n onPageChange={handlePageChange}\n totalRecords={totalRecords}\n recordsPerPage={recordsPerPage}\n onRecordsPerPageChange={onRecordsPerPageChange}\n recordsPerPageOptions={recordsPerPageOptions}\n recordsPerPageLabel={recordsPerPageLabel}\n paginationWithEdges={paginationWithEdges}\n paginationActiveTextColor={paginationActiveTextColor}\n paginationActiveBackgroundColor={paginationActiveBackgroundColor}\n paginationSize={paginationSize}\n paginationText={paginationText}\n paginationWrapBreakpoint={paginationWrapBreakpoint}\n getPaginationControlProps={getPaginationControlProps}\n noRecordsText={noRecordsText}\n loadingText={loadingText}\n recordsLength={recordsLength}\n />\n )}\n <DataTableLoader\n pt={headerHeight}\n pb={paginationHeight}\n fetching={fetching}\n backgroundBlur={loaderBackgroundBlur}\n customContent={customLoader}\n size={loaderSize}\n type={loaderType}\n color={loaderColor}\n />\n <DataTableEmptyState\n pt={headerHeight}\n pb={paginationHeight}\n icon={noRecordsIcon}\n text={noRecordsText}\n active={!fetching && !recordsLength}\n >\n {emptyState}\n </DataTableEmptyState>\n </Box>\n );\n}\n","export function DataTableEmptyRow() {\n return (\n <tr className=\"mantine-datatable-empty-row\">\n <td />\n </tr>\n );\n}\n","import { Center, Text, type MantineSpacing, type StyleProp } from '@mantine/core';\nimport { IconDatabaseOff } from './icons/IconDatabaseOff';\n\ntype DataTableEmptyStateProps = React.PropsWithChildren<{\n icon: React.ReactNode | undefined;\n text: string;\n pt: StyleProp<MantineSpacing>;\n pb: StyleProp<MantineSpacing>;\n active: boolean;\n}>;\n\nexport function DataTableEmptyState({ icon, text, pt, pb, active, children }: DataTableEmptyStateProps) {\n return (\n <Center pt={pt} pb={pb} className=\"mantine-datatable-empty-state\" data-active={active || undefined}>\n {children || (\n <>\n {icon || (\n <div className=\"mantine-datatable-empty-state-icon\">\n <IconDatabaseOff />\n </div>\n )}\n <Text size=\"sm\" c=\"dimmed\">\n {text}\n </Text>\n </>\n )}\n </Center>\n );\n}\n","export function IconDatabaseOff() {\n return (\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <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\" />\n <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\" />\n <path d=\"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4\" />\n <path d=\"M3 3l18 18\" />\n </svg>\n );\n}\n","import { TableTfoot, TableTr, rem, type MantineStyleProp } from '@mantine/core';\nimport clsx from 'clsx';\nimport { forwardRef } from 'react';\nimport { DataTableFooterCell } from './DataTableFooterCell';\nimport { DataTableFooterSelectorPlaceholderCell } from './DataTableFooterSelectorPlaceholderCell';\nimport type { DataTableColumn, DataTableDefaultColumnProps } from './types';\n\ntype DataTableFooterProps<T> = {\n className: string | undefined;\n style: MantineStyleProp | undefined;\n columns: DataTableColumn<T>[];\n defaultColumnProps: DataTableDefaultColumnProps<T> | undefined;\n selectionVisible: boolean;\n leftShadowVisible: boolean;\n scrollDiff: number;\n};\n\nexport const DataTableFooter = forwardRef(function DataTableFooter<T>(\n {\n className,\n style,\n columns,\n defaultColumnProps,\n selectionVisible,\n leftShadowVisible,\n scrollDiff,\n }: DataTableFooterProps<T>,\n ref: React.ForwardedRef<HTMLTableSectionElement>\n) {\n const relative = scrollDiff < 0;\n return (\n <TableTfoot\n ref={ref}\n className={clsx('mantine-datatable-footer', className)}\n style={[\n {\n position: relative ? 'relative' : 'sticky',\n bottom: rem(relative ? scrollDiff : 0),\n },\n style,\n ]}\n >\n <TableTr>\n {selectionVisible && <DataTableFooterSelectorPlaceholderCell shadowVisible={leftShadowVisible} />}\n {columns.map(({ hidden, ...columnProps }) => {\n if (hidden) return null;\n\n const {\n accessor,\n visibleMediaQuery,\n textAlign,\n width,\n footer,\n footerClassName,\n footerStyle,\n noWrap,\n ellipsis,\n } = { ...defaultColumnProps, ...columnProps };\n\n return (\n <DataTableFooterCell<T>\n key={accessor as React.Key}\n className={footerClassName}\n style={footerStyle}\n visibleMediaQuery={visibleMediaQuery}\n textAlign={textAlign}\n width={width}\n title={footer}\n noWrap={noWrap}\n ellipsis={ellipsis}\n />\n );\n })}\n </TableTr>\n </TableTfoot>\n );\n}) as <T>(props: DataTableFooterProps<T> & { ref: React.ForwardedRef<HTMLTableSectionElement> }) => JSX.Element;\n","import { TableTh, type MantineStyleProp, type MantineTheme } from '@mantine/core';\nimport clsx from 'clsx';\nimport { useMediaQueryStringOrFunction } from './hooks';\nimport type { DataTableColumn } from './types';\nimport { ELLIPSIS, NOWRAP, TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, TEXT_ALIGN_RIGHT } from './utilityClasses';\n\ntype DataTableFooterCellProps<T> = {\n className: string | undefined;\n style: MantineStyleProp | undefined;\n visibleMediaQuery: string | ((theme: MantineTheme) => string) | undefined;\n title: React.ReactNode | undefined;\n} & Pick<DataTableColumn<T>, 'noWrap' | 'ellipsis' | 'textAlign' | 'width'>;\n\nexport function DataTableFooterCell<T>({\n className,\n style,\n visibleMediaQuery,\n title,\n noWrap,\n ellipsis,\n textAlign,\n width,\n}: DataTableFooterCellProps<T>) {\n if (!useMediaQueryStringOrFunction(visibleMediaQuery)) return null;\n return (\n <TableTh\n className={clsx(\n {\n [NOWRAP]: noWrap || ellipsis,\n [ELLIPSIS]: ellipsis,\n [TEXT_ALIGN_LEFT]: textAlign === 'left',\n [TEXT_ALIGN_CENTER]: textAlign === 'center',\n [TEXT_ALIGN_RIGHT]: textAlign === 'right',\n },\n className\n )}\n style={[\n {\n width,\n minWidth: width,\n maxWidth: width,\n },\n style,\n ]}\n >\n {title}\n </TableTh>\n );\n}\n","import { useResizeObserver } from '@mantine/hooks';\n\nexport function useElementOuterSize<T extends HTMLElement>() {\n const [ref] = useResizeObserver<T>();\n const { width, height } = ref.current?.getBoundingClientRect() || { width: 0, height: 0 };\n return { ref, width, height };\n}\n","import { useEffect, useLayoutEffect } from 'react';\n\nexport const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\n","import { useEffect, useState } from 'react';\n\nexport function useLastSelectionChangeIndex(recordIds: unknown[] | undefined) {\n const [lastSelectionChangeIndex, setLastSelectionChangeIndex] = useState<number | null>(null);\n const recordIdsString = recordIds?.join(':') || '';\n useEffect(() => {\n setLastSelectionChangeIndex(null);\n }, [recordIdsString]);\n\n return { lastSelectionChangeIndex, setLastSelectionChangeIndex };\n}\n","// Modified from https://github.com/mantinedev/mantine/blob/8c12a76c56da51af34213f18dd67c8b72a0ddb44/src/mantine-hooks/src/use-media-query/use-media-query.ts\n\nimport { useEffect, useRef, useState } from 'react';\n\nexport interface UseMediaQueryOptions {\n getInitialValueInEffect: boolean;\n}\n\n/**\n * Older versions of Safari (shipped with Catalina and before) do not support addEventListener on matchMedia\n * https://stackoverflow.com/questions/56466261/matchmedia-addlistener-marked-as-deprecated-addeventlistener-equivalent\n * */\nfunction attachMediaListeners(queries: MediaQueryList[], callback: (matches: boolean[]) => void) {\n const callbackWrapper = () => {\n callback(queries.map((query) => query.matches));\n };\n const subscriptions = queries.map((query) => {\n try {\n query.addEventListener('change', callbackWrapper);\n return () => query.removeEventListener('change', callbackWrapper);\n } catch (e) {\n query.addListener(callbackWrapper);\n return () => query.removeListener(callbackWrapper);\n }\n });\n return () => {\n subscriptions.forEach((unsubscribe) => unsubscribe());\n };\n}\n\nfunction getInitialValue(queries: string[], initialValues?: boolean[]) {\n if (initialValues) {\n return initialValues;\n }\n\n if (typeof window !== 'undefined' && 'matchMedia' in window) {\n return queries.map((query) => window.matchMedia(query).matches);\n }\n\n return queries.map(() => false);\n}\n\nexport function useMediaQueries(\n queries: string[],\n initialValues?: boolean[],\n { getInitialValueInEffect }: UseMediaQueryOptions = {\n getInitialValueInEffect: true,\n }\n) {\n const [matches, setMatches] = useState(\n getInitialValueInEffect ? initialValues : getInitialValue(queries, initialValues)\n );\n const queryRef = useRef<MediaQueryList[]>();\n\n useEffect(() => {\n if ('matchMedia' in window) {\n queryRef.current = queries.map((query) => window.matchMedia(query));\n setMatches(queryRef.current.map((queryResult) => queryResult.matches));\n return attachMediaListeners(queryRef.current, (event) => {\n setMatches(event);\n });\n }\n\n return undefined;\n }, [queries]);\n\n return matches;\n}\n","import { useMantineTheme, type MantineTheme } from '@mantine/core';\nimport { useMemo } from 'react';\nimport { useMediaQueries } from './useMediaQueries';\n\nexport function useMediaQueriesStringOrFunction(queries: (string | ((theme: MantineTheme) => string) | undefined)[]) {\n const theme = useMantineTheme();\n const values = useMemo(\n () => queries.map((query) => (typeof query === 'function' ? query(theme) : query) ?? ''),\n [queries, theme]\n );\n const defaults = useMemo(() => queries.map(() => true), [queries]);\n return useMediaQueries(values, defaults);\n}\n","import { useMantineTheme, type MantineTheme } from '@mantine/core';\nimport { useMediaQuery } from '@mantine/hooks';\n\nexport function useMediaQueryStringOrFunction(mediaQuery: string | ((theme: MantineTheme) => string) | undefined) {\n const theme = useMantineTheme();\n const mediaQueryValue = typeof mediaQuery === 'function' ? mediaQuery(theme) : mediaQuery;\n return useMediaQuery(mediaQueryValue || '', true);\n}\n","import { useState } from 'react';\nimport { DataTableRowExpansionProps } from '../types/DataTableRowExpansionProps';\nimport { getRecordId } from '../utils';\n\nexport function useRowExpansion<T>({\n rowExpansion,\n records,\n idAccessor,\n}: {\n rowExpansion?: DataTableRowExpansionProps<T>;\n records: T[] | undefined;\n idAccessor: (keyof T | (string & NonNullable<unknown>)) | ((record: T) => React.Key);\n}) {\n let initiallyExpandedRecordIds: unknown[] = [];\n if (rowExpansion && records) {\n const { trigger, allowMultiple, initiallyExpanded } = rowExpansion;\n if (records && trigger === 'always') {\n initiallyExpandedRecordIds = records.map((r) => getRecordId(r, idAccessor));\n } else if (initiallyExpanded) {\n initiallyExpandedRecordIds = records\n .filter((record, index) => initiallyExpanded({ record, index }))\n .map((r) => getRecordId(r, idAccessor));\n if (!allowMultiple) {\n initiallyExpandedRecordIds = [initiallyExpandedRecordIds[0]];\n }\n }\n }\n\n let expandedRecordIds: unknown[];\n let setExpandedRecordIds: ((expandedRecordIds: unknown[]) => void) | undefined;\n const expandedRecordIdsState = useState<unknown[]>(initiallyExpandedRecordIds);\n\n if (rowExpansion) {\n const { trigger, allowMultiple, collapseProps, content } = rowExpansion;\n if (rowExpansion.expanded) {\n ({ recordIds: expandedRecordIds, onRecordIdsChange: setExpandedRecordIds } = rowExpansion.expanded);\n } else {\n [expandedRecordIds, setExpandedRecordIds] = expandedRecordIdsState;\n }\n\n const collapseRow = (record: T) =>\n setExpandedRecordIds?.(expandedRecordIds.filter((id) => id !== getRecordId(record, idAccessor)));\n\n return {\n expandOnClick: trigger !== 'always' && trigger !== 'never',\n isRowExpanded: (record: T) =>\n trigger === 'always' ? true : expandedRecordIds.includes(getRecordId(record, idAccessor)),\n expandRow: (record: T) => {\n const recordId = getRecordId(record, idAccessor);\n setExpandedRecordIds?.(allowMultiple ? [...expandedRecordIds, recordId] : [recordId]);\n },\n collapseRow,\n collapseProps,\n content:\n ({ record, index }: { record: T; index: number }) =>\n () =>\n content({ record, index, collapse: () => collapseRow(record) }),\n };\n }\n}\n","/**\n * Utility function that returns a humanized version of a string, e.g. \"camelCase\" -> \"Camel Case\"\n */\nexport function humanize(value: string) {\n const str = value\n .replace(/([a-z\\d])([A-Z]+)/g, '$1 $2')\n .replace(/\\W|_/g, ' ')\n .trim()\n .toLowerCase();\n return `${str.charAt(0).toUpperCase()}${str.slice(1)}`;\n}\n\n/**\n * Utility function that returns an array of values that are present in the first array but not in the second\n */\nexport function differenceBy<T>(arr1: T[], arr2: T[], iteratee: (value: T) => unknown) {\n return arr1.filter((c) => !arr2.map(iteratee).includes(iteratee(c)));\n}\n\n/**\n * Utility function that returns an array of unique values from a given array\n */\nexport function uniqBy<T>(arr: T[], iteratee: (value: T) => unknown) {\n return arr.filter((x, i, self) => i === self.findIndex((y) => iteratee(x) === iteratee(y)));\n}\n\n/**\n * Utility function that returns the value at a given path in an object\n */\nexport function getValueAtPath<T>(obj: T, path: keyof T | (string & NonNullable<unknown>)) {\n if (!path) return undefined;\n const pathArray = (path as string).match(/([^[.\\]])+/g) as string[];\n return pathArray.reduce((prevObj: unknown, key) => prevObj && (prevObj as Record<string, unknown>)[key], obj);\n}\n\n/**\n * Utility function that returns the record id using idAccessor\n */\nexport function getRecordId<T>(\n record: T,\n idAccessor: keyof T | (string & NonNullable<unknown>) | ((record: T) => React.Key)\n) {\n return typeof idAccessor === 'string'\n ? getValueAtPath(record, idAccessor)\n : (idAccessor as (record: T) => React.Key)(record);\n}\n","import { useTimeout } from '@mantine/hooks';\nimport { useEffect, useState } from 'react';\n\nexport function useRowExpansionStatus(open: boolean, transitionDuration?: number) {\n const [expanded, setExpanded] = useState(open);\n const [visible, setVisible] = useState(open);\n\n const expand = useTimeout(() => setExpanded(true), 0);\n const hide = useTimeout(() => setVisible(false), transitionDuration || 200);\n\n useEffect(() => {\n if (open) {\n hide.clear();\n setVisible(true);\n expand.start();\n } else {\n expand.clear();\n setExpanded(false);\n hide.start();\n }\n }, [expand, hide, open]);\n\n return { expanded, visible };\n}\n","export const NOWRAP = 'mantine-datatable-nowrap';\nexport const ELLIPSIS = 'mantine-datatable-ellipsis';\nexport const POINTER_CURSOR = 'mantine-datatable-pointer-cursor';\nexport const TEXT_SELECTION_DISABLED = 'mantine-datatable-text-selection-disabled';\nexport const TEXT_ALIGN_LEFT = 'mantine-datatable-text-align-left';\nexport const TEXT_ALIGN_CENTER = 'mantine-datatable-text-align-center';\nexport const TEXT_ALIGN_RIGHT = 'mantine-datatable-text-align-right';\n","import { TableTh } from '@mantine/core';\n\ntype DataTableFooterSelectorPlaceholderCellProps = {\n shadowVisible: boolean;\n};\n\nexport function DataTableFooterSelectorPlaceholderCell({ shadowVisible }: DataTableFooterSelectorPlaceholderCellProps) {\n return (\n <TableTh\n className=\"mantine-datatable-footer-selector-placeholder-cell\"\n data-shadow-visible={shadowVisible || undefined}\n />\n );\n}\n","import { TableThead, TableTr, type CheckboxProps, type MantineStyleProp } from '@mantine/core';\nimport clsx from 'clsx';\nimport { forwardRef } from 'react';\nimport { DataTableColumnGroupHeaderCell } from './DataTableColumnGroupHeaderCell';\nimport { DataTableHeaderCell } from './DataTableHeaderCell';\nimport { DataTableHeaderSelectorCell } from './DataTableHeaderSelectorCell';\nimport type { DataTableColumn, DataTableColumnGroup, DataTableSortProps } from './types';\n\ntype DataTableHeaderProps<T> = {\n className: string | undefined;\n style?: MantineStyleProp;\n sortStatus: DataTableSortProps<T>['sortStatus'];\n sortIcons: DataTableSortProps<T>['sortIcons'];\n onSortStatusChange: DataTableSortProps<T>['onSortStatusChange'];\n columns: DataTableColumn<T>[];\n defaultColumnProps: Omit<DataTableColumn<T>, 'accessor'> | undefined;\n groups: readonly DataTableColumnGroup<T>[] | undefined;\n selectionVisible: boolean;\n selectionChecked: boolean;\n selectionIndeterminate: boolean;\n onSelectionChange: (() => void) | undefined;\n selectionCheckboxProps: CheckboxProps;\n leftShadowVisible: boolean;\n};\n\nexport const DataTableHeader = forwardRef(function DataTableHeader<T>(\n {\n className,\n style,\n sortStatus,\n sortIcons,\n onSortStatusChange,\n columns,\n defaultColumnProps,\n groups,\n selectionVisible,\n selectionChecked,\n selectionIndeterminate,\n onSelectionChange,\n selectionCheckboxProps,\n leftShadowVisible,\n }: DataTableHeaderProps<T>,\n ref: React.ForwardedRef<HTMLTableSectionElement>\n) {\n const allRecordsSelectorCell = selectionVisible ? (\n <DataTableHeaderSelectorCell\n shadowVisible={leftShadowVisible}\n checked={selectionChecked}\n indeterminate={selectionIndeterminate}\n checkboxProps={selectionCheckboxProps}\n onChange={onSelectionChange}\n rowSpan={groups ? 2 : undefined}\n />\n ) : null;\n\n return (\n <TableThead className={clsx('mantine-datatable-header', className)} style={style} ref={ref}>\n {groups && (\n <TableTr>\n {allRecordsSelectorCell}\n {groups.map((group) => (\n <DataTableColumnGroupHeaderCell key={group.id} group={group} />\n ))}\n </TableTr>\n )}\n <TableTr>\n {!groups && allRecordsSelectorCell}\n {columns.map(({ hidden, ...columnProps }) => {\n if (hidden) return null;\n\n const {\n accessor,\n visibleMediaQuery,\n textAlign,\n width,\n title,\n sortable,\n titleClassName,\n titleStyle,\n filter,\n filtering,\n } = { ...defaultColumnProps, ...columnProps };\n\n return (\n <DataTableHeaderCell<T>\n key={accessor as React.Key}\n accessor={accessor}\n className={titleClassName}\n style={titleStyle}\n visibleMediaQuery={visibleMediaQuery}\n textAlign={textAlign}\n width={width}\n title={title}\n sortable={sortable}\n sortStatus={sortStatus}\n sortIcons={sortIcons}\n onSortStatusChange={onSortStatusChange}\n filter={filter}\n filtering={filtering}\n />\n );\n })}\n </TableTr>\n </TableThead>\n );\n}) as <T>(props: DataTableHeaderProps<T> & { ref: React.ForwardedRef<HTMLTableSectionElement> }) => JSX.Element;\n","import { TableTh } from '@mantine/core';\nimport clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { useMediaQueriesStringOrFunction } from './hooks';\nimport type { DataTableColumnGroup } from './types';\nimport { TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, TEXT_ALIGN_RIGHT } from './utilityClasses';\nimport { humanize } from './utils';\n\ntype DataTableColumnGroupHeaderCellProps<T> = {\n group: DataTableColumnGroup<T>;\n};\n\nexport function DataTableColumnGroupHeaderCell<T>({\n group: { id, columns, title, textAlign, className, style },\n}: DataTableColumnGroupHeaderCellProps<T>) {\n const queries = useMemo(() => columns.map(({ visibleMediaQuery }) => visibleMediaQuery), [columns]);\n const visibles = useMediaQueriesStringOrFunction(queries);\n const colSpan = useMemo(\n () => columns.filter(({ hidden }, i) => !hidden && visibles?.[i]).length,\n [columns, visibles]\n );\n\n return colSpan > 0 ? (\n <TableTh\n colSpan={colSpan}\n className={clsx(\n {\n [TEXT_ALIGN_LEFT]: textAlign === 'left',\n [TEXT_ALIGN_CENTER]: textAlign === 'center',\n [TEXT_ALIGN_RIGHT]: textAlign === 'right',\n },\n className\n )}\n style={style}\n >\n {title ?? humanize(id)}\n </TableTh>\n ) : null;\n}\n","import { Box, Center, Group, MantineStyleProp, TableTh, type MantineTheme } from '@mantine/core';\nimport clsx from 'clsx';\nimport { DataTableHeaderCellFilter } from './DataTableHeaderCellFilter';\nimport { useMediaQueryStringOrFunction } from './hooks';\nimport { IconArrowUp } from './icons/IconArrowUp';\nimport { IconArrowsVertical } from './icons/IconArrowsVertical';\nimport type { DataTableColumn, DataTableSortProps } from './types';\nimport { ELLIPSIS, NOWRAP, TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, TEXT_ALIGN_RIGHT } from './utilityClasses';\nimport { humanize } from './utils';\n\ntype DataTableHeaderCellProps<T> = {\n className: string | undefined;\n style: MantineStyleProp | undefined;\n visibleMediaQuery: string | ((theme: MantineTheme) => string) | undefined;\n title: React.ReactNode | undefined;\n sortStatus: DataTableSortProps<T>['sortStatus'];\n sortIcons: DataTableSortProps<T>['sortIcons'];\n onSortStatusChange: DataTableSortProps<T>['onSortStatusChange'];\n} & Pick<DataTableColumn<T>, 'accessor' | 'sortable' | 'textAlign' | 'width' | 'filter' | 'filtering'>;\n\nexport function DataTableHeaderCell<T>({\n className,\n style,\n accessor,\n visibleMediaQuery,\n title,\n sortable,\n sortIcons,\n textAlign,\n width,\n sortStatus,\n onSortStatusChange,\n filter,\n filtering,\n}: DataTableHeaderCellProps<T>) {\n if (!useMediaQueryStringOrFunction(visibleMediaQuery)) return null;\n const text = title ?? humanize(accessor as string);\n const tooltip = typeof text === 'string' ? text : undefined;\n const sortAction =\n sortable && onSortStatusChange\n ? (e?: React.BaseSyntheticEvent) => {\n if (e?.defaultPrevented) return;\n\n onSortStatusChange({\n columnAccessor: accessor,\n direction:\n sortStatus?.columnAccessor === accessor\n ? sortStatus.direction === 'asc'\n ? 'desc'\n : 'asc'\n : sortStatus?.direction ?? 'asc',\n });\n }\n : undefined;\n return (\n <TableTh\n className={clsx(\n {\n 'mantine-datatable-header-cell-sortable': sortable,\n },\n className\n )}\n style={[{ width, minWidth: width, maxWidth: width }, style]}\n role={sortable ? 'button' : undefined}\n tabIndex={sortable ? 0 : undefined}\n onClick={sortAction}\n onKeyDown={(e) => e.key === 'Enter' && sortAction?.()}\n >\n <Group className=\"mantine-datatable-header-cell-sortable-group\" justify=\"space-between\" wrap=\"nowrap\">\n <Box\n className={clsx(\n 'mantine-datatable-header-cell-sortable-text',\n {\n [TEXT_ALIGN_LEFT]: textAlign === 'left',\n [TEXT_ALIGN_CENTER]: textAlign === 'center',\n [TEXT_ALIGN_RIGHT]: textAlign === 'right',\n },\n NOWRAP,\n ELLIPSIS\n )}\n title={tooltip}\n >\n {text}\n </Box>\n {sortable || sortStatus?.columnAccessor === accessor ? (\n <>\n {sortStatus?.columnAccessor === accessor ? (\n <Center\n className={clsx('mantine-datatable-header-cell-sortable-icon', {\n 'mantine-datatable-header-cell-sortable-icon-reversed': sortStatus.direction === 'desc',\n })}\n role=\"img\"\n aria-label={`Sorted ${sortStatus.direction === 'desc' ? 'descending' : 'ascending'}`}\n >\n {sortIcons?.sorted || <IconArrowUp />}\n </Center>\n ) : (\n <Center\n className=\"mantine-datatable-header-cell-sortable-unsorted-icon\"\n role=\"img\"\n aria-label=\"Not sorted\"\n >\n {sortIcons?.unsorted || <IconArrowsVertical />}\n </Center>\n )}\n </>\n ) : null}\n {filter ? <DataTableHeaderCellFilter isActive={!!filtering}>{filter}</DataTableHeaderCellFilter> : null}\n </Group>\n </TableTh>\n );\n}\n","import { ActionIcon, Popover, PopoverTarget } from '@mantine/core';\nimport { useDisclosure } from '@mantine/hooks';\nimport { IconFilter } from './icons/IconFilter';\nimport { IconFilterFilled } from './icons/IconFilterFilled';\nimport type { DataTableColumn } from './types';\n\ntype DataTableHeaderCellFilterProps<T> = {\n children: DataTableColumn<T>['filter'];\n isActive: boolean;\n};\n\nexport function DataTableHeaderCellFilter<T>({ children, isActive }: DataTableHeaderCellFilterProps<T>) {\n const [isOpen, { close, toggle }] = useDisclosure(false);\n const Icon = isActive ? IconFilterFilled : IconFilter;\n\n return (\n <Popover withArrow withinPortal shadow=\"md\" opened={isOpen} onClose={close} trapFocus>\n <PopoverTarget>\n <ActionIcon\n className=\"mantine-datatable-header-cell-filter-action-icon\"\n data-active={isActive || undefined}\n size=\"sm\"\n variant=\"default\"\n onClick={(e) => {\n e.preventDefault();\n toggle();\n }}\n >\n <Icon />\n </ActionIcon>\n </PopoverTarget>\n <Popover.Dropdown onClick={(e) => e.preventDefault()}>\n {typeof children === 'function' ? children({ close }) : children}\n </Popover.Dropdown>\n </Popover>\n );\n}\n","export function IconFilter() {\n return (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z\" />\n </svg>\n );\n}\n","export function IconFilterFilled() {\n return (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n d=\"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z\"\n strokeWidth=\"0\"\n fill=\"currentColor\"\n />\n </svg>\n );\n}\n","export function IconArrowUp() {\n return (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 5l0 14\" />\n <path d=\"M16 9l-4 -4\" />\n <path d=\"M8 9l4 -4\" />\n </svg>\n );\n}\n","export function IconArrowsVertical() {\n return (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M8 7l4 -4l4 4\" />\n <path d=\"M8 17l4 4l4 -4\" />\n <path d=\"M12 3l0 18\" />\n </svg>\n );\n}\n","import { Checkbox, TableTh, type CheckboxProps } from '@mantine/core';\nimport { POINTER_CURSOR } from './utilityClasses';\n\ntype DataTableHeaderSelectorCellProps = {\n shadowVisible: boolean;\n checked: boolean;\n indeterminate: boolean;\n checkboxProps: CheckboxProps;\n onChange: (() => void) | undefined;\n rowSpan: number | undefined;\n};\n\nexport function DataTableHeaderSelectorCell({\n shadowVisible,\n checked,\n indeterminate,\n checkboxProps,\n onChange,\n rowSpan,\n}: DataTableHeaderSelectorCellProps) {\n return (\n <TableTh\n className=\"mantine-datatable-header-selector-cell\"\n rowSpan={rowSpan}\n data-shadow-visible={shadowVisible || undefined}\n >\n <Checkbox\n classNames={{ input: POINTER_CURSOR }}\n checked={checked}\n indeterminate={indeterminate}\n onChange={onChange}\n {...checkboxProps}\n disabled={!(onChange || checkboxProps.onChange) || checkboxProps.disabled}\n />\n </TableTh>\n );\n}\n","import { Center, Loader, type MantineColor, type MantineLoader, type MantineSize } from '@mantine/core';\nimport clsx from 'clsx';\n\ntype DataTableLoaderProps = {\n pt: number;\n pb: number;\n fetching: boolean | undefined;\n customContent: React.ReactNode | undefined;\n backgroundBlur: number | undefined;\n size: MantineSize | (string & NonNullable<unknown>) | number | undefined;\n type: MantineLoader | undefined;\n color: MantineColor | undefined;\n};\n\nexport function DataTableLoader({\n pt,\n pb,\n fetching,\n customContent,\n backgroundBlur,\n size,\n type,\n color,\n}: DataTableLoaderProps) {\n return (\n <Center\n pt={pt}\n pb={pb}\n className={clsx('mantine-datatable-loader', { 'mantine-datatable-loader-fetching': fetching })}\n style={[{ backdropFilter: backgroundBlur ? `blur(${backgroundBlur}px)` : undefined }]}\n >\n {fetching && (customContent || <Loader size={size} type={type} color={color} />)}\n </Center>\n );\n}\n","import { Box, Pagination, Text, rem, type MantineSpacing, type MantineStyleProp } from '@mantine/core';\nimport clsx from 'clsx';\nimport { forwardRef, type ForwardedRef } from 'react';\nimport { DataTablePageSizeSelector } from './DataTablePageSizeSelector';\nimport { getPaginationCssVariables } from './cssVariables';\nimport { useMediaQueryStringOrFunction } from './hooks';\nimport type { DataTablePaginationProps } from './types';\nimport type { WithOptionalProperty, WithRequiredProperty } from './types/utils';\n\ntype DataTablePaginationComponentProps = WithOptionalProperty<\n WithRequiredProperty<\n DataTablePaginationProps,\n 'loadingText' | 'paginationSize' | 'recordsPerPageLabel' | 'paginationWrapBreakpoint' | 'getPaginationControlProps'\n >,\n 'onRecordsPerPageChange' | 'recordsPerPageOptions'\n> & {\n className: string | undefined;\n style: MantineStyleProp | undefined;\n fetching: boolean | undefined;\n recordsLength: number | undefined;\n horizontalSpacing: MantineSpacing | undefined;\n noRecordsText: string;\n};\n\nexport const DataTablePagination = forwardRef(function DataTablePagination(\n {\n className,\n style,\n fetching,\n page,\n onPageChange,\n paginationWithEdges,\n paginationActiveTextColor,\n paginationActiveBackgroundColor,\n paginationSize,\n loadingText,\n noRecordsText,\n paginationText,\n totalRecords,\n recordsPerPage,\n onRecordsPerPageChange,\n recordsPerPageLabel,\n recordsPerPageOptions,\n recordsLength,\n horizontalSpacing,\n paginationWrapBreakpoint,\n getPaginationControlProps,\n }: DataTablePaginationComponentProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n let paginationTextValue: React.ReactNode;\n if (fetching) {\n paginationTextValue = loadingText;\n } else if (!totalRecords) {\n paginationTextValue = noRecordsText;\n } else {\n const from = (page! - 1) * recordsPerPage! + 1;\n const to = from + recordsLength! - 1;\n paginationTextValue = paginationText!({ from, to, totalRecords });\n }\n\n const isAbovePaginationWrapBreakpoint = useMediaQueryStringOrFunction(\n ({ breakpoints }) =>\n `(min-width: ${\n typeof paginationWrapBreakpoint === 'number'\n ? `${rem(paginationWrapBreakpoint)}rem`\n : breakpoints[paginationWrapBreakpoint] || paginationWrapBreakpoint\n })`\n );\n\n return (\n <Box\n ref={ref}\n px={horizontalSpacing ?? 'xs'}\n py=\"xs\"\n className={clsx('mantine-datatable-pagination', className)}\n style={[{ flexDirection: isAbovePaginationWrapBreakpoint ? 'row' : 'column' }, style]}\n >\n <Text className=\"mantine-datatable-pagination-text\" size={paginationSize}>\n {paginationTextValue}\n </Text>\n {recordsPerPageOptions && (\n <DataTablePageSizeSelector\n activeTextColor={paginationActiveTextColor}\n activeBackgroundColor={paginationActiveBackgroundColor}\n size={paginationSize}\n label={recordsPerPageLabel}\n values={recordsPerPageOptions}\n value={recordsPerPage!}\n onChange={onRecordsPerPageChange!}\n />\n )}\n <Pagination\n classNames={{\n root: clsx('mantine-datatable-pagination-pages', {\n 'mantine-datatable-pagination-pages-fetching': fetching || !recordsLength,\n }),\n control: 'mantine-datatable-pagination-pages-control',\n }}\n style={\n paginationActiveTextColor || paginationActiveBackgroundColor\n ? (theme) =>\n getPaginationCssVariables({ theme, paginationActiveTextColor, paginationActiveBackgroundColor })\n : undefined\n }\n withEdges={paginationWithEdges}\n value={page}\n onChange={onPageChange}\n size={paginationSize}\n total={Math.ceil(totalRecords! / recordsPerPage!)}\n getControlProps={getPaginationControlProps}\n />\n </Box>\n );\n}) as (props: DataTablePaginationComponentProps & { ref: ForwardedRef<HTMLDivElement> }) => JSX.Element;\n","import {\n Button,\n Group,\n MantineColor,\n Menu,\n MenuDropdown,\n MenuItem,\n MenuTarget,\n Text,\n rem,\n type MantineSize,\n} from '@mantine/core';\nimport clsx from 'clsx';\nimport { getPaginationCssVariables } from './cssVariables';\nimport { IconSelector } from './icons/IconSelector';\n\ntype DataTablePageSizeSelectorComponentProps = {\n size: MantineSize;\n label: string;\n values: number[];\n value: number;\n activeTextColor: MantineColor | { dark: MantineColor; light: MantineColor } | undefined;\n activeBackgroundColor: MantineColor | { dark: MantineColor; light: MantineColor } | undefined;\n onChange: (value: number) => void;\n};\n\nconst HEIGHT: Record<MantineSize, string> = { xs: rem(22), sm: rem(26), md: rem(32), lg: rem(38), xl: rem(44) };\n\nexport function DataTablePageSizeSelector({\n size,\n label,\n values,\n value,\n activeTextColor,\n activeBackgroundColor,\n onChange,\n}: DataTablePageSizeSelectorComponentProps) {\n return (\n <Group gap=\"xs\">\n <Text size={size}>{label}</Text>\n <Menu withinPortal withArrow>\n <MenuTarget>\n <Button\n size={size}\n variant=\"default\"\n classNames={{ section: 'mantine-datatable-page-size-selector-button-icon' }}\n rightSection={<IconSelector />}\n style={[\n { fontWeight: 'normal' },\n (theme) => ({\n height: HEIGHT[size],\n paddingLeft: theme.spacing[size],\n paddingRight: theme.spacing[size],\n }),\n ]}\n >\n {value}\n </Button>\n </MenuTarget>\n <MenuDropdown>\n {values.map((v) => {\n const isCurrent = v === value;\n return (\n <MenuItem\n key={v}\n className={clsx({ 'mantine-datatable-page-size-selector-active': isCurrent })}\n style={[\n { height: HEIGHT[size] },\n isCurrent && (activeTextColor || activeBackgroundColor)\n ? (theme) =>\n getPaginationCssVariables({\n theme,\n paginationActiveTextColor: activeTextColor,\n paginationActiveBackgroundColor: activeBackgroundColor,\n })\n : undefined,\n ]}\n disabled={isCurrent}\n onClick={() => onChange(v)}\n >\n <Text size={size}>{v}</Text>\n </MenuItem>\n );\n })}\n </MenuDropdown>\n </Menu>\n </Group>\n );\n}\n","import { parseThemeColor, type MantineColor, type MantineTheme } from '@mantine/core';\nimport type { DataTableProps } from './types';\n\nexport function getColor(\n color: MantineColor | undefined | { light: MantineColor; dark: MantineColor },\n theme: MantineTheme,\n colorScheme: 'light' | 'dark'\n) {\n return color\n ? parseThemeColor({\n color: typeof color === 'object' ? color[colorScheme] : color,\n theme,\n }).value\n : undefined;\n}\n\nexport function getTableCssVariables({\n theme,\n c,\n backgroundColor,\n borderColor,\n rowBorderColor,\n stripedColor,\n highlightOnHoverColor,\n}: Pick<\n DataTableProps,\n 'c' | 'backgroundColor' | 'borderColor' | 'rowBorderColor' | 'stripedColor' | 'highlightOnHoverColor'\n> & {\n theme: MantineTheme;\n}) {\n return {\n '--mantine-datatable-color-light': getColor(c, theme, 'light'),\n '--mantine-datatable-color-dark': getColor(c, theme, 'dark'),\n\n '--mantine-datatable-background-color-light': getColor(backgroundColor, theme, 'light'),\n '--mantine-datatable-background-color-dark': getColor(backgroundColor, theme, 'dark'),\n\n '--mantine-datatable-border-color-light': getColor(borderColor, theme, 'light'),\n '--mantine-datatable-border-color-dark': getColor(borderColor, theme, 'dark'),\n\n '--mantine-datatable-row-border-color-light': getColor(rowBorderColor, theme, 'light'),\n '--mantine-datatable-row-border-color-dark': getColor(rowBorderColor, theme, 'dark'),\n\n '--mantine-datatable-striped-color-light': getColor(stripedColor, theme, 'light'),\n '--mantine-datatable-striped-color-dark': getColor(stripedColor, theme, 'dark'),\n\n '--mantine-datatable-highlight-on-hover-color-light': getColor(highlightOnHoverColor, theme, 'light'),\n '--mantine-datatable-highlight-on-hover-color-dark': getColor(highlightOnHoverColor, theme, 'dark'),\n };\n}\n\nexport function getPaginationCssVariables({\n theme,\n paginationActiveTextColor,\n paginationActiveBackgroundColor,\n}: Pick<DataTableProps, 'paginationActiveTextColor' | 'paginationActiveBackgroundColor'> & {\n theme: MantineTheme;\n}) {\n return {\n '--mantine-datatable-pagination-active-text-color-light': getColor(paginationActiveTextColor, theme, 'light'),\n '--mantine-datatable-pagination-active-text-color-dark': getColor(paginationActiveTextColor, theme, 'dark'),\n\n '--mantine-datatable-pagination-active-background-color-light': getColor(\n paginationActiveBackgroundColor,\n theme,\n 'light'\n ),\n '--mantine-datatable-pagination-active-background-color-dark': getColor(\n paginationActiveBackgroundColor,\n theme,\n 'dark'\n ),\n };\n}\n\nexport function getRowCssVariables({\n theme,\n color,\n backgroundColor,\n}: {\n theme: MantineTheme;\n color: MantineColor | undefined | { light: MantineColor; dark: MantineColor };\n backgroundColor: MantineColor | undefined | { light: MantineColor; dark: MantineColor };\n}) {\n return {\n '--mantine-datatable-row-color-light': getColor(color, theme, 'light'),\n '--mantine-datatable-row-color-dark': getColor(color, theme, 'dark'),\n '--mantine-datatable-row-background-color-light': getColor(backgroundColor, theme, 'light'),\n '--mantine-datatable-row-background-color-dark': getColor(backgroundColor, theme, 'dark'),\n };\n}\n","export function IconSelector() {\n return (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M8 9l4 -4l4 4\" />\n <path d=\"M16 15l-4 4l-4 -4\" />\n </svg>\n );\n}\n","import { TableTr, type CheckboxProps, type MantineColor, type MantineStyleProp } from '@mantine/core';\nimport clsx from 'clsx';\nimport { DataTableRowCell } from './DataTableRowCell';\nimport { DataTableRowExpansion } from './DataTableRowExpansion';\nimport { DataTableRowSelectorCell } from './DataTableRowSelectorCell';\nimport { getRowCssVariables } from './cssVariables';\nimport { useRowExpansion } from './hooks';\nimport type {\n DataTableCellClickHandler,\n DataTableColumn,\n DataTableDefaultColumnProps,\n DataTableRowClickHandler,\n} from './types';\nimport { POINTER_CURSOR } from './utilityClasses';\n\ntype DataTableRowProps<T> = {\n record: T;\n index: number;\n columns: DataTableColumn<T>[];\n defaultColumnProps: DataTableDefaultColumnProps<T> | undefined;\n defaultColumnRender:\n | ((record: T, index: number, accessor: keyof T | (string & NonNullable<unknown>)) => React.ReactNode)\n | undefined;\n selectionVisible: boolean;\n selectionChecked: boolean;\n onSelectionChange: React.ChangeEventHandler<HTMLInputElement> | undefined;\n isRecordSelectable: ((record: T, index: number) => boolean) | undefined;\n getSelectionCheckboxProps: (record: T, index: number) => CheckboxProps;\n onClick: DataTableRowClickHandler<T> | undefined;\n onContextMenu: DataTableRowClickHandler<T> | undefined;\n onCellClick: DataTableCellClickHandler<T> | undefined;\n onCellContextMenu: DataTableCellClickHandler<T> | undefined;\n expansion: ReturnType<typeof useRowExpansion<T>>;\n customAttributes?: (record: T, index: number) => Record<string, unknown>;\n color:\n | ((record: T, index: number) => MantineColor | undefined | { light: MantineColor; dark: MantineColor })\n | undefined;\n backgroundColor:\n | ((record: T, index: number) => MantineColor | undefined | { light: MantineColor; dark: MantineColor })\n | undefined;\n className?: string | ((record: T, index: number) => string | undefined);\n style?: (record: T, index: number) => MantineStyleProp | undefined;\n leftShadowVisible: boolean;\n};\n\nexport function DataTableRow<T>({\n record,\n index,\n columns,\n defaultColumnProps,\n defaultColumnRender,\n selectionVisible,\n selectionChecked,\n onSelectionChange,\n isRecordSelectable,\n getSelectionCheckboxProps,\n onClick,\n onContextMenu,\n onCellClick,\n onCellContextMenu,\n expansion,\n customAttributes,\n color,\n backgroundColor,\n className,\n style,\n leftShadowVisible,\n}: DataTableRowProps<T>) {\n return (\n <>\n <TableTr\n className={clsx(\n 'mantine-datatable-row',\n { [POINTER_CURSOR]: onClick || expansion?.expandOnClick },\n typeof className === 'function' ? className(record, index) : className\n )}\n data-selected={selectionChecked || undefined}\n onClick={(e) => {\n if (expansion) {\n const { isRowExpanded, expandOnClick, expandRow, collapseRow } = expansion;\n if (expandOnClick) {\n if (isRowExpanded(record)) {\n collapseRow(record);\n } else {\n expandRow(record);\n }\n }\n }\n onClick?.({ event: e, record, index });\n }}\n onContextMenu={onContextMenu ? (e) => onContextMenu({ event: e, record, index }) : undefined}\n style={[\n color || backgroundColor\n ? (theme) => {\n const colorValue = color?.(record, index);\n const backgroundColorValue = backgroundColor?.(record, index);\n return getRowCssVariables({ theme, color: colorValue, backgroundColor: backgroundColorValue });\n }\n : undefined,\n style?.(record, index),\n ]}\n {...customAttributes?.(record, index)}\n >\n {selectionVisible && (\n <DataTableRowSelectorCell<T>\n record={record}\n index={index}\n withRightShadow={leftShadowVisible}\n checked={selectionChecked}\n disabled={!onSelectionChange || (isRecordSelectable ? !isRecordSelectable(record, index) : false)}\n onChange={onSelectionChange}\n getCheckboxProps={getSelectionCheckboxProps}\n />\n )}\n {columns.map(({ hidden, ...columnProps }, columnIndex) => {\n if (hidden) return null;\n\n const {\n accessor,\n visibleMediaQuery,\n textAlign,\n noWrap,\n ellipsis,\n width,\n render,\n cellsClassName,\n cellsStyle,\n customCellAttributes,\n } = { ...defaultColumnProps, ...columnProps };\n\n return (\n <DataTableRowCell<T>\n key={accessor as React.Key}\n className={typeof cellsClassName === 'function' ? cellsClassName(record, index) : cellsClassName}\n style={cellsStyle?.(record, index)}\n visibleMediaQuery={visibleMediaQuery}\n record={record}\n index={index}\n onClick={\n onCellClick\n ? (event) => onCellClick({ event, record, index, column: columnProps, columnIndex })\n : undefined\n }\n onContextMenu={\n onCellContextMenu\n ? (event) => onCellContextMenu({ event, record, index, column: columnProps, columnIndex })\n : undefined\n }\n accessor={accessor}\n textAlign={textAlign}\n noWrap={noWrap}\n ellipsis={ellipsis}\n width={width}\n render={render}\n defaultRender={defaultColumnRender}\n customCellAttributes={customCellAttributes}\n />\n );\n })}\n </TableTr>\n {expansion && (\n <DataTableRowExpansion\n colSpan={columns.filter(({ hidden }) => !hidden).length + (selectionVisible ? 1 : 0)}\n open={expansion.isRowExpanded(record)}\n content={expansion.content({ record, index })}\n collapseProps={expansion.collapseProps}\n />\n )}\n </>\n );\n}\n","import { TableTd, type MantineStyleProp } from '@mantine/core';\nimport clsx from 'clsx';\nimport { useMediaQueryStringOrFunction } from './hooks';\nimport type { DataTableColumn } from './types';\nimport {\n ELLIPSIS,\n NOWRAP,\n POINTER_CURSOR,\n TEXT_ALIGN_CENTER,\n TEXT_ALIGN_LEFT,\n TEXT_ALIGN_RIGHT,\n} from './utilityClasses';\nimport { getValueAtPath } from './utils';\n\ntype DataTableRowCellProps<T> = {\n className: string | undefined;\n style: MantineStyleProp | undefined;\n record: T;\n index: number;\n defaultRender:\n | ((record: T, index: number, accessor: keyof T | (string & NonNullable<unknown>)) => React.ReactNode)\n | undefined;\n onClick: React.MouseEventHandler<HTMLTableCellElement> | undefined;\n onContextMenu: React.MouseEventHandler<HTMLTableCellElement> | undefined;\n} & Pick<\n DataTableColumn<T>,\n 'accessor' | 'visibleMediaQuery' | 'textAlign' | 'width' | 'noWrap' | 'ellipsis' | 'render' | 'customCellAttributes'\n>;\n\nexport function DataTableRowCell<T>({\n className,\n style,\n visibleMediaQuery,\n record,\n index,\n onClick,\n onContextMenu,\n noWrap,\n ellipsis,\n textAlign,\n width,\n accessor,\n render,\n defaultRender,\n customCellAttributes,\n}: DataTableRowCellProps<T>) {\n if (!useMediaQueryStringOrFunction(visibleMediaQuery)) return null;\n return (\n <TableTd\n className={clsx(\n {\n [NOWRAP]: noWrap || ellipsis,\n [ELLIPSIS]: ellipsis,\n [POINTER_CURSOR]: onClick,\n [TEXT_ALIGN_LEFT]: textAlign === 'left',\n [TEXT_ALIGN_CENTER]: textAlign === 'center',\n [TEXT_ALIGN_RIGHT]: textAlign === 'right',\n },\n className\n )}\n style={[\n {\n width,\n minWidth: width,\n maxWidth: width,\n },\n style,\n ]}\n onClick={onClick}\n onContextMenu={onContextMenu}\n {...customCellAttributes?.(record, index)}\n >\n {render\n ? render(record, index)\n : defaultRender\n ? defaultRender(record, index, accessor)\n : (getValueAtPath(record, accessor) as React.ReactNode)}\n </TableTd>\n );\n}\n","import { Collapse, TableTd, TableTr } from '@mantine/core';\nimport { useRowExpansionStatus } from './hooks';\nimport type { DataTableRowExpansionCollapseProps } from './types';\n\ntype DataTableRowExpansionProps = {\n open: boolean;\n colSpan: number;\n content: () => React.ReactNode;\n collapseProps: DataTableRowExpansionCollapseProps | undefined;\n};\n\nexport function DataTableRowExpansion({ open, colSpan, content, collapseProps }: DataTableRowExpansionProps) {\n const { expanded, visible } = useRowExpansionStatus(open, collapseProps?.transitionDuration);\n\n return visible ? (\n <>\n {/* add an empty row to maintain striped rows consistency */}\n <TableTr />\n <TableTr>\n <TableTd className=\"mantine-datatable-row-expansion-cell\" colSpan={colSpan}>\n <Collapse in={expanded} {...collapseProps}>\n <div className=\"mantine-datatable-row-expansion-cell-content\">{content()}</div>\n </Collapse>\n </TableTd>\n </TableTr>\n </>\n ) : null;\n}\n","import { Checkbox, TableTd, type CheckboxProps } from '@mantine/core';\nimport { POINTER_CURSOR } from './utilityClasses';\n\ntype DataTableRowSelectorCellProps<T> = {\n record: T;\n index: number;\n withRightShadow: boolean;\n checked: boolean;\n disabled: boolean;\n onChange: React.ChangeEventHandler<HTMLInputElement> | undefined;\n getCheckboxProps: (record: T, index: number) => CheckboxProps;\n};\n\nexport function DataTableRowSelectorCell<T>({\n record,\n index,\n withRightShadow,\n getCheckboxProps,\n ...otherProps\n}: DataTableRowSelectorCellProps<T>) {\n return (\n <TableTd\n className=\"mantine-datatable-row-selector-cell\"\n data-shadow-visible={withRightShadow || undefined}\n onClick={(e) => e.stopPropagation()}\n >\n <Checkbox classNames={{ input: POINTER_CURSOR }} {...otherProps} {...getCheckboxProps(record, index)} />\n </TableTd>\n );\n}\n","import { Box, ScrollArea, rem, type ScrollAreaProps } from '@mantine/core';\nimport clsx from 'clsx';\n\ntype DataTableScrollAreaProps = React.PropsWithChildren<{\n topShadowVisible: boolean;\n leftShadowVisible: boolean;\n leftShadowBehind: boolean;\n rightShadowVisible: boolean;\n bottomShadowVisible: boolean;\n headerHeight: number;\n footerHeight: number;\n onScrollPositionChange: ScrollAreaProps['onScrollPositionChange'];\n viewportRef: React.Ref<HTMLDivElement>;\n scrollAreaProps: Omit<ScrollAreaProps, 'classNames' | 'styles' | 'onScrollPositionChange'> | undefined;\n}>;\n\nexport function DataTableScrollArea({\n topShadowVisible,\n leftShadowVisible,\n leftShadowBehind,\n rightShadowVisible,\n bottomShadowVisible,\n headerHeight,\n footerHeight,\n onScrollPositionChange,\n children,\n viewportRef,\n scrollAreaProps,\n}: DataTableScrollAreaProps) {\n return (\n <ScrollArea\n {...scrollAreaProps}\n viewportRef={viewportRef}\n classNames={{\n root: 'mantine-datatable-scroll-area',\n scrollbar: 'mantine-datatable-scroll-area-scrollbar',\n thumb: 'mantine-datatable-scroll-area-thumb',\n corner: 'mantine-datatable-scroll-area-corner',\n }}\n onScrollPositionChange={onScrollPositionChange}\n >\n {children}\n <Box\n className={clsx('mantine-datatable-scroll-area-shadow', 'mantine-datatable-scroll-area-top-shadow', {\n 'mantine-datatable-scroll-area-shadow-visible': topShadowVisible,\n })}\n style={{ top: headerHeight ? rem(headerHeight) : 0 }}\n />\n <div\n className={clsx('mantine-datatable-scroll-area-shadow', 'mantine-datatable-scroll-area-left-shadow', {\n 'mantine-datatable-scroll-area-shadow-visible': leftShadowVisible,\n 'mantine-datatable-scroll-area-left-shadow-behind': leftShadowBehind,\n })}\n />\n <div\n className={clsx('mantine-datatable-scroll-area-shadow', 'mantine-datatable-scroll-area-right-shadow', {\n 'mantine-datatable-scroll-area-shadow-visible': rightShadowVisible,\n })}\n />\n <Box\n className={clsx('mantine-datatable-scroll-area-shadow', 'mantine-datatable-scroll-area-bottom-shadow', {\n 'mantine-datatable-scroll-area-shadow-visible': bottomShadowVisible,\n })}\n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AAkB,EAEvB,EACCjE,GAAiB,KAAK,CAAC,CAAE,OAAAkE,CAAO,IAAMA,CAAM,MAC3C,OAACC,GAAA,CACC,IAAK5D,GACL,UAAWf,IAAY,OACvB,MAAOE,IAAQ,OACf,QAASM,GACT,mBAAoBpF,EACpB,iBAAkBwH,GAClB,kBAAmBa,GACnB,WAAY3C,GAAcR,GAC5B,GAEJ,EACF,EACCnE,MACC,OAACyI,GAAA,CACC,IAAK3D,GACL,UAAWjB,IAAY,WACvB,MAAOE,IAAQ,WACf,kBAAmBhE,EACnB,SAAUjB,EACV,KAAMkB,EACN,aAAcoG,GACd,aAAclG,EACd,eAAgBC,EAChB,uBAAwBC,GACxB,sBAAuBC,GACvB,oBAAqBC,GACrB,oBAAqBC,GACrB,0BAA2BC,GAC3B,gCAAiCC,GACjC,eAAgBC,GAChB,eAAgBC,GAChB,yBAA0BG,GAC1B,0BAA2BC,GAC3B,cAAeS,GACf,YAAaF,GACb,cAAe+E,GACjB,KAEF,OAACqC,GAAA,CACC,GAAIlE,GACJ,GAAIO,GACJ,SAAUjG,EACV,eAAgBmC,GAChB,cAAeC,GACf,KAAMC,GACN,KAAMC,GACN,MAAOC,GACT,KACA,OAACsH,GAAA,CACC,GAAInE,GACJ,GAAIO,GACJ,KAAMtD,GACN,KAAMD,GACN,OAAQ,CAAC1C,GAAY,CAACuH,GAErB,SAAA9E,GACH,GACF,CAEJ","names":["package_exports","__export","DataTable","differenceBy","getRecordId","getValueAtPath","humanize","uniqBy","__toCommonJS","import_core","import_hooks","import_clsx","import_react","import_jsx_runtime","DataTableEmptyRow","import_core","import_jsx_runtime","IconDatabaseOff","import_jsx_runtime","DataTableEmptyState","icon","text","pt","pb","active","children","IconDatabaseOff","import_core","import_clsx","import_react","import_core","import_clsx","import_hooks","useElementOuterSize","ref","width","height","import_react","useIsomorphicLayoutEffect","import_react","useLastSelectionChangeIndex","recordIds","lastSelectionChangeIndex","setLastSelectionChangeIndex","recordIdsString","import_react","attachMediaListeners","queries","callback","callbackWrapper","query","subscriptions","unsubscribe","getInitialValue","initialValues","useMediaQueries","getInitialValueInEffect","matches","setMatches","queryRef","queryResult","event","import_core","import_react","useMediaQueriesStringOrFunction","queries","theme","values","query","defaults","useMediaQueries","import_core","import_hooks","useMediaQueryStringOrFunction","mediaQuery","theme","mediaQueryValue","import_react","humanize","value","str","differenceBy","arr1","arr2","iteratee","c","uniqBy","arr","x","i","self","y","getValueAtPath","obj","path","prevObj","key","getRecordId","record","idAccessor","useRowExpansion","rowExpansion","records","idAccessor","initiallyExpandedRecordIds","trigger","allowMultiple","initiallyExpanded","r","getRecordId","record","index","expandedRecordIds","setExpandedRecordIds","expandedRecordIdsState","collapseProps","content","collapseRow","id","recordId","import_hooks","import_react","useRowExpansionStatus","open","transitionDuration","expanded","setExpanded","visible","setVisible","expand","hide","NOWRAP","ELLIPSIS","POINTER_CURSOR","TEXT_SELECTION_DISABLED","TEXT_ALIGN_LEFT","TEXT_ALIGN_CENTER","TEXT_ALIGN_RIGHT","import_jsx_runtime","DataTableFooterCell","className","style","visibleMediaQuery","title","noWrap","ellipsis","textAlign","width","useMediaQueryStringOrFunction","clsx","NOWRAP","ELLIPSIS","TEXT_ALIGN_LEFT","TEXT_ALIGN_CENTER","TEXT_ALIGN_RIGHT","import_core","import_jsx_runtime","DataTableFooterSelectorPlaceholderCell","shadowVisible","import_jsx_runtime","DataTableFooter","className","style","columns","defaultColumnProps","selectionVisible","leftShadowVisible","scrollDiff","ref","relative","clsx","DataTableFooterSelectorPlaceholderCell","hidden","columnProps","accessor","visibleMediaQuery","textAlign","width","footer","footerClassName","footerStyle","noWrap","ellipsis","DataTableFooterCell","import_core","import_clsx","import_react","import_core","import_clsx","import_react","import_jsx_runtime","DataTableColumnGroupHeaderCell","id","columns","title","textAlign","className","style","queries","visibleMediaQuery","visibles","useMediaQueriesStringOrFunction","colSpan","hidden","i","clsx","TEXT_ALIGN_LEFT","TEXT_ALIGN_CENTER","TEXT_ALIGN_RIGHT","humanize","import_core","import_clsx","import_core","import_hooks","import_jsx_runtime","IconFilter","import_jsx_runtime","IconFilterFilled","import_jsx_runtime","DataTableHeaderCellFilter","children","isActive","isOpen","close","toggle","e","IconFilterFilled","IconFilter","import_jsx_runtime","IconArrowUp","import_jsx_runtime","IconArrowsVertical","import_jsx_runtime","DataTableHeaderCell","className","style","accessor","visibleMediaQuery","title","sortable","sortIcons","textAlign","width","sortStatus","onSortStatusChange","filter","filtering","useMediaQueryStringOrFunction","text","humanize","tooltip","sortAction","e","clsx","TEXT_ALIGN_LEFT","TEXT_ALIGN_CENTER","TEXT_ALIGN_RIGHT","NOWRAP","ELLIPSIS","IconArrowUp","IconArrowsVertical","DataTableHeaderCellFilter","import_core","import_jsx_runtime","DataTableHeaderSelectorCell","shadowVisible","checked","indeterminate","checkboxProps","onChange","rowSpan","POINTER_CURSOR","import_jsx_runtime","DataTableHeader","className","style","sortStatus","sortIcons","onSortStatusChange","columns","defaultColumnProps","groups","selectionVisible","selectionChecked","selectionIndeterminate","onSelectionChange","selectionCheckboxProps","leftShadowVisible","ref","allRecordsSelectorCell","DataTableHeaderSelectorCell","clsx","group","DataTableColumnGroupHeaderCell","hidden","columnProps","accessor","visibleMediaQuery","textAlign","width","title","sortable","titleClassName","titleStyle","filter","filtering","DataTableHeaderCell","import_core","import_clsx","import_jsx_runtime","DataTableLoader","pt","pb","fetching","customContent","backgroundBlur","size","type","color","clsx","import_core","import_clsx","import_react","import_core","import_clsx","import_core","getColor","color","theme","colorScheme","getTableCssVariables","c","backgroundColor","borderColor","rowBorderColor","stripedColor","highlightOnHoverColor","getPaginationCssVariables","paginationActiveTextColor","paginationActiveBackgroundColor","getRowCssVariables","import_jsx_runtime","IconSelector","import_jsx_runtime","HEIGHT","DataTablePageSizeSelector","size","label","values","value","activeTextColor","activeBackgroundColor","onChange","IconSelector","theme","v","isCurrent","clsx","getPaginationCssVariables","import_jsx_runtime","DataTablePagination","className","style","fetching","page","onPageChange","paginationWithEdges","paginationActiveTextColor","paginationActiveBackgroundColor","paginationSize","loadingText","noRecordsText","paginationText","totalRecords","recordsPerPage","onRecordsPerPageChange","recordsPerPageLabel","recordsPerPageOptions","recordsLength","horizontalSpacing","paginationWrapBreakpoint","getPaginationControlProps","ref","paginationTextValue","from","to","isAbovePaginationWrapBreakpoint","useMediaQueryStringOrFunction","breakpoints","clsx","DataTablePageSizeSelector","theme","getPaginationCssVariables","import_core","import_clsx","import_core","import_clsx","import_jsx_runtime","DataTableRowCell","className","style","visibleMediaQuery","record","index","onClick","onContextMenu","noWrap","ellipsis","textAlign","width","accessor","render","defaultRender","customCellAttributes","useMediaQueryStringOrFunction","clsx","NOWRAP","ELLIPSIS","POINTER_CURSOR","TEXT_ALIGN_LEFT","TEXT_ALIGN_CENTER","TEXT_ALIGN_RIGHT","getValueAtPath","import_core","import_jsx_runtime","DataTableRowExpansion","open","colSpan","content","collapseProps","expanded","visible","useRowExpansionStatus","import_core","import_jsx_runtime","DataTableRowSelectorCell","record","index","withRightShadow","getCheckboxProps","otherProps","e","POINTER_CURSOR","import_jsx_runtime","DataTableRow","record","index","columns","defaultColumnProps","defaultColumnRender","selectionVisible","selectionChecked","onSelectionChange","isRecordSelectable","getSelectionCheckboxProps","onClick","onContextMenu","onCellClick","onCellContextMenu","expansion","customAttributes","color","backgroundColor","className","style","leftShadowVisible","clsx","POINTER_CURSOR","e","isRowExpanded","expandOnClick","expandRow","collapseRow","theme","colorValue","backgroundColorValue","getRowCssVariables","DataTableRowSelectorCell","hidden","columnProps","columnIndex","accessor","visibleMediaQuery","textAlign","noWrap","ellipsis","width","render","cellsClassName","cellsStyle","customCellAttributes","DataTableRowCell","event","DataTableRowExpansion","import_core","import_clsx","import_jsx_runtime","DataTableScrollArea","topShadowVisible","leftShadowVisible","leftShadowBehind","rightShadowVisible","bottomShadowVisible","headerHeight","footerHeight","onScrollPositionChange","children","viewportRef","scrollAreaProps","clsx","import_jsx_runtime","DataTable","withTableBorder","borderRadius","textSelectionDisabled","height","minHeight","shadow","verticalAlign","fetching","columns","groups","defaultColumnProps","defaultColumnRender","idAccessor","records","selectedRecords","onSelectedRecordsChange","isRecordSelectable","allRecordsSelectionCheckboxProps","getRecordSelectionCheckboxProps","_","index","sortStatus","sortIcons","onSortStatusChange","horizontalSpacing","page","onPageChange","totalRecords","recordsPerPage","onRecordsPerPageChange","recordsPerPageOptions","recordsPerPageLabel","paginationWithEdges","paginationActiveTextColor","paginationActiveBackgroundColor","paginationSize","paginationText","from","to","paginationWrapBreakpoint","getPaginationControlProps","control","loaderBackgroundBlur","customLoader","loaderSize","loaderType","loaderColor","loadingText","emptyState","noRecordsText","noRecordsIcon","highlightOnHover","striped","noHeader","onRowClick","onRowContextMenu","onCellClick","onCellContextMenu","onScroll","onScrollToTop","onScrollToBottom","onScrollToLeft","onScrollToRight","c","backgroundColor","borderColor","rowBorderColor","stripedColor","highlightOnHoverColor","rowColor","rowBackgroundColor","rowExpansion","rowClassName","rowStyle","customRowAttributes","scrollViewportRefProp","scrollAreaProps","bodyRef","m","my","mx","mt","mb","ml","mr","className","classNames","style","styles","otherProps","scrollViewportRef","scrollViewportWidth","scrollViewportHeight","useElementOuterSize","effectiveColumns","group","headerRef","headerHeight","tableRef","tableWidth","tableHeight","footerRef","footerHeight","paginationRef","paginationHeight","scrolledToTop","setScrolledToTop","scrolledToBottom","setScrolledToBottom","scrolledToLeft","setScrolledToLeft","scrolledToRight","setScrolledToRight","rowExpansionInfo","useRowExpansion","processScrolling","scrollTop","scrollLeft","newScrolledToTop","newScrolledToBottom","newScrolledToLeft","newScrolledToRight","useIsomorphicLayoutEffect","handleScrollPositionChange","e","handlePageChange","recordsLength","recordIds","record","getRecordId","selectionColumnVisible","selectedRecordIds","hasRecordsAndSelectedRecords","selectableRecords","selectableRecordIds","allSelectableRecordsSelected","id","someRecordsSelected","handleHeaderSelectionChange","uniqBy","lastSelectionChangeIndex","setLastSelectionChangeIndex","useLastSelectionChangeIndex","selectionVisibleAndNotScrolledToLeft","clsx","theme","getTableCssVariables","DataTableScrollArea","TEXT_SELECTION_DISABLED","DataTableHeader","recordId","isSelected","handleSelectionChange","targetRecords","rec","idx","differenceBy","r","DataTableRow","DataTableEmptyRow","footer","DataTableFooter","DataTablePagination","DataTableLoader","DataTableEmptyState"]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{Box as zn,Table as Wn}from"@mantine/core";import{useMergedRef as Gn}from"@mantine/hooks";import la from"clsx";import{useCallback as xe,useMemo as Bn,useState as Me}from"react";import{jsx as rt}from"react/jsx-runtime";function lt(){return rt("tr",{className:"mantine-datatable-empty-row",children:rt("td",{})})}import{Center as po,Text as co}from"@mantine/core";import{jsx as re,jsxs as so}from"react/jsx-runtime";function it(){return so("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[re("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),re("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"}),re("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"}),re("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),re("path",{d:"M3 3l18 18"})]})}import{Fragment as mo,jsx as be,jsxs as uo}from"react/jsx-runtime";function st({icon:e,text:t,pt:a,pb:o,active:n,children:r}){return be(po,{pt:a,pb:o,className:"mantine-datatable-empty-state","data-active":n||void 0,children:r||uo(mo,{children:[e||be("div",{className:"mantine-datatable-empty-state-icon",children:be(it,{})}),be(co,{size:"sm",c:"dimmed",children:t})]})})}import{TableTfoot as Ho,TableTr as Fo,rem as Vo}from"@mantine/core";import Ao from"clsx";import{forwardRef as _o}from"react";import{TableTh as vo}from"@mantine/core";import Eo from"clsx";import{useResizeObserver as fo}from"@mantine/hooks";function U(){let[e]=fo(),{width:t,height:a}=e.current?.getBoundingClientRect()||{width:0,height:0};return{ref:e,width:t,height:a}}import{useEffect as bo,useLayoutEffect as To}from"react";var dt=typeof window<"u"?To:bo;import{useEffect as ho,useState as go}from"react";function pt(e){let[t,a]=go(null),o=e?.join(":")||"";return ho(()=>{a(null)},[o]),{lastSelectionChangeIndex:t,setLastSelectionChangeIndex:a}}import{useEffect as Co,useRef as yo,useState as wo}from"react";function So(e,t){let a=()=>{t(e.map(n=>n.matches))},o=e.map(n=>{try{return n.addEventListener("change",a),()=>n.removeEventListener("change",a)}catch{return n.addListener(a),()=>n.removeListener(a)}});return()=>{o.forEach(n=>n())}}function Po(e,t){return t||(typeof window<"u"&&"matchMedia"in window?e.map(a=>window.matchMedia(a).matches):e.map(()=>!1))}function ct(e,t,{getInitialValueInEffect:a}={getInitialValueInEffect:!0}){let[o,n]=wo(a?t:Po(e,t)),r=yo();return Co(()=>{if("matchMedia"in window)return r.current=e.map(i=>window.matchMedia(i)),n(r.current.map(i=>i.matches)),So(r.current,i=>{n(i)})},[e]),o}import{useMantineTheme as xo}from"@mantine/core";import{useMemo as mt}from"react";function ut(e){let t=xo(),a=mt(()=>e.map(n=>(typeof n=="function"?n(t):n)??""),[e,t]),o=mt(()=>e.map(()=>!0),[e]);return ct(a,o)}import{useMantineTheme as Mo}from"@mantine/core";import{useMediaQuery as Do}from"@mantine/hooks";function H(e){let t=Mo(),a=typeof e=="function"?e(t):e;return Do(a||"",!0)}import{useState as ko}from"react";function Te(e){let t=e.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${t.charAt(0).toUpperCase()}${t.slice(1)}`}function ft(e,t,a){return e.filter(o=>!t.map(a).includes(a(o)))}function he(e,t){return e.filter((a,o,n)=>o===n.findIndex(r=>t(a)===t(r)))}function Ae(e,t){return t?t.match(/([^[.\]])+/g).reduce((o,n)=>o&&o[n],e):void 0}function C(e,t){return typeof t=="string"?Ae(e,t):t(e)}function bt({rowExpansion:e,records:t,idAccessor:a}){let o=[];if(e&&t){let{trigger:l,allowMultiple:d,initiallyExpanded:s}=e;t&&l==="always"?o=t.map(u=>C(u,a)):s&&(o=t.filter((u,b)=>s({record:u,index:b})).map(u=>C(u,a)),d||(o=[o[0]]))}let n,r,i=ko(o);if(e){let{trigger:l,allowMultiple:d,collapseProps:s,content:u}=e;e.expanded?{recordIds:n,onRecordIdsChange:r}=e.expanded:[n,r]=i;let b=p=>r?.(n.filter(c=>c!==C(p,a)));return{expandOnClick:l!=="always"&&l!=="never",isRowExpanded:p=>l==="always"?!0:n.includes(C(p,a)),expandRow:p=>{let c=C(p,a);r?.(d?[...n,c]:[c])},collapseRow:b,collapseProps:s,content:({record:p,index:c})=>()=>u({record:p,index:c,collapse:()=>b(p)})}}}import{useTimeout as Tt}from"@mantine/hooks";import{useEffect as Ro,useState as ht}from"react";function gt(e,t){let[a,o]=ht(e),[n,r]=ht(e),i=Tt(()=>o(!0),0),l=Tt(()=>r(!1),t||200);return Ro(()=>{e?(l.clear(),r(!0),i.start()):(i.clear(),o(!1),l.start())},[i,l,e]),{expanded:a,visible:n}}var K="mantine-datatable-nowrap",J="mantine-datatable-ellipsis",F="mantine-datatable-pointer-cursor",Ct="mantine-datatable-text-selection-disabled",V="mantine-datatable-text-align-left",A="mantine-datatable-text-align-center",_="mantine-datatable-text-align-right";import{jsx as No}from"react/jsx-runtime";function yt({className:e,style:t,visibleMediaQuery:a,title:o,noWrap:n,ellipsis:r,textAlign:i,width:l}){return H(a)?No(vo,{className:Eo({[K]:n||r,[J]:r,[V]:i==="left",[A]:i==="center",[_]:i==="right"},e),style:[{width:l,minWidth:l,maxWidth:l},t],children:o}):null}import{TableTh as Io}from"@mantine/core";import{jsx as Lo}from"react/jsx-runtime";function wt({shadowVisible:e}){return Lo(Io,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":e||void 0})}import{jsx as _e,jsxs as Oo}from"react/jsx-runtime";var St=_o(function({className:t,style:a,columns:o,defaultColumnProps:n,selectionVisible:r,leftShadowVisible:i,scrollDiff:l},d){let s=l<0;return _e(Ho,{ref:d,className:Ao("mantine-datatable-footer",t),style:[{position:s?"relative":"sticky",bottom:Vo(s?l:0)},a],children:Oo(Fo,{children:[r&&_e(wt,{shadowVisible:i}),o.map(({hidden:u,...b})=>{if(u)return null;let{accessor:p,visibleMediaQuery:c,textAlign:f,width:g,footer:T,footerClassName:S,footerStyle:M,noWrap:N,ellipsis:D}={...n,...b};return _e(yt,{className:S,style:M,visibleMediaQuery:c,textAlign:f,width:g,title:T,noWrap:N,ellipsis:D},p)})]})})});import{TableThead as nn,TableTr as At}from"@mantine/core";import rn from"clsx";import{forwardRef as ln}from"react";import{TableTh as zo}from"@mantine/core";import Wo from"clsx";import{useMemo as Pt}from"react";import{jsx as Go}from"react/jsx-runtime";function xt({group:{id:e,columns:t,title:a,textAlign:o,className:n,style:r}}){let i=Pt(()=>t.map(({visibleMediaQuery:s})=>s),[t]),l=ut(i),d=Pt(()=>t.filter(({hidden:s},u)=>!s&&l?.[u]).length,[t,l]);return d>0?Go(zo,{colSpan:d,className:Wo({[V]:o==="left",[A]:o==="center",[_]:o==="right"},n),style:r,children:a??Te(e)}):null}import{Box as Yo,Center as Lt,Group as qo,TableTh as jo}from"@mantine/core";import Oe from"clsx";import{ActionIcon as Xo,Popover as vt,PopoverTarget as $o}from"@mantine/core";import{useDisclosure as Uo}from"@mantine/hooks";import{jsx as Mt,jsxs as Bo}from"react/jsx-runtime";function Dt(){return Bo("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[Mt("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Mt("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}import{jsx as kt,jsxs as Qo}from"react/jsx-runtime";function Rt(){return Qo("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[kt("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),kt("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}import{jsx as ge,jsxs as Ko}from"react/jsx-runtime";function Et({children:e,isActive:t}){let[a,{close:o,toggle:n}]=Uo(!1);return Ko(vt,{withArrow:!0,withinPortal:!0,shadow:"md",opened:a,onClose:o,trapFocus:!0,children:[ge($o,{children:ge(Xo,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":t||void 0,size:"sm",variant:"default",onClick:i=>{i.preventDefault(),n()},children:ge(t?Rt:Dt,{})})}),ge(vt.Dropdown,{onClick:i=>i.preventDefault(),children:typeof e=="function"?e({close:o}):e})]})}import{jsx as Ce,jsxs as Jo}from"react/jsx-runtime";function Nt(){return Jo("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[Ce("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Ce("path",{d:"M12 5l0 14"}),Ce("path",{d:"M16 9l-4 -4"}),Ce("path",{d:"M8 9l4 -4"})]})}import{jsx as ye,jsxs as Zo}from"react/jsx-runtime";function It(){return Zo("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[ye("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),ye("path",{d:"M8 7l4 -4l4 4"}),ye("path",{d:"M8 17l4 4l4 -4"}),ye("path",{d:"M12 3l0 18"})]})}import{Fragment as en,jsx as O,jsxs as tn}from"react/jsx-runtime";function Ht({className:e,style:t,accessor:a,visibleMediaQuery:o,title:n,sortable:r,sortIcons:i,textAlign:l,width:d,sortStatus:s,onSortStatusChange:u,filter:b,filtering:p}){if(!H(o))return null;let c=n??Te(a),f=typeof c=="string"?c:void 0,g=r&&u?T=>{T?.defaultPrevented||u({columnAccessor:a,direction:s?.columnAccessor===a?s.direction==="asc"?"desc":"asc":s?.direction??"asc"})}:void 0;return O(jo,{className:Oe({"mantine-datatable-header-cell-sortable":r},e),style:[{width:d,minWidth:d,maxWidth:d},t],role:r?"button":void 0,tabIndex:r?0:void 0,onClick:g,onKeyDown:T=>T.key==="Enter"&&g?.(),children:tn(qo,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[O(Yo,{className:Oe("mantine-datatable-header-cell-sortable-text",{[V]:l==="left",[A]:l==="center",[_]:l==="right"},K,J),title:f,children:c}),r||s?.columnAccessor===a?O(en,{children:s?.columnAccessor===a?O(Lt,{className:Oe("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":s.direction==="desc"}),role:"img","aria-label":`Sorted ${s.direction==="desc"?"descending":"ascending"}`,children:i?.sorted||O(Nt,{})}):O(Lt,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:i?.unsorted||O(It,{})})}):null,b?O(Et,{isActive:!!p,children:b}):null]})})}import{Checkbox as an,TableTh as on}from"@mantine/core";import{jsx as Ft}from"react/jsx-runtime";function Vt({shadowVisible:e,checked:t,indeterminate:a,checkboxProps:o,onChange:n,rowSpan:r}){return Ft(on,{className:"mantine-datatable-header-selector-cell",rowSpan:r,"data-shadow-visible":e||void 0,children:Ft(an,{classNames:{input:F},checked:t,indeterminate:a,onChange:n,...o,disabled:!(n||o.onChange)||o.disabled})})}import{jsx as ze,jsxs as We}from"react/jsx-runtime";var _t=ln(function({className:t,style:a,sortStatus:o,sortIcons:n,onSortStatusChange:r,columns:i,defaultColumnProps:l,groups:d,selectionVisible:s,selectionChecked:u,selectionIndeterminate:b,onSelectionChange:p,selectionCheckboxProps:c,leftShadowVisible:f},g){let T=s?ze(Vt,{shadowVisible:f,checked:u,indeterminate:b,checkboxProps:c,onChange:p,rowSpan:d?2:void 0}):null;return We(nn,{className:rn("mantine-datatable-header",t),style:a,ref:g,children:[d&&We(At,{children:[T,d.map(S=>ze(xt,{group:S},S.id))]}),We(At,{children:[!d&&T,i.map(({hidden:S,...M})=>{if(S)return null;let{accessor:N,visibleMediaQuery:D,textAlign:w,width:P,title:y,sortable:R,titleClassName:x,titleStyle:z,filter:Z,filtering:Y}={...l,...M};return ze(Ht,{accessor:N,className:x,style:z,visibleMediaQuery:D,textAlign:w,width:P,title:y,sortable:R,sortStatus:o,sortIcons:n,onSortStatusChange:r,filter:Z,filtering:Y},N)})]})]})});import{Center as sn,Loader as dn}from"@mantine/core";import pn from"clsx";import{jsx as Ot}from"react/jsx-runtime";function zt({pt:e,pb:t,fetching:a,customContent:o,backgroundBlur:n,size:r,type:i,color:l}){return Ot(sn,{pt:e,pb:t,className:pn("mantine-datatable-loader",{"mantine-datatable-loader-fetching":a}),style:[{backdropFilter:n?`blur(${n}px)`:void 0}],children:a&&(o||Ot(dn,{size:r,type:i,color:l}))})}import{Box as yn,Pagination as wn,Text as Sn,rem as Pn}from"@mantine/core";import Kt from"clsx";import{forwardRef as xn}from"react";import{Button as un,Group as fn,Menu as bn,MenuDropdown as Tn,MenuItem as hn,MenuTarget as gn,Text as Qt,rem as le}from"@mantine/core";import Cn from"clsx";import{parseThemeColor as cn}from"@mantine/core";function h(e,t,a){return e?cn({color:typeof e=="object"?e[a]:e,theme:t}).value:void 0}function Wt({theme:e,c:t,backgroundColor:a,borderColor:o,rowBorderColor:n,stripedColor:r,highlightOnHoverColor:i}){return{"--mantine-datatable-color-light":h(t,e,"light"),"--mantine-datatable-color-dark":h(t,e,"dark"),"--mantine-datatable-background-color-light":h(a,e,"light"),"--mantine-datatable-background-color-dark":h(a,e,"dark"),"--mantine-datatable-border-color-light":h(o,e,"light"),"--mantine-datatable-border-color-dark":h(o,e,"dark"),"--mantine-datatable-row-border-color-light":h(n,e,"light"),"--mantine-datatable-row-border-color-dark":h(n,e,"dark"),"--mantine-datatable-striped-color-light":h(r,e,"light"),"--mantine-datatable-striped-color-dark":h(r,e,"dark"),"--mantine-datatable-highlight-on-hover-color-light":h(i,e,"light"),"--mantine-datatable-highlight-on-hover-color-dark":h(i,e,"dark")}}function we({theme:e,paginationActiveTextColor:t,paginationActiveBackgroundColor:a}){return{"--mantine-datatable-pagination-active-text-color-light":h(t,e,"light"),"--mantine-datatable-pagination-active-text-color-dark":h(t,e,"dark"),"--mantine-datatable-pagination-active-background-color-light":h(a,e,"light"),"--mantine-datatable-pagination-active-background-color-dark":h(a,e,"dark")}}function Gt({theme:e,color:t,backgroundColor:a}){return{"--mantine-datatable-row-color-light":h(t,e,"light"),"--mantine-datatable-row-color-dark":h(t,e,"dark"),"--mantine-datatable-row-background-color-light":h(a,e,"light"),"--mantine-datatable-row-background-color-dark":h(a,e,"dark")}}import{jsx as Ge,jsxs as mn}from"react/jsx-runtime";function Bt(){return mn("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[Ge("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Ge("path",{d:"M8 9l4 -4l4 4"}),Ge("path",{d:"M16 15l-4 4l-4 -4"})]})}import{jsx as X,jsxs as $t}from"react/jsx-runtime";var Xt={xs:le(22),sm:le(26),md:le(32),lg:le(38),xl:le(44)};function Ut({size:e,label:t,values:a,value:o,activeTextColor:n,activeBackgroundColor:r,onChange:i}){return $t(fn,{gap:"xs",children:[X(Qt,{size:e,children:t}),$t(bn,{withinPortal:!0,withArrow:!0,children:[X(gn,{children:X(un,{size:e,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:X(Bt,{}),style:[{fontWeight:"normal"},l=>({height:Xt[e],paddingLeft:l.spacing[e],paddingRight:l.spacing[e]})],children:o})}),X(Tn,{children:a.map(l=>{let d=l===o;return X(hn,{className:Cn({"mantine-datatable-page-size-selector-active":d}),style:[{height:Xt[e]},d&&(n||r)?s=>we({theme:s,paginationActiveTextColor:n,paginationActiveBackgroundColor:r}):void 0],disabled:d,onClick:()=>i(l),children:X(Qt,{size:e,children:l})},l)})})]})]})}import{jsx as Be,jsxs as Mn}from"react/jsx-runtime";var Jt=xn(function({className:t,style:a,fetching:o,page:n,onPageChange:r,paginationWithEdges:i,paginationActiveTextColor:l,paginationActiveBackgroundColor:d,paginationSize:s,loadingText:u,noRecordsText:b,paginationText:p,totalRecords:c,recordsPerPage:f,onRecordsPerPageChange:g,recordsPerPageLabel:T,recordsPerPageOptions:S,recordsLength:M,horizontalSpacing:N,paginationWrapBreakpoint:D,getPaginationControlProps:w},P){let y;if(o)y=u;else if(!c)y=b;else{let x=(n-1)*f+1,z=x+M-1;y=p({from:x,to:z,totalRecords:c})}let R=H(({breakpoints:x})=>`(min-width: ${typeof D=="number"?`${Pn(D)}rem`:x[D]||D})`);return Mn(yn,{ref:P,px:N??"xs",py:"xs",className:Kt("mantine-datatable-pagination",t),style:[{flexDirection:R?"row":"column"},a],children:[Be(Sn,{className:"mantine-datatable-pagination-text",size:s,children:y}),S&&Be(Ut,{activeTextColor:l,activeBackgroundColor:d,size:s,label:T,values:S,value:f,onChange:g}),Be(wn,{classNames:{root:Kt("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":o||!M}),control:"mantine-datatable-pagination-pages-control"},style:l||d?x=>we({theme:x,paginationActiveTextColor:l,paginationActiveBackgroundColor:d}):void 0,withEdges:i,value:n,onChange:r,size:s,total:Math.ceil(c/f),getControlProps:w})]})});import{TableTr as Fn}from"@mantine/core";import Vn from"clsx";import{TableTd as Dn}from"@mantine/core";import kn from"clsx";import{jsx as Rn}from"react/jsx-runtime";function Zt({className:e,style:t,visibleMediaQuery:a,record:o,index:n,onClick:r,onContextMenu:i,noWrap:l,ellipsis:d,textAlign:s,width:u,accessor:b,render:p,defaultRender:c,customCellAttributes:f}){return H(a)?Rn(Dn,{className:kn({[K]:l||d,[J]:d,[F]:r,[V]:s==="left",[A]:s==="center",[_]:s==="right"},e),style:[{width:u,minWidth:u,maxWidth:u},t],onClick:r,onContextMenu:i,...f?.(o,n),children:p?p(o,n):c?c(o,n,b):Ae(o,b)}):null}import{Collapse as vn,TableTd as En,TableTr as Yt}from"@mantine/core";import{Fragment as Nn,jsx as ie,jsxs as In}from"react/jsx-runtime";function qt({open:e,colSpan:t,content:a,collapseProps:o}){let{expanded:n,visible:r}=gt(e,o?.transitionDuration);return r?In(Nn,{children:[ie(Yt,{}),ie(Yt,{children:ie(En,{className:"mantine-datatable-row-expansion-cell",colSpan:t,children:ie(vn,{in:n,...o,children:ie("div",{className:"mantine-datatable-row-expansion-cell-content",children:a()})})})})]}):null}import{Checkbox as Ln,TableTd as Hn}from"@mantine/core";import{jsx as jt}from"react/jsx-runtime";function ea({record:e,index:t,withRightShadow:a,getCheckboxProps:o,...n}){return jt(Hn,{className:"mantine-datatable-row-selector-cell","data-shadow-visible":a||void 0,onClick:r=>r.stopPropagation(),children:jt(Ln,{classNames:{input:F},...n,...o(e,t)})})}import{Fragment as An,jsx as Qe,jsxs as ta}from"react/jsx-runtime";function aa({record:e,index:t,columns:a,defaultColumnProps:o,defaultColumnRender:n,selectionVisible:r,selectionChecked:i,onSelectionChange:l,isRecordSelectable:d,getSelectionCheckboxProps:s,onClick:u,onContextMenu:b,onCellClick:p,onCellContextMenu:c,expansion:f,customAttributes:g,color:T,backgroundColor:S,className:M,style:N,leftShadowVisible:D}){return ta(An,{children:[ta(Fn,{className:Vn("mantine-datatable-row",{[F]:u||f?.expandOnClick},typeof M=="function"?M(e,t):M),"data-selected":i||void 0,onClick:w=>{if(f){let{isRowExpanded:P,expandOnClick:y,expandRow:R,collapseRow:x}=f;y&&(P(e)?x(e):R(e))}u?.({event:w,record:e,index:t})},onContextMenu:b?w=>b({event:w,record:e,index:t}):void 0,style:[T||S?w=>{let P=T?.(e,t),y=S?.(e,t);return Gt({theme:w,color:P,backgroundColor:y})}:void 0,N?.(e,t)],...g?.(e,t),children:[r&&Qe(ea,{record:e,index:t,withRightShadow:D,checked:i,disabled:!l||(d?!d(e,t):!1),onChange:l,getCheckboxProps:s}),a.map(({hidden:w,...P},y)=>{if(w)return null;let{accessor:R,visibleMediaQuery:x,textAlign:z,noWrap:Z,ellipsis:Y,width:De,render:ke,cellsClassName:q,cellsStyle:Re,customCellAttributes:ve}={...o,...P};return Qe(Zt,{className:typeof q=="function"?q(e,t):q,style:Re?.(e,t),visibleMediaQuery:x,record:e,index:t,onClick:p?j=>p({event:j,record:e,index:t,column:P,columnIndex:y}):void 0,onContextMenu:c?j=>c({event:j,record:e,index:t,column:P,columnIndex:y}):void 0,accessor:R,textAlign:z,noWrap:Z,ellipsis:Y,width:De,render:ke,defaultRender:n,customCellAttributes:ve},R)})]}),f&&Qe(qt,{colSpan:a.filter(({hidden:w})=>!w).length+(r?1:0),open:f.isRowExpanded(e),content:f.content({record:e,index:t}),collapseProps:f.collapseProps})]})}import{Box as oa,ScrollArea as _n,rem as na}from"@mantine/core";import Se from"clsx";import{jsx as Pe,jsxs as On}from"react/jsx-runtime";function ra({topShadowVisible:e,leftShadowVisible:t,leftShadowBehind:a,rightShadowVisible:o,bottomShadowVisible:n,headerHeight:r,footerHeight:i,onScrollPositionChange:l,children:d,viewportRef:s,scrollAreaProps:u}){return On(_n,{...u,viewportRef:s,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:l,children:[d,Pe(oa,{className:Se("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow",{"mantine-datatable-scroll-area-shadow-visible":e}),style:{top:r?na(r):0}}),Pe("div",{className:Se("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-visible":t,"mantine-datatable-scroll-area-left-shadow-behind":a})}),Pe("div",{className:Se("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-visible":o})}),Pe(oa,{className:Se("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow",{"mantine-datatable-scroll-area-shadow-visible":n}),style:{bottom:i?na(i):0}})]})}import{jsx as I,jsxs as ia}from"react/jsx-runtime";function Qn({withTableBorder:e,borderRadius:t,textSelectionDisabled:a,height:o="100%",minHeight:n,shadow:r,verticalAlign:i="center",fetching:l,columns:d,groups:s,defaultColumnProps:u,defaultColumnRender:b,idAccessor:p="id",records:c,selectedRecords:f,onSelectedRecordsChange:g,isRecordSelectable:T,allRecordsSelectionCheckboxProps:S={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:M=(k,W)=>({"aria-label":`Select record ${W+1}`}),sortStatus:N,sortIcons:D,onSortStatusChange:w,horizontalSpacing:P,page:y,onPageChange:R,totalRecords:x,recordsPerPage:z,onRecordsPerPageChange:Z,recordsPerPageOptions:Y,recordsPerPageLabel:De="Records per page",paginationWithEdges:ke,paginationActiveTextColor:q,paginationActiveBackgroundColor:Re,paginationSize:ve="sm",paginationText:j=({from:k,to:W,totalRecords:G})=>`${k} - ${W} / ${G}`,paginationWrapBreakpoint:sa="sm",getPaginationControlProps:da=k=>k==="previous"?{"aria-label":"Previous page"}:k==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:pa,customLoader:ca,loaderSize:ma,loaderType:ua,loaderColor:fa,loadingText:ba="...",emptyState:Ta,noRecordsText:Xe="No records",noRecordsIcon:ha,highlightOnHover:ga,striped:Ca,noHeader:ya,onRowClick:wa,onRowContextMenu:Sa,onCellClick:Pa,onCellContextMenu:xa,onScroll:$e,onScrollToTop:Ue,onScrollToBottom:Ke,onScrollToLeft:Je,onScrollToRight:Ze,c:Ma,backgroundColor:Da,borderColor:ka,rowBorderColor:Ra,stripedColor:va,highlightOnHoverColor:Ea,rowColor:Na,rowBackgroundColor:Ia,rowExpansion:La,rowClassName:Ha,rowStyle:Fa,customRowAttributes:Va,scrollViewportRef:Aa,scrollAreaProps:_a,bodyRef:Oa,m:za,my:Wa,mx:Ga,mt:Ba,mb:Qa,ml:Xa,mr:$a,className:Ua,classNames:ee,style:Ka,styles:te,...Ja}){let{ref:k,width:W,height:G}=U(),se=Bn(()=>s?.flatMap(m=>m.columns)??d,[d,s]),{ref:Za,height:Ee}=U(),{ref:Ya,width:Ne,height:ae}=U(),{ref:qa,height:ja}=U(),{ref:eo,height:Ye}=U(),[Ie,qe]=Me(!0),[Le,je]=Me(!0),[de,et]=Me(!0),[He,tt]=Me(!0),to=bt({rowExpansion:La,records:c,idAccessor:p}),pe=xe(()=>{let m=k.current?.scrollTop||0,L=k.current?.scrollLeft||0;if(l||ae<=G)qe(!0),je(!0);else{let v=m===0,E=ae-m-G<1;qe(v),je(E),v&&v!==Ie&&Ue?.(),E&&E!==Le&&Ke?.()}if(l||Ne===W)et(!0),tt(!0);else{let v=L===0,E=Ne-L-W<1;et(v),tt(E),v&&v!==de&&Je?.(),E&&E!==He&&Ze?.()}},[l,Ke,Je,Ze,Ue,G,k,W,Le,de,He,Ie,ae,Ne]);dt(pe,[pe]);let ao=xe(m=>{$e?.(m),pe()},[pe,$e]),oo=xe(m=>{k.current?.scrollTo({top:0,left:0}),R(m)},[R,k]),ce=c?.length,at=c?.map(m=>C(m,p)),oe=!!f,ne=f?.map(m=>C(m,p)),ot=at!==void 0&&ne!==void 0&&ne.length>0,Fe=T?c?.filter(T):c,me=Fe?.map(m=>C(m,p)),ue=ot&&me.every(m=>ne.includes(m)),no=ot&&me.some(m=>ne.includes(m)),ro=xe(()=>{f&&g&&g(ue?f.filter(m=>!me.includes(C(m,p))):he([...f,...Fe],m=>C(m,p)))},[ue,p,g,me,Fe,f]),{lastSelectionChangeIndex:fe,setLastSelectionChangeIndex:lo}=pt(at),Ve=oe&&!de;return ia(zn,{...{m:za,my:Wa,mx:Ga,mt:Ba,mb:Qa,ml:Xa,mr:$a},className:la("mantine-datatable",{"mantine-datatable-with-border":e},Ua,ee?.root),style:[m=>({...Wt({theme:m,c:Ma,backgroundColor:Da,borderColor:ka,rowBorderColor:Ra,stripedColor:va,highlightOnHoverColor:Ea}),borderRadius:m.radius[t]||t,boxShadow:m.shadows[r]||r,height:o,minHeight:n}),Ka,te?.root],children:[I(ra,{viewportRef:Gn(k,Aa),topShadowVisible:!Ie,leftShadowVisible:!de,leftShadowBehind:oe,rightShadowVisible:!He,bottomShadowVisible:!Le,headerHeight:Ee,footerHeight:ja,onScrollPositionChange:ao,scrollAreaProps:_a,children:ia(Wn,{ref:Ya,horizontalSpacing:P,className:la("mantine-datatable-table",{[Ct]:a,"mantine-datatable-vertical-align-top":i==="top","mantine-datatable-vertical-align-bottom":i==="bottom","mantine-datatable-table-last-row-border-bottom-visible":ae<G},ee?.table),style:te?.table,"data-striped":ce&&Ca||void 0,"data-highlight-on-hover":ga||void 0,...Ja,children:[ya?null:I(_t,{ref:Za,className:ee?.header,style:te?.header,columns:se,defaultColumnProps:u,groups:s,sortStatus:N,sortIcons:D,onSortStatusChange:w,selectionVisible:oe,selectionChecked:ue,selectionIndeterminate:no&&!ue,onSelectionChange:ro,selectionCheckboxProps:S,leftShadowVisible:Ve}),I("tbody",{ref:Oa,children:ce?c.map((m,L)=>{let v=C(m,p),E=ne?.includes(v)||!1,nt;return g&&f&&(nt=io=>{if(io.nativeEvent.shiftKey&&fe!==null){let $=c.filter(L>fe?(B,Q)=>Q>=fe&&Q<=L&&(T?T(B,Q):!0):(B,Q)=>Q>=L&&Q<=fe&&(T?T(B,Q):!0));g(E?ft(f,$,B=>C(B,p)):he([...f,...$],B=>C(B,p)))}else g(E?f.filter($=>C($,p)!==v):he([...f,m],$=>C($,p)));lo(L)}),I(aa,{record:m,index:L,columns:se,defaultColumnProps:u,defaultColumnRender:b,selectionVisible:oe,selectionChecked:E,onSelectionChange:nt,isRecordSelectable:T,getSelectionCheckboxProps:M,onClick:wa,onCellClick:Pa,onContextMenu:Sa,onCellContextMenu:xa,expansion:to,color:Na,backgroundColor:Ia,className:Ha,style:Fa,customAttributes:Va,leftShadowVisible:Ve},v)}):I(lt,{})}),se.some(({footer:m})=>m)&&I(St,{ref:qa,className:ee?.footer,style:te?.footer,columns:se,defaultColumnProps:u,selectionVisible:oe,leftShadowVisible:Ve,scrollDiff:ae-G})]})}),y&&I(Jt,{ref:eo,className:ee?.pagination,style:te?.pagination,horizontalSpacing:P,fetching:l,page:y,onPageChange:oo,totalRecords:x,recordsPerPage:z,onRecordsPerPageChange:Z,recordsPerPageOptions:Y,recordsPerPageLabel:De,paginationWithEdges:ke,paginationActiveTextColor:q,paginationActiveBackgroundColor:Re,paginationSize:ve,paginationText:j,paginationWrapBreakpoint:sa,getPaginationControlProps:da,noRecordsText:Xe,loadingText:ba,recordsLength:ce}),I(zt,{pt:Ee,pb:Ye,fetching:l,backgroundBlur:pa,customContent:ca,size:ma,type:ua,color:fa}),I(st,{pt:Ee,pb:Ye,icon:ha,text:Xe,active:!l&&!ce,children:Ta})]})}export{Qn as DataTable,ft as differenceBy,C as getRecordId,Ae as getValueAtPath,Te as humanize,he as uniqBy};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|