@tanstack/table-core 8.19.2 → 9.0.0-alpha.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 (302) hide show
  1. package/dist/cjs/aggregationFns.cjs +94 -0
  2. package/dist/cjs/aggregationFns.cjs.map +1 -0
  3. package/dist/cjs/aggregationFns.d.cts +14 -0
  4. package/dist/cjs/columnHelper.cjs +19 -0
  5. package/dist/cjs/columnHelper.cjs.map +1 -0
  6. package/dist/cjs/columnHelper.d.cts +9 -0
  7. package/dist/cjs/core/cell.cjs +38 -0
  8. package/dist/cjs/core/cell.cjs.map +1 -0
  9. package/dist/cjs/core/cell.d.cts +50 -0
  10. package/dist/cjs/core/column.cjs +81 -0
  11. package/dist/cjs/core/column.cjs.map +1 -0
  12. package/dist/cjs/core/column.d.cts +56 -0
  13. package/dist/cjs/core/headers.cjs +310 -0
  14. package/dist/cjs/core/headers.cjs.map +1 -0
  15. package/dist/cjs/core/headers.d.cts +195 -0
  16. package/dist/cjs/core/row.cjs +92 -0
  17. package/dist/cjs/core/row.cjs.map +1 -0
  18. package/dist/cjs/core/row.d.cts +92 -0
  19. package/dist/cjs/core/table.cjs +232 -0
  20. package/dist/cjs/core/table.cjs.map +1 -0
  21. package/dist/cjs/core/table.d.cts +229 -0
  22. package/dist/cjs/features/ColumnFaceting.cjs +29 -0
  23. package/dist/cjs/features/ColumnFaceting.cjs.map +1 -0
  24. package/dist/cjs/features/ColumnFaceting.d.cts +35 -0
  25. package/dist/cjs/features/ColumnFiltering.cjs +137 -0
  26. package/dist/cjs/features/ColumnFiltering.cjs.map +1 -0
  27. package/dist/cjs/features/ColumnFiltering.d.cts +195 -0
  28. package/dist/cjs/features/ColumnGrouping.cjs +133 -0
  29. package/dist/cjs/features/ColumnGrouping.cjs.map +1 -0
  30. package/dist/cjs/features/ColumnGrouping.d.cts +202 -0
  31. package/dist/cjs/features/ColumnOrdering.cjs +76 -0
  32. package/dist/cjs/features/ColumnOrdering.cjs.map +1 -0
  33. package/dist/cjs/features/ColumnOrdering.d.cts +54 -0
  34. package/dist/cjs/features/ColumnPinning.cjs +145 -0
  35. package/dist/cjs/features/ColumnPinning.cjs.map +1 -0
  36. package/dist/cjs/features/ColumnPinning.d.cts +127 -0
  37. package/dist/cjs/features/ColumnSizing.cjs +307 -0
  38. package/dist/cjs/features/ColumnSizing.cjs.map +1 -0
  39. package/dist/cjs/features/ColumnSizing.d.cts +194 -0
  40. package/dist/cjs/features/ColumnVisibility.cjs +144 -0
  41. package/dist/cjs/features/ColumnVisibility.cjs.map +1 -0
  42. package/dist/cjs/features/ColumnVisibility.d.cts +130 -0
  43. package/dist/cjs/features/GlobalFaceting.cjs +29 -0
  44. package/dist/cjs/features/GlobalFaceting.cjs.map +1 -0
  45. package/dist/cjs/features/GlobalFaceting.d.cts +27 -0
  46. package/dist/cjs/features/GlobalFiltering.cjs +50 -0
  47. package/dist/cjs/features/GlobalFiltering.cjs.map +1 -0
  48. package/dist/cjs/features/GlobalFiltering.d.cts +80 -0
  49. package/dist/cjs/features/RowExpanding.cjs +152 -0
  50. package/dist/cjs/features/RowExpanding.cjs.map +1 -0
  51. package/dist/cjs/features/RowExpanding.d.cts +155 -0
  52. package/dist/cjs/features/RowPagination.cjs +161 -0
  53. package/dist/cjs/features/RowPagination.cjs.map +1 -0
  54. package/dist/cjs/features/RowPagination.d.cts +166 -0
  55. package/dist/cjs/features/RowPinning.cjs +132 -0
  56. package/dist/cjs/features/RowPinning.cjs.map +1 -0
  57. package/dist/cjs/features/RowPinning.d.cts +99 -0
  58. package/dist/cjs/features/RowSelection.cjs +296 -0
  59. package/dist/cjs/features/RowSelection.cjs.map +1 -0
  60. package/dist/cjs/features/RowSelection.d.cts +177 -0
  61. package/dist/cjs/features/RowSorting.cjs +200 -0
  62. package/dist/cjs/features/RowSorting.cjs.map +1 -0
  63. package/dist/cjs/features/RowSorting.d.cts +238 -0
  64. package/dist/cjs/filterFns.cjs +88 -0
  65. package/dist/cjs/filterFns.cjs.map +1 -0
  66. package/dist/cjs/filterFns.d.cts +14 -0
  67. package/{build/lib/index.js → dist/cjs/index.cjs} +41 -53
  68. package/dist/cjs/index.cjs.map +1 -0
  69. package/dist/cjs/index.d.cts +34 -0
  70. package/{build/lib/sortingFns.js → dist/cjs/sortingFns.cjs} +23 -52
  71. package/dist/cjs/sortingFns.cjs.map +1 -0
  72. package/dist/cjs/sortingFns.d.cts +12 -0
  73. package/dist/cjs/types.d.cts +120 -0
  74. package/{build/lib/utils/filterRowsUtils.js → dist/cjs/utils/filterRowsUtils.cjs} +34 -46
  75. package/dist/cjs/utils/filterRowsUtils.cjs.map +1 -0
  76. package/dist/cjs/utils/filterRowsUtils.d.cts +3 -0
  77. package/dist/cjs/utils/getCoreRowModel.cjs +54 -0
  78. package/dist/cjs/utils/getCoreRowModel.cjs.map +1 -0
  79. package/dist/cjs/utils/getCoreRowModel.d.cts +3 -0
  80. package/dist/cjs/utils/getExpandedRowModel.cjs +41 -0
  81. package/dist/cjs/utils/getExpandedRowModel.cjs.map +1 -0
  82. package/dist/cjs/utils/getExpandedRowModel.d.cts +8 -0
  83. package/dist/cjs/utils/getFacetedMinMaxValues.cjs +35 -0
  84. package/dist/cjs/utils/getFacetedMinMaxValues.cjs.map +1 -0
  85. package/dist/cjs/utils/getFacetedMinMaxValues.d.cts +3 -0
  86. package/dist/cjs/utils/getFacetedRowModel.cjs +35 -0
  87. package/dist/cjs/utils/getFacetedRowModel.cjs.map +1 -0
  88. package/dist/cjs/utils/getFacetedRowModel.d.cts +3 -0
  89. package/dist/cjs/utils/getFacetedUniqueValues.cjs +37 -0
  90. package/dist/cjs/utils/getFacetedUniqueValues.cjs.map +1 -0
  91. package/dist/cjs/utils/getFacetedUniqueValues.d.cts +3 -0
  92. package/dist/cjs/utils/getFilteredRowModel.cjs +116 -0
  93. package/dist/cjs/utils/getFilteredRowModel.cjs.map +1 -0
  94. package/dist/cjs/utils/getFilteredRowModel.d.cts +3 -0
  95. package/dist/cjs/utils/getGroupedRowModel.cjs +118 -0
  96. package/dist/cjs/utils/getGroupedRowModel.cjs.map +1 -0
  97. package/dist/cjs/utils/getGroupedRowModel.d.cts +3 -0
  98. package/dist/cjs/utils/getPaginationRowModel.cjs +49 -0
  99. package/dist/cjs/utils/getPaginationRowModel.cjs.map +1 -0
  100. package/dist/cjs/utils/getPaginationRowModel.d.cts +5 -0
  101. package/dist/cjs/utils/getSortedRowModel.cjs +88 -0
  102. package/dist/cjs/utils/getSortedRowModel.cjs.map +1 -0
  103. package/dist/cjs/utils/getSortedRowModel.d.cts +3 -0
  104. package/{build/lib/utils.js → dist/cjs/utils.cjs} +26 -39
  105. package/dist/cjs/utils.cjs.map +1 -0
  106. package/dist/cjs/utils.d.cts +39 -0
  107. package/{build/lib → dist/esm}/aggregationFns.d.ts +2 -1
  108. package/dist/esm/aggregationFns.js +94 -0
  109. package/dist/esm/aggregationFns.js.map +1 -0
  110. package/{build/lib → dist/esm}/columnHelper.d.ts +3 -2
  111. package/dist/esm/columnHelper.js +19 -0
  112. package/{build/lib → dist/esm}/columnHelper.js.map +1 -1
  113. package/{build/lib → dist/esm}/core/cell.d.ts +2 -1
  114. package/dist/esm/core/cell.js +38 -0
  115. package/dist/esm/core/cell.js.map +1 -0
  116. package/{build/lib → dist/esm}/core/column.d.ts +2 -1
  117. package/dist/esm/core/column.js +81 -0
  118. package/dist/esm/core/column.js.map +1 -0
  119. package/{build/lib → dist/esm}/core/headers.d.ts +1 -0
  120. package/dist/esm/core/headers.js +310 -0
  121. package/dist/esm/core/headers.js.map +1 -0
  122. package/{build/lib → dist/esm}/core/row.d.ts +2 -1
  123. package/dist/esm/core/row.js +92 -0
  124. package/dist/esm/core/row.js.map +1 -0
  125. package/{build/lib → dist/esm}/core/table.d.ts +10 -1
  126. package/dist/esm/core/table.js +232 -0
  127. package/dist/esm/core/table.js.map +1 -0
  128. package/{build/lib → dist/esm}/features/ColumnFaceting.d.ts +1 -0
  129. package/{build/lib → dist/esm}/features/ColumnFaceting.js +6 -19
  130. package/{build/lib → dist/esm}/features/ColumnFaceting.js.map +1 -1
  131. package/{build/lib → dist/esm}/features/ColumnFiltering.d.ts +1 -0
  132. package/dist/esm/features/ColumnFiltering.js +137 -0
  133. package/dist/esm/features/ColumnFiltering.js.map +1 -0
  134. package/{build/lib → dist/esm}/features/ColumnGrouping.d.ts +1 -0
  135. package/dist/esm/features/ColumnGrouping.js +133 -0
  136. package/dist/esm/features/ColumnGrouping.js.map +1 -0
  137. package/{build/lib → dist/esm}/features/ColumnOrdering.d.ts +1 -0
  138. package/dist/esm/features/ColumnOrdering.js +76 -0
  139. package/dist/esm/features/ColumnOrdering.js.map +1 -0
  140. package/{build/lib → dist/esm}/features/ColumnPinning.d.ts +1 -0
  141. package/dist/esm/features/ColumnPinning.js +145 -0
  142. package/dist/esm/features/ColumnPinning.js.map +1 -0
  143. package/{build/lib → dist/esm}/features/ColumnSizing.d.ts +2 -1
  144. package/dist/esm/features/ColumnSizing.js +307 -0
  145. package/dist/esm/features/ColumnSizing.js.map +1 -0
  146. package/{build/lib → dist/esm}/features/ColumnVisibility.d.ts +1 -0
  147. package/dist/esm/features/ColumnVisibility.js +144 -0
  148. package/dist/esm/features/ColumnVisibility.js.map +1 -0
  149. package/{build/lib → dist/esm}/features/GlobalFaceting.d.ts +1 -0
  150. package/{build/lib → dist/esm}/features/GlobalFaceting.js +8 -21
  151. package/dist/esm/features/GlobalFaceting.js.map +1 -0
  152. package/{build/lib → dist/esm}/features/GlobalFiltering.d.ts +1 -0
  153. package/dist/esm/features/GlobalFiltering.js +50 -0
  154. package/dist/esm/features/GlobalFiltering.js.map +1 -0
  155. package/{build/lib → dist/esm}/features/RowExpanding.d.ts +1 -0
  156. package/{build/lib → dist/esm}/features/RowExpanding.js +37 -58
  157. package/dist/esm/features/RowExpanding.js.map +1 -0
  158. package/{build/lib → dist/esm}/features/RowPagination.d.ts +1 -0
  159. package/dist/esm/features/RowPagination.js +161 -0
  160. package/dist/esm/features/RowPagination.js.map +1 -0
  161. package/{build/lib → dist/esm}/features/RowPinning.d.ts +1 -0
  162. package/dist/esm/features/RowPinning.js +132 -0
  163. package/dist/esm/features/RowPinning.js.map +1 -0
  164. package/{build/lib → dist/esm}/features/RowSelection.d.ts +1 -0
  165. package/dist/esm/features/RowSelection.js +296 -0
  166. package/dist/esm/features/RowSelection.js.map +1 -0
  167. package/{build/lib → dist/esm}/features/RowSorting.d.ts +1 -0
  168. package/dist/esm/features/RowSorting.js +200 -0
  169. package/dist/esm/features/RowSorting.js.map +1 -0
  170. package/{build/lib → dist/esm}/filterFns.d.ts +2 -1
  171. package/dist/esm/filterFns.js +88 -0
  172. package/dist/esm/filterFns.js.map +1 -0
  173. package/dist/esm/index.d.ts +34 -0
  174. package/dist/esm/index.js +88 -0
  175. package/dist/esm/index.js.map +1 -0
  176. package/{build/lib → dist/esm}/sortingFns.d.ts +2 -1
  177. package/dist/esm/sortingFns.js +91 -0
  178. package/dist/esm/sortingFns.js.map +1 -0
  179. package/{build/lib → dist/esm}/types.d.ts +29 -28
  180. package/{build/lib → dist/esm}/utils/filterRowsUtils.d.ts +1 -0
  181. package/dist/esm/utils/filterRowsUtils.js +99 -0
  182. package/dist/esm/utils/filterRowsUtils.js.map +1 -0
  183. package/{build/lib → dist/esm}/utils/getCoreRowModel.d.ts +1 -0
  184. package/dist/esm/utils/getCoreRowModel.js +54 -0
  185. package/dist/esm/utils/getCoreRowModel.js.map +1 -0
  186. package/{build/lib → dist/esm}/utils/getExpandedRowModel.d.ts +1 -0
  187. package/dist/esm/utils/getExpandedRowModel.js +41 -0
  188. package/dist/esm/utils/getExpandedRowModel.js.map +1 -0
  189. package/{build/lib → dist/esm}/utils/getFacetedMinMaxValues.d.ts +1 -0
  190. package/dist/esm/utils/getFacetedMinMaxValues.js +35 -0
  191. package/dist/esm/utils/getFacetedMinMaxValues.js.map +1 -0
  192. package/{build/lib → dist/esm}/utils/getFacetedRowModel.d.ts +1 -0
  193. package/dist/esm/utils/getFacetedRowModel.js +35 -0
  194. package/{build/lib → dist/esm}/utils/getFacetedRowModel.js.map +1 -1
  195. package/{build/lib → dist/esm}/utils/getFacetedUniqueValues.d.ts +1 -0
  196. package/dist/esm/utils/getFacetedUniqueValues.js +37 -0
  197. package/dist/esm/utils/getFacetedUniqueValues.js.map +1 -0
  198. package/{build/lib → dist/esm}/utils/getFilteredRowModel.d.ts +1 -0
  199. package/dist/esm/utils/getFilteredRowModel.js +116 -0
  200. package/{build/lib → dist/esm}/utils/getFilteredRowModel.js.map +1 -1
  201. package/{build/lib → dist/esm}/utils/getGroupedRowModel.d.ts +1 -0
  202. package/dist/esm/utils/getGroupedRowModel.js +118 -0
  203. package/dist/esm/utils/getGroupedRowModel.js.map +1 -0
  204. package/{build/lib → dist/esm}/utils/getPaginationRowModel.d.ts +1 -0
  205. package/dist/esm/utils/getPaginationRowModel.js +49 -0
  206. package/dist/esm/utils/getPaginationRowModel.js.map +1 -0
  207. package/{build/lib → dist/esm}/utils/getSortedRowModel.d.ts +1 -0
  208. package/dist/esm/utils/getSortedRowModel.js +88 -0
  209. package/{build/lib → dist/esm}/utils/getSortedRowModel.js.map +1 -1
  210. package/{build/lib → dist/esm}/utils.d.ts +2 -1
  211. package/dist/esm/utils.js +98 -0
  212. package/{build/lib → dist/esm}/utils.js.map +1 -1
  213. package/package.json +14 -10
  214. package/src/core/cell.ts +2 -2
  215. package/src/core/column.ts +2 -2
  216. package/src/core/headers.ts +5 -5
  217. package/src/core/row.ts +4 -4
  218. package/src/core/table.ts +43 -7
  219. package/src/features/ColumnFaceting.ts +1 -1
  220. package/src/features/ColumnFiltering.ts +6 -6
  221. package/src/features/ColumnGrouping.ts +7 -7
  222. package/src/features/ColumnOrdering.ts +4 -4
  223. package/src/features/ColumnPinning.ts +5 -5
  224. package/src/features/ColumnSizing.ts +6 -6
  225. package/src/features/ColumnVisibility.ts +5 -5
  226. package/src/features/GlobalFaceting.ts +1 -1
  227. package/src/features/GlobalFiltering.ts +4 -4
  228. package/src/features/RowExpanding.ts +4 -4
  229. package/src/features/RowPagination.ts +3 -3
  230. package/src/features/RowPinning.ts +4 -4
  231. package/src/features/RowSelection.ts +4 -4
  232. package/src/features/RowSorting.ts +5 -5
  233. package/src/types.ts +8 -8
  234. package/src/utils/filterRowsUtils.ts +3 -3
  235. package/src/utils/getCoreRowModel.ts +2 -2
  236. package/src/utils/getGroupedRowModel.ts +2 -2
  237. package/build/lib/aggregationFns.js +0 -108
  238. package/build/lib/aggregationFns.js.map +0 -1
  239. package/build/lib/columnHelper.js +0 -71
  240. package/build/lib/core/cell.js +0 -42
  241. package/build/lib/core/cell.js.map +0 -1
  242. package/build/lib/core/column.js +0 -80
  243. package/build/lib/core/column.js.map +0 -1
  244. package/build/lib/core/headers.js +0 -270
  245. package/build/lib/core/headers.js.map +0 -1
  246. package/build/lib/core/row.js +0 -89
  247. package/build/lib/core/row.js.map +0 -1
  248. package/build/lib/core/table.js +0 -212
  249. package/build/lib/core/table.js.map +0 -1
  250. package/build/lib/features/ColumnFiltering.js +0 -151
  251. package/build/lib/features/ColumnFiltering.js.map +0 -1
  252. package/build/lib/features/ColumnGrouping.js +0 -142
  253. package/build/lib/features/ColumnGrouping.js.map +0 -1
  254. package/build/lib/features/ColumnOrdering.js +0 -84
  255. package/build/lib/features/ColumnOrdering.js.map +0 -1
  256. package/build/lib/features/ColumnPinning.js +0 -130
  257. package/build/lib/features/ColumnPinning.js.map +0 -1
  258. package/build/lib/features/ColumnSizing.js +0 -270
  259. package/build/lib/features/ColumnSizing.js.map +0 -1
  260. package/build/lib/features/ColumnVisibility.js +0 -99
  261. package/build/lib/features/ColumnVisibility.js.map +0 -1
  262. package/build/lib/features/GlobalFaceting.js.map +0 -1
  263. package/build/lib/features/GlobalFiltering.js +0 -63
  264. package/build/lib/features/GlobalFiltering.js.map +0 -1
  265. package/build/lib/features/RowExpanding.js.map +0 -1
  266. package/build/lib/features/RowPagination.js +0 -169
  267. package/build/lib/features/RowPagination.js.map +0 -1
  268. package/build/lib/features/RowPinning.js +0 -145
  269. package/build/lib/features/RowPinning.js.map +0 -1
  270. package/build/lib/features/RowSelection.js +0 -391
  271. package/build/lib/features/RowSelection.js.map +0 -1
  272. package/build/lib/features/RowSorting.js +0 -226
  273. package/build/lib/features/RowSorting.js.map +0 -1
  274. package/build/lib/filterFns.js +0 -96
  275. package/build/lib/filterFns.js.map +0 -1
  276. package/build/lib/index.d.ts +0 -34
  277. package/build/lib/index.esm.js +0 -3522
  278. package/build/lib/index.esm.js.map +0 -1
  279. package/build/lib/index.js.map +0 -1
  280. package/build/lib/index.mjs +0 -3522
  281. package/build/lib/index.mjs.map +0 -1
  282. package/build/lib/sortingFns.js.map +0 -1
  283. package/build/lib/utils/filterRowsUtils.js.map +0 -1
  284. package/build/lib/utils/getCoreRowModel.js +0 -65
  285. package/build/lib/utils/getCoreRowModel.js.map +0 -1
  286. package/build/lib/utils/getExpandedRowModel.js +0 -46
  287. package/build/lib/utils/getExpandedRowModel.js.map +0 -1
  288. package/build/lib/utils/getFacetedMinMaxValues.js +0 -43
  289. package/build/lib/utils/getFacetedMinMaxValues.js.map +0 -1
  290. package/build/lib/utils/getFacetedRowModel.js +0 -36
  291. package/build/lib/utils/getFacetedUniqueValues.js +0 -39
  292. package/build/lib/utils/getFacetedUniqueValues.js.map +0 -1
  293. package/build/lib/utils/getFilteredRowModel.js +0 -111
  294. package/build/lib/utils/getGroupedRowModel.js +0 -150
  295. package/build/lib/utils/getGroupedRowModel.js.map +0 -1
  296. package/build/lib/utils/getPaginationRowModel.js +0 -60
  297. package/build/lib/utils/getPaginationRowModel.js.map +0 -1
  298. package/build/lib/utils/getSortedRowModel.js +0 -102
  299. package/build/umd/index.development.js +0 -3578
  300. package/build/umd/index.development.js.map +0 -1
  301. package/build/umd/index.production.js +0 -12
  302. package/build/umd/index.production.js.map +0 -1
@@ -62,7 +62,7 @@ export interface CoreColumn<TData extends RowData, TValue> {
62
62
  parent?: Column<TData, TValue>
63
63
  }
64
64
 
65
- export function createColumn<TData extends RowData, TValue>(
65
+ export function _createColumn<TData extends RowData, TValue>(
66
66
  table: Table<TData>,
67
67
  columnDef: ColumnDef<TData, TValue>,
68
68
  depth: number,
@@ -157,7 +157,7 @@ export function createColumn<TData extends RowData, TValue>(
157
157
  }
158
158
 
159
159
  for (const feature of table._features) {
160
- feature.createColumn?.(column as Column<TData, TValue>, table)
160
+ feature._createColumn?.(column as Column<TData, TValue>, table)
161
161
  }
162
162
 
163
163
  // Yes, we have to convert table to unknown, because we know more than the compiler here.
@@ -210,7 +210,7 @@ export interface HeadersInstance<TData extends RowData> {
210
210
 
211
211
  //
212
212
 
213
- function createHeader<TData extends RowData, TValue>(
213
+ function _createHeader<TData extends RowData, TValue>(
214
214
  table: Table<TData>,
215
215
  column: Column<TData, TValue>,
216
216
  options: {
@@ -256,14 +256,14 @@ function createHeader<TData extends RowData, TValue>(
256
256
  }
257
257
 
258
258
  table._features.forEach(feature => {
259
- feature.createHeader?.(header as Header<TData, TValue>, table)
259
+ feature._createHeader?.(header as Header<TData, TValue>, table)
260
260
  })
261
261
 
262
262
  return header as Header<TData, TValue>
263
263
  }
264
264
 
265
265
  export const Headers: TableFeature = {
266
- createTable: <TData extends RowData>(table: Table<TData>): void => {
266
+ _createTable: <TData extends RowData>(table: Table<TData>): void => {
267
267
  // Header Groups
268
268
 
269
269
  table.getHeaderGroups = memo(
@@ -553,7 +553,7 @@ export function buildHeaderGroups<TData extends RowData>(
553
553
  latestPendingParentHeader.subHeaders.push(headerToGroup)
554
554
  } else {
555
555
  // This is a new header. Let's create it
556
- const header = createHeader(table, column, {
556
+ const header = _createHeader(table, column, {
557
557
  id: [headerFamily, depth, column.id, headerToGroup?.id]
558
558
  .filter(Boolean)
559
559
  .join('_'),
@@ -584,7 +584,7 @@ export function buildHeaderGroups<TData extends RowData>(
584
584
  }
585
585
 
586
586
  const bottomHeaders = columnsToGroup.map((column, index) =>
587
- createHeader(table, column, {
587
+ _createHeader(table, column, {
588
588
  depth: maxDepth,
589
589
  index,
590
590
  })
package/src/core/row.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { RowData, Cell, Row, Table } from '../types'
2
2
  import { flattenBy, getMemoOptions, memo } from '../utils'
3
- import { createCell } from './cell'
3
+ import { _createCell } from './cell'
4
4
 
5
5
  export interface CoreRow<TData extends RowData> {
6
6
  _getAllCellsByColumnId: () => Record<string, Cell<TData, unknown>>
@@ -92,7 +92,7 @@ export interface CoreRow<TData extends RowData> {
92
92
  subRows: Row<TData>[]
93
93
  }
94
94
 
95
- export const createRow = <TData extends RowData>(
95
+ export const _createRow = <TData extends RowData>(
96
96
  table: Table<TData>,
97
97
  id: string,
98
98
  original: TData,
@@ -171,7 +171,7 @@ export const createRow = <TData extends RowData>(
171
171
  () => [table.getAllLeafColumns()],
172
172
  leafColumns => {
173
173
  return leafColumns.map(column => {
174
- return createCell(table, row as Row<TData>, column, column.id)
174
+ return _createCell(table, row as Row<TData>, column, column.id)
175
175
  })
176
176
  },
177
177
  getMemoOptions(table.options, 'debugRows', 'getAllCells')
@@ -194,7 +194,7 @@ export const createRow = <TData extends RowData>(
194
194
 
195
195
  for (let i = 0; i < table._features.length; i++) {
196
196
  const feature = table._features[i]
197
- feature?.createRow?.(row as Row<TData>, table)
197
+ feature?._createRow?.(row as Row<TData>, table)
198
198
  }
199
199
 
200
200
  return row as Row<TData>
package/src/core/table.ts CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  } from '../types'
20
20
 
21
21
  //
22
- import { createColumn } from './column'
22
+ import { _createColumn } from './column'
23
23
  import { Headers } from './headers'
24
24
  //
25
25
 
@@ -192,6 +192,42 @@ export interface CoreOptions<TData extends RowData> {
192
192
  state: Partial<TableState>
193
193
  }
194
194
 
195
+ export function tableOptions<TData extends RowData = any>(
196
+ options: Omit<TableOptions<TData>, 'columns'>
197
+ ): Omit<TableOptions<TData>, 'columns'>
198
+
199
+ export function tableOptions<TData extends RowData = any>(
200
+ options: Omit<TableOptions<TData>, 'data'>
201
+ ): Omit<TableOptions<TData>, 'data'>
202
+
203
+ export function tableOptions<TData extends RowData = any>(
204
+ options: Omit<TableOptions<TData>, 'getCoreRowModel'>
205
+ ): Omit<TableOptions<TData>, 'getCoreRowModel'>
206
+
207
+ export function tableOptions<TData extends RowData = any>(
208
+ options: Omit<TableOptions<TData>, 'data' | 'columns'>
209
+ ): Omit<TableOptions<TData>, 'data' | 'columns'>
210
+
211
+ export function tableOptions<TData extends RowData = any>(
212
+ options: Omit<TableOptions<TData>, 'getCoreRowModel' | 'columns'>
213
+ ): Omit<TableOptions<TData>, 'getCoreRowModel' | 'columns'>
214
+
215
+ export function tableOptions<TData extends RowData = any>(
216
+ options: Omit<TableOptions<TData>, 'data' | 'getCoreRowModel'>
217
+ ): Omit<TableOptions<TData>, 'data' | 'getCoreRowModel'>
218
+
219
+ export function tableOptions<TData extends RowData = any>(
220
+ options: Omit<TableOptions<TData>, 'data' | 'columns' | 'getCoreRowModel'>
221
+ ): Omit<TableOptions<TData>, 'data' | 'columns' | 'getCoreRowModel'>
222
+
223
+ export function tableOptions<TData extends RowData = any>(
224
+ options: TableOptions<TData>
225
+ ): TableOptions<TData>
226
+
227
+ export function tableOptions(options: unknown) {
228
+ return options
229
+ }
230
+
195
231
  export interface CoreInstance<TData extends RowData> {
196
232
  _features: readonly TableFeature[]
197
233
  _getAllFlatColumnsById: () => Record<string, Column<TData, unknown>>
@@ -280,7 +316,7 @@ export interface CoreInstance<TData extends RowData> {
280
316
  setState: (updater: Updater<TableState>) => void
281
317
  }
282
318
 
283
- export function createTable<TData extends RowData>(
319
+ export function _createTable<TData extends RowData>(
284
320
  options: TableOptionsResolved<TData>
285
321
  ): Table<TData> {
286
322
  if (
@@ -295,7 +331,7 @@ export function createTable<TData extends RowData>(
295
331
  let table = { _features } as unknown as Table<TData>
296
332
 
297
333
  const defaultOptions = table._features.reduce((obj, feature) => {
298
- return Object.assign(obj, feature.getDefaultOptions?.(table))
334
+ return Object.assign(obj, feature._getDefaultOptions?.(table))
299
335
  }, {}) as TableOptionsResolved<TData>
300
336
 
301
337
  const mergeOptions = (options: TableOptionsResolved<TData>) => {
@@ -317,7 +353,7 @@ export function createTable<TData extends RowData>(
317
353
  } as TableState
318
354
 
319
355
  table._features.forEach(feature => {
320
- initialState = (feature.getInitialState?.(initialState) ??
356
+ initialState = (feature._getInitialState?.(initialState) ??
321
357
  initialState) as TableState
322
358
  })
323
359
 
@@ -433,7 +469,7 @@ export function createTable<TData extends RowData>(
433
469
  // footer: props => props.header.column.id,
434
470
  cell: props => props.renderValue<any>()?.toString?.() ?? null,
435
471
  ...table._features.reduce((obj, feature) => {
436
- return Object.assign(obj, feature.getDefaultColumnDef?.())
472
+ return Object.assign(obj, feature._getDefaultColumnDef?.())
437
473
  }, {}),
438
474
  ...defaultColumn,
439
475
  } as Partial<ColumnDef<TData, unknown>>
@@ -452,7 +488,7 @@ export function createTable<TData extends RowData>(
452
488
  depth = 0
453
489
  ): Column<TData, unknown>[] => {
454
490
  return columnDefs.map(columnDef => {
455
- const column = createColumn(table, columnDef, depth, parent)
491
+ const column = _createColumn(table, columnDef, depth, parent)
456
492
 
457
493
  const groupingColumnDef = columnDef as GroupColumnDef<
458
494
  TData,
@@ -520,7 +556,7 @@ export function createTable<TData extends RowData>(
520
556
 
521
557
  for (let index = 0; index < table._features.length; index++) {
522
558
  const feature = table._features[index]
523
- feature?.createTable?.(table)
559
+ feature?._createTable?.(table)
524
560
  }
525
561
 
526
562
  return table
@@ -46,7 +46,7 @@ export interface FacetedOptions<TData extends RowData> {
46
46
  //
47
47
 
48
48
  export const ColumnFaceting: TableFeature = {
49
- createColumn: <TData extends RowData>(
49
+ _createColumn: <TData extends RowData>(
50
50
  column: Column<TData, unknown>,
51
51
  table: Table<TData>
52
52
  ): void => {
@@ -241,7 +241,7 @@ export interface ColumnFiltersInstance<TData extends RowData> {
241
241
  //
242
242
 
243
243
  export const ColumnFiltering: TableFeature = {
244
- getDefaultColumnDef: <
244
+ _getDefaultColumnDef: <
245
245
  TData extends RowData,
246
246
  >(): ColumnFiltersColumnDef<TData> => {
247
247
  return {
@@ -249,14 +249,14 @@ export const ColumnFiltering: TableFeature = {
249
249
  }
250
250
  },
251
251
 
252
- getInitialState: (state): ColumnFiltersTableState => {
252
+ _getInitialState: (state): ColumnFiltersTableState => {
253
253
  return {
254
254
  columnFilters: [],
255
255
  ...state,
256
256
  }
257
257
  },
258
258
 
259
- getDefaultOptions: <TData extends RowData>(
259
+ _getDefaultOptions: <TData extends RowData>(
260
260
  table: Table<TData>
261
261
  ): ColumnFiltersOptions<TData> => {
262
262
  return {
@@ -266,7 +266,7 @@ export const ColumnFiltering: TableFeature = {
266
266
  } as ColumnFiltersOptions<TData>
267
267
  },
268
268
 
269
- createColumn: <TData extends RowData>(
269
+ _createColumn: <TData extends RowData>(
270
270
  column: Column<TData, unknown>,
271
271
  table: Table<TData>
272
272
  ): void => {
@@ -362,7 +362,7 @@ export const ColumnFiltering: TableFeature = {
362
362
  }
363
363
  },
364
364
 
365
- createRow: <TData extends RowData>(
365
+ _createRow: <TData extends RowData>(
366
366
  row: Row<TData>,
367
367
  _table: Table<TData>
368
368
  ): void => {
@@ -370,7 +370,7 @@ export const ColumnFiltering: TableFeature = {
370
370
  row.columnFiltersMeta = {}
371
371
  },
372
372
 
373
- createTable: <TData extends RowData>(table: Table<TData>): void => {
373
+ _createTable: <TData extends RowData>(table: Table<TData>): void => {
374
374
  table.setColumnFilters = (updater: Updater<ColumnFiltersState>) => {
375
375
  const leafColumns = table.getAllLeafColumns()
376
376
 
@@ -240,7 +240,7 @@ export interface GroupingInstance<TData extends RowData> {
240
240
  //
241
241
 
242
242
  export const ColumnGrouping: TableFeature = {
243
- getDefaultColumnDef: <TData extends RowData>(): GroupingColumnDef<
243
+ _getDefaultColumnDef: <TData extends RowData>(): GroupingColumnDef<
244
244
  TData,
245
245
  unknown
246
246
  > => {
@@ -250,14 +250,14 @@ export const ColumnGrouping: TableFeature = {
250
250
  }
251
251
  },
252
252
 
253
- getInitialState: (state): GroupingTableState => {
253
+ _getInitialState: (state): GroupingTableState => {
254
254
  return {
255
255
  grouping: [],
256
256
  ...state,
257
257
  }
258
258
  },
259
259
 
260
- getDefaultOptions: <TData extends RowData>(
260
+ _getDefaultOptions: <TData extends RowData>(
261
261
  table: Table<TData>
262
262
  ): GroupingOptions => {
263
263
  return {
@@ -266,7 +266,7 @@ export const ColumnGrouping: TableFeature = {
266
266
  }
267
267
  },
268
268
 
269
- createColumn: <TData extends RowData, TValue>(
269
+ _createColumn: <TData extends RowData, TValue>(
270
270
  column: Column<TData, TValue>,
271
271
  table: Table<TData>
272
272
  ): void => {
@@ -334,7 +334,7 @@ export const ColumnGrouping: TableFeature = {
334
334
  }
335
335
  },
336
336
 
337
- createTable: <TData extends RowData>(table: Table<TData>): void => {
337
+ _createTable: <TData extends RowData>(table: Table<TData>): void => {
338
338
  table.setGrouping = updater => table.options.onGroupingChange?.(updater)
339
339
 
340
340
  table.resetGrouping = defaultState => {
@@ -355,7 +355,7 @@ export const ColumnGrouping: TableFeature = {
355
355
  }
356
356
  },
357
357
 
358
- createRow: <TData extends RowData>(
358
+ _createRow: <TData extends RowData>(
359
359
  row: Row<TData>,
360
360
  table: Table<TData>
361
361
  ): void => {
@@ -380,7 +380,7 @@ export const ColumnGrouping: TableFeature = {
380
380
  row._groupingValuesCache = {}
381
381
  },
382
382
 
383
- createCell: <TData extends RowData, TValue>(
383
+ _createCell: <TData extends RowData, TValue>(
384
384
  cell: Cell<TData, TValue>,
385
385
  column: Column<TData, TValue>,
386
386
  row: Row<TData>,
@@ -73,14 +73,14 @@ export interface ColumnOrderInstance<TData extends RowData> {
73
73
  //
74
74
 
75
75
  export const ColumnOrdering: TableFeature = {
76
- getInitialState: (state): ColumnOrderTableState => {
76
+ _getInitialState: (state): ColumnOrderTableState => {
77
77
  return {
78
78
  columnOrder: [],
79
79
  ...state,
80
80
  }
81
81
  },
82
82
 
83
- getDefaultOptions: <TData extends RowData>(
83
+ _getDefaultOptions: <TData extends RowData>(
84
84
  table: Table<TData>
85
85
  ): ColumnOrderDefaultOptions => {
86
86
  return {
@@ -88,7 +88,7 @@ export const ColumnOrdering: TableFeature = {
88
88
  }
89
89
  },
90
90
 
91
- createColumn: <TData extends RowData>(
91
+ _createColumn: <TData extends RowData>(
92
92
  column: Column<TData, unknown>,
93
93
  table: Table<TData>
94
94
  ): void => {
@@ -107,7 +107,7 @@ export const ColumnOrdering: TableFeature = {
107
107
  }
108
108
  },
109
109
 
110
- createTable: <TData extends RowData>(table: Table<TData>): void => {
110
+ _createTable: <TData extends RowData>(table: Table<TData>): void => {
111
111
  table.setColumnOrder = updater =>
112
112
  table.options.onColumnOrderChange?.(updater)
113
113
  table.resetColumnOrder = defaultState => {
@@ -151,14 +151,14 @@ const getDefaultColumnPinningState = (): ColumnPinningState => ({
151
151
  })
152
152
 
153
153
  export const ColumnPinning: TableFeature = {
154
- getInitialState: (state): ColumnPinningTableState => {
154
+ _getInitialState: (state): ColumnPinningTableState => {
155
155
  return {
156
156
  columnPinning: getDefaultColumnPinningState(),
157
157
  ...state,
158
158
  }
159
159
  },
160
160
 
161
- getDefaultOptions: <TData extends RowData>(
161
+ _getDefaultOptions: <TData extends RowData>(
162
162
  table: Table<TData>
163
163
  ): ColumnPinningDefaultOptions => {
164
164
  return {
@@ -166,7 +166,7 @@ export const ColumnPinning: TableFeature = {
166
166
  }
167
167
  },
168
168
 
169
- createColumn: <TData extends RowData, TValue>(
169
+ _createColumn: <TData extends RowData, TValue>(
170
170
  column: Column<TData, TValue>,
171
171
  table: Table<TData>
172
172
  ): void => {
@@ -236,7 +236,7 @@ export const ColumnPinning: TableFeature = {
236
236
  }
237
237
  },
238
238
 
239
- createRow: <TData extends RowData>(
239
+ _createRow: <TData extends RowData>(
240
240
  row: Row<TData>,
241
241
  table: Table<TData>
242
242
  ): void => {
@@ -279,7 +279,7 @@ export const ColumnPinning: TableFeature = {
279
279
  )
280
280
  },
281
281
 
282
- createTable: <TData extends RowData>(table: Table<TData>): void => {
282
+ _createTable: <TData extends RowData>(table: Table<TData>): void => {
283
283
  table.setColumnPinning = updater =>
284
284
  table.options.onColumnPinningChange?.(updater)
285
285
 
@@ -232,10 +232,10 @@ const getDefaultColumnSizingInfoState = (): ColumnSizingInfoState => ({
232
232
  })
233
233
 
234
234
  export const ColumnSizing: TableFeature = {
235
- getDefaultColumnDef: (): ColumnSizingColumnDef => {
235
+ _getDefaultColumnDef: (): ColumnSizingColumnDef => {
236
236
  return defaultColumnSizing
237
237
  },
238
- getInitialState: (state): ColumnSizingTableState => {
238
+ _getInitialState: (state): ColumnSizingTableState => {
239
239
  return {
240
240
  columnSizing: {},
241
241
  columnSizingInfo: getDefaultColumnSizingInfoState(),
@@ -243,7 +243,7 @@ export const ColumnSizing: TableFeature = {
243
243
  }
244
244
  },
245
245
 
246
- getDefaultOptions: <TData extends RowData>(
246
+ _getDefaultOptions: <TData extends RowData>(
247
247
  table: Table<TData>
248
248
  ): ColumnSizingDefaultOptions => {
249
249
  return {
@@ -254,7 +254,7 @@ export const ColumnSizing: TableFeature = {
254
254
  }
255
255
  },
256
256
 
257
- createColumn: <TData extends RowData, TValue>(
257
+ _createColumn: <TData extends RowData, TValue>(
258
258
  column: Column<TData, TValue>,
259
259
  table: Table<TData>
260
260
  ): void => {
@@ -312,7 +312,7 @@ export const ColumnSizing: TableFeature = {
312
312
  }
313
313
  },
314
314
 
315
- createHeader: <TData extends RowData, TValue>(
315
+ _createHeader: <TData extends RowData, TValue>(
316
316
  header: Header<TData, TValue>,
317
317
  table: Table<TData>
318
318
  ): void => {
@@ -513,7 +513,7 @@ export const ColumnSizing: TableFeature = {
513
513
  }
514
514
  },
515
515
 
516
- createTable: <TData extends RowData>(table: Table<TData>): void => {
516
+ _createTable: <TData extends RowData>(table: Table<TData>): void => {
517
517
  table.setColumnSizing = updater =>
518
518
  table.options.onColumnSizingChange?.(updater)
519
519
  table.setColumnSizingInfo = updater =>
@@ -150,14 +150,14 @@ export interface VisibilityColumn {
150
150
  //
151
151
 
152
152
  export const ColumnVisibility: TableFeature = {
153
- getInitialState: (state): VisibilityTableState => {
153
+ _getInitialState: (state): VisibilityTableState => {
154
154
  return {
155
155
  columnVisibility: {},
156
156
  ...state,
157
157
  }
158
158
  },
159
159
 
160
- getDefaultOptions: <TData extends RowData>(
160
+ _getDefaultOptions: <TData extends RowData>(
161
161
  table: Table<TData>
162
162
  ): VisibilityDefaultOptions => {
163
163
  return {
@@ -165,7 +165,7 @@ export const ColumnVisibility: TableFeature = {
165
165
  }
166
166
  },
167
167
 
168
- createColumn: <TData extends RowData, TValue>(
168
+ _createColumn: <TData extends RowData, TValue>(
169
169
  column: Column<TData, TValue>,
170
170
  table: Table<TData>
171
171
  ): void => {
@@ -201,7 +201,7 @@ export const ColumnVisibility: TableFeature = {
201
201
  }
202
202
  },
203
203
 
204
- createRow: <TData extends RowData>(
204
+ _createRow: <TData extends RowData>(
205
205
  row: Row<TData>,
206
206
  table: Table<TData>
207
207
  ): void => {
@@ -223,7 +223,7 @@ export const ColumnVisibility: TableFeature = {
223
223
  )
224
224
  },
225
225
 
226
- createTable: <TData extends RowData>(table: Table<TData>): void => {
226
+ _createTable: <TData extends RowData>(table: Table<TData>): void => {
227
227
  const makeVisibleColumnsMethod = (
228
228
  key: string,
229
229
  getColumns: () => Column<TData, unknown>[]
@@ -28,7 +28,7 @@ export interface GlobalFacetingInstance<TData extends RowData> {
28
28
  //
29
29
 
30
30
  export const GlobalFaceting: TableFeature = {
31
- createTable: <TData extends RowData>(table: Table<TData>): void => {
31
+ _createTable: <TData extends RowData>(table: Table<TData>): void => {
32
32
  table._getGlobalFacetedRowModel =
33
33
  table.options.getFacetedRowModel &&
34
34
  table.options.getFacetedRowModel(table, '__global__')
@@ -94,14 +94,14 @@ export interface GlobalFilterInstance<TData extends RowData> {
94
94
  //
95
95
 
96
96
  export const GlobalFiltering: TableFeature = {
97
- getInitialState: (state): GlobalFilterTableState => {
97
+ _getInitialState: (state): GlobalFilterTableState => {
98
98
  return {
99
99
  globalFilter: undefined,
100
100
  ...state,
101
101
  }
102
102
  },
103
103
 
104
- getDefaultOptions: <TData extends RowData>(
104
+ _getDefaultOptions: <TData extends RowData>(
105
105
  table: Table<TData>
106
106
  ): GlobalFilterOptions<TData> => {
107
107
  return {
@@ -118,7 +118,7 @@ export const GlobalFiltering: TableFeature = {
118
118
  } as GlobalFilterOptions<TData>
119
119
  },
120
120
 
121
- createColumn: <TData extends RowData>(
121
+ _createColumn: <TData extends RowData>(
122
122
  column: Column<TData, unknown>,
123
123
  table: Table<TData>
124
124
  ): void => {
@@ -133,7 +133,7 @@ export const GlobalFiltering: TableFeature = {
133
133
  }
134
134
  },
135
135
 
136
- createTable: <TData extends RowData>(table: Table<TData>): void => {
136
+ _createTable: <TData extends RowData>(table: Table<TData>): void => {
137
137
  table.getGlobalAutoFilterFn = () => {
138
138
  return filterFns.includesString
139
139
  }
@@ -167,14 +167,14 @@ export interface ExpandedInstance<TData extends RowData> {
167
167
  //
168
168
 
169
169
  export const RowExpanding: TableFeature = {
170
- getInitialState: (state): ExpandedTableState => {
170
+ _getInitialState: (state): ExpandedTableState => {
171
171
  return {
172
172
  expanded: {},
173
173
  ...state,
174
174
  }
175
175
  },
176
176
 
177
- getDefaultOptions: <TData extends RowData>(
177
+ _getDefaultOptions: <TData extends RowData>(
178
178
  table: Table<TData>
179
179
  ): ExpandedOptions<TData> => {
180
180
  return {
@@ -183,7 +183,7 @@ export const RowExpanding: TableFeature = {
183
183
  }
184
184
  },
185
185
 
186
- createTable: <TData extends RowData>(table: Table<TData>): void => {
186
+ _createTable: <TData extends RowData>(table: Table<TData>): void => {
187
187
  let registered = false
188
188
  let queued = false
189
189
 
@@ -283,7 +283,7 @@ export const RowExpanding: TableFeature = {
283
283
  }
284
284
  },
285
285
 
286
- createRow: <TData extends RowData>(
286
+ _createRow: <TData extends RowData>(
287
287
  row: Row<TData>,
288
288
  table: Table<TData>
289
289
  ): void => {
@@ -193,7 +193,7 @@ const getDefaultPaginationState = (): PaginationState => ({
193
193
  })
194
194
 
195
195
  export const RowPagination: TableFeature = {
196
- getInitialState: (state): PaginationTableState => {
196
+ _getInitialState: (state): PaginationTableState => {
197
197
  return {
198
198
  ...state,
199
199
  pagination: {
@@ -203,7 +203,7 @@ export const RowPagination: TableFeature = {
203
203
  }
204
204
  },
205
205
 
206
- getDefaultOptions: <TData extends RowData>(
206
+ _getDefaultOptions: <TData extends RowData>(
207
207
  table: Table<TData>
208
208
  ): PaginationDefaultOptions => {
209
209
  return {
@@ -211,7 +211,7 @@ export const RowPagination: TableFeature = {
211
211
  }
212
212
  },
213
213
 
214
- createTable: <TData extends RowData>(table: Table<TData>): void => {
214
+ _createTable: <TData extends RowData>(table: Table<TData>): void => {
215
215
  let registered = false
216
216
  let queued = false
217
217
 
@@ -127,14 +127,14 @@ const getDefaultRowPinningState = (): RowPinningState => ({
127
127
  })
128
128
 
129
129
  export const RowPinning: TableFeature = {
130
- getInitialState: (state): RowPinningTableState => {
130
+ _getInitialState: (state): RowPinningTableState => {
131
131
  return {
132
132
  rowPinning: getDefaultRowPinningState(),
133
133
  ...state,
134
134
  }
135
135
  },
136
136
 
137
- getDefaultOptions: <TData extends RowData>(
137
+ _getDefaultOptions: <TData extends RowData>(
138
138
  table: Table<TData>
139
139
  ): RowPinningDefaultOptions => {
140
140
  return {
@@ -142,7 +142,7 @@ export const RowPinning: TableFeature = {
142
142
  }
143
143
  },
144
144
 
145
- createRow: <TData extends RowData>(
145
+ _createRow: <TData extends RowData>(
146
146
  row: Row<TData>,
147
147
  table: Table<TData>
148
148
  ): void => {
@@ -211,7 +211,7 @@ export const RowPinning: TableFeature = {
211
211
  }
212
212
  },
213
213
 
214
- createTable: <TData extends RowData>(table: Table<TData>): void => {
214
+ _createTable: <TData extends RowData>(table: Table<TData>): void => {
215
215
  table.setRowPinning = updater => table.options.onRowPinningChange?.(updater)
216
216
 
217
217
  table.resetRowPinning = defaultState =>
@@ -197,14 +197,14 @@ export interface RowSelectionInstance<TData extends RowData> {
197
197
  //
198
198
 
199
199
  export const RowSelection: TableFeature = {
200
- getInitialState: (state): RowSelectionTableState => {
200
+ _getInitialState: (state): RowSelectionTableState => {
201
201
  return {
202
202
  rowSelection: {},
203
203
  ...state,
204
204
  }
205
205
  },
206
206
 
207
- getDefaultOptions: <TData extends RowData>(
207
+ _getDefaultOptions: <TData extends RowData>(
208
208
  table: Table<TData>
209
209
  ): RowSelectionOptions<TData> => {
210
210
  return {
@@ -218,7 +218,7 @@ export const RowSelection: TableFeature = {
218
218
  }
219
219
  },
220
220
 
221
- createTable: <TData extends RowData>(table: Table<TData>): void => {
221
+ _createTable: <TData extends RowData>(table: Table<TData>): void => {
222
222
  table.setRowSelection = updater =>
223
223
  table.options.onRowSelectionChange?.(updater)
224
224
  table.resetRowSelection = defaultState =>
@@ -466,7 +466,7 @@ export const RowSelection: TableFeature = {
466
466
  }
467
467
  },
468
468
 
469
- createRow: <TData extends RowData>(
469
+ _createRow: <TData extends RowData>(
470
470
  row: Row<TData>,
471
471
  table: Table<TData>
472
472
  ): void => {