@tanstack/table-core 9.0.0-beta.36 → 9.0.0-beta.38

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 (93) hide show
  1. package/dist/core/headers/buildHeaderGroups.cjs.map +1 -1
  2. package/dist/core/headers/buildHeaderGroups.d.cts +1 -1
  3. package/dist/core/headers/buildHeaderGroups.d.ts +1 -1
  4. package/dist/core/headers/buildHeaderGroups.js.map +1 -1
  5. package/dist/core/headers/coreHeadersFeature.utils.cjs +7 -7
  6. package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
  7. package/dist/core/headers/coreHeadersFeature.utils.js +7 -7
  8. package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
  9. package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +2 -2
  10. package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +2 -2
  11. package/dist/features/column-grouping/columnGroupingFeature.types.d.cts +1 -1
  12. package/dist/features/column-grouping/columnGroupingFeature.types.d.ts +1 -1
  13. package/dist/features/column-grouping/columnGroupingFeature.utils.cjs.map +1 -1
  14. package/dist/features/column-grouping/columnGroupingFeature.utils.js.map +1 -1
  15. package/dist/features/column-ordering/columnOrderingFeature.types.d.cts +6 -6
  16. package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +6 -6
  17. package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +6 -6
  18. package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +1 -1
  19. package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +3 -3
  20. package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +3 -3
  21. package/dist/features/column-ordering/columnOrderingFeature.utils.js +6 -6
  22. package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +1 -1
  23. package/dist/features/column-pinning/columnPinningFeature.cjs +44 -39
  24. package/dist/features/column-pinning/columnPinningFeature.cjs.map +1 -1
  25. package/dist/features/column-pinning/columnPinningFeature.d.cts +6 -1
  26. package/dist/features/column-pinning/columnPinningFeature.d.ts +6 -1
  27. package/dist/features/column-pinning/columnPinningFeature.js +45 -40
  28. package/dist/features/column-pinning/columnPinningFeature.js.map +1 -1
  29. package/dist/features/column-pinning/columnPinningFeature.types.d.cts +49 -38
  30. package/dist/features/column-pinning/columnPinningFeature.types.d.ts +49 -38
  31. package/dist/features/column-pinning/columnPinningFeature.utils.cjs +154 -146
  32. package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
  33. package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +81 -73
  34. package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +81 -73
  35. package/dist/features/column-pinning/columnPinningFeature.utils.js +141 -133
  36. package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
  37. package/dist/features/column-sizing/columnSizingFeature.cjs +4 -4
  38. package/dist/features/column-sizing/columnSizingFeature.cjs.map +1 -1
  39. package/dist/features/column-sizing/columnSizingFeature.js +5 -5
  40. package/dist/features/column-sizing/columnSizingFeature.js.map +1 -1
  41. package/dist/features/column-sizing/columnSizingFeature.types.d.cts +18 -12
  42. package/dist/features/column-sizing/columnSizingFeature.types.d.ts +18 -12
  43. package/dist/features/column-sizing/columnSizingFeature.utils.cjs +24 -20
  44. package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +1 -1
  45. package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +18 -14
  46. package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +18 -14
  47. package/dist/features/column-sizing/columnSizingFeature.utils.js +24 -20
  48. package/dist/features/column-sizing/columnSizingFeature.utils.js.map +1 -1
  49. package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +16 -16
  50. package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +1 -1
  51. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +3 -3
  52. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +3 -3
  53. package/dist/features/column-visibility/columnVisibilityFeature.utils.js +16 -16
  54. package/dist/features/column-visibility/columnVisibilityFeature.utils.js.map +1 -1
  55. package/dist/features/row-expanding/rowExpandingFeature.types.d.cts +1 -1
  56. package/dist/features/row-expanding/rowExpandingFeature.types.d.ts +1 -1
  57. package/dist/features/row-pagination/rowPaginationFeature.types.d.cts +1 -1
  58. package/dist/features/row-pagination/rowPaginationFeature.types.d.ts +1 -1
  59. package/dist/features/row-sorting/rowSortingFeature.types.d.cts +1 -1
  60. package/dist/features/row-sorting/rowSortingFeature.types.d.ts +1 -1
  61. package/dist/static-functions.cjs +16 -16
  62. package/dist/static-functions.d.cts +3 -3
  63. package/dist/static-functions.d.ts +3 -3
  64. package/dist/static-functions.js +3 -3
  65. package/dist/utils.cjs +3 -15
  66. package/dist/utils.cjs.map +1 -1
  67. package/dist/utils.d.cts +2 -2
  68. package/dist/utils.d.ts +2 -2
  69. package/dist/utils.js +3 -15
  70. package/dist/utils.js.map +1 -1
  71. package/package.json +1 -1
  72. package/src/core/headers/buildHeaderGroups.ts +1 -1
  73. package/src/core/headers/coreHeadersFeature.utils.ts +7 -8
  74. package/src/core/row-models/coreRowModelsFeature.types.ts +0 -1
  75. package/src/core/table/coreTablesFeature.types.ts +1 -0
  76. package/src/features/column-faceting/columnFacetingFeature.types.ts +0 -1
  77. package/src/features/column-filtering/columnFilteringFeature.types.ts +3 -3
  78. package/src/features/column-grouping/columnGroupingFeature.types.ts +2 -2
  79. package/src/features/column-grouping/columnGroupingFeature.utils.ts +2 -0
  80. package/src/features/column-ordering/columnOrderingFeature.types.ts +7 -7
  81. package/src/features/column-ordering/columnOrderingFeature.utils.ts +9 -9
  82. package/src/features/column-pinning/columnPinningFeature.ts +64 -59
  83. package/src/features/column-pinning/columnPinningFeature.types.ts +49 -38
  84. package/src/features/column-pinning/columnPinningFeature.utils.ts +163 -155
  85. package/src/features/column-sizing/columnSizingFeature.ts +6 -6
  86. package/src/features/column-sizing/columnSizingFeature.types.ts +18 -12
  87. package/src/features/column-sizing/columnSizingFeature.utils.ts +31 -27
  88. package/src/features/column-visibility/columnVisibilityFeature.utils.ts +15 -15
  89. package/src/features/row-expanding/rowExpandingFeature.types.ts +2 -3
  90. package/src/features/row-pagination/rowPaginationFeature.types.ts +2 -3
  91. package/src/features/row-sorting/rowSortingFeature.types.ts +2 -2
  92. package/src/types/ColumnDef.ts +1 -0
  93. package/src/utils.ts +3 -4
@@ -34,8 +34,8 @@ import type {
34
34
  */
35
35
  export function getDefaultColumnPinningState(): ColumnPinningState {
36
36
  return {
37
- left: [],
38
- right: [],
37
+ start: [],
38
+ end: [],
39
39
  }
40
40
  }
41
41
 
@@ -45,12 +45,16 @@ export function getDefaultColumnPinningState(): ColumnPinningState {
45
45
  * Moves this column's leaf column ids into a pinning region.
46
46
  *
47
47
  * Pinning a group column pins all of its leaves. The leaf ids are first removed
48
- * from both regions, then appended to the requested `'left'` or `'right'`
48
+ * from both regions, then appended to the requested `'start'` or `'end'`
49
49
  * region. Passing `false` unpins them back to the center.
50
50
  *
51
+ * `start` and `end` are logical positions. In LTR languages/layouts, `start`
52
+ * usually corresponds to left and `end` to right. In RTL languages/layouts,
53
+ * `start` usually corresponds to right and `end` to left.
54
+ *
51
55
  * @example
52
56
  * ```ts
53
- * column_pin(column, 'left')
57
+ * column_pin(column, 'start')
54
58
  * ```
55
59
  */
56
60
  export function column_pin<
@@ -70,26 +74,26 @@ export function column_pin<
70
74
  }
71
75
 
72
76
  table_setColumnPinning(column.table, (old) => {
73
- if (position === 'right') {
77
+ if (position === 'end') {
74
78
  return {
75
- left: old.left.filter((d) => !columnIds.includes(d)),
76
- right: [
77
- ...old.right.filter((d) => !columnIds.includes(d)),
78
- ...columnIds,
79
- ],
79
+ start: old.start.filter((d) => !columnIds.includes(d)),
80
+ end: [...old.end.filter((d) => !columnIds.includes(d)), ...columnIds],
80
81
  }
81
82
  }
82
83
 
83
- if (position === 'left') {
84
+ if (position === 'start') {
84
85
  return {
85
- left: [...old.left.filter((d) => !columnIds.includes(d)), ...columnIds],
86
- right: old.right.filter((d) => !columnIds.includes(d)),
86
+ start: [
87
+ ...old.start.filter((d) => !columnIds.includes(d)),
88
+ ...columnIds,
89
+ ],
90
+ end: old.end.filter((d) => !columnIds.includes(d)),
87
91
  }
88
92
  }
89
93
 
90
94
  return {
91
- left: old.left.filter((d) => !columnIds.includes(d)),
92
- right: old.right.filter((d) => !columnIds.includes(d)),
95
+ start: old.start.filter((d) => !columnIds.includes(d)),
96
+ end: old.end.filter((d) => !columnIds.includes(d)),
93
97
  }
94
98
  })
95
99
  }
@@ -124,9 +128,13 @@ export function column_getCanPin<
124
128
  /**
125
129
  * Reads this column's current pinning region.
126
130
  *
127
- * Group columns report `'left'` or `'right'` when any leaf column is pinned in
131
+ * Group columns report `'start'` or `'end'` when any leaf column is pinned in
128
132
  * that region. Unpinned columns return `false`.
129
133
  *
134
+ * `start` and `end` are logical positions. In LTR languages/layouts, `start`
135
+ * usually corresponds to left and `end` to right. In RTL languages/layouts,
136
+ * `start` usually corresponds to right and `end` to left.
137
+ *
130
138
  * @example
131
139
  * ```ts
132
140
  * const position = column_getIsPinned(column)
@@ -141,17 +149,17 @@ export function column_getIsPinned<
141
149
  ): ColumnPinningPosition | false {
142
150
  const leafColumns = column.getLeafColumns()
143
151
 
144
- const { left, right } =
152
+ const { start, end } =
145
153
  column.table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()
146
154
 
147
155
  for (let i = 0; i < leafColumns.length; i++) {
148
- if (left.includes(leafColumns[i]!.id)) {
149
- return 'left'
156
+ if (start.includes(leafColumns[i]!.id)) {
157
+ return 'start'
150
158
  }
151
159
  }
152
160
  for (let i = 0; i < leafColumns.length; i++) {
153
- if (right.includes(leafColumns[i]!.id)) {
154
- return 'right'
161
+ if (end.includes(leafColumns[i]!.id)) {
162
+ return 'end'
155
163
  }
156
164
  }
157
165
  return false
@@ -161,7 +169,7 @@ export function column_getIsPinned<
161
169
  * Finds this column's index within its pinned region.
162
170
  *
163
171
  * Unpinned columns return `0`; pinned columns return their position in
164
- * `state.columnPinning.left` or `state.columnPinning.right`.
172
+ * `state.columnPinning.start` or `state.columnPinning.end`.
165
173
  *
166
174
  * @example
167
175
  * ```ts
@@ -184,7 +192,7 @@ export function column_getPinnedIndex<
184
192
  // Row APIs
185
193
 
186
194
  /**
187
- * Collects visible cells whose columns are not pinned left or right.
195
+ * Collects visible cells whose columns are not pinned start or end.
188
196
  *
189
197
  * The result preserves the row's visible-cell order for center columns.
190
198
  *
@@ -202,45 +210,45 @@ export function row_getCenterVisibleCells<
202
210
  'getVisibleCells',
203
211
  row_getVisibleCells,
204
212
  )
205
- const { left, right } =
213
+ const { start, end } =
206
214
  row.table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()
207
- if (!left.length && !right.length) {
215
+ if (!start.length && !end.length) {
208
216
  return allCells
209
217
  }
210
- const leftAndRight: Array<string> = [...left, ...right]
211
- return allCells.filter((d) => !leftAndRight.includes(d.column.id))
218
+ const startAndEnd: Array<string> = [...start, ...end]
219
+ return allCells.filter((d) => !startAndEnd.includes(d.column.id))
212
220
  }
213
221
 
214
222
  /**
215
- * Collects visible cells for columns pinned to the left region.
223
+ * Collects visible cells for columns pinned to the start region.
216
224
  *
217
- * Cells are returned in `state.columnPinning.left` order and are marked with
218
- * `cell.position = 'left'`.
225
+ * Cells are returned in `state.columnPinning.start` order and are marked with
226
+ * `cell.position = 'start'`.
219
227
  *
220
228
  * @example
221
229
  * ```ts
222
- * const leftCells = row_getLeftVisibleCells(row)
230
+ * const startCells = row_getStartVisibleCells(row)
223
231
  * ```
224
232
  */
225
- export function row_getLeftVisibleCells<
233
+ export function row_getStartVisibleCells<
226
234
  TFeatures extends TableFeatures,
227
235
  TData extends RowData,
228
236
  >(row: Row<TFeatures, TData>): Array<Cell<TFeatures, TData, unknown>> {
229
- const { left } =
237
+ const { start } =
230
238
  row.table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()
231
- if (!left.length) return []
239
+ if (!start.length) return []
232
240
  const allVisibleCells = callMemoOrStaticFn(
233
241
  row,
234
242
  'getVisibleCellsByColumnId',
235
243
  row_getVisibleCellsByColumnId,
236
244
  )
237
245
  const cells: Array<Cell<TFeatures, TData, unknown>> = []
238
- for (let i = 0; i < left.length; i++) {
239
- const columnId = left[i]!
246
+ for (let i = 0; i < start.length; i++) {
247
+ const columnId = start[i]!
240
248
  const cell = allVisibleCells[columnId]
241
249
  if (cell) {
242
250
  // Assign position property directly to preserve prototype chain
243
- ;(cell as any).position = 'left'
251
+ ;(cell as any).position = 'start'
244
252
  cells.push(cell)
245
253
  }
246
254
  }
@@ -248,35 +256,35 @@ export function row_getLeftVisibleCells<
248
256
  }
249
257
 
250
258
  /**
251
- * Collects visible cells for columns pinned to the right region.
259
+ * Collects visible cells for columns pinned to the end region.
252
260
  *
253
- * Cells are returned in `state.columnPinning.right` order and are marked with
254
- * `cell.position = 'right'`.
261
+ * Cells are returned in `state.columnPinning.end` order and are marked with
262
+ * `cell.position = 'end'`.
255
263
  *
256
264
  * @example
257
265
  * ```ts
258
- * const rightCells = row_getRightVisibleCells(row)
266
+ * const endCells = row_getEndVisibleCells(row)
259
267
  * ```
260
268
  */
261
- export function row_getRightVisibleCells<
269
+ export function row_getEndVisibleCells<
262
270
  TFeatures extends TableFeatures,
263
271
  TData extends RowData,
264
272
  >(row: Row<TFeatures, TData>) {
265
- const { right } =
273
+ const { end } =
266
274
  row.table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()
267
- if (!right.length) return [] as Array<Cell<TFeatures, TData, unknown>>
275
+ if (!end.length) return [] as Array<Cell<TFeatures, TData, unknown>>
268
276
  const allVisibleCells = callMemoOrStaticFn(
269
277
  row,
270
278
  'getVisibleCellsByColumnId',
271
279
  row_getVisibleCellsByColumnId,
272
280
  )
273
281
  const cells: Array<Cell<TFeatures, TData, unknown>> = []
274
- for (let i = 0; i < right.length; i++) {
275
- const columnId = right[i]!
282
+ for (let i = 0; i < end.length; i++) {
283
+ const columnId = end[i]!
276
284
  const cell = allVisibleCells[columnId]
277
285
  if (cell) {
278
286
  // Assign position property directly to preserve prototype chain
279
- ;(cell as any).position = 'right'
287
+ ;(cell as any).position = 'end'
280
288
  cells.push(cell)
281
289
  }
282
290
  }
@@ -288,12 +296,12 @@ export function row_getRightVisibleCells<
288
296
  /**
289
297
  * Routes a column pinning updater through the table's pinning change handler.
290
298
  *
291
- * The updater may be a next `{ left, right }` state or a function of the
299
+ * The updater may be a next `{ start, end }` state or a function of the
292
300
  * previous state, matching the instance `table.setColumnPinning` behavior.
293
301
  *
294
302
  * @example
295
303
  * ```ts
296
- * table_setColumnPinning(table, (old) => ({ ...old, left: ['select'] }))
304
+ * table_setColumnPinning(table, (old) => ({ ...old, start: ['select'] }))
297
305
  * ```
298
306
  */
299
307
  export function table_setColumnPinning<
@@ -310,7 +318,7 @@ export function table_setColumnPinning<
310
318
  * Resets `columnPinning` to the configured initial state or feature default.
311
319
  *
312
320
  * With no argument, the reset clones `table.initialState.columnPinning` when it
313
- * exists. Passing `true` ignores initial state and resets to empty left/right
321
+ * exists. Passing `true` ignores initial state and resets to empty start/end
314
322
  * arrays.
315
323
  *
316
324
  * @example
@@ -336,7 +344,7 @@ export function table_resetColumnPinning<
336
344
  /**
337
345
  * Checks whether any columns are pinned.
338
346
  *
339
- * Omit `position` to check both sides, or pass `'left'`/`'right'` to inspect a
347
+ * Omit `position` to check both sides, or pass `'start'`/`'end'` to inspect a
340
348
  * single pinning region.
341
349
  *
342
350
  * @example
@@ -351,7 +359,7 @@ export function table_getIsSomeColumnsPinned<
351
359
  const pinningState = table.atoms.columnPinning?.get()
352
360
 
353
361
  if (!position) {
354
- return Boolean(pinningState?.left.length || pinningState?.right.length)
362
+ return Boolean(pinningState?.start.length || pinningState?.end.length)
355
363
  }
356
364
  return Boolean(pinningState?.[position].length)
357
365
  }
@@ -359,28 +367,28 @@ export function table_getIsSomeColumnsPinned<
359
367
  // header groups
360
368
 
361
369
  /**
362
- * Builds header groups for visible columns pinned to the left region.
370
+ * Builds header groups for visible columns pinned to the start region.
363
371
  *
364
- * The leaf columns are read in `state.columnPinning.left` order and then passed
372
+ * The leaf columns are read in `state.columnPinning.start` order and then passed
365
373
  * through the same header-group builder as the unpinned table.
366
374
  *
367
375
  * @example
368
376
  * ```ts
369
- * const headerGroups = table_getLeftHeaderGroups(table)
377
+ * const headerGroups = table_getStartHeaderGroups(table)
370
378
  * ```
371
379
  */
372
- export function table_getLeftHeaderGroups<
380
+ export function table_getStartHeaderGroups<
373
381
  TFeatures extends TableFeatures,
374
382
  TData extends RowData,
375
383
  >(table: Table_Internal<TFeatures, TData>) {
376
384
  const allColumns = table.getAllColumns()
377
385
  const leafColumnsById = table.getAllLeafColumnsById()
378
- const { left } =
386
+ const { start } =
379
387
  table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()
380
388
 
381
389
  const orderedLeafColumns: Array<Column<TFeatures, TData, unknown>> = []
382
- for (let i = 0; i < left.length; i++) {
383
- const column = leafColumnsById[left[i]!]
390
+ for (let i = 0; i < start.length; i++) {
391
+ const column = leafColumnsById[start[i]!]
384
392
  if (
385
393
  column &&
386
394
  callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)
@@ -389,32 +397,32 @@ export function table_getLeftHeaderGroups<
389
397
  }
390
398
  }
391
399
 
392
- return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'left')
400
+ return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'start')
393
401
  }
394
402
 
395
403
  /**
396
- * Builds header groups for visible columns pinned to the right region.
404
+ * Builds header groups for visible columns pinned to the end region.
397
405
  *
398
- * The leaf columns are read in `state.columnPinning.right` order and then
406
+ * The leaf columns are read in `state.columnPinning.end` order and then
399
407
  * passed through the same header-group builder as the unpinned table.
400
408
  *
401
409
  * @example
402
410
  * ```ts
403
- * const headerGroups = table_getRightHeaderGroups(table)
411
+ * const headerGroups = table_getEndHeaderGroups(table)
404
412
  * ```
405
413
  */
406
- export function table_getRightHeaderGroups<
414
+ export function table_getEndHeaderGroups<
407
415
  TFeatures extends TableFeatures,
408
416
  TData extends RowData,
409
417
  >(table: Table_Internal<TFeatures, TData>) {
410
418
  const allColumns = table.getAllColumns()
411
419
  const leafColumnsById = table.getAllLeafColumnsById()
412
- const { right } =
420
+ const { end } =
413
421
  table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()
414
422
 
415
423
  const orderedLeafColumns: Array<Column<TFeatures, TData, unknown>> = []
416
- for (let i = 0; i < right.length; i++) {
417
- const column = leafColumnsById[right[i]!]
424
+ for (let i = 0; i < end.length; i++) {
425
+ const column = leafColumnsById[end[i]!]
418
426
  if (
419
427
  column &&
420
428
  callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)
@@ -423,13 +431,13 @@ export function table_getRightHeaderGroups<
423
431
  }
424
432
  }
425
433
 
426
- return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'right')
434
+ return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'end')
427
435
  }
428
436
 
429
437
  /**
430
438
  * Builds header groups for visible columns that are not pinned.
431
439
  *
432
- * Left- and right-pinned column ids are removed from the visible leaf column
440
+ * Start- and end-pinned column ids are removed from the visible leaf column
433
441
  * list before header groups are built for the center region.
434
442
  *
435
443
  * @example
@@ -449,12 +457,12 @@ export function table_getCenterHeaderGroups<
449
457
  'getVisibleLeafColumns',
450
458
  table_getVisibleLeafColumns,
451
459
  )
452
- const { left, right } =
460
+ const { start, end } =
453
461
  table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()
454
- if (left.length || right.length) {
455
- const leftAndRight: Array<string> = [...left, ...right]
462
+ if (start.length || end.length) {
463
+ const startAndEnd: Array<string> = [...start, ...end]
456
464
  leafColumns = leafColumns.filter(
457
- (column) => !leftAndRight.includes(column.id),
465
+ (column) => !startAndEnd.includes(column.id),
458
466
  )
459
467
  }
460
468
  return buildHeaderGroups(allColumns, leafColumns, table, 'center')
@@ -463,45 +471,45 @@ export function table_getCenterHeaderGroups<
463
471
  // footer groups
464
472
 
465
473
  /**
466
- * Builds footer groups for the left pinned region.
474
+ * Builds footer groups for the start pinned region.
467
475
  *
468
- * Footer groups reuse the left header groups in reverse order.
476
+ * Footer groups reuse the start header groups in reverse order.
469
477
  *
470
478
  * @example
471
479
  * ```ts
472
- * const footerGroups = table_getLeftFooterGroups(table)
480
+ * const footerGroups = table_getStartFooterGroups(table)
473
481
  * ```
474
482
  */
475
- export function table_getLeftFooterGroups<
483
+ export function table_getStartFooterGroups<
476
484
  TFeatures extends TableFeatures,
477
485
  TData extends RowData,
478
486
  >(table: Table_Internal<TFeatures, TData>) {
479
487
  const headerGroups = callMemoOrStaticFn(
480
488
  table,
481
- 'getLeftHeaderGroups',
482
- table_getLeftHeaderGroups,
489
+ 'getStartHeaderGroups',
490
+ table_getStartHeaderGroups,
483
491
  )
484
492
  return [...headerGroups].reverse()
485
493
  }
486
494
 
487
495
  /**
488
- * Builds footer groups for the right pinned region.
496
+ * Builds footer groups for the end pinned region.
489
497
  *
490
- * Footer groups reuse the right header groups in reverse order.
498
+ * Footer groups reuse the end header groups in reverse order.
491
499
  *
492
500
  * @example
493
501
  * ```ts
494
- * const footerGroups = table_getRightFooterGroups(table)
502
+ * const footerGroups = table_getEndFooterGroups(table)
495
503
  * ```
496
504
  */
497
- export function table_getRightFooterGroups<
505
+ export function table_getEndFooterGroups<
498
506
  TFeatures extends TableFeatures,
499
507
  TData extends RowData,
500
508
  >(table: Table_Internal<TFeatures, TData>) {
501
509
  const headerGroups = callMemoOrStaticFn(
502
510
  table,
503
- 'getRightHeaderGroups',
504
- table_getRightHeaderGroups,
511
+ 'getEndHeaderGroups',
512
+ table_getEndHeaderGroups,
505
513
  )
506
514
  return [...headerGroups].reverse()
507
515
  }
@@ -531,23 +539,23 @@ export function table_getCenterFooterGroups<
531
539
  // flat headers
532
540
 
533
541
  /**
534
- * Flattens every header from the left pinned header groups.
542
+ * Flattens every header from the start pinned header groups.
535
543
  *
536
544
  * Parent headers and placeholder headers are included.
537
545
  *
538
546
  * @example
539
547
  * ```ts
540
- * const headers = table_getLeftFlatHeaders(table)
548
+ * const headers = table_getStartFlatHeaders(table)
541
549
  * ```
542
550
  */
543
- export function table_getLeftFlatHeaders<
551
+ export function table_getStartFlatHeaders<
544
552
  TFeatures extends TableFeatures,
545
553
  TData extends RowData,
546
554
  >(table: Table_Internal<TFeatures, TData>) {
547
555
  const leftHeaderGroups = callMemoOrStaticFn(
548
556
  table,
549
- 'getLeftHeaderGroups',
550
- table_getLeftHeaderGroups,
557
+ 'getStartHeaderGroups',
558
+ table_getStartHeaderGroups,
551
559
  )
552
560
  const result: Array<Header<TFeatures, TData, unknown>> = []
553
561
  for (let i = 0; i < leftHeaderGroups.length; i++) {
@@ -560,23 +568,23 @@ export function table_getLeftFlatHeaders<
560
568
  }
561
569
 
562
570
  /**
563
- * Flattens every header from the right pinned header groups.
571
+ * Flattens every header from the end pinned header groups.
564
572
  *
565
573
  * Parent headers and placeholder headers are included.
566
574
  *
567
575
  * @example
568
576
  * ```ts
569
- * const headers = table_getRightFlatHeaders(table)
577
+ * const headers = table_getEndFlatHeaders(table)
570
578
  * ```
571
579
  */
572
- export function table_getRightFlatHeaders<
580
+ export function table_getEndFlatHeaders<
573
581
  TFeatures extends TableFeatures,
574
582
  TData extends RowData,
575
583
  >(table: Table_Internal<TFeatures, TData>) {
576
584
  const rightHeaderGroups = callMemoOrStaticFn(
577
585
  table,
578
- 'getRightHeaderGroups',
579
- table_getRightHeaderGroups,
586
+ 'getEndHeaderGroups',
587
+ table_getEndHeaderGroups,
580
588
  )
581
589
  const result: Array<Header<TFeatures, TData, unknown>> = []
582
590
  for (let i = 0; i < rightHeaderGroups.length; i++) {
@@ -620,44 +628,44 @@ export function table_getCenterFlatHeaders<
620
628
  // leaf headers
621
629
 
622
630
  /**
623
- * Collects leaf headers for the left pinned region.
631
+ * Collects leaf headers for the start pinned region.
624
632
  *
625
- * Parent headers are filtered out from the left flat header list.
633
+ * Parent headers are filtered out from the start flat header list.
626
634
  *
627
635
  * @example
628
636
  * ```ts
629
- * const headers = table_getLeftLeafHeaders(table)
637
+ * const headers = table_getStartLeafHeaders(table)
630
638
  * ```
631
639
  */
632
- export function table_getLeftLeafHeaders<
640
+ export function table_getStartLeafHeaders<
633
641
  TFeatures extends TableFeatures,
634
642
  TData extends RowData,
635
643
  >(table: Table_Internal<TFeatures, TData>) {
636
644
  return callMemoOrStaticFn(
637
645
  table,
638
- 'getLeftFlatHeaders',
639
- table_getLeftFlatHeaders,
646
+ 'getStartFlatHeaders',
647
+ table_getStartFlatHeaders,
640
648
  ).filter((header) => !header.subHeaders.length)
641
649
  }
642
650
 
643
651
  /**
644
- * Collects leaf headers for the right pinned region.
652
+ * Collects leaf headers for the end pinned region.
645
653
  *
646
- * Parent headers are filtered out from the right flat header list.
654
+ * Parent headers are filtered out from the end flat header list.
647
655
  *
648
656
  * @example
649
657
  * ```ts
650
- * const headers = table_getRightLeafHeaders(table)
658
+ * const headers = table_getEndLeafHeaders(table)
651
659
  * ```
652
660
  */
653
- export function table_getRightLeafHeaders<
661
+ export function table_getEndLeafHeaders<
654
662
  TFeatures extends TableFeatures,
655
663
  TData extends RowData,
656
664
  >(table: Table_Internal<TFeatures, TData>) {
657
665
  return callMemoOrStaticFn(
658
666
  table,
659
- 'getRightFlatHeaders',
660
- table_getRightFlatHeaders,
667
+ 'getEndFlatHeaders',
668
+ table_getEndFlatHeaders,
661
669
  ).filter((header) => !header.subHeaders.length)
662
670
  }
663
671
 
@@ -685,61 +693,61 @@ export function table_getCenterLeafHeaders<
685
693
  // leaf columns
686
694
 
687
695
  /**
688
- * Resolves leaf columns pinned to the left region.
696
+ * Resolves leaf columns pinned to the start region.
689
697
  *
690
- * The result follows `state.columnPinning.left` order and skips stale ids that
698
+ * The result follows `state.columnPinning.start` order and skips stale ids that
691
699
  * no longer correspond to a leaf column.
692
700
  *
693
701
  * @example
694
702
  * ```ts
695
- * const columns = table_getLeftLeafColumns(table)
703
+ * const columns = table_getStartLeafColumns(table)
696
704
  * ```
697
705
  */
698
- export function table_getLeftLeafColumns<
706
+ export function table_getStartLeafColumns<
699
707
  TFeatures extends TableFeatures,
700
708
  TData extends RowData,
701
709
  >(table: Table_Internal<TFeatures, TData>) {
702
- const { left } =
710
+ const { start } =
703
711
  table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()
704
712
  const leafColumnsById = table.getAllLeafColumnsById()
705
713
  const result: Array<Column_Internal<TFeatures, TData, unknown>> = []
706
- for (let i = 0; i < left.length; i++) {
707
- const column = leafColumnsById[left[i]!]
714
+ for (let i = 0; i < start.length; i++) {
715
+ const column = leafColumnsById[start[i]!]
708
716
  if (column) result.push(column)
709
717
  }
710
718
  return result
711
719
  }
712
720
 
713
721
  /**
714
- * Resolves leaf columns pinned to the right region.
722
+ * Resolves leaf columns pinned to the end region.
715
723
  *
716
- * The result follows `state.columnPinning.right` order and skips stale ids that
724
+ * The result follows `state.columnPinning.end` order and skips stale ids that
717
725
  * no longer correspond to a leaf column.
718
726
  *
719
727
  * @example
720
728
  * ```ts
721
- * const columns = table_getRightLeafColumns(table)
729
+ * const columns = table_getEndLeafColumns(table)
722
730
  * ```
723
731
  */
724
- export function table_getRightLeafColumns<
732
+ export function table_getEndLeafColumns<
725
733
  TFeatures extends TableFeatures,
726
734
  TData extends RowData,
727
735
  >(table: Table_Internal<TFeatures, TData>) {
728
- const { right } =
736
+ const { end } =
729
737
  table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()
730
738
  const leafColumnsById = table.getAllLeafColumnsById()
731
739
  const result: Array<Column_Internal<TFeatures, TData, unknown>> = []
732
- for (let i = 0; i < right.length; i++) {
733
- const column = leafColumnsById[right[i]!]
740
+ for (let i = 0; i < end.length; i++) {
741
+ const column = leafColumnsById[end[i]!]
734
742
  if (column) result.push(column)
735
743
  }
736
744
  return result
737
745
  }
738
746
 
739
747
  /**
740
- * Resolves leaf columns that are not pinned to either side.
748
+ * Resolves leaf columns that are not pinned to either logical side.
741
749
  *
742
- * Left- and right-pinned ids are removed from `table.getAllLeafColumns()`.
750
+ * Start- and end-pinned ids are removed from `table.getAllLeafColumns()`.
743
751
  *
744
752
  * @example
745
753
  * ```ts
@@ -750,19 +758,19 @@ export function table_getCenterLeafColumns<
750
758
  TFeatures extends TableFeatures,
751
759
  TData extends RowData,
752
760
  >(table: Table_Internal<TFeatures, TData>) {
753
- const { left, right } =
761
+ const { start, end } =
754
762
  table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()
755
- if (!left.length && !right.length) {
763
+ if (!start.length && !end.length) {
756
764
  return table.getAllLeafColumns()
757
765
  }
758
- const leftAndRight: Array<string> = [...left, ...right]
759
- return table.getAllLeafColumns().filter((d) => !leftAndRight.includes(d.id))
766
+ const startAndEnd: Array<string> = [...start, ...end]
767
+ return table.getAllLeafColumns().filter((d) => !startAndEnd.includes(d.id))
760
768
  }
761
769
 
762
770
  /**
763
771
  * Resolves leaf columns for a requested pinning region.
764
772
  *
765
- * Pass `'left'`, `'center'`, or `'right'` for a partition, or pass `false` to
773
+ * Pass `'start'`, `'center'`, or `'end'` for a partition, or pass `false` to
766
774
  * read all leaf columns without partitioning.
767
775
  *
768
776
  * @example
@@ -779,17 +787,17 @@ export function table_getPinnedLeafColumns<
779
787
  ) {
780
788
  return !position
781
789
  ? table.getAllLeafColumns()
782
- : position === 'left'
790
+ : position === 'start'
783
791
  ? callMemoOrStaticFn(
784
792
  table,
785
- 'getLeftLeafColumns',
786
- table_getLeftLeafColumns,
793
+ 'getStartLeafColumns',
794
+ table_getStartLeafColumns,
787
795
  )
788
- : position === 'right'
796
+ : position === 'end'
789
797
  ? callMemoOrStaticFn(
790
798
  table,
791
- 'getRightLeafColumns',
792
- table_getRightLeafColumns,
799
+ 'getEndLeafColumns',
800
+ table_getEndLeafColumns,
793
801
  )
794
802
  : callMemoOrStaticFn(
795
803
  table,
@@ -801,46 +809,46 @@ export function table_getPinnedLeafColumns<
801
809
  // visible leaf columns
802
810
 
803
811
  /**
804
- * Resolves visible leaf columns pinned to the left region.
812
+ * Resolves visible leaf columns pinned to the start region.
805
813
  *
806
- * Hidden pinned columns are filtered out after the left pin order is applied.
814
+ * Hidden pinned columns are filtered out after the start pin order is applied.
807
815
  *
808
816
  * @example
809
817
  * ```ts
810
- * const columns = table_getLeftVisibleLeafColumns(table)
818
+ * const columns = table_getStartVisibleLeafColumns(table)
811
819
  * ```
812
820
  */
813
- export function table_getLeftVisibleLeafColumns<
821
+ export function table_getStartVisibleLeafColumns<
814
822
  TFeatures extends TableFeatures,
815
823
  TData extends RowData,
816
824
  >(table: Table_Internal<TFeatures, TData>) {
817
825
  return callMemoOrStaticFn(
818
826
  table,
819
- 'getLeftLeafColumns',
820
- table_getLeftLeafColumns,
827
+ 'getStartLeafColumns',
828
+ table_getStartLeafColumns,
821
829
  ).filter((column) =>
822
830
  callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible),
823
831
  )
824
832
  }
825
833
 
826
834
  /**
827
- * Resolves visible leaf columns pinned to the right region.
835
+ * Resolves visible leaf columns pinned to the end region.
828
836
  *
829
- * Hidden pinned columns are filtered out after the right pin order is applied.
837
+ * Hidden pinned columns are filtered out after the end pin order is applied.
830
838
  *
831
839
  * @example
832
840
  * ```ts
833
- * const columns = table_getRightVisibleLeafColumns(table)
841
+ * const columns = table_getEndVisibleLeafColumns(table)
834
842
  * ```
835
843
  */
836
- export function table_getRightVisibleLeafColumns<
844
+ export function table_getEndVisibleLeafColumns<
837
845
  TFeatures extends TableFeatures,
838
846
  TData extends RowData,
839
847
  >(table: Table_Internal<TFeatures, TData>) {
840
848
  return callMemoOrStaticFn(
841
849
  table,
842
- 'getRightLeafColumns',
843
- table_getRightLeafColumns,
850
+ 'getEndLeafColumns',
851
+ table_getEndLeafColumns,
844
852
  ).filter((column) =>
845
853
  callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible),
846
854
  )
@@ -873,12 +881,12 @@ export function table_getCenterVisibleLeafColumns<
873
881
  /**
874
882
  * Resolves visible leaf columns for a requested pinning region.
875
883
  *
876
- * Omit `position` to get all visible leaf columns, or pass `'left'`, `'center'`,
877
- * or `'right'` to get one partition.
884
+ * Omit `position` to get all visible leaf columns, or pass `'start'`, `'center'`,
885
+ * or `'end'` to get one partition.
878
886
  *
879
887
  * @example
880
888
  * ```ts
881
- * const columns = table_getPinnedVisibleLeafColumns(table, 'left')
889
+ * const columns = table_getPinnedVisibleLeafColumns(table, 'start')
882
890
  * ```
883
891
  */
884
892
  export function table_getPinnedVisibleLeafColumns<
@@ -894,17 +902,17 @@ export function table_getPinnedVisibleLeafColumns<
894
902
  'getVisibleLeafColumns',
895
903
  table_getVisibleLeafColumns,
896
904
  )
897
- : position === 'left'
905
+ : position === 'start'
898
906
  ? callMemoOrStaticFn(
899
907
  table,
900
- 'getLeftVisibleLeafColumns',
901
- table_getLeftVisibleLeafColumns,
908
+ 'getStartVisibleLeafColumns',
909
+ table_getStartVisibleLeafColumns,
902
910
  )
903
- : position === 'right'
911
+ : position === 'end'
904
912
  ? callMemoOrStaticFn(
905
913
  table,
906
- 'getRightVisibleLeafColumns',
907
- table_getRightVisibleLeafColumns,
914
+ 'getEndVisibleLeafColumns',
915
+ table_getEndVisibleLeafColumns,
908
916
  )
909
917
  : callMemoOrStaticFn(
910
918
  table,