@tanstack/table-core 9.0.0-alpha.43 → 9.0.0-alpha.46

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 (518) hide show
  1. package/dist/core/cells/constructCell.cjs +5 -0
  2. package/dist/core/cells/constructCell.cjs.map +1 -1
  3. package/dist/core/cells/constructCell.d.cts +5 -0
  4. package/dist/core/cells/constructCell.d.ts +5 -0
  5. package/dist/core/cells/constructCell.js +5 -0
  6. package/dist/core/cells/constructCell.js.map +1 -1
  7. package/dist/core/cells/coreCellsFeature.cjs +5 -0
  8. package/dist/core/cells/coreCellsFeature.cjs.map +1 -1
  9. package/dist/core/cells/coreCellsFeature.d.cts +5 -0
  10. package/dist/core/cells/coreCellsFeature.d.ts +5 -0
  11. package/dist/core/cells/coreCellsFeature.js +5 -0
  12. package/dist/core/cells/coreCellsFeature.js.map +1 -1
  13. package/dist/core/cells/coreCellsFeature.utils.cjs +30 -0
  14. package/dist/core/cells/coreCellsFeature.utils.cjs.map +1 -1
  15. package/dist/core/cells/coreCellsFeature.utils.d.cts +30 -0
  16. package/dist/core/cells/coreCellsFeature.utils.d.ts +30 -0
  17. package/dist/core/cells/coreCellsFeature.utils.js +30 -0
  18. package/dist/core/cells/coreCellsFeature.utils.js.map +1 -1
  19. package/dist/core/columns/constructColumn.cjs +16 -9
  20. package/dist/core/columns/constructColumn.cjs.map +1 -1
  21. package/dist/core/columns/constructColumn.d.cts +5 -0
  22. package/dist/core/columns/constructColumn.d.ts +5 -0
  23. package/dist/core/columns/constructColumn.js +16 -9
  24. package/dist/core/columns/constructColumn.js.map +1 -1
  25. package/dist/core/columns/coreColumnsFeature.cjs +9 -0
  26. package/dist/core/columns/coreColumnsFeature.cjs.map +1 -1
  27. package/dist/core/columns/coreColumnsFeature.d.cts +5 -0
  28. package/dist/core/columns/coreColumnsFeature.d.ts +5 -0
  29. package/dist/core/columns/coreColumnsFeature.js +10 -1
  30. package/dist/core/columns/coreColumnsFeature.js.map +1 -1
  31. package/dist/core/columns/coreColumnsFeature.types.d.cts +4 -0
  32. package/dist/core/columns/coreColumnsFeature.types.d.ts +4 -0
  33. package/dist/core/columns/coreColumnsFeature.utils.cjs +99 -4
  34. package/dist/core/columns/coreColumnsFeature.utils.cjs.map +1 -1
  35. package/dist/core/columns/coreColumnsFeature.utils.d.cts +92 -1
  36. package/dist/core/columns/coreColumnsFeature.utils.d.ts +92 -1
  37. package/dist/core/columns/coreColumnsFeature.utils.js +99 -5
  38. package/dist/core/columns/coreColumnsFeature.utils.js.map +1 -1
  39. package/dist/core/coreFeatures.cjs +5 -0
  40. package/dist/core/coreFeatures.cjs.map +1 -1
  41. package/dist/core/coreFeatures.d.cts +5 -0
  42. package/dist/core/coreFeatures.d.ts +5 -0
  43. package/dist/core/coreFeatures.js +5 -0
  44. package/dist/core/coreFeatures.js.map +1 -1
  45. package/dist/core/headers/buildHeaderGroups.cjs +6 -1
  46. package/dist/core/headers/buildHeaderGroups.cjs.map +1 -1
  47. package/dist/core/headers/buildHeaderGroups.d.cts +5 -0
  48. package/dist/core/headers/buildHeaderGroups.d.ts +5 -0
  49. package/dist/core/headers/buildHeaderGroups.js +6 -1
  50. package/dist/core/headers/buildHeaderGroups.js.map +1 -1
  51. package/dist/core/headers/constructHeader.cjs +5 -0
  52. package/dist/core/headers/constructHeader.cjs.map +1 -1
  53. package/dist/core/headers/constructHeader.d.cts +5 -0
  54. package/dist/core/headers/constructHeader.d.ts +5 -0
  55. package/dist/core/headers/constructHeader.js +5 -0
  56. package/dist/core/headers/constructHeader.js.map +1 -1
  57. package/dist/core/headers/coreHeadersFeature.cjs +5 -0
  58. package/dist/core/headers/coreHeadersFeature.cjs.map +1 -1
  59. package/dist/core/headers/coreHeadersFeature.d.cts +5 -0
  60. package/dist/core/headers/coreHeadersFeature.d.ts +5 -0
  61. package/dist/core/headers/coreHeadersFeature.js +5 -0
  62. package/dist/core/headers/coreHeadersFeature.js.map +1 -1
  63. package/dist/core/headers/coreHeadersFeature.utils.cjs +71 -2
  64. package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
  65. package/dist/core/headers/coreHeadersFeature.utils.d.cts +60 -0
  66. package/dist/core/headers/coreHeadersFeature.utils.d.ts +60 -0
  67. package/dist/core/headers/coreHeadersFeature.utils.js +72 -3
  68. package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
  69. package/dist/core/reactivity/coreReactivityFeature.utils.cjs +5 -0
  70. package/dist/core/reactivity/coreReactivityFeature.utils.cjs.map +1 -1
  71. package/dist/core/reactivity/coreReactivityFeature.utils.d.cts +10 -0
  72. package/dist/core/reactivity/coreReactivityFeature.utils.d.ts +10 -0
  73. package/dist/core/reactivity/coreReactivityFeature.utils.js +5 -0
  74. package/dist/core/reactivity/coreReactivityFeature.utils.js.map +1 -1
  75. package/dist/core/row-models/coreRowModelsFeature.cjs +5 -0
  76. package/dist/core/row-models/coreRowModelsFeature.cjs.map +1 -1
  77. package/dist/core/row-models/coreRowModelsFeature.d.cts +5 -0
  78. package/dist/core/row-models/coreRowModelsFeature.d.ts +5 -0
  79. package/dist/core/row-models/coreRowModelsFeature.js +5 -0
  80. package/dist/core/row-models/coreRowModelsFeature.js.map +1 -1
  81. package/dist/core/row-models/coreRowModelsFeature.types.d.cts +2 -1
  82. package/dist/core/row-models/coreRowModelsFeature.types.d.ts +2 -1
  83. package/dist/core/row-models/coreRowModelsFeature.utils.cjs +120 -0
  84. package/dist/core/row-models/coreRowModelsFeature.utils.cjs.map +1 -1
  85. package/dist/core/row-models/coreRowModelsFeature.utils.d.cts +120 -0
  86. package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +120 -0
  87. package/dist/core/row-models/coreRowModelsFeature.utils.js +120 -0
  88. package/dist/core/row-models/coreRowModelsFeature.utils.js.map +1 -1
  89. package/dist/core/row-models/createCoreRowModel.cjs +5 -0
  90. package/dist/core/row-models/createCoreRowModel.cjs.map +1 -1
  91. package/dist/core/row-models/createCoreRowModel.d.cts +5 -0
  92. package/dist/core/row-models/createCoreRowModel.d.ts +5 -0
  93. package/dist/core/row-models/createCoreRowModel.js +5 -0
  94. package/dist/core/row-models/createCoreRowModel.js.map +1 -1
  95. package/dist/core/rows/constructRow.cjs +5 -0
  96. package/dist/core/rows/constructRow.cjs.map +1 -1
  97. package/dist/core/rows/constructRow.d.cts +5 -0
  98. package/dist/core/rows/constructRow.d.ts +5 -0
  99. package/dist/core/rows/constructRow.js +5 -0
  100. package/dist/core/rows/constructRow.js.map +1 -1
  101. package/dist/core/rows/coreRowsFeature.cjs +5 -0
  102. package/dist/core/rows/coreRowsFeature.cjs.map +1 -1
  103. package/dist/core/rows/coreRowsFeature.d.cts +5 -0
  104. package/dist/core/rows/coreRowsFeature.d.ts +5 -0
  105. package/dist/core/rows/coreRowsFeature.js +5 -0
  106. package/dist/core/rows/coreRowsFeature.js.map +1 -1
  107. package/dist/core/rows/coreRowsFeature.types.d.cts +3 -0
  108. package/dist/core/rows/coreRowsFeature.types.d.ts +3 -0
  109. package/dist/core/rows/coreRowsFeature.utils.cjs +104 -4
  110. package/dist/core/rows/coreRowsFeature.utils.cjs.map +1 -1
  111. package/dist/core/rows/coreRowsFeature.utils.d.cts +101 -0
  112. package/dist/core/rows/coreRowsFeature.utils.d.ts +101 -0
  113. package/dist/core/rows/coreRowsFeature.utils.js +104 -4
  114. package/dist/core/rows/coreRowsFeature.utils.js.map +1 -1
  115. package/dist/core/table/constructTable.cjs +10 -0
  116. package/dist/core/table/constructTable.cjs.map +1 -1
  117. package/dist/core/table/constructTable.d.cts +10 -0
  118. package/dist/core/table/constructTable.d.ts +10 -0
  119. package/dist/core/table/constructTable.js +10 -0
  120. package/dist/core/table/constructTable.js.map +1 -1
  121. package/dist/core/table/coreTablesFeature.cjs +5 -0
  122. package/dist/core/table/coreTablesFeature.cjs.map +1 -1
  123. package/dist/core/table/coreTablesFeature.d.cts +5 -0
  124. package/dist/core/table/coreTablesFeature.d.ts +5 -0
  125. package/dist/core/table/coreTablesFeature.js +5 -0
  126. package/dist/core/table/coreTablesFeature.js.map +1 -1
  127. package/dist/core/table/coreTablesFeature.types.d.cts +22 -12
  128. package/dist/core/table/coreTablesFeature.types.d.ts +22 -12
  129. package/dist/core/table/coreTablesFeature.utils.cjs +44 -0
  130. package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
  131. package/dist/core/table/coreTablesFeature.utils.d.cts +44 -0
  132. package/dist/core/table/coreTablesFeature.utils.d.ts +44 -0
  133. package/dist/core/table/coreTablesFeature.utils.js +44 -0
  134. package/dist/core/table/coreTablesFeature.utils.js.map +1 -1
  135. package/dist/features/column-faceting/columnFacetingFeature.cjs +9 -1
  136. package/dist/features/column-faceting/columnFacetingFeature.cjs.map +1 -1
  137. package/dist/features/column-faceting/columnFacetingFeature.d.cts +9 -1
  138. package/dist/features/column-faceting/columnFacetingFeature.d.ts +9 -1
  139. package/dist/features/column-faceting/columnFacetingFeature.js +9 -1
  140. package/dist/features/column-faceting/columnFacetingFeature.js.map +1 -1
  141. package/dist/features/column-faceting/columnFacetingFeature.types.d.cts +12 -6
  142. package/dist/features/column-faceting/columnFacetingFeature.types.d.ts +12 -6
  143. package/dist/features/column-faceting/columnFacetingFeature.utils.cjs +60 -0
  144. package/dist/features/column-faceting/columnFacetingFeature.utils.cjs.map +1 -1
  145. package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +60 -0
  146. package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +60 -0
  147. package/dist/features/column-faceting/columnFacetingFeature.utils.js +60 -0
  148. package/dist/features/column-faceting/columnFacetingFeature.utils.js.map +1 -1
  149. package/dist/features/column-faceting/createFacetedMinMaxValues.cjs +5 -0
  150. package/dist/features/column-faceting/createFacetedMinMaxValues.cjs.map +1 -1
  151. package/dist/features/column-faceting/createFacetedMinMaxValues.d.cts +5 -0
  152. package/dist/features/column-faceting/createFacetedMinMaxValues.d.ts +5 -0
  153. package/dist/features/column-faceting/createFacetedMinMaxValues.js +5 -0
  154. package/dist/features/column-faceting/createFacetedMinMaxValues.js.map +1 -1
  155. package/dist/features/column-faceting/createFacetedRowModel.cjs +5 -0
  156. package/dist/features/column-faceting/createFacetedRowModel.cjs.map +1 -1
  157. package/dist/features/column-faceting/createFacetedRowModel.d.cts +5 -0
  158. package/dist/features/column-faceting/createFacetedRowModel.d.ts +5 -0
  159. package/dist/features/column-faceting/createFacetedRowModel.js +5 -0
  160. package/dist/features/column-faceting/createFacetedRowModel.js.map +1 -1
  161. package/dist/features/column-faceting/createFacetedUniqueValues.cjs +5 -0
  162. package/dist/features/column-faceting/createFacetedUniqueValues.cjs.map +1 -1
  163. package/dist/features/column-faceting/createFacetedUniqueValues.d.cts +5 -0
  164. package/dist/features/column-faceting/createFacetedUniqueValues.d.ts +5 -0
  165. package/dist/features/column-faceting/createFacetedUniqueValues.js +5 -0
  166. package/dist/features/column-faceting/createFacetedUniqueValues.js.map +1 -1
  167. package/dist/features/column-filtering/columnFilteringFeature.cjs +10 -2
  168. package/dist/features/column-filtering/columnFilteringFeature.cjs.map +1 -1
  169. package/dist/features/column-filtering/columnFilteringFeature.d.cts +10 -2
  170. package/dist/features/column-filtering/columnFilteringFeature.d.ts +10 -2
  171. package/dist/features/column-filtering/columnFilteringFeature.js +10 -2
  172. package/dist/features/column-filtering/columnFilteringFeature.js.map +1 -1
  173. package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +7 -4
  174. package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +7 -4
  175. package/dist/features/column-filtering/columnFilteringFeature.utils.cjs +113 -2
  176. package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +1 -1
  177. package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +111 -0
  178. package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +111 -0
  179. package/dist/features/column-filtering/columnFilteringFeature.utils.js +113 -2
  180. package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +1 -1
  181. package/dist/features/column-filtering/createFilteredRowModel.cjs +5 -0
  182. package/dist/features/column-filtering/createFilteredRowModel.cjs.map +1 -1
  183. package/dist/features/column-filtering/createFilteredRowModel.d.cts +5 -0
  184. package/dist/features/column-filtering/createFilteredRowModel.d.ts +5 -0
  185. package/dist/features/column-filtering/createFilteredRowModel.js +5 -0
  186. package/dist/features/column-filtering/createFilteredRowModel.js.map +1 -1
  187. package/dist/features/column-filtering/filterRowsUtils.cjs +5 -0
  188. package/dist/features/column-filtering/filterRowsUtils.cjs.map +1 -1
  189. package/dist/features/column-filtering/filterRowsUtils.js +5 -0
  190. package/dist/features/column-filtering/filterRowsUtils.js.map +1 -1
  191. package/dist/features/column-grouping/columnGroupingFeature.cjs +9 -1
  192. package/dist/features/column-grouping/columnGroupingFeature.cjs.map +1 -1
  193. package/dist/features/column-grouping/columnGroupingFeature.d.cts +9 -1
  194. package/dist/features/column-grouping/columnGroupingFeature.d.ts +9 -1
  195. package/dist/features/column-grouping/columnGroupingFeature.js +9 -1
  196. package/dist/features/column-grouping/columnGroupingFeature.js.map +1 -1
  197. package/dist/features/column-grouping/columnGroupingFeature.types.d.cts +7 -3
  198. package/dist/features/column-grouping/columnGroupingFeature.types.d.ts +7 -3
  199. package/dist/features/column-grouping/columnGroupingFeature.utils.cjs +151 -0
  200. package/dist/features/column-grouping/columnGroupingFeature.utils.cjs.map +1 -1
  201. package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +151 -0
  202. package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +151 -0
  203. package/dist/features/column-grouping/columnGroupingFeature.utils.js +151 -0
  204. package/dist/features/column-grouping/columnGroupingFeature.utils.js.map +1 -1
  205. package/dist/features/column-grouping/createGroupedRowModel.cjs +5 -0
  206. package/dist/features/column-grouping/createGroupedRowModel.cjs.map +1 -1
  207. package/dist/features/column-grouping/createGroupedRowModel.d.cts +5 -0
  208. package/dist/features/column-grouping/createGroupedRowModel.d.ts +5 -0
  209. package/dist/features/column-grouping/createGroupedRowModel.js +5 -0
  210. package/dist/features/column-grouping/createGroupedRowModel.js.map +1 -1
  211. package/dist/features/column-ordering/columnOrderingFeature.cjs +12 -3
  212. package/dist/features/column-ordering/columnOrderingFeature.cjs.map +1 -1
  213. package/dist/features/column-ordering/columnOrderingFeature.d.cts +9 -1
  214. package/dist/features/column-ordering/columnOrderingFeature.d.ts +9 -1
  215. package/dist/features/column-ordering/columnOrderingFeature.js +12 -3
  216. package/dist/features/column-ordering/columnOrderingFeature.js.map +1 -1
  217. package/dist/features/column-ordering/columnOrderingFeature.types.d.cts +4 -2
  218. package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +4 -2
  219. package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +98 -8
  220. package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +1 -1
  221. package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +81 -0
  222. package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +81 -0
  223. package/dist/features/column-ordering/columnOrderingFeature.utils.js +98 -8
  224. package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +1 -1
  225. package/dist/features/column-pinning/columnPinningFeature.cjs +17 -30
  226. package/dist/features/column-pinning/columnPinningFeature.cjs.map +1 -1
  227. package/dist/features/column-pinning/columnPinningFeature.d.cts +9 -1
  228. package/dist/features/column-pinning/columnPinningFeature.d.ts +9 -1
  229. package/dist/features/column-pinning/columnPinningFeature.js +17 -30
  230. package/dist/features/column-pinning/columnPinningFeature.js.map +1 -1
  231. package/dist/features/column-pinning/columnPinningFeature.types.d.cts +6 -2
  232. package/dist/features/column-pinning/columnPinningFeature.types.d.ts +6 -2
  233. package/dist/features/column-pinning/columnPinningFeature.utils.cjs +360 -17
  234. package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
  235. package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +314 -3
  236. package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +314 -3
  237. package/dist/features/column-pinning/columnPinningFeature.utils.js +361 -18
  238. package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
  239. package/dist/features/column-resizing/columnResizingFeature.cjs +9 -2
  240. package/dist/features/column-resizing/columnResizingFeature.cjs.map +1 -1
  241. package/dist/features/column-resizing/columnResizingFeature.d.cts +9 -2
  242. package/dist/features/column-resizing/columnResizingFeature.d.ts +9 -2
  243. package/dist/features/column-resizing/columnResizingFeature.js +9 -2
  244. package/dist/features/column-resizing/columnResizingFeature.js.map +1 -1
  245. package/dist/features/column-resizing/columnResizingFeature.types.d.cts +14 -6
  246. package/dist/features/column-resizing/columnResizingFeature.types.d.ts +14 -6
  247. package/dist/features/column-resizing/columnResizingFeature.utils.cjs +81 -0
  248. package/dist/features/column-resizing/columnResizingFeature.utils.cjs.map +1 -1
  249. package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +81 -0
  250. package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +81 -0
  251. package/dist/features/column-resizing/columnResizingFeature.utils.js +81 -0
  252. package/dist/features/column-resizing/columnResizingFeature.utils.js.map +1 -1
  253. package/dist/features/column-sizing/columnSizingFeature.cjs +50 -12
  254. package/dist/features/column-sizing/columnSizingFeature.cjs.map +1 -1
  255. package/dist/features/column-sizing/columnSizingFeature.d.cts +10 -2
  256. package/dist/features/column-sizing/columnSizingFeature.d.ts +10 -2
  257. package/dist/features/column-sizing/columnSizingFeature.js +51 -13
  258. package/dist/features/column-sizing/columnSizingFeature.js.map +1 -1
  259. package/dist/features/column-sizing/columnSizingFeature.types.d.cts +6 -3
  260. package/dist/features/column-sizing/columnSizingFeature.types.d.ts +6 -3
  261. package/dist/features/column-sizing/columnSizingFeature.utils.cjs +151 -3
  262. package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +1 -1
  263. package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +141 -0
  264. package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +141 -0
  265. package/dist/features/column-sizing/columnSizingFeature.utils.js +151 -3
  266. package/dist/features/column-sizing/columnSizingFeature.utils.js.map +1 -1
  267. package/dist/features/column-visibility/columnVisibilityFeature.cjs +26 -25
  268. package/dist/features/column-visibility/columnVisibilityFeature.cjs.map +1 -1
  269. package/dist/features/column-visibility/columnVisibilityFeature.d.cts +9 -1
  270. package/dist/features/column-visibility/columnVisibilityFeature.d.ts +9 -1
  271. package/dist/features/column-visibility/columnVisibilityFeature.js +27 -26
  272. package/dist/features/column-visibility/columnVisibilityFeature.js.map +1 -1
  273. package/dist/features/column-visibility/columnVisibilityFeature.types.d.cts +4 -3
  274. package/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +4 -3
  275. package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +172 -12
  276. package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +1 -1
  277. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +143 -3
  278. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +143 -3
  279. package/dist/features/column-visibility/columnVisibilityFeature.utils.js +173 -12
  280. package/dist/features/column-visibility/columnVisibilityFeature.utils.js.map +1 -1
  281. package/dist/features/global-filtering/globalFilteringFeature.cjs +9 -2
  282. package/dist/features/global-filtering/globalFilteringFeature.cjs.map +1 -1
  283. package/dist/features/global-filtering/globalFilteringFeature.d.cts +9 -2
  284. package/dist/features/global-filtering/globalFilteringFeature.d.ts +9 -2
  285. package/dist/features/global-filtering/globalFilteringFeature.js +9 -2
  286. package/dist/features/global-filtering/globalFilteringFeature.js.map +1 -1
  287. package/dist/features/global-filtering/globalFilteringFeature.types.d.cts +4 -2
  288. package/dist/features/global-filtering/globalFilteringFeature.types.d.ts +4 -2
  289. package/dist/features/global-filtering/globalFilteringFeature.utils.cjs +51 -0
  290. package/dist/features/global-filtering/globalFilteringFeature.utils.cjs.map +1 -1
  291. package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +51 -0
  292. package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +51 -0
  293. package/dist/features/global-filtering/globalFilteringFeature.utils.js +51 -0
  294. package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +1 -1
  295. package/dist/features/row-expanding/createExpandedRowModel.cjs +10 -0
  296. package/dist/features/row-expanding/createExpandedRowModel.cjs.map +1 -1
  297. package/dist/features/row-expanding/createExpandedRowModel.d.cts +10 -0
  298. package/dist/features/row-expanding/createExpandedRowModel.d.ts +10 -0
  299. package/dist/features/row-expanding/createExpandedRowModel.js +10 -0
  300. package/dist/features/row-expanding/createExpandedRowModel.js.map +1 -1
  301. package/dist/features/row-expanding/rowExpandingFeature.cjs +9 -1
  302. package/dist/features/row-expanding/rowExpandingFeature.cjs.map +1 -1
  303. package/dist/features/row-expanding/rowExpandingFeature.d.cts +9 -1
  304. package/dist/features/row-expanding/rowExpandingFeature.d.ts +9 -1
  305. package/dist/features/row-expanding/rowExpandingFeature.js +9 -1
  306. package/dist/features/row-expanding/rowExpandingFeature.js.map +1 -1
  307. package/dist/features/row-expanding/rowExpandingFeature.types.d.cts +10 -5
  308. package/dist/features/row-expanding/rowExpandingFeature.types.d.ts +10 -5
  309. package/dist/features/row-expanding/rowExpandingFeature.utils.cjs +151 -0
  310. package/dist/features/row-expanding/rowExpandingFeature.utils.cjs.map +1 -1
  311. package/dist/features/row-expanding/rowExpandingFeature.utils.d.cts +151 -0
  312. package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +151 -0
  313. package/dist/features/row-expanding/rowExpandingFeature.utils.js +151 -0
  314. package/dist/features/row-expanding/rowExpandingFeature.utils.js.map +1 -1
  315. package/dist/features/row-pagination/createPaginatedRowModel.cjs +5 -0
  316. package/dist/features/row-pagination/createPaginatedRowModel.cjs.map +1 -1
  317. package/dist/features/row-pagination/createPaginatedRowModel.d.cts +5 -0
  318. package/dist/features/row-pagination/createPaginatedRowModel.d.ts +5 -0
  319. package/dist/features/row-pagination/createPaginatedRowModel.js +5 -0
  320. package/dist/features/row-pagination/createPaginatedRowModel.js.map +1 -1
  321. package/dist/features/row-pagination/rowPaginationFeature.cjs +9 -1
  322. package/dist/features/row-pagination/rowPaginationFeature.cjs.map +1 -1
  323. package/dist/features/row-pagination/rowPaginationFeature.d.cts +9 -1
  324. package/dist/features/row-pagination/rowPaginationFeature.d.ts +9 -1
  325. package/dist/features/row-pagination/rowPaginationFeature.js +9 -1
  326. package/dist/features/row-pagination/rowPaginationFeature.js.map +1 -1
  327. package/dist/features/row-pagination/rowPaginationFeature.types.d.cts +11 -7
  328. package/dist/features/row-pagination/rowPaginationFeature.types.d.ts +11 -7
  329. package/dist/features/row-pagination/rowPaginationFeature.utils.cjs +175 -0
  330. package/dist/features/row-pagination/rowPaginationFeature.utils.cjs.map +1 -1
  331. package/dist/features/row-pagination/rowPaginationFeature.utils.d.cts +175 -0
  332. package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +175 -0
  333. package/dist/features/row-pagination/rowPaginationFeature.utils.js +175 -0
  334. package/dist/features/row-pagination/rowPaginationFeature.utils.js.map +1 -1
  335. package/dist/features/row-pinning/rowPinningFeature.cjs +9 -1
  336. package/dist/features/row-pinning/rowPinningFeature.cjs.map +1 -1
  337. package/dist/features/row-pinning/rowPinningFeature.d.cts +9 -1
  338. package/dist/features/row-pinning/rowPinningFeature.d.ts +9 -1
  339. package/dist/features/row-pinning/rowPinningFeature.js +9 -1
  340. package/dist/features/row-pinning/rowPinningFeature.js.map +1 -1
  341. package/dist/features/row-pinning/rowPinningFeature.types.d.cts +4 -2
  342. package/dist/features/row-pinning/rowPinningFeature.types.d.ts +4 -2
  343. package/dist/features/row-pinning/rowPinningFeature.utils.cjs +112 -0
  344. package/dist/features/row-pinning/rowPinningFeature.utils.cjs.map +1 -1
  345. package/dist/features/row-pinning/rowPinningFeature.utils.d.cts +112 -0
  346. package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +112 -0
  347. package/dist/features/row-pinning/rowPinningFeature.utils.js +112 -0
  348. package/dist/features/row-pinning/rowPinningFeature.utils.js.map +1 -1
  349. package/dist/features/row-selection/rowSelectionFeature.cjs +9 -1
  350. package/dist/features/row-selection/rowSelectionFeature.cjs.map +1 -1
  351. package/dist/features/row-selection/rowSelectionFeature.d.cts +9 -1
  352. package/dist/features/row-selection/rowSelectionFeature.d.ts +9 -1
  353. package/dist/features/row-selection/rowSelectionFeature.js +9 -1
  354. package/dist/features/row-selection/rowSelectionFeature.js.map +1 -1
  355. package/dist/features/row-selection/rowSelectionFeature.types.d.cts +4 -2
  356. package/dist/features/row-selection/rowSelectionFeature.types.d.ts +4 -2
  357. package/dist/features/row-selection/rowSelectionFeature.utils.cjs +259 -0
  358. package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +1 -1
  359. package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +259 -0
  360. package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +259 -0
  361. package/dist/features/row-selection/rowSelectionFeature.utils.js +259 -0
  362. package/dist/features/row-selection/rowSelectionFeature.utils.js.map +1 -1
  363. package/dist/features/row-sorting/createSortedRowModel.cjs +5 -0
  364. package/dist/features/row-sorting/createSortedRowModel.cjs.map +1 -1
  365. package/dist/features/row-sorting/createSortedRowModel.d.cts +5 -0
  366. package/dist/features/row-sorting/createSortedRowModel.d.ts +5 -0
  367. package/dist/features/row-sorting/createSortedRowModel.js +5 -0
  368. package/dist/features/row-sorting/createSortedRowModel.js.map +1 -1
  369. package/dist/features/row-sorting/rowSortingFeature.cjs +11 -3
  370. package/dist/features/row-sorting/rowSortingFeature.cjs.map +1 -1
  371. package/dist/features/row-sorting/rowSortingFeature.d.cts +9 -1
  372. package/dist/features/row-sorting/rowSortingFeature.d.ts +9 -1
  373. package/dist/features/row-sorting/rowSortingFeature.js +11 -3
  374. package/dist/features/row-sorting/rowSortingFeature.js.map +1 -1
  375. package/dist/features/row-sorting/rowSortingFeature.types.d.cts +7 -3
  376. package/dist/features/row-sorting/rowSortingFeature.types.d.ts +7 -3
  377. package/dist/features/row-sorting/rowSortingFeature.utils.cjs +151 -0
  378. package/dist/features/row-sorting/rowSortingFeature.utils.cjs.map +1 -1
  379. package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +151 -0
  380. package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +151 -0
  381. package/dist/features/row-sorting/rowSortingFeature.utils.js +151 -0
  382. package/dist/features/row-sorting/rowSortingFeature.utils.js.map +1 -1
  383. package/dist/features/stockFeatures.cjs +5 -0
  384. package/dist/features/stockFeatures.cjs.map +1 -1
  385. package/dist/features/stockFeatures.d.cts +5 -0
  386. package/dist/features/stockFeatures.d.ts +5 -0
  387. package/dist/features/stockFeatures.js +5 -0
  388. package/dist/features/stockFeatures.js.map +1 -1
  389. package/dist/flex-render.cjs +10 -0
  390. package/dist/flex-render.cjs.map +1 -1
  391. package/dist/flex-render.d.cts +10 -0
  392. package/dist/flex-render.d.ts +10 -0
  393. package/dist/flex-render.js +10 -0
  394. package/dist/flex-render.js.map +1 -1
  395. package/dist/fns/aggregationFns.cjs +5 -0
  396. package/dist/fns/aggregationFns.cjs.map +1 -1
  397. package/dist/fns/aggregationFns.d.cts +5 -0
  398. package/dist/fns/aggregationFns.d.ts +5 -0
  399. package/dist/fns/aggregationFns.js +5 -0
  400. package/dist/fns/aggregationFns.js.map +1 -1
  401. package/dist/fns/filterFns.cjs +5 -0
  402. package/dist/fns/filterFns.cjs.map +1 -1
  403. package/dist/fns/filterFns.d.cts +5 -0
  404. package/dist/fns/filterFns.d.ts +5 -0
  405. package/dist/fns/filterFns.js +5 -0
  406. package/dist/fns/filterFns.js.map +1 -1
  407. package/dist/fns/sortFns.cjs +49 -4
  408. package/dist/fns/sortFns.cjs.map +1 -1
  409. package/dist/fns/sortFns.d.cts +41 -0
  410. package/dist/fns/sortFns.d.ts +41 -0
  411. package/dist/fns/sortFns.js +49 -4
  412. package/dist/fns/sortFns.js.map +1 -1
  413. package/dist/helpers/columnHelper.cjs.map +1 -1
  414. package/dist/helpers/columnHelper.js.map +1 -1
  415. package/dist/helpers/tableFeatures.cjs.map +1 -1
  416. package/dist/helpers/tableFeatures.js.map +1 -1
  417. package/dist/helpers/tableOptions.cjs +6 -0
  418. package/dist/helpers/tableOptions.cjs.map +1 -1
  419. package/dist/helpers/tableOptions.d.cts +26 -0
  420. package/dist/helpers/tableOptions.d.ts +26 -0
  421. package/dist/helpers/tableOptions.js +6 -0
  422. package/dist/helpers/tableOptions.js.map +1 -1
  423. package/dist/static-functions.cjs +1 -1
  424. package/dist/static-functions.d.cts +3 -3
  425. package/dist/static-functions.d.ts +3 -3
  426. package/dist/static-functions.js +3 -3
  427. package/dist/store-reactivity-bindings.cjs.map +1 -1
  428. package/dist/store-reactivity-bindings.js.map +1 -1
  429. package/dist/utils.cjs +45 -0
  430. package/dist/utils.cjs.map +1 -1
  431. package/dist/utils.d.cts +45 -0
  432. package/dist/utils.d.ts +45 -0
  433. package/dist/utils.js +45 -0
  434. package/dist/utils.js.map +1 -1
  435. package/package.json +1 -1
  436. package/src/core/cells/constructCell.ts +5 -0
  437. package/src/core/cells/coreCellsFeature.ts +5 -0
  438. package/src/core/cells/coreCellsFeature.utils.ts +30 -0
  439. package/src/core/columns/constructColumn.ts +7 -1
  440. package/src/core/columns/coreColumnsFeature.ts +10 -0
  441. package/src/core/columns/coreColumnsFeature.types.ts +4 -0
  442. package/src/core/columns/coreColumnsFeature.utils.ts +109 -8
  443. package/src/core/coreFeatures.ts +5 -0
  444. package/src/core/headers/buildHeaderGroups.ts +7 -1
  445. package/src/core/headers/constructHeader.ts +5 -0
  446. package/src/core/headers/coreHeadersFeature.ts +5 -0
  447. package/src/core/headers/coreHeadersFeature.utils.ts +86 -8
  448. package/src/core/reactivity/coreReactivityFeature.utils.ts +15 -0
  449. package/src/core/row-models/coreRowModelsFeature.ts +5 -0
  450. package/src/core/row-models/coreRowModelsFeature.types.ts +2 -1
  451. package/src/core/row-models/coreRowModelsFeature.utils.ts +120 -0
  452. package/src/core/row-models/createCoreRowModel.ts +5 -0
  453. package/src/core/rows/constructRow.ts +5 -0
  454. package/src/core/rows/coreRowsFeature.ts +5 -0
  455. package/src/core/rows/coreRowsFeature.types.ts +3 -0
  456. package/src/core/rows/coreRowsFeature.utils.ts +106 -7
  457. package/src/core/table/constructTable.ts +10 -0
  458. package/src/core/table/coreTablesFeature.ts +5 -0
  459. package/src/core/table/coreTablesFeature.types.ts +22 -12
  460. package/src/core/table/coreTablesFeature.utils.ts +44 -0
  461. package/src/features/column-faceting/columnFacetingFeature.ts +9 -1
  462. package/src/features/column-faceting/columnFacetingFeature.types.ts +12 -6
  463. package/src/features/column-faceting/columnFacetingFeature.utils.ts +60 -0
  464. package/src/features/column-faceting/createFacetedMinMaxValues.ts +5 -0
  465. package/src/features/column-faceting/createFacetedRowModel.ts +5 -0
  466. package/src/features/column-faceting/createFacetedUniqueValues.ts +5 -0
  467. package/src/features/column-filtering/columnFilteringFeature.ts +10 -2
  468. package/src/features/column-filtering/columnFilteringFeature.types.ts +7 -4
  469. package/src/features/column-filtering/columnFilteringFeature.utils.ts +113 -2
  470. package/src/features/column-filtering/createFilteredRowModel.ts +5 -0
  471. package/src/features/column-filtering/filterRowsUtils.ts +5 -0
  472. package/src/features/column-grouping/columnGroupingFeature.ts +9 -1
  473. package/src/features/column-grouping/columnGroupingFeature.types.ts +7 -3
  474. package/src/features/column-grouping/columnGroupingFeature.utils.ts +151 -0
  475. package/src/features/column-grouping/createGroupedRowModel.ts +5 -0
  476. package/src/features/column-ordering/columnOrderingFeature.ts +10 -1
  477. package/src/features/column-ordering/columnOrderingFeature.types.ts +4 -2
  478. package/src/features/column-ordering/columnOrderingFeature.utils.ts +110 -18
  479. package/src/features/column-pinning/columnPinningFeature.ts +11 -12
  480. package/src/features/column-pinning/columnPinningFeature.types.ts +6 -2
  481. package/src/features/column-pinning/columnPinningFeature.utils.ts +390 -57
  482. package/src/features/column-resizing/columnResizingFeature.ts +9 -2
  483. package/src/features/column-resizing/columnResizingFeature.types.ts +14 -6
  484. package/src/features/column-resizing/columnResizingFeature.utils.ts +81 -0
  485. package/src/features/column-sizing/columnSizingFeature.ts +38 -18
  486. package/src/features/column-sizing/columnSizingFeature.types.ts +6 -3
  487. package/src/features/column-sizing/columnSizingFeature.utils.ts +168 -9
  488. package/src/features/column-visibility/columnVisibilityFeature.ts +15 -21
  489. package/src/features/column-visibility/columnVisibilityFeature.types.ts +4 -3
  490. package/src/features/column-visibility/columnVisibilityFeature.utils.ts +179 -23
  491. package/src/features/global-filtering/globalFilteringFeature.ts +9 -2
  492. package/src/features/global-filtering/globalFilteringFeature.types.ts +4 -2
  493. package/src/features/global-filtering/globalFilteringFeature.utils.ts +51 -0
  494. package/src/features/row-expanding/createExpandedRowModel.ts +10 -0
  495. package/src/features/row-expanding/rowExpandingFeature.ts +9 -1
  496. package/src/features/row-expanding/rowExpandingFeature.types.ts +10 -5
  497. package/src/features/row-expanding/rowExpandingFeature.utils.ts +151 -0
  498. package/src/features/row-pagination/createPaginatedRowModel.ts +5 -0
  499. package/src/features/row-pagination/rowPaginationFeature.ts +9 -1
  500. package/src/features/row-pagination/rowPaginationFeature.types.ts +11 -7
  501. package/src/features/row-pagination/rowPaginationFeature.utils.ts +175 -0
  502. package/src/features/row-pinning/rowPinningFeature.ts +9 -1
  503. package/src/features/row-pinning/rowPinningFeature.types.ts +4 -2
  504. package/src/features/row-pinning/rowPinningFeature.utils.ts +112 -0
  505. package/src/features/row-selection/rowSelectionFeature.ts +9 -1
  506. package/src/features/row-selection/rowSelectionFeature.types.ts +4 -2
  507. package/src/features/row-selection/rowSelectionFeature.utils.ts +259 -0
  508. package/src/features/row-sorting/createSortedRowModel.ts +5 -0
  509. package/src/features/row-sorting/rowSortingFeature.ts +11 -3
  510. package/src/features/row-sorting/rowSortingFeature.types.ts +7 -3
  511. package/src/features/row-sorting/rowSortingFeature.utils.ts +151 -0
  512. package/src/features/stockFeatures.ts +5 -0
  513. package/src/flex-render.ts +10 -0
  514. package/src/fns/aggregationFns.ts +5 -0
  515. package/src/fns/filterFns.ts +5 -0
  516. package/src/fns/sortFns.ts +50 -5
  517. package/src/helpers/tableOptions.ts +32 -0
  518. package/src/utils.ts +45 -0
@@ -1 +1 @@
1
- {"version":3,"file":"filterRowsUtils.cjs","names":["constructRow"],"sources":["../../../src/features/column-filtering/filterRowsUtils.ts"],"sourcesContent":["import { constructRow } from '../../core/rows/constructRow'\nimport type { Row_ColumnFiltering } from './columnFilteringFeature.types'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Row } from '../../types/Row'\nimport type { Table_Internal } from '../../types/Table'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\n\nexport function filterRows<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rows: Array<Row<TFeatures, TData>>,\n filterRowImpl: (row: Row<TFeatures, TData>) => any,\n table: Table_Internal<TFeatures, TData>,\n) {\n if (table.options.filterFromLeafRows) {\n return filterRowModelFromLeafs(rows, filterRowImpl, table)\n }\n\n return filterRowModelFromRoot(rows, filterRowImpl, table)\n}\n\nfunction filterRowModelFromLeafs<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rowsToFilter: Array<Row<TFeatures, TData>>,\n filterRow: (\n row: Row<TFeatures, TData>,\n ) => Array<Row<TFeatures, TData>> | undefined,\n table: Table_Internal<TFeatures, TData>,\n): RowModel<TFeatures, TData> {\n const newFilteredFlatRows: Array<Row<TFeatures, TData>> = []\n const newFilteredRowsById: Record<string, Row<TFeatures, TData>> = {}\n const maxDepth = table.options.maxLeafRowFilterDepth ?? 100\n\n const recurseFilterRows = (\n rowsToFilter: Array<\n Row<TFeatures, TData> & Partial<Row_ColumnFiltering<TFeatures, TData>>\n >,\n depth = 0,\n ) => {\n const filteredRows: Array<Row<TFeatures, TData>> &\n Partial<Row_ColumnFiltering<TFeatures, TData>> = []\n\n // Filter from children up first\n for (let row of rowsToFilter) {\n const newRow = constructRow(\n table,\n row.id,\n row.original,\n row.index,\n row.depth,\n undefined,\n row.parentId,\n ) as Row<TFeatures, TData> &\n Partial<Row_ColumnFiltering<TFeatures, TData>>\n newRow.columnFilters = row.columnFilters\n\n if (row.subRows.length && depth < maxDepth) {\n newRow.subRows = recurseFilterRows(row.subRows, depth + 1)\n row = newRow\n\n if (filterRow(row) && !newRow.subRows.length) {\n filteredRows.push(row)\n newFilteredRowsById[row.id] = row\n newFilteredFlatRows.push(row)\n continue\n }\n\n if (filterRow(row) || newRow.subRows.length) {\n filteredRows.push(row)\n newFilteredRowsById[row.id] = row\n newFilteredFlatRows.push(row)\n continue\n }\n } else {\n row = newRow\n if (filterRow(row)) {\n filteredRows.push(row)\n newFilteredRowsById[row.id] = row\n newFilteredFlatRows.push(row)\n }\n }\n }\n\n return filteredRows\n }\n\n return {\n rows: recurseFilterRows(rowsToFilter),\n flatRows: newFilteredFlatRows,\n rowsById: newFilteredRowsById,\n }\n}\n\nfunction filterRowModelFromRoot<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rowsToFilter: Array<Row<TFeatures, TData>>,\n filterRow: (row: Row<TFeatures, TData>) => any,\n table: Table_Internal<TFeatures, TData>,\n): RowModel<TFeatures, TData> {\n const newFilteredFlatRows: Array<Row<TFeatures, TData>> = []\n const newFilteredRowsById: Record<string, Row<TFeatures, TData>> = {}\n const maxDepth = table.options.maxLeafRowFilterDepth ?? 100\n\n // Filters top level and nested rows\n const recurseFilterRows = (\n rowsToFilter: Array<Row<TFeatures, TData>>,\n depth = 0,\n ) => {\n // Filter from parents downward first\n\n const filteredRows: Array<Row<TFeatures, TData>> = []\n\n // Apply the filter to any subRows\n for (let row of rowsToFilter) {\n const pass = filterRow(row)\n\n if (pass) {\n if (row.subRows.length && depth < maxDepth) {\n const newRow = constructRow(\n table,\n row.id,\n row.original,\n row.index,\n row.depth,\n undefined,\n row.parentId,\n )\n newRow.subRows = recurseFilterRows(row.subRows, depth + 1)\n row = newRow\n }\n\n filteredRows.push(row)\n newFilteredFlatRows.push(row)\n newFilteredRowsById[row.id] = row\n }\n }\n\n return filteredRows\n }\n\n return {\n rows: recurseFilterRows(rowsToFilter),\n flatRows: newFilteredFlatRows,\n rowsById: newFilteredRowsById,\n }\n}\n"],"mappings":";;;AAQA,SAAgB,WAId,MACA,eACA,OACA;AACA,KAAI,MAAM,QAAQ,mBAChB,QAAO,wBAAwB,MAAM,eAAe,MAAM;AAG5D,QAAO,uBAAuB,MAAM,eAAe,MAAM;;AAG3D,SAAS,wBAIP,cACA,WAGA,OAC4B;CAC5B,MAAM,sBAAoD,EAAE;CAC5D,MAAM,sBAA6D,EAAE;CACrE,MAAM,WAAW,MAAM,QAAQ,yBAAyB;CAExD,MAAM,qBACJ,cAGA,QAAQ,MACL;EACH,MAAM,eAC6C,EAAE;AAGrD,OAAK,IAAI,OAAO,cAAc;GAC5B,MAAM,SAASA,kCACb,OACA,IAAI,IACJ,IAAI,UACJ,IAAI,OACJ,IAAI,OACJ,QACA,IAAI,SACL;AAED,UAAO,gBAAgB,IAAI;AAE3B,OAAI,IAAI,QAAQ,UAAU,QAAQ,UAAU;AAC1C,WAAO,UAAU,kBAAkB,IAAI,SAAS,QAAQ,EAAE;AAC1D,UAAM;AAEN,QAAI,UAAU,IAAI,IAAI,CAAC,OAAO,QAAQ,QAAQ;AAC5C,kBAAa,KAAK,IAAI;AACtB,yBAAoB,IAAI,MAAM;AAC9B,yBAAoB,KAAK,IAAI;AAC7B;;AAGF,QAAI,UAAU,IAAI,IAAI,OAAO,QAAQ,QAAQ;AAC3C,kBAAa,KAAK,IAAI;AACtB,yBAAoB,IAAI,MAAM;AAC9B,yBAAoB,KAAK,IAAI;AAC7B;;UAEG;AACL,UAAM;AACN,QAAI,UAAU,IAAI,EAAE;AAClB,kBAAa,KAAK,IAAI;AACtB,yBAAoB,IAAI,MAAM;AAC9B,yBAAoB,KAAK,IAAI;;;;AAKnC,SAAO;;AAGT,QAAO;EACL,MAAM,kBAAkB,aAAa;EACrC,UAAU;EACV,UAAU;EACX;;AAGH,SAAS,uBAIP,cACA,WACA,OAC4B;CAC5B,MAAM,sBAAoD,EAAE;CAC5D,MAAM,sBAA6D,EAAE;CACrE,MAAM,WAAW,MAAM,QAAQ,yBAAyB;CAGxD,MAAM,qBACJ,cACA,QAAQ,MACL;EAGH,MAAM,eAA6C,EAAE;AAGrD,OAAK,IAAI,OAAO,aAGd,KAFa,UAAU,IAEf,EAAE;AACR,OAAI,IAAI,QAAQ,UAAU,QAAQ,UAAU;IAC1C,MAAM,SAASA,kCACb,OACA,IAAI,IACJ,IAAI,UACJ,IAAI,OACJ,IAAI,OACJ,QACA,IAAI,SACL;AACD,WAAO,UAAU,kBAAkB,IAAI,SAAS,QAAQ,EAAE;AAC1D,UAAM;;AAGR,gBAAa,KAAK,IAAI;AACtB,uBAAoB,KAAK,IAAI;AAC7B,uBAAoB,IAAI,MAAM;;AAIlC,SAAO;;AAGT,QAAO;EACL,MAAM,kBAAkB,aAAa;EACrC,UAAU;EACV,UAAU;EACX"}
1
+ {"version":3,"file":"filterRowsUtils.cjs","names":["constructRow"],"sources":["../../../src/features/column-filtering/filterRowsUtils.ts"],"sourcesContent":["import { constructRow } from '../../core/rows/constructRow'\nimport type { Row_ColumnFiltering } from './columnFilteringFeature.types'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Row } from '../../types/Row'\nimport type { Table_Internal } from '../../types/Table'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\n\n/**\n * Filters a row model with the supplied row predicate.\n *\n * The helper supports both filtering from leaf rows upward and filtering parents before descendants, depending on table options.\n */\nexport function filterRows<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rows: Array<Row<TFeatures, TData>>,\n filterRowImpl: (row: Row<TFeatures, TData>) => any,\n table: Table_Internal<TFeatures, TData>,\n) {\n if (table.options.filterFromLeafRows) {\n return filterRowModelFromLeafs(rows, filterRowImpl, table)\n }\n\n return filterRowModelFromRoot(rows, filterRowImpl, table)\n}\n\nfunction filterRowModelFromLeafs<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rowsToFilter: Array<Row<TFeatures, TData>>,\n filterRow: (\n row: Row<TFeatures, TData>,\n ) => Array<Row<TFeatures, TData>> | undefined,\n table: Table_Internal<TFeatures, TData>,\n): RowModel<TFeatures, TData> {\n const newFilteredFlatRows: Array<Row<TFeatures, TData>> = []\n const newFilteredRowsById: Record<string, Row<TFeatures, TData>> = {}\n const maxDepth = table.options.maxLeafRowFilterDepth ?? 100\n\n const recurseFilterRows = (\n rowsToFilter: Array<\n Row<TFeatures, TData> & Partial<Row_ColumnFiltering<TFeatures, TData>>\n >,\n depth = 0,\n ) => {\n const filteredRows: Array<Row<TFeatures, TData>> &\n Partial<Row_ColumnFiltering<TFeatures, TData>> = []\n\n // Filter from children up first\n for (let row of rowsToFilter) {\n const newRow = constructRow(\n table,\n row.id,\n row.original,\n row.index,\n row.depth,\n undefined,\n row.parentId,\n ) as Row<TFeatures, TData> &\n Partial<Row_ColumnFiltering<TFeatures, TData>>\n newRow.columnFilters = row.columnFilters\n\n if (row.subRows.length && depth < maxDepth) {\n newRow.subRows = recurseFilterRows(row.subRows, depth + 1)\n row = newRow\n\n if (filterRow(row) && !newRow.subRows.length) {\n filteredRows.push(row)\n newFilteredRowsById[row.id] = row\n newFilteredFlatRows.push(row)\n continue\n }\n\n if (filterRow(row) || newRow.subRows.length) {\n filteredRows.push(row)\n newFilteredRowsById[row.id] = row\n newFilteredFlatRows.push(row)\n continue\n }\n } else {\n row = newRow\n if (filterRow(row)) {\n filteredRows.push(row)\n newFilteredRowsById[row.id] = row\n newFilteredFlatRows.push(row)\n }\n }\n }\n\n return filteredRows\n }\n\n return {\n rows: recurseFilterRows(rowsToFilter),\n flatRows: newFilteredFlatRows,\n rowsById: newFilteredRowsById,\n }\n}\n\nfunction filterRowModelFromRoot<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rowsToFilter: Array<Row<TFeatures, TData>>,\n filterRow: (row: Row<TFeatures, TData>) => any,\n table: Table_Internal<TFeatures, TData>,\n): RowModel<TFeatures, TData> {\n const newFilteredFlatRows: Array<Row<TFeatures, TData>> = []\n const newFilteredRowsById: Record<string, Row<TFeatures, TData>> = {}\n const maxDepth = table.options.maxLeafRowFilterDepth ?? 100\n\n // Filters top level and nested rows\n const recurseFilterRows = (\n rowsToFilter: Array<Row<TFeatures, TData>>,\n depth = 0,\n ) => {\n // Filter from parents downward first\n\n const filteredRows: Array<Row<TFeatures, TData>> = []\n\n // Apply the filter to any subRows\n for (let row of rowsToFilter) {\n const pass = filterRow(row)\n\n if (pass) {\n if (row.subRows.length && depth < maxDepth) {\n const newRow = constructRow(\n table,\n row.id,\n row.original,\n row.index,\n row.depth,\n undefined,\n row.parentId,\n )\n newRow.subRows = recurseFilterRows(row.subRows, depth + 1)\n row = newRow\n }\n\n filteredRows.push(row)\n newFilteredFlatRows.push(row)\n newFilteredRowsById[row.id] = row\n }\n }\n\n return filteredRows\n }\n\n return {\n rows: recurseFilterRows(rowsToFilter),\n flatRows: newFilteredFlatRows,\n rowsById: newFilteredRowsById,\n }\n}\n"],"mappings":";;;;;;;;AAaA,SAAgB,WAId,MACA,eACA,OACA;CACA,IAAI,MAAM,QAAQ,oBAChB,OAAO,wBAAwB,MAAM,eAAe,MAAM;CAG5D,OAAO,uBAAuB,MAAM,eAAe,MAAM;;AAG3D,SAAS,wBAIP,cACA,WAGA,OAC4B;CAC5B,MAAM,sBAAoD,EAAE;CAC5D,MAAM,sBAA6D,EAAE;CACrE,MAAM,WAAW,MAAM,QAAQ,yBAAyB;CAExD,MAAM,qBACJ,cAGA,QAAQ,MACL;EACH,MAAM,eAC6C,EAAE;EAGrD,KAAK,IAAI,OAAO,cAAc;GAC5B,MAAM,SAASA,kCACb,OACA,IAAI,IACJ,IAAI,UACJ,IAAI,OACJ,IAAI,OACJ,QACA,IAAI,SACL;GAED,OAAO,gBAAgB,IAAI;GAE3B,IAAI,IAAI,QAAQ,UAAU,QAAQ,UAAU;IAC1C,OAAO,UAAU,kBAAkB,IAAI,SAAS,QAAQ,EAAE;IAC1D,MAAM;IAEN,IAAI,UAAU,IAAI,IAAI,CAAC,OAAO,QAAQ,QAAQ;KAC5C,aAAa,KAAK,IAAI;KACtB,oBAAoB,IAAI,MAAM;KAC9B,oBAAoB,KAAK,IAAI;KAC7B;;IAGF,IAAI,UAAU,IAAI,IAAI,OAAO,QAAQ,QAAQ;KAC3C,aAAa,KAAK,IAAI;KACtB,oBAAoB,IAAI,MAAM;KAC9B,oBAAoB,KAAK,IAAI;KAC7B;;UAEG;IACL,MAAM;IACN,IAAI,UAAU,IAAI,EAAE;KAClB,aAAa,KAAK,IAAI;KACtB,oBAAoB,IAAI,MAAM;KAC9B,oBAAoB,KAAK,IAAI;;;;EAKnC,OAAO;;CAGT,OAAO;EACL,MAAM,kBAAkB,aAAa;EACrC,UAAU;EACV,UAAU;EACX;;AAGH,SAAS,uBAIP,cACA,WACA,OAC4B;CAC5B,MAAM,sBAAoD,EAAE;CAC5D,MAAM,sBAA6D,EAAE;CACrE,MAAM,WAAW,MAAM,QAAQ,yBAAyB;CAGxD,MAAM,qBACJ,cACA,QAAQ,MACL;EAGH,MAAM,eAA6C,EAAE;EAGrD,KAAK,IAAI,OAAO,cAGd,IAFa,UAAU,IAEf,EAAE;GACR,IAAI,IAAI,QAAQ,UAAU,QAAQ,UAAU;IAC1C,MAAM,SAASA,kCACb,OACA,IAAI,IACJ,IAAI,UACJ,IAAI,OACJ,IAAI,OACJ,QACA,IAAI,SACL;IACD,OAAO,UAAU,kBAAkB,IAAI,SAAS,QAAQ,EAAE;IAC1D,MAAM;;GAGR,aAAa,KAAK,IAAI;GACtB,oBAAoB,KAAK,IAAI;GAC7B,oBAAoB,IAAI,MAAM;;EAIlC,OAAO;;CAGT,OAAO;EACL,MAAM,kBAAkB,aAAa;EACrC,UAAU;EACV,UAAU;EACX"}
@@ -1,6 +1,11 @@
1
1
  import { constructRow } from "../../core/rows/constructRow.js";
2
2
 
3
3
  //#region src/features/column-filtering/filterRowsUtils.ts
4
+ /**
5
+ * Filters a row model with the supplied row predicate.
6
+ *
7
+ * The helper supports both filtering from leaf rows upward and filtering parents before descendants, depending on table options.
8
+ */
4
9
  function filterRows(rows, filterRowImpl, table) {
5
10
  if (table.options.filterFromLeafRows) return filterRowModelFromLeafs(rows, filterRowImpl, table);
6
11
  return filterRowModelFromRoot(rows, filterRowImpl, table);
@@ -1 +1 @@
1
- {"version":3,"file":"filterRowsUtils.js","names":[],"sources":["../../../src/features/column-filtering/filterRowsUtils.ts"],"sourcesContent":["import { constructRow } from '../../core/rows/constructRow'\nimport type { Row_ColumnFiltering } from './columnFilteringFeature.types'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Row } from '../../types/Row'\nimport type { Table_Internal } from '../../types/Table'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\n\nexport function filterRows<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rows: Array<Row<TFeatures, TData>>,\n filterRowImpl: (row: Row<TFeatures, TData>) => any,\n table: Table_Internal<TFeatures, TData>,\n) {\n if (table.options.filterFromLeafRows) {\n return filterRowModelFromLeafs(rows, filterRowImpl, table)\n }\n\n return filterRowModelFromRoot(rows, filterRowImpl, table)\n}\n\nfunction filterRowModelFromLeafs<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rowsToFilter: Array<Row<TFeatures, TData>>,\n filterRow: (\n row: Row<TFeatures, TData>,\n ) => Array<Row<TFeatures, TData>> | undefined,\n table: Table_Internal<TFeatures, TData>,\n): RowModel<TFeatures, TData> {\n const newFilteredFlatRows: Array<Row<TFeatures, TData>> = []\n const newFilteredRowsById: Record<string, Row<TFeatures, TData>> = {}\n const maxDepth = table.options.maxLeafRowFilterDepth ?? 100\n\n const recurseFilterRows = (\n rowsToFilter: Array<\n Row<TFeatures, TData> & Partial<Row_ColumnFiltering<TFeatures, TData>>\n >,\n depth = 0,\n ) => {\n const filteredRows: Array<Row<TFeatures, TData>> &\n Partial<Row_ColumnFiltering<TFeatures, TData>> = []\n\n // Filter from children up first\n for (let row of rowsToFilter) {\n const newRow = constructRow(\n table,\n row.id,\n row.original,\n row.index,\n row.depth,\n undefined,\n row.parentId,\n ) as Row<TFeatures, TData> &\n Partial<Row_ColumnFiltering<TFeatures, TData>>\n newRow.columnFilters = row.columnFilters\n\n if (row.subRows.length && depth < maxDepth) {\n newRow.subRows = recurseFilterRows(row.subRows, depth + 1)\n row = newRow\n\n if (filterRow(row) && !newRow.subRows.length) {\n filteredRows.push(row)\n newFilteredRowsById[row.id] = row\n newFilteredFlatRows.push(row)\n continue\n }\n\n if (filterRow(row) || newRow.subRows.length) {\n filteredRows.push(row)\n newFilteredRowsById[row.id] = row\n newFilteredFlatRows.push(row)\n continue\n }\n } else {\n row = newRow\n if (filterRow(row)) {\n filteredRows.push(row)\n newFilteredRowsById[row.id] = row\n newFilteredFlatRows.push(row)\n }\n }\n }\n\n return filteredRows\n }\n\n return {\n rows: recurseFilterRows(rowsToFilter),\n flatRows: newFilteredFlatRows,\n rowsById: newFilteredRowsById,\n }\n}\n\nfunction filterRowModelFromRoot<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rowsToFilter: Array<Row<TFeatures, TData>>,\n filterRow: (row: Row<TFeatures, TData>) => any,\n table: Table_Internal<TFeatures, TData>,\n): RowModel<TFeatures, TData> {\n const newFilteredFlatRows: Array<Row<TFeatures, TData>> = []\n const newFilteredRowsById: Record<string, Row<TFeatures, TData>> = {}\n const maxDepth = table.options.maxLeafRowFilterDepth ?? 100\n\n // Filters top level and nested rows\n const recurseFilterRows = (\n rowsToFilter: Array<Row<TFeatures, TData>>,\n depth = 0,\n ) => {\n // Filter from parents downward first\n\n const filteredRows: Array<Row<TFeatures, TData>> = []\n\n // Apply the filter to any subRows\n for (let row of rowsToFilter) {\n const pass = filterRow(row)\n\n if (pass) {\n if (row.subRows.length && depth < maxDepth) {\n const newRow = constructRow(\n table,\n row.id,\n row.original,\n row.index,\n row.depth,\n undefined,\n row.parentId,\n )\n newRow.subRows = recurseFilterRows(row.subRows, depth + 1)\n row = newRow\n }\n\n filteredRows.push(row)\n newFilteredFlatRows.push(row)\n newFilteredRowsById[row.id] = row\n }\n }\n\n return filteredRows\n }\n\n return {\n rows: recurseFilterRows(rowsToFilter),\n flatRows: newFilteredFlatRows,\n rowsById: newFilteredRowsById,\n }\n}\n"],"mappings":";;;AAQA,SAAgB,WAId,MACA,eACA,OACA;AACA,KAAI,MAAM,QAAQ,mBAChB,QAAO,wBAAwB,MAAM,eAAe,MAAM;AAG5D,QAAO,uBAAuB,MAAM,eAAe,MAAM;;AAG3D,SAAS,wBAIP,cACA,WAGA,OAC4B;CAC5B,MAAM,sBAAoD,EAAE;CAC5D,MAAM,sBAA6D,EAAE;CACrE,MAAM,WAAW,MAAM,QAAQ,yBAAyB;CAExD,MAAM,qBACJ,cAGA,QAAQ,MACL;EACH,MAAM,eAC6C,EAAE;AAGrD,OAAK,IAAI,OAAO,cAAc;GAC5B,MAAM,SAAS,aACb,OACA,IAAI,IACJ,IAAI,UACJ,IAAI,OACJ,IAAI,OACJ,QACA,IAAI,SACL;AAED,UAAO,gBAAgB,IAAI;AAE3B,OAAI,IAAI,QAAQ,UAAU,QAAQ,UAAU;AAC1C,WAAO,UAAU,kBAAkB,IAAI,SAAS,QAAQ,EAAE;AAC1D,UAAM;AAEN,QAAI,UAAU,IAAI,IAAI,CAAC,OAAO,QAAQ,QAAQ;AAC5C,kBAAa,KAAK,IAAI;AACtB,yBAAoB,IAAI,MAAM;AAC9B,yBAAoB,KAAK,IAAI;AAC7B;;AAGF,QAAI,UAAU,IAAI,IAAI,OAAO,QAAQ,QAAQ;AAC3C,kBAAa,KAAK,IAAI;AACtB,yBAAoB,IAAI,MAAM;AAC9B,yBAAoB,KAAK,IAAI;AAC7B;;UAEG;AACL,UAAM;AACN,QAAI,UAAU,IAAI,EAAE;AAClB,kBAAa,KAAK,IAAI;AACtB,yBAAoB,IAAI,MAAM;AAC9B,yBAAoB,KAAK,IAAI;;;;AAKnC,SAAO;;AAGT,QAAO;EACL,MAAM,kBAAkB,aAAa;EACrC,UAAU;EACV,UAAU;EACX;;AAGH,SAAS,uBAIP,cACA,WACA,OAC4B;CAC5B,MAAM,sBAAoD,EAAE;CAC5D,MAAM,sBAA6D,EAAE;CACrE,MAAM,WAAW,MAAM,QAAQ,yBAAyB;CAGxD,MAAM,qBACJ,cACA,QAAQ,MACL;EAGH,MAAM,eAA6C,EAAE;AAGrD,OAAK,IAAI,OAAO,aAGd,KAFa,UAAU,IAEf,EAAE;AACR,OAAI,IAAI,QAAQ,UAAU,QAAQ,UAAU;IAC1C,MAAM,SAAS,aACb,OACA,IAAI,IACJ,IAAI,UACJ,IAAI,OACJ,IAAI,OACJ,QACA,IAAI,SACL;AACD,WAAO,UAAU,kBAAkB,IAAI,SAAS,QAAQ,EAAE;AAC1D,UAAM;;AAGR,gBAAa,KAAK,IAAI;AACtB,uBAAoB,KAAK,IAAI;AAC7B,uBAAoB,IAAI,MAAM;;AAIlC,SAAO;;AAGT,QAAO;EACL,MAAM,kBAAkB,aAAa;EACrC,UAAU;EACV,UAAU;EACX"}
1
+ {"version":3,"file":"filterRowsUtils.js","names":[],"sources":["../../../src/features/column-filtering/filterRowsUtils.ts"],"sourcesContent":["import { constructRow } from '../../core/rows/constructRow'\nimport type { Row_ColumnFiltering } from './columnFilteringFeature.types'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Row } from '../../types/Row'\nimport type { Table_Internal } from '../../types/Table'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\n\n/**\n * Filters a row model with the supplied row predicate.\n *\n * The helper supports both filtering from leaf rows upward and filtering parents before descendants, depending on table options.\n */\nexport function filterRows<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rows: Array<Row<TFeatures, TData>>,\n filterRowImpl: (row: Row<TFeatures, TData>) => any,\n table: Table_Internal<TFeatures, TData>,\n) {\n if (table.options.filterFromLeafRows) {\n return filterRowModelFromLeafs(rows, filterRowImpl, table)\n }\n\n return filterRowModelFromRoot(rows, filterRowImpl, table)\n}\n\nfunction filterRowModelFromLeafs<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rowsToFilter: Array<Row<TFeatures, TData>>,\n filterRow: (\n row: Row<TFeatures, TData>,\n ) => Array<Row<TFeatures, TData>> | undefined,\n table: Table_Internal<TFeatures, TData>,\n): RowModel<TFeatures, TData> {\n const newFilteredFlatRows: Array<Row<TFeatures, TData>> = []\n const newFilteredRowsById: Record<string, Row<TFeatures, TData>> = {}\n const maxDepth = table.options.maxLeafRowFilterDepth ?? 100\n\n const recurseFilterRows = (\n rowsToFilter: Array<\n Row<TFeatures, TData> & Partial<Row_ColumnFiltering<TFeatures, TData>>\n >,\n depth = 0,\n ) => {\n const filteredRows: Array<Row<TFeatures, TData>> &\n Partial<Row_ColumnFiltering<TFeatures, TData>> = []\n\n // Filter from children up first\n for (let row of rowsToFilter) {\n const newRow = constructRow(\n table,\n row.id,\n row.original,\n row.index,\n row.depth,\n undefined,\n row.parentId,\n ) as Row<TFeatures, TData> &\n Partial<Row_ColumnFiltering<TFeatures, TData>>\n newRow.columnFilters = row.columnFilters\n\n if (row.subRows.length && depth < maxDepth) {\n newRow.subRows = recurseFilterRows(row.subRows, depth + 1)\n row = newRow\n\n if (filterRow(row) && !newRow.subRows.length) {\n filteredRows.push(row)\n newFilteredRowsById[row.id] = row\n newFilteredFlatRows.push(row)\n continue\n }\n\n if (filterRow(row) || newRow.subRows.length) {\n filteredRows.push(row)\n newFilteredRowsById[row.id] = row\n newFilteredFlatRows.push(row)\n continue\n }\n } else {\n row = newRow\n if (filterRow(row)) {\n filteredRows.push(row)\n newFilteredRowsById[row.id] = row\n newFilteredFlatRows.push(row)\n }\n }\n }\n\n return filteredRows\n }\n\n return {\n rows: recurseFilterRows(rowsToFilter),\n flatRows: newFilteredFlatRows,\n rowsById: newFilteredRowsById,\n }\n}\n\nfunction filterRowModelFromRoot<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rowsToFilter: Array<Row<TFeatures, TData>>,\n filterRow: (row: Row<TFeatures, TData>) => any,\n table: Table_Internal<TFeatures, TData>,\n): RowModel<TFeatures, TData> {\n const newFilteredFlatRows: Array<Row<TFeatures, TData>> = []\n const newFilteredRowsById: Record<string, Row<TFeatures, TData>> = {}\n const maxDepth = table.options.maxLeafRowFilterDepth ?? 100\n\n // Filters top level and nested rows\n const recurseFilterRows = (\n rowsToFilter: Array<Row<TFeatures, TData>>,\n depth = 0,\n ) => {\n // Filter from parents downward first\n\n const filteredRows: Array<Row<TFeatures, TData>> = []\n\n // Apply the filter to any subRows\n for (let row of rowsToFilter) {\n const pass = filterRow(row)\n\n if (pass) {\n if (row.subRows.length && depth < maxDepth) {\n const newRow = constructRow(\n table,\n row.id,\n row.original,\n row.index,\n row.depth,\n undefined,\n row.parentId,\n )\n newRow.subRows = recurseFilterRows(row.subRows, depth + 1)\n row = newRow\n }\n\n filteredRows.push(row)\n newFilteredFlatRows.push(row)\n newFilteredRowsById[row.id] = row\n }\n }\n\n return filteredRows\n }\n\n return {\n rows: recurseFilterRows(rowsToFilter),\n flatRows: newFilteredFlatRows,\n rowsById: newFilteredRowsById,\n }\n}\n"],"mappings":";;;;;;;;AAaA,SAAgB,WAId,MACA,eACA,OACA;CACA,IAAI,MAAM,QAAQ,oBAChB,OAAO,wBAAwB,MAAM,eAAe,MAAM;CAG5D,OAAO,uBAAuB,MAAM,eAAe,MAAM;;AAG3D,SAAS,wBAIP,cACA,WAGA,OAC4B;CAC5B,MAAM,sBAAoD,EAAE;CAC5D,MAAM,sBAA6D,EAAE;CACrE,MAAM,WAAW,MAAM,QAAQ,yBAAyB;CAExD,MAAM,qBACJ,cAGA,QAAQ,MACL;EACH,MAAM,eAC6C,EAAE;EAGrD,KAAK,IAAI,OAAO,cAAc;GAC5B,MAAM,SAAS,aACb,OACA,IAAI,IACJ,IAAI,UACJ,IAAI,OACJ,IAAI,OACJ,QACA,IAAI,SACL;GAED,OAAO,gBAAgB,IAAI;GAE3B,IAAI,IAAI,QAAQ,UAAU,QAAQ,UAAU;IAC1C,OAAO,UAAU,kBAAkB,IAAI,SAAS,QAAQ,EAAE;IAC1D,MAAM;IAEN,IAAI,UAAU,IAAI,IAAI,CAAC,OAAO,QAAQ,QAAQ;KAC5C,aAAa,KAAK,IAAI;KACtB,oBAAoB,IAAI,MAAM;KAC9B,oBAAoB,KAAK,IAAI;KAC7B;;IAGF,IAAI,UAAU,IAAI,IAAI,OAAO,QAAQ,QAAQ;KAC3C,aAAa,KAAK,IAAI;KACtB,oBAAoB,IAAI,MAAM;KAC9B,oBAAoB,KAAK,IAAI;KAC7B;;UAEG;IACL,MAAM;IACN,IAAI,UAAU,IAAI,EAAE;KAClB,aAAa,KAAK,IAAI;KACtB,oBAAoB,IAAI,MAAM;KAC9B,oBAAoB,KAAK,IAAI;;;;EAKnC,OAAO;;CAGT,OAAO;EACL,MAAM,kBAAkB,aAAa;EACrC,UAAU;EACV,UAAU;EACX;;AAGH,SAAS,uBAIP,cACA,WACA,OAC4B;CAC5B,MAAM,sBAAoD,EAAE;CAC5D,MAAM,sBAA6D,EAAE;CACrE,MAAM,WAAW,MAAM,QAAQ,yBAAyB;CAGxD,MAAM,qBACJ,cACA,QAAQ,MACL;EAGH,MAAM,eAA6C,EAAE;EAGrD,KAAK,IAAI,OAAO,cAGd,IAFa,UAAU,IAEf,EAAE;GACR,IAAI,IAAI,QAAQ,UAAU,QAAQ,UAAU;IAC1C,MAAM,SAAS,aACb,OACA,IAAI,IACJ,IAAI,UACJ,IAAI,OACJ,IAAI,OACJ,QACA,IAAI,SACL;IACD,OAAO,UAAU,kBAAkB,IAAI,SAAS,QAAQ,EAAE;IAC1D,MAAM;;GAGR,aAAa,KAAK,IAAI;GACtB,oBAAoB,KAAK,IAAI;GAC7B,oBAAoB,IAAI,MAAM;;EAIlC,OAAO;;CAGT,OAAO;EACL,MAAM,kBAAkB,aAAa;EACrC,UAAU;EACV,UAAU;EACX"}
@@ -2,6 +2,11 @@ const require_utils = require('../../utils.cjs');
2
2
  const require_columnGroupingFeature_utils = require('./columnGroupingFeature.utils.cjs');
3
3
 
4
4
  //#region src/features/column-grouping/columnGroupingFeature.ts
5
+ /**
6
+ * Creates the stock column grouping feature.
7
+ *
8
+ * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.
9
+ */
5
10
  function constructColumnGroupingFeature() {
6
11
  return {
7
12
  getInitialState: (initialState) => {
@@ -61,7 +66,10 @@ function constructColumnGroupingFeature() {
61
66
  };
62
67
  }
63
68
  /**
64
- * The (Column) Grouping feature adds column grouping state and APIs to the table, row, column, and cell objects.
69
+ * The stock column grouping feature.
70
+ *
71
+ * Register this feature to add grouping state, aggregation defaults, grouped
72
+ * row-model support, and table/row/column/cell grouping APIs.
65
73
  */
66
74
  const columnGroupingFeature = constructColumnGroupingFeature();
67
75
 
@@ -1 +1 @@
1
- {"version":3,"file":"columnGroupingFeature.cjs","names":["getDefaultGroupingState","makeStateUpdater","cell_getIsGrouped","cell_getIsPlaceholder","cell_getIsAggregated","column_toggleGrouping","column_getCanGroup","column_getIsGrouped","column_getGroupedIndex","column_getToggleGroupingHandler","column_getAutoAggregationFn","column_getAggregationFn","row_getIsGrouped","row_getGroupingValue","table_setGrouping","table_resetGrouping"],"sources":["../../../src/features/column-grouping/columnGroupingFeature.ts"],"sourcesContent":["import {\n assignPrototypeAPIs,\n assignTableAPIs,\n makeStateUpdater,\n} from '../../utils'\nimport {\n cell_getIsAggregated,\n cell_getIsGrouped,\n cell_getIsPlaceholder,\n column_getAggregationFn,\n column_getAutoAggregationFn,\n column_getCanGroup,\n column_getGroupedIndex,\n column_getIsGrouped,\n column_getToggleGroupingHandler,\n column_toggleGrouping,\n getDefaultGroupingState,\n row_getGroupingValue,\n row_getIsGrouped,\n table_resetGrouping,\n table_setGrouping,\n} from './columnGroupingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n// CachedRowModel_Grouped,\n// Cell_ColumnGrouping,\n// ColumnDef_ColumnGrouping,\n// Column_ColumnGrouping,\n// CreateRowModel_Grouped,\n// RowModelFns_ColumnGrouping,\n// Row_ColumnGrouping,\n// TableOptions_ColumnGrouping,\n// TableState_ColumnGrouping,\n// Table_ColumnGrouping,\n// } from './columnGroupingFeature.types'\n\nexport interface ColumnGroupingFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // CachedRowModel: CachedRowModel_Grouped<TFeatures, TData>\n // Cell: Cell_ColumnGrouping\n // Column: Column_ColumnGrouping<TFeatures, TData>\n // ColumnDef: ColumnDef_ColumnGrouping<TFeatures, TData>\n // CreateRowModels: CreateRowModel_Grouped<TFeatures, TData>\n // Row: Row_ColumnGrouping\n // RowModelFns: RowModelFns_ColumnGrouping<TFeatures, TData>\n // Table: Table_ColumnGrouping<TFeatures, TData>\n // TableOptions: TableOptions_ColumnGrouping\n // TableState: TableState_ColumnGrouping\n}\n\nexport function constructColumnGroupingFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<ColumnGroupingFeatureConstructors<TFeatures, TData>> {\n return {\n getInitialState: (initialState) => {\n return {\n grouping: getDefaultGroupingState(),\n ...initialState,\n }\n },\n\n getDefaultColumnDef: () => {\n return {\n aggregatedCell: ({ getValue }: any) => getValue()?.toString?.() ?? null,\n aggregationFn: 'auto',\n }\n },\n\n getDefaultTableOptions: (table) => {\n return {\n onGroupingChange: makeStateUpdater('grouping', table),\n groupedColumnMode: 'reorder',\n }\n },\n\n assignCellPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n cell_getIsGrouped: {\n fn: (cell) => cell_getIsGrouped(cell),\n },\n cell_getIsPlaceholder: {\n fn: (cell) => cell_getIsPlaceholder(cell),\n },\n cell_getIsAggregated: {\n fn: (cell) => cell_getIsAggregated(cell),\n },\n })\n },\n\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n column_toggleGrouping: {\n fn: (column) => column_toggleGrouping(column),\n },\n column_getCanGroup: {\n fn: (column) => column_getCanGroup(column),\n },\n column_getIsGrouped: {\n fn: (column) => column_getIsGrouped(column),\n },\n column_getGroupedIndex: {\n fn: (column) => column_getGroupedIndex(column),\n },\n column_getToggleGroupingHandler: {\n fn: (column) => column_getToggleGroupingHandler(column),\n },\n column_getAutoAggregationFn: {\n fn: (column) => column_getAutoAggregationFn(column),\n },\n column_getAggregationFn: {\n fn: (column) => column_getAggregationFn(column),\n },\n })\n },\n\n assignRowPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n row_getIsGrouped: {\n fn: (row) => row_getIsGrouped(row),\n },\n row_getGroupingValue: {\n fn: (row, columnId) => row_getGroupingValue(row, columnId),\n },\n })\n },\n\n initRowInstanceData: (row) => {\n ;(row as any)._groupingValuesCache = {}\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('columnGroupingFeature', table, {\n table_setGrouping: {\n fn: (updater) => table_setGrouping(table, updater),\n },\n table_resetGrouping: {\n fn: (defaultState) => table_resetGrouping(table, defaultState),\n },\n })\n },\n }\n}\n\n/**\n * The (Column) Grouping feature adds column grouping state and APIs to the table, row, column, and cell objects.\n */\nexport const columnGroupingFeature = constructColumnGroupingFeature()\n"],"mappings":";;;;AAqDA,SAAgB,iCAGuD;AACrE,QAAO;EACL,kBAAkB,iBAAiB;AACjC,UAAO;IACL,UAAUA,6DAAyB;IACnC,GAAG;IACJ;;EAGH,2BAA2B;AACzB,UAAO;IACL,iBAAiB,EAAE,eAAoB;;oCAAU,sEAAE,iGAAY,KAAI;;IACnE,eAAe;IAChB;;EAGH,yBAAyB,UAAU;AACjC,UAAO;IACL,kBAAkBC,+BAAiB,YAAY,MAAM;IACrD,mBAAmB;IACpB;;EAGH,sBAAsB,WAAW,UAAU;AACzC,qCAAoB,yBAAyB,WAAW,OAAO;IAC7D,mBAAmB,EACjB,KAAK,SAASC,sDAAkB,KAAK,EACtC;IACD,uBAAuB,EACrB,KAAK,SAASC,0DAAsB,KAAK,EAC1C;IACD,sBAAsB,EACpB,KAAK,SAASC,yDAAqB,KAAK,EACzC;IACF,CAAC;;EAGJ,wBAAwB,WAAW,UAAU;AAC3C,qCAAoB,yBAAyB,WAAW,OAAO;IAC7D,uBAAuB,EACrB,KAAK,WAAWC,0DAAsB,OAAO,EAC9C;IACD,oBAAoB,EAClB,KAAK,WAAWC,uDAAmB,OAAO,EAC3C;IACD,qBAAqB,EACnB,KAAK,WAAWC,wDAAoB,OAAO,EAC5C;IACD,wBAAwB,EACtB,KAAK,WAAWC,2DAAuB,OAAO,EAC/C;IACD,iCAAiC,EAC/B,KAAK,WAAWC,oEAAgC,OAAO,EACxD;IACD,6BAA6B,EAC3B,KAAK,WAAWC,gEAA4B,OAAO,EACpD;IACD,yBAAyB,EACvB,KAAK,WAAWC,4DAAwB,OAAO,EAChD;IACF,CAAC;;EAGJ,qBAAqB,WAAW,UAAU;AACxC,qCAAoB,yBAAyB,WAAW,OAAO;IAC7D,kBAAkB,EAChB,KAAK,QAAQC,qDAAiB,IAAI,EACnC;IACD,sBAAsB,EACpB,KAAK,KAAK,aAAaC,yDAAqB,KAAK,SAAS,EAC3D;IACF,CAAC;;EAGJ,sBAAsB,QAAQ;AAC3B,GAAC,IAAY,uBAAuB,EAAE;;EAGzC,qBAAqB,UAAU;AAC7B,iCAAgB,yBAAyB,OAAO;IAC9C,mBAAmB,EACjB,KAAK,YAAYC,sDAAkB,OAAO,QAAQ,EACnD;IACD,qBAAqB,EACnB,KAAK,iBAAiBC,wDAAoB,OAAO,aAAa,EAC/D;IACF,CAAC;;EAEL;;;;;AAMH,MAAa,wBAAwB,gCAAgC"}
1
+ {"version":3,"file":"columnGroupingFeature.cjs","names":["getDefaultGroupingState","makeStateUpdater","cell_getIsGrouped","cell_getIsPlaceholder","cell_getIsAggregated","column_toggleGrouping","column_getCanGroup","column_getIsGrouped","column_getGroupedIndex","column_getToggleGroupingHandler","column_getAutoAggregationFn","column_getAggregationFn","row_getIsGrouped","row_getGroupingValue","table_setGrouping","table_resetGrouping"],"sources":["../../../src/features/column-grouping/columnGroupingFeature.ts"],"sourcesContent":["import {\n assignPrototypeAPIs,\n assignTableAPIs,\n makeStateUpdater,\n} from '../../utils'\nimport {\n cell_getIsAggregated,\n cell_getIsGrouped,\n cell_getIsPlaceholder,\n column_getAggregationFn,\n column_getAutoAggregationFn,\n column_getCanGroup,\n column_getGroupedIndex,\n column_getIsGrouped,\n column_getToggleGroupingHandler,\n column_toggleGrouping,\n getDefaultGroupingState,\n row_getGroupingValue,\n row_getIsGrouped,\n table_resetGrouping,\n table_setGrouping,\n} from './columnGroupingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n// CachedRowModel_Grouped,\n// Cell_ColumnGrouping,\n// ColumnDef_ColumnGrouping,\n// Column_ColumnGrouping,\n// CreateRowModel_Grouped,\n// RowModelFns_ColumnGrouping,\n// Row_ColumnGrouping,\n// TableOptions_ColumnGrouping,\n// TableState_ColumnGrouping,\n// Table_ColumnGrouping,\n// } from './columnGroupingFeature.types'\n\nexport interface ColumnGroupingFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // CachedRowModel: CachedRowModel_Grouped<TFeatures, TData>\n // Cell: Cell_ColumnGrouping\n // Column: Column_ColumnGrouping<TFeatures, TData>\n // ColumnDef: ColumnDef_ColumnGrouping<TFeatures, TData>\n // CreateRowModels: CreateRowModel_Grouped<TFeatures, TData>\n // Row: Row_ColumnGrouping\n // RowModelFns: RowModelFns_ColumnGrouping<TFeatures, TData>\n // Table: Table_ColumnGrouping<TFeatures, TData>\n // TableOptions: TableOptions_ColumnGrouping\n // TableState: TableState_ColumnGrouping\n}\n\n/**\n * Creates the stock column grouping feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructColumnGroupingFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<ColumnGroupingFeatureConstructors<TFeatures, TData>> {\n return {\n getInitialState: (initialState) => {\n return {\n grouping: getDefaultGroupingState(),\n ...initialState,\n }\n },\n\n getDefaultColumnDef: () => {\n return {\n aggregatedCell: ({ getValue }: any) => getValue()?.toString?.() ?? null,\n aggregationFn: 'auto',\n }\n },\n\n getDefaultTableOptions: (table) => {\n return {\n onGroupingChange: makeStateUpdater('grouping', table),\n groupedColumnMode: 'reorder',\n }\n },\n\n assignCellPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n cell_getIsGrouped: {\n fn: (cell) => cell_getIsGrouped(cell),\n },\n cell_getIsPlaceholder: {\n fn: (cell) => cell_getIsPlaceholder(cell),\n },\n cell_getIsAggregated: {\n fn: (cell) => cell_getIsAggregated(cell),\n },\n })\n },\n\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n column_toggleGrouping: {\n fn: (column) => column_toggleGrouping(column),\n },\n column_getCanGroup: {\n fn: (column) => column_getCanGroup(column),\n },\n column_getIsGrouped: {\n fn: (column) => column_getIsGrouped(column),\n },\n column_getGroupedIndex: {\n fn: (column) => column_getGroupedIndex(column),\n },\n column_getToggleGroupingHandler: {\n fn: (column) => column_getToggleGroupingHandler(column),\n },\n column_getAutoAggregationFn: {\n fn: (column) => column_getAutoAggregationFn(column),\n },\n column_getAggregationFn: {\n fn: (column) => column_getAggregationFn(column),\n },\n })\n },\n\n assignRowPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n row_getIsGrouped: {\n fn: (row) => row_getIsGrouped(row),\n },\n row_getGroupingValue: {\n fn: (row, columnId) => row_getGroupingValue(row, columnId),\n },\n })\n },\n\n initRowInstanceData: (row) => {\n ;(row as any)._groupingValuesCache = {}\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('columnGroupingFeature', table, {\n table_setGrouping: {\n fn: (updater) => table_setGrouping(table, updater),\n },\n table_resetGrouping: {\n fn: (defaultState) => table_resetGrouping(table, defaultState),\n },\n })\n },\n }\n}\n\n/**\n * The stock column grouping feature.\n *\n * Register this feature to add grouping state, aggregation defaults, grouped\n * row-model support, and table/row/column/cell grouping APIs.\n */\nexport const columnGroupingFeature = constructColumnGroupingFeature()\n"],"mappings":";;;;;;;;;AA0DA,SAAgB,iCAGuD;CACrE,OAAO;EACL,kBAAkB,iBAAiB;GACjC,OAAO;IACL,UAAUA,6DAAyB;IACnC,GAAG;IACJ;;EAGH,2BAA2B;GACzB,OAAO;IACL,iBAAiB,EAAE,eAAoB;;oCAAU,sEAAE,iGAAY,KAAI;;IACnE,eAAe;IAChB;;EAGH,yBAAyB,UAAU;GACjC,OAAO;IACL,kBAAkBC,+BAAiB,YAAY,MAAM;IACrD,mBAAmB;IACpB;;EAGH,sBAAsB,WAAW,UAAU;GACzC,kCAAoB,yBAAyB,WAAW,OAAO;IAC7D,mBAAmB,EACjB,KAAK,SAASC,sDAAkB,KAAK,EACtC;IACD,uBAAuB,EACrB,KAAK,SAASC,0DAAsB,KAAK,EAC1C;IACD,sBAAsB,EACpB,KAAK,SAASC,yDAAqB,KAAK,EACzC;IACF,CAAC;;EAGJ,wBAAwB,WAAW,UAAU;GAC3C,kCAAoB,yBAAyB,WAAW,OAAO;IAC7D,uBAAuB,EACrB,KAAK,WAAWC,0DAAsB,OAAO,EAC9C;IACD,oBAAoB,EAClB,KAAK,WAAWC,uDAAmB,OAAO,EAC3C;IACD,qBAAqB,EACnB,KAAK,WAAWC,wDAAoB,OAAO,EAC5C;IACD,wBAAwB,EACtB,KAAK,WAAWC,2DAAuB,OAAO,EAC/C;IACD,iCAAiC,EAC/B,KAAK,WAAWC,oEAAgC,OAAO,EACxD;IACD,6BAA6B,EAC3B,KAAK,WAAWC,gEAA4B,OAAO,EACpD;IACD,yBAAyB,EACvB,KAAK,WAAWC,4DAAwB,OAAO,EAChD;IACF,CAAC;;EAGJ,qBAAqB,WAAW,UAAU;GACxC,kCAAoB,yBAAyB,WAAW,OAAO;IAC7D,kBAAkB,EAChB,KAAK,QAAQC,qDAAiB,IAAI,EACnC;IACD,sBAAsB,EACpB,KAAK,KAAK,aAAaC,yDAAqB,KAAK,SAAS,EAC3D;IACF,CAAC;;EAGJ,sBAAsB,QAAQ;GAC3B,AAAC,IAAY,uBAAuB,EAAE;;EAGzC,qBAAqB,UAAU;GAC7B,8BAAgB,yBAAyB,OAAO;IAC9C,mBAAmB,EACjB,KAAK,YAAYC,sDAAkB,OAAO,QAAQ,EACnD;IACD,qBAAqB,EACnB,KAAK,iBAAiBC,wDAAoB,OAAO,aAAa,EAC/D;IACF,CAAC;;EAEL;;;;;;;;AASH,MAAa,wBAAwB,gCAAgC"}
@@ -3,9 +3,17 @@ import { TableFeature, TableFeatures } from "../../types/TableFeatures.cjs";
3
3
 
4
4
  //#region src/features/column-grouping/columnGroupingFeature.d.ts
5
5
  interface ColumnGroupingFeatureConstructors<TFeatures extends TableFeatures, TData extends RowData> {}
6
+ /**
7
+ * Creates the stock column grouping feature.
8
+ *
9
+ * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.
10
+ */
6
11
  declare function constructColumnGroupingFeature<TFeatures extends TableFeatures, TData extends RowData>(): TableFeature<ColumnGroupingFeatureConstructors<TFeatures, TData>>;
7
12
  /**
8
- * The (Column) Grouping feature adds column grouping state and APIs to the table, row, column, and cell objects.
13
+ * The stock column grouping feature.
14
+ *
15
+ * Register this feature to add grouping state, aggregation defaults, grouped
16
+ * row-model support, and table/row/column/cell grouping APIs.
9
17
  */
10
18
  declare const columnGroupingFeature: TableFeature<ColumnGroupingFeatureConstructors<TableFeatures, RowData>>;
11
19
  //#endregion
@@ -3,9 +3,17 @@ import { TableFeature, TableFeatures } from "../../types/TableFeatures.js";
3
3
 
4
4
  //#region src/features/column-grouping/columnGroupingFeature.d.ts
5
5
  interface ColumnGroupingFeatureConstructors<TFeatures extends TableFeatures, TData extends RowData> {}
6
+ /**
7
+ * Creates the stock column grouping feature.
8
+ *
9
+ * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.
10
+ */
6
11
  declare function constructColumnGroupingFeature<TFeatures extends TableFeatures, TData extends RowData>(): TableFeature<ColumnGroupingFeatureConstructors<TFeatures, TData>>;
7
12
  /**
8
- * The (Column) Grouping feature adds column grouping state and APIs to the table, row, column, and cell objects.
13
+ * The stock column grouping feature.
14
+ *
15
+ * Register this feature to add grouping state, aggregation defaults, grouped
16
+ * row-model support, and table/row/column/cell grouping APIs.
9
17
  */
10
18
  declare const columnGroupingFeature: TableFeature<ColumnGroupingFeatureConstructors<TableFeatures, RowData>>;
11
19
  //#endregion
@@ -2,6 +2,11 @@ import { assignPrototypeAPIs, assignTableAPIs, makeStateUpdater } from "../../ut
2
2
  import { cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, column_getAggregationFn, column_getAutoAggregationFn, column_getCanGroup, column_getGroupedIndex, column_getIsGrouped, column_getToggleGroupingHandler, column_toggleGrouping, getDefaultGroupingState, row_getGroupingValue, row_getIsGrouped, table_resetGrouping, table_setGrouping } from "./columnGroupingFeature.utils.js";
3
3
 
4
4
  //#region src/features/column-grouping/columnGroupingFeature.ts
5
+ /**
6
+ * Creates the stock column grouping feature.
7
+ *
8
+ * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.
9
+ */
5
10
  function constructColumnGroupingFeature() {
6
11
  return {
7
12
  getInitialState: (initialState) => {
@@ -61,7 +66,10 @@ function constructColumnGroupingFeature() {
61
66
  };
62
67
  }
63
68
  /**
64
- * The (Column) Grouping feature adds column grouping state and APIs to the table, row, column, and cell objects.
69
+ * The stock column grouping feature.
70
+ *
71
+ * Register this feature to add grouping state, aggregation defaults, grouped
72
+ * row-model support, and table/row/column/cell grouping APIs.
65
73
  */
66
74
  const columnGroupingFeature = constructColumnGroupingFeature();
67
75
 
@@ -1 +1 @@
1
- {"version":3,"file":"columnGroupingFeature.js","names":[],"sources":["../../../src/features/column-grouping/columnGroupingFeature.ts"],"sourcesContent":["import {\n assignPrototypeAPIs,\n assignTableAPIs,\n makeStateUpdater,\n} from '../../utils'\nimport {\n cell_getIsAggregated,\n cell_getIsGrouped,\n cell_getIsPlaceholder,\n column_getAggregationFn,\n column_getAutoAggregationFn,\n column_getCanGroup,\n column_getGroupedIndex,\n column_getIsGrouped,\n column_getToggleGroupingHandler,\n column_toggleGrouping,\n getDefaultGroupingState,\n row_getGroupingValue,\n row_getIsGrouped,\n table_resetGrouping,\n table_setGrouping,\n} from './columnGroupingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n// CachedRowModel_Grouped,\n// Cell_ColumnGrouping,\n// ColumnDef_ColumnGrouping,\n// Column_ColumnGrouping,\n// CreateRowModel_Grouped,\n// RowModelFns_ColumnGrouping,\n// Row_ColumnGrouping,\n// TableOptions_ColumnGrouping,\n// TableState_ColumnGrouping,\n// Table_ColumnGrouping,\n// } from './columnGroupingFeature.types'\n\nexport interface ColumnGroupingFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // CachedRowModel: CachedRowModel_Grouped<TFeatures, TData>\n // Cell: Cell_ColumnGrouping\n // Column: Column_ColumnGrouping<TFeatures, TData>\n // ColumnDef: ColumnDef_ColumnGrouping<TFeatures, TData>\n // CreateRowModels: CreateRowModel_Grouped<TFeatures, TData>\n // Row: Row_ColumnGrouping\n // RowModelFns: RowModelFns_ColumnGrouping<TFeatures, TData>\n // Table: Table_ColumnGrouping<TFeatures, TData>\n // TableOptions: TableOptions_ColumnGrouping\n // TableState: TableState_ColumnGrouping\n}\n\nexport function constructColumnGroupingFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<ColumnGroupingFeatureConstructors<TFeatures, TData>> {\n return {\n getInitialState: (initialState) => {\n return {\n grouping: getDefaultGroupingState(),\n ...initialState,\n }\n },\n\n getDefaultColumnDef: () => {\n return {\n aggregatedCell: ({ getValue }: any) => getValue()?.toString?.() ?? null,\n aggregationFn: 'auto',\n }\n },\n\n getDefaultTableOptions: (table) => {\n return {\n onGroupingChange: makeStateUpdater('grouping', table),\n groupedColumnMode: 'reorder',\n }\n },\n\n assignCellPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n cell_getIsGrouped: {\n fn: (cell) => cell_getIsGrouped(cell),\n },\n cell_getIsPlaceholder: {\n fn: (cell) => cell_getIsPlaceholder(cell),\n },\n cell_getIsAggregated: {\n fn: (cell) => cell_getIsAggregated(cell),\n },\n })\n },\n\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n column_toggleGrouping: {\n fn: (column) => column_toggleGrouping(column),\n },\n column_getCanGroup: {\n fn: (column) => column_getCanGroup(column),\n },\n column_getIsGrouped: {\n fn: (column) => column_getIsGrouped(column),\n },\n column_getGroupedIndex: {\n fn: (column) => column_getGroupedIndex(column),\n },\n column_getToggleGroupingHandler: {\n fn: (column) => column_getToggleGroupingHandler(column),\n },\n column_getAutoAggregationFn: {\n fn: (column) => column_getAutoAggregationFn(column),\n },\n column_getAggregationFn: {\n fn: (column) => column_getAggregationFn(column),\n },\n })\n },\n\n assignRowPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n row_getIsGrouped: {\n fn: (row) => row_getIsGrouped(row),\n },\n row_getGroupingValue: {\n fn: (row, columnId) => row_getGroupingValue(row, columnId),\n },\n })\n },\n\n initRowInstanceData: (row) => {\n ;(row as any)._groupingValuesCache = {}\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('columnGroupingFeature', table, {\n table_setGrouping: {\n fn: (updater) => table_setGrouping(table, updater),\n },\n table_resetGrouping: {\n fn: (defaultState) => table_resetGrouping(table, defaultState),\n },\n })\n },\n }\n}\n\n/**\n * The (Column) Grouping feature adds column grouping state and APIs to the table, row, column, and cell objects.\n */\nexport const columnGroupingFeature = constructColumnGroupingFeature()\n"],"mappings":";;;;AAqDA,SAAgB,iCAGuD;AACrE,QAAO;EACL,kBAAkB,iBAAiB;AACjC,UAAO;IACL,UAAU,yBAAyB;IACnC,GAAG;IACJ;;EAGH,2BAA2B;AACzB,UAAO;IACL,iBAAiB,EAAE,eAAoB;;oCAAU,sEAAE,iGAAY,KAAI;;IACnE,eAAe;IAChB;;EAGH,yBAAyB,UAAU;AACjC,UAAO;IACL,kBAAkB,iBAAiB,YAAY,MAAM;IACrD,mBAAmB;IACpB;;EAGH,sBAAsB,WAAW,UAAU;AACzC,uBAAoB,yBAAyB,WAAW,OAAO;IAC7D,mBAAmB,EACjB,KAAK,SAAS,kBAAkB,KAAK,EACtC;IACD,uBAAuB,EACrB,KAAK,SAAS,sBAAsB,KAAK,EAC1C;IACD,sBAAsB,EACpB,KAAK,SAAS,qBAAqB,KAAK,EACzC;IACF,CAAC;;EAGJ,wBAAwB,WAAW,UAAU;AAC3C,uBAAoB,yBAAyB,WAAW,OAAO;IAC7D,uBAAuB,EACrB,KAAK,WAAW,sBAAsB,OAAO,EAC9C;IACD,oBAAoB,EAClB,KAAK,WAAW,mBAAmB,OAAO,EAC3C;IACD,qBAAqB,EACnB,KAAK,WAAW,oBAAoB,OAAO,EAC5C;IACD,wBAAwB,EACtB,KAAK,WAAW,uBAAuB,OAAO,EAC/C;IACD,iCAAiC,EAC/B,KAAK,WAAW,gCAAgC,OAAO,EACxD;IACD,6BAA6B,EAC3B,KAAK,WAAW,4BAA4B,OAAO,EACpD;IACD,yBAAyB,EACvB,KAAK,WAAW,wBAAwB,OAAO,EAChD;IACF,CAAC;;EAGJ,qBAAqB,WAAW,UAAU;AACxC,uBAAoB,yBAAyB,WAAW,OAAO;IAC7D,kBAAkB,EAChB,KAAK,QAAQ,iBAAiB,IAAI,EACnC;IACD,sBAAsB,EACpB,KAAK,KAAK,aAAa,qBAAqB,KAAK,SAAS,EAC3D;IACF,CAAC;;EAGJ,sBAAsB,QAAQ;AAC3B,GAAC,IAAY,uBAAuB,EAAE;;EAGzC,qBAAqB,UAAU;AAC7B,mBAAgB,yBAAyB,OAAO;IAC9C,mBAAmB,EACjB,KAAK,YAAY,kBAAkB,OAAO,QAAQ,EACnD;IACD,qBAAqB,EACnB,KAAK,iBAAiB,oBAAoB,OAAO,aAAa,EAC/D;IACF,CAAC;;EAEL;;;;;AAMH,MAAa,wBAAwB,gCAAgC"}
1
+ {"version":3,"file":"columnGroupingFeature.js","names":[],"sources":["../../../src/features/column-grouping/columnGroupingFeature.ts"],"sourcesContent":["import {\n assignPrototypeAPIs,\n assignTableAPIs,\n makeStateUpdater,\n} from '../../utils'\nimport {\n cell_getIsAggregated,\n cell_getIsGrouped,\n cell_getIsPlaceholder,\n column_getAggregationFn,\n column_getAutoAggregationFn,\n column_getCanGroup,\n column_getGroupedIndex,\n column_getIsGrouped,\n column_getToggleGroupingHandler,\n column_toggleGrouping,\n getDefaultGroupingState,\n row_getGroupingValue,\n row_getIsGrouped,\n table_resetGrouping,\n table_setGrouping,\n} from './columnGroupingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n// CachedRowModel_Grouped,\n// Cell_ColumnGrouping,\n// ColumnDef_ColumnGrouping,\n// Column_ColumnGrouping,\n// CreateRowModel_Grouped,\n// RowModelFns_ColumnGrouping,\n// Row_ColumnGrouping,\n// TableOptions_ColumnGrouping,\n// TableState_ColumnGrouping,\n// Table_ColumnGrouping,\n// } from './columnGroupingFeature.types'\n\nexport interface ColumnGroupingFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // CachedRowModel: CachedRowModel_Grouped<TFeatures, TData>\n // Cell: Cell_ColumnGrouping\n // Column: Column_ColumnGrouping<TFeatures, TData>\n // ColumnDef: ColumnDef_ColumnGrouping<TFeatures, TData>\n // CreateRowModels: CreateRowModel_Grouped<TFeatures, TData>\n // Row: Row_ColumnGrouping\n // RowModelFns: RowModelFns_ColumnGrouping<TFeatures, TData>\n // Table: Table_ColumnGrouping<TFeatures, TData>\n // TableOptions: TableOptions_ColumnGrouping\n // TableState: TableState_ColumnGrouping\n}\n\n/**\n * Creates the stock column grouping feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructColumnGroupingFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<ColumnGroupingFeatureConstructors<TFeatures, TData>> {\n return {\n getInitialState: (initialState) => {\n return {\n grouping: getDefaultGroupingState(),\n ...initialState,\n }\n },\n\n getDefaultColumnDef: () => {\n return {\n aggregatedCell: ({ getValue }: any) => getValue()?.toString?.() ?? null,\n aggregationFn: 'auto',\n }\n },\n\n getDefaultTableOptions: (table) => {\n return {\n onGroupingChange: makeStateUpdater('grouping', table),\n groupedColumnMode: 'reorder',\n }\n },\n\n assignCellPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n cell_getIsGrouped: {\n fn: (cell) => cell_getIsGrouped(cell),\n },\n cell_getIsPlaceholder: {\n fn: (cell) => cell_getIsPlaceholder(cell),\n },\n cell_getIsAggregated: {\n fn: (cell) => cell_getIsAggregated(cell),\n },\n })\n },\n\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n column_toggleGrouping: {\n fn: (column) => column_toggleGrouping(column),\n },\n column_getCanGroup: {\n fn: (column) => column_getCanGroup(column),\n },\n column_getIsGrouped: {\n fn: (column) => column_getIsGrouped(column),\n },\n column_getGroupedIndex: {\n fn: (column) => column_getGroupedIndex(column),\n },\n column_getToggleGroupingHandler: {\n fn: (column) => column_getToggleGroupingHandler(column),\n },\n column_getAutoAggregationFn: {\n fn: (column) => column_getAutoAggregationFn(column),\n },\n column_getAggregationFn: {\n fn: (column) => column_getAggregationFn(column),\n },\n })\n },\n\n assignRowPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n row_getIsGrouped: {\n fn: (row) => row_getIsGrouped(row),\n },\n row_getGroupingValue: {\n fn: (row, columnId) => row_getGroupingValue(row, columnId),\n },\n })\n },\n\n initRowInstanceData: (row) => {\n ;(row as any)._groupingValuesCache = {}\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('columnGroupingFeature', table, {\n table_setGrouping: {\n fn: (updater) => table_setGrouping(table, updater),\n },\n table_resetGrouping: {\n fn: (defaultState) => table_resetGrouping(table, defaultState),\n },\n })\n },\n }\n}\n\n/**\n * The stock column grouping feature.\n *\n * Register this feature to add grouping state, aggregation defaults, grouped\n * row-model support, and table/row/column/cell grouping APIs.\n */\nexport const columnGroupingFeature = constructColumnGroupingFeature()\n"],"mappings":";;;;;;;;;AA0DA,SAAgB,iCAGuD;CACrE,OAAO;EACL,kBAAkB,iBAAiB;GACjC,OAAO;IACL,UAAU,yBAAyB;IACnC,GAAG;IACJ;;EAGH,2BAA2B;GACzB,OAAO;IACL,iBAAiB,EAAE,eAAoB;;oCAAU,sEAAE,iGAAY,KAAI;;IACnE,eAAe;IAChB;;EAGH,yBAAyB,UAAU;GACjC,OAAO;IACL,kBAAkB,iBAAiB,YAAY,MAAM;IACrD,mBAAmB;IACpB;;EAGH,sBAAsB,WAAW,UAAU;GACzC,oBAAoB,yBAAyB,WAAW,OAAO;IAC7D,mBAAmB,EACjB,KAAK,SAAS,kBAAkB,KAAK,EACtC;IACD,uBAAuB,EACrB,KAAK,SAAS,sBAAsB,KAAK,EAC1C;IACD,sBAAsB,EACpB,KAAK,SAAS,qBAAqB,KAAK,EACzC;IACF,CAAC;;EAGJ,wBAAwB,WAAW,UAAU;GAC3C,oBAAoB,yBAAyB,WAAW,OAAO;IAC7D,uBAAuB,EACrB,KAAK,WAAW,sBAAsB,OAAO,EAC9C;IACD,oBAAoB,EAClB,KAAK,WAAW,mBAAmB,OAAO,EAC3C;IACD,qBAAqB,EACnB,KAAK,WAAW,oBAAoB,OAAO,EAC5C;IACD,wBAAwB,EACtB,KAAK,WAAW,uBAAuB,OAAO,EAC/C;IACD,iCAAiC,EAC/B,KAAK,WAAW,gCAAgC,OAAO,EACxD;IACD,6BAA6B,EAC3B,KAAK,WAAW,4BAA4B,OAAO,EACpD;IACD,yBAAyB,EACvB,KAAK,WAAW,wBAAwB,OAAO,EAChD;IACF,CAAC;;EAGJ,qBAAqB,WAAW,UAAU;GACxC,oBAAoB,yBAAyB,WAAW,OAAO;IAC7D,kBAAkB,EAChB,KAAK,QAAQ,iBAAiB,IAAI,EACnC;IACD,sBAAsB,EACpB,KAAK,KAAK,aAAa,qBAAqB,KAAK,SAAS,EAC3D;IACF,CAAC;;EAGJ,sBAAsB,QAAQ;GAC3B,AAAC,IAAY,uBAAuB,EAAE;;EAGzC,qBAAqB,UAAU;GAC7B,gBAAgB,yBAAyB,OAAO;IAC9C,mBAAmB,EACjB,KAAK,YAAY,kBAAkB,OAAO,QAAQ,EACnD;IACD,qBAAqB,EACnB,KAAK,iBAAiB,oBAAoB,OAAO,aAAa,EAC/D;IACF,CAAC;;EAEL;;;;;;;;AASH,MAAa,wBAAwB,gCAAgC"}
@@ -118,7 +118,9 @@ interface TableOptions_ColumnGrouping {
118
118
  */
119
119
  manualGrouping?: boolean;
120
120
  /**
121
- * If this function is provided, it will be called when the grouping state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the `tableOptions.state.grouping` option.
121
+ * Called with an updater when grouping state changes. Pair this with
122
+ * `state.grouping` when using external state; external atoms can own the
123
+ * slice without this callback.
122
124
  */
123
125
  onGroupingChange?: OnChangeFn<GroupingState>;
124
126
  }
@@ -129,7 +131,7 @@ interface Table_ColumnGrouping<TFeatures extends TableFeatures, TData extends Ro
129
131
  */
130
132
  resetGrouping: (defaultState?: boolean) => void;
131
133
  /**
132
- * Updates the grouping state of the table via an update function or value.
134
+ * Sets grouping state using a value or updater.
133
135
  */
134
136
  setGrouping: (updater: Updater<GroupingState>) => void;
135
137
  }
@@ -145,7 +147,9 @@ interface Table_RowModels_Grouped<TFeatures extends TableFeatures, TData extends
145
147
  }
146
148
  interface CreateRowModel_Grouped<TFeatures extends TableFeatures, TData extends RowData> {
147
149
  /**
148
- * Returns the row model after grouping has taken place, but no further.
150
+ * Factory used to retrieve the grouped row model. If using server-side
151
+ * grouping, this is not required. To use client-side grouping, pass
152
+ * `createGroupedRowModel()` or implement your own factory.
149
153
  */
150
154
  groupedRowModel?: (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData>;
151
155
  }
@@ -118,7 +118,9 @@ interface TableOptions_ColumnGrouping {
118
118
  */
119
119
  manualGrouping?: boolean;
120
120
  /**
121
- * If this function is provided, it will be called when the grouping state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the `tableOptions.state.grouping` option.
121
+ * Called with an updater when grouping state changes. Pair this with
122
+ * `state.grouping` when using external state; external atoms can own the
123
+ * slice without this callback.
122
124
  */
123
125
  onGroupingChange?: OnChangeFn<GroupingState>;
124
126
  }
@@ -129,7 +131,7 @@ interface Table_ColumnGrouping<TFeatures extends TableFeatures, TData extends Ro
129
131
  */
130
132
  resetGrouping: (defaultState?: boolean) => void;
131
133
  /**
132
- * Updates the grouping state of the table via an update function or value.
134
+ * Sets grouping state using a value or updater.
133
135
  */
134
136
  setGrouping: (updater: Updater<GroupingState>) => void;
135
137
  }
@@ -145,7 +147,9 @@ interface Table_RowModels_Grouped<TFeatures extends TableFeatures, TData extends
145
147
  }
146
148
  interface CreateRowModel_Grouped<TFeatures extends TableFeatures, TData extends RowData> {
147
149
  /**
148
- * Returns the row model after grouping has taken place, but no further.
150
+ * Factory used to retrieve the grouped row model. If using server-side
151
+ * grouping, this is not required. To use client-side grouping, pass
152
+ * `createGroupedRowModel()` or implement your own factory.
149
153
  */
150
154
  groupedRowModel?: (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData>;
151
155
  }
@@ -2,26 +2,86 @@ const require_utils = require('../../utils.cjs');
2
2
  const require_coreColumnsFeature_utils = require('../../core/columns/coreColumnsFeature.utils.cjs');
3
3
 
4
4
  //#region src/features/column-grouping/columnGroupingFeature.utils.ts
5
+ /**
6
+ * Returns the default grouping state.
7
+ *
8
+ * Feature constructors use this value to initialize the table state or option defaults when no user value is provided.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const initialValue = getDefaultGroupingState()
13
+ * ```
14
+ */
5
15
  function getDefaultGroupingState() {
6
16
  return [];
7
17
  }
18
+ /**
19
+ * Toggles grouping for a column.
20
+ *
21
+ * The update is applied through the owning table state slice and respects the feature options for that column.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * column_toggleGrouping(column)
26
+ * ```
27
+ */
8
28
  function column_toggleGrouping(column) {
9
29
  table_setGrouping(column.table, (old) => {
10
30
  if (old.includes(column.id)) return old.filter((d) => d !== column.id);
11
31
  return [...old, column.id];
12
32
  });
13
33
  }
34
+ /**
35
+ * Returns whether a column can use group.
36
+ *
37
+ * This combines column options, table options, and any required accessor or feature state for the capability.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const value = column_getCanGroup(column)
42
+ * ```
43
+ */
14
44
  function column_getCanGroup(column) {
15
45
  return (column.columnDef.enableGrouping ?? true) && (column.table.options.enableGrouping ?? true) && (!!column.accessorFn || !!column.columnDef.getGroupingValue);
16
46
  }
47
+ /**
48
+ * Returns is grouped for a column.
49
+ *
50
+ * This derives the value from the column definition, table options, and the feature state atoms registered on the table.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const value = column_getIsGrouped(column)
55
+ * ```
56
+ */
17
57
  function column_getIsGrouped(column) {
18
58
  var _column$table$atoms$g;
19
59
  return !!((_column$table$atoms$g = column.table.atoms.grouping) === null || _column$table$atoms$g === void 0 || (_column$table$atoms$g = _column$table$atoms$g.get()) === null || _column$table$atoms$g === void 0 ? void 0 : _column$table$atoms$g.includes(column.id));
20
60
  }
61
+ /**
62
+ * Returns grouped index for a column.
63
+ *
64
+ * This derives the value from the column definition, table options, and the feature state atoms registered on the table.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * const value = column_getGroupedIndex(column)
69
+ * ```
70
+ */
21
71
  function column_getGroupedIndex(column) {
22
72
  var _column$table$atoms$g2;
23
73
  return ((_column$table$atoms$g2 = column.table.atoms.grouping) === null || _column$table$atoms$g2 === void 0 || (_column$table$atoms$g2 = _column$table$atoms$g2.get()) === null || _column$table$atoms$g2 === void 0 ? void 0 : _column$table$atoms$g2.indexOf(column.id)) ?? -1;
24
74
  }
75
+ /**
76
+ * Returns an event handler for toggling grouping handler.
77
+ *
78
+ * The handler is intended for direct use in column header controls such as buttons or checkboxes.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * const value = column_getToggleGroupingHandler(column)
83
+ * ```
84
+ */
25
85
  function column_getToggleGroupingHandler(column) {
26
86
  const canGroup = column_getCanGroup(column);
27
87
  return () => {
@@ -29,6 +89,16 @@ function column_getToggleGroupingHandler(column) {
29
89
  column_toggleGrouping(column);
30
90
  };
31
91
  }
92
+ /**
93
+ * Infers aggregation fn for a column.
94
+ *
95
+ * The inference uses the column definition, table options, and sampled row values when needed.
96
+ *
97
+ * @example
98
+ * ```ts
99
+ * const value = column_getAutoAggregationFn(column)
100
+ * ```
101
+ */
32
102
  function column_getAutoAggregationFn(column) {
33
103
  const aggregationFns = column.table._rowModelFns.aggregationFns;
34
104
  const firstRow = column.table.getCoreRowModel().flatRows[0];
@@ -36,20 +106,71 @@ function column_getAutoAggregationFn(column) {
36
106
  if (typeof value === "number") return aggregationFns === null || aggregationFns === void 0 ? void 0 : aggregationFns.sum;
37
107
  if (Object.prototype.toString.call(value) === "[object Date]") return aggregationFns === null || aggregationFns === void 0 ? void 0 : aggregationFns.extent;
38
108
  }
109
+ /**
110
+ * Returns aggregation fn for a column.
111
+ *
112
+ * This derives the value from the column definition, table options, and the feature state atoms registered on the table.
113
+ *
114
+ * @example
115
+ * ```ts
116
+ * const value = column_getAggregationFn(column)
117
+ * ```
118
+ */
39
119
  function column_getAggregationFn(column) {
40
120
  const aggregationFns = column.table._rowModelFns.aggregationFns;
41
121
  return require_utils.isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === "auto" ? column_getAutoAggregationFn(column) : aggregationFns === null || aggregationFns === void 0 ? void 0 : aggregationFns[column.columnDef.aggregationFn];
42
122
  }
123
+ /**
124
+ * Updates the table's grouping state slice.
125
+ *
126
+ * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom.
127
+ *
128
+ * @example
129
+ * ```ts
130
+ * table_setGrouping(table, (old) => old)
131
+ * ```
132
+ */
43
133
  function table_setGrouping(table, updater) {
44
134
  var _table$options$onGrou, _table$options;
45
135
  (_table$options$onGrou = (_table$options = table.options).onGroupingChange) === null || _table$options$onGrou === void 0 || _table$options$onGrou.call(_table$options, updater);
46
136
  }
137
+ /**
138
+ * Resets the table's grouping state slice.
139
+ *
140
+ * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value.
141
+ *
142
+ * @example
143
+ * ```ts
144
+ * table_resetGrouping(table)
145
+ * table_resetGrouping(table, true)
146
+ * ```
147
+ */
47
148
  function table_resetGrouping(table, defaultState) {
48
149
  table_setGrouping(table, defaultState ? [] : require_utils.cloneState(table.initialState.grouping ?? []));
49
150
  }
151
+ /**
152
+ * Returns is grouped for a row.
153
+ *
154
+ * This is the static implementation behind the matching row instance API and may read row caches or table state atoms.
155
+ *
156
+ * @example
157
+ * ```ts
158
+ * const value = row_getIsGrouped(row)
159
+ * ```
160
+ */
50
161
  function row_getIsGrouped(row) {
51
162
  return !!row.groupingColumnId;
52
163
  }
164
+ /**
165
+ * Returns grouping value for a row.
166
+ *
167
+ * This is the static implementation behind the matching row instance API and may read row caches or table state atoms.
168
+ *
169
+ * @example
170
+ * ```ts
171
+ * const value = row_getGroupingValue(row)
172
+ * ```
173
+ */
53
174
  function row_getGroupingValue(row, columnId) {
54
175
  var _row$_groupingValuesC, _row$_groupingValuesC2;
55
176
  if ((_row$_groupingValuesC = row._groupingValuesCache) === null || _row$_groupingValuesC === void 0 ? void 0 : _row$_groupingValuesC.hasOwnProperty(columnId)) return row._groupingValuesCache[columnId];
@@ -58,13 +179,43 @@ function row_getGroupingValue(row, columnId) {
58
179
  if (row._groupingValuesCache) row._groupingValuesCache[columnId] = column.columnDef.getGroupingValue(row.original);
59
180
  return (_row$_groupingValuesC2 = row._groupingValuesCache) === null || _row$_groupingValuesC2 === void 0 ? void 0 : _row$_groupingValuesC2[columnId];
60
181
  }
182
+ /**
183
+ * Returns is grouped for a cell.
184
+ *
185
+ * This is the static implementation behind the matching cell instance API and uses the owning row and column context.
186
+ *
187
+ * @example
188
+ * ```ts
189
+ * const value = cell_getIsGrouped(cell)
190
+ * ```
191
+ */
61
192
  function cell_getIsGrouped(cell) {
62
193
  const row = cell.row;
63
194
  return column_getIsGrouped(cell.column) && cell.column.id === row.groupingColumnId;
64
195
  }
196
+ /**
197
+ * Returns is placeholder for a cell.
198
+ *
199
+ * This is the static implementation behind the matching cell instance API and uses the owning row and column context.
200
+ *
201
+ * @example
202
+ * ```ts
203
+ * const value = cell_getIsPlaceholder(cell)
204
+ * ```
205
+ */
65
206
  function cell_getIsPlaceholder(cell) {
66
207
  return !cell_getIsGrouped(cell) && column_getIsGrouped(cell.column);
67
208
  }
209
+ /**
210
+ * Returns is aggregated for a cell.
211
+ *
212
+ * This is the static implementation behind the matching cell instance API and uses the owning row and column context.
213
+ *
214
+ * @example
215
+ * ```ts
216
+ * const value = cell_getIsAggregated(cell)
217
+ * ```
218
+ */
68
219
  function cell_getIsAggregated(cell) {
69
220
  return !cell_getIsGrouped(cell) && !cell_getIsPlaceholder(cell) && !!cell.row.subRows.length;
70
221
  }
@@ -1 +1 @@
1
- {"version":3,"file":"columnGroupingFeature.utils.cjs","names":["isFunction","cloneState","table_getColumn"],"sources":["../../../src/features/column-grouping/columnGroupingFeature.utils.ts"],"sourcesContent":["import { cloneState, isFunction } from '../../utils'\nimport { table_getColumn } from '../../core/columns/coreColumnsFeature.utils'\nimport type { Column_Internal } from '../../types/Column'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type {\n AggregationFn,\n GroupingState,\n Row_ColumnGrouping,\n} from './columnGroupingFeature.types'\n\nexport function getDefaultGroupingState(): GroupingState {\n return []\n}\n\nexport function column_toggleGrouping<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n table_setGrouping(column.table, (old) => {\n // Find any existing grouping for this column\n if (old.includes(column.id)) {\n return old.filter((d) => d !== column.id)\n }\n\n return [...old, column.id]\n })\n}\n\nexport function column_getCanGroup<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n return (\n (column.columnDef.enableGrouping ?? true) &&\n (column.table.options.enableGrouping ?? true) &&\n (!!column.accessorFn || !!column.columnDef.getGroupingValue)\n )\n}\n\nexport function column_getIsGrouped<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): boolean {\n return !!column.table.atoms.grouping?.get()?.includes(column.id)\n}\n\nexport function column_getGroupedIndex<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): number {\n return column.table.atoms.grouping?.get()?.indexOf(column.id) ?? -1\n}\n\nexport function column_getToggleGroupingHandler<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n const canGroup = column_getCanGroup(column)\n\n return () => {\n if (!canGroup) return\n column_toggleGrouping(column)\n }\n}\n\nexport function column_getAutoAggregationFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n const aggregationFns:\n | Record<string, AggregationFn<TFeatures, TData>>\n | undefined = column.table._rowModelFns.aggregationFns\n\n const firstRow = column.table.getCoreRowModel().flatRows[0]\n\n const value = firstRow?.getValue(column.id)\n\n if (typeof value === 'number') {\n return aggregationFns?.sum\n }\n\n if (Object.prototype.toString.call(value) === '[object Date]') {\n return aggregationFns?.extent\n }\n}\n\nexport function column_getAggregationFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n const aggregationFns:\n | Record<string, AggregationFn<TFeatures, TData>>\n | undefined = column.table._rowModelFns.aggregationFns\n\n return isFunction(column.columnDef.aggregationFn)\n ? column.columnDef.aggregationFn\n : column.columnDef.aggregationFn === 'auto'\n ? column_getAutoAggregationFn(column)\n : aggregationFns?.[column.columnDef.aggregationFn as string]\n}\n\nexport function table_setGrouping<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, updater: Updater<GroupingState>) {\n table.options.onGroupingChange?.(updater)\n}\n\nexport function table_resetGrouping<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n table_setGrouping(\n table,\n defaultState ? [] : cloneState(table.initialState.grouping ?? []),\n )\n}\n\nexport function row_getIsGrouped<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(row: Row<TFeatures, TData> & Partial<Row_ColumnGrouping>) {\n return !!row.groupingColumnId\n}\n\nexport function row_getGroupingValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(row: Row<TFeatures, TData> & Partial<Row_ColumnGrouping>, columnId: string) {\n if (row._groupingValuesCache?.hasOwnProperty(columnId)) {\n return row._groupingValuesCache[columnId]\n }\n\n const column = table_getColumn(row.table, columnId) as Column_Internal<\n TFeatures,\n TData\n >\n\n if (!column.columnDef.getGroupingValue) {\n return row.getValue(columnId)\n }\n\n if (row._groupingValuesCache) {\n row._groupingValuesCache[columnId] = column.columnDef.getGroupingValue(\n row.original,\n )\n }\n\n return row._groupingValuesCache?.[columnId]\n}\n\nexport function cell_getIsGrouped<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n const row = cell.row as Row<TFeatures, TData> & Partial<Row_ColumnGrouping>\n return (\n column_getIsGrouped(cell.column) && cell.column.id === row.groupingColumnId\n )\n}\n\nexport function cell_getIsPlaceholder<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return !cell_getIsGrouped(cell) && column_getIsGrouped(cell.column)\n}\n\nexport function cell_getIsAggregated<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return (\n !cell_getIsGrouped(cell) &&\n !cell_getIsPlaceholder(cell) &&\n !!cell.row.subRows.length\n )\n}\n"],"mappings":";;;;AAcA,SAAgB,0BAAyC;AACvD,QAAO,EAAE;;AAGX,SAAgB,sBAId,QAAmD;AACnD,mBAAkB,OAAO,QAAQ,QAAQ;AAEvC,MAAI,IAAI,SAAS,OAAO,GAAG,CACzB,QAAO,IAAI,QAAQ,MAAM,MAAM,OAAO,GAAG;AAG3C,SAAO,CAAC,GAAG,KAAK,OAAO,GAAG;GAC1B;;AAGJ,SAAgB,mBAId,QAAmD;AACnD,SACG,OAAO,UAAU,kBAAkB,UACnC,OAAO,MAAM,QAAQ,kBAAkB,UACvC,CAAC,CAAC,OAAO,cAAc,CAAC,CAAC,OAAO,UAAU;;AAI/C,SAAgB,oBAId,QAA4D;;AAC5D,QAAO,CAAC,2BAAC,OAAO,MAAM,MAAM,yGAAU,KAAK,gFAAE,SAAS,OAAO,GAAG;;AAGlE,SAAgB,uBAId,QAA2D;;AAC3D,mCAAO,OAAO,MAAM,MAAM,4GAAU,KAAK,kFAAE,QAAQ,OAAO,GAAG,KAAI;;AAGnE,SAAgB,gCAId,QAAmD;CACnD,MAAM,WAAW,mBAAmB,OAAO;AAE3C,cAAa;AACX,MAAI,CAAC,SAAU;AACf,wBAAsB,OAAO;;;AAIjC,SAAgB,4BAId,QAAmD;CACnD,MAAM,iBAEU,OAAO,MAAM,aAAa;CAE1C,MAAM,WAAW,OAAO,MAAM,iBAAiB,CAAC,SAAS;CAEzD,MAAM,4DAAQ,SAAU,SAAS,OAAO,GAAG;AAE3C,KAAI,OAAO,UAAU,SACnB,wEAAO,eAAgB;AAGzB,KAAI,OAAO,UAAU,SAAS,KAAK,MAAM,KAAK,gBAC5C,wEAAO,eAAgB;;AAI3B,SAAgB,wBAId,QAAmD;CACnD,MAAM,iBAEU,OAAO,MAAM,aAAa;AAE1C,QAAOA,yBAAW,OAAO,UAAU,cAAc,GAC7C,OAAO,UAAU,gBACjB,OAAO,UAAU,kBAAkB,SACjC,4BAA4B,OAAO,mEACnC,eAAiB,OAAO,UAAU;;AAG1C,SAAgB,kBAGd,OAAyC,SAAiC;;AAC1E,kDAAM,SAAQ,6GAAmB,QAAQ;;AAG3C,SAAgB,oBAGd,OAAyC,cAAwB;AACjE,mBACE,OACA,eAAe,EAAE,GAAGC,yBAAW,MAAM,aAAa,YAAY,EAAE,CAAC,CAClE;;AAGH,SAAgB,iBAGd,KAA0D;AAC1D,QAAO,CAAC,CAAC,IAAI;;AAGf,SAAgB,qBAGd,KAA0D,UAAkB;;AAC5E,8BAAI,IAAI,oGAAsB,eAAe,SAAS,CACpD,QAAO,IAAI,qBAAqB;CAGlC,MAAM,SAASC,iDAAgB,IAAI,OAAO,SAAS;AAKnD,KAAI,CAAC,OAAO,UAAU,iBACpB,QAAO,IAAI,SAAS,SAAS;AAG/B,KAAI,IAAI,qBACN,KAAI,qBAAqB,YAAY,OAAO,UAAU,iBACpD,IAAI,SACL;AAGH,kCAAO,IAAI,sGAAuB;;AAGpC,SAAgB,kBAId,MAAsC;CACtC,MAAM,MAAM,KAAK;AACjB,QACE,oBAAoB,KAAK,OAAO,IAAI,KAAK,OAAO,OAAO,IAAI;;AAI/D,SAAgB,sBAId,MAAsC;AACtC,QAAO,CAAC,kBAAkB,KAAK,IAAI,oBAAoB,KAAK,OAAO;;AAGrE,SAAgB,qBAId,MAAsC;AACtC,QACE,CAAC,kBAAkB,KAAK,IACxB,CAAC,sBAAsB,KAAK,IAC5B,CAAC,CAAC,KAAK,IAAI,QAAQ"}
1
+ {"version":3,"file":"columnGroupingFeature.utils.cjs","names":["isFunction","cloneState","table_getColumn"],"sources":["../../../src/features/column-grouping/columnGroupingFeature.utils.ts"],"sourcesContent":["import { cloneState, isFunction } from '../../utils'\nimport { table_getColumn } from '../../core/columns/coreColumnsFeature.utils'\nimport type { Column_Internal } from '../../types/Column'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type {\n AggregationFn,\n GroupingState,\n Row_ColumnGrouping,\n} from './columnGroupingFeature.types'\n\n/**\n * Returns the default grouping state.\n *\n * Feature constructors use this value to initialize the table state or option defaults when no user value is provided.\n *\n * @example\n * ```ts\n * const initialValue = getDefaultGroupingState()\n * ```\n */\nexport function getDefaultGroupingState(): GroupingState {\n return []\n}\n\n/**\n * Toggles grouping for a column.\n *\n * The update is applied through the owning table state slice and respects the feature options for that column.\n *\n * @example\n * ```ts\n * column_toggleGrouping(column)\n * ```\n */\nexport function column_toggleGrouping<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n table_setGrouping(column.table, (old) => {\n // Find any existing grouping for this column\n if (old.includes(column.id)) {\n return old.filter((d) => d !== column.id)\n }\n\n return [...old, column.id]\n })\n}\n\n/**\n * Returns whether a column can use group.\n *\n * This combines column options, table options, and any required accessor or feature state for the capability.\n *\n * @example\n * ```ts\n * const value = column_getCanGroup(column)\n * ```\n */\nexport function column_getCanGroup<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n return (\n (column.columnDef.enableGrouping ?? true) &&\n (column.table.options.enableGrouping ?? true) &&\n (!!column.accessorFn || !!column.columnDef.getGroupingValue)\n )\n}\n\n/**\n * Returns is grouped for a column.\n *\n * This derives the value from the column definition, table options, and the feature state atoms registered on the table.\n *\n * @example\n * ```ts\n * const value = column_getIsGrouped(column)\n * ```\n */\nexport function column_getIsGrouped<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): boolean {\n return !!column.table.atoms.grouping?.get()?.includes(column.id)\n}\n\n/**\n * Returns grouped index for a column.\n *\n * This derives the value from the column definition, table options, and the feature state atoms registered on the table.\n *\n * @example\n * ```ts\n * const value = column_getGroupedIndex(column)\n * ```\n */\nexport function column_getGroupedIndex<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): number {\n return column.table.atoms.grouping?.get()?.indexOf(column.id) ?? -1\n}\n\n/**\n * Returns an event handler for toggling grouping handler.\n *\n * The handler is intended for direct use in column header controls such as buttons or checkboxes.\n *\n * @example\n * ```ts\n * const value = column_getToggleGroupingHandler(column)\n * ```\n */\nexport function column_getToggleGroupingHandler<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n const canGroup = column_getCanGroup(column)\n\n return () => {\n if (!canGroup) return\n column_toggleGrouping(column)\n }\n}\n\n/**\n * Infers aggregation fn for a column.\n *\n * The inference uses the column definition, table options, and sampled row values when needed.\n *\n * @example\n * ```ts\n * const value = column_getAutoAggregationFn(column)\n * ```\n */\nexport function column_getAutoAggregationFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n const aggregationFns:\n | Record<string, AggregationFn<TFeatures, TData>>\n | undefined = column.table._rowModelFns.aggregationFns\n\n const firstRow = column.table.getCoreRowModel().flatRows[0]\n\n const value = firstRow?.getValue(column.id)\n\n if (typeof value === 'number') {\n return aggregationFns?.sum\n }\n\n if (Object.prototype.toString.call(value) === '[object Date]') {\n return aggregationFns?.extent\n }\n}\n\n/**\n * Returns aggregation fn for a column.\n *\n * This derives the value from the column definition, table options, and the feature state atoms registered on the table.\n *\n * @example\n * ```ts\n * const value = column_getAggregationFn(column)\n * ```\n */\nexport function column_getAggregationFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n const aggregationFns:\n | Record<string, AggregationFn<TFeatures, TData>>\n | undefined = column.table._rowModelFns.aggregationFns\n\n return isFunction(column.columnDef.aggregationFn)\n ? column.columnDef.aggregationFn\n : column.columnDef.aggregationFn === 'auto'\n ? column_getAutoAggregationFn(column)\n : aggregationFns?.[column.columnDef.aggregationFn as string]\n}\n\n/**\n * Updates the table's grouping state slice.\n *\n * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom.\n *\n * @example\n * ```ts\n * table_setGrouping(table, (old) => old)\n * ```\n */\nexport function table_setGrouping<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, updater: Updater<GroupingState>) {\n table.options.onGroupingChange?.(updater)\n}\n\n/**\n * Resets the table's grouping state slice.\n *\n * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value.\n *\n * @example\n * ```ts\n * table_resetGrouping(table)\n * table_resetGrouping(table, true)\n * ```\n */\nexport function table_resetGrouping<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n table_setGrouping(\n table,\n defaultState ? [] : cloneState(table.initialState.grouping ?? []),\n )\n}\n\n/**\n * Returns is grouped for a row.\n *\n * This is the static implementation behind the matching row instance API and may read row caches or table state atoms.\n *\n * @example\n * ```ts\n * const value = row_getIsGrouped(row)\n * ```\n */\nexport function row_getIsGrouped<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(row: Row<TFeatures, TData> & Partial<Row_ColumnGrouping>) {\n return !!row.groupingColumnId\n}\n\n/**\n * Returns grouping value for a row.\n *\n * This is the static implementation behind the matching row instance API and may read row caches or table state atoms.\n *\n * @example\n * ```ts\n * const value = row_getGroupingValue(row)\n * ```\n */\nexport function row_getGroupingValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(row: Row<TFeatures, TData> & Partial<Row_ColumnGrouping>, columnId: string) {\n if (row._groupingValuesCache?.hasOwnProperty(columnId)) {\n return row._groupingValuesCache[columnId]\n }\n\n const column = table_getColumn(row.table, columnId) as Column_Internal<\n TFeatures,\n TData\n >\n\n if (!column.columnDef.getGroupingValue) {\n return row.getValue(columnId)\n }\n\n if (row._groupingValuesCache) {\n row._groupingValuesCache[columnId] = column.columnDef.getGroupingValue(\n row.original,\n )\n }\n\n return row._groupingValuesCache?.[columnId]\n}\n\n/**\n * Returns is grouped for a cell.\n *\n * This is the static implementation behind the matching cell instance API and uses the owning row and column context.\n *\n * @example\n * ```ts\n * const value = cell_getIsGrouped(cell)\n * ```\n */\nexport function cell_getIsGrouped<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n const row = cell.row as Row<TFeatures, TData> & Partial<Row_ColumnGrouping>\n return (\n column_getIsGrouped(cell.column) && cell.column.id === row.groupingColumnId\n )\n}\n\n/**\n * Returns is placeholder for a cell.\n *\n * This is the static implementation behind the matching cell instance API and uses the owning row and column context.\n *\n * @example\n * ```ts\n * const value = cell_getIsPlaceholder(cell)\n * ```\n */\nexport function cell_getIsPlaceholder<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return !cell_getIsGrouped(cell) && column_getIsGrouped(cell.column)\n}\n\n/**\n * Returns is aggregated for a cell.\n *\n * This is the static implementation behind the matching cell instance API and uses the owning row and column context.\n *\n * @example\n * ```ts\n * const value = cell_getIsAggregated(cell)\n * ```\n */\nexport function cell_getIsAggregated<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return (\n !cell_getIsGrouped(cell) &&\n !cell_getIsPlaceholder(cell) &&\n !!cell.row.subRows.length\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAwBA,SAAgB,0BAAyC;CACvD,OAAO,EAAE;;;;;;;;;;;;AAaX,SAAgB,sBAId,QAAmD;CACnD,kBAAkB,OAAO,QAAQ,QAAQ;EAEvC,IAAI,IAAI,SAAS,OAAO,GAAG,EACzB,OAAO,IAAI,QAAQ,MAAM,MAAM,OAAO,GAAG;EAG3C,OAAO,CAAC,GAAG,KAAK,OAAO,GAAG;GAC1B;;;;;;;;;;;;AAaJ,SAAgB,mBAId,QAAmD;CACnD,QACG,OAAO,UAAU,kBAAkB,UACnC,OAAO,MAAM,QAAQ,kBAAkB,UACvC,CAAC,CAAC,OAAO,cAAc,CAAC,CAAC,OAAO,UAAU;;;;;;;;;;;;AAc/C,SAAgB,oBAId,QAA4D;;CAC5D,OAAO,CAAC,2BAAC,OAAO,MAAM,MAAM,yGAAU,KAAK,gFAAE,SAAS,OAAO,GAAG;;;;;;;;;;;;AAalE,SAAgB,uBAId,QAA2D;;CAC3D,kCAAO,OAAO,MAAM,MAAM,4GAAU,KAAK,kFAAE,QAAQ,OAAO,GAAG,KAAI;;;;;;;;;;;;AAanE,SAAgB,gCAId,QAAmD;CACnD,MAAM,WAAW,mBAAmB,OAAO;CAE3C,aAAa;EACX,IAAI,CAAC,UAAU;EACf,sBAAsB,OAAO;;;;;;;;;;;;;AAcjC,SAAgB,4BAId,QAAmD;CACnD,MAAM,iBAEU,OAAO,MAAM,aAAa;CAE1C,MAAM,WAAW,OAAO,MAAM,iBAAiB,CAAC,SAAS;CAEzD,MAAM,4DAAQ,SAAU,SAAS,OAAO,GAAG;CAE3C,IAAI,OAAO,UAAU,UACnB,uEAAO,eAAgB;CAGzB,IAAI,OAAO,UAAU,SAAS,KAAK,MAAM,KAAK,iBAC5C,uEAAO,eAAgB;;;;;;;;;;;;AAc3B,SAAgB,wBAId,QAAmD;CACnD,MAAM,iBAEU,OAAO,MAAM,aAAa;CAE1C,OAAOA,yBAAW,OAAO,UAAU,cAAc,GAC7C,OAAO,UAAU,gBACjB,OAAO,UAAU,kBAAkB,SACjC,4BAA4B,OAAO,mEACnC,eAAiB,OAAO,UAAU;;;;;;;;;;;;AAa1C,SAAgB,kBAGd,OAAyC,SAAiC;;CAC1E,iDAAM,SAAQ,6GAAmB,QAAQ;;;;;;;;;;;;;AAc3C,SAAgB,oBAGd,OAAyC,cAAwB;CACjE,kBACE,OACA,eAAe,EAAE,GAAGC,yBAAW,MAAM,aAAa,YAAY,EAAE,CAAC,CAClE;;;;;;;;;;;;AAaH,SAAgB,iBAGd,KAA0D;CAC1D,OAAO,CAAC,CAAC,IAAI;;;;;;;;;;;;AAaf,SAAgB,qBAGd,KAA0D,UAAkB;;CAC5E,6BAAI,IAAI,oGAAsB,eAAe,SAAS,EACpD,OAAO,IAAI,qBAAqB;CAGlC,MAAM,SAASC,iDAAgB,IAAI,OAAO,SAAS;CAKnD,IAAI,CAAC,OAAO,UAAU,kBACpB,OAAO,IAAI,SAAS,SAAS;CAG/B,IAAI,IAAI,sBACN,IAAI,qBAAqB,YAAY,OAAO,UAAU,iBACpD,IAAI,SACL;CAGH,iCAAO,IAAI,sGAAuB;;;;;;;;;;;;AAapC,SAAgB,kBAId,MAAsC;CACtC,MAAM,MAAM,KAAK;CACjB,OACE,oBAAoB,KAAK,OAAO,IAAI,KAAK,OAAO,OAAO,IAAI;;;;;;;;;;;;AAc/D,SAAgB,sBAId,MAAsC;CACtC,OAAO,CAAC,kBAAkB,KAAK,IAAI,oBAAoB,KAAK,OAAO;;;;;;;;;;;;AAarE,SAAgB,qBAId,MAAsC;CACtC,OACE,CAAC,kBAAkB,KAAK,IACxB,CAAC,sBAAsB,KAAK,IAC5B,CAAC,CAAC,KAAK,IAAI,QAAQ"}