mantine-datatable 7.1.1 → 7.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/dist/index.d.ts +798 -0
  2. package/dist/index.js +2 -0
  3. package/dist/index.js.map +1 -0
  4. package/dist/index.mjs +2 -0
  5. package/dist/index.mjs.map +1 -0
  6. package/dist/{css/styles.css → styles.css} +51 -37
  7. package/dist/styles.css.map +1 -0
  8. package/dist/{css/styles.layer.css → styles.layer.css} +47 -30
  9. package/dist/styles.layer.css.map +1 -0
  10. package/package.json +36 -27
  11. package/dist/esm/DataTable.js +0 -175
  12. package/dist/esm/DataTable.js.map +0 -1
  13. package/dist/esm/DataTableColumnGroupHeaderCell.js +0 -19
  14. package/dist/esm/DataTableColumnGroupHeaderCell.js.map +0 -1
  15. package/dist/esm/DataTableEmptyRow.js +0 -5
  16. package/dist/esm/DataTableEmptyRow.js.map +0 -1
  17. package/dist/esm/DataTableEmptyState.js +0 -7
  18. package/dist/esm/DataTableEmptyState.js.map +0 -1
  19. package/dist/esm/DataTableFooter.js +0 -22
  20. package/dist/esm/DataTableFooter.js.map +0 -1
  21. package/dist/esm/DataTableFooterCell.js +0 -24
  22. package/dist/esm/DataTableFooterCell.js.map +0 -1
  23. package/dist/esm/DataTableFooterSelectorPlaceholderCell.js +0 -6
  24. package/dist/esm/DataTableFooterSelectorPlaceholderCell.js.map +0 -1
  25. package/dist/esm/DataTableHeader.js +0 -18
  26. package/dist/esm/DataTableHeader.js.map +0 -1
  27. package/dist/esm/DataTableHeaderCell.js +0 -40
  28. package/dist/esm/DataTableHeaderCell.js.map +0 -1
  29. package/dist/esm/DataTableHeaderCellFilter.js +0 -15
  30. package/dist/esm/DataTableHeaderCellFilter.js.map +0 -1
  31. package/dist/esm/DataTableHeaderSelectorCell.js +0 -8
  32. package/dist/esm/DataTableHeaderSelectorCell.js.map +0 -1
  33. package/dist/esm/DataTableLoader.js +0 -7
  34. package/dist/esm/DataTableLoader.js.map +0 -1
  35. package/dist/esm/DataTablePageSizeSelector.js +0 -30
  36. package/dist/esm/DataTablePageSizeSelector.js.map +0 -1
  37. package/dist/esm/DataTablePagination.js +0 -34
  38. package/dist/esm/DataTablePagination.js.map +0 -1
  39. package/dist/esm/DataTableRow.js +0 -44
  40. package/dist/esm/DataTableRow.js.map +0 -1
  41. package/dist/esm/DataTableRowCell.js +0 -31
  42. package/dist/esm/DataTableRowCell.js.map +0 -1
  43. package/dist/esm/DataTableRowExpansion.js +0 -9
  44. package/dist/esm/DataTableRowExpansion.js.map +0 -1
  45. package/dist/esm/DataTableRowSelectorCell.js +0 -8
  46. package/dist/esm/DataTableRowSelectorCell.js.map +0 -1
  47. package/dist/esm/DataTableScrollArea.js +0 -22
  48. package/dist/esm/DataTableScrollArea.js.map +0 -1
  49. package/dist/esm/cssVariables.js +0 -43
  50. package/dist/esm/cssVariables.js.map +0 -1
  51. package/dist/esm/hooks/index.js +0 -9
  52. package/dist/esm/hooks/index.js.map +0 -1
  53. package/dist/esm/hooks/useElementOuterSize.js +0 -8
  54. package/dist/esm/hooks/useElementOuterSize.js.map +0 -1
  55. package/dist/esm/hooks/useIsomorphicLayoutEffect.js +0 -4
  56. package/dist/esm/hooks/useIsomorphicLayoutEffect.js.map +0 -1
  57. package/dist/esm/hooks/useLastSelectionChangeIndex.js +0 -11
  58. package/dist/esm/hooks/useLastSelectionChangeIndex.js.map +0 -1
  59. package/dist/esm/hooks/useMediaQueries.js +0 -52
  60. package/dist/esm/hooks/useMediaQueries.js.map +0 -1
  61. package/dist/esm/hooks/useMediaQueriesStringOrFunction.js +0 -11
  62. package/dist/esm/hooks/useMediaQueriesStringOrFunction.js.map +0 -1
  63. package/dist/esm/hooks/useMediaQueryStringOrFunction.js +0 -9
  64. package/dist/esm/hooks/useMediaQueryStringOrFunction.js.map +0 -1
  65. package/dist/esm/hooks/useRowExpansion.js +0 -45
  66. package/dist/esm/hooks/useRowExpansion.js.map +0 -1
  67. package/dist/esm/hooks/useRowExpansionStatus.js +0 -23
  68. package/dist/esm/hooks/useRowExpansionStatus.js.map +0 -1
  69. package/dist/esm/icons/IconArrowUp.js +0 -5
  70. package/dist/esm/icons/IconArrowUp.js.map +0 -1
  71. package/dist/esm/icons/IconArrowsVertical.js +0 -5
  72. package/dist/esm/icons/IconArrowsVertical.js.map +0 -1
  73. package/dist/esm/icons/IconDatabaseOff.js +0 -5
  74. package/dist/esm/icons/IconDatabaseOff.js.map +0 -1
  75. package/dist/esm/icons/IconFilter.js +0 -5
  76. package/dist/esm/icons/IconFilter.js.map +0 -1
  77. package/dist/esm/icons/IconFilterFilled.js +0 -5
  78. package/dist/esm/icons/IconFilterFilled.js.map +0 -1
  79. package/dist/esm/icons/IconSelector.js +0 -5
  80. package/dist/esm/icons/IconSelector.js.map +0 -1
  81. package/dist/esm/index.js +0 -4
  82. package/dist/esm/index.js.map +0 -1
  83. package/dist/esm/types/DataTableCellClickHandler.js +0 -2
  84. package/dist/esm/types/DataTableCellClickHandler.js.map +0 -1
  85. package/dist/esm/types/DataTableColorProps.js +0 -2
  86. package/dist/esm/types/DataTableColorProps.js.map +0 -1
  87. package/dist/esm/types/DataTableColumn.js +0 -2
  88. package/dist/esm/types/DataTableColumn.js.map +0 -1
  89. package/dist/esm/types/DataTableColumnGroup.js +0 -2
  90. package/dist/esm/types/DataTableColumnGroup.js.map +0 -1
  91. package/dist/esm/types/DataTableColumnProps.js +0 -2
  92. package/dist/esm/types/DataTableColumnProps.js.map +0 -1
  93. package/dist/esm/types/DataTableColumnTextAlign.js +0 -2
  94. package/dist/esm/types/DataTableColumnTextAlign.js.map +0 -1
  95. package/dist/esm/types/DataTableDefaultColumnProps.js +0 -2
  96. package/dist/esm/types/DataTableDefaultColumnProps.js.map +0 -1
  97. package/dist/esm/types/DataTableEmptyStateProps.js +0 -2
  98. package/dist/esm/types/DataTableEmptyStateProps.js.map +0 -1
  99. package/dist/esm/types/DataTableLoaderProps.js +0 -2
  100. package/dist/esm/types/DataTableLoaderProps.js.map +0 -1
  101. package/dist/esm/types/DataTableOuterBorderProps.js +0 -2
  102. package/dist/esm/types/DataTableOuterBorderProps.js.map +0 -1
  103. package/dist/esm/types/DataTablePageSizeSelectorProps.js +0 -2
  104. package/dist/esm/types/DataTablePageSizeSelectorProps.js.map +0 -1
  105. package/dist/esm/types/DataTablePaginationProps.js +0 -2
  106. package/dist/esm/types/DataTablePaginationProps.js.map +0 -1
  107. package/dist/esm/types/DataTableProps.js +0 -2
  108. package/dist/esm/types/DataTableProps.js.map +0 -1
  109. package/dist/esm/types/DataTableRowClickHandler.js +0 -2
  110. package/dist/esm/types/DataTableRowClickHandler.js.map +0 -1
  111. package/dist/esm/types/DataTableRowExpansionCollapseProps.js +0 -2
  112. package/dist/esm/types/DataTableRowExpansionCollapseProps.js.map +0 -1
  113. package/dist/esm/types/DataTableRowExpansionProps.js +0 -2
  114. package/dist/esm/types/DataTableRowExpansionProps.js.map +0 -1
  115. package/dist/esm/types/DataTableScrollProps.js +0 -2
  116. package/dist/esm/types/DataTableScrollProps.js.map +0 -1
  117. package/dist/esm/types/DataTableSelectionProps.js +0 -2
  118. package/dist/esm/types/DataTableSelectionProps.js.map +0 -1
  119. package/dist/esm/types/DataTableSortProps.js +0 -2
  120. package/dist/esm/types/DataTableSortProps.js.map +0 -1
  121. package/dist/esm/types/DataTableSortStatus.js +0 -2
  122. package/dist/esm/types/DataTableSortStatus.js.map +0 -1
  123. package/dist/esm/types/DataTableVerticalAlign.js +0 -2
  124. package/dist/esm/types/DataTableVerticalAlign.js.map +0 -1
  125. package/dist/esm/types/index.js +0 -18
  126. package/dist/esm/types/index.js.map +0 -1
  127. package/dist/esm/types/utils.js +0 -2
  128. package/dist/esm/types/utils.js.map +0 -1
  129. package/dist/esm/utilityClasses.js +0 -8
  130. package/dist/esm/utilityClasses.js.map +0 -1
  131. package/dist/esm/utils.js +0 -41
  132. package/dist/esm/utils.js.map +0 -1
  133. package/dist/types/DataTable.d.ts +0 -2
  134. package/dist/types/DataTableColumnGroupHeaderCell.d.ts +0 -6
  135. package/dist/types/DataTableEmptyRow.d.ts +0 -1
  136. package/dist/types/DataTableEmptyState.d.ts +0 -11
  137. package/dist/types/DataTableFooter.d.ts +0 -15
  138. package/dist/types/DataTableFooterCell.d.ts +0 -11
  139. package/dist/types/DataTableFooterSelectorPlaceholderCell.d.ts +0 -5
  140. package/dist/types/DataTableHeader.d.ts +0 -22
  141. package/dist/types/DataTableHeaderCell.d.ts +0 -14
  142. package/dist/types/DataTableHeaderCellFilter.d.ts +0 -7
  143. package/dist/types/DataTableHeaderSelectorCell.d.ts +0 -11
  144. package/dist/types/DataTableLoader.d.ts +0 -14
  145. package/dist/types/DataTablePageSizeSelector.d.ts +0 -18
  146. package/dist/types/DataTablePagination.d.ts +0 -16
  147. package/dist/types/DataTableRow.d.ts +0 -35
  148. package/dist/types/DataTableRowCell.d.ts +0 -14
  149. package/dist/types/DataTableRowExpansion.d.ts +0 -10
  150. package/dist/types/DataTableRowSelectorCell.d.ts +0 -13
  151. package/dist/types/DataTableScrollArea.d.ts +0 -16
  152. package/dist/types/cssVariables.d.ts +0 -46
  153. package/dist/types/hooks/index.d.ts +0 -8
  154. package/dist/types/hooks/useElementOuterSize.d.ts +0 -6
  155. package/dist/types/hooks/useIsomorphicLayoutEffect.d.ts +0 -2
  156. package/dist/types/hooks/useLastSelectionChangeIndex.d.ts +0 -5
  157. package/dist/types/hooks/useMediaQueries.d.ts +0 -4
  158. package/dist/types/hooks/useMediaQueriesStringOrFunction.d.ts +0 -2
  159. package/dist/types/hooks/useMediaQueryStringOrFunction.d.ts +0 -2
  160. package/dist/types/hooks/useRowExpansion.d.ts +0 -17
  161. package/dist/types/hooks/useRowExpansionStatus.d.ts +0 -4
  162. package/dist/types/icons/IconArrowUp.d.ts +0 -1
  163. package/dist/types/icons/IconArrowsVertical.d.ts +0 -1
  164. package/dist/types/icons/IconDatabaseOff.d.ts +0 -1
  165. package/dist/types/icons/IconFilter.d.ts +0 -1
  166. package/dist/types/icons/IconFilterFilled.d.ts +0 -1
  167. package/dist/types/icons/IconSelector.d.ts +0 -1
  168. package/dist/types/index.d.ts +0 -3
  169. package/dist/types/types/DataTableCellClickHandler.d.ts +0 -24
  170. package/dist/types/types/DataTableColorProps.d.ts +0 -77
  171. package/dist/types/types/DataTableColumn.d.ts +0 -134
  172. package/dist/types/types/DataTableColumnGroup.d.ts +0 -33
  173. package/dist/types/types/DataTableColumnProps.d.ts +0 -15
  174. package/dist/types/types/DataTableColumnTextAlign.d.ts +0 -1
  175. package/dist/types/types/DataTableDefaultColumnProps.d.ts +0 -2
  176. package/dist/types/types/DataTableEmptyStateProps.d.ts +0 -18
  177. package/dist/types/types/DataTableLoaderProps.d.ts +0 -31
  178. package/dist/types/types/DataTableOuterBorderProps.d.ts +0 -14
  179. package/dist/types/types/DataTablePageSizeSelectorProps.d.ts +0 -19
  180. package/dist/types/types/DataTablePaginationProps.d.ts +0 -90
  181. package/dist/types/types/DataTableProps.d.ts +0 -155
  182. package/dist/types/types/DataTableRowClickHandler.d.ts +0 -15
  183. package/dist/types/types/DataTableRowExpansionCollapseProps.d.ts +0 -2
  184. package/dist/types/types/DataTableRowExpansionProps.d.ts +0 -52
  185. package/dist/types/types/DataTableScrollProps.d.ts +0 -25
  186. package/dist/types/types/DataTableSelectionProps.d.ts +0 -33
  187. package/dist/types/types/DataTableSortProps.d.ts +0 -31
  188. package/dist/types/types/DataTableSortStatus.d.ts +0 -12
  189. package/dist/types/types/DataTableVerticalAlign.d.ts +0 -1
  190. package/dist/types/types/index.d.ts +0 -17
  191. package/dist/types/types/utils.d.ts +0 -4
  192. package/dist/types/utilityClasses.d.ts +0 -7
  193. package/dist/types/utils.d.ts +0 -21
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";"use client";var Xo=Object.create;var Ge=Object.defineProperty;var $o=Object.getOwnPropertyDescriptor;var Uo=Object.getOwnPropertyNames;var Ko=Object.getPrototypeOf,Jo=Object.prototype.hasOwnProperty;var Zo=(e,t)=>{for(var a in t)Ge(e,a,{get:t[a],enumerable:!0})},Lt=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Uo(t))!Jo.call(e,o)&&o!==a&&Ge(e,o,{get:()=>t[o],enumerable:!(n=$o(t,o))||n.enumerable});return e};var N=(e,t,a)=>(a=e!=null?Xo(Ko(e)):{},Lt(t||!e||!e.__esModule?Ge(a,"default",{value:e,enumerable:!0}):a,e)),Yo=e=>Lt(Ge({},"__esModule",{value:!0}),e);var en={};Zo(en,{DataTable:()=>Ga,differenceBy:()=>ct,getRecordId:()=>w,getValueAtPath:()=>$e,humanize:()=>ke,uniqBy:()=>Re});module.exports=Yo(en);var qe=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 Be=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)(Be.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)(Be.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 Qe=require("react"),_t=typeof window<"u"?Qe.useLayoutEffect:Qe.useEffect;var Xe=require("react");function Ot(e){let[t,a]=(0,Xe.useState)(null),n=e?.join(":")||"";return(0,Xe.useEffect)(()=>{a(null)},[n]),{lastSelectionChangeIndex:t,setLastSelectionChangeIndex:a}}var ce=require("react");function qo(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 jo(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:jo(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)),qo(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 $e(e,t){return t?t.match(/([^[.\]])+/g).reduce((n,o)=>n&&n[o],e):void 0}function w(e,t){return typeof t=="string"?$e(e,t):t(e)}function $t({rowExpansion:e,records:t,idAccessor:a}){let n=[];if(e&&t){let{trigger:l,allowMultiple:p,initiallyExpanded:s}=e;t&&l==="always"?n=t.map(m=>w(m,a)):s&&(n=t.filter((m,f)=>s({record:m,index:f})).map(m=>w(m,a)),p||(n=[n[0]]))}let o,r,i=(0,Xt.useState)(n);if(e){let{trigger:l,allowMultiple:p,collapseProps:s,content:m}=e;e.expanded?{recordIds:o,onRecordIdsChange:r}=e.expanded:[o,r]=i;let f=b=>r?.(o.filter(d=>d!==w(b,a)));return{expandOnClick:l!=="always"&&l!=="never",isRowExpanded:b=>l==="always"?!0:o.includes(w(b,a)),expandRow:b=>{let d=w(b,a);r?.(p?[...o,d]:[d])},collapseRow:f,collapseProps:s,content:({record:b,index:d})=>()=>m({record:b,index:d,collapse:()=>f(b)})}}}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,selectorCellShadowVisible:i,scrollDiff:l},p){let s=l<0;return(0,fe.jsx)(be.TableTfoot,{ref:p,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:m,...f})=>{if(m)return null;let{accessor:b,visibleMediaQuery:d,textAlign:u,width:T,footer:g,footerClassName:C,footerStyle:R,noWrap:A,ellipsis:v}={...o,...f};return(0,fe.jsx)(Yt,{className:C,style:R,visibleMediaQuery:d,textAlign:u,width:T,title:g,noWrap:A,ellipsis:v},b)})]})})});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),p=(0,ut.useMemo)(()=>t.filter(({hidden:s},m)=>!s&&l?.[m]).length,[t,l]);return p>0?(0,sa.jsx)(ra.TableTh,{colSpan:p,className:(0,la.default)("mantine-datatable-column-group-header-cell",{[$]:n==="left",[U]:n==="center",[K]:n==="right"},o),style:r,children:a??ke(e)}):null}var z=require("@mantine/core"),Ue=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:p,sortStatus:s,onSortStatusChange:m,filter:f,filtering:b}){if(!Q(n))return null;let d=o??ke(a),u=typeof d=="string"?d:void 0,T=r&&m?g=>{g?.defaultPrevented||m({columnAccessor:a,direction:s?.columnAccessor===a?s.direction==="asc"?"desc":"asc":s?.direction??"asc"})}:void 0;return(0,D.jsx)(z.TableTh,{className:(0,Ue.default)({"mantine-datatable-header-cell-sortable":r},e),style:[{width:p,minWidth:p,maxWidth:p},t],role:r?"button":void 0,tabIndex:r?0:void 0,onClick:T,onKeyDown:g=>g.key==="Enter"&&T?.(),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,Ue.default)("mantine-datatable-header-cell-sortable-text",{[$]:l==="left",[U]:l==="center",[K]:l==="right"},me,ue),title:u,children:d}),r||s?.columnAccessor===a?(0,D.jsx)(D.Fragment,{children:s?.columnAccessor===a?(0,D.jsx)(z.Center,{className:(0,Ue.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,f?(0,D.jsx)(ma,{isActive:!!b,children:f}):null]})})}var Ke=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)(Ke.TableTh,{className:"mantine-datatable-header-selector-cell",rowSpan:r,"data-shadow-visible":e||void 0,children:(0,ft.jsx)(Ke.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:p,selectionVisible:s,selectionChecked:m,selectionIndeterminate:f,onSelectionChange:b,selectionCheckboxProps:d,selectorCellShadowVisible:u},T){let g=s?(0,J.jsx)(Ta,{shadowVisible:u,checked:m,indeterminate:f,checkboxProps:d,onChange:b,rowSpan:p?2:void 0}):null;return(0,J.jsxs)(Ie.TableThead,{className:(0,ha.default)("mantine-datatable-header",t),style:a,ref:T,children:[p&&(0,J.jsxs)(Ie.TableTr,{children:[g,p.map(C=>(0,J.jsx)(ia,{group:C},C.id))]}),(0,J.jsxs)(Ie.TableTr,{children:[!p&&g,i.map(({hidden:C,...R})=>{if(C)return null;let{accessor:A,visibleMediaQuery:v,textAlign:P,width:M,title:S,sortable:L,titleClassName:x,titleStyle:q,filter:ge,filtering:Ce}={...l,...R};return(0,J.jsx)(ba,{accessor:A,className:x,style:q,visibleMediaQuery:v,textAlign:P,width:M,title:S,sortable:L,sortStatus:n,sortIcons:o,onSortStatusChange:r,filter:ge,filtering:Ce},A)})]})]})});var Je=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)(Je.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)(Je.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 y(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":y(t,e,"light"),"--mantine-datatable-color-dark":y(t,e,"dark"),"--mantine-datatable-background-color-light":y(a,e,"light"),"--mantine-datatable-background-color-dark":y(a,e,"dark"),"--mantine-datatable-border-color-light":y(n,e,"light"),"--mantine-datatable-border-color-dark":y(n,e,"dark"),"--mantine-datatable-row-border-color-light":y(o,e,"light"),"--mantine-datatable-row-border-color-dark":y(o,e,"dark"),"--mantine-datatable-striped-color-light":y(r,e,"light"),"--mantine-datatable-striped-color-dark":y(r,e,"dark"),"--mantine-datatable-highlight-on-hover-color-light":y(i,e,"light"),"--mantine-datatable-highlight-on-hover-color-dark":y(i,e,"dark")}}function Ze({theme:e,paginationActiveTextColor:t,paginationActiveBackgroundColor:a}){return{"--mantine-datatable-pagination-active-text-color-light":y(t,e,"light"),"--mantine-datatable-pagination-active-text-color-dark":y(t,e,"dark"),"--mantine-datatable-pagination-active-background-color-light":y(a,e,"light"),"--mantine-datatable-pagination-active-background-color-dark":y(a,e,"dark")}}function xa({theme:e,color:t,backgroundColor:a}){return{"--mantine-datatable-row-color-light":y(t,e,"light"),"--mantine-datatable-row-color-dark":y(t,e,"dark"),"--mantine-datatable-row-background-color-light":y(a,e,"light"),"--mantine-datatable-row-background-color-dark":y(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 p=l===n;return(0,V.jsx)(h.MenuItem,{className:(0,ka.default)({"mantine-datatable-page-size-selector-active":p}),style:[{height:Da[e]},p&&(o||r)?s=>Ze({theme:s,paginationActiveTextColor:o,paginationActiveBackgroundColor:r}):void 0],disabled:p,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:p,paginationSize:s,loadingText:m,noRecordsText:f,paginationText:b,totalRecords:d,recordsPerPage:u,onRecordsPerPageChange:T,recordsPerPageLabel:g,recordsPerPageOptions:C,recordsLength:R,horizontalSpacing:A,paginationWrapBreakpoint:v,getPaginationControlProps:P},M){let S;if(n)S=m;else if(!d)S=f;else{let x=(o-1)*u+1,q=x+R-1;S=b({from:x,to:q,totalRecords:d})}let L=Q(({breakpoints:x})=>`(min-width: ${typeof v=="number"?`${(0,Z.rem)(v)}rem`:x[v]||v})`);return(0,he.jsxs)(Z.Box,{ref:M,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:S}),C&&(0,he.jsx)(Ra,{activeTextColor:l,activeBackgroundColor:p,size:s,label:g,values:C,value:u,onChange:T}),(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||p?x=>Ze({theme:x,paginationActiveTextColor:l,paginationActiveBackgroundColor:p}):void 0,withEdges:i,value:o,onChange:r,size:s,total:Math.ceil(d/u),getControlProps:P})]})});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:p,textAlign:s,width:m,accessor:f,render:b,defaultRender:d,customCellAttributes:u}){return Q(a)?(0,Ha.jsx)(Na.TableTd,{className:(0,Ia.default)({[me]:l||p,[ue]:p,[X]:r,[$]:s==="left",[U]:s==="center",[K]:s==="right"},e),style:[{width:m,minWidth:m,maxWidth:m},t],onClick:r,onContextMenu:i,...u?.(n,o),children:b?b(n,o):d?d(n,o,f):$e(n,f)}):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 Ye=require("@mantine/core");var ht=require("react/jsx-runtime");function Va({record:e,index:t,withRightShadow:a,getCheckboxProps:n,...o}){return(0,ht.jsx)(Ye.TableTd,{className:"mantine-datatable-row-selector-cell","data-shadow-visible":a||void 0,onClick:r=>r.stopPropagation(),children:(0,ht.jsx)(Ye.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:p,getSelectionCheckboxProps:s,onClick:m,onContextMenu:f,onCellClick:b,onCellContextMenu:d,expansion:u,customAttributes:T,color:g,backgroundColor:C,className:R,style:A,selectorCellShadowVisible:v}){return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(Aa.TableTr,{className:(0,_a.default)("mantine-datatable-row",{[X]:m||u?.expandOnClick},typeof R=="function"?R(e,t):R),"data-selected":i||void 0,onClick:P=>{if(u){let{isRowExpanded:M,expandOnClick:S,expandRow:L,collapseRow:x}=u;S&&(M(e)?x(e):L(e))}m?.({event:P,record:e,index:t})},onContextMenu:f?P=>f({event:P,record:e,index:t}):void 0,style:[g||C?P=>{let M=g?.(e,t),S=C?.(e,t);return xa({theme:P,color:M,backgroundColor:S})}:void 0,A?.(e,t)],...T?.(e,t),children:[r&&(0,W.jsx)(Va,{record:e,index:t,withRightShadow:v,checked:i,disabled:!l||(p?!p(e,t):!1),onChange:l,getCheckboxProps:s}),a.map(({hidden:P,...M},S)=>{if(P)return null;let{accessor:L,visibleMediaQuery:x,textAlign:q,noWrap:ge,ellipsis:Ce,width:je,render:et,cellsClassName:ye,cellsStyle:tt,customCellAttributes:at}={...n,...M};return(0,W.jsx)(La,{className:typeof ye=="function"?ye(e,t):ye,style:tt?.(e,t),visibleMediaQuery:x,record:e,index:t,onClick:b?we=>b({event:we,record:e,index:t,column:M,columnIndex:S}):void 0,onContextMenu:d?we=>d({event:we,record:e,index:t,column:M,columnIndex:S}):void 0,accessor:L,textAlign:q,noWrap:ge,ellipsis:Ce,width:je,render:et,defaultRender:o,customCellAttributes:at},L)})]}),u&&(0,W.jsx)(Fa,{colSpan:a.filter(({hidden:P})=>!P).length+(r?1:0),open:u.isRowExpanded(e),content:u.content({record:e,index:t}),collapseProps:u.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,rightShadowBehind:o,bottomShadowVisible:r,headerHeight:i,footerHeight:l,onScrollPositionChange:p,children:s,viewportRef:m,scrollAreaProps:f}){return(0,se.jsxs)(Y.ScrollArea,{...f,viewportRef:m,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:p,children:[s,(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:i?(0,Y.rem)(i):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-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,"mantine-datatable-scroll-area-shadow-behind":o})}),(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":r}),style:{bottom:l?(0,Y.rem)(l+1):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:p,groups:s,pinLastColumn:m,defaultColumnProps:f,defaultColumnRender:b,idAccessor:d="id",records:u,selectedRecords:T,onSelectedRecordsChange:g,isRecordSelectable:C,allRecordsSelectionCheckboxProps:R={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:A=(E,j)=>({"aria-label":`Select record ${j+1}`}),sortStatus:v,sortIcons:P,onSortStatusChange:M,horizontalSpacing:S,page:L,onPageChange:x,totalRecords:q,recordsPerPage:ge,onRecordsPerPageChange:Ce,recordsPerPageOptions:je,recordsPerPageLabel:et="Records per page",paginationWithEdges:ye,paginationActiveTextColor:tt,paginationActiveBackgroundColor:at,paginationSize:we="sm",paginationText:Ba=({from:E,to:j,totalRecords:ee})=>`${E} - ${j} / ${ee}`,paginationWrapBreakpoint:Qa="sm",getPaginationControlProps:Xa=E=>E==="previous"?{"aria-label":"Previous page"}:E==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:$a,customLoader:Ua,loaderSize:Ka,loaderType:Ja,loaderColor:Za,loadingText:Ya="...",emptyState:qa,noRecordsText:Ct="No records",noRecordsIcon:ja,highlightOnHover:eo,striped:to,noHeader:ao,onRowClick:oo,onRowContextMenu:no,onCellClick:ro,onCellContextMenu:lo,onScroll:yt,onScrollToTop:wt,onScrollToBottom:St,onScrollToLeft:Pt,onScrollToRight:xt,c:io,backgroundColor:so,borderColor:po,rowBorderColor:co,stripedColor:mo,highlightOnHoverColor:uo,rowColor:fo,rowBackgroundColor:bo,rowExpansion:To,rowClassName:ho,rowStyle:go,customRowAttributes:Co,scrollViewportRef:yo,scrollAreaProps:wo,bodyRef:So,m:Po,my:xo,mx:Mo,mt:Do,mb:ko,ml:Ro,mr:vo,className:Eo,classNames:Se,style:No,styles:Pe,...Io}){let{ref:E,width:j,height:ee}=pe(),He=(0,I.useMemo)(()=>s?.flatMap(c=>c.columns)??p,[p,s]),{ref:Lo,height:ot}=pe(),{ref:Ho,width:nt,height:xe}=pe(),{ref:Fo,height:Vo}=pe(),{ref:Ao,height:Mt}=pe(),[rt,Dt]=(0,I.useState)(!0),[lt,kt]=(0,I.useState)(!0),[Fe,Rt]=(0,I.useState)(!0),[Ve,vt]=(0,I.useState)(!0),_o=$t({rowExpansion:To,records:u,idAccessor:d}),Ae=(0,I.useCallback)(()=>{let c=E.current?.scrollTop||0,G=E.current?.scrollLeft||0;if(l||xe<=ee)Dt(!0),kt(!0);else{let H=c===0,F=xe-c-ee<1;Dt(H),kt(F),H&&H!==rt&&wt?.(),F&&F!==lt&&St?.()}if(l||nt===j)Rt(!0),vt(!0);else{let H=G===0,F=nt-G-j<1;Rt(H),vt(F),H&&H!==Fe&&Pt?.(),F&&F!==Ve&&xt?.()}},[l,St,Pt,xt,wt,ee,E,j,lt,Fe,Ve,rt,xe,nt]);_t(Ae,[Ae]);let Oo=(0,I.useCallback)(c=>{yt?.(c),Ae()},[Ae,yt]),zo=(0,I.useCallback)(c=>{E.current?.scrollTo({top:0,left:0}),x(c)},[x,E]),_e=u?.length,Et=u?.map(c=>w(c,d)),Me=!!T,De=T?.map(c=>w(c,d)),Nt=Et!==void 0&&De!==void 0&&De.length>0,it=C?u?.filter(C):u,Oe=it?.map(c=>w(c,d)),ze=Nt&&Oe.every(c=>De.includes(c)),Wo=Nt&&Oe.some(c=>De.includes(c)),Go=(0,I.useCallback)(()=>{T&&g&&g(ze?T.filter(c=>!Oe.includes(w(c,d))):Re([...T,...it],c=>w(c,d)))},[ze,d,g,Oe,it,T]),{lastSelectionChangeIndex:We,setLastSelectionChangeIndex:Bo}=Ot(Et),st=Me&&!Fe;return(0,k.jsxs)(qe.Box,{...{m:Po,my:xo,mx:Mo,mt:Do,mb:ko,ml:Ro,mr:vo},className:(0,gt.default)("mantine-datatable",{"mantine-datatable-with-border":e},Eo,Se?.root),style:[c=>({...Pa({theme:c,c:io,backgroundColor:so,borderColor:po,rowBorderColor:co,stripedColor:mo,highlightOnHoverColor:uo}),borderRadius:c.radius[t]||t,boxShadow:c.shadows[r]||r,height:n,minHeight:o}),No,Pe?.root],children:[(0,k.jsx)(za,{viewportRef:(0,Wa.useMergedRef)(E,yo),topShadowVisible:!rt,leftShadowVisible:!Fe,leftShadowBehind:Me,rightShadowVisible:!Ve,rightShadowBehind:m,bottomShadowVisible:!lt,headerHeight:ot,footerHeight:Vo,onScrollPositionChange:Oo,scrollAreaProps:wo,children:(0,k.jsxs)(qe.Table,{ref:Ho,horizontalSpacing:S,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-last-row-border-bottom-visible":xe<ee,"mantine-datatable-pin-last-column":m,"mantine-datatable-pin-last-column-scrolled":!Ve&&m},Se?.table),style:Pe?.table,"data-striped":_e&&to||void 0,"data-highlight-on-hover":eo||void 0,...Io,children:[ao?null:(0,k.jsx)(Ca,{ref:Lo,className:Se?.header,style:Pe?.header,columns:He,defaultColumnProps:f,groups:s,sortStatus:v,sortIcons:P,onSortStatusChange:M,selectionVisible:Me,selectionChecked:ze,selectionIndeterminate:Wo&&!ze,onSelectionChange:Go,selectionCheckboxProps:R,selectorCellShadowVisible:st}),(0,k.jsx)("tbody",{ref:So,children:_e?u.map((c,G)=>{let H=w(c,d),F=De?.includes(H)||!1,It;return g&&T&&(It=Qo=>{if(Qo.nativeEvent.shiftKey&&We!==null){let de=u.filter(G>We?(te,ae)=>ae>=We&&ae<=G&&(C?C(te,ae):!0):(te,ae)=>ae>=G&&ae<=We&&(C?C(te,ae):!0));g(F?ct(T,de,te=>w(te,d)):Re([...T,...de],te=>w(te,d)))}else g(F?T.filter(de=>w(de,d)!==H):Re([...T,c],de=>w(de,d)));Bo(G)}),(0,k.jsx)(Oa,{record:c,index:G,columns:He,defaultColumnProps:f,defaultColumnRender:b,selectionVisible:Me,selectionChecked:F,onSelectionChange:It,isRecordSelectable:C,getSelectionCheckboxProps:A,onClick:oo,onCellClick:ro,onContextMenu:no,onCellContextMenu:lo,expansion:_o,color:fo,backgroundColor:bo,className:ho,style:go,customAttributes:Co,selectorCellShadowVisible:st},H)}):(0,k.jsx)(Ht,{})}),He.some(({footer:c})=>c)&&(0,k.jsx)(na,{ref:Fo,className:Se?.footer,style:Pe?.footer,columns:He,defaultColumnProps:f,selectionVisible:Me,selectorCellShadowVisible:st,scrollDiff:xe-ee})]})}),L&&(0,k.jsx)(Ea,{ref:Ao,className:Se?.pagination,style:Pe?.pagination,horizontalSpacing:S,fetching:l,page:L,onPageChange:zo,totalRecords:q,recordsPerPage:ge,onRecordsPerPageChange:Ce,recordsPerPageOptions:je,recordsPerPageLabel:et,paginationWithEdges:ye,paginationActiveTextColor:tt,paginationActiveBackgroundColor:at,paginationSize:we,paginationText:Ba,paginationWrapBreakpoint:Qa,getPaginationControlProps:Xa,noRecordsText:Ct,loadingText:Ya,recordsLength:_e}),(0,k.jsx)(wa,{pt:ot,pb:Mt,fetching:l,backgroundBlur:$a,customContent:Ua,size:Ka,type:Ja,color:Za}),(0,k.jsx)(Vt,{pt:ot,pb:Mt,icon:ja,text:Ct,active:!l&&!_e,children:qa})]})}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 pinLastColumn,\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 rightShadowBehind={pinLastColumn}\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-last-row-border-bottom-visible': tableHeight < scrollViewportHeight,\n 'mantine-datatable-pin-last-column': pinLastColumn,\n 'mantine-datatable-pin-last-column-scrolled': !scrolledToRight && pinLastColumn,\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 selectorCellShadowVisible={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 selectorCellShadowVisible={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 selectorCellShadowVisible={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 selectorCellShadowVisible: 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 selectorCellShadowVisible,\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={selectorCellShadowVisible} />}\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 selectorCellShadowVisible: 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 selectorCellShadowVisible,\n }: DataTableHeaderProps<T>,\n ref: React.ForwardedRef<HTMLTableSectionElement>\n) {\n const allRecordsSelectorCell = selectionVisible ? (\n <DataTableHeaderSelectorCell\n shadowVisible={selectorCellShadowVisible}\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 'mantine-datatable-column-group-header-cell',\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 selectorCellShadowVisible: 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 selectorCellShadowVisible,\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={selectorCellShadowVisible}\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 rightShadowBehind: boolean | undefined;\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 rightShadowBehind,\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-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 'mantine-datatable-scroll-area-shadow-behind': rightShadowBehind,\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 style={{ bottom: footerHeight ? rem(footerHeight + 1) : 0 }}\n />\n </ScrollArea>\n );\n}\n"],"mappings":"2lBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,eAAAE,GAAA,iBAAAC,GAAA,gBAAAC,EAAA,mBAAAC,GAAA,aAAAC,GAAA,WAAAC,KAAA,eAAAC,GAAAR,ICAA,IAAAS,GAA6C,yBAC7CC,GAA6B,0BAC7BC,GAAiB,mBACjBC,EAA+C,iBCAzC,IAAAC,GAAA,6BAHC,SAASC,IAAoB,CAClC,SACE,QAAC,MAAG,UAAU,8BACZ,oBAA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,EACF,EACCnE,MACC,OAACyI,GAAA,CACC,IAAK3D,GACL,UAAWjB,IAAY,WACvB,MAAOE,IAAQ,WACf,kBAAmBhE,EACnB,SAAUlB,EACV,KAAMmB,EACN,aAAcoG,GACd,aAAclG,EACd,eAAgBC,GAChB,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,SAAUlG,EACV,eAAgBoC,GAChB,cAAeC,GACf,KAAMC,GACN,KAAMC,GACN,MAAOC,GACT,KACA,OAACsH,GAAA,CACC,GAAInE,GACJ,GAAIO,GACJ,KAAMtD,GACN,KAAMD,GACN,OAAQ,CAAC3C,GAAY,CAACwH,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","selectorCellShadowVisible","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","selectorCellShadowVisible","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","selectorCellShadowVisible","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","rightShadowBehind","bottomShadowVisible","headerHeight","footerHeight","onScrollPositionChange","children","viewportRef","scrollAreaProps","clsx","import_jsx_runtime","DataTable","withTableBorder","borderRadius","textSelectionDisabled","height","minHeight","shadow","verticalAlign","fetching","columns","groups","pinLastColumn","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 Wn,Table as Gn}from"@mantine/core";import{useMergedRef as Bn}from"@mantine/hooks";import la from"clsx";import{useCallback as Me,useMemo as Qn,useState as De}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 co,Text as mo}from"@mantine/core";import{jsx as re,jsxs as po}from"react/jsx-runtime";function it(){return po("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 uo,jsx as Te,jsxs as fo}from"react/jsx-runtime";function st({icon:e,text:t,pt:a,pb:o,active:n,children:r}){return Te(co,{pt:a,pb:o,className:"mantine-datatable-empty-state","data-active":n||void 0,children:r||fo(uo,{children:[e||Te("div",{className:"mantine-datatable-empty-state-icon",children:Te(it,{})}),Te(mo,{size:"sm",c:"dimmed",children:t})]})})}import{TableTfoot as Fo,TableTr as Vo,rem as Ao}from"@mantine/core";import _o from"clsx";import{forwardRef as Oo}from"react";import{TableTh as Eo}from"@mantine/core";import No from"clsx";import{useResizeObserver as bo}from"@mantine/hooks";function U(){let[e]=bo(),{width:t,height:a}=e.current?.getBoundingClientRect()||{width:0,height:0};return{ref:e,width:t,height:a}}import{useEffect as To,useLayoutEffect as ho}from"react";var dt=typeof window<"u"?ho:To;import{useEffect as go,useState as Co}from"react";function pt(e){let[t,a]=Co(null),o=e?.join(":")||"";return go(()=>{a(null)},[o]),{lastSelectionChangeIndex:t,setLastSelectionChangeIndex:a}}import{useEffect as yo,useRef as wo,useState as So}from"react";function Po(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 xo(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]=So(a?t:xo(e,t)),r=wo();return yo(()=>{if("matchMedia"in window)return r.current=e.map(i=>window.matchMedia(i)),n(r.current.map(i=>i.matches)),Po(r.current,i=>{n(i)})},[e]),o}import{useMantineTheme as Mo}from"@mantine/core";import{useMemo as mt}from"react";function ut(e){let t=Mo(),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 Do}from"@mantine/core";import{useMediaQuery as ko}from"@mantine/hooks";function H(e){let t=Do(),a=typeof e=="function"?e(t):e;return ko(a||"",!0)}import{useState as Ro}from"react";function he(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 ge(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 y(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:p,initiallyExpanded:s}=e;t&&l==="always"?o=t.map(m=>y(m,a)):s&&(o=t.filter((m,f)=>s({record:m,index:f})).map(m=>y(m,a)),p||(o=[o[0]]))}let n,r,i=Ro(o);if(e){let{trigger:l,allowMultiple:p,collapseProps:s,content:m}=e;e.expanded?{recordIds:n,onRecordIdsChange:r}=e.expanded:[n,r]=i;let f=b=>r?.(n.filter(d=>d!==y(b,a)));return{expandOnClick:l!=="always"&&l!=="never",isRowExpanded:b=>l==="always"?!0:n.includes(y(b,a)),expandRow:b=>{let d=y(b,a);r?.(p?[...n,d]:[d])},collapseRow:f,collapseProps:s,content:({record:b,index:d})=>()=>m({record:b,index:d,collapse:()=>f(b)})}}}import{useTimeout as Tt}from"@mantine/hooks";import{useEffect as vo,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 vo(()=>{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 Io}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)?Io(Eo,{className:No({[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 Lo}from"@mantine/core";import{jsx as Ho}from"react/jsx-runtime";function wt({shadowVisible:e}){return Ho(Lo,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":e||void 0})}import{jsx as _e,jsxs as zo}from"react/jsx-runtime";var St=Oo(function({className:t,style:a,columns:o,defaultColumnProps:n,selectionVisible:r,selectorCellShadowVisible:i,scrollDiff:l},p){let s=l<0;return _e(Fo,{ref:p,className:_o("mantine-datatable-footer",t),style:[{position:s?"relative":"sticky",bottom:Ao(s?l:0)},a],children:zo(Vo,{children:[r&&_e(wt,{shadowVisible:i}),o.map(({hidden:m,...f})=>{if(m)return null;let{accessor:b,visibleMediaQuery:d,textAlign:u,width:T,footer:h,footerClassName:g,footerStyle:M,noWrap:N,ellipsis:D}={...n,...f};return _e(yt,{className:g,style:M,visibleMediaQuery:d,textAlign:u,width:T,title:h,noWrap:N,ellipsis:D},b)})]})})});import{TableThead as rn,TableTr as At}from"@mantine/core";import ln from"clsx";import{forwardRef as sn}from"react";import{TableTh as Wo}from"@mantine/core";import Go from"clsx";import{useMemo as Pt}from"react";import{jsx as Bo}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),p=Pt(()=>t.filter(({hidden:s},m)=>!s&&l?.[m]).length,[t,l]);return p>0?Bo(Wo,{colSpan:p,className:Go("mantine-datatable-column-group-header-cell",{[V]:o==="left",[A]:o==="center",[_]:o==="right"},n),style:r,children:a??he(e)}):null}import{Box as qo,Center as Lt,Group as jo,TableTh as en}from"@mantine/core";import Oe from"clsx";import{ActionIcon as $o,Popover as vt,PopoverTarget as Uo}from"@mantine/core";import{useDisclosure as Ko}from"@mantine/hooks";import{jsx as Mt,jsxs as Qo}from"react/jsx-runtime";function Dt(){return Qo("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 Xo}from"react/jsx-runtime";function Rt(){return Xo("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 Ce,jsxs as Jo}from"react/jsx-runtime";function Et({children:e,isActive:t}){let[a,{close:o,toggle:n}]=Ko(!1);return Jo(vt,{withArrow:!0,withinPortal:!0,shadow:"md",opened:a,onClose:o,trapFocus:!0,children:[Ce(Uo,{children:Ce($o,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":t||void 0,size:"sm",variant:"default",onClick:i=>{i.preventDefault(),n()},children:Ce(t?Rt:Dt,{})})}),Ce(vt.Dropdown,{onClick:i=>i.preventDefault(),children:typeof e=="function"?e({close:o}):e})]})}import{jsx as ye,jsxs as Zo}from"react/jsx-runtime";function Nt(){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:"M12 5l0 14"}),ye("path",{d:"M16 9l-4 -4"}),ye("path",{d:"M8 9l4 -4"})]})}import{jsx as we,jsxs as Yo}from"react/jsx-runtime";function It(){return Yo("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[we("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),we("path",{d:"M8 7l4 -4l4 4"}),we("path",{d:"M8 17l4 4l4 -4"}),we("path",{d:"M12 3l0 18"})]})}import{Fragment as tn,jsx as O,jsxs as an}from"react/jsx-runtime";function Ht({className:e,style:t,accessor:a,visibleMediaQuery:o,title:n,sortable:r,sortIcons:i,textAlign:l,width:p,sortStatus:s,onSortStatusChange:m,filter:f,filtering:b}){if(!H(o))return null;let d=n??he(a),u=typeof d=="string"?d:void 0,T=r&&m?h=>{h?.defaultPrevented||m({columnAccessor:a,direction:s?.columnAccessor===a?s.direction==="asc"?"desc":"asc":s?.direction??"asc"})}:void 0;return O(en,{className:Oe({"mantine-datatable-header-cell-sortable":r},e),style:[{width:p,minWidth:p,maxWidth:p},t],role:r?"button":void 0,tabIndex:r?0:void 0,onClick:T,onKeyDown:h=>h.key==="Enter"&&T?.(),children:an(jo,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[O(qo,{className:Oe("mantine-datatable-header-cell-sortable-text",{[V]:l==="left",[A]:l==="center",[_]:l==="right"},K,J),title:u,children:d}),r||s?.columnAccessor===a?O(tn,{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,f?O(Et,{isActive:!!b,children:f}):null]})})}import{Checkbox as on,TableTh as nn}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(nn,{className:"mantine-datatable-header-selector-cell",rowSpan:r,"data-shadow-visible":e||void 0,children:Ft(on,{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=sn(function({className:t,style:a,sortStatus:o,sortIcons:n,onSortStatusChange:r,columns:i,defaultColumnProps:l,groups:p,selectionVisible:s,selectionChecked:m,selectionIndeterminate:f,onSelectionChange:b,selectionCheckboxProps:d,selectorCellShadowVisible:u},T){let h=s?ze(Vt,{shadowVisible:u,checked:m,indeterminate:f,checkboxProps:d,onChange:b,rowSpan:p?2:void 0}):null;return We(rn,{className:ln("mantine-datatable-header",t),style:a,ref:T,children:[p&&We(At,{children:[h,p.map(g=>ze(xt,{group:g},g.id))]}),We(At,{children:[!p&&h,i.map(({hidden:g,...M})=>{if(g)return null;let{accessor:N,visibleMediaQuery:D,textAlign:S,width:x,title:w,sortable:R,titleClassName:P,titleStyle:z,filter:Z,filtering:Y}={...l,...M};return ze(Ht,{accessor:N,className:P,style:z,visibleMediaQuery:D,textAlign:S,width:x,title:w,sortable:R,sortStatus:o,sortIcons:n,onSortStatusChange:r,filter:Z,filtering:Y},N)})]})]})});import{Center as dn,Loader as pn}from"@mantine/core";import cn 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(dn,{pt:e,pb:t,className:cn("mantine-datatable-loader",{"mantine-datatable-loader-fetching":a}),style:[{backdropFilter:n?`blur(${n}px)`:void 0}],children:a&&(o||Ot(pn,{size:r,type:i,color:l}))})}import{Box as wn,Pagination as Sn,Text as Pn,rem as xn}from"@mantine/core";import Kt from"clsx";import{forwardRef as Mn}from"react";import{Button as fn,Group as bn,Menu as Tn,MenuDropdown as hn,MenuItem as gn,MenuTarget as Cn,Text as Qt,rem as le}from"@mantine/core";import yn from"clsx";import{parseThemeColor as mn}from"@mantine/core";function C(e,t,a){return e?mn({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":C(t,e,"light"),"--mantine-datatable-color-dark":C(t,e,"dark"),"--mantine-datatable-background-color-light":C(a,e,"light"),"--mantine-datatable-background-color-dark":C(a,e,"dark"),"--mantine-datatable-border-color-light":C(o,e,"light"),"--mantine-datatable-border-color-dark":C(o,e,"dark"),"--mantine-datatable-row-border-color-light":C(n,e,"light"),"--mantine-datatable-row-border-color-dark":C(n,e,"dark"),"--mantine-datatable-striped-color-light":C(r,e,"light"),"--mantine-datatable-striped-color-dark":C(r,e,"dark"),"--mantine-datatable-highlight-on-hover-color-light":C(i,e,"light"),"--mantine-datatable-highlight-on-hover-color-dark":C(i,e,"dark")}}function Se({theme:e,paginationActiveTextColor:t,paginationActiveBackgroundColor:a}){return{"--mantine-datatable-pagination-active-text-color-light":C(t,e,"light"),"--mantine-datatable-pagination-active-text-color-dark":C(t,e,"dark"),"--mantine-datatable-pagination-active-background-color-light":C(a,e,"light"),"--mantine-datatable-pagination-active-background-color-dark":C(a,e,"dark")}}function Gt({theme:e,color:t,backgroundColor:a}){return{"--mantine-datatable-row-color-light":C(t,e,"light"),"--mantine-datatable-row-color-dark":C(t,e,"dark"),"--mantine-datatable-row-background-color-light":C(a,e,"light"),"--mantine-datatable-row-background-color-dark":C(a,e,"dark")}}import{jsx as Ge,jsxs as un}from"react/jsx-runtime";function Bt(){return un("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(bn,{gap:"xs",children:[X(Qt,{size:e,children:t}),$t(Tn,{withinPortal:!0,withArrow:!0,children:[X(Cn,{children:X(fn,{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(hn,{children:a.map(l=>{let p=l===o;return X(gn,{className:yn({"mantine-datatable-page-size-selector-active":p}),style:[{height:Xt[e]},p&&(n||r)?s=>Se({theme:s,paginationActiveTextColor:n,paginationActiveBackgroundColor:r}):void 0],disabled:p,onClick:()=>i(l),children:X(Qt,{size:e,children:l})},l)})})]})]})}import{jsx as Be,jsxs as Dn}from"react/jsx-runtime";var Jt=Mn(function({className:t,style:a,fetching:o,page:n,onPageChange:r,paginationWithEdges:i,paginationActiveTextColor:l,paginationActiveBackgroundColor:p,paginationSize:s,loadingText:m,noRecordsText:f,paginationText:b,totalRecords:d,recordsPerPage:u,onRecordsPerPageChange:T,recordsPerPageLabel:h,recordsPerPageOptions:g,recordsLength:M,horizontalSpacing:N,paginationWrapBreakpoint:D,getPaginationControlProps:S},x){let w;if(o)w=m;else if(!d)w=f;else{let P=(n-1)*u+1,z=P+M-1;w=b({from:P,to:z,totalRecords:d})}let R=H(({breakpoints:P})=>`(min-width: ${typeof D=="number"?`${xn(D)}rem`:P[D]||D})`);return Dn(wn,{ref:x,px:N??"xs",py:"xs",className:Kt("mantine-datatable-pagination",t),style:[{flexDirection:R?"row":"column"},a],children:[Be(Pn,{className:"mantine-datatable-pagination-text",size:s,children:w}),g&&Be(Ut,{activeTextColor:l,activeBackgroundColor:p,size:s,label:h,values:g,value:u,onChange:T}),Be(Sn,{classNames:{root:Kt("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":o||!M}),control:"mantine-datatable-pagination-pages-control"},style:l||p?P=>Se({theme:P,paginationActiveTextColor:l,paginationActiveBackgroundColor:p}):void 0,withEdges:i,value:n,onChange:r,size:s,total:Math.ceil(d/u),getControlProps:S})]})});import{TableTr as Vn}from"@mantine/core";import An from"clsx";import{TableTd as kn}from"@mantine/core";import Rn from"clsx";import{jsx as vn}from"react/jsx-runtime";function Zt({className:e,style:t,visibleMediaQuery:a,record:o,index:n,onClick:r,onContextMenu:i,noWrap:l,ellipsis:p,textAlign:s,width:m,accessor:f,render:b,defaultRender:d,customCellAttributes:u}){return H(a)?vn(kn,{className:Rn({[K]:l||p,[J]:p,[F]:r,[V]:s==="left",[A]:s==="center",[_]:s==="right"},e),style:[{width:m,minWidth:m,maxWidth:m},t],onClick:r,onContextMenu:i,...u?.(o,n),children:b?b(o,n):d?d(o,n,f):Ae(o,f)}):null}import{Collapse as En,TableTd as Nn,TableTr as Yt}from"@mantine/core";import{Fragment as In,jsx as ie,jsxs as Ln}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?Ln(In,{children:[ie(Yt,{}),ie(Yt,{children:ie(Nn,{className:"mantine-datatable-row-expansion-cell",colSpan:t,children:ie(En,{in:n,...o,children:ie("div",{className:"mantine-datatable-row-expansion-cell-content",children:a()})})})})]}):null}import{Checkbox as Hn,TableTd as Fn}from"@mantine/core";import{jsx as jt}from"react/jsx-runtime";function ea({record:e,index:t,withRightShadow:a,getCheckboxProps:o,...n}){return jt(Fn,{className:"mantine-datatable-row-selector-cell","data-shadow-visible":a||void 0,onClick:r=>r.stopPropagation(),children:jt(Hn,{classNames:{input:F},...n,...o(e,t)})})}import{Fragment as _n,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:p,getSelectionCheckboxProps:s,onClick:m,onContextMenu:f,onCellClick:b,onCellContextMenu:d,expansion:u,customAttributes:T,color:h,backgroundColor:g,className:M,style:N,selectorCellShadowVisible:D}){return ta(_n,{children:[ta(Vn,{className:An("mantine-datatable-row",{[F]:m||u?.expandOnClick},typeof M=="function"?M(e,t):M),"data-selected":i||void 0,onClick:S=>{if(u){let{isRowExpanded:x,expandOnClick:w,expandRow:R,collapseRow:P}=u;w&&(x(e)?P(e):R(e))}m?.({event:S,record:e,index:t})},onContextMenu:f?S=>f({event:S,record:e,index:t}):void 0,style:[h||g?S=>{let x=h?.(e,t),w=g?.(e,t);return Gt({theme:S,color:x,backgroundColor:w})}:void 0,N?.(e,t)],...T?.(e,t),children:[r&&Qe(ea,{record:e,index:t,withRightShadow:D,checked:i,disabled:!l||(p?!p(e,t):!1),onChange:l,getCheckboxProps:s}),a.map(({hidden:S,...x},w)=>{if(S)return null;let{accessor:R,visibleMediaQuery:P,textAlign:z,noWrap:Z,ellipsis:Y,width:ke,render:Re,cellsClassName:q,cellsStyle:ve,customCellAttributes:Ee}={...o,...x};return Qe(Zt,{className:typeof q=="function"?q(e,t):q,style:ve?.(e,t),visibleMediaQuery:P,record:e,index:t,onClick:b?j=>b({event:j,record:e,index:t,column:x,columnIndex:w}):void 0,onContextMenu:d?j=>d({event:j,record:e,index:t,column:x,columnIndex:w}):void 0,accessor:R,textAlign:z,noWrap:Z,ellipsis:Y,width:ke,render:Re,defaultRender:n,customCellAttributes:Ee},R)})]}),u&&Qe(qt,{colSpan:a.filter(({hidden:S})=>!S).length+(r?1:0),open:u.isRowExpanded(e),content:u.content({record:e,index:t}),collapseProps:u.collapseProps})]})}import{Box as oa,ScrollArea as On,rem as na}from"@mantine/core";import Pe from"clsx";import{jsx as xe,jsxs as zn}from"react/jsx-runtime";function ra({topShadowVisible:e,leftShadowVisible:t,leftShadowBehind:a,rightShadowVisible:o,rightShadowBehind:n,bottomShadowVisible:r,headerHeight:i,footerHeight:l,onScrollPositionChange:p,children:s,viewportRef:m,scrollAreaProps:f}){return zn(On,{...f,viewportRef:m,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:p,children:[s,xe(oa,{className:Pe("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow",{"mantine-datatable-scroll-area-shadow-visible":e}),style:{top:i?na(i):0}}),xe("div",{className:Pe("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-visible":t,"mantine-datatable-scroll-area-shadow-behind":a})}),xe("div",{className:Pe("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-visible":o,"mantine-datatable-scroll-area-shadow-behind":n})}),xe(oa,{className:Pe("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow",{"mantine-datatable-scroll-area-shadow-visible":r}),style:{bottom:l?na(l+1):0}})]})}import{jsx as I,jsxs as ia}from"react/jsx-runtime";function Xn({withTableBorder:e,borderRadius:t,textSelectionDisabled:a,height:o="100%",minHeight:n,shadow:r,verticalAlign:i="center",fetching:l,columns:p,groups:s,pinLastColumn:m,defaultColumnProps:f,defaultColumnRender:b,idAccessor:d="id",records:u,selectedRecords:T,onSelectedRecordsChange:h,isRecordSelectable:g,allRecordsSelectionCheckboxProps:M={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:N=(k,W)=>({"aria-label":`Select record ${W+1}`}),sortStatus:D,sortIcons:S,onSortStatusChange:x,horizontalSpacing:w,page:R,onPageChange:P,totalRecords:z,recordsPerPage:Z,onRecordsPerPageChange:Y,recordsPerPageOptions:ke,recordsPerPageLabel:Re="Records per page",paginationWithEdges:q,paginationActiveTextColor:ve,paginationActiveBackgroundColor:Ee,paginationSize:j="sm",paginationText:sa=({from:k,to:W,totalRecords:G})=>`${k} - ${W} / ${G}`,paginationWrapBreakpoint:da="sm",getPaginationControlProps:pa=k=>k==="previous"?{"aria-label":"Previous page"}:k==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:ca,customLoader:ma,loaderSize:ua,loaderType:fa,loaderColor:ba,loadingText:Ta="...",emptyState:ha,noRecordsText:Xe="No records",noRecordsIcon:ga,highlightOnHover:Ca,striped:ya,noHeader:wa,onRowClick:Sa,onRowContextMenu:Pa,onCellClick:xa,onCellContextMenu:Ma,onScroll:$e,onScrollToTop:Ue,onScrollToBottom:Ke,onScrollToLeft:Je,onScrollToRight:Ze,c:Da,backgroundColor:ka,borderColor:Ra,rowBorderColor:va,stripedColor:Ea,highlightOnHoverColor:Na,rowColor:Ia,rowBackgroundColor:La,rowExpansion:Ha,rowClassName:Fa,rowStyle:Va,customRowAttributes:Aa,scrollViewportRef:_a,scrollAreaProps:Oa,bodyRef:za,m:Wa,my:Ga,mx:Ba,mt:Qa,mb:Xa,ml:$a,mr:Ua,className:Ka,classNames:ee,style:Ja,styles:te,...Za}){let{ref:k,width:W,height:G}=U(),se=Qn(()=>s?.flatMap(c=>c.columns)??p,[p,s]),{ref:Ya,height:Ne}=U(),{ref:qa,width:Ie,height:ae}=U(),{ref:ja,height:eo}=U(),{ref:to,height:Ye}=U(),[Le,qe]=De(!0),[He,je]=De(!0),[de,et]=De(!0),[pe,tt]=De(!0),ao=bt({rowExpansion:Ha,records:u,idAccessor:d}),ce=Me(()=>{let c=k.current?.scrollTop||0,L=k.current?.scrollLeft||0;if(l||ae<=G)qe(!0),je(!0);else{let v=c===0,E=ae-c-G<1;qe(v),je(E),v&&v!==Le&&Ue?.(),E&&E!==He&&Ke?.()}if(l||Ie===W)et(!0),tt(!0);else{let v=L===0,E=Ie-L-W<1;et(v),tt(E),v&&v!==de&&Je?.(),E&&E!==pe&&Ze?.()}},[l,Ke,Je,Ze,Ue,G,k,W,He,de,pe,Le,ae,Ie]);dt(ce,[ce]);let oo=Me(c=>{$e?.(c),ce()},[ce,$e]),no=Me(c=>{k.current?.scrollTo({top:0,left:0}),P(c)},[P,k]),me=u?.length,at=u?.map(c=>y(c,d)),oe=!!T,ne=T?.map(c=>y(c,d)),ot=at!==void 0&&ne!==void 0&&ne.length>0,Fe=g?u?.filter(g):u,ue=Fe?.map(c=>y(c,d)),fe=ot&&ue.every(c=>ne.includes(c)),ro=ot&&ue.some(c=>ne.includes(c)),lo=Me(()=>{T&&h&&h(fe?T.filter(c=>!ue.includes(y(c,d))):ge([...T,...Fe],c=>y(c,d)))},[fe,d,h,ue,Fe,T]),{lastSelectionChangeIndex:be,setLastSelectionChangeIndex:io}=pt(at),Ve=oe&&!de;return ia(Wn,{...{m:Wa,my:Ga,mx:Ba,mt:Qa,mb:Xa,ml:$a,mr:Ua},className:la("mantine-datatable",{"mantine-datatable-with-border":e},Ka,ee?.root),style:[c=>({...Wt({theme:c,c:Da,backgroundColor:ka,borderColor:Ra,rowBorderColor:va,stripedColor:Ea,highlightOnHoverColor:Na}),borderRadius:c.radius[t]||t,boxShadow:c.shadows[r]||r,height:o,minHeight:n}),Ja,te?.root],children:[I(ra,{viewportRef:Bn(k,_a),topShadowVisible:!Le,leftShadowVisible:!de,leftShadowBehind:oe,rightShadowVisible:!pe,rightShadowBehind:m,bottomShadowVisible:!He,headerHeight:Ne,footerHeight:eo,onScrollPositionChange:oo,scrollAreaProps:Oa,children:ia(Gn,{ref:qa,horizontalSpacing:w,className:la("mantine-datatable-table",{[Ct]:a,"mantine-datatable-vertical-align-top":i==="top","mantine-datatable-vertical-align-bottom":i==="bottom","mantine-datatable-last-row-border-bottom-visible":ae<G,"mantine-datatable-pin-last-column":m,"mantine-datatable-pin-last-column-scrolled":!pe&&m},ee?.table),style:te?.table,"data-striped":me&&ya||void 0,"data-highlight-on-hover":Ca||void 0,...Za,children:[wa?null:I(_t,{ref:Ya,className:ee?.header,style:te?.header,columns:se,defaultColumnProps:f,groups:s,sortStatus:D,sortIcons:S,onSortStatusChange:x,selectionVisible:oe,selectionChecked:fe,selectionIndeterminate:ro&&!fe,onSelectionChange:lo,selectionCheckboxProps:M,selectorCellShadowVisible:Ve}),I("tbody",{ref:za,children:me?u.map((c,L)=>{let v=y(c,d),E=ne?.includes(v)||!1,nt;return h&&T&&(nt=so=>{if(so.nativeEvent.shiftKey&&be!==null){let $=u.filter(L>be?(B,Q)=>Q>=be&&Q<=L&&(g?g(B,Q):!0):(B,Q)=>Q>=L&&Q<=be&&(g?g(B,Q):!0));h(E?ft(T,$,B=>y(B,d)):ge([...T,...$],B=>y(B,d)))}else h(E?T.filter($=>y($,d)!==v):ge([...T,c],$=>y($,d)));io(L)}),I(aa,{record:c,index:L,columns:se,defaultColumnProps:f,defaultColumnRender:b,selectionVisible:oe,selectionChecked:E,onSelectionChange:nt,isRecordSelectable:g,getSelectionCheckboxProps:N,onClick:Sa,onCellClick:xa,onContextMenu:Pa,onCellContextMenu:Ma,expansion:ao,color:Ia,backgroundColor:La,className:Fa,style:Va,customAttributes:Aa,selectorCellShadowVisible:Ve},v)}):I(lt,{})}),se.some(({footer:c})=>c)&&I(St,{ref:ja,className:ee?.footer,style:te?.footer,columns:se,defaultColumnProps:f,selectionVisible:oe,selectorCellShadowVisible:Ve,scrollDiff:ae-G})]})}),R&&I(Jt,{ref:to,className:ee?.pagination,style:te?.pagination,horizontalSpacing:w,fetching:l,page:R,onPageChange:no,totalRecords:z,recordsPerPage:Z,onRecordsPerPageChange:Y,recordsPerPageOptions:ke,recordsPerPageLabel:Re,paginationWithEdges:q,paginationActiveTextColor:ve,paginationActiveBackgroundColor:Ee,paginationSize:j,paginationText:sa,paginationWrapBreakpoint:da,getPaginationControlProps:pa,noRecordsText:Xe,loadingText:Ta,recordsLength:me}),I(zt,{pt:Ne,pb:Ye,fetching:l,backgroundBlur:ca,customContent:ma,size:ua,type:fa,color:ba}),I(st,{pt:Ne,pb:Ye,icon:ga,text:Xe,active:!l&&!me,children:ha})]})}export{Xn as DataTable,ft as differenceBy,y as getRecordId,Ae as getValueAtPath,he as humanize,ge as uniqBy};
2
+ //# sourceMappingURL=index.mjs.map