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

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 (528) hide show
  1. package/dist/core/cells/constructCell.cjs +9 -3
  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 +9 -3
  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 +21 -12
  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 +21 -12
  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 +107 -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 +107 -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 +33 -20
  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 +33 -20
  50. package/dist/core/headers/buildHeaderGroups.js.map +1 -1
  51. package/dist/core/headers/constructHeader.cjs +9 -3
  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 +9 -3
  56. package/dist/core/headers/constructHeader.js.map +1 -1
  57. package/dist/core/headers/coreHeadersFeature.cjs +6 -6
  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 +7 -7
  62. package/dist/core/headers/coreHeadersFeature.js.map +1 -1
  63. package/dist/core/headers/coreHeadersFeature.utils.cjs +87 -16
  64. package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
  65. package/dist/core/headers/coreHeadersFeature.utils.d.cts +61 -1
  66. package/dist/core/headers/coreHeadersFeature.utils.d.ts +61 -1
  67. package/dist/core/headers/coreHeadersFeature.utils.js +89 -18
  68. package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
  69. package/dist/core/reactivity/coreReactivityFeature.types.d.cts +4 -0
  70. package/dist/core/reactivity/coreReactivityFeature.types.d.ts +4 -0
  71. package/dist/core/reactivity/coreReactivityFeature.utils.cjs +5 -0
  72. package/dist/core/reactivity/coreReactivityFeature.utils.cjs.map +1 -1
  73. package/dist/core/reactivity/coreReactivityFeature.utils.d.cts +10 -0
  74. package/dist/core/reactivity/coreReactivityFeature.utils.d.ts +10 -0
  75. package/dist/core/reactivity/coreReactivityFeature.utils.js +5 -0
  76. package/dist/core/reactivity/coreReactivityFeature.utils.js.map +1 -1
  77. package/dist/core/row-models/coreRowModelsFeature.cjs +5 -0
  78. package/dist/core/row-models/coreRowModelsFeature.cjs.map +1 -1
  79. package/dist/core/row-models/coreRowModelsFeature.d.cts +5 -0
  80. package/dist/core/row-models/coreRowModelsFeature.d.ts +5 -0
  81. package/dist/core/row-models/coreRowModelsFeature.js +5 -0
  82. package/dist/core/row-models/coreRowModelsFeature.js.map +1 -1
  83. package/dist/core/row-models/coreRowModelsFeature.types.d.cts +2 -1
  84. package/dist/core/row-models/coreRowModelsFeature.types.d.ts +2 -1
  85. package/dist/core/row-models/coreRowModelsFeature.utils.cjs +120 -0
  86. package/dist/core/row-models/coreRowModelsFeature.utils.cjs.map +1 -1
  87. package/dist/core/row-models/coreRowModelsFeature.utils.d.cts +120 -0
  88. package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +120 -0
  89. package/dist/core/row-models/coreRowModelsFeature.utils.js +120 -0
  90. package/dist/core/row-models/coreRowModelsFeature.utils.js.map +1 -1
  91. package/dist/core/row-models/createCoreRowModel.cjs +5 -0
  92. package/dist/core/row-models/createCoreRowModel.cjs.map +1 -1
  93. package/dist/core/row-models/createCoreRowModel.d.cts +5 -0
  94. package/dist/core/row-models/createCoreRowModel.d.ts +5 -0
  95. package/dist/core/row-models/createCoreRowModel.js +5 -0
  96. package/dist/core/row-models/createCoreRowModel.js.map +1 -1
  97. package/dist/core/rows/constructRow.cjs +13 -6
  98. package/dist/core/rows/constructRow.cjs.map +1 -1
  99. package/dist/core/rows/constructRow.d.cts +5 -0
  100. package/dist/core/rows/constructRow.d.ts +5 -0
  101. package/dist/core/rows/constructRow.js +13 -6
  102. package/dist/core/rows/constructRow.js.map +1 -1
  103. package/dist/core/rows/coreRowsFeature.cjs +5 -0
  104. package/dist/core/rows/coreRowsFeature.cjs.map +1 -1
  105. package/dist/core/rows/coreRowsFeature.d.cts +5 -0
  106. package/dist/core/rows/coreRowsFeature.d.ts +5 -0
  107. package/dist/core/rows/coreRowsFeature.js +5 -0
  108. package/dist/core/rows/coreRowsFeature.js.map +1 -1
  109. package/dist/core/rows/coreRowsFeature.types.d.cts +3 -0
  110. package/dist/core/rows/coreRowsFeature.types.d.ts +3 -0
  111. package/dist/core/rows/coreRowsFeature.utils.cjs +112 -7
  112. package/dist/core/rows/coreRowsFeature.utils.cjs.map +1 -1
  113. package/dist/core/rows/coreRowsFeature.utils.d.cts +101 -0
  114. package/dist/core/rows/coreRowsFeature.utils.d.ts +101 -0
  115. package/dist/core/rows/coreRowsFeature.utils.js +112 -7
  116. package/dist/core/rows/coreRowsFeature.utils.js.map +1 -1
  117. package/dist/core/table/constructTable.cjs +19 -5
  118. package/dist/core/table/constructTable.cjs.map +1 -1
  119. package/dist/core/table/constructTable.d.cts +10 -0
  120. package/dist/core/table/constructTable.d.ts +10 -0
  121. package/dist/core/table/constructTable.js +19 -5
  122. package/dist/core/table/constructTable.js.map +1 -1
  123. package/dist/core/table/coreTablesFeature.cjs +5 -0
  124. package/dist/core/table/coreTablesFeature.cjs.map +1 -1
  125. package/dist/core/table/coreTablesFeature.d.cts +5 -0
  126. package/dist/core/table/coreTablesFeature.d.ts +5 -0
  127. package/dist/core/table/coreTablesFeature.js +5 -0
  128. package/dist/core/table/coreTablesFeature.js.map +1 -1
  129. package/dist/core/table/coreTablesFeature.types.d.cts +22 -12
  130. package/dist/core/table/coreTablesFeature.types.d.ts +22 -12
  131. package/dist/core/table/coreTablesFeature.utils.cjs +49 -1
  132. package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
  133. package/dist/core/table/coreTablesFeature.utils.d.cts +44 -0
  134. package/dist/core/table/coreTablesFeature.utils.d.ts +44 -0
  135. package/dist/core/table/coreTablesFeature.utils.js +49 -1
  136. package/dist/core/table/coreTablesFeature.utils.js.map +1 -1
  137. package/dist/features/column-faceting/columnFacetingFeature.cjs +9 -1
  138. package/dist/features/column-faceting/columnFacetingFeature.cjs.map +1 -1
  139. package/dist/features/column-faceting/columnFacetingFeature.d.cts +9 -1
  140. package/dist/features/column-faceting/columnFacetingFeature.d.ts +9 -1
  141. package/dist/features/column-faceting/columnFacetingFeature.js +9 -1
  142. package/dist/features/column-faceting/columnFacetingFeature.js.map +1 -1
  143. package/dist/features/column-faceting/columnFacetingFeature.types.d.cts +12 -6
  144. package/dist/features/column-faceting/columnFacetingFeature.types.d.ts +12 -6
  145. package/dist/features/column-faceting/columnFacetingFeature.utils.cjs +60 -0
  146. package/dist/features/column-faceting/columnFacetingFeature.utils.cjs.map +1 -1
  147. package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +60 -0
  148. package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +60 -0
  149. package/dist/features/column-faceting/columnFacetingFeature.utils.js +60 -0
  150. package/dist/features/column-faceting/columnFacetingFeature.utils.js.map +1 -1
  151. package/dist/features/column-faceting/createFacetedMinMaxValues.cjs +13 -5
  152. package/dist/features/column-faceting/createFacetedMinMaxValues.cjs.map +1 -1
  153. package/dist/features/column-faceting/createFacetedMinMaxValues.d.cts +5 -0
  154. package/dist/features/column-faceting/createFacetedMinMaxValues.d.ts +5 -0
  155. package/dist/features/column-faceting/createFacetedMinMaxValues.js +13 -5
  156. package/dist/features/column-faceting/createFacetedMinMaxValues.js.map +1 -1
  157. package/dist/features/column-faceting/createFacetedRowModel.cjs +13 -3
  158. package/dist/features/column-faceting/createFacetedRowModel.cjs.map +1 -1
  159. package/dist/features/column-faceting/createFacetedRowModel.d.cts +5 -0
  160. package/dist/features/column-faceting/createFacetedRowModel.d.ts +5 -0
  161. package/dist/features/column-faceting/createFacetedRowModel.js +13 -3
  162. package/dist/features/column-faceting/createFacetedRowModel.js.map +1 -1
  163. package/dist/features/column-faceting/createFacetedUniqueValues.cjs +12 -4
  164. package/dist/features/column-faceting/createFacetedUniqueValues.cjs.map +1 -1
  165. package/dist/features/column-faceting/createFacetedUniqueValues.d.cts +5 -0
  166. package/dist/features/column-faceting/createFacetedUniqueValues.d.ts +5 -0
  167. package/dist/features/column-faceting/createFacetedUniqueValues.js +12 -4
  168. package/dist/features/column-faceting/createFacetedUniqueValues.js.map +1 -1
  169. package/dist/features/column-filtering/columnFilteringFeature.cjs +10 -2
  170. package/dist/features/column-filtering/columnFilteringFeature.cjs.map +1 -1
  171. package/dist/features/column-filtering/columnFilteringFeature.d.cts +10 -2
  172. package/dist/features/column-filtering/columnFilteringFeature.d.ts +10 -2
  173. package/dist/features/column-filtering/columnFilteringFeature.js +10 -2
  174. package/dist/features/column-filtering/columnFilteringFeature.js.map +1 -1
  175. package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +7 -4
  176. package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +7 -4
  177. package/dist/features/column-filtering/columnFilteringFeature.utils.cjs +113 -2
  178. package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +1 -1
  179. package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +111 -0
  180. package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +111 -0
  181. package/dist/features/column-filtering/columnFilteringFeature.utils.js +113 -2
  182. package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +1 -1
  183. package/dist/features/column-filtering/createFilteredRowModel.cjs +16 -5
  184. package/dist/features/column-filtering/createFilteredRowModel.cjs.map +1 -1
  185. package/dist/features/column-filtering/createFilteredRowModel.d.cts +5 -0
  186. package/dist/features/column-filtering/createFilteredRowModel.d.ts +5 -0
  187. package/dist/features/column-filtering/createFilteredRowModel.js +16 -5
  188. package/dist/features/column-filtering/createFilteredRowModel.js.map +1 -1
  189. package/dist/features/column-filtering/filterRowsUtils.cjs +5 -0
  190. package/dist/features/column-filtering/filterRowsUtils.cjs.map +1 -1
  191. package/dist/features/column-filtering/filterRowsUtils.js +5 -0
  192. package/dist/features/column-filtering/filterRowsUtils.js.map +1 -1
  193. package/dist/features/column-grouping/columnGroupingFeature.cjs +9 -1
  194. package/dist/features/column-grouping/columnGroupingFeature.cjs.map +1 -1
  195. package/dist/features/column-grouping/columnGroupingFeature.d.cts +9 -1
  196. package/dist/features/column-grouping/columnGroupingFeature.d.ts +9 -1
  197. package/dist/features/column-grouping/columnGroupingFeature.js +9 -1
  198. package/dist/features/column-grouping/columnGroupingFeature.js.map +1 -1
  199. package/dist/features/column-grouping/columnGroupingFeature.types.d.cts +7 -3
  200. package/dist/features/column-grouping/columnGroupingFeature.types.d.ts +7 -3
  201. package/dist/features/column-grouping/columnGroupingFeature.utils.cjs +151 -0
  202. package/dist/features/column-grouping/columnGroupingFeature.utils.cjs.map +1 -1
  203. package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +151 -0
  204. package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +151 -0
  205. package/dist/features/column-grouping/columnGroupingFeature.utils.js +151 -0
  206. package/dist/features/column-grouping/columnGroupingFeature.utils.js.map +1 -1
  207. package/dist/features/column-grouping/createGroupedRowModel.cjs +5 -0
  208. package/dist/features/column-grouping/createGroupedRowModel.cjs.map +1 -1
  209. package/dist/features/column-grouping/createGroupedRowModel.d.cts +5 -0
  210. package/dist/features/column-grouping/createGroupedRowModel.d.ts +5 -0
  211. package/dist/features/column-grouping/createGroupedRowModel.js +5 -0
  212. package/dist/features/column-grouping/createGroupedRowModel.js.map +1 -1
  213. package/dist/features/column-ordering/columnOrderingFeature.cjs +12 -3
  214. package/dist/features/column-ordering/columnOrderingFeature.cjs.map +1 -1
  215. package/dist/features/column-ordering/columnOrderingFeature.d.cts +9 -1
  216. package/dist/features/column-ordering/columnOrderingFeature.d.ts +9 -1
  217. package/dist/features/column-ordering/columnOrderingFeature.js +12 -3
  218. package/dist/features/column-ordering/columnOrderingFeature.js.map +1 -1
  219. package/dist/features/column-ordering/columnOrderingFeature.types.d.cts +4 -2
  220. package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +4 -2
  221. package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +108 -8
  222. package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +1 -1
  223. package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +81 -0
  224. package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +81 -0
  225. package/dist/features/column-ordering/columnOrderingFeature.utils.js +108 -8
  226. package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +1 -1
  227. package/dist/features/column-pinning/columnPinningFeature.cjs +17 -30
  228. package/dist/features/column-pinning/columnPinningFeature.cjs.map +1 -1
  229. package/dist/features/column-pinning/columnPinningFeature.d.cts +9 -1
  230. package/dist/features/column-pinning/columnPinningFeature.d.ts +9 -1
  231. package/dist/features/column-pinning/columnPinningFeature.js +17 -30
  232. package/dist/features/column-pinning/columnPinningFeature.js.map +1 -1
  233. package/dist/features/column-pinning/columnPinningFeature.types.d.cts +6 -2
  234. package/dist/features/column-pinning/columnPinningFeature.types.d.ts +6 -2
  235. package/dist/features/column-pinning/columnPinningFeature.utils.cjs +387 -27
  236. package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
  237. package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +318 -6
  238. package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +318 -6
  239. package/dist/features/column-pinning/columnPinningFeature.utils.js +388 -28
  240. package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
  241. package/dist/features/column-resizing/columnResizingFeature.cjs +9 -2
  242. package/dist/features/column-resizing/columnResizingFeature.cjs.map +1 -1
  243. package/dist/features/column-resizing/columnResizingFeature.d.cts +9 -2
  244. package/dist/features/column-resizing/columnResizingFeature.d.ts +9 -2
  245. package/dist/features/column-resizing/columnResizingFeature.js +9 -2
  246. package/dist/features/column-resizing/columnResizingFeature.js.map +1 -1
  247. package/dist/features/column-resizing/columnResizingFeature.types.d.cts +14 -6
  248. package/dist/features/column-resizing/columnResizingFeature.types.d.ts +14 -6
  249. package/dist/features/column-resizing/columnResizingFeature.utils.cjs +81 -0
  250. package/dist/features/column-resizing/columnResizingFeature.utils.cjs.map +1 -1
  251. package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +81 -0
  252. package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +81 -0
  253. package/dist/features/column-resizing/columnResizingFeature.utils.js +81 -0
  254. package/dist/features/column-resizing/columnResizingFeature.utils.js.map +1 -1
  255. package/dist/features/column-sizing/columnSizingFeature.cjs +78 -16
  256. package/dist/features/column-sizing/columnSizingFeature.cjs.map +1 -1
  257. package/dist/features/column-sizing/columnSizingFeature.d.cts +10 -2
  258. package/dist/features/column-sizing/columnSizingFeature.d.ts +10 -2
  259. package/dist/features/column-sizing/columnSizingFeature.js +79 -17
  260. package/dist/features/column-sizing/columnSizingFeature.js.map +1 -1
  261. package/dist/features/column-sizing/columnSizingFeature.types.d.cts +6 -3
  262. package/dist/features/column-sizing/columnSizingFeature.types.d.ts +6 -3
  263. package/dist/features/column-sizing/columnSizingFeature.utils.cjs +151 -3
  264. package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +1 -1
  265. package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +141 -0
  266. package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +141 -0
  267. package/dist/features/column-sizing/columnSizingFeature.utils.js +151 -3
  268. package/dist/features/column-sizing/columnSizingFeature.utils.js.map +1 -1
  269. package/dist/features/column-visibility/columnVisibilityFeature.cjs +30 -20
  270. package/dist/features/column-visibility/columnVisibilityFeature.cjs.map +1 -1
  271. package/dist/features/column-visibility/columnVisibilityFeature.d.cts +9 -1
  272. package/dist/features/column-visibility/columnVisibilityFeature.d.ts +9 -1
  273. package/dist/features/column-visibility/columnVisibilityFeature.js +31 -21
  274. package/dist/features/column-visibility/columnVisibilityFeature.js.map +1 -1
  275. package/dist/features/column-visibility/columnVisibilityFeature.types.d.cts +8 -3
  276. package/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +8 -3
  277. package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +199 -12
  278. package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +1 -1
  279. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +154 -3
  280. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +154 -3
  281. package/dist/features/column-visibility/columnVisibilityFeature.utils.js +199 -12
  282. package/dist/features/column-visibility/columnVisibilityFeature.utils.js.map +1 -1
  283. package/dist/features/global-filtering/globalFilteringFeature.cjs +9 -2
  284. package/dist/features/global-filtering/globalFilteringFeature.cjs.map +1 -1
  285. package/dist/features/global-filtering/globalFilteringFeature.d.cts +9 -2
  286. package/dist/features/global-filtering/globalFilteringFeature.d.ts +9 -2
  287. package/dist/features/global-filtering/globalFilteringFeature.js +9 -2
  288. package/dist/features/global-filtering/globalFilteringFeature.js.map +1 -1
  289. package/dist/features/global-filtering/globalFilteringFeature.types.d.cts +4 -2
  290. package/dist/features/global-filtering/globalFilteringFeature.types.d.ts +4 -2
  291. package/dist/features/global-filtering/globalFilteringFeature.utils.cjs +51 -0
  292. package/dist/features/global-filtering/globalFilteringFeature.utils.cjs.map +1 -1
  293. package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +51 -0
  294. package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +51 -0
  295. package/dist/features/global-filtering/globalFilteringFeature.utils.js +51 -0
  296. package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +1 -1
  297. package/dist/features/row-expanding/createExpandedRowModel.cjs +10 -0
  298. package/dist/features/row-expanding/createExpandedRowModel.cjs.map +1 -1
  299. package/dist/features/row-expanding/createExpandedRowModel.d.cts +10 -0
  300. package/dist/features/row-expanding/createExpandedRowModel.d.ts +10 -0
  301. package/dist/features/row-expanding/createExpandedRowModel.js +10 -0
  302. package/dist/features/row-expanding/createExpandedRowModel.js.map +1 -1
  303. package/dist/features/row-expanding/rowExpandingFeature.cjs +9 -1
  304. package/dist/features/row-expanding/rowExpandingFeature.cjs.map +1 -1
  305. package/dist/features/row-expanding/rowExpandingFeature.d.cts +9 -1
  306. package/dist/features/row-expanding/rowExpandingFeature.d.ts +9 -1
  307. package/dist/features/row-expanding/rowExpandingFeature.js +9 -1
  308. package/dist/features/row-expanding/rowExpandingFeature.js.map +1 -1
  309. package/dist/features/row-expanding/rowExpandingFeature.types.d.cts +10 -5
  310. package/dist/features/row-expanding/rowExpandingFeature.types.d.ts +10 -5
  311. package/dist/features/row-expanding/rowExpandingFeature.utils.cjs +153 -2
  312. package/dist/features/row-expanding/rowExpandingFeature.utils.cjs.map +1 -1
  313. package/dist/features/row-expanding/rowExpandingFeature.utils.d.cts +151 -0
  314. package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +151 -0
  315. package/dist/features/row-expanding/rowExpandingFeature.utils.js +153 -2
  316. package/dist/features/row-expanding/rowExpandingFeature.utils.js.map +1 -1
  317. package/dist/features/row-pagination/createPaginatedRowModel.cjs +5 -0
  318. package/dist/features/row-pagination/createPaginatedRowModel.cjs.map +1 -1
  319. package/dist/features/row-pagination/createPaginatedRowModel.d.cts +5 -0
  320. package/dist/features/row-pagination/createPaginatedRowModel.d.ts +5 -0
  321. package/dist/features/row-pagination/createPaginatedRowModel.js +5 -0
  322. package/dist/features/row-pagination/createPaginatedRowModel.js.map +1 -1
  323. package/dist/features/row-pagination/rowPaginationFeature.cjs +9 -1
  324. package/dist/features/row-pagination/rowPaginationFeature.cjs.map +1 -1
  325. package/dist/features/row-pagination/rowPaginationFeature.d.cts +9 -1
  326. package/dist/features/row-pagination/rowPaginationFeature.d.ts +9 -1
  327. package/dist/features/row-pagination/rowPaginationFeature.js +9 -1
  328. package/dist/features/row-pagination/rowPaginationFeature.js.map +1 -1
  329. package/dist/features/row-pagination/rowPaginationFeature.types.d.cts +11 -7
  330. package/dist/features/row-pagination/rowPaginationFeature.types.d.ts +11 -7
  331. package/dist/features/row-pagination/rowPaginationFeature.utils.cjs +175 -0
  332. package/dist/features/row-pagination/rowPaginationFeature.utils.cjs.map +1 -1
  333. package/dist/features/row-pagination/rowPaginationFeature.utils.d.cts +175 -0
  334. package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +175 -0
  335. package/dist/features/row-pagination/rowPaginationFeature.utils.js +175 -0
  336. package/dist/features/row-pagination/rowPaginationFeature.utils.js.map +1 -1
  337. package/dist/features/row-pinning/rowPinningFeature.cjs +9 -1
  338. package/dist/features/row-pinning/rowPinningFeature.cjs.map +1 -1
  339. package/dist/features/row-pinning/rowPinningFeature.d.cts +9 -1
  340. package/dist/features/row-pinning/rowPinningFeature.d.ts +9 -1
  341. package/dist/features/row-pinning/rowPinningFeature.js +9 -1
  342. package/dist/features/row-pinning/rowPinningFeature.js.map +1 -1
  343. package/dist/features/row-pinning/rowPinningFeature.types.d.cts +4 -2
  344. package/dist/features/row-pinning/rowPinningFeature.types.d.ts +4 -2
  345. package/dist/features/row-pinning/rowPinningFeature.utils.cjs +125 -7
  346. package/dist/features/row-pinning/rowPinningFeature.utils.cjs.map +1 -1
  347. package/dist/features/row-pinning/rowPinningFeature.utils.d.cts +112 -0
  348. package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +112 -0
  349. package/dist/features/row-pinning/rowPinningFeature.utils.js +125 -7
  350. package/dist/features/row-pinning/rowPinningFeature.utils.js.map +1 -1
  351. package/dist/features/row-selection/rowSelectionFeature.cjs +9 -1
  352. package/dist/features/row-selection/rowSelectionFeature.cjs.map +1 -1
  353. package/dist/features/row-selection/rowSelectionFeature.d.cts +9 -1
  354. package/dist/features/row-selection/rowSelectionFeature.d.ts +9 -1
  355. package/dist/features/row-selection/rowSelectionFeature.js +9 -1
  356. package/dist/features/row-selection/rowSelectionFeature.js.map +1 -1
  357. package/dist/features/row-selection/rowSelectionFeature.types.d.cts +4 -2
  358. package/dist/features/row-selection/rowSelectionFeature.types.d.ts +4 -2
  359. package/dist/features/row-selection/rowSelectionFeature.utils.cjs +265 -3
  360. package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +1 -1
  361. package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +259 -0
  362. package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +259 -0
  363. package/dist/features/row-selection/rowSelectionFeature.utils.js +265 -3
  364. package/dist/features/row-selection/rowSelectionFeature.utils.js.map +1 -1
  365. package/dist/features/row-sorting/createSortedRowModel.cjs +18 -8
  366. package/dist/features/row-sorting/createSortedRowModel.cjs.map +1 -1
  367. package/dist/features/row-sorting/createSortedRowModel.d.cts +5 -0
  368. package/dist/features/row-sorting/createSortedRowModel.d.ts +5 -0
  369. package/dist/features/row-sorting/createSortedRowModel.js +18 -8
  370. package/dist/features/row-sorting/createSortedRowModel.js.map +1 -1
  371. package/dist/features/row-sorting/rowSortingFeature.cjs +11 -3
  372. package/dist/features/row-sorting/rowSortingFeature.cjs.map +1 -1
  373. package/dist/features/row-sorting/rowSortingFeature.d.cts +9 -1
  374. package/dist/features/row-sorting/rowSortingFeature.d.ts +9 -1
  375. package/dist/features/row-sorting/rowSortingFeature.js +11 -3
  376. package/dist/features/row-sorting/rowSortingFeature.js.map +1 -1
  377. package/dist/features/row-sorting/rowSortingFeature.types.d.cts +7 -3
  378. package/dist/features/row-sorting/rowSortingFeature.types.d.ts +7 -3
  379. package/dist/features/row-sorting/rowSortingFeature.utils.cjs +153 -2
  380. package/dist/features/row-sorting/rowSortingFeature.utils.cjs.map +1 -1
  381. package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +151 -0
  382. package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +151 -0
  383. package/dist/features/row-sorting/rowSortingFeature.utils.js +153 -2
  384. package/dist/features/row-sorting/rowSortingFeature.utils.js.map +1 -1
  385. package/dist/features/stockFeatures.cjs +5 -0
  386. package/dist/features/stockFeatures.cjs.map +1 -1
  387. package/dist/features/stockFeatures.d.cts +5 -0
  388. package/dist/features/stockFeatures.d.ts +5 -0
  389. package/dist/features/stockFeatures.js +5 -0
  390. package/dist/features/stockFeatures.js.map +1 -1
  391. package/dist/flex-render.cjs +10 -0
  392. package/dist/flex-render.cjs.map +1 -1
  393. package/dist/flex-render.d.cts +10 -0
  394. package/dist/flex-render.d.ts +10 -0
  395. package/dist/flex-render.js +10 -0
  396. package/dist/flex-render.js.map +1 -1
  397. package/dist/fns/aggregationFns.cjs +19 -7
  398. package/dist/fns/aggregationFns.cjs.map +1 -1
  399. package/dist/fns/aggregationFns.d.cts +5 -0
  400. package/dist/fns/aggregationFns.d.ts +5 -0
  401. package/dist/fns/aggregationFns.js +19 -8
  402. package/dist/fns/aggregationFns.js.map +1 -1
  403. package/dist/fns/filterFns.cjs +5 -0
  404. package/dist/fns/filterFns.cjs.map +1 -1
  405. package/dist/fns/filterFns.d.cts +5 -0
  406. package/dist/fns/filterFns.d.ts +5 -0
  407. package/dist/fns/filterFns.js +5 -0
  408. package/dist/fns/filterFns.js.map +1 -1
  409. package/dist/fns/sortFns.cjs +49 -4
  410. package/dist/fns/sortFns.cjs.map +1 -1
  411. package/dist/fns/sortFns.d.cts +41 -0
  412. package/dist/fns/sortFns.d.ts +41 -0
  413. package/dist/fns/sortFns.js +49 -4
  414. package/dist/fns/sortFns.js.map +1 -1
  415. package/dist/helpers/columnHelper.cjs.map +1 -1
  416. package/dist/helpers/columnHelper.js.map +1 -1
  417. package/dist/helpers/tableFeatures.cjs.map +1 -1
  418. package/dist/helpers/tableFeatures.js.map +1 -1
  419. package/dist/helpers/tableOptions.cjs +6 -0
  420. package/dist/helpers/tableOptions.cjs.map +1 -1
  421. package/dist/helpers/tableOptions.d.cts +26 -0
  422. package/dist/helpers/tableOptions.d.ts +26 -0
  423. package/dist/helpers/tableOptions.js +6 -0
  424. package/dist/helpers/tableOptions.js.map +1 -1
  425. package/dist/index.cjs +0 -4
  426. package/dist/index.d.cts +2 -2
  427. package/dist/index.d.ts +2 -2
  428. package/dist/index.js +2 -2
  429. package/dist/static-functions.cjs +2 -1
  430. package/dist/static-functions.d.cts +3 -3
  431. package/dist/static-functions.d.ts +3 -3
  432. package/dist/static-functions.js +3 -3
  433. package/dist/store-reactivity-bindings.cjs +1 -0
  434. package/dist/store-reactivity-bindings.cjs.map +1 -1
  435. package/dist/store-reactivity-bindings.js +1 -0
  436. package/dist/store-reactivity-bindings.js.map +1 -1
  437. package/dist/utils.cjs +49 -25
  438. package/dist/utils.cjs.map +1 -1
  439. package/dist/utils.d.cts +33 -10
  440. package/dist/utils.d.ts +33 -10
  441. package/dist/utils.js +50 -22
  442. package/dist/utils.js.map +1 -1
  443. package/package.json +1 -1
  444. package/src/core/cells/constructCell.ts +8 -2
  445. package/src/core/cells/coreCellsFeature.ts +5 -0
  446. package/src/core/cells/coreCellsFeature.utils.ts +30 -0
  447. package/src/core/columns/constructColumn.ts +11 -3
  448. package/src/core/columns/coreColumnsFeature.ts +10 -0
  449. package/src/core/columns/coreColumnsFeature.types.ts +4 -0
  450. package/src/core/columns/coreColumnsFeature.utils.ts +113 -8
  451. package/src/core/coreFeatures.ts +5 -0
  452. package/src/core/headers/buildHeaderGroups.ts +36 -31
  453. package/src/core/headers/constructHeader.ts +8 -2
  454. package/src/core/headers/coreHeadersFeature.ts +7 -27
  455. package/src/core/headers/coreHeadersFeature.utils.ts +110 -46
  456. package/src/core/reactivity/coreReactivityFeature.types.ts +4 -0
  457. package/src/core/reactivity/coreReactivityFeature.utils.ts +15 -0
  458. package/src/core/row-models/coreRowModelsFeature.ts +5 -0
  459. package/src/core/row-models/coreRowModelsFeature.types.ts +2 -1
  460. package/src/core/row-models/coreRowModelsFeature.utils.ts +120 -0
  461. package/src/core/row-models/createCoreRowModel.ts +5 -0
  462. package/src/core/rows/constructRow.ts +11 -4
  463. package/src/core/rows/coreRowsFeature.ts +5 -0
  464. package/src/core/rows/coreRowsFeature.types.ts +3 -0
  465. package/src/core/rows/coreRowsFeature.utils.ts +116 -10
  466. package/src/core/table/constructTable.ts +16 -4
  467. package/src/core/table/coreTablesFeature.ts +5 -0
  468. package/src/core/table/coreTablesFeature.types.ts +22 -12
  469. package/src/core/table/coreTablesFeature.utils.ts +47 -1
  470. package/src/features/column-faceting/columnFacetingFeature.ts +9 -1
  471. package/src/features/column-faceting/columnFacetingFeature.types.ts +12 -6
  472. package/src/features/column-faceting/columnFacetingFeature.utils.ts +60 -0
  473. package/src/features/column-faceting/createFacetedMinMaxValues.ts +13 -10
  474. package/src/features/column-faceting/createFacetedRowModel.ts +15 -6
  475. package/src/features/column-faceting/createFacetedUniqueValues.ts +9 -3
  476. package/src/features/column-filtering/columnFilteringFeature.ts +10 -2
  477. package/src/features/column-filtering/columnFilteringFeature.types.ts +7 -4
  478. package/src/features/column-filtering/columnFilteringFeature.utils.ts +113 -2
  479. package/src/features/column-filtering/createFilteredRowModel.ts +19 -8
  480. package/src/features/column-filtering/filterRowsUtils.ts +5 -0
  481. package/src/features/column-grouping/columnGroupingFeature.ts +9 -1
  482. package/src/features/column-grouping/columnGroupingFeature.types.ts +7 -3
  483. package/src/features/column-grouping/columnGroupingFeature.utils.ts +151 -0
  484. package/src/features/column-grouping/createGroupedRowModel.ts +5 -0
  485. package/src/features/column-ordering/columnOrderingFeature.ts +10 -1
  486. package/src/features/column-ordering/columnOrderingFeature.types.ts +4 -2
  487. package/src/features/column-ordering/columnOrderingFeature.utils.ts +117 -17
  488. package/src/features/column-pinning/columnPinningFeature.ts +11 -12
  489. package/src/features/column-pinning/columnPinningFeature.types.ts +6 -2
  490. package/src/features/column-pinning/columnPinningFeature.utils.ts +425 -76
  491. package/src/features/column-resizing/columnResizingFeature.ts +9 -2
  492. package/src/features/column-resizing/columnResizingFeature.types.ts +14 -6
  493. package/src/features/column-resizing/columnResizingFeature.utils.ts +81 -0
  494. package/src/features/column-sizing/columnSizingFeature.ts +54 -18
  495. package/src/features/column-sizing/columnSizingFeature.types.ts +6 -3
  496. package/src/features/column-sizing/columnSizingFeature.utils.ts +168 -9
  497. package/src/features/column-visibility/columnVisibilityFeature.ts +20 -18
  498. package/src/features/column-visibility/columnVisibilityFeature.types.ts +11 -3
  499. package/src/features/column-visibility/columnVisibilityFeature.utils.ts +213 -24
  500. package/src/features/global-filtering/globalFilteringFeature.ts +9 -2
  501. package/src/features/global-filtering/globalFilteringFeature.types.ts +4 -2
  502. package/src/features/global-filtering/globalFilteringFeature.utils.ts +51 -0
  503. package/src/features/row-expanding/createExpandedRowModel.ts +10 -0
  504. package/src/features/row-expanding/rowExpandingFeature.ts +9 -1
  505. package/src/features/row-expanding/rowExpandingFeature.types.ts +10 -5
  506. package/src/features/row-expanding/rowExpandingFeature.utils.ts +153 -2
  507. package/src/features/row-pagination/createPaginatedRowModel.ts +5 -0
  508. package/src/features/row-pagination/rowPaginationFeature.ts +9 -1
  509. package/src/features/row-pagination/rowPaginationFeature.types.ts +11 -7
  510. package/src/features/row-pagination/rowPaginationFeature.utils.ts +175 -0
  511. package/src/features/row-pinning/rowPinningFeature.ts +9 -1
  512. package/src/features/row-pinning/rowPinningFeature.types.ts +4 -2
  513. package/src/features/row-pinning/rowPinningFeature.utils.ts +132 -18
  514. package/src/features/row-selection/rowSelectionFeature.ts +9 -1
  515. package/src/features/row-selection/rowSelectionFeature.types.ts +4 -2
  516. package/src/features/row-selection/rowSelectionFeature.utils.ts +279 -19
  517. package/src/features/row-sorting/createSortedRowModel.ts +21 -13
  518. package/src/features/row-sorting/rowSortingFeature.ts +11 -3
  519. package/src/features/row-sorting/rowSortingFeature.types.ts +7 -3
  520. package/src/features/row-sorting/rowSortingFeature.utils.ts +153 -2
  521. package/src/features/stockFeatures.ts +5 -0
  522. package/src/flex-render.ts +10 -0
  523. package/src/fns/aggregationFns.ts +25 -8
  524. package/src/fns/filterFns.ts +5 -0
  525. package/src/fns/sortFns.ts +50 -5
  526. package/src/helpers/tableOptions.ts +32 -0
  527. package/src/store-reactivity-bindings.ts +1 -0
  528. package/src/utils.ts +52 -34
@@ -5,10 +5,61 @@ import { TableFeatures } from "../../types/TableFeatures.cjs";
5
5
  import { Table_Internal } from "../../types/Table.cjs";
6
6
 
7
7
  //#region src/features/global-filtering/globalFilteringFeature.utils.d.ts
8
+ /**
9
+ * Returns whether a column can use global filter.
10
+ *
11
+ * This combines column options, table options, and any required accessor or feature state for the capability.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const value = column_getCanGlobalFilter(column)
16
+ * ```
17
+ */
8
18
  declare function column_getCanGlobalFilter<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column_Internal<TFeatures, TData, TValue>): boolean;
19
+ /**
20
+ * Returns global auto filter fn for the table.
21
+ *
22
+ * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const value = table_getGlobalAutoFilterFn(table)
27
+ * ```
28
+ */
9
29
  declare function table_getGlobalAutoFilterFn(): FilterFn<any, any>;
30
+ /**
31
+ * Returns global filter fn for the table.
32
+ *
33
+ * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const value = table_getGlobalFilterFn(table)
38
+ * ```
39
+ */
10
40
  declare function table_getGlobalFilterFn<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): FilterFn<TFeatures, TData> | FilterFn<TFeatures, TData> | undefined;
41
+ /**
42
+ * Updates the table's global filter state slice.
43
+ *
44
+ * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * table_setGlobalFilter(table, (old) => old)
49
+ * ```
50
+ */
11
51
  declare function table_setGlobalFilter<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>, updater: any): void;
52
+ /**
53
+ * Resets the table's global filter state slice.
54
+ *
55
+ * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * table_resetGlobalFilter(table)
60
+ * table_resetGlobalFilter(table, true)
61
+ * ```
62
+ */
12
63
  declare function table_resetGlobalFilter<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean): void;
13
64
  //#endregion
14
65
  export { column_getCanGlobalFilter, table_getGlobalAutoFilterFn, table_getGlobalFilterFn, table_resetGlobalFilter, table_setGlobalFilter };
@@ -5,10 +5,61 @@ import { TableFeatures } from "../../types/TableFeatures.js";
5
5
  import { Table_Internal } from "../../types/Table.js";
6
6
 
7
7
  //#region src/features/global-filtering/globalFilteringFeature.utils.d.ts
8
+ /**
9
+ * Returns whether a column can use global filter.
10
+ *
11
+ * This combines column options, table options, and any required accessor or feature state for the capability.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const value = column_getCanGlobalFilter(column)
16
+ * ```
17
+ */
8
18
  declare function column_getCanGlobalFilter<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column_Internal<TFeatures, TData, TValue>): boolean;
19
+ /**
20
+ * Returns global auto filter fn for the table.
21
+ *
22
+ * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const value = table_getGlobalAutoFilterFn(table)
27
+ * ```
28
+ */
9
29
  declare function table_getGlobalAutoFilterFn(): FilterFn<any, any>;
30
+ /**
31
+ * Returns global filter fn for the table.
32
+ *
33
+ * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const value = table_getGlobalFilterFn(table)
38
+ * ```
39
+ */
10
40
  declare function table_getGlobalFilterFn<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): FilterFn<TFeatures, TData> | FilterFn<TFeatures, TData> | undefined;
41
+ /**
42
+ * Updates the table's global filter state slice.
43
+ *
44
+ * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * table_setGlobalFilter(table, (old) => old)
49
+ * ```
50
+ */
11
51
  declare function table_setGlobalFilter<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>, updater: any): void;
52
+ /**
53
+ * Resets the table's global filter state slice.
54
+ *
55
+ * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * table_resetGlobalFilter(table)
60
+ * table_resetGlobalFilter(table, true)
61
+ * ```
62
+ */
12
63
  declare function table_resetGlobalFilter<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean): void;
13
64
  //#endregion
14
65
  export { column_getCanGlobalFilter, table_getGlobalAutoFilterFn, table_getGlobalFilterFn, table_resetGlobalFilter, table_setGlobalFilter };
@@ -2,22 +2,73 @@ import { cloneState, isFunction } from "../../utils.js";
2
2
  import { filterFn_includesString } from "../../fns/filterFns.js";
3
3
 
4
4
  //#region src/features/global-filtering/globalFilteringFeature.utils.ts
5
+ /**
6
+ * Returns whether a column can use global filter.
7
+ *
8
+ * This combines column options, table options, and any required accessor or feature state for the capability.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const value = column_getCanGlobalFilter(column)
13
+ * ```
14
+ */
5
15
  function column_getCanGlobalFilter(column) {
6
16
  var _column$table$options, _column$table$options2;
7
17
  return (column.columnDef.enableGlobalFilter ?? true) && (column.table.options.enableGlobalFilter ?? true) && (column.table.options.enableFilters ?? true) && (((_column$table$options = (_column$table$options2 = column.table.options).getColumnCanGlobalFilter) === null || _column$table$options === void 0 ? void 0 : _column$table$options.call(_column$table$options2, column)) ?? true) && !!column.accessorFn;
8
18
  }
19
+ /**
20
+ * Returns global auto filter fn for the table.
21
+ *
22
+ * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const value = table_getGlobalAutoFilterFn(table)
27
+ * ```
28
+ */
9
29
  function table_getGlobalAutoFilterFn() {
10
30
  return filterFn_includesString;
11
31
  }
32
+ /**
33
+ * Returns global filter fn for the table.
34
+ *
35
+ * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const value = table_getGlobalFilterFn(table)
40
+ * ```
41
+ */
12
42
  function table_getGlobalFilterFn(table) {
13
43
  const { globalFilterFn } = table.options;
14
44
  const filterFns = table._rowModelFns.filterFns;
15
45
  return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === "auto" ? table_getGlobalAutoFilterFn() : filterFns === null || filterFns === void 0 ? void 0 : filterFns[globalFilterFn];
16
46
  }
47
+ /**
48
+ * Updates the table's global filter state slice.
49
+ *
50
+ * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * table_setGlobalFilter(table, (old) => old)
55
+ * ```
56
+ */
17
57
  function table_setGlobalFilter(table, updater) {
18
58
  var _table$options$onGlob, _table$options;
19
59
  (_table$options$onGlob = (_table$options = table.options).onGlobalFilterChange) === null || _table$options$onGlob === void 0 || _table$options$onGlob.call(_table$options, updater);
20
60
  }
61
+ /**
62
+ * Resets the table's global filter state slice.
63
+ *
64
+ * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * table_resetGlobalFilter(table)
69
+ * table_resetGlobalFilter(table, true)
70
+ * ```
71
+ */
21
72
  function table_resetGlobalFilter(table, defaultState) {
22
73
  table_setGlobalFilter(table, defaultState ? void 0 : cloneState(table.initialState.globalFilter));
23
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"globalFilteringFeature.utils.js","names":[],"sources":["../../../src/features/global-filtering/globalFilteringFeature.utils.ts"],"sourcesContent":["import { filterFn_includesString } from '../../fns/filterFns'\nimport { cloneState, isFunction } from '../../utils'\nimport type { Column_Internal } from '../../types/Column'\nimport type { FilterFn } from '../column-filtering/columnFilteringFeature.types'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\n\nexport function column_getCanGlobalFilter<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): boolean {\n return (\n (column.columnDef.enableGlobalFilter ?? true) &&\n (column.table.options.enableGlobalFilter ?? true) &&\n (column.table.options.enableFilters ?? true) &&\n (column.table.options.getColumnCanGlobalFilter?.(column) ?? true) &&\n !!column.accessorFn\n )\n}\n\nexport function table_getGlobalAutoFilterFn() {\n return filterFn_includesString\n}\n\nexport function table_getGlobalFilterFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): FilterFn<TFeatures, TData> | FilterFn<TFeatures, TData> | undefined {\n const { globalFilterFn: globalFilterFn } = table.options\n const filterFns: Record<string, FilterFn<TFeatures, TData>> | undefined =\n table._rowModelFns.filterFns\n\n return isFunction(globalFilterFn)\n ? globalFilterFn\n : globalFilterFn === 'auto'\n ? table_getGlobalAutoFilterFn()\n : filterFns?.[globalFilterFn as string]\n}\n\nexport function table_setGlobalFilter<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, updater: any) {\n table.options.onGlobalFilterChange?.(updater)\n}\n\nexport function table_resetGlobalFilter<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n table_setGlobalFilter(\n table,\n defaultState ? undefined : cloneState(table.initialState.globalFilter),\n )\n}\n"],"mappings":";;;;AAQA,SAAgB,0BAId,QAA4D;;AAC5D,SACG,OAAO,UAAU,sBAAsB,UACvC,OAAO,MAAM,QAAQ,sBAAsB,UAC3C,OAAO,MAAM,QAAQ,iBAAiB,8DACtC,OAAO,MAAM,SAAQ,qIAA2B,OAAO,KAAI,SAC5D,CAAC,CAAC,OAAO;;AAIb,SAAgB,8BAA8B;AAC5C,QAAO;;AAGT,SAAgB,wBAId,OACqE;CACrE,MAAM,EAAkB,mBAAmB,MAAM;CACjD,MAAM,YACJ,MAAM,aAAa;AAErB,QAAO,WAAW,eAAe,GAC7B,iBACA,mBAAmB,SACjB,6BAA6B,yDAC7B,UAAY;;AAGpB,SAAgB,sBAGd,OAAyC,SAAc;;AACvD,kDAAM,SAAQ,iHAAuB,QAAQ;;AAG/C,SAAgB,wBAGd,OAAyC,cAAwB;AACjE,uBACE,OACA,eAAe,SAAY,WAAW,MAAM,aAAa,aAAa,CACvE"}
1
+ {"version":3,"file":"globalFilteringFeature.utils.js","names":[],"sources":["../../../src/features/global-filtering/globalFilteringFeature.utils.ts"],"sourcesContent":["import { filterFn_includesString } from '../../fns/filterFns'\nimport { cloneState, isFunction } from '../../utils'\nimport type { Column_Internal } from '../../types/Column'\nimport type { FilterFn } from '../column-filtering/columnFilteringFeature.types'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\n\n/**\n * Returns whether a column can use global filter.\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_getCanGlobalFilter(column)\n * ```\n */\nexport function column_getCanGlobalFilter<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): boolean {\n return (\n (column.columnDef.enableGlobalFilter ?? true) &&\n (column.table.options.enableGlobalFilter ?? true) &&\n (column.table.options.enableFilters ?? true) &&\n (column.table.options.getColumnCanGlobalFilter?.(column) ?? true) &&\n !!column.accessorFn\n )\n}\n\n/**\n * Returns global auto filter fn for the table.\n *\n * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.\n *\n * @example\n * ```ts\n * const value = table_getGlobalAutoFilterFn(table)\n * ```\n */\nexport function table_getGlobalAutoFilterFn() {\n return filterFn_includesString\n}\n\n/**\n * Returns global filter fn for the table.\n *\n * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.\n *\n * @example\n * ```ts\n * const value = table_getGlobalFilterFn(table)\n * ```\n */\nexport function table_getGlobalFilterFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): FilterFn<TFeatures, TData> | FilterFn<TFeatures, TData> | undefined {\n const { globalFilterFn: globalFilterFn } = table.options\n const filterFns: Record<string, FilterFn<TFeatures, TData>> | undefined =\n table._rowModelFns.filterFns\n\n return isFunction(globalFilterFn)\n ? globalFilterFn\n : globalFilterFn === 'auto'\n ? table_getGlobalAutoFilterFn()\n : filterFns?.[globalFilterFn as string]\n}\n\n/**\n * Updates the table's global filter 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_setGlobalFilter(table, (old) => old)\n * ```\n */\nexport function table_setGlobalFilter<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, updater: any) {\n table.options.onGlobalFilterChange?.(updater)\n}\n\n/**\n * Resets the table's global filter 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_resetGlobalFilter(table)\n * table_resetGlobalFilter(table, true)\n * ```\n */\nexport function table_resetGlobalFilter<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n table_setGlobalFilter(\n table,\n defaultState ? undefined : cloneState(table.initialState.globalFilter),\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAkBA,SAAgB,0BAId,QAA4D;;CAC5D,QACG,OAAO,UAAU,sBAAsB,UACvC,OAAO,MAAM,QAAQ,sBAAsB,UAC3C,OAAO,MAAM,QAAQ,iBAAiB,8DACtC,OAAO,MAAM,SAAQ,qIAA2B,OAAO,KAAI,SAC5D,CAAC,CAAC,OAAO;;;;;;;;;;;;AAcb,SAAgB,8BAA8B;CAC5C,OAAO;;;;;;;;;;;;AAaT,SAAgB,wBAId,OACqE;CACrE,MAAM,EAAkB,mBAAmB,MAAM;CACjD,MAAM,YACJ,MAAM,aAAa;CAErB,OAAO,WAAW,eAAe,GAC7B,iBACA,mBAAmB,SACjB,6BAA6B,yDAC7B,UAAY;;;;;;;;;;;;AAapB,SAAgB,sBAGd,OAAyC,SAAc;;CACvD,iDAAM,SAAQ,iHAAuB,QAAQ;;;;;;;;;;;;;AAc/C,SAAgB,wBAGd,OAAyC,cAAwB;CACjE,sBACE,OACA,eAAe,SAAY,WAAW,MAAM,aAAa,aAAa,CACvE"}
@@ -2,6 +2,11 @@ const require_utils = require('../../utils.cjs');
2
2
  const require_rowExpandingFeature_utils = require('./rowExpandingFeature.utils.cjs');
3
3
 
4
4
  //#region src/features/row-expanding/createExpandedRowModel.ts
5
+ /**
6
+ * Creates a memoized expanded row model factory.
7
+ *
8
+ * The factory reads the relevant table state atoms and options, then returns a row model function used by the table row-model pipeline.
9
+ */
5
10
  function createExpandedRowModel() {
6
11
  return (_table) => {
7
12
  const table = _table;
@@ -29,6 +34,11 @@ function _createExpandedRowModel(table) {
29
34
  if (!table.options.paginateExpandedRows) return rowModel;
30
35
  return expandRows(rowModel);
31
36
  }
37
+ /**
38
+ * Expands a row model according to the current expanded row state.
39
+ *
40
+ * Expanded sub-rows are inserted into the flattened row order while preserving the original row hierarchy.
41
+ */
32
42
  function expandRows(rowModel) {
33
43
  const expandedRows = [];
34
44
  const handleRow = (row) => {
@@ -1 +1 @@
1
- {"version":3,"file":"createExpandedRowModel.cjs","names":["tableMemo","row_getIsExpanded"],"sources":["../../../src/features/row-expanding/createExpandedRowModel.ts"],"sourcesContent":["import { tableMemo } from '../../utils'\nimport { row_getIsExpanded } from './rowExpandingFeature.utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type { RowData } from '../../types/type-utils'\n\nexport function createExpandedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(): (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData> {\n return (_table) => {\n const table: Table_Internal<TFeatures, TData> = _table\n return tableMemo({\n feature: 'rowExpandingFeature',\n table,\n fnName: 'table.getExpandedRowModel',\n memoDeps: () => [\n table.atoms.expanded?.get(),\n table.getPreExpandedRowModel(),\n table.options.paginateExpandedRows,\n ],\n fn: () => _createExpandedRowModel(table),\n })\n }\n}\n\nfunction _createExpandedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n const rowModel = table.getPreExpandedRowModel()\n const expanded = table.atoms.expanded?.get()\n\n if (\n !rowModel.rows.length ||\n (expanded !== true && !Object.keys(expanded ?? {}).length)\n ) {\n return rowModel\n }\n\n if (!table.options.paginateExpandedRows) {\n // Only expand rows at this point if they are being paginated\n return rowModel\n }\n\n return expandRows(rowModel)\n}\n\nexport function expandRows<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(rowModel: RowModel<TFeatures, TData>): RowModel<TFeatures, TData> {\n const expandedRows: Array<Row<TFeatures, TData>> = []\n\n const handleRow = (row: Row<TFeatures, TData>) => {\n expandedRows.push(row)\n\n if (row.subRows.length && row_getIsExpanded(row)) {\n row.subRows.forEach(handleRow)\n }\n }\n\n rowModel.rows.forEach(handleRow)\n\n return {\n rows: expandedRows,\n flatRows: rowModel.flatRows,\n rowsById: rowModel.rowsById,\n }\n}\n"],"mappings":";;;;AAQA,SAAgB,yBAG0D;AACxE,SAAQ,WAAW;EACjB,MAAM,QAA0C;AAChD,SAAOA,wBAAU;GACf,SAAS;GACT;GACA,QAAQ;GACR,gBAAgB;;;8BACd,MAAM,MAAM,wFAAU,KAAK;KAC3B,MAAM,wBAAwB;KAC9B,MAAM,QAAQ;KACf;;GACD,UAAU,wBAAwB,MAAM;GACzC,CAAC;;;AAIN,SAAS,wBAGP,OAAqE;;CACrE,MAAM,WAAW,MAAM,wBAAwB;CAC/C,MAAM,qCAAW,MAAM,MAAM,0FAAU,KAAK;AAE5C,KACE,CAAC,SAAS,KAAK,UACd,aAAa,QAAQ,CAAC,OAAO,KAAK,YAAY,EAAE,CAAC,CAAC,OAEnD,QAAO;AAGT,KAAI,CAAC,MAAM,QAAQ,qBAEjB,QAAO;AAGT,QAAO,WAAW,SAAS;;AAG7B,SAAgB,WAGd,UAAkE;CAClE,MAAM,eAA6C,EAAE;CAErD,MAAM,aAAa,QAA+B;AAChD,eAAa,KAAK,IAAI;AAEtB,MAAI,IAAI,QAAQ,UAAUC,oDAAkB,IAAI,CAC9C,KAAI,QAAQ,QAAQ,UAAU;;AAIlC,UAAS,KAAK,QAAQ,UAAU;AAEhC,QAAO;EACL,MAAM;EACN,UAAU,SAAS;EACnB,UAAU,SAAS;EACpB"}
1
+ {"version":3,"file":"createExpandedRowModel.cjs","names":["tableMemo","row_getIsExpanded"],"sources":["../../../src/features/row-expanding/createExpandedRowModel.ts"],"sourcesContent":["import { tableMemo } from '../../utils'\nimport { row_getIsExpanded } from './rowExpandingFeature.utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type { RowData } from '../../types/type-utils'\n\n/**\n * Creates a memoized expanded row model factory.\n *\n * The factory reads the relevant table state atoms and options, then returns a row model function used by the table row-model pipeline.\n */\nexport function createExpandedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(): (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData> {\n return (_table) => {\n const table: Table_Internal<TFeatures, TData> = _table\n return tableMemo({\n feature: 'rowExpandingFeature',\n table,\n fnName: 'table.getExpandedRowModel',\n memoDeps: () => [\n table.atoms.expanded?.get(),\n table.getPreExpandedRowModel(),\n table.options.paginateExpandedRows,\n ],\n fn: () => _createExpandedRowModel(table),\n })\n }\n}\n\nfunction _createExpandedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n const rowModel = table.getPreExpandedRowModel()\n const expanded = table.atoms.expanded?.get()\n\n if (\n !rowModel.rows.length ||\n (expanded !== true && !Object.keys(expanded ?? {}).length)\n ) {\n return rowModel\n }\n\n if (!table.options.paginateExpandedRows) {\n // Only expand rows at this point if they are being paginated\n return rowModel\n }\n\n return expandRows(rowModel)\n}\n\n/**\n * Expands a row model according to the current expanded row state.\n *\n * Expanded sub-rows are inserted into the flattened row order while preserving the original row hierarchy.\n */\nexport function expandRows<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(rowModel: RowModel<TFeatures, TData>): RowModel<TFeatures, TData> {\n const expandedRows: Array<Row<TFeatures, TData>> = []\n\n const handleRow = (row: Row<TFeatures, TData>) => {\n expandedRows.push(row)\n\n if (row.subRows.length && row_getIsExpanded(row)) {\n row.subRows.forEach(handleRow)\n }\n }\n\n rowModel.rows.forEach(handleRow)\n\n return {\n rows: expandedRows,\n flatRows: rowModel.flatRows,\n rowsById: rowModel.rowsById,\n }\n}\n"],"mappings":";;;;;;;;;AAaA,SAAgB,yBAG0D;CACxE,QAAQ,WAAW;EACjB,MAAM,QAA0C;EAChD,OAAOA,wBAAU;GACf,SAAS;GACT;GACA,QAAQ;GACR,gBAAgB;;;8BACd,MAAM,MAAM,wFAAU,KAAK;KAC3B,MAAM,wBAAwB;KAC9B,MAAM,QAAQ;KACf;;GACD,UAAU,wBAAwB,MAAM;GACzC,CAAC;;;AAIN,SAAS,wBAGP,OAAqE;;CACrE,MAAM,WAAW,MAAM,wBAAwB;CAC/C,MAAM,qCAAW,MAAM,MAAM,0FAAU,KAAK;CAE5C,IACE,CAAC,SAAS,KAAK,UACd,aAAa,QAAQ,CAAC,OAAO,KAAK,YAAY,EAAE,CAAC,CAAC,QAEnD,OAAO;CAGT,IAAI,CAAC,MAAM,QAAQ,sBAEjB,OAAO;CAGT,OAAO,WAAW,SAAS;;;;;;;AAQ7B,SAAgB,WAGd,UAAkE;CAClE,MAAM,eAA6C,EAAE;CAErD,MAAM,aAAa,QAA+B;EAChD,aAAa,KAAK,IAAI;EAEtB,IAAI,IAAI,QAAQ,UAAUC,oDAAkB,IAAI,EAC9C,IAAI,QAAQ,QAAQ,UAAU;;CAIlC,SAAS,KAAK,QAAQ,UAAU;CAEhC,OAAO;EACL,MAAM;EACN,UAAU,SAAS;EACnB,UAAU,SAAS;EACpB"}
@@ -4,7 +4,17 @@ import { Table } from "../../types/Table.cjs";
4
4
  import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.cjs";
5
5
 
6
6
  //#region src/features/row-expanding/createExpandedRowModel.d.ts
7
+ /**
8
+ * Creates a memoized expanded row model factory.
9
+ *
10
+ * The factory reads the relevant table state atoms and options, then returns a row model function used by the table row-model pipeline.
11
+ */
7
12
  declare function createExpandedRowModel<TFeatures extends TableFeatures, TData extends RowData = any>(): (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData>;
13
+ /**
14
+ * Expands a row model according to the current expanded row state.
15
+ *
16
+ * Expanded sub-rows are inserted into the flattened row order while preserving the original row hierarchy.
17
+ */
8
18
  declare function expandRows<TFeatures extends TableFeatures, TData extends RowData = any>(rowModel: RowModel<TFeatures, TData>): RowModel<TFeatures, TData>;
9
19
  //#endregion
10
20
  export { createExpandedRowModel, expandRows };
@@ -4,7 +4,17 @@ import { Table } from "../../types/Table.js";
4
4
  import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.js";
5
5
 
6
6
  //#region src/features/row-expanding/createExpandedRowModel.d.ts
7
+ /**
8
+ * Creates a memoized expanded row model factory.
9
+ *
10
+ * The factory reads the relevant table state atoms and options, then returns a row model function used by the table row-model pipeline.
11
+ */
7
12
  declare function createExpandedRowModel<TFeatures extends TableFeatures, TData extends RowData = any>(): (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData>;
13
+ /**
14
+ * Expands a row model according to the current expanded row state.
15
+ *
16
+ * Expanded sub-rows are inserted into the flattened row order while preserving the original row hierarchy.
17
+ */
8
18
  declare function expandRows<TFeatures extends TableFeatures, TData extends RowData = any>(rowModel: RowModel<TFeatures, TData>): RowModel<TFeatures, TData>;
9
19
  //#endregion
10
20
  export { createExpandedRowModel, expandRows };
@@ -2,6 +2,11 @@ import { tableMemo } from "../../utils.js";
2
2
  import { row_getIsExpanded } from "./rowExpandingFeature.utils.js";
3
3
 
4
4
  //#region src/features/row-expanding/createExpandedRowModel.ts
5
+ /**
6
+ * Creates a memoized expanded row model factory.
7
+ *
8
+ * The factory reads the relevant table state atoms and options, then returns a row model function used by the table row-model pipeline.
9
+ */
5
10
  function createExpandedRowModel() {
6
11
  return (_table) => {
7
12
  const table = _table;
@@ -29,6 +34,11 @@ function _createExpandedRowModel(table) {
29
34
  if (!table.options.paginateExpandedRows) return rowModel;
30
35
  return expandRows(rowModel);
31
36
  }
37
+ /**
38
+ * Expands a row model according to the current expanded row state.
39
+ *
40
+ * Expanded sub-rows are inserted into the flattened row order while preserving the original row hierarchy.
41
+ */
32
42
  function expandRows(rowModel) {
33
43
  const expandedRows = [];
34
44
  const handleRow = (row) => {
@@ -1 +1 @@
1
- {"version":3,"file":"createExpandedRowModel.js","names":[],"sources":["../../../src/features/row-expanding/createExpandedRowModel.ts"],"sourcesContent":["import { tableMemo } from '../../utils'\nimport { row_getIsExpanded } from './rowExpandingFeature.utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type { RowData } from '../../types/type-utils'\n\nexport function createExpandedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(): (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData> {\n return (_table) => {\n const table: Table_Internal<TFeatures, TData> = _table\n return tableMemo({\n feature: 'rowExpandingFeature',\n table,\n fnName: 'table.getExpandedRowModel',\n memoDeps: () => [\n table.atoms.expanded?.get(),\n table.getPreExpandedRowModel(),\n table.options.paginateExpandedRows,\n ],\n fn: () => _createExpandedRowModel(table),\n })\n }\n}\n\nfunction _createExpandedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n const rowModel = table.getPreExpandedRowModel()\n const expanded = table.atoms.expanded?.get()\n\n if (\n !rowModel.rows.length ||\n (expanded !== true && !Object.keys(expanded ?? {}).length)\n ) {\n return rowModel\n }\n\n if (!table.options.paginateExpandedRows) {\n // Only expand rows at this point if they are being paginated\n return rowModel\n }\n\n return expandRows(rowModel)\n}\n\nexport function expandRows<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(rowModel: RowModel<TFeatures, TData>): RowModel<TFeatures, TData> {\n const expandedRows: Array<Row<TFeatures, TData>> = []\n\n const handleRow = (row: Row<TFeatures, TData>) => {\n expandedRows.push(row)\n\n if (row.subRows.length && row_getIsExpanded(row)) {\n row.subRows.forEach(handleRow)\n }\n }\n\n rowModel.rows.forEach(handleRow)\n\n return {\n rows: expandedRows,\n flatRows: rowModel.flatRows,\n rowsById: rowModel.rowsById,\n }\n}\n"],"mappings":";;;;AAQA,SAAgB,yBAG0D;AACxE,SAAQ,WAAW;EACjB,MAAM,QAA0C;AAChD,SAAO,UAAU;GACf,SAAS;GACT;GACA,QAAQ;GACR,gBAAgB;;;8BACd,MAAM,MAAM,wFAAU,KAAK;KAC3B,MAAM,wBAAwB;KAC9B,MAAM,QAAQ;KACf;;GACD,UAAU,wBAAwB,MAAM;GACzC,CAAC;;;AAIN,SAAS,wBAGP,OAAqE;;CACrE,MAAM,WAAW,MAAM,wBAAwB;CAC/C,MAAM,qCAAW,MAAM,MAAM,0FAAU,KAAK;AAE5C,KACE,CAAC,SAAS,KAAK,UACd,aAAa,QAAQ,CAAC,OAAO,KAAK,YAAY,EAAE,CAAC,CAAC,OAEnD,QAAO;AAGT,KAAI,CAAC,MAAM,QAAQ,qBAEjB,QAAO;AAGT,QAAO,WAAW,SAAS;;AAG7B,SAAgB,WAGd,UAAkE;CAClE,MAAM,eAA6C,EAAE;CAErD,MAAM,aAAa,QAA+B;AAChD,eAAa,KAAK,IAAI;AAEtB,MAAI,IAAI,QAAQ,UAAU,kBAAkB,IAAI,CAC9C,KAAI,QAAQ,QAAQ,UAAU;;AAIlC,UAAS,KAAK,QAAQ,UAAU;AAEhC,QAAO;EACL,MAAM;EACN,UAAU,SAAS;EACnB,UAAU,SAAS;EACpB"}
1
+ {"version":3,"file":"createExpandedRowModel.js","names":[],"sources":["../../../src/features/row-expanding/createExpandedRowModel.ts"],"sourcesContent":["import { tableMemo } from '../../utils'\nimport { row_getIsExpanded } from './rowExpandingFeature.utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type { RowData } from '../../types/type-utils'\n\n/**\n * Creates a memoized expanded row model factory.\n *\n * The factory reads the relevant table state atoms and options, then returns a row model function used by the table row-model pipeline.\n */\nexport function createExpandedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(): (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData> {\n return (_table) => {\n const table: Table_Internal<TFeatures, TData> = _table\n return tableMemo({\n feature: 'rowExpandingFeature',\n table,\n fnName: 'table.getExpandedRowModel',\n memoDeps: () => [\n table.atoms.expanded?.get(),\n table.getPreExpandedRowModel(),\n table.options.paginateExpandedRows,\n ],\n fn: () => _createExpandedRowModel(table),\n })\n }\n}\n\nfunction _createExpandedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n const rowModel = table.getPreExpandedRowModel()\n const expanded = table.atoms.expanded?.get()\n\n if (\n !rowModel.rows.length ||\n (expanded !== true && !Object.keys(expanded ?? {}).length)\n ) {\n return rowModel\n }\n\n if (!table.options.paginateExpandedRows) {\n // Only expand rows at this point if they are being paginated\n return rowModel\n }\n\n return expandRows(rowModel)\n}\n\n/**\n * Expands a row model according to the current expanded row state.\n *\n * Expanded sub-rows are inserted into the flattened row order while preserving the original row hierarchy.\n */\nexport function expandRows<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(rowModel: RowModel<TFeatures, TData>): RowModel<TFeatures, TData> {\n const expandedRows: Array<Row<TFeatures, TData>> = []\n\n const handleRow = (row: Row<TFeatures, TData>) => {\n expandedRows.push(row)\n\n if (row.subRows.length && row_getIsExpanded(row)) {\n row.subRows.forEach(handleRow)\n }\n }\n\n rowModel.rows.forEach(handleRow)\n\n return {\n rows: expandedRows,\n flatRows: rowModel.flatRows,\n rowsById: rowModel.rowsById,\n }\n}\n"],"mappings":";;;;;;;;;AAaA,SAAgB,yBAG0D;CACxE,QAAQ,WAAW;EACjB,MAAM,QAA0C;EAChD,OAAO,UAAU;GACf,SAAS;GACT;GACA,QAAQ;GACR,gBAAgB;;;8BACd,MAAM,MAAM,wFAAU,KAAK;KAC3B,MAAM,wBAAwB;KAC9B,MAAM,QAAQ;KACf;;GACD,UAAU,wBAAwB,MAAM;GACzC,CAAC;;;AAIN,SAAS,wBAGP,OAAqE;;CACrE,MAAM,WAAW,MAAM,wBAAwB;CAC/C,MAAM,qCAAW,MAAM,MAAM,0FAAU,KAAK;CAE5C,IACE,CAAC,SAAS,KAAK,UACd,aAAa,QAAQ,CAAC,OAAO,KAAK,YAAY,EAAE,CAAC,CAAC,QAEnD,OAAO;CAGT,IAAI,CAAC,MAAM,QAAQ,sBAEjB,OAAO;CAGT,OAAO,WAAW,SAAS;;;;;;;AAQ7B,SAAgB,WAGd,UAAkE;CAClE,MAAM,eAA6C,EAAE;CAErD,MAAM,aAAa,QAA+B;EAChD,aAAa,KAAK,IAAI;EAEtB,IAAI,IAAI,QAAQ,UAAU,kBAAkB,IAAI,EAC9C,IAAI,QAAQ,QAAQ,UAAU;;CAIlC,SAAS,KAAK,QAAQ,UAAU;CAEhC,OAAO;EACL,MAAM;EACN,UAAU,SAAS;EACnB,UAAU,SAAS;EACpB"}
@@ -2,6 +2,11 @@ const require_utils = require('../../utils.cjs');
2
2
  const require_rowExpandingFeature_utils = require('./rowExpandingFeature.utils.cjs');
3
3
 
4
4
  //#region src/features/row-expanding/rowExpandingFeature.ts
5
+ /**
6
+ * Creates the stock row expanding 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 constructRowExpandingFeature() {
6
11
  return {
7
12
  getInitialState: (initialState) => {
@@ -41,7 +46,10 @@ function constructRowExpandingFeature() {
41
46
  };
42
47
  }
43
48
  /**
44
- * The Row Expanding feature adds row expanding state and APIs to the table and row objects.
49
+ * The stock row expanding feature.
50
+ *
51
+ * Register this feature to add expanded row state, row expansion APIs, and
52
+ * helpers for deriving expanded row models and expansion depth.
45
53
  */
46
54
  const rowExpandingFeature = constructRowExpandingFeature();
47
55
 
@@ -1 +1 @@
1
- {"version":3,"file":"rowExpandingFeature.cjs","names":["getDefaultExpandedState","makeStateUpdater","row_toggleExpanded","row_getIsExpanded","row_getCanExpand","row_getIsAllParentsExpanded","row_getToggleExpandedHandler","table_autoResetExpanded","table_setExpanded","table_toggleAllRowsExpanded","table_resetExpanded","table_getCanSomeRowsExpand","table_getToggleAllRowsExpandedHandler","table_getIsSomeRowsExpanded","table_getIsAllRowsExpanded","table_getExpandedDepth"],"sources":["../../../src/features/row-expanding/rowExpandingFeature.ts"],"sourcesContent":["import {\n assignPrototypeAPIs,\n assignTableAPIs,\n makeStateUpdater,\n} from '../../utils'\nimport {\n getDefaultExpandedState,\n row_getCanExpand,\n row_getIsAllParentsExpanded,\n row_getIsExpanded,\n row_getToggleExpandedHandler,\n row_toggleExpanded,\n table_autoResetExpanded,\n table_getCanSomeRowsExpand,\n table_getExpandedDepth,\n table_getIsAllRowsExpanded,\n table_getIsSomeRowsExpanded,\n table_getToggleAllRowsExpandedHandler,\n table_resetExpanded,\n table_setExpanded,\n table_toggleAllRowsExpanded,\n} from './rowExpandingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n// CachedRowModel_Expanded,\n// CreateRowModel_Expanded,\n// Row_RowExpanding,\n// TableOptions_RowExpanding,\n// TableState_RowExpanding,\n// Table_RowExpanding,\n// } from './rowExpandingFeature.types'\n\nexport interface RowExpandingFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // CachedRowModel: CachedRowModel_Expanded<TFeatures, TData>\n // CreateRowModels: CreateRowModel_Expanded<TFeatures, TData>\n // Row: Row_RowExpanding\n // Table: Table_RowExpanding<TFeatures, TData>\n // TableOptions: TableOptions_RowExpanding<TFeatures, TData>\n // TableState: TableState_RowExpanding\n}\n\nexport function constructRowExpandingFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<RowExpandingFeatureConstructors<TFeatures, TData>> {\n return {\n getInitialState: (initialState) => {\n return {\n expanded: getDefaultExpandedState(),\n ...initialState,\n }\n },\n\n getDefaultTableOptions: (table) => {\n return {\n onExpandedChange: makeStateUpdater('expanded', table),\n paginateExpandedRows: true,\n }\n },\n\n assignRowPrototype: (prototype, table) => {\n assignPrototypeAPIs('rowExpandingFeature', prototype, table, {\n row_toggleExpanded: {\n fn: (row, expanded) => row_toggleExpanded(row, expanded),\n },\n row_getIsExpanded: {\n fn: (row) => row_getIsExpanded(row),\n },\n row_getCanExpand: {\n fn: (row) => row_getCanExpand(row),\n },\n row_getIsAllParentsExpanded: {\n fn: (row) => row_getIsAllParentsExpanded(row),\n },\n row_getToggleExpandedHandler: {\n fn: (row) => row_getToggleExpandedHandler(row),\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('rowExpandingFeature', table, {\n table_autoResetExpanded: {\n fn: () => table_autoResetExpanded(table),\n },\n table_setExpanded: {\n fn: (updater) => table_setExpanded(table, updater),\n },\n table_toggleAllRowsExpanded: {\n fn: (expanded) => table_toggleAllRowsExpanded(table, expanded),\n },\n table_resetExpanded: {\n fn: (defaultState) => table_resetExpanded(table, defaultState),\n },\n table_getCanSomeRowsExpand: {\n fn: () => table_getCanSomeRowsExpand(table),\n },\n table_getToggleAllRowsExpandedHandler: {\n fn: () => table_getToggleAllRowsExpandedHandler(table),\n },\n table_getIsSomeRowsExpanded: {\n fn: () => table_getIsSomeRowsExpanded(table),\n },\n table_getIsAllRowsExpanded: {\n fn: () => table_getIsAllRowsExpanded(table),\n },\n table_getExpandedDepth: {\n fn: () => table_getExpandedDepth(table),\n },\n })\n },\n }\n}\n\n/**\n * The Row Expanding feature adds row expanding state and APIs to the table and row objects.\n */\nexport const rowExpandingFeature = constructRowExpandingFeature()\n"],"mappings":";;;;AA6CA,SAAgB,+BAGqD;AACnE,QAAO;EACL,kBAAkB,iBAAiB;AACjC,UAAO;IACL,UAAUA,2DAAyB;IACnC,GAAG;IACJ;;EAGH,yBAAyB,UAAU;AACjC,UAAO;IACL,kBAAkBC,+BAAiB,YAAY,MAAM;IACrD,sBAAsB;IACvB;;EAGH,qBAAqB,WAAW,UAAU;AACxC,qCAAoB,uBAAuB,WAAW,OAAO;IAC3D,oBAAoB,EAClB,KAAK,KAAK,aAAaC,qDAAmB,KAAK,SAAS,EACzD;IACD,mBAAmB,EACjB,KAAK,QAAQC,oDAAkB,IAAI,EACpC;IACD,kBAAkB,EAChB,KAAK,QAAQC,mDAAiB,IAAI,EACnC;IACD,6BAA6B,EAC3B,KAAK,QAAQC,8DAA4B,IAAI,EAC9C;IACD,8BAA8B,EAC5B,KAAK,QAAQC,+DAA6B,IAAI,EAC/C;IACF,CAAC;;EAGJ,qBAAqB,UAAU;AAC7B,iCAAgB,uBAAuB,OAAO;IAC5C,yBAAyB,EACvB,UAAUC,0DAAwB,MAAM,EACzC;IACD,mBAAmB,EACjB,KAAK,YAAYC,oDAAkB,OAAO,QAAQ,EACnD;IACD,6BAA6B,EAC3B,KAAK,aAAaC,8DAA4B,OAAO,SAAS,EAC/D;IACD,qBAAqB,EACnB,KAAK,iBAAiBC,sDAAoB,OAAO,aAAa,EAC/D;IACD,4BAA4B,EAC1B,UAAUC,6DAA2B,MAAM,EAC5C;IACD,uCAAuC,EACrC,UAAUC,wEAAsC,MAAM,EACvD;IACD,6BAA6B,EAC3B,UAAUC,8DAA4B,MAAM,EAC7C;IACD,4BAA4B,EAC1B,UAAUC,6DAA2B,MAAM,EAC5C;IACD,wBAAwB,EACtB,UAAUC,yDAAuB,MAAM,EACxC;IACF,CAAC;;EAEL;;;;;AAMH,MAAa,sBAAsB,8BAA8B"}
1
+ {"version":3,"file":"rowExpandingFeature.cjs","names":["getDefaultExpandedState","makeStateUpdater","row_toggleExpanded","row_getIsExpanded","row_getCanExpand","row_getIsAllParentsExpanded","row_getToggleExpandedHandler","table_autoResetExpanded","table_setExpanded","table_toggleAllRowsExpanded","table_resetExpanded","table_getCanSomeRowsExpand","table_getToggleAllRowsExpandedHandler","table_getIsSomeRowsExpanded","table_getIsAllRowsExpanded","table_getExpandedDepth"],"sources":["../../../src/features/row-expanding/rowExpandingFeature.ts"],"sourcesContent":["import {\n assignPrototypeAPIs,\n assignTableAPIs,\n makeStateUpdater,\n} from '../../utils'\nimport {\n getDefaultExpandedState,\n row_getCanExpand,\n row_getIsAllParentsExpanded,\n row_getIsExpanded,\n row_getToggleExpandedHandler,\n row_toggleExpanded,\n table_autoResetExpanded,\n table_getCanSomeRowsExpand,\n table_getExpandedDepth,\n table_getIsAllRowsExpanded,\n table_getIsSomeRowsExpanded,\n table_getToggleAllRowsExpandedHandler,\n table_resetExpanded,\n table_setExpanded,\n table_toggleAllRowsExpanded,\n} from './rowExpandingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n// CachedRowModel_Expanded,\n// CreateRowModel_Expanded,\n// Row_RowExpanding,\n// TableOptions_RowExpanding,\n// TableState_RowExpanding,\n// Table_RowExpanding,\n// } from './rowExpandingFeature.types'\n\nexport interface RowExpandingFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // CachedRowModel: CachedRowModel_Expanded<TFeatures, TData>\n // CreateRowModels: CreateRowModel_Expanded<TFeatures, TData>\n // Row: Row_RowExpanding\n // Table: Table_RowExpanding<TFeatures, TData>\n // TableOptions: TableOptions_RowExpanding<TFeatures, TData>\n // TableState: TableState_RowExpanding\n}\n\n/**\n * Creates the stock row expanding 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 constructRowExpandingFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<RowExpandingFeatureConstructors<TFeatures, TData>> {\n return {\n getInitialState: (initialState) => {\n return {\n expanded: getDefaultExpandedState(),\n ...initialState,\n }\n },\n\n getDefaultTableOptions: (table) => {\n return {\n onExpandedChange: makeStateUpdater('expanded', table),\n paginateExpandedRows: true,\n }\n },\n\n assignRowPrototype: (prototype, table) => {\n assignPrototypeAPIs('rowExpandingFeature', prototype, table, {\n row_toggleExpanded: {\n fn: (row, expanded) => row_toggleExpanded(row, expanded),\n },\n row_getIsExpanded: {\n fn: (row) => row_getIsExpanded(row),\n },\n row_getCanExpand: {\n fn: (row) => row_getCanExpand(row),\n },\n row_getIsAllParentsExpanded: {\n fn: (row) => row_getIsAllParentsExpanded(row),\n },\n row_getToggleExpandedHandler: {\n fn: (row) => row_getToggleExpandedHandler(row),\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('rowExpandingFeature', table, {\n table_autoResetExpanded: {\n fn: () => table_autoResetExpanded(table),\n },\n table_setExpanded: {\n fn: (updater) => table_setExpanded(table, updater),\n },\n table_toggleAllRowsExpanded: {\n fn: (expanded) => table_toggleAllRowsExpanded(table, expanded),\n },\n table_resetExpanded: {\n fn: (defaultState) => table_resetExpanded(table, defaultState),\n },\n table_getCanSomeRowsExpand: {\n fn: () => table_getCanSomeRowsExpand(table),\n },\n table_getToggleAllRowsExpandedHandler: {\n fn: () => table_getToggleAllRowsExpandedHandler(table),\n },\n table_getIsSomeRowsExpanded: {\n fn: () => table_getIsSomeRowsExpanded(table),\n },\n table_getIsAllRowsExpanded: {\n fn: () => table_getIsAllRowsExpanded(table),\n },\n table_getExpandedDepth: {\n fn: () => table_getExpandedDepth(table),\n },\n })\n },\n }\n}\n\n/**\n * The stock row expanding feature.\n *\n * Register this feature to add expanded row state, row expansion APIs, and\n * helpers for deriving expanded row models and expansion depth.\n */\nexport const rowExpandingFeature = constructRowExpandingFeature()\n"],"mappings":";;;;;;;;;AAkDA,SAAgB,+BAGqD;CACnE,OAAO;EACL,kBAAkB,iBAAiB;GACjC,OAAO;IACL,UAAUA,2DAAyB;IACnC,GAAG;IACJ;;EAGH,yBAAyB,UAAU;GACjC,OAAO;IACL,kBAAkBC,+BAAiB,YAAY,MAAM;IACrD,sBAAsB;IACvB;;EAGH,qBAAqB,WAAW,UAAU;GACxC,kCAAoB,uBAAuB,WAAW,OAAO;IAC3D,oBAAoB,EAClB,KAAK,KAAK,aAAaC,qDAAmB,KAAK,SAAS,EACzD;IACD,mBAAmB,EACjB,KAAK,QAAQC,oDAAkB,IAAI,EACpC;IACD,kBAAkB,EAChB,KAAK,QAAQC,mDAAiB,IAAI,EACnC;IACD,6BAA6B,EAC3B,KAAK,QAAQC,8DAA4B,IAAI,EAC9C;IACD,8BAA8B,EAC5B,KAAK,QAAQC,+DAA6B,IAAI,EAC/C;IACF,CAAC;;EAGJ,qBAAqB,UAAU;GAC7B,8BAAgB,uBAAuB,OAAO;IAC5C,yBAAyB,EACvB,UAAUC,0DAAwB,MAAM,EACzC;IACD,mBAAmB,EACjB,KAAK,YAAYC,oDAAkB,OAAO,QAAQ,EACnD;IACD,6BAA6B,EAC3B,KAAK,aAAaC,8DAA4B,OAAO,SAAS,EAC/D;IACD,qBAAqB,EACnB,KAAK,iBAAiBC,sDAAoB,OAAO,aAAa,EAC/D;IACD,4BAA4B,EAC1B,UAAUC,6DAA2B,MAAM,EAC5C;IACD,uCAAuC,EACrC,UAAUC,wEAAsC,MAAM,EACvD;IACD,6BAA6B,EAC3B,UAAUC,8DAA4B,MAAM,EAC7C;IACD,4BAA4B,EAC1B,UAAUC,6DAA2B,MAAM,EAC5C;IACD,wBAAwB,EACtB,UAAUC,yDAAuB,MAAM,EACxC;IACF,CAAC;;EAEL;;;;;;;;AASH,MAAa,sBAAsB,8BAA8B"}
@@ -3,9 +3,17 @@ import { TableFeature, TableFeatures } from "../../types/TableFeatures.cjs";
3
3
 
4
4
  //#region src/features/row-expanding/rowExpandingFeature.d.ts
5
5
  interface RowExpandingFeatureConstructors<TFeatures extends TableFeatures, TData extends RowData> {}
6
+ /**
7
+ * Creates the stock row expanding 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 constructRowExpandingFeature<TFeatures extends TableFeatures, TData extends RowData>(): TableFeature<RowExpandingFeatureConstructors<TFeatures, TData>>;
7
12
  /**
8
- * The Row Expanding feature adds row expanding state and APIs to the table and row objects.
13
+ * The stock row expanding feature.
14
+ *
15
+ * Register this feature to add expanded row state, row expansion APIs, and
16
+ * helpers for deriving expanded row models and expansion depth.
9
17
  */
10
18
  declare const rowExpandingFeature: TableFeature<RowExpandingFeatureConstructors<TableFeatures, RowData>>;
11
19
  //#endregion
@@ -3,9 +3,17 @@ import { TableFeature, TableFeatures } from "../../types/TableFeatures.js";
3
3
 
4
4
  //#region src/features/row-expanding/rowExpandingFeature.d.ts
5
5
  interface RowExpandingFeatureConstructors<TFeatures extends TableFeatures, TData extends RowData> {}
6
+ /**
7
+ * Creates the stock row expanding 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 constructRowExpandingFeature<TFeatures extends TableFeatures, TData extends RowData>(): TableFeature<RowExpandingFeatureConstructors<TFeatures, TData>>;
7
12
  /**
8
- * The Row Expanding feature adds row expanding state and APIs to the table and row objects.
13
+ * The stock row expanding feature.
14
+ *
15
+ * Register this feature to add expanded row state, row expansion APIs, and
16
+ * helpers for deriving expanded row models and expansion depth.
9
17
  */
10
18
  declare const rowExpandingFeature: TableFeature<RowExpandingFeatureConstructors<TableFeatures, RowData>>;
11
19
  //#endregion
@@ -2,6 +2,11 @@ import { assignPrototypeAPIs, assignTableAPIs, makeStateUpdater } from "../../ut
2
2
  import { getDefaultExpandedState, row_getCanExpand, row_getIsAllParentsExpanded, row_getIsExpanded, row_getToggleExpandedHandler, row_toggleExpanded, table_autoResetExpanded, table_getCanSomeRowsExpand, table_getExpandedDepth, table_getIsAllRowsExpanded, table_getIsSomeRowsExpanded, table_getToggleAllRowsExpandedHandler, table_resetExpanded, table_setExpanded, table_toggleAllRowsExpanded } from "./rowExpandingFeature.utils.js";
3
3
 
4
4
  //#region src/features/row-expanding/rowExpandingFeature.ts
5
+ /**
6
+ * Creates the stock row expanding 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 constructRowExpandingFeature() {
6
11
  return {
7
12
  getInitialState: (initialState) => {
@@ -41,7 +46,10 @@ function constructRowExpandingFeature() {
41
46
  };
42
47
  }
43
48
  /**
44
- * The Row Expanding feature adds row expanding state and APIs to the table and row objects.
49
+ * The stock row expanding feature.
50
+ *
51
+ * Register this feature to add expanded row state, row expansion APIs, and
52
+ * helpers for deriving expanded row models and expansion depth.
45
53
  */
46
54
  const rowExpandingFeature = constructRowExpandingFeature();
47
55
 
@@ -1 +1 @@
1
- {"version":3,"file":"rowExpandingFeature.js","names":[],"sources":["../../../src/features/row-expanding/rowExpandingFeature.ts"],"sourcesContent":["import {\n assignPrototypeAPIs,\n assignTableAPIs,\n makeStateUpdater,\n} from '../../utils'\nimport {\n getDefaultExpandedState,\n row_getCanExpand,\n row_getIsAllParentsExpanded,\n row_getIsExpanded,\n row_getToggleExpandedHandler,\n row_toggleExpanded,\n table_autoResetExpanded,\n table_getCanSomeRowsExpand,\n table_getExpandedDepth,\n table_getIsAllRowsExpanded,\n table_getIsSomeRowsExpanded,\n table_getToggleAllRowsExpandedHandler,\n table_resetExpanded,\n table_setExpanded,\n table_toggleAllRowsExpanded,\n} from './rowExpandingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n// CachedRowModel_Expanded,\n// CreateRowModel_Expanded,\n// Row_RowExpanding,\n// TableOptions_RowExpanding,\n// TableState_RowExpanding,\n// Table_RowExpanding,\n// } from './rowExpandingFeature.types'\n\nexport interface RowExpandingFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // CachedRowModel: CachedRowModel_Expanded<TFeatures, TData>\n // CreateRowModels: CreateRowModel_Expanded<TFeatures, TData>\n // Row: Row_RowExpanding\n // Table: Table_RowExpanding<TFeatures, TData>\n // TableOptions: TableOptions_RowExpanding<TFeatures, TData>\n // TableState: TableState_RowExpanding\n}\n\nexport function constructRowExpandingFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<RowExpandingFeatureConstructors<TFeatures, TData>> {\n return {\n getInitialState: (initialState) => {\n return {\n expanded: getDefaultExpandedState(),\n ...initialState,\n }\n },\n\n getDefaultTableOptions: (table) => {\n return {\n onExpandedChange: makeStateUpdater('expanded', table),\n paginateExpandedRows: true,\n }\n },\n\n assignRowPrototype: (prototype, table) => {\n assignPrototypeAPIs('rowExpandingFeature', prototype, table, {\n row_toggleExpanded: {\n fn: (row, expanded) => row_toggleExpanded(row, expanded),\n },\n row_getIsExpanded: {\n fn: (row) => row_getIsExpanded(row),\n },\n row_getCanExpand: {\n fn: (row) => row_getCanExpand(row),\n },\n row_getIsAllParentsExpanded: {\n fn: (row) => row_getIsAllParentsExpanded(row),\n },\n row_getToggleExpandedHandler: {\n fn: (row) => row_getToggleExpandedHandler(row),\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('rowExpandingFeature', table, {\n table_autoResetExpanded: {\n fn: () => table_autoResetExpanded(table),\n },\n table_setExpanded: {\n fn: (updater) => table_setExpanded(table, updater),\n },\n table_toggleAllRowsExpanded: {\n fn: (expanded) => table_toggleAllRowsExpanded(table, expanded),\n },\n table_resetExpanded: {\n fn: (defaultState) => table_resetExpanded(table, defaultState),\n },\n table_getCanSomeRowsExpand: {\n fn: () => table_getCanSomeRowsExpand(table),\n },\n table_getToggleAllRowsExpandedHandler: {\n fn: () => table_getToggleAllRowsExpandedHandler(table),\n },\n table_getIsSomeRowsExpanded: {\n fn: () => table_getIsSomeRowsExpanded(table),\n },\n table_getIsAllRowsExpanded: {\n fn: () => table_getIsAllRowsExpanded(table),\n },\n table_getExpandedDepth: {\n fn: () => table_getExpandedDepth(table),\n },\n })\n },\n }\n}\n\n/**\n * The Row Expanding feature adds row expanding state and APIs to the table and row objects.\n */\nexport const rowExpandingFeature = constructRowExpandingFeature()\n"],"mappings":";;;;AA6CA,SAAgB,+BAGqD;AACnE,QAAO;EACL,kBAAkB,iBAAiB;AACjC,UAAO;IACL,UAAU,yBAAyB;IACnC,GAAG;IACJ;;EAGH,yBAAyB,UAAU;AACjC,UAAO;IACL,kBAAkB,iBAAiB,YAAY,MAAM;IACrD,sBAAsB;IACvB;;EAGH,qBAAqB,WAAW,UAAU;AACxC,uBAAoB,uBAAuB,WAAW,OAAO;IAC3D,oBAAoB,EAClB,KAAK,KAAK,aAAa,mBAAmB,KAAK,SAAS,EACzD;IACD,mBAAmB,EACjB,KAAK,QAAQ,kBAAkB,IAAI,EACpC;IACD,kBAAkB,EAChB,KAAK,QAAQ,iBAAiB,IAAI,EACnC;IACD,6BAA6B,EAC3B,KAAK,QAAQ,4BAA4B,IAAI,EAC9C;IACD,8BAA8B,EAC5B,KAAK,QAAQ,6BAA6B,IAAI,EAC/C;IACF,CAAC;;EAGJ,qBAAqB,UAAU;AAC7B,mBAAgB,uBAAuB,OAAO;IAC5C,yBAAyB,EACvB,UAAU,wBAAwB,MAAM,EACzC;IACD,mBAAmB,EACjB,KAAK,YAAY,kBAAkB,OAAO,QAAQ,EACnD;IACD,6BAA6B,EAC3B,KAAK,aAAa,4BAA4B,OAAO,SAAS,EAC/D;IACD,qBAAqB,EACnB,KAAK,iBAAiB,oBAAoB,OAAO,aAAa,EAC/D;IACD,4BAA4B,EAC1B,UAAU,2BAA2B,MAAM,EAC5C;IACD,uCAAuC,EACrC,UAAU,sCAAsC,MAAM,EACvD;IACD,6BAA6B,EAC3B,UAAU,4BAA4B,MAAM,EAC7C;IACD,4BAA4B,EAC1B,UAAU,2BAA2B,MAAM,EAC5C;IACD,wBAAwB,EACtB,UAAU,uBAAuB,MAAM,EACxC;IACF,CAAC;;EAEL;;;;;AAMH,MAAa,sBAAsB,8BAA8B"}
1
+ {"version":3,"file":"rowExpandingFeature.js","names":[],"sources":["../../../src/features/row-expanding/rowExpandingFeature.ts"],"sourcesContent":["import {\n assignPrototypeAPIs,\n assignTableAPIs,\n makeStateUpdater,\n} from '../../utils'\nimport {\n getDefaultExpandedState,\n row_getCanExpand,\n row_getIsAllParentsExpanded,\n row_getIsExpanded,\n row_getToggleExpandedHandler,\n row_toggleExpanded,\n table_autoResetExpanded,\n table_getCanSomeRowsExpand,\n table_getExpandedDepth,\n table_getIsAllRowsExpanded,\n table_getIsSomeRowsExpanded,\n table_getToggleAllRowsExpandedHandler,\n table_resetExpanded,\n table_setExpanded,\n table_toggleAllRowsExpanded,\n} from './rowExpandingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n// CachedRowModel_Expanded,\n// CreateRowModel_Expanded,\n// Row_RowExpanding,\n// TableOptions_RowExpanding,\n// TableState_RowExpanding,\n// Table_RowExpanding,\n// } from './rowExpandingFeature.types'\n\nexport interface RowExpandingFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // CachedRowModel: CachedRowModel_Expanded<TFeatures, TData>\n // CreateRowModels: CreateRowModel_Expanded<TFeatures, TData>\n // Row: Row_RowExpanding\n // Table: Table_RowExpanding<TFeatures, TData>\n // TableOptions: TableOptions_RowExpanding<TFeatures, TData>\n // TableState: TableState_RowExpanding\n}\n\n/**\n * Creates the stock row expanding 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 constructRowExpandingFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<RowExpandingFeatureConstructors<TFeatures, TData>> {\n return {\n getInitialState: (initialState) => {\n return {\n expanded: getDefaultExpandedState(),\n ...initialState,\n }\n },\n\n getDefaultTableOptions: (table) => {\n return {\n onExpandedChange: makeStateUpdater('expanded', table),\n paginateExpandedRows: true,\n }\n },\n\n assignRowPrototype: (prototype, table) => {\n assignPrototypeAPIs('rowExpandingFeature', prototype, table, {\n row_toggleExpanded: {\n fn: (row, expanded) => row_toggleExpanded(row, expanded),\n },\n row_getIsExpanded: {\n fn: (row) => row_getIsExpanded(row),\n },\n row_getCanExpand: {\n fn: (row) => row_getCanExpand(row),\n },\n row_getIsAllParentsExpanded: {\n fn: (row) => row_getIsAllParentsExpanded(row),\n },\n row_getToggleExpandedHandler: {\n fn: (row) => row_getToggleExpandedHandler(row),\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('rowExpandingFeature', table, {\n table_autoResetExpanded: {\n fn: () => table_autoResetExpanded(table),\n },\n table_setExpanded: {\n fn: (updater) => table_setExpanded(table, updater),\n },\n table_toggleAllRowsExpanded: {\n fn: (expanded) => table_toggleAllRowsExpanded(table, expanded),\n },\n table_resetExpanded: {\n fn: (defaultState) => table_resetExpanded(table, defaultState),\n },\n table_getCanSomeRowsExpand: {\n fn: () => table_getCanSomeRowsExpand(table),\n },\n table_getToggleAllRowsExpandedHandler: {\n fn: () => table_getToggleAllRowsExpandedHandler(table),\n },\n table_getIsSomeRowsExpanded: {\n fn: () => table_getIsSomeRowsExpanded(table),\n },\n table_getIsAllRowsExpanded: {\n fn: () => table_getIsAllRowsExpanded(table),\n },\n table_getExpandedDepth: {\n fn: () => table_getExpandedDepth(table),\n },\n })\n },\n }\n}\n\n/**\n * The stock row expanding feature.\n *\n * Register this feature to add expanded row state, row expansion APIs, and\n * helpers for deriving expanded row models and expansion depth.\n */\nexport const rowExpandingFeature = constructRowExpandingFeature()\n"],"mappings":";;;;;;;;;AAkDA,SAAgB,+BAGqD;CACnE,OAAO;EACL,kBAAkB,iBAAiB;GACjC,OAAO;IACL,UAAU,yBAAyB;IACnC,GAAG;IACJ;;EAGH,yBAAyB,UAAU;GACjC,OAAO;IACL,kBAAkB,iBAAiB,YAAY,MAAM;IACrD,sBAAsB;IACvB;;EAGH,qBAAqB,WAAW,UAAU;GACxC,oBAAoB,uBAAuB,WAAW,OAAO;IAC3D,oBAAoB,EAClB,KAAK,KAAK,aAAa,mBAAmB,KAAK,SAAS,EACzD;IACD,mBAAmB,EACjB,KAAK,QAAQ,kBAAkB,IAAI,EACpC;IACD,kBAAkB,EAChB,KAAK,QAAQ,iBAAiB,IAAI,EACnC;IACD,6BAA6B,EAC3B,KAAK,QAAQ,4BAA4B,IAAI,EAC9C;IACD,8BAA8B,EAC5B,KAAK,QAAQ,6BAA6B,IAAI,EAC/C;IACF,CAAC;;EAGJ,qBAAqB,UAAU;GAC7B,gBAAgB,uBAAuB,OAAO;IAC5C,yBAAyB,EACvB,UAAU,wBAAwB,MAAM,EACzC;IACD,mBAAmB,EACjB,KAAK,YAAY,kBAAkB,OAAO,QAAQ,EACnD;IACD,6BAA6B,EAC3B,KAAK,aAAa,4BAA4B,OAAO,SAAS,EAC/D;IACD,qBAAqB,EACnB,KAAK,iBAAiB,oBAAoB,OAAO,aAAa,EAC/D;IACD,4BAA4B,EAC1B,UAAU,2BAA2B,MAAM,EAC5C;IACD,uCAAuC,EACrC,UAAU,sCAAsC,MAAM,EACvD;IACD,6BAA6B,EAC3B,UAAU,4BAA4B,MAAM,EAC7C;IACD,4BAA4B,EAC1B,UAAU,2BAA2B,MAAM,EAC5C;IACD,wBAAwB,EACtB,UAAU,uBAAuB,MAAM,EACxC;IACF,CAAC;;EAEL;;;;;;;;AASH,MAAa,sBAAsB,8BAA8B"}
@@ -34,7 +34,7 @@ interface Row_RowExpanding {
34
34
  }
35
35
  interface TableOptions_RowExpanding<TFeatures extends TableFeatures, TData extends RowData> {
36
36
  /**
37
- * Enable this setting to automatically reset the expanded state of the table when expanding state changes.
37
+ * Enables automatic expanded-state resets when page-altering table state changes.
38
38
  */
39
39
  autoResetExpanded?: boolean;
40
40
  /**
@@ -54,7 +54,9 @@ interface TableOptions_RowExpanding<TFeatures extends TableFeatures, TData exten
54
54
  */
55
55
  manualExpanding?: boolean;
56
56
  /**
57
- * This function is called when the `expanded` table state changes. If a function is provided, you will be responsible for managing this state on your own. To pass the managed state back to the table, use the `tableOptions.state.expanded` option.
57
+ * Called with an updater when expanded state changes. Pair this with
58
+ * `state.expanded` when using external state; external atoms can own the
59
+ * slice without this callback.
58
60
  */
59
61
  onExpandedChange?: OnChangeFn<ExpandedState>;
60
62
  /**
@@ -85,11 +87,12 @@ interface Table_RowExpanding<TFeatures extends TableFeatures, TData extends RowD
85
87
  */
86
88
  getToggleAllRowsExpandedHandler: () => (event: unknown) => void;
87
89
  /**
88
- * Resets the expanded state of the table to the initial state.
90
+ * Resets expanded state to `initialState.expanded`. Pass `true` to reset to
91
+ * the feature default of `{}`.
89
92
  */
90
93
  resetExpanded: (defaultState?: boolean) => void;
91
94
  /**
92
- * Updates the expanded state of the table via an update function or value.
95
+ * Sets expanded state using a value or updater.
93
96
  */
94
97
  setExpanded: (updater: Updater<ExpandedState>) => void;
95
98
  /**
@@ -109,7 +112,9 @@ interface Table_RowModels_Expanded<TFeatures extends TableFeatures, TData extend
109
112
  }
110
113
  interface CreateRowModel_Expanded<TFeatures extends TableFeatures, TData extends RowData> {
111
114
  /**
112
- * This function is responsible for returning the expanded row model. If this function is not provided, the table will not expand rows. You can use the default exported `getExpandedRowModel` function to get the expanded row model or implement your own.
115
+ * Factory used to retrieve the expanded row model. If this function is not
116
+ * provided, the table will not expand rows. To use client-side expansion,
117
+ * pass `createExpandedRowModel()` or implement your own factory.
113
118
  */
114
119
  expandedRowModel?: (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData>;
115
120
  }
@@ -34,7 +34,7 @@ interface Row_RowExpanding {
34
34
  }
35
35
  interface TableOptions_RowExpanding<TFeatures extends TableFeatures, TData extends RowData> {
36
36
  /**
37
- * Enable this setting to automatically reset the expanded state of the table when expanding state changes.
37
+ * Enables automatic expanded-state resets when page-altering table state changes.
38
38
  */
39
39
  autoResetExpanded?: boolean;
40
40
  /**
@@ -54,7 +54,9 @@ interface TableOptions_RowExpanding<TFeatures extends TableFeatures, TData exten
54
54
  */
55
55
  manualExpanding?: boolean;
56
56
  /**
57
- * This function is called when the `expanded` table state changes. If a function is provided, you will be responsible for managing this state on your own. To pass the managed state back to the table, use the `tableOptions.state.expanded` option.
57
+ * Called with an updater when expanded state changes. Pair this with
58
+ * `state.expanded` when using external state; external atoms can own the
59
+ * slice without this callback.
58
60
  */
59
61
  onExpandedChange?: OnChangeFn<ExpandedState>;
60
62
  /**
@@ -85,11 +87,12 @@ interface Table_RowExpanding<TFeatures extends TableFeatures, TData extends RowD
85
87
  */
86
88
  getToggleAllRowsExpandedHandler: () => (event: unknown) => void;
87
89
  /**
88
- * Resets the expanded state of the table to the initial state.
90
+ * Resets expanded state to `initialState.expanded`. Pass `true` to reset to
91
+ * the feature default of `{}`.
89
92
  */
90
93
  resetExpanded: (defaultState?: boolean) => void;
91
94
  /**
92
- * Updates the expanded state of the table via an update function or value.
95
+ * Sets expanded state using a value or updater.
93
96
  */
94
97
  setExpanded: (updater: Updater<ExpandedState>) => void;
95
98
  /**
@@ -109,7 +112,9 @@ interface Table_RowModels_Expanded<TFeatures extends TableFeatures, TData extend
109
112
  }
110
113
  interface CreateRowModel_Expanded<TFeatures extends TableFeatures, TData extends RowData> {
111
114
  /**
112
- * This function is responsible for returning the expanded row model. If this function is not provided, the table will not expand rows. You can use the default exported `getExpandedRowModel` function to get the expanded row model or implement your own.
115
+ * Factory used to retrieve the expanded row model. If this function is not
116
+ * provided, the table will not expand rows. To use client-side expansion,
117
+ * pass `createExpandedRowModel()` or implement your own factory.
113
118
  */
114
119
  expandedRowModel?: (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData>;
115
120
  }