@tanstack/table-core 9.0.0-beta.1 → 9.0.0-beta.10

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 (432) hide show
  1. package/dist/core/cells/constructCell.d.cts +1 -1
  2. package/dist/core/cells/constructCell.d.ts +1 -1
  3. package/dist/core/cells/coreCellsFeature.cjs +11 -20
  4. package/dist/core/cells/coreCellsFeature.cjs.map +1 -1
  5. package/dist/core/cells/coreCellsFeature.d.cts +4 -12
  6. package/dist/core/cells/coreCellsFeature.d.ts +4 -12
  7. package/dist/core/cells/coreCellsFeature.js +12 -20
  8. package/dist/core/cells/coreCellsFeature.js.map +1 -1
  9. package/dist/core/cells/coreCellsFeature.types.d.cts +1 -1
  10. package/dist/core/cells/coreCellsFeature.types.d.ts +1 -1
  11. package/dist/core/cells/coreCellsFeature.utils.d.cts +1 -1
  12. package/dist/core/cells/coreCellsFeature.utils.d.ts +1 -1
  13. package/dist/core/columns/constructColumn.d.cts +1 -1
  14. package/dist/core/columns/constructColumn.d.ts +1 -1
  15. package/dist/core/columns/coreColumnsFeature.cjs +59 -68
  16. package/dist/core/columns/coreColumnsFeature.cjs.map +1 -1
  17. package/dist/core/columns/coreColumnsFeature.d.cts +4 -12
  18. package/dist/core/columns/coreColumnsFeature.d.ts +4 -12
  19. package/dist/core/columns/coreColumnsFeature.js +60 -68
  20. package/dist/core/columns/coreColumnsFeature.js.map +1 -1
  21. package/dist/core/columns/coreColumnsFeature.types.d.cts +1 -1
  22. package/dist/core/columns/coreColumnsFeature.types.d.ts +1 -1
  23. package/dist/core/columns/coreColumnsFeature.utils.d.cts +1 -1
  24. package/dist/core/columns/coreColumnsFeature.utils.d.ts +1 -1
  25. package/dist/core/coreFeatures.cjs.map +1 -1
  26. package/dist/core/coreFeatures.d.cts +1 -1
  27. package/dist/core/coreFeatures.d.ts +1 -1
  28. package/dist/core/coreFeatures.js.map +1 -1
  29. package/dist/core/headers/buildHeaderGroups.cjs.map +1 -1
  30. package/dist/core/headers/buildHeaderGroups.d.cts +1 -1
  31. package/dist/core/headers/buildHeaderGroups.d.ts +1 -1
  32. package/dist/core/headers/buildHeaderGroups.js.map +1 -1
  33. package/dist/core/headers/constructHeader.d.cts +1 -1
  34. package/dist/core/headers/constructHeader.d.ts +1 -1
  35. package/dist/core/headers/coreHeadersFeature.cjs +44 -53
  36. package/dist/core/headers/coreHeadersFeature.cjs.map +1 -1
  37. package/dist/core/headers/coreHeadersFeature.d.cts +4 -12
  38. package/dist/core/headers/coreHeadersFeature.d.ts +4 -12
  39. package/dist/core/headers/coreHeadersFeature.js +45 -53
  40. package/dist/core/headers/coreHeadersFeature.js.map +1 -1
  41. package/dist/core/headers/coreHeadersFeature.types.d.cts +1 -1
  42. package/dist/core/headers/coreHeadersFeature.types.d.ts +1 -1
  43. package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
  44. package/dist/core/headers/coreHeadersFeature.utils.d.cts +1 -1
  45. package/dist/core/headers/coreHeadersFeature.utils.d.ts +1 -1
  46. package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
  47. package/dist/core/row-models/coreRowModelsFeature.cjs +17 -26
  48. package/dist/core/row-models/coreRowModelsFeature.cjs.map +1 -1
  49. package/dist/core/row-models/coreRowModelsFeature.d.cts +4 -12
  50. package/dist/core/row-models/coreRowModelsFeature.d.ts +4 -12
  51. package/dist/core/row-models/coreRowModelsFeature.js +18 -26
  52. package/dist/core/row-models/coreRowModelsFeature.js.map +1 -1
  53. package/dist/core/row-models/coreRowModelsFeature.types.d.cts +3 -13
  54. package/dist/core/row-models/coreRowModelsFeature.types.d.ts +3 -13
  55. package/dist/core/row-models/coreRowModelsFeature.utils.cjs +13 -13
  56. package/dist/core/row-models/coreRowModelsFeature.utils.cjs.map +1 -1
  57. package/dist/core/row-models/coreRowModelsFeature.utils.d.cts +2 -2
  58. package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +2 -2
  59. package/dist/core/row-models/coreRowModelsFeature.utils.js +13 -13
  60. package/dist/core/row-models/coreRowModelsFeature.utils.js.map +1 -1
  61. package/dist/core/row-models/createCoreRowModel.cjs.map +1 -1
  62. package/dist/core/row-models/createCoreRowModel.d.cts +1 -1
  63. package/dist/core/row-models/createCoreRowModel.d.ts +1 -1
  64. package/dist/core/row-models/createCoreRowModel.js.map +1 -1
  65. package/dist/core/rows/constructRow.d.cts +1 -1
  66. package/dist/core/rows/constructRow.d.ts +1 -1
  67. package/dist/core/rows/coreRowsFeature.cjs +27 -36
  68. package/dist/core/rows/coreRowsFeature.cjs.map +1 -1
  69. package/dist/core/rows/coreRowsFeature.d.cts +4 -12
  70. package/dist/core/rows/coreRowsFeature.d.ts +4 -12
  71. package/dist/core/rows/coreRowsFeature.js +28 -36
  72. package/dist/core/rows/coreRowsFeature.js.map +1 -1
  73. package/dist/core/rows/coreRowsFeature.types.d.cts +1 -1
  74. package/dist/core/rows/coreRowsFeature.types.d.ts +1 -1
  75. package/dist/core/rows/coreRowsFeature.utils.d.cts +1 -1
  76. package/dist/core/rows/coreRowsFeature.utils.d.ts +1 -1
  77. package/dist/core/table/constructTable.cjs +21 -6
  78. package/dist/core/table/constructTable.cjs.map +1 -1
  79. package/dist/core/table/constructTable.d.cts +1 -1
  80. package/dist/core/table/constructTable.d.ts +1 -1
  81. package/dist/core/table/constructTable.js +21 -6
  82. package/dist/core/table/constructTable.js.map +1 -1
  83. package/dist/core/table/coreTablesFeature.cjs +7 -16
  84. package/dist/core/table/coreTablesFeature.cjs.map +1 -1
  85. package/dist/core/table/coreTablesFeature.d.cts +4 -12
  86. package/dist/core/table/coreTablesFeature.d.ts +4 -12
  87. package/dist/core/table/coreTablesFeature.js +8 -16
  88. package/dist/core/table/coreTablesFeature.js.map +1 -1
  89. package/dist/core/table/coreTablesFeature.types.d.cts +23 -11
  90. package/dist/core/table/coreTablesFeature.types.d.ts +23 -11
  91. package/dist/core/table/coreTablesFeature.utils.cjs +1 -2
  92. package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
  93. package/dist/core/table/coreTablesFeature.utils.d.cts +1 -1
  94. package/dist/core/table/coreTablesFeature.utils.d.ts +1 -1
  95. package/dist/core/table/coreTablesFeature.utils.js +1 -2
  96. package/dist/core/table/coreTablesFeature.utils.js.map +1 -1
  97. package/dist/features/column-faceting/columnFacetingFeature.cjs +49 -61
  98. package/dist/features/column-faceting/columnFacetingFeature.cjs.map +1 -1
  99. package/dist/features/column-faceting/columnFacetingFeature.d.cts +4 -15
  100. package/dist/features/column-faceting/columnFacetingFeature.d.ts +4 -15
  101. package/dist/features/column-faceting/columnFacetingFeature.js +50 -61
  102. package/dist/features/column-faceting/columnFacetingFeature.js.map +1 -1
  103. package/dist/features/column-faceting/columnFacetingFeature.types.d.cts +4 -25
  104. package/dist/features/column-faceting/columnFacetingFeature.types.d.ts +4 -25
  105. package/dist/features/column-faceting/columnFacetingFeature.utils.cjs +12 -12
  106. package/dist/features/column-faceting/columnFacetingFeature.utils.cjs.map +1 -1
  107. package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +1 -1
  108. package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +1 -1
  109. package/dist/features/column-faceting/columnFacetingFeature.utils.js +12 -12
  110. package/dist/features/column-faceting/columnFacetingFeature.utils.js.map +1 -1
  111. package/dist/features/column-faceting/createFacetedMinMaxValues.cjs.map +1 -1
  112. package/dist/features/column-faceting/createFacetedMinMaxValues.d.cts +1 -1
  113. package/dist/features/column-faceting/createFacetedMinMaxValues.d.ts +1 -1
  114. package/dist/features/column-faceting/createFacetedMinMaxValues.js.map +1 -1
  115. package/dist/features/column-faceting/createFacetedRowModel.cjs.map +1 -1
  116. package/dist/features/column-faceting/createFacetedRowModel.d.cts +1 -1
  117. package/dist/features/column-faceting/createFacetedRowModel.d.ts +1 -1
  118. package/dist/features/column-faceting/createFacetedRowModel.js.map +1 -1
  119. package/dist/features/column-faceting/createFacetedUniqueValues.cjs.map +1 -1
  120. package/dist/features/column-faceting/createFacetedUniqueValues.d.cts +1 -1
  121. package/dist/features/column-faceting/createFacetedUniqueValues.d.ts +1 -1
  122. package/dist/features/column-faceting/createFacetedUniqueValues.js.map +1 -1
  123. package/dist/features/column-filtering/columnFilteringFeature.cjs +40 -53
  124. package/dist/features/column-filtering/columnFilteringFeature.cjs.map +1 -1
  125. package/dist/features/column-filtering/columnFilteringFeature.d.cts +4 -16
  126. package/dist/features/column-filtering/columnFilteringFeature.d.ts +4 -16
  127. package/dist/features/column-filtering/columnFilteringFeature.js +41 -53
  128. package/dist/features/column-filtering/columnFilteringFeature.js.map +1 -1
  129. package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +31 -17
  130. package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +31 -17
  131. package/dist/features/column-filtering/columnFilteringFeature.utils.cjs +1 -1
  132. package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +1 -1
  133. package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +2 -2
  134. package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +2 -2
  135. package/dist/features/column-filtering/columnFilteringFeature.utils.js +1 -1
  136. package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +1 -1
  137. package/dist/features/column-filtering/createFilteredRowModel.cjs +4 -2
  138. package/dist/features/column-filtering/createFilteredRowModel.cjs.map +1 -1
  139. package/dist/features/column-filtering/createFilteredRowModel.d.cts +5 -3
  140. package/dist/features/column-filtering/createFilteredRowModel.d.ts +5 -3
  141. package/dist/features/column-filtering/createFilteredRowModel.js +4 -2
  142. package/dist/features/column-filtering/createFilteredRowModel.js.map +1 -1
  143. package/dist/features/column-grouping/columnGroupingFeature.cjs +57 -69
  144. package/dist/features/column-grouping/columnGroupingFeature.cjs.map +1 -1
  145. package/dist/features/column-grouping/columnGroupingFeature.d.cts +4 -15
  146. package/dist/features/column-grouping/columnGroupingFeature.d.ts +4 -15
  147. package/dist/features/column-grouping/columnGroupingFeature.js +58 -69
  148. package/dist/features/column-grouping/columnGroupingFeature.js.map +1 -1
  149. package/dist/features/column-grouping/columnGroupingFeature.types.d.cts +17 -13
  150. package/dist/features/column-grouping/columnGroupingFeature.types.d.ts +17 -13
  151. package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +1 -1
  152. package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +1 -1
  153. package/dist/features/column-grouping/createGroupedRowModel.cjs +5 -2
  154. package/dist/features/column-grouping/createGroupedRowModel.cjs.map +1 -1
  155. package/dist/features/column-grouping/createGroupedRowModel.d.cts +6 -3
  156. package/dist/features/column-grouping/createGroupedRowModel.d.ts +6 -3
  157. package/dist/features/column-grouping/createGroupedRowModel.js +5 -2
  158. package/dist/features/column-grouping/createGroupedRowModel.js.map +1 -1
  159. package/dist/features/column-ordering/columnOrderingFeature.cjs +47 -59
  160. package/dist/features/column-ordering/columnOrderingFeature.cjs.map +1 -1
  161. package/dist/features/column-ordering/columnOrderingFeature.d.cts +4 -15
  162. package/dist/features/column-ordering/columnOrderingFeature.d.ts +4 -15
  163. package/dist/features/column-ordering/columnOrderingFeature.js +48 -59
  164. package/dist/features/column-ordering/columnOrderingFeature.js.map +1 -1
  165. package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +1 -1
  166. package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +1 -1
  167. package/dist/features/column-pinning/columnPinningFeature.cjs +209 -221
  168. package/dist/features/column-pinning/columnPinningFeature.cjs.map +1 -1
  169. package/dist/features/column-pinning/columnPinningFeature.d.cts +4 -15
  170. package/dist/features/column-pinning/columnPinningFeature.d.ts +4 -15
  171. package/dist/features/column-pinning/columnPinningFeature.js +210 -221
  172. package/dist/features/column-pinning/columnPinningFeature.js.map +1 -1
  173. package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
  174. package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +13 -13
  175. package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +13 -13
  176. package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
  177. package/dist/features/column-resizing/columnResizingFeature.cjs +31 -43
  178. package/dist/features/column-resizing/columnResizingFeature.cjs.map +1 -1
  179. package/dist/features/column-resizing/columnResizingFeature.d.cts +4 -15
  180. package/dist/features/column-resizing/columnResizingFeature.d.ts +4 -15
  181. package/dist/features/column-resizing/columnResizingFeature.js +32 -43
  182. package/dist/features/column-resizing/columnResizingFeature.js.map +1 -1
  183. package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +1 -1
  184. package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +1 -1
  185. package/dist/features/column-sizing/columnSizingFeature.cjs +112 -125
  186. package/dist/features/column-sizing/columnSizingFeature.cjs.map +1 -1
  187. package/dist/features/column-sizing/columnSizingFeature.d.cts +4 -16
  188. package/dist/features/column-sizing/columnSizingFeature.d.ts +4 -16
  189. package/dist/features/column-sizing/columnSizingFeature.js +113 -125
  190. package/dist/features/column-sizing/columnSizingFeature.js.map +1 -1
  191. package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +4 -4
  192. package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +4 -4
  193. package/dist/features/column-visibility/columnVisibilityFeature.cjs +83 -95
  194. package/dist/features/column-visibility/columnVisibilityFeature.cjs.map +1 -1
  195. package/dist/features/column-visibility/columnVisibilityFeature.d.cts +4 -15
  196. package/dist/features/column-visibility/columnVisibilityFeature.d.ts +4 -15
  197. package/dist/features/column-visibility/columnVisibilityFeature.js +84 -95
  198. package/dist/features/column-visibility/columnVisibilityFeature.js.map +1 -1
  199. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +1 -1
  200. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +1 -1
  201. package/dist/features/global-filtering/globalFilteringFeature.cjs +31 -43
  202. package/dist/features/global-filtering/globalFilteringFeature.cjs.map +1 -1
  203. package/dist/features/global-filtering/globalFilteringFeature.d.cts +4 -15
  204. package/dist/features/global-filtering/globalFilteringFeature.d.ts +4 -15
  205. package/dist/features/global-filtering/globalFilteringFeature.js +32 -43
  206. package/dist/features/global-filtering/globalFilteringFeature.js.map +1 -1
  207. package/dist/features/global-filtering/globalFilteringFeature.types.d.cts +1 -1
  208. package/dist/features/global-filtering/globalFilteringFeature.types.d.ts +1 -1
  209. package/dist/features/global-filtering/globalFilteringFeature.utils.cjs.map +1 -1
  210. package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +7 -5
  211. package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +7 -5
  212. package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +1 -1
  213. package/dist/features/row-expanding/createExpandedRowModel.cjs.map +1 -1
  214. package/dist/features/row-expanding/createExpandedRowModel.d.cts +1 -1
  215. package/dist/features/row-expanding/createExpandedRowModel.d.ts +1 -1
  216. package/dist/features/row-expanding/createExpandedRowModel.js.map +1 -1
  217. package/dist/features/row-expanding/rowExpandingFeature.cjs +37 -49
  218. package/dist/features/row-expanding/rowExpandingFeature.cjs.map +1 -1
  219. package/dist/features/row-expanding/rowExpandingFeature.d.cts +4 -15
  220. package/dist/features/row-expanding/rowExpandingFeature.d.ts +4 -15
  221. package/dist/features/row-expanding/rowExpandingFeature.js +38 -49
  222. package/dist/features/row-expanding/rowExpandingFeature.js.map +1 -1
  223. package/dist/features/row-expanding/rowExpandingFeature.types.d.cts +1 -10
  224. package/dist/features/row-expanding/rowExpandingFeature.types.d.ts +1 -10
  225. package/dist/features/row-expanding/rowExpandingFeature.utils.d.cts +1 -1
  226. package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +1 -1
  227. package/dist/features/row-pagination/createPaginatedRowModel.cjs.map +1 -1
  228. package/dist/features/row-pagination/createPaginatedRowModel.d.cts +1 -1
  229. package/dist/features/row-pagination/createPaginatedRowModel.d.ts +1 -1
  230. package/dist/features/row-pagination/createPaginatedRowModel.js.map +1 -1
  231. package/dist/features/row-pagination/rowPaginationFeature.cjs +35 -47
  232. package/dist/features/row-pagination/rowPaginationFeature.cjs.map +1 -1
  233. package/dist/features/row-pagination/rowPaginationFeature.d.cts +4 -15
  234. package/dist/features/row-pagination/rowPaginationFeature.d.ts +4 -15
  235. package/dist/features/row-pagination/rowPaginationFeature.js +36 -47
  236. package/dist/features/row-pagination/rowPaginationFeature.js.map +1 -1
  237. package/dist/features/row-pagination/rowPaginationFeature.types.d.cts +1 -10
  238. package/dist/features/row-pagination/rowPaginationFeature.types.d.ts +1 -10
  239. package/dist/features/row-pagination/rowPaginationFeature.utils.d.cts +1 -1
  240. package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +1 -1
  241. package/dist/features/row-pinning/rowPinningFeature.cjs +55 -67
  242. package/dist/features/row-pinning/rowPinningFeature.cjs.map +1 -1
  243. package/dist/features/row-pinning/rowPinningFeature.d.cts +4 -15
  244. package/dist/features/row-pinning/rowPinningFeature.d.ts +4 -15
  245. package/dist/features/row-pinning/rowPinningFeature.js +56 -67
  246. package/dist/features/row-pinning/rowPinningFeature.js.map +1 -1
  247. package/dist/features/row-pinning/rowPinningFeature.utils.d.cts +1 -1
  248. package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +1 -1
  249. package/dist/features/row-selection/rowSelectionFeature.cjs +65 -77
  250. package/dist/features/row-selection/rowSelectionFeature.cjs.map +1 -1
  251. package/dist/features/row-selection/rowSelectionFeature.d.cts +4 -15
  252. package/dist/features/row-selection/rowSelectionFeature.d.ts +4 -15
  253. package/dist/features/row-selection/rowSelectionFeature.js +66 -77
  254. package/dist/features/row-selection/rowSelectionFeature.js.map +1 -1
  255. package/dist/features/row-selection/rowSelectionFeature.utils.cjs +10 -6
  256. package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +1 -1
  257. package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +1 -1
  258. package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +1 -1
  259. package/dist/features/row-selection/rowSelectionFeature.utils.js +10 -6
  260. package/dist/features/row-selection/rowSelectionFeature.utils.js.map +1 -1
  261. package/dist/features/row-sorting/createSortedRowModel.cjs +4 -2
  262. package/dist/features/row-sorting/createSortedRowModel.cjs.map +1 -1
  263. package/dist/features/row-sorting/createSortedRowModel.d.cts +5 -3
  264. package/dist/features/row-sorting/createSortedRowModel.d.ts +5 -3
  265. package/dist/features/row-sorting/createSortedRowModel.js +4 -2
  266. package/dist/features/row-sorting/createSortedRowModel.js.map +1 -1
  267. package/dist/features/row-sorting/rowSortingFeature.cjs +45 -57
  268. package/dist/features/row-sorting/rowSortingFeature.cjs.map +1 -1
  269. package/dist/features/row-sorting/rowSortingFeature.d.cts +4 -15
  270. package/dist/features/row-sorting/rowSortingFeature.d.ts +4 -15
  271. package/dist/features/row-sorting/rowSortingFeature.js +46 -57
  272. package/dist/features/row-sorting/rowSortingFeature.js.map +1 -1
  273. package/dist/features/row-sorting/rowSortingFeature.types.d.cts +16 -13
  274. package/dist/features/row-sorting/rowSortingFeature.types.d.ts +16 -13
  275. package/dist/features/row-sorting/rowSortingFeature.utils.cjs +8 -5
  276. package/dist/features/row-sorting/rowSortingFeature.utils.cjs.map +1 -1
  277. package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +1 -1
  278. package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +1 -1
  279. package/dist/features/row-sorting/rowSortingFeature.utils.js +8 -5
  280. package/dist/features/row-sorting/rowSortingFeature.utils.js.map +1 -1
  281. package/dist/fns/aggregationFns.cjs +18 -18
  282. package/dist/fns/aggregationFns.cjs.map +1 -1
  283. package/dist/fns/aggregationFns.d.cts +21 -19
  284. package/dist/fns/aggregationFns.d.ts +21 -19
  285. package/dist/fns/aggregationFns.js +18 -18
  286. package/dist/fns/aggregationFns.js.map +1 -1
  287. package/dist/fns/filterFns.cjs +51 -65
  288. package/dist/fns/filterFns.cjs.map +1 -1
  289. package/dist/fns/filterFns.d.cts +82 -28
  290. package/dist/fns/filterFns.d.ts +82 -28
  291. package/dist/fns/filterFns.js +51 -65
  292. package/dist/fns/filterFns.js.map +1 -1
  293. package/dist/fns/sortFns.cjs +18 -6
  294. package/dist/fns/sortFns.cjs.map +1 -1
  295. package/dist/fns/sortFns.d.cts +15 -13
  296. package/dist/fns/sortFns.d.ts +15 -13
  297. package/dist/fns/sortFns.js +18 -6
  298. package/dist/fns/sortFns.js.map +1 -1
  299. package/dist/helpers/metaHelper.cjs +30 -0
  300. package/dist/helpers/metaHelper.cjs.map +1 -0
  301. package/dist/helpers/metaHelper.d.cts +26 -0
  302. package/dist/helpers/metaHelper.d.ts +26 -0
  303. package/dist/helpers/metaHelper.js +29 -0
  304. package/dist/helpers/metaHelper.js.map +1 -0
  305. package/dist/helpers/tableFeatures.cjs +31 -3
  306. package/dist/helpers/tableFeatures.cjs.map +1 -1
  307. package/dist/helpers/tableFeatures.d.cts +33 -5
  308. package/dist/helpers/tableFeatures.d.ts +33 -5
  309. package/dist/helpers/tableFeatures.js +31 -3
  310. package/dist/helpers/tableFeatures.js.map +1 -1
  311. package/dist/index.cjs +2 -20
  312. package/dist/index.d.cts +44 -43
  313. package/dist/index.d.ts +44 -43
  314. package/dist/index.js +22 -21
  315. package/dist/store-reactivity-bindings.cjs +1 -1
  316. package/dist/store-reactivity-bindings.cjs.map +1 -1
  317. package/dist/store-reactivity-bindings.d.cts +1 -1
  318. package/dist/store-reactivity-bindings.d.ts +1 -1
  319. package/dist/store-reactivity-bindings.js +1 -1
  320. package/dist/store-reactivity-bindings.js.map +1 -1
  321. package/dist/types/Cell.d.cts +7 -9
  322. package/dist/types/Cell.d.ts +7 -9
  323. package/dist/types/Column.d.cts +18 -11
  324. package/dist/types/Column.d.ts +18 -11
  325. package/dist/types/ColumnDef.d.cts +29 -10
  326. package/dist/types/ColumnDef.d.ts +29 -10
  327. package/dist/types/Header.d.cts +9 -10
  328. package/dist/types/Header.d.ts +9 -10
  329. package/dist/types/HeaderGroup.d.cts +3 -8
  330. package/dist/types/HeaderGroup.d.ts +3 -8
  331. package/dist/types/Row.d.cts +14 -10
  332. package/dist/types/Row.d.ts +14 -10
  333. package/dist/types/RowModel.d.cts +19 -19
  334. package/dist/types/RowModel.d.ts +19 -19
  335. package/dist/types/RowModelFns.d.cts +9 -9
  336. package/dist/types/RowModelFns.d.ts +9 -9
  337. package/dist/types/Table.d.cts +25 -15
  338. package/dist/types/Table.d.ts +25 -15
  339. package/dist/types/TableFeatures.d.cts +178 -41
  340. package/dist/types/TableFeatures.d.ts +178 -41
  341. package/dist/types/TableOptions.d.cts +24 -9
  342. package/dist/types/TableOptions.d.ts +24 -9
  343. package/dist/types/TableState.d.cts +22 -13
  344. package/dist/types/TableState.d.ts +22 -13
  345. package/dist/utils.cjs.map +1 -1
  346. package/dist/utils.d.cts +2 -2
  347. package/dist/utils.d.ts +2 -2
  348. package/dist/utils.js.map +1 -1
  349. package/package.json +1 -1
  350. package/skills/column-definitions/SKILL.md +3 -6
  351. package/skills/column-layout/SKILL.md +0 -2
  352. package/skills/customizing-feature-behavior/SKILL.md +63 -56
  353. package/skills/filtering/SKILL.md +60 -42
  354. package/skills/filtering/references/faceting-and-fuzzy.md +59 -32
  355. package/skills/grouping/SKILL.md +49 -54
  356. package/skills/migrate-v8-to-v9/SKILL.md +30 -33
  357. package/skills/pagination/SKILL.md +22 -20
  358. package/skills/row-expanding/SKILL.md +33 -25
  359. package/skills/row-pinning/SKILL.md +11 -7
  360. package/skills/row-selection/SKILL.md +0 -3
  361. package/skills/setup/SKILL.md +55 -65
  362. package/skills/sorting/SKILL.md +21 -21
  363. package/skills/state-management/SKILL.md +40 -25
  364. package/src/core/cells/coreCellsFeature.ts +17 -39
  365. package/src/core/columns/coreColumnsFeature.ts +56 -83
  366. package/src/core/coreFeatures.ts +1 -1
  367. package/src/core/headers/buildHeaderGroups.ts +1 -1
  368. package/src/core/headers/coreHeadersFeature.ts +42 -64
  369. package/src/core/headers/coreHeadersFeature.utils.ts +1 -1
  370. package/src/core/row-models/coreRowModelsFeature.ts +43 -64
  371. package/src/core/row-models/coreRowModelsFeature.types.ts +1 -18
  372. package/src/core/row-models/coreRowModelsFeature.utils.ts +7 -7
  373. package/src/core/row-models/createCoreRowModel.ts +1 -1
  374. package/src/core/rows/coreRowsFeature.ts +45 -72
  375. package/src/core/table/constructTable.ts +49 -12
  376. package/src/core/table/coreTablesFeature.ts +13 -35
  377. package/src/core/table/coreTablesFeature.types.ts +33 -10
  378. package/src/core/table/coreTablesFeature.utils.ts +2 -3
  379. package/src/features/column-faceting/columnFacetingFeature.ts +71 -102
  380. package/src/features/column-faceting/columnFacetingFeature.types.ts +3 -36
  381. package/src/features/column-faceting/columnFacetingFeature.utils.ts +6 -6
  382. package/src/features/column-faceting/createFacetedMinMaxValues.ts +1 -1
  383. package/src/features/column-faceting/createFacetedRowModel.ts +1 -1
  384. package/src/features/column-faceting/createFacetedUniqueValues.ts +1 -1
  385. package/src/features/column-filtering/columnFilteringFeature.ts +60 -103
  386. package/src/features/column-filtering/columnFilteringFeature.types.ts +37 -21
  387. package/src/features/column-filtering/columnFilteringFeature.utils.ts +2 -2
  388. package/src/features/column-filtering/createFilteredRowModel.ts +5 -7
  389. package/src/features/column-grouping/columnGroupingFeature.ts +82 -126
  390. package/src/features/column-grouping/columnGroupingFeature.types.ts +20 -19
  391. package/src/features/column-grouping/createGroupedRowModel.ts +7 -11
  392. package/src/features/column-ordering/columnOrderingFeature.ts +52 -84
  393. package/src/features/column-pinning/columnPinningFeature.ts +268 -304
  394. package/src/features/column-pinning/columnPinningFeature.utils.ts +5 -5
  395. package/src/features/column-resizing/columnResizingFeature.ts +44 -78
  396. package/src/features/column-sizing/columnSizingFeature.ts +115 -152
  397. package/src/features/column-visibility/columnVisibilityFeature.ts +92 -129
  398. package/src/features/global-filtering/globalFilteringFeature.ts +45 -79
  399. package/src/features/global-filtering/globalFilteringFeature.utils.ts +4 -2
  400. package/src/features/row-expanding/createExpandedRowModel.ts +1 -1
  401. package/src/features/row-expanding/rowExpandingFeature.ts +65 -101
  402. package/src/features/row-expanding/rowExpandingFeature.types.ts +0 -14
  403. package/src/features/row-pagination/createPaginatedRowModel.ts +1 -1
  404. package/src/features/row-pagination/rowPaginationFeature.ts +69 -103
  405. package/src/features/row-pagination/rowPaginationFeature.types.ts +0 -14
  406. package/src/features/row-pinning/rowPinningFeature.ts +72 -104
  407. package/src/features/row-selection/rowSelectionFeature.ts +103 -135
  408. package/src/features/row-selection/rowSelectionFeature.utils.ts +12 -7
  409. package/src/features/row-sorting/createSortedRowModel.ts +6 -6
  410. package/src/features/row-sorting/rowSortingFeature.ts +73 -114
  411. package/src/features/row-sorting/rowSortingFeature.types.ts +19 -18
  412. package/src/features/row-sorting/rowSortingFeature.utils.ts +8 -6
  413. package/src/fns/aggregationFns.ts +26 -42
  414. package/src/fns/filterFns.ts +231 -264
  415. package/src/fns/sortFns.ts +51 -29
  416. package/src/helpers/metaHelper.ts +24 -0
  417. package/src/helpers/tableFeatures.ts +36 -5
  418. package/src/index.ts +1 -0
  419. package/src/store-reactivity-bindings.ts +1 -1
  420. package/src/types/Cell.ts +8 -28
  421. package/src/types/Column.ts +18 -53
  422. package/src/types/ColumnDef.ts +44 -45
  423. package/src/types/Header.ts +8 -30
  424. package/src/types/HeaderGroup.ts +2 -13
  425. package/src/types/Row.ts +15 -36
  426. package/src/types/RowModel.ts +21 -111
  427. package/src/types/RowModelFns.ts +11 -30
  428. package/src/types/Table.ts +24 -66
  429. package/src/types/TableFeatures.ts +253 -108
  430. package/src/types/TableOptions.ts +40 -72
  431. package/src/types/TableState.ts +20 -73
  432. package/src/utils.ts +5 -4
@@ -1 +1 @@
1
- {"version":3,"file":"globalFilteringFeature.js","names":[],"sources":["../../../src/features/global-filtering/globalFilteringFeature.ts"],"sourcesContent":["import {\n assignPrototypeAPIs,\n assignTableAPIs,\n makeStateUpdater,\n} from '../../utils'\nimport {\n column_getCanGlobalFilter,\n table_getGlobalAutoFilterFn,\n table_getGlobalFilterFn,\n table_resetGlobalFilter,\n table_setGlobalFilter,\n} from './globalFilteringFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n// ColumnDef_GlobalFiltering,\n// Column_GlobalFiltering,\n// TableOptions_GlobalFiltering,\n// TableState_GlobalFiltering,\n// Table_GlobalFiltering,\n// } from './globalFilteringFeature.types'\n\nexport interface GlobalFilteringFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Column: Column_GlobalFiltering\n // ColumnDef: ColumnDef_GlobalFiltering\n // Table: Table_GlobalFiltering<TFeatures, TData>\n // TableOptions: TableOptions_GlobalFiltering<TFeatures, TData>\n // TableState: TableState_GlobalFiltering\n}\n\n/**\n * Creates the stock global filtering 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 constructGlobalFilteringFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<GlobalFilteringFeatureConstructors<TFeatures, TData>> {\n return {\n getInitialState: (initialState) => {\n return {\n globalFilter: undefined,\n ...initialState,\n }\n },\n\n getDefaultTableOptions: (table) => {\n return {\n onGlobalFilterChange: makeStateUpdater('globalFilter', table),\n globalFilterFn: 'auto',\n getColumnCanGlobalFilter: (column) => {\n const value = table\n .getCoreRowModel()\n .flatRows[0]?.getAllCellsByColumnId()\n [column.id]?.getValue()\n\n return typeof value === 'string' || typeof value === 'number'\n },\n }\n },\n\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('globalFilteringFeature', prototype, table, {\n column_getCanGlobalFilter: {\n fn: (column) => column_getCanGlobalFilter(column),\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('globalFilteringFeature', table, {\n table_getGlobalAutoFilterFn: {\n fn: () => table_getGlobalAutoFilterFn(),\n },\n table_getGlobalFilterFn: {\n fn: () => table_getGlobalFilterFn(table),\n },\n table_setGlobalFilter: {\n fn: (updater) => table_setGlobalFilter(table, updater),\n },\n table_resetGlobalFilter: {\n fn: (defaultState) => table_resetGlobalFilter(table, defaultState),\n },\n })\n },\n }\n}\n\n/**\n * The stock global filtering feature.\n *\n * Register this feature with column filtering support to add global filter\n * state, global filter function resolution, and column eligibility APIs.\n */\nexport const globalFilteringFeature = constructGlobalFilteringFeature()\n"],"mappings":";;;;;;;;;AAsCA,SAAgB,kCAGwD;CACtE,OAAO;EACL,kBAAkB,iBAAiB;GACjC,OAAO;IACL,cAAc;IACd,GAAG;GACL;EACF;EAEA,yBAAyB,UAAU;GACjC,OAAO;IACL,sBAAsB,iBAAiB,gBAAgB,KAAK;IAC5D,gBAAgB;IAChB,2BAA2B,WAAW;;KACpC,MAAM,iCAAQ,MACX,gBAAgB,CAAC,CACjB,SAAS,mGAAI,sBAAsB,CAAC,CACpC,OAAO,mFAAK,SAAS;KAExB,OAAO,OAAO,UAAU,YAAY,OAAO,UAAU;IACvD;GACF;EACF;EAEA,wBAAwB,WAAW,UAAU;GAC3C,oBAAoB,0BAA0B,WAAW,OAAO,EAC9D,2BAA2B,EACzB,KAAK,WAAW,0BAA0B,MAAM,EAClD,EACF,CAAC;EACH;EAEA,qBAAqB,UAAU;GAC7B,gBAAgB,0BAA0B,OAAO;IAC/C,6BAA6B,EAC3B,UAAU,4BAA4B,EACxC;IACA,yBAAyB,EACvB,UAAU,wBAAwB,KAAK,EACzC;IACA,uBAAuB,EACrB,KAAK,YAAY,sBAAsB,OAAO,OAAO,EACvD;IACA,yBAAyB,EACvB,KAAK,iBAAiB,wBAAwB,OAAO,YAAY,EACnE;GACF,CAAC;EACH;CACF;AACF;;;;;;;AAQA,MAAa,yBAAyB,gCAAgC"}
1
+ {"version":3,"file":"globalFilteringFeature.js","names":[],"sources":["../../../src/features/global-filtering/globalFilteringFeature.ts"],"sourcesContent":["import {\n assignPrototypeAPIs,\n assignTableAPIs,\n makeStateUpdater,\n} from '../../utils'\nimport {\n column_getCanGlobalFilter,\n table_getGlobalAutoFilterFn,\n table_getGlobalFilterFn,\n table_resetGlobalFilter,\n table_setGlobalFilter,\n} from './globalFilteringFeature.utils'\nimport type { TableFeature } from '../../types/TableFeatures'\n\n/**\n * Feature that adds global filtering state, defaults, and global filter APIs.\n */\nexport const globalFilteringFeature: TableFeature = {\n getInitialState: (initialState) => {\n return {\n globalFilter: undefined,\n ...initialState,\n }\n },\n\n getDefaultTableOptions: (table) => {\n return {\n onGlobalFilterChange: makeStateUpdater('globalFilter', table),\n globalFilterFn: 'auto',\n getColumnCanGlobalFilter: (column) => {\n const value = table\n .getCoreRowModel()\n .flatRows[0]?.getAllCellsByColumnId()\n [column.id]?.getValue()\n\n return typeof value === 'string' || typeof value === 'number'\n },\n }\n },\n\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('globalFilteringFeature', prototype, table, {\n column_getCanGlobalFilter: {\n fn: (column) => column_getCanGlobalFilter(column),\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('globalFilteringFeature', table, {\n table_getGlobalAutoFilterFn: {\n fn: () => table_getGlobalAutoFilterFn(),\n },\n table_getGlobalFilterFn: {\n fn: () => table_getGlobalFilterFn(table),\n },\n table_setGlobalFilter: {\n fn: (updater) => table_setGlobalFilter(table, updater),\n },\n table_resetGlobalFilter: {\n fn: (defaultState) => table_resetGlobalFilter(table, defaultState),\n },\n })\n },\n}\n"],"mappings":";;;;;;;AAiBA,MAAa,yBAAuC;CAClD,kBAAkB,iBAAiB;EACjC,OAAO;GACL,cAAc;GACd,GAAG;EACL;CACF;CAEA,yBAAyB,UAAU;EACjC,OAAO;GACL,sBAAsB,iBAAiB,gBAAgB,KAAK;GAC5D,gBAAgB;GAChB,2BAA2B,WAAW;;IACpC,MAAM,iCAAQ,MACX,gBAAgB,CAAC,CACjB,SAAS,mGAAI,sBAAsB,CAAC,CACpC,OAAO,mFAAK,SAAS;IAExB,OAAO,OAAO,UAAU,YAAY,OAAO,UAAU;GACvD;EACF;CACF;CAEA,wBAAwB,WAAW,UAAU;EAC3C,oBAAoB,0BAA0B,WAAW,OAAO,EAC9D,2BAA2B,EACzB,KAAK,WAAW,0BAA0B,MAAM,EAClD,EACF,CAAC;CACH;CAEA,qBAAqB,UAAU;EAC7B,gBAAgB,0BAA0B,OAAO;GAC/C,6BAA6B,EAC3B,UAAU,4BAA4B,EACxC;GACA,yBAAyB,EACvB,UAAU,wBAAwB,KAAK,EACzC;GACA,uBAAuB,EACrB,KAAK,YAAY,sBAAsB,OAAO,OAAO,EACvD;GACA,yBAAyB,EACvB,KAAK,iBAAiB,wBAAwB,OAAO,YAAY,EACnE;EACF,CAAC;CACH;AACF"}
@@ -1,6 +1,6 @@
1
1
  import { CellData, OnChangeFn, RowData, Updater } from "../../types/type-utils.cjs";
2
- import { FilterFn, FilterFnOption } from "../column-filtering/columnFilteringFeature.types.cjs";
3
2
  import { Column } from "../../types/Column.cjs";
3
+ import { FilterFn, FilterFnOption } from "../column-filtering/columnFilteringFeature.types.cjs";
4
4
  import { TableFeatures } from "../../types/TableFeatures.cjs";
5
5
 
6
6
  //#region src/features/global-filtering/globalFilteringFeature.types.d.ts
@@ -1,6 +1,6 @@
1
1
  import { CellData, OnChangeFn, RowData, Updater } from "../../types/type-utils.js";
2
- import { FilterFn, FilterFnOption } from "../column-filtering/columnFilteringFeature.types.js";
3
2
  import { Column } from "../../types/Column.js";
3
+ import { FilterFn, FilterFnOption } from "../column-filtering/columnFilteringFeature.types.js";
4
4
  import { TableFeatures } from "../../types/TableFeatures.js";
5
5
 
6
6
  //#region src/features/global-filtering/globalFilteringFeature.types.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"globalFilteringFeature.utils.cjs","names":["filterFn_includesString","isFunction","cloneState"],"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 * Checks whether this accessor column participates in global filtering.\n *\n * The column must have an accessor and pass column-level, table-level, and\n * optional `getColumnCanGlobalFilter` checks.\n *\n * @example\n * ```ts\n * const canGlobalFilter = 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 * Provides the built-in automatic global filter function.\n *\n * Global filtering defaults to `includesString`, which gives search-box style\n * matching across globally filterable columns.\n *\n * @example\n * ```ts\n * const filterFn = table_getGlobalAutoFilterFn()\n * ```\n */\nexport function table_getGlobalAutoFilterFn() {\n return filterFn_includesString\n}\n\n/**\n * Resolves the filter function used for global filtering.\n *\n * Function-valued `options.globalFilterFn` is returned directly, `'auto'`\n * delegates to `table_getGlobalAutoFilterFn`, and string values are looked up in\n * the table's filter function registry.\n *\n * @example\n * ```ts\n * const filterFn = 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 * Routes a global filter updater through the table's global filter handler.\n *\n * The updater may be a next value or a function of the previous value, matching\n * the instance `table.setGlobalFilter` behavior.\n *\n * @example\n * ```ts\n * table_setGlobalFilter(table, 'search text')\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 `globalFilter` to the configured initial state or feature default.\n *\n * With no argument, the reset clones `table.initialState.globalFilter`. Passing\n * `true` ignores initial state and resets to `undefined`.\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":";;;;;;;;;;;;;;;AAmBA,SAAgB,0BAId,QAA4D;;CAC5D,QACG,OAAO,UAAU,sBAAsB,UACvC,OAAO,MAAM,QAAQ,sBAAsB,UAC3C,OAAO,MAAM,QAAQ,iBAAiB,8DACtC,OAAO,MAAM,SAAQ,qIAA2B,MAAM,MAAK,SAC5D,CAAC,CAAC,OAAO;AAEb;;;;;;;;;;;;AAaA,SAAgB,8BAA8B;CAC5C,OAAOA;AACT;;;;;;;;;;;;;AAcA,SAAgB,wBAId,OACqE;CACrE,MAAM,EAAkB,mBAAmB,MAAM;CACjD,MAAM,YACJ,MAAM,aAAa;CAErB,OAAOC,yBAAW,cAAc,IAC5B,iBACA,mBAAmB,SACjB,4BAA4B,0DAC5B,UAAY;AACpB;;;;;;;;;;;;AAaA,SAAgB,sBAGd,OAAyC,SAAc;;CACvD,iDAAM,SAAQ,iHAAuB,OAAO;AAC9C;;;;;;;;;;;;;AAcA,SAAgB,wBAGd,OAAyC,cAAwB;CACjE,sBACE,OACA,eAAe,SAAYC,yBAAW,MAAM,aAAa,YAAY,CACvE;AACF"}
1
+ {"version":3,"file":"globalFilteringFeature.utils.cjs","names":["filterFn_includesString","isFunction","cloneState"],"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 * Checks whether this accessor column participates in global filtering.\n *\n * The column must have an accessor and pass column-level, table-level, and\n * optional `getColumnCanGlobalFilter` checks.\n *\n * @example\n * ```ts\n * const canGlobalFilter = 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 * Provides the built-in automatic global filter function.\n *\n * Global filtering defaults to `includesString`, which gives search-box style\n * matching across globally filterable columns.\n *\n * @example\n * ```ts\n * const filterFn = table_getGlobalAutoFilterFn()\n * ```\n */\nexport function table_getGlobalAutoFilterFn() {\n return filterFn_includesString\n}\n\n/**\n * Resolves the filter function used for global filtering.\n *\n * Function-valued `options.globalFilterFn` is returned directly, `'auto'`\n * delegates to `table_getGlobalAutoFilterFn`, and string values are looked up in\n * the table's filter function registry.\n *\n * @example\n * ```ts\n * const filterFn = 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> | undefined {\n const { globalFilterFn: globalFilterFn } = table.options\n const filterFns: Record<string, FilterFn<TFeatures, TData>> | undefined =\n table._rowModelFns.filterFns\n\n const filterFn = isFunction(globalFilterFn)\n ? globalFilterFn\n : globalFilterFn === 'auto'\n ? table_getGlobalAutoFilterFn()\n : filterFns?.[globalFilterFn as string]\n\n return filterFn\n}\n\n/**\n * Routes a global filter updater through the table's global filter handler.\n *\n * The updater may be a next value or a function of the previous value, matching\n * the instance `table.setGlobalFilter` behavior.\n *\n * @example\n * ```ts\n * table_setGlobalFilter(table, 'search text')\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 `globalFilter` to the configured initial state or feature default.\n *\n * With no argument, the reset clones `table.initialState.globalFilter`. Passing\n * `true` ignores initial state and resets to `undefined`.\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":";;;;;;;;;;;;;;;AAmBA,SAAgB,0BAId,QAA4D;;CAC5D,QACG,OAAO,UAAU,sBAAsB,UACvC,OAAO,MAAM,QAAQ,sBAAsB,UAC3C,OAAO,MAAM,QAAQ,iBAAiB,8DACtC,OAAO,MAAM,SAAQ,qIAA2B,MAAM,MAAK,SAC5D,CAAC,CAAC,OAAO;AAEb;;;;;;;;;;;;AAaA,SAAgB,8BAA8B;CAC5C,OAAOA;AACT;;;;;;;;;;;;;AAcA,SAAgB,wBAId,OACwC;CACxC,MAAM,EAAkB,mBAAmB,MAAM;CACjD,MAAM,YACJ,MAAM,aAAa;CAQrB,OANiBC,yBAAW,cAAc,IACtC,iBACA,mBAAmB,SACjB,4BAA4B,0DAC5B,UAAY;AAGpB;;;;;;;;;;;;AAaA,SAAgB,sBAGd,OAAyC,SAAc;;CACvD,iDAAM,SAAQ,iHAAuB,OAAO;AAC9C;;;;;;;;;;;;;AAcA,SAAgB,wBAGd,OAAyC,cAAwB;CACjE,sBACE,OACA,eAAe,SAAYC,yBAAW,MAAM,aAAa,YAAY,CACvE;AACF"}
@@ -1,9 +1,9 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.cjs";
2
- import { FilterFn } from "../column-filtering/columnFilteringFeature.types.cjs";
3
2
  import { Column_Internal } from "../../types/Column.cjs";
4
- import { TableFeatures } from "../../types/TableFeatures.cjs";
3
+ import { Row } from "../../types/Row.cjs";
4
+ import { FilterFn } from "../column-filtering/columnFilteringFeature.types.cjs";
5
5
  import { Table_Internal } from "../../types/Table.cjs";
6
-
6
+ import { TableFeatures } from "../../types/TableFeatures.cjs";
7
7
  //#region src/features/global-filtering/globalFilteringFeature.utils.d.ts
8
8
  /**
9
9
  * Checks whether this accessor column participates in global filtering.
@@ -28,7 +28,9 @@ declare function column_getCanGlobalFilter<TFeatures extends TableFeatures, TDat
28
28
  * const filterFn = table_getGlobalAutoFilterFn()
29
29
  * ```
30
30
  */
31
- declare function table_getGlobalAutoFilterFn(): FilterFn<any, any>;
31
+ declare function table_getGlobalAutoFilterFn(): (<TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData>, columnId: string, filterValue: unknown) => boolean) & {
32
+ autoRemove: (val: any) => boolean;
33
+ };
32
34
  /**
33
35
  * Resolves the filter function used for global filtering.
34
36
  *
@@ -41,7 +43,7 @@ declare function table_getGlobalAutoFilterFn(): FilterFn<any, any>;
41
43
  * const filterFn = table_getGlobalFilterFn(table)
42
44
  * ```
43
45
  */
44
- declare function table_getGlobalFilterFn<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): FilterFn<TFeatures, TData> | FilterFn<TFeatures, TData> | undefined;
46
+ declare function table_getGlobalFilterFn<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): FilterFn<TFeatures, TData> | undefined;
45
47
  /**
46
48
  * Routes a global filter updater through the table's global filter handler.
47
49
  *
@@ -1,9 +1,9 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.js";
2
- import { FilterFn } from "../column-filtering/columnFilteringFeature.types.js";
3
2
  import { Column_Internal } from "../../types/Column.js";
4
- import { TableFeatures } from "../../types/TableFeatures.js";
3
+ import { Row } from "../../types/Row.js";
4
+ import { FilterFn } from "../column-filtering/columnFilteringFeature.types.js";
5
5
  import { Table_Internal } from "../../types/Table.js";
6
-
6
+ import { TableFeatures } from "../../types/TableFeatures.js";
7
7
  //#region src/features/global-filtering/globalFilteringFeature.utils.d.ts
8
8
  /**
9
9
  * Checks whether this accessor column participates in global filtering.
@@ -28,7 +28,9 @@ declare function column_getCanGlobalFilter<TFeatures extends TableFeatures, TDat
28
28
  * const filterFn = table_getGlobalAutoFilterFn()
29
29
  * ```
30
30
  */
31
- declare function table_getGlobalAutoFilterFn(): FilterFn<any, any>;
31
+ declare function table_getGlobalAutoFilterFn(): (<TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData>, columnId: string, filterValue: unknown) => boolean) & {
32
+ autoRemove: (val: any) => boolean;
33
+ };
32
34
  /**
33
35
  * Resolves the filter function used for global filtering.
34
36
  *
@@ -41,7 +43,7 @@ declare function table_getGlobalAutoFilterFn(): FilterFn<any, any>;
41
43
  * const filterFn = table_getGlobalFilterFn(table)
42
44
  * ```
43
45
  */
44
- declare function table_getGlobalFilterFn<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): FilterFn<TFeatures, TData> | FilterFn<TFeatures, TData> | undefined;
46
+ declare function table_getGlobalFilterFn<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): FilterFn<TFeatures, TData> | undefined;
45
47
  /**
46
48
  * Routes a global filter updater through the table's global filter handler.
47
49
  *
@@ -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\n/**\n * Checks whether this accessor column participates in global filtering.\n *\n * The column must have an accessor and pass column-level, table-level, and\n * optional `getColumnCanGlobalFilter` checks.\n *\n * @example\n * ```ts\n * const canGlobalFilter = 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 * Provides the built-in automatic global filter function.\n *\n * Global filtering defaults to `includesString`, which gives search-box style\n * matching across globally filterable columns.\n *\n * @example\n * ```ts\n * const filterFn = table_getGlobalAutoFilterFn()\n * ```\n */\nexport function table_getGlobalAutoFilterFn() {\n return filterFn_includesString\n}\n\n/**\n * Resolves the filter function used for global filtering.\n *\n * Function-valued `options.globalFilterFn` is returned directly, `'auto'`\n * delegates to `table_getGlobalAutoFilterFn`, and string values are looked up in\n * the table's filter function registry.\n *\n * @example\n * ```ts\n * const filterFn = 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 * Routes a global filter updater through the table's global filter handler.\n *\n * The updater may be a next value or a function of the previous value, matching\n * the instance `table.setGlobalFilter` behavior.\n *\n * @example\n * ```ts\n * table_setGlobalFilter(table, 'search text')\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 `globalFilter` to the configured initial state or feature default.\n *\n * With no argument, the reset clones `table.initialState.globalFilter`. Passing\n * `true` ignores initial state and resets to `undefined`.\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":";;;;;;;;;;;;;;;AAmBA,SAAgB,0BAId,QAA4D;;CAC5D,QACG,OAAO,UAAU,sBAAsB,UACvC,OAAO,MAAM,QAAQ,sBAAsB,UAC3C,OAAO,MAAM,QAAQ,iBAAiB,8DACtC,OAAO,MAAM,SAAQ,qIAA2B,MAAM,MAAK,SAC5D,CAAC,CAAC,OAAO;AAEb;;;;;;;;;;;;AAaA,SAAgB,8BAA8B;CAC5C,OAAO;AACT;;;;;;;;;;;;;AAcA,SAAgB,wBAId,OACqE;CACrE,MAAM,EAAkB,mBAAmB,MAAM;CACjD,MAAM,YACJ,MAAM,aAAa;CAErB,OAAO,WAAW,cAAc,IAC5B,iBACA,mBAAmB,SACjB,4BAA4B,0DAC5B,UAAY;AACpB;;;;;;;;;;;;AAaA,SAAgB,sBAGd,OAAyC,SAAc;;CACvD,iDAAM,SAAQ,iHAAuB,OAAO;AAC9C;;;;;;;;;;;;;AAcA,SAAgB,wBAGd,OAAyC,cAAwB;CACjE,sBACE,OACA,eAAe,SAAY,WAAW,MAAM,aAAa,YAAY,CACvE;AACF"}
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 * Checks whether this accessor column participates in global filtering.\n *\n * The column must have an accessor and pass column-level, table-level, and\n * optional `getColumnCanGlobalFilter` checks.\n *\n * @example\n * ```ts\n * const canGlobalFilter = 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 * Provides the built-in automatic global filter function.\n *\n * Global filtering defaults to `includesString`, which gives search-box style\n * matching across globally filterable columns.\n *\n * @example\n * ```ts\n * const filterFn = table_getGlobalAutoFilterFn()\n * ```\n */\nexport function table_getGlobalAutoFilterFn() {\n return filterFn_includesString\n}\n\n/**\n * Resolves the filter function used for global filtering.\n *\n * Function-valued `options.globalFilterFn` is returned directly, `'auto'`\n * delegates to `table_getGlobalAutoFilterFn`, and string values are looked up in\n * the table's filter function registry.\n *\n * @example\n * ```ts\n * const filterFn = 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> | undefined {\n const { globalFilterFn: globalFilterFn } = table.options\n const filterFns: Record<string, FilterFn<TFeatures, TData>> | undefined =\n table._rowModelFns.filterFns\n\n const filterFn = isFunction(globalFilterFn)\n ? globalFilterFn\n : globalFilterFn === 'auto'\n ? table_getGlobalAutoFilterFn()\n : filterFns?.[globalFilterFn as string]\n\n return filterFn\n}\n\n/**\n * Routes a global filter updater through the table's global filter handler.\n *\n * The updater may be a next value or a function of the previous value, matching\n * the instance `table.setGlobalFilter` behavior.\n *\n * @example\n * ```ts\n * table_setGlobalFilter(table, 'search text')\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 `globalFilter` to the configured initial state or feature default.\n *\n * With no argument, the reset clones `table.initialState.globalFilter`. Passing\n * `true` ignores initial state and resets to `undefined`.\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":";;;;;;;;;;;;;;;AAmBA,SAAgB,0BAId,QAA4D;;CAC5D,QACG,OAAO,UAAU,sBAAsB,UACvC,OAAO,MAAM,QAAQ,sBAAsB,UAC3C,OAAO,MAAM,QAAQ,iBAAiB,8DACtC,OAAO,MAAM,SAAQ,qIAA2B,MAAM,MAAK,SAC5D,CAAC,CAAC,OAAO;AAEb;;;;;;;;;;;;AAaA,SAAgB,8BAA8B;CAC5C,OAAO;AACT;;;;;;;;;;;;;AAcA,SAAgB,wBAId,OACwC;CACxC,MAAM,EAAkB,mBAAmB,MAAM;CACjD,MAAM,YACJ,MAAM,aAAa;CAQrB,OANiB,WAAW,cAAc,IACtC,iBACA,mBAAmB,SACjB,4BAA4B,0DAC5B,UAAY;AAGpB;;;;;;;;;;;;AAaA,SAAgB,sBAGd,OAAyC,SAAc;;CACvD,iDAAM,SAAQ,iHAAuB,OAAO;AAC9C;;;;;;;;;;;;;AAcA,SAAgB,wBAGd,OAAyC,cAAwB;CACjE,sBACE,OACA,eAAe,SAAY,WAAW,MAAM,aAAa,YAAY,CACvE;AACF"}
@@ -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\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,IAAI;KAC1B,MAAM,uBAAuB;KAC7B,MAAM,QAAQ;IAChB;;GACA,UAAU,wBAAwB,KAAK;EACzC,CAAC;CACH;AACF;AAEA,SAAS,wBAGP,OAAqE;;CACrE,MAAM,WAAW,MAAM,uBAAuB;CAC9C,MAAM,qCAAW,MAAM,MAAM,0FAAU,IAAI;CAE3C,IACE,CAAC,SAAS,KAAK,UACd,aAAa,QAAQ,CAAC,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC,QAEnD,OAAO;CAGT,IAAI,CAAC,MAAM,QAAQ,sBAEjB,OAAO;CAGT,OAAO,WAAW,QAAQ;AAC5B;;;;;;AAOA,SAAgB,WAGd,UAAkE;CAClE,MAAM,eAA6C,CAAC;CAEpD,MAAM,aAAa,QAA+B;EAChD,aAAa,KAAK,GAAG;EAErB,IAAI,IAAI,QAAQ,UAAUC,oDAAkB,GAAG,GAC7C,IAAI,QAAQ,QAAQ,SAAS;CAEjC;CAEA,SAAS,KAAK,QAAQ,SAAS;CAE/B,OAAO;EACL,MAAM;EACN,UAAU,SAAS;EACnB,UAAU,SAAS;CACrB;AACF"}
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 as unknown as Table_Internal<TFeatures, TData>\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,QAAQ;EACd,OAAOA,wBAAU;GACf,SAAS;GACT;GACA,QAAQ;GACR,gBAAgB;;;8BACd,MAAM,MAAM,wFAAU,IAAI;KAC1B,MAAM,uBAAuB;KAC7B,MAAM,QAAQ;IAChB;;GACA,UAAU,wBAAwB,KAAK;EACzC,CAAC;CACH;AACF;AAEA,SAAS,wBAGP,OAAqE;;CACrE,MAAM,WAAW,MAAM,uBAAuB;CAC9C,MAAM,qCAAW,MAAM,MAAM,0FAAU,IAAI;CAE3C,IACE,CAAC,SAAS,KAAK,UACd,aAAa,QAAQ,CAAC,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC,QAEnD,OAAO;CAGT,IAAI,CAAC,MAAM,QAAQ,sBAEjB,OAAO;CAGT,OAAO,WAAW,QAAQ;AAC5B;;;;;;AAOA,SAAgB,WAGd,UAAkE;CAClE,MAAM,eAA6C,CAAC;CAEpD,MAAM,aAAa,QAA+B;EAChD,aAAa,KAAK,GAAG;EAErB,IAAI,IAAI,QAAQ,UAAUC,oDAAkB,GAAG,GAC7C,IAAI,QAAQ,QAAQ,SAAS;CAEjC;CAEA,SAAS,KAAK,QAAQ,SAAS;CAE/B,OAAO;EACL,MAAM;EACN,UAAU,SAAS;EACnB,UAAU,SAAS;CACrB;AACF"}
@@ -1,6 +1,6 @@
1
1
  import { RowData } from "../../types/type-utils.cjs";
2
- import { TableFeatures } from "../../types/TableFeatures.cjs";
3
2
  import { Table } from "../../types/Table.cjs";
3
+ import { TableFeatures } from "../../types/TableFeatures.cjs";
4
4
  import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.cjs";
5
5
 
6
6
  //#region src/features/row-expanding/createExpandedRowModel.d.ts
@@ -1,6 +1,6 @@
1
1
  import { RowData } from "../../types/type-utils.js";
2
- import { TableFeatures } from "../../types/TableFeatures.js";
3
2
  import { Table } from "../../types/Table.js";
3
+ import { TableFeatures } from "../../types/TableFeatures.js";
4
4
  import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.js";
5
5
 
6
6
  //#region src/features/row-expanding/createExpandedRowModel.d.ts
@@ -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\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,IAAI;KAC1B,MAAM,uBAAuB;KAC7B,MAAM,QAAQ;IAChB;;GACA,UAAU,wBAAwB,KAAK;EACzC,CAAC;CACH;AACF;AAEA,SAAS,wBAGP,OAAqE;;CACrE,MAAM,WAAW,MAAM,uBAAuB;CAC9C,MAAM,qCAAW,MAAM,MAAM,0FAAU,IAAI;CAE3C,IACE,CAAC,SAAS,KAAK,UACd,aAAa,QAAQ,CAAC,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC,QAEnD,OAAO;CAGT,IAAI,CAAC,MAAM,QAAQ,sBAEjB,OAAO;CAGT,OAAO,WAAW,QAAQ;AAC5B;;;;;;AAOA,SAAgB,WAGd,UAAkE;CAClE,MAAM,eAA6C,CAAC;CAEpD,MAAM,aAAa,QAA+B;EAChD,aAAa,KAAK,GAAG;EAErB,IAAI,IAAI,QAAQ,UAAU,kBAAkB,GAAG,GAC7C,IAAI,QAAQ,QAAQ,SAAS;CAEjC;CAEA,SAAS,KAAK,QAAQ,SAAS;CAE/B,OAAO;EACL,MAAM;EACN,UAAU,SAAS;EACnB,UAAU,SAAS;CACrB;AACF"}
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 as unknown as Table_Internal<TFeatures, TData>\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,QAAQ;EACd,OAAO,UAAU;GACf,SAAS;GACT;GACA,QAAQ;GACR,gBAAgB;;;8BACd,MAAM,MAAM,wFAAU,IAAI;KAC1B,MAAM,uBAAuB;KAC7B,MAAM,QAAQ;IAChB;;GACA,UAAU,wBAAwB,KAAK;EACzC,CAAC;CACH;AACF;AAEA,SAAS,wBAGP,OAAqE;;CACrE,MAAM,WAAW,MAAM,uBAAuB;CAC9C,MAAM,qCAAW,MAAM,MAAM,0FAAU,IAAI;CAE3C,IACE,CAAC,SAAS,KAAK,UACd,aAAa,QAAQ,CAAC,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC,QAEnD,OAAO;CAGT,IAAI,CAAC,MAAM,QAAQ,sBAEjB,OAAO;CAGT,OAAO,WAAW,QAAQ;AAC5B;;;;;;AAOA,SAAgB,WAGd,UAAkE;CAClE,MAAM,eAA6C,CAAC;CAEpD,MAAM,aAAa,QAA+B;EAChD,aAAa,KAAK,GAAG;EAErB,IAAI,IAAI,QAAQ,UAAU,kBAAkB,GAAG,GAC7C,IAAI,QAAQ,QAAQ,SAAS;CAEjC;CAEA,SAAS,KAAK,QAAQ,SAAS;CAE/B,OAAO;EACL,MAAM;EACN,UAAU,SAAS;EACnB,UAAU,SAAS;CACrB;AACF"}
@@ -3,57 +3,45 @@ const require_rowExpandingFeature_utils = require('./rowExpandingFeature.utils.c
3
3
 
4
4
  //#region src/features/row-expanding/rowExpandingFeature.ts
5
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.
6
+ * Feature that adds row expansion state and APIs for expandable row trees.
9
7
  */
10
- function constructRowExpandingFeature() {
11
- return {
12
- getInitialState: (initialState) => {
13
- return {
14
- expanded: require_rowExpandingFeature_utils.getDefaultExpandedState(),
15
- ...initialState
16
- };
17
- },
18
- getDefaultTableOptions: (table) => {
19
- return {
20
- onExpandedChange: require_utils.makeStateUpdater("expanded", table),
21
- paginateExpandedRows: true
22
- };
23
- },
24
- assignRowPrototype: (prototype, table) => {
25
- require_utils.assignPrototypeAPIs("rowExpandingFeature", prototype, table, {
26
- row_toggleExpanded: { fn: (row, expanded) => require_rowExpandingFeature_utils.row_toggleExpanded(row, expanded) },
27
- row_getIsExpanded: { fn: (row) => require_rowExpandingFeature_utils.row_getIsExpanded(row) },
28
- row_getCanExpand: { fn: (row) => require_rowExpandingFeature_utils.row_getCanExpand(row) },
29
- row_getIsAllParentsExpanded: { fn: (row) => require_rowExpandingFeature_utils.row_getIsAllParentsExpanded(row) },
30
- row_getToggleExpandedHandler: { fn: (row) => require_rowExpandingFeature_utils.row_getToggleExpandedHandler(row) }
31
- });
32
- },
33
- constructTableAPIs: (table) => {
34
- require_utils.assignTableAPIs("rowExpandingFeature", table, {
35
- table_autoResetExpanded: { fn: () => require_rowExpandingFeature_utils.table_autoResetExpanded(table) },
36
- table_setExpanded: { fn: (updater) => require_rowExpandingFeature_utils.table_setExpanded(table, updater) },
37
- table_toggleAllRowsExpanded: { fn: (expanded) => require_rowExpandingFeature_utils.table_toggleAllRowsExpanded(table, expanded) },
38
- table_resetExpanded: { fn: (defaultState) => require_rowExpandingFeature_utils.table_resetExpanded(table, defaultState) },
39
- table_getCanSomeRowsExpand: { fn: () => require_rowExpandingFeature_utils.table_getCanSomeRowsExpand(table) },
40
- table_getToggleAllRowsExpandedHandler: { fn: () => require_rowExpandingFeature_utils.table_getToggleAllRowsExpandedHandler(table) },
41
- table_getIsSomeRowsExpanded: { fn: () => require_rowExpandingFeature_utils.table_getIsSomeRowsExpanded(table) },
42
- table_getIsAllRowsExpanded: { fn: () => require_rowExpandingFeature_utils.table_getIsAllRowsExpanded(table) },
43
- table_getExpandedDepth: { fn: () => require_rowExpandingFeature_utils.table_getExpandedDepth(table) }
44
- });
45
- }
46
- };
47
- }
48
- /**
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.
53
- */
54
- const rowExpandingFeature = constructRowExpandingFeature();
8
+ const rowExpandingFeature = {
9
+ getInitialState: (initialState) => {
10
+ return {
11
+ expanded: require_rowExpandingFeature_utils.getDefaultExpandedState(),
12
+ ...initialState
13
+ };
14
+ },
15
+ getDefaultTableOptions: (table) => {
16
+ return {
17
+ onExpandedChange: require_utils.makeStateUpdater("expanded", table),
18
+ paginateExpandedRows: true
19
+ };
20
+ },
21
+ assignRowPrototype: (prototype, table) => {
22
+ require_utils.assignPrototypeAPIs("rowExpandingFeature", prototype, table, {
23
+ row_toggleExpanded: { fn: (row, expanded) => require_rowExpandingFeature_utils.row_toggleExpanded(row, expanded) },
24
+ row_getIsExpanded: { fn: (row) => require_rowExpandingFeature_utils.row_getIsExpanded(row) },
25
+ row_getCanExpand: { fn: (row) => require_rowExpandingFeature_utils.row_getCanExpand(row) },
26
+ row_getIsAllParentsExpanded: { fn: (row) => require_rowExpandingFeature_utils.row_getIsAllParentsExpanded(row) },
27
+ row_getToggleExpandedHandler: { fn: (row) => require_rowExpandingFeature_utils.row_getToggleExpandedHandler(row) }
28
+ });
29
+ },
30
+ constructTableAPIs: (table) => {
31
+ require_utils.assignTableAPIs("rowExpandingFeature", table, {
32
+ table_autoResetExpanded: { fn: () => require_rowExpandingFeature_utils.table_autoResetExpanded(table) },
33
+ table_setExpanded: { fn: (updater) => require_rowExpandingFeature_utils.table_setExpanded(table, updater) },
34
+ table_toggleAllRowsExpanded: { fn: (expanded) => require_rowExpandingFeature_utils.table_toggleAllRowsExpanded(table, expanded) },
35
+ table_resetExpanded: { fn: (defaultState) => require_rowExpandingFeature_utils.table_resetExpanded(table, defaultState) },
36
+ table_getCanSomeRowsExpand: { fn: () => require_rowExpandingFeature_utils.table_getCanSomeRowsExpand(table) },
37
+ table_getToggleAllRowsExpandedHandler: { fn: () => require_rowExpandingFeature_utils.table_getToggleAllRowsExpandedHandler(table) },
38
+ table_getIsSomeRowsExpanded: { fn: () => require_rowExpandingFeature_utils.table_getIsSomeRowsExpanded(table) },
39
+ table_getIsAllRowsExpanded: { fn: () => require_rowExpandingFeature_utils.table_getIsAllRowsExpanded(table) },
40
+ table_getExpandedDepth: { fn: () => require_rowExpandingFeature_utils.table_getExpandedDepth(table) }
41
+ });
42
+ }
43
+ };
55
44
 
56
45
  //#endregion
57
- exports.constructRowExpandingFeature = constructRowExpandingFeature;
58
46
  exports.rowExpandingFeature = rowExpandingFeature;
59
47
  //# sourceMappingURL=rowExpandingFeature.cjs.map
@@ -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\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,0DAAwB;IAClC,GAAG;GACL;EACF;EAEA,yBAAyB,UAAU;GACjC,OAAO;IACL,kBAAkBC,+BAAiB,YAAY,KAAK;IACpD,sBAAsB;GACxB;EACF;EAEA,qBAAqB,WAAW,UAAU;GACxC,kCAAoB,uBAAuB,WAAW,OAAO;IAC3D,oBAAoB,EAClB,KAAK,KAAK,aAAaC,qDAAmB,KAAK,QAAQ,EACzD;IACA,mBAAmB,EACjB,KAAK,QAAQC,oDAAkB,GAAG,EACpC;IACA,kBAAkB,EAChB,KAAK,QAAQC,mDAAiB,GAAG,EACnC;IACA,6BAA6B,EAC3B,KAAK,QAAQC,8DAA4B,GAAG,EAC9C;IACA,8BAA8B,EAC5B,KAAK,QAAQC,+DAA6B,GAAG,EAC/C;GACF,CAAC;EACH;EAEA,qBAAqB,UAAU;GAC7B,8BAAgB,uBAAuB,OAAO;IAC5C,yBAAyB,EACvB,UAAUC,0DAAwB,KAAK,EACzC;IACA,mBAAmB,EACjB,KAAK,YAAYC,oDAAkB,OAAO,OAAO,EACnD;IACA,6BAA6B,EAC3B,KAAK,aAAaC,8DAA4B,OAAO,QAAQ,EAC/D;IACA,qBAAqB,EACnB,KAAK,iBAAiBC,sDAAoB,OAAO,YAAY,EAC/D;IACA,4BAA4B,EAC1B,UAAUC,6DAA2B,KAAK,EAC5C;IACA,uCAAuC,EACrC,UAAUC,wEAAsC,KAAK,EACvD;IACA,6BAA6B,EAC3B,UAAUC,8DAA4B,KAAK,EAC7C;IACA,4BAA4B,EAC1B,UAAUC,6DAA2B,KAAK,EAC5C;IACA,wBAAwB,EACtB,UAAUC,yDAAuB,KAAK,EACxC;GACF,CAAC;EACH;CACF;AACF;;;;;;;AAQA,MAAa,sBAAsB,6BAA6B"}
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 { TableFeature } from '../../types/TableFeatures'\n\n/**\n * Feature that adds row expansion state and APIs for expandable row trees.\n */\nexport const rowExpandingFeature: TableFeature = {\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"],"mappings":";;;;;;;AA2BA,MAAa,sBAAoC;CAC/C,kBAAkB,iBAAiB;EACjC,OAAO;GACL,UAAUA,0DAAwB;GAClC,GAAG;EACL;CACF;CAEA,yBAAyB,UAAU;EACjC,OAAO;GACL,kBAAkBC,+BAAiB,YAAY,KAAK;GACpD,sBAAsB;EACxB;CACF;CAEA,qBAAqB,WAAW,UAAU;EACxC,kCAAoB,uBAAuB,WAAW,OAAO;GAC3D,oBAAoB,EAClB,KAAK,KAAK,aAAaC,qDAAmB,KAAK,QAAQ,EACzD;GACA,mBAAmB,EACjB,KAAK,QAAQC,oDAAkB,GAAG,EACpC;GACA,kBAAkB,EAChB,KAAK,QAAQC,mDAAiB,GAAG,EACnC;GACA,6BAA6B,EAC3B,KAAK,QAAQC,8DAA4B,GAAG,EAC9C;GACA,8BAA8B,EAC5B,KAAK,QAAQC,+DAA6B,GAAG,EAC/C;EACF,CAAC;CACH;CAEA,qBAAqB,UAAU;EAC7B,8BAAgB,uBAAuB,OAAO;GAC5C,yBAAyB,EACvB,UAAUC,0DAAwB,KAAK,EACzC;GACA,mBAAmB,EACjB,KAAK,YAAYC,oDAAkB,OAAO,OAAO,EACnD;GACA,6BAA6B,EAC3B,KAAK,aAAaC,8DAA4B,OAAO,QAAQ,EAC/D;GACA,qBAAqB,EACnB,KAAK,iBAAiBC,sDAAoB,OAAO,YAAY,EAC/D;GACA,4BAA4B,EAC1B,UAAUC,6DAA2B,KAAK,EAC5C;GACA,uCAAuC,EACrC,UAAUC,wEAAsC,KAAK,EACvD;GACA,6BAA6B,EAC3B,UAAUC,8DAA4B,KAAK,EAC7C;GACA,4BAA4B,EAC1B,UAAUC,6DAA2B,KAAK,EAC5C;GACA,wBAAwB,EACtB,UAAUC,yDAAuB,KAAK,EACxC;EACF,CAAC;CACH;AACF"}
@@ -1,21 +1,10 @@
1
- import { RowData } from "../../types/type-utils.cjs";
2
- import { TableFeature, TableFeatures } from "../../types/TableFeatures.cjs";
1
+ import { TableFeature } from "../../types/TableFeatures.cjs";
3
2
 
4
3
  //#region src/features/row-expanding/rowExpandingFeature.d.ts
5
- interface RowExpandingFeatureConstructors<TFeatures extends TableFeatures, TData extends RowData> {}
6
4
  /**
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.
5
+ * Feature that adds row expansion state and APIs for expandable row trees.
10
6
  */
11
- declare function constructRowExpandingFeature<TFeatures extends TableFeatures, TData extends RowData>(): TableFeature<RowExpandingFeatureConstructors<TFeatures, TData>>;
12
- /**
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.
17
- */
18
- declare const rowExpandingFeature: TableFeature<RowExpandingFeatureConstructors<TableFeatures, RowData>>;
7
+ declare const rowExpandingFeature: TableFeature;
19
8
  //#endregion
20
- export { RowExpandingFeatureConstructors, constructRowExpandingFeature, rowExpandingFeature };
9
+ export { rowExpandingFeature };
21
10
  //# sourceMappingURL=rowExpandingFeature.d.cts.map
@@ -1,21 +1,10 @@
1
- import { RowData } from "../../types/type-utils.js";
2
- import { TableFeature, TableFeatures } from "../../types/TableFeatures.js";
1
+ import { TableFeature } from "../../types/TableFeatures.js";
3
2
 
4
3
  //#region src/features/row-expanding/rowExpandingFeature.d.ts
5
- interface RowExpandingFeatureConstructors<TFeatures extends TableFeatures, TData extends RowData> {}
6
4
  /**
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.
5
+ * Feature that adds row expansion state and APIs for expandable row trees.
10
6
  */
11
- declare function constructRowExpandingFeature<TFeatures extends TableFeatures, TData extends RowData>(): TableFeature<RowExpandingFeatureConstructors<TFeatures, TData>>;
12
- /**
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.
17
- */
18
- declare const rowExpandingFeature: TableFeature<RowExpandingFeatureConstructors<TableFeatures, RowData>>;
7
+ declare const rowExpandingFeature: TableFeature;
19
8
  //#endregion
20
- export { RowExpandingFeatureConstructors, constructRowExpandingFeature, rowExpandingFeature };
9
+ export { rowExpandingFeature };
21
10
  //# sourceMappingURL=rowExpandingFeature.d.ts.map
@@ -3,56 +3,45 @@ import { getDefaultExpandedState, row_getCanExpand, row_getIsAllParentsExpanded,
3
3
 
4
4
  //#region src/features/row-expanding/rowExpandingFeature.ts
5
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.
6
+ * Feature that adds row expansion state and APIs for expandable row trees.
9
7
  */
10
- function constructRowExpandingFeature() {
11
- return {
12
- getInitialState: (initialState) => {
13
- return {
14
- expanded: getDefaultExpandedState(),
15
- ...initialState
16
- };
17
- },
18
- getDefaultTableOptions: (table) => {
19
- return {
20
- onExpandedChange: makeStateUpdater("expanded", table),
21
- paginateExpandedRows: true
22
- };
23
- },
24
- assignRowPrototype: (prototype, table) => {
25
- assignPrototypeAPIs("rowExpandingFeature", prototype, table, {
26
- row_toggleExpanded: { fn: (row, expanded) => row_toggleExpanded(row, expanded) },
27
- row_getIsExpanded: { fn: (row) => row_getIsExpanded(row) },
28
- row_getCanExpand: { fn: (row) => row_getCanExpand(row) },
29
- row_getIsAllParentsExpanded: { fn: (row) => row_getIsAllParentsExpanded(row) },
30
- row_getToggleExpandedHandler: { fn: (row) => row_getToggleExpandedHandler(row) }
31
- });
32
- },
33
- constructTableAPIs: (table) => {
34
- assignTableAPIs("rowExpandingFeature", table, {
35
- table_autoResetExpanded: { fn: () => table_autoResetExpanded(table) },
36
- table_setExpanded: { fn: (updater) => table_setExpanded(table, updater) },
37
- table_toggleAllRowsExpanded: { fn: (expanded) => table_toggleAllRowsExpanded(table, expanded) },
38
- table_resetExpanded: { fn: (defaultState) => table_resetExpanded(table, defaultState) },
39
- table_getCanSomeRowsExpand: { fn: () => table_getCanSomeRowsExpand(table) },
40
- table_getToggleAllRowsExpandedHandler: { fn: () => table_getToggleAllRowsExpandedHandler(table) },
41
- table_getIsSomeRowsExpanded: { fn: () => table_getIsSomeRowsExpanded(table) },
42
- table_getIsAllRowsExpanded: { fn: () => table_getIsAllRowsExpanded(table) },
43
- table_getExpandedDepth: { fn: () => table_getExpandedDepth(table) }
44
- });
45
- }
46
- };
47
- }
48
- /**
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.
53
- */
54
- const rowExpandingFeature = constructRowExpandingFeature();
8
+ const rowExpandingFeature = {
9
+ getInitialState: (initialState) => {
10
+ return {
11
+ expanded: getDefaultExpandedState(),
12
+ ...initialState
13
+ };
14
+ },
15
+ getDefaultTableOptions: (table) => {
16
+ return {
17
+ onExpandedChange: makeStateUpdater("expanded", table),
18
+ paginateExpandedRows: true
19
+ };
20
+ },
21
+ assignRowPrototype: (prototype, table) => {
22
+ assignPrototypeAPIs("rowExpandingFeature", prototype, table, {
23
+ row_toggleExpanded: { fn: (row, expanded) => row_toggleExpanded(row, expanded) },
24
+ row_getIsExpanded: { fn: (row) => row_getIsExpanded(row) },
25
+ row_getCanExpand: { fn: (row) => row_getCanExpand(row) },
26
+ row_getIsAllParentsExpanded: { fn: (row) => row_getIsAllParentsExpanded(row) },
27
+ row_getToggleExpandedHandler: { fn: (row) => row_getToggleExpandedHandler(row) }
28
+ });
29
+ },
30
+ constructTableAPIs: (table) => {
31
+ assignTableAPIs("rowExpandingFeature", table, {
32
+ table_autoResetExpanded: { fn: () => table_autoResetExpanded(table) },
33
+ table_setExpanded: { fn: (updater) => table_setExpanded(table, updater) },
34
+ table_toggleAllRowsExpanded: { fn: (expanded) => table_toggleAllRowsExpanded(table, expanded) },
35
+ table_resetExpanded: { fn: (defaultState) => table_resetExpanded(table, defaultState) },
36
+ table_getCanSomeRowsExpand: { fn: () => table_getCanSomeRowsExpand(table) },
37
+ table_getToggleAllRowsExpandedHandler: { fn: () => table_getToggleAllRowsExpandedHandler(table) },
38
+ table_getIsSomeRowsExpanded: { fn: () => table_getIsSomeRowsExpanded(table) },
39
+ table_getIsAllRowsExpanded: { fn: () => table_getIsAllRowsExpanded(table) },
40
+ table_getExpandedDepth: { fn: () => table_getExpandedDepth(table) }
41
+ });
42
+ }
43
+ };
55
44
 
56
45
  //#endregion
57
- export { constructRowExpandingFeature, rowExpandingFeature };
46
+ export { rowExpandingFeature };
58
47
  //# sourceMappingURL=rowExpandingFeature.js.map
@@ -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\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,wBAAwB;IAClC,GAAG;GACL;EACF;EAEA,yBAAyB,UAAU;GACjC,OAAO;IACL,kBAAkB,iBAAiB,YAAY,KAAK;IACpD,sBAAsB;GACxB;EACF;EAEA,qBAAqB,WAAW,UAAU;GACxC,oBAAoB,uBAAuB,WAAW,OAAO;IAC3D,oBAAoB,EAClB,KAAK,KAAK,aAAa,mBAAmB,KAAK,QAAQ,EACzD;IACA,mBAAmB,EACjB,KAAK,QAAQ,kBAAkB,GAAG,EACpC;IACA,kBAAkB,EAChB,KAAK,QAAQ,iBAAiB,GAAG,EACnC;IACA,6BAA6B,EAC3B,KAAK,QAAQ,4BAA4B,GAAG,EAC9C;IACA,8BAA8B,EAC5B,KAAK,QAAQ,6BAA6B,GAAG,EAC/C;GACF,CAAC;EACH;EAEA,qBAAqB,UAAU;GAC7B,gBAAgB,uBAAuB,OAAO;IAC5C,yBAAyB,EACvB,UAAU,wBAAwB,KAAK,EACzC;IACA,mBAAmB,EACjB,KAAK,YAAY,kBAAkB,OAAO,OAAO,EACnD;IACA,6BAA6B,EAC3B,KAAK,aAAa,4BAA4B,OAAO,QAAQ,EAC/D;IACA,qBAAqB,EACnB,KAAK,iBAAiB,oBAAoB,OAAO,YAAY,EAC/D;IACA,4BAA4B,EAC1B,UAAU,2BAA2B,KAAK,EAC5C;IACA,uCAAuC,EACrC,UAAU,sCAAsC,KAAK,EACvD;IACA,6BAA6B,EAC3B,UAAU,4BAA4B,KAAK,EAC7C;IACA,4BAA4B,EAC1B,UAAU,2BAA2B,KAAK,EAC5C;IACA,wBAAwB,EACtB,UAAU,uBAAuB,KAAK,EACxC;GACF,CAAC;EACH;CACF;AACF;;;;;;;AAQA,MAAa,sBAAsB,6BAA6B"}
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 { TableFeature } from '../../types/TableFeatures'\n\n/**\n * Feature that adds row expansion state and APIs for expandable row trees.\n */\nexport const rowExpandingFeature: TableFeature = {\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"],"mappings":";;;;;;;AA2BA,MAAa,sBAAoC;CAC/C,kBAAkB,iBAAiB;EACjC,OAAO;GACL,UAAU,wBAAwB;GAClC,GAAG;EACL;CACF;CAEA,yBAAyB,UAAU;EACjC,OAAO;GACL,kBAAkB,iBAAiB,YAAY,KAAK;GACpD,sBAAsB;EACxB;CACF;CAEA,qBAAqB,WAAW,UAAU;EACxC,oBAAoB,uBAAuB,WAAW,OAAO;GAC3D,oBAAoB,EAClB,KAAK,KAAK,aAAa,mBAAmB,KAAK,QAAQ,EACzD;GACA,mBAAmB,EACjB,KAAK,QAAQ,kBAAkB,GAAG,EACpC;GACA,kBAAkB,EAChB,KAAK,QAAQ,iBAAiB,GAAG,EACnC;GACA,6BAA6B,EAC3B,KAAK,QAAQ,4BAA4B,GAAG,EAC9C;GACA,8BAA8B,EAC5B,KAAK,QAAQ,6BAA6B,GAAG,EAC/C;EACF,CAAC;CACH;CAEA,qBAAqB,UAAU;EAC7B,gBAAgB,uBAAuB,OAAO;GAC5C,yBAAyB,EACvB,UAAU,wBAAwB,KAAK,EACzC;GACA,mBAAmB,EACjB,KAAK,YAAY,kBAAkB,OAAO,OAAO,EACnD;GACA,6BAA6B,EAC3B,KAAK,aAAa,4BAA4B,OAAO,QAAQ,EAC/D;GACA,qBAAqB,EACnB,KAAK,iBAAiB,oBAAoB,OAAO,YAAY,EAC/D;GACA,4BAA4B,EAC1B,UAAU,2BAA2B,KAAK,EAC5C;GACA,uCAAuC,EACrC,UAAU,sCAAsC,KAAK,EACvD;GACA,6BAA6B,EAC3B,UAAU,4BAA4B,KAAK,EAC7C;GACA,4BAA4B,EAC1B,UAAU,2BAA2B,KAAK,EAC5C;GACA,wBAAwB,EACtB,UAAU,uBAAuB,KAAK,EACxC;EACF,CAAC;CACH;AACF"}
@@ -1,7 +1,6 @@
1
1
  import { OnChangeFn, RowData, Updater } from "../../types/type-utils.cjs";
2
2
  import { Row } from "../../types/Row.cjs";
3
3
  import { TableFeatures } from "../../types/TableFeatures.cjs";
4
- import { Table } from "../../types/Table.cjs";
5
4
  import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.cjs";
6
5
 
7
6
  //#region src/features/row-expanding/rowExpandingFeature.types.d.ts
@@ -111,17 +110,9 @@ interface Table_RowModels_Expanded<TFeatures extends TableFeatures, TData extend
111
110
  */
112
111
  getPreExpandedRowModel: () => RowModel<TFeatures, TData>;
113
112
  }
114
- interface CreateRowModel_Expanded<TFeatures extends TableFeatures, TData extends RowData> {
115
- /**
116
- * Factory used to retrieve the expanded row model. If this function is not
117
- * provided, the table will not expand rows. To use client-side expansion,
118
- * pass `createExpandedRowModel()` or implement your own factory.
119
- */
120
- expandedRowModel?: (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData>;
121
- }
122
113
  interface CachedRowModel_Expanded<TFeatures extends TableFeatures, TData extends RowData> {
123
114
  expandedRowModel: () => RowModel<TFeatures, TData>;
124
115
  }
125
116
  //#endregion
126
- export { CachedRowModel_Expanded, CreateRowModel_Expanded, ExpandedState, ExpandedStateList, Row_RowExpanding, TableOptions_RowExpanding, TableState_RowExpanding, Table_RowExpanding, Table_RowModels_Expanded };
117
+ export { CachedRowModel_Expanded, ExpandedState, ExpandedStateList, Row_RowExpanding, TableOptions_RowExpanding, TableState_RowExpanding, Table_RowExpanding, Table_RowModels_Expanded };
127
118
  //# sourceMappingURL=rowExpandingFeature.types.d.cts.map
@@ -1,7 +1,6 @@
1
1
  import { OnChangeFn, RowData, Updater } from "../../types/type-utils.js";
2
2
  import { Row } from "../../types/Row.js";
3
3
  import { TableFeatures } from "../../types/TableFeatures.js";
4
- import { Table } from "../../types/Table.js";
5
4
  import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.js";
6
5
 
7
6
  //#region src/features/row-expanding/rowExpandingFeature.types.d.ts
@@ -111,17 +110,9 @@ interface Table_RowModels_Expanded<TFeatures extends TableFeatures, TData extend
111
110
  */
112
111
  getPreExpandedRowModel: () => RowModel<TFeatures, TData>;
113
112
  }
114
- interface CreateRowModel_Expanded<TFeatures extends TableFeatures, TData extends RowData> {
115
- /**
116
- * Factory used to retrieve the expanded row model. If this function is not
117
- * provided, the table will not expand rows. To use client-side expansion,
118
- * pass `createExpandedRowModel()` or implement your own factory.
119
- */
120
- expandedRowModel?: (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData>;
121
- }
122
113
  interface CachedRowModel_Expanded<TFeatures extends TableFeatures, TData extends RowData> {
123
114
  expandedRowModel: () => RowModel<TFeatures, TData>;
124
115
  }
125
116
  //#endregion
126
- export { CachedRowModel_Expanded, CreateRowModel_Expanded, ExpandedState, ExpandedStateList, Row_RowExpanding, TableOptions_RowExpanding, TableState_RowExpanding, Table_RowExpanding, Table_RowModels_Expanded };
117
+ export { CachedRowModel_Expanded, ExpandedState, ExpandedStateList, Row_RowExpanding, TableOptions_RowExpanding, TableState_RowExpanding, Table_RowExpanding, Table_RowModels_Expanded };
127
118
  //# sourceMappingURL=rowExpandingFeature.types.d.ts.map
@@ -1,8 +1,8 @@
1
1
  import { RowData, Updater } from "../../types/type-utils.cjs";
2
2
  import { ExpandedState } from "./rowExpandingFeature.types.cjs";
3
3
  import { Row } from "../../types/Row.cjs";
4
- import { TableFeatures } from "../../types/TableFeatures.cjs";
5
4
  import { Table_Internal } from "../../types/Table.cjs";
5
+ import { TableFeatures } from "../../types/TableFeatures.cjs";
6
6
 
7
7
  //#region src/features/row-expanding/rowExpandingFeature.utils.d.ts
8
8
  /**