@tanstack/svelte-table 8.0.11 → 8.0.14

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.
@@ -26,9 +26,9 @@ function functionalUpdate(updater, input) {
26
26
  }
27
27
  function noop() {//
28
28
  }
29
- function makeStateUpdater(key, instance) {
29
+ function makeStateUpdater(key, table) {
30
30
  return updater => {
31
- instance.setState(old => {
31
+ table.setState(old => {
32
32
  return { ...old,
33
33
  [key]: functionalUpdate(updater, old[key])
34
34
  };
@@ -98,38 +98,37 @@ function memo(getDeps, fn, opts) {
98
98
  };
99
99
  }
100
100
 
101
- function createColumn(instance, columnDef, depth, parent) {
102
- var _ref, _columnDef$id;
101
+ function createColumn(table, columnDef, depth, parent) {
102
+ var _ref, _resolvedColumnDef$id;
103
103
 
104
- const defaultColumn = instance._getDefaultColumnDef();
104
+ const defaultColumn = table._getDefaultColumnDef();
105
105
 
106
- columnDef = { ...defaultColumn,
106
+ const resolvedColumnDef = { ...defaultColumn,
107
107
  ...columnDef
108
108
  };
109
- let id = (_ref = (_columnDef$id = columnDef.id) != null ? _columnDef$id : columnDef.accessorKey) != null ? _ref : typeof columnDef.header === 'string' ? columnDef.header : undefined;
109
+ let id = (_ref = (_resolvedColumnDef$id = resolvedColumnDef.id) != null ? _resolvedColumnDef$id : resolvedColumnDef.accessorKey) != null ? _ref : typeof resolvedColumnDef.header === 'string' ? resolvedColumnDef.header : undefined;
110
110
  let accessorFn;
111
111
 
112
- if (columnDef.accessorFn) {
113
- accessorFn = columnDef.accessorFn;
114
- } else if (columnDef.accessorKey) {
115
- accessorFn = originalRow => originalRow[columnDef.accessorKey];
112
+ if (resolvedColumnDef.accessorFn) {
113
+ accessorFn = resolvedColumnDef.accessorFn;
114
+ } else if (resolvedColumnDef.accessorKey) {
115
+ accessorFn = originalRow => originalRow[resolvedColumnDef.accessorKey];
116
116
  }
117
117
 
118
118
  if (!id) {
119
119
  if (process.env.NODE_ENV !== 'production') {
120
- throw new Error(columnDef.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header");
120
+ throw new Error(resolvedColumnDef.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header");
121
121
  }
122
122
 
123
123
  throw new Error();
124
124
  }
125
125
 
126
126
  let column = {
127
- id: "" + id,
127
+ id: "" + String(id),
128
128
  accessorFn,
129
129
  parent: parent,
130
130
  depth,
131
- columnDef,
132
- columnDefType: columnDef.columnDefType,
131
+ columnDef: resolvedColumnDef,
133
132
  columns: [],
134
133
  getFlatColumns: memo(() => [true], () => {
135
134
  var _column$columns;
@@ -138,12 +137,12 @@ function createColumn(instance, columnDef, depth, parent) {
138
137
  }, {
139
138
  key: process.env.NODE_ENV === 'production' && 'column.getFlatColumns',
140
139
  debug: () => {
141
- var _instance$options$deb;
140
+ var _table$options$debugA;
142
141
 
143
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugColumns;
142
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugColumns;
144
143
  }
145
144
  }),
146
- getLeafColumns: memo(() => [instance._getOrderColumnsFn()], orderColumns => {
145
+ getLeafColumns: memo(() => [table._getOrderColumnsFn()], orderColumns => {
147
146
  var _column$columns2;
148
147
 
149
148
  if ((_column$columns2 = column.columns) != null && _column$columns2.length) {
@@ -155,21 +154,21 @@ function createColumn(instance, columnDef, depth, parent) {
155
154
  }, {
156
155
  key: process.env.NODE_ENV === 'production' && 'column.getLeafColumns',
157
156
  debug: () => {
158
- var _instance$options$deb2;
157
+ var _table$options$debugA2;
159
158
 
160
- return (_instance$options$deb2 = instance.options.debugAll) != null ? _instance$options$deb2 : instance.options.debugColumns;
159
+ return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugColumns;
161
160
  }
162
161
  })
163
162
  };
164
- column = instance._features.reduce((obj, feature) => {
165
- return Object.assign(obj, feature.createColumn == null ? void 0 : feature.createColumn(column, instance));
166
- }, column); // Yes, we have to convert instance to uknown, because we know more than the compiler here.
163
+ column = table._features.reduce((obj, feature) => {
164
+ return Object.assign(obj, feature.createColumn == null ? void 0 : feature.createColumn(column, table));
165
+ }, column); // Yes, we have to convert table to uknown, because we know more than the compiler here.
167
166
 
168
167
  return column;
169
168
  }
170
169
 
171
170
  //
172
- function createHeader(instance, column, options) {
171
+ function createHeader(table, column, options) {
173
172
  var _options$id;
174
173
 
175
174
  const id = (_options$id = options.id) != null ? _options$id : column.id;
@@ -198,174 +197,169 @@ function createHeader(instance, column, options) {
198
197
  recurseHeader(header);
199
198
  return leafHeaders;
200
199
  },
201
- renderHeader: () => column.columnDef.header ? instance._render(column.columnDef.header, {
202
- instance,
200
+ getContext: () => ({
201
+ table,
203
202
  header: header,
204
203
  column
205
- }) : null,
206
- renderFooter: () => column.columnDef.footer ? instance._render(column.columnDef.footer, {
207
- instance,
208
- header: header,
209
- column
210
- }) : null
204
+ })
211
205
  };
212
206
 
213
- instance._features.forEach(feature => {
214
- Object.assign(header, feature.createHeader == null ? void 0 : feature.createHeader(header, instance));
207
+ table._features.forEach(feature => {
208
+ Object.assign(header, feature.createHeader == null ? void 0 : feature.createHeader(header, table));
215
209
  });
216
210
 
217
211
  return header;
218
212
  }
219
213
 
220
214
  const Headers = {
221
- createInstance: instance => {
215
+ createTable: table => {
222
216
  return {
223
217
  // Header Groups
224
- getHeaderGroups: memo(() => [instance.getAllColumns(), instance.getVisibleLeafColumns(), instance.getState().columnPinning.left, instance.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {
218
+ getHeaderGroups: memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {
225
219
  var _left$map$filter, _right$map$filter;
226
220
 
227
221
  const leftColumns = (_left$map$filter = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter : [];
228
222
  const rightColumns = (_right$map$filter = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter : [];
229
223
  const centerColumns = leafColumns.filter(column => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));
230
- const headerGroups = buildHeaderGroups(allColumns, [...leftColumns, ...centerColumns, ...rightColumns], instance);
224
+ const headerGroups = buildHeaderGroups(allColumns, [...leftColumns, ...centerColumns, ...rightColumns], table);
231
225
  return headerGroups;
232
226
  }, {
233
227
  key: process.env.NODE_ENV === 'development' && 'getHeaderGroups',
234
228
  debug: () => {
235
- var _instance$options$deb;
229
+ var _table$options$debugA;
236
230
 
237
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugHeaders;
231
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugHeaders;
238
232
  }
239
233
  }),
240
- getCenterHeaderGroups: memo(() => [instance.getAllColumns(), instance.getVisibleLeafColumns(), instance.getState().columnPinning.left, instance.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {
234
+ getCenterHeaderGroups: memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {
241
235
  leafColumns = leafColumns.filter(column => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));
242
- return buildHeaderGroups(allColumns, leafColumns, instance, 'center');
236
+ return buildHeaderGroups(allColumns, leafColumns, table, 'center');
243
237
  }, {
244
238
  key: process.env.NODE_ENV === 'development' && 'getCenterHeaderGroups',
245
239
  debug: () => {
246
- var _instance$options$deb2;
240
+ var _table$options$debugA2;
247
241
 
248
- return (_instance$options$deb2 = instance.options.debugAll) != null ? _instance$options$deb2 : instance.options.debugHeaders;
242
+ return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugHeaders;
249
243
  }
250
244
  }),
251
- getLeftHeaderGroups: memo(() => [instance.getAllColumns(), instance.getVisibleLeafColumns(), instance.getState().columnPinning.left], (allColumns, leafColumns, left) => {
245
+ getLeftHeaderGroups: memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left], (allColumns, leafColumns, left) => {
252
246
  var _left$map$filter2;
253
247
 
254
248
  const orderedLeafColumns = (_left$map$filter2 = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter2 : [];
255
- return buildHeaderGroups(allColumns, orderedLeafColumns, instance, 'left');
249
+ return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'left');
256
250
  }, {
257
251
  key: process.env.NODE_ENV === 'development' && 'getLeftHeaderGroups',
258
252
  debug: () => {
259
- var _instance$options$deb3;
253
+ var _table$options$debugA3;
260
254
 
261
- return (_instance$options$deb3 = instance.options.debugAll) != null ? _instance$options$deb3 : instance.options.debugHeaders;
255
+ return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugHeaders;
262
256
  }
263
257
  }),
264
- getRightHeaderGroups: memo(() => [instance.getAllColumns(), instance.getVisibleLeafColumns(), instance.getState().columnPinning.right], (allColumns, leafColumns, right) => {
258
+ getRightHeaderGroups: memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.right], (allColumns, leafColumns, right) => {
265
259
  var _right$map$filter2;
266
260
 
267
261
  const orderedLeafColumns = (_right$map$filter2 = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter2 : [];
268
- return buildHeaderGroups(allColumns, orderedLeafColumns, instance, 'right');
262
+ return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'right');
269
263
  }, {
270
264
  key: process.env.NODE_ENV === 'development' && 'getRightHeaderGroups',
271
265
  debug: () => {
272
- var _instance$options$deb4;
266
+ var _table$options$debugA4;
273
267
 
274
- return (_instance$options$deb4 = instance.options.debugAll) != null ? _instance$options$deb4 : instance.options.debugHeaders;
268
+ return (_table$options$debugA4 = table.options.debugAll) != null ? _table$options$debugA4 : table.options.debugHeaders;
275
269
  }
276
270
  }),
277
271
  // Footer Groups
278
- getFooterGroups: memo(() => [instance.getHeaderGroups()], headerGroups => {
272
+ getFooterGroups: memo(() => [table.getHeaderGroups()], headerGroups => {
279
273
  return [...headerGroups].reverse();
280
274
  }, {
281
275
  key: process.env.NODE_ENV === 'development' && 'getFooterGroups',
282
276
  debug: () => {
283
- var _instance$options$deb5;
277
+ var _table$options$debugA5;
284
278
 
285
- return (_instance$options$deb5 = instance.options.debugAll) != null ? _instance$options$deb5 : instance.options.debugHeaders;
279
+ return (_table$options$debugA5 = table.options.debugAll) != null ? _table$options$debugA5 : table.options.debugHeaders;
286
280
  }
287
281
  }),
288
- getLeftFooterGroups: memo(() => [instance.getLeftHeaderGroups()], headerGroups => {
282
+ getLeftFooterGroups: memo(() => [table.getLeftHeaderGroups()], headerGroups => {
289
283
  return [...headerGroups].reverse();
290
284
  }, {
291
285
  key: process.env.NODE_ENV === 'development' && 'getLeftFooterGroups',
292
286
  debug: () => {
293
- var _instance$options$deb6;
287
+ var _table$options$debugA6;
294
288
 
295
- return (_instance$options$deb6 = instance.options.debugAll) != null ? _instance$options$deb6 : instance.options.debugHeaders;
289
+ return (_table$options$debugA6 = table.options.debugAll) != null ? _table$options$debugA6 : table.options.debugHeaders;
296
290
  }
297
291
  }),
298
- getCenterFooterGroups: memo(() => [instance.getCenterHeaderGroups()], headerGroups => {
292
+ getCenterFooterGroups: memo(() => [table.getCenterHeaderGroups()], headerGroups => {
299
293
  return [...headerGroups].reverse();
300
294
  }, {
301
295
  key: process.env.NODE_ENV === 'development' && 'getCenterFooterGroups',
302
296
  debug: () => {
303
- var _instance$options$deb7;
297
+ var _table$options$debugA7;
304
298
 
305
- return (_instance$options$deb7 = instance.options.debugAll) != null ? _instance$options$deb7 : instance.options.debugHeaders;
299
+ return (_table$options$debugA7 = table.options.debugAll) != null ? _table$options$debugA7 : table.options.debugHeaders;
306
300
  }
307
301
  }),
308
- getRightFooterGroups: memo(() => [instance.getRightHeaderGroups()], headerGroups => {
302
+ getRightFooterGroups: memo(() => [table.getRightHeaderGroups()], headerGroups => {
309
303
  return [...headerGroups].reverse();
310
304
  }, {
311
305
  key: process.env.NODE_ENV === 'development' && 'getRightFooterGroups',
312
306
  debug: () => {
313
- var _instance$options$deb8;
307
+ var _table$options$debugA8;
314
308
 
315
- return (_instance$options$deb8 = instance.options.debugAll) != null ? _instance$options$deb8 : instance.options.debugHeaders;
309
+ return (_table$options$debugA8 = table.options.debugAll) != null ? _table$options$debugA8 : table.options.debugHeaders;
316
310
  }
317
311
  }),
318
312
  // Flat Headers
319
- getFlatHeaders: memo(() => [instance.getHeaderGroups()], headerGroups => {
313
+ getFlatHeaders: memo(() => [table.getHeaderGroups()], headerGroups => {
320
314
  return headerGroups.map(headerGroup => {
321
315
  return headerGroup.headers;
322
316
  }).flat();
323
317
  }, {
324
318
  key: process.env.NODE_ENV === 'development' && 'getFlatHeaders',
325
319
  debug: () => {
326
- var _instance$options$deb9;
320
+ var _table$options$debugA9;
327
321
 
328
- return (_instance$options$deb9 = instance.options.debugAll) != null ? _instance$options$deb9 : instance.options.debugHeaders;
322
+ return (_table$options$debugA9 = table.options.debugAll) != null ? _table$options$debugA9 : table.options.debugHeaders;
329
323
  }
330
324
  }),
331
- getLeftFlatHeaders: memo(() => [instance.getLeftHeaderGroups()], left => {
325
+ getLeftFlatHeaders: memo(() => [table.getLeftHeaderGroups()], left => {
332
326
  return left.map(headerGroup => {
333
327
  return headerGroup.headers;
334
328
  }).flat();
335
329
  }, {
336
330
  key: process.env.NODE_ENV === 'development' && 'getLeftFlatHeaders',
337
331
  debug: () => {
338
- var _instance$options$deb10;
332
+ var _table$options$debugA10;
339
333
 
340
- return (_instance$options$deb10 = instance.options.debugAll) != null ? _instance$options$deb10 : instance.options.debugHeaders;
334
+ return (_table$options$debugA10 = table.options.debugAll) != null ? _table$options$debugA10 : table.options.debugHeaders;
341
335
  }
342
336
  }),
343
- getCenterFlatHeaders: memo(() => [instance.getCenterHeaderGroups()], left => {
337
+ getCenterFlatHeaders: memo(() => [table.getCenterHeaderGroups()], left => {
344
338
  return left.map(headerGroup => {
345
339
  return headerGroup.headers;
346
340
  }).flat();
347
341
  }, {
348
342
  key: process.env.NODE_ENV === 'development' && 'getCenterFlatHeaders',
349
343
  debug: () => {
350
- var _instance$options$deb11;
344
+ var _table$options$debugA11;
351
345
 
352
- return (_instance$options$deb11 = instance.options.debugAll) != null ? _instance$options$deb11 : instance.options.debugHeaders;
346
+ return (_table$options$debugA11 = table.options.debugAll) != null ? _table$options$debugA11 : table.options.debugHeaders;
353
347
  }
354
348
  }),
355
- getRightFlatHeaders: memo(() => [instance.getRightHeaderGroups()], left => {
349
+ getRightFlatHeaders: memo(() => [table.getRightHeaderGroups()], left => {
356
350
  return left.map(headerGroup => {
357
351
  return headerGroup.headers;
358
352
  }).flat();
359
353
  }, {
360
354
  key: process.env.NODE_ENV === 'development' && 'getRightFlatHeaders',
361
355
  debug: () => {
362
- var _instance$options$deb12;
356
+ var _table$options$debugA12;
363
357
 
364
- return (_instance$options$deb12 = instance.options.debugAll) != null ? _instance$options$deb12 : instance.options.debugHeaders;
358
+ return (_table$options$debugA12 = table.options.debugAll) != null ? _table$options$debugA12 : table.options.debugHeaders;
365
359
  }
366
360
  }),
367
361
  // Leaf Headers
368
- getCenterLeafHeaders: memo(() => [instance.getCenterFlatHeaders()], flatHeaders => {
362
+ getCenterLeafHeaders: memo(() => [table.getCenterFlatHeaders()], flatHeaders => {
369
363
  return flatHeaders.filter(header => {
370
364
  var _header$subHeaders;
371
365
 
@@ -374,12 +368,12 @@ const Headers = {
374
368
  }, {
375
369
  key: process.env.NODE_ENV === 'development' && 'getCenterLeafHeaders',
376
370
  debug: () => {
377
- var _instance$options$deb13;
371
+ var _table$options$debugA13;
378
372
 
379
- return (_instance$options$deb13 = instance.options.debugAll) != null ? _instance$options$deb13 : instance.options.debugHeaders;
373
+ return (_table$options$debugA13 = table.options.debugAll) != null ? _table$options$debugA13 : table.options.debugHeaders;
380
374
  }
381
375
  }),
382
- getLeftLeafHeaders: memo(() => [instance.getLeftFlatHeaders()], flatHeaders => {
376
+ getLeftLeafHeaders: memo(() => [table.getLeftFlatHeaders()], flatHeaders => {
383
377
  return flatHeaders.filter(header => {
384
378
  var _header$subHeaders2;
385
379
 
@@ -388,12 +382,12 @@ const Headers = {
388
382
  }, {
389
383
  key: process.env.NODE_ENV === 'development' && 'getLeftLeafHeaders',
390
384
  debug: () => {
391
- var _instance$options$deb14;
385
+ var _table$options$debugA14;
392
386
 
393
- return (_instance$options$deb14 = instance.options.debugAll) != null ? _instance$options$deb14 : instance.options.debugHeaders;
387
+ return (_table$options$debugA14 = table.options.debugAll) != null ? _table$options$debugA14 : table.options.debugHeaders;
394
388
  }
395
389
  }),
396
- getRightLeafHeaders: memo(() => [instance.getRightFlatHeaders()], flatHeaders => {
390
+ getRightLeafHeaders: memo(() => [table.getRightFlatHeaders()], flatHeaders => {
397
391
  return flatHeaders.filter(header => {
398
392
  var _header$subHeaders3;
399
393
 
@@ -402,12 +396,12 @@ const Headers = {
402
396
  }, {
403
397
  key: process.env.NODE_ENV === 'development' && 'getRightLeafHeaders',
404
398
  debug: () => {
405
- var _instance$options$deb15;
399
+ var _table$options$debugA15;
406
400
 
407
- return (_instance$options$deb15 = instance.options.debugAll) != null ? _instance$options$deb15 : instance.options.debugHeaders;
401
+ return (_table$options$debugA15 = table.options.debugAll) != null ? _table$options$debugA15 : table.options.debugHeaders;
408
402
  }
409
403
  }),
410
- getLeafHeaders: memo(() => [instance.getLeftHeaderGroups(), instance.getCenterHeaderGroups(), instance.getRightHeaderGroups()], (left, center, right) => {
404
+ getLeafHeaders: memo(() => [table.getLeftHeaderGroups(), table.getCenterHeaderGroups(), table.getRightHeaderGroups()], (left, center, right) => {
411
405
  var _left$0$headers, _left$, _center$0$headers, _center$, _right$0$headers, _right$;
412
406
 
413
407
  return [...((_left$0$headers = (_left$ = left[0]) == null ? void 0 : _left$.headers) != null ? _left$0$headers : []), ...((_center$0$headers = (_center$ = center[0]) == null ? void 0 : _center$.headers) != null ? _center$0$headers : []), ...((_right$0$headers = (_right$ = right[0]) == null ? void 0 : _right$.headers) != null ? _right$0$headers : [])].map(header => {
@@ -416,15 +410,15 @@ const Headers = {
416
410
  }, {
417
411
  key: process.env.NODE_ENV === 'development' && 'getLeafHeaders',
418
412
  debug: () => {
419
- var _instance$options$deb16;
413
+ var _table$options$debugA16;
420
414
 
421
- return (_instance$options$deb16 = instance.options.debugAll) != null ? _instance$options$deb16 : instance.options.debugHeaders;
415
+ return (_table$options$debugA16 = table.options.debugAll) != null ? _table$options$debugA16 : table.options.debugHeaders;
422
416
  }
423
417
  })
424
418
  };
425
419
  }
426
420
  };
427
- function buildHeaderGroups(allColumns, columnsToGroup, instance, headerFamily) {
421
+ function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
428
422
  var _headerGroups$0$heade, _headerGroups$;
429
423
 
430
424
  // Find the max depth of the columns:
@@ -478,12 +472,12 @@ function buildHeaderGroups(allColumns, columnsToGroup, instance, headerFamily) {
478
472
  isPlaceholder = true;
479
473
  }
480
474
 
481
- if ((latestPendingParentHeader == null ? void 0 : latestPendingParentHeader.column) === column) {
475
+ if (latestPendingParentHeader && (latestPendingParentHeader == null ? void 0 : latestPendingParentHeader.column) === column) {
482
476
  // This column is repeated. Add it as a sub header to the next batch
483
477
  latestPendingParentHeader.subHeaders.push(headerToGroup);
484
478
  } else {
485
479
  // This is a new header. Let's create it
486
- const header = createHeader(instance, column, {
480
+ const header = createHeader(table, column, {
487
481
  id: [headerFamily, depth, column.id, headerToGroup == null ? void 0 : headerToGroup.id].filter(Boolean).join('_'),
488
482
  isPlaceholder,
489
483
  placeholderId: isPlaceholder ? "" + pendingParentHeaders.filter(d => d.column === column).length : undefined,
@@ -507,7 +501,7 @@ function buildHeaderGroups(allColumns, columnsToGroup, instance, headerFamily) {
507
501
  }
508
502
  };
509
503
 
510
- const bottomHeaders = columnsToGroup.map((column, index) => createHeader(instance, column, {
504
+ const bottomHeaders = columnsToGroup.map((column, index) => createHeader(table, column, {
511
505
  depth: maxDepth,
512
506
  index
513
507
  }));
@@ -579,23 +573,23 @@ const ColumnSizing = {
579
573
  ...state
580
574
  };
581
575
  },
582
- getDefaultOptions: instance => {
576
+ getDefaultOptions: table => {
583
577
  return {
584
578
  columnResizeMode: 'onEnd',
585
- onColumnSizingChange: makeStateUpdater('columnSizing', instance),
586
- onColumnSizingInfoChange: makeStateUpdater('columnSizingInfo', instance)
579
+ onColumnSizingChange: makeStateUpdater('columnSizing', table),
580
+ onColumnSizingInfoChange: makeStateUpdater('columnSizingInfo', table)
587
581
  };
588
582
  },
589
- createColumn: (column, instance) => {
583
+ createColumn: (column, table) => {
590
584
  return {
591
585
  getSize: () => {
592
586
  var _column$columnDef$min, _ref, _column$columnDef$max;
593
587
 
594
- const columnSize = instance.getState().columnSizing[column.id];
588
+ const columnSize = table.getState().columnSizing[column.id];
595
589
  return Math.min(Math.max((_column$columnDef$min = column.columnDef.minSize) != null ? _column$columnDef$min : defaultColumnSizing.minSize, (_ref = columnSize != null ? columnSize : column.columnDef.size) != null ? _ref : defaultColumnSizing.size), (_column$columnDef$max = column.columnDef.maxSize) != null ? _column$columnDef$max : defaultColumnSizing.maxSize);
596
590
  },
597
591
  getStart: position => {
598
- const columns = !position ? instance.getVisibleLeafColumns() : position === 'left' ? instance.getLeftVisibleLeafColumns() : instance.getRightVisibleLeafColumns();
592
+ const columns = !position ? table.getVisibleLeafColumns() : position === 'left' ? table.getLeftVisibleLeafColumns() : table.getRightVisibleLeafColumns();
599
593
  const index = columns.findIndex(d => d.id === column.id);
600
594
 
601
595
  if (index > 0) {
@@ -606,7 +600,7 @@ const ColumnSizing = {
606
600
  return 0;
607
601
  },
608
602
  resetSize: () => {
609
- instance.setColumnSizing(_ref2 => {
603
+ table.setColumnSizing(_ref2 => {
610
604
  let {
611
605
  [column.id]: _,
612
606
  ...rest
@@ -615,16 +609,16 @@ const ColumnSizing = {
615
609
  });
616
610
  },
617
611
  getCanResize: () => {
618
- var _column$columnDef$ena, _instance$options$ena;
612
+ var _column$columnDef$ena, _table$options$enable;
619
613
 
620
- return ((_column$columnDef$ena = column.columnDef.enableResizing) != null ? _column$columnDef$ena : true) && ((_instance$options$ena = instance.options.enableColumnResizing) != null ? _instance$options$ena : true);
614
+ return ((_column$columnDef$ena = column.columnDef.enableResizing) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableColumnResizing) != null ? _table$options$enable : true);
621
615
  },
622
616
  getIsResizing: () => {
623
- return instance.getState().columnSizingInfo.isResizingColumn === column.id;
617
+ return table.getState().columnSizingInfo.isResizingColumn === column.id;
624
618
  }
625
619
  };
626
620
  },
627
- createHeader: (header, instance) => {
621
+ createHeader: (header, table) => {
628
622
  return {
629
623
  getSize: () => {
630
624
  let sum = 0;
@@ -651,7 +645,7 @@ const ColumnSizing = {
651
645
  return 0;
652
646
  },
653
647
  getResizeHandler: () => {
654
- const column = instance.getColumn(header.column.id);
648
+ const column = table.getColumn(header.column.id);
655
649
  const canResize = column.getCanResize();
656
650
  return e => {
657
651
  if (!canResize) {
@@ -676,7 +670,7 @@ const ColumnSizing = {
676
670
  }
677
671
 
678
672
  let newColumnSizing = {};
679
- instance.setColumnSizingInfo(old => {
673
+ table.setColumnSizingInfo(old => {
680
674
  var _old$startOffset, _old$startSize;
681
675
 
682
676
  const deltaOffset = clientXPos - ((_old$startOffset = old == null ? void 0 : old.startOffset) != null ? _old$startOffset : 0);
@@ -691,8 +685,8 @@ const ColumnSizing = {
691
685
  };
692
686
  });
693
687
 
694
- if (instance.options.columnResizeMode === 'onChange' || eventType === 'end') {
695
- instance.setColumnSizing(old => ({ ...old,
688
+ if (table.options.columnResizeMode === 'onChange' || eventType === 'end') {
689
+ table.setColumnSizing(old => ({ ...old,
696
690
  ...newColumnSizing
697
691
  }));
698
692
  }
@@ -702,7 +696,7 @@ const ColumnSizing = {
702
696
 
703
697
  const onEnd = clientXPos => {
704
698
  updateOffset('end', clientXPos);
705
- instance.setColumnSizingInfo(old => ({ ...old,
699
+ table.setColumnSizingInfo(old => ({ ...old,
706
700
  isResizingColumn: false,
707
701
  startOffset: null,
708
702
  startSize: null,
@@ -729,7 +723,7 @@ const ColumnSizing = {
729
723
  document.addEventListener('mouseup', mouseEvents.upHandler, passiveIfSupported);
730
724
  }
731
725
 
732
- instance.setColumnSizingInfo(old => ({ ...old,
726
+ table.setColumnSizingInfo(old => ({ ...old,
733
727
  startOffset: clientX,
734
728
  startSize,
735
729
  deltaOffset: 0,
@@ -741,47 +735,47 @@ const ColumnSizing = {
741
735
  }
742
736
  };
743
737
  },
744
- createInstance: instance => {
738
+ createTable: table => {
745
739
  return {
746
- setColumnSizing: updater => instance.options.onColumnSizingChange == null ? void 0 : instance.options.onColumnSizingChange(updater),
747
- setColumnSizingInfo: updater => instance.options.onColumnSizingInfoChange == null ? void 0 : instance.options.onColumnSizingInfoChange(updater),
740
+ setColumnSizing: updater => table.options.onColumnSizingChange == null ? void 0 : table.options.onColumnSizingChange(updater),
741
+ setColumnSizingInfo: updater => table.options.onColumnSizingInfoChange == null ? void 0 : table.options.onColumnSizingInfoChange(updater),
748
742
  resetColumnSizing: defaultState => {
749
- var _instance$initialStat;
743
+ var _table$initialState$c;
750
744
 
751
- instance.setColumnSizing(defaultState ? {} : (_instance$initialStat = instance.initialState.columnSizing) != null ? _instance$initialStat : {});
745
+ table.setColumnSizing(defaultState ? {} : (_table$initialState$c = table.initialState.columnSizing) != null ? _table$initialState$c : {});
752
746
  },
753
747
  resetHeaderSizeInfo: defaultState => {
754
- var _instance$initialStat2;
748
+ var _table$initialState$c2;
755
749
 
756
- instance.setColumnSizingInfo(defaultState ? getDefaultColumnSizingInfoState() : (_instance$initialStat2 = instance.initialState.columnSizingInfo) != null ? _instance$initialStat2 : getDefaultColumnSizingInfoState());
750
+ table.setColumnSizingInfo(defaultState ? getDefaultColumnSizingInfoState() : (_table$initialState$c2 = table.initialState.columnSizingInfo) != null ? _table$initialState$c2 : getDefaultColumnSizingInfoState());
757
751
  },
758
752
  getTotalSize: () => {
759
- var _instance$getHeaderGr, _instance$getHeaderGr2;
753
+ var _table$getHeaderGroup, _table$getHeaderGroup2;
760
754
 
761
- return (_instance$getHeaderGr = (_instance$getHeaderGr2 = instance.getHeaderGroups()[0]) == null ? void 0 : _instance$getHeaderGr2.headers.reduce((sum, header) => {
755
+ return (_table$getHeaderGroup = (_table$getHeaderGroup2 = table.getHeaderGroups()[0]) == null ? void 0 : _table$getHeaderGroup2.headers.reduce((sum, header) => {
762
756
  return sum + header.getSize();
763
- }, 0)) != null ? _instance$getHeaderGr : 0;
757
+ }, 0)) != null ? _table$getHeaderGroup : 0;
764
758
  },
765
759
  getLeftTotalSize: () => {
766
- var _instance$getLeftHead, _instance$getLeftHead2;
760
+ var _table$getLeftHeaderG, _table$getLeftHeaderG2;
767
761
 
768
- return (_instance$getLeftHead = (_instance$getLeftHead2 = instance.getLeftHeaderGroups()[0]) == null ? void 0 : _instance$getLeftHead2.headers.reduce((sum, header) => {
762
+ return (_table$getLeftHeaderG = (_table$getLeftHeaderG2 = table.getLeftHeaderGroups()[0]) == null ? void 0 : _table$getLeftHeaderG2.headers.reduce((sum, header) => {
769
763
  return sum + header.getSize();
770
- }, 0)) != null ? _instance$getLeftHead : 0;
764
+ }, 0)) != null ? _table$getLeftHeaderG : 0;
771
765
  },
772
766
  getCenterTotalSize: () => {
773
- var _instance$getCenterHe, _instance$getCenterHe2;
767
+ var _table$getCenterHeade, _table$getCenterHeade2;
774
768
 
775
- return (_instance$getCenterHe = (_instance$getCenterHe2 = instance.getCenterHeaderGroups()[0]) == null ? void 0 : _instance$getCenterHe2.headers.reduce((sum, header) => {
769
+ return (_table$getCenterHeade = (_table$getCenterHeade2 = table.getCenterHeaderGroups()[0]) == null ? void 0 : _table$getCenterHeade2.headers.reduce((sum, header) => {
776
770
  return sum + header.getSize();
777
- }, 0)) != null ? _instance$getCenterHe : 0;
771
+ }, 0)) != null ? _table$getCenterHeade : 0;
778
772
  },
779
773
  getRightTotalSize: () => {
780
- var _instance$getRightHea, _instance$getRightHea2;
774
+ var _table$getRightHeader, _table$getRightHeader2;
781
775
 
782
- return (_instance$getRightHea = (_instance$getRightHea2 = instance.getRightHeaderGroups()[0]) == null ? void 0 : _instance$getRightHea2.headers.reduce((sum, header) => {
776
+ return (_table$getRightHeader = (_table$getRightHeader2 = table.getRightHeaderGroups()[0]) == null ? void 0 : _table$getRightHeader2.headers.reduce((sum, header) => {
783
777
  return sum + header.getSize();
784
- }, 0)) != null ? _instance$getRightHea : 0;
778
+ }, 0)) != null ? _table$getRightHeader : 0;
785
779
  }
786
780
  };
787
781
  }
@@ -824,65 +818,65 @@ const Expanding = {
824
818
  ...state
825
819
  };
826
820
  },
827
- getDefaultOptions: instance => {
821
+ getDefaultOptions: table => {
828
822
  return {
829
- onExpandedChange: makeStateUpdater('expanded', instance),
823
+ onExpandedChange: makeStateUpdater('expanded', table),
830
824
  paginateExpandedRows: true
831
825
  };
832
826
  },
833
- createInstance: instance => {
827
+ createTable: table => {
834
828
  let registered = false;
835
829
  let queued = false;
836
830
  return {
837
831
  _autoResetExpanded: () => {
838
- var _ref, _instance$options$aut;
832
+ var _ref, _table$options$autoRe;
839
833
 
840
834
  if (!registered) {
841
- instance._queue(() => {
835
+ table._queue(() => {
842
836
  registered = true;
843
837
  });
844
838
 
845
839
  return;
846
840
  }
847
841
 
848
- if ((_ref = (_instance$options$aut = instance.options.autoResetAll) != null ? _instance$options$aut : instance.options.autoResetExpanded) != null ? _ref : !instance.options.manualExpanding) {
842
+ if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetExpanded) != null ? _ref : !table.options.manualExpanding) {
849
843
  if (queued) return;
850
844
  queued = true;
851
845
 
852
- instance._queue(() => {
853
- instance.resetExpanded();
846
+ table._queue(() => {
847
+ table.resetExpanded();
854
848
  queued = false;
855
849
  });
856
850
  }
857
851
  },
858
- setExpanded: updater => instance.options.onExpandedChange == null ? void 0 : instance.options.onExpandedChange(updater),
852
+ setExpanded: updater => table.options.onExpandedChange == null ? void 0 : table.options.onExpandedChange(updater),
859
853
  toggleAllRowsExpanded: expanded => {
860
- if (expanded != null ? expanded : !instance.getIsAllRowsExpanded()) {
861
- instance.setExpanded(true);
854
+ if (expanded != null ? expanded : !table.getIsAllRowsExpanded()) {
855
+ table.setExpanded(true);
862
856
  } else {
863
- instance.setExpanded({});
857
+ table.setExpanded({});
864
858
  }
865
859
  },
866
860
  resetExpanded: defaultState => {
867
- var _instance$initialStat, _instance$initialStat2;
861
+ var _table$initialState$e, _table$initialState;
868
862
 
869
- instance.setExpanded(defaultState ? {} : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.expanded) != null ? _instance$initialStat : {});
863
+ table.setExpanded(defaultState ? {} : (_table$initialState$e = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.expanded) != null ? _table$initialState$e : {});
870
864
  },
871
865
  getCanSomeRowsExpand: () => {
872
- return instance.getRowModel().flatRows.some(row => row.getCanExpand());
866
+ return table.getRowModel().flatRows.some(row => row.getCanExpand());
873
867
  },
874
868
  getToggleAllRowsExpandedHandler: () => {
875
869
  return e => {
876
870
  e.persist == null ? void 0 : e.persist();
877
- instance.toggleAllRowsExpanded();
871
+ table.toggleAllRowsExpanded();
878
872
  };
879
873
  },
880
874
  getIsSomeRowsExpanded: () => {
881
- const expanded = instance.getState().expanded;
875
+ const expanded = table.getState().expanded;
882
876
  return expanded === true || Object.values(expanded).some(Boolean);
883
877
  },
884
878
  getIsAllRowsExpanded: () => {
885
- const expanded = instance.getState().expanded; // If expanded is true, save some cycles and return true
879
+ const expanded = table.getState().expanded; // If expanded is true, save some cycles and return true
886
880
 
887
881
  if (typeof expanded === 'boolean') {
888
882
  return expanded === true;
@@ -893,7 +887,7 @@ const Expanding = {
893
887
  } // If any row is not expanded, return false
894
888
 
895
889
 
896
- if (instance.getRowModel().flatRows.some(row => row.getIsExpanded())) {
890
+ if (table.getRowModel().flatRows.some(row => row.getIsExpanded())) {
897
891
  return false;
898
892
  } // They must all be expanded :shrug:
899
893
 
@@ -902,38 +896,38 @@ const Expanding = {
902
896
  },
903
897
  getExpandedDepth: () => {
904
898
  let maxDepth = 0;
905
- const rowIds = instance.getState().expanded === true ? Object.keys(instance.getRowModel().rowsById) : Object.keys(instance.getState().expanded);
899
+ const rowIds = table.getState().expanded === true ? Object.keys(table.getRowModel().rowsById) : Object.keys(table.getState().expanded);
906
900
  rowIds.forEach(id => {
907
901
  const splitId = id.split('.');
908
902
  maxDepth = Math.max(maxDepth, splitId.length);
909
903
  });
910
904
  return maxDepth;
911
905
  },
912
- getPreExpandedRowModel: () => instance.getSortedRowModel(),
906
+ getPreExpandedRowModel: () => table.getSortedRowModel(),
913
907
  getExpandedRowModel: () => {
914
- if (!instance._getExpandedRowModel && instance.options.getExpandedRowModel) {
915
- instance._getExpandedRowModel = instance.options.getExpandedRowModel(instance);
908
+ if (!table._getExpandedRowModel && table.options.getExpandedRowModel) {
909
+ table._getExpandedRowModel = table.options.getExpandedRowModel(table);
916
910
  }
917
911
 
918
- if (instance.options.manualExpanding || !instance._getExpandedRowModel) {
919
- return instance.getPreExpandedRowModel();
912
+ if (table.options.manualExpanding || !table._getExpandedRowModel) {
913
+ return table.getPreExpandedRowModel();
920
914
  }
921
915
 
922
- return instance._getExpandedRowModel();
916
+ return table._getExpandedRowModel();
923
917
  }
924
918
  };
925
919
  },
926
- createRow: (row, instance) => {
920
+ createRow: (row, table) => {
927
921
  return {
928
922
  toggleExpanded: expanded => {
929
- instance.setExpanded(old => {
923
+ table.setExpanded(old => {
930
924
  var _expanded;
931
925
 
932
926
  const exists = old === true ? true : !!(old != null && old[row.id]);
933
927
  let oldExpanded = {};
934
928
 
935
929
  if (old === true) {
936
- Object.keys(instance.getRowModel().rowsById).forEach(rowId => {
930
+ Object.keys(table.getRowModel().rowsById).forEach(rowId => {
937
931
  oldExpanded[rowId] = true;
938
932
  });
939
933
  } else {
@@ -960,15 +954,15 @@ const Expanding = {
960
954
  });
961
955
  },
962
956
  getIsExpanded: () => {
963
- var _instance$options$get;
957
+ var _table$options$getIsR;
964
958
 
965
- const expanded = instance.getState().expanded;
966
- return !!((_instance$options$get = instance.options.getIsRowExpanded == null ? void 0 : instance.options.getIsRowExpanded(row)) != null ? _instance$options$get : expanded === true || (expanded == null ? void 0 : expanded[row.id]));
959
+ const expanded = table.getState().expanded;
960
+ return !!((_table$options$getIsR = table.options.getIsRowExpanded == null ? void 0 : table.options.getIsRowExpanded(row)) != null ? _table$options$getIsR : expanded === true || (expanded == null ? void 0 : expanded[row.id]));
967
961
  },
968
962
  getCanExpand: () => {
969
- var _instance$options$get2, _instance$options$ena, _row$subRows;
963
+ var _table$options$getRow, _table$options$enable, _row$subRows;
970
964
 
971
- return ((_instance$options$get2 = instance.options.getRowCanExpand == null ? void 0 : instance.options.getRowCanExpand(row)) != null ? _instance$options$get2 : true) && ((_instance$options$ena = instance.options.enableExpanding) != null ? _instance$options$ena : true) && !!((_row$subRows = row.subRows) != null && _row$subRows.length);
965
+ return ((_table$options$getRow = table.options.getRowCanExpand == null ? void 0 : table.options.getRowCanExpand(row)) != null ? _table$options$getRow : true) && ((_table$options$enable = table.options.enableExpanding) != null ? _table$options$enable : true) && !!((_row$subRows = row.subRows) != null && _row$subRows.length);
972
966
  },
973
967
  getToggleExpandedHandler: () => {
974
968
  const canExpand = row.getCanExpand();
@@ -1104,24 +1098,24 @@ const Filters = {
1104
1098
  ...state
1105
1099
  };
1106
1100
  },
1107
- getDefaultOptions: instance => {
1101
+ getDefaultOptions: table => {
1108
1102
  return {
1109
- onColumnFiltersChange: makeStateUpdater('columnFilters', instance),
1110
- onGlobalFilterChange: makeStateUpdater('globalFilter', instance),
1103
+ onColumnFiltersChange: makeStateUpdater('columnFilters', table),
1104
+ onGlobalFilterChange: makeStateUpdater('globalFilter', table),
1111
1105
  filterFromLeafRows: false,
1112
1106
  globalFilterFn: 'auto',
1113
1107
  getColumnCanGlobalFilter: column => {
1114
- var _instance$getCoreRowM, _instance$getCoreRowM2;
1108
+ var _table$getCoreRowMode, _table$getCoreRowMode2;
1115
1109
 
1116
- const value = (_instance$getCoreRowM = instance.getCoreRowModel().flatRows[0]) == null ? void 0 : (_instance$getCoreRowM2 = _instance$getCoreRowM._getAllCellsByColumnId()[column.id]) == null ? void 0 : _instance$getCoreRowM2.getValue();
1110
+ const value = (_table$getCoreRowMode = table.getCoreRowModel().flatRows[0]) == null ? void 0 : (_table$getCoreRowMode2 = _table$getCoreRowMode._getAllCellsByColumnId()[column.id]) == null ? void 0 : _table$getCoreRowMode2.getValue();
1117
1111
  return typeof value === 'string';
1118
1112
  }
1119
1113
  };
1120
1114
  },
1121
- createColumn: (column, instance) => {
1115
+ createColumn: (column, table) => {
1122
1116
  return {
1123
1117
  getAutoFilterFn: () => {
1124
- const firstRow = instance.getCoreRowModel().flatRows[0];
1118
+ const firstRow = table.getCoreRowModel().flatRows[0];
1125
1119
  const value = firstRow == null ? void 0 : firstRow.getValue(column.id);
1126
1120
 
1127
1121
  if (typeof value === 'string') {
@@ -1147,34 +1141,31 @@ const Filters = {
1147
1141
  return filterFns.weakEquals;
1148
1142
  },
1149
1143
  getFilterFn: () => {
1150
- var _ref;
1151
-
1152
- const userFilterFns = instance.options.filterFns;
1153
- return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn() : (_ref = userFilterFns == null ? void 0 : userFilterFns[column.columnDef.filterFn]) != null ? _ref : filterFns[column.columnDef.filterFn];
1144
+ return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn() : filterFns[column.columnDef.filterFn];
1154
1145
  },
1155
1146
  getCanFilter: () => {
1156
- var _column$columnDef$ena, _instance$options$ena, _instance$options$ena2;
1147
+ var _column$columnDef$ena, _table$options$enable, _table$options$enable2;
1157
1148
 
1158
- return ((_column$columnDef$ena = column.columnDef.enableColumnFilter) != null ? _column$columnDef$ena : true) && ((_instance$options$ena = instance.options.enableColumnFilters) != null ? _instance$options$ena : true) && ((_instance$options$ena2 = instance.options.enableFilters) != null ? _instance$options$ena2 : true) && !!column.accessorFn;
1149
+ return ((_column$columnDef$ena = column.columnDef.enableColumnFilter) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableColumnFilters) != null ? _table$options$enable : true) && ((_table$options$enable2 = table.options.enableFilters) != null ? _table$options$enable2 : true) && !!column.accessorFn;
1159
1150
  },
1160
1151
  getCanGlobalFilter: () => {
1161
- var _column$columnDef$ena2, _instance$options$ena3, _instance$options$ena4, _instance$options$get;
1152
+ var _column$columnDef$ena2, _table$options$enable3, _table$options$enable4, _table$options$getCol;
1162
1153
 
1163
- return ((_column$columnDef$ena2 = column.columnDef.enableGlobalFilter) != null ? _column$columnDef$ena2 : true) && ((_instance$options$ena3 = instance.options.enableGlobalFilter) != null ? _instance$options$ena3 : true) && ((_instance$options$ena4 = instance.options.enableFilters) != null ? _instance$options$ena4 : true) && ((_instance$options$get = instance.options.getColumnCanGlobalFilter == null ? void 0 : instance.options.getColumnCanGlobalFilter(column)) != null ? _instance$options$get : true) && !!column.accessorFn;
1154
+ return ((_column$columnDef$ena2 = column.columnDef.enableGlobalFilter) != null ? _column$columnDef$ena2 : true) && ((_table$options$enable3 = table.options.enableGlobalFilter) != null ? _table$options$enable3 : true) && ((_table$options$enable4 = table.options.enableFilters) != null ? _table$options$enable4 : true) && ((_table$options$getCol = table.options.getColumnCanGlobalFilter == null ? void 0 : table.options.getColumnCanGlobalFilter(column)) != null ? _table$options$getCol : true) && !!column.accessorFn;
1164
1155
  },
1165
1156
  getIsFiltered: () => column.getFilterIndex() > -1,
1166
1157
  getFilterValue: () => {
1167
- var _instance$getState$co, _instance$getState$co2;
1158
+ var _table$getState$colum, _table$getState$colum2;
1168
1159
 
1169
- return (_instance$getState$co = instance.getState().columnFilters) == null ? void 0 : (_instance$getState$co2 = _instance$getState$co.find(d => d.id === column.id)) == null ? void 0 : _instance$getState$co2.value;
1160
+ return (_table$getState$colum = table.getState().columnFilters) == null ? void 0 : (_table$getState$colum2 = _table$getState$colum.find(d => d.id === column.id)) == null ? void 0 : _table$getState$colum2.value;
1170
1161
  },
1171
1162
  getFilterIndex: () => {
1172
- var _instance$getState$co3, _instance$getState$co4;
1163
+ var _table$getState$colum3, _table$getState$colum4;
1173
1164
 
1174
- return (_instance$getState$co3 = (_instance$getState$co4 = instance.getState().columnFilters) == null ? void 0 : _instance$getState$co4.findIndex(d => d.id === column.id)) != null ? _instance$getState$co3 : -1;
1165
+ return (_table$getState$colum3 = (_table$getState$colum4 = table.getState().columnFilters) == null ? void 0 : _table$getState$colum4.findIndex(d => d.id === column.id)) != null ? _table$getState$colum3 : -1;
1175
1166
  },
1176
1167
  setFilterValue: value => {
1177
- instance.setColumnFilters(old => {
1168
+ table.setColumnFilters(old => {
1178
1169
  const filterFn = column.getFilterFn();
1179
1170
  const previousfilter = old == null ? void 0 : old.find(d => d.id === column.id);
1180
1171
  const newFilter = functionalUpdate(value, previousfilter ? previousfilter.value : undefined); //
@@ -1209,15 +1200,15 @@ const Filters = {
1209
1200
  return [newFilterObj];
1210
1201
  });
1211
1202
  },
1212
- _getFacetedRowModel: instance.options.getFacetedRowModel && instance.options.getFacetedRowModel(instance, column.id),
1203
+ _getFacetedRowModel: table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, column.id),
1213
1204
  getFacetedRowModel: () => {
1214
1205
  if (!column._getFacetedRowModel) {
1215
- return instance.getPreFilteredRowModel();
1206
+ return table.getPreFilteredRowModel();
1216
1207
  }
1217
1208
 
1218
1209
  return column._getFacetedRowModel();
1219
1210
  },
1220
- _getFacetedUniqueValues: instance.options.getFacetedUniqueValues && instance.options.getFacetedUniqueValues(instance, column.id),
1211
+ _getFacetedUniqueValues: table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, column.id),
1221
1212
  getFacetedUniqueValues: () => {
1222
1213
  if (!column._getFacetedUniqueValues) {
1223
1214
  return new Map();
@@ -1225,7 +1216,7 @@ const Filters = {
1225
1216
 
1226
1217
  return column._getFacetedUniqueValues();
1227
1218
  },
1228
- _getFacetedMinMaxValues: instance.options.getFacetedMinMaxValues && instance.options.getFacetedMinMaxValues(instance, column.id),
1219
+ _getFacetedMinMaxValues: table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, column.id),
1229
1220
  getFacetedMinMaxValues: () => {
1230
1221
  if (!column._getFacetedMinMaxValues) {
1231
1222
  return undefined;
@@ -1237,28 +1228,25 @@ const Filters = {
1237
1228
 
1238
1229
  };
1239
1230
  },
1240
- createRow: (row, instance) => {
1231
+ createRow: (row, table) => {
1241
1232
  return {
1242
1233
  columnFilters: {},
1243
1234
  columnFiltersMeta: {}
1244
1235
  };
1245
1236
  },
1246
- createInstance: instance => {
1237
+ createTable: table => {
1247
1238
  return {
1248
1239
  getGlobalAutoFilterFn: () => {
1249
1240
  return filterFns.includesString;
1250
1241
  },
1251
1242
  getGlobalFilterFn: () => {
1252
- var _ref2;
1253
-
1254
1243
  const {
1255
- filterFns: userFilterFns,
1256
1244
  globalFilterFn: globalFilterFn
1257
- } = instance.options;
1258
- return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? instance.getGlobalAutoFilterFn() : (_ref2 = userFilterFns == null ? void 0 : userFilterFns[globalFilterFn]) != null ? _ref2 : filterFns[globalFilterFn];
1245
+ } = table.options;
1246
+ return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : filterFns[globalFilterFn];
1259
1247
  },
1260
1248
  setColumnFilters: updater => {
1261
- const leafColumns = instance.getAllLeafColumns();
1249
+ const leafColumns = table.getAllLeafColumns();
1262
1250
 
1263
1251
  const updateFn = old => {
1264
1252
  var _functionalUpdate;
@@ -1278,51 +1266,51 @@ const Filters = {
1278
1266
  });
1279
1267
  };
1280
1268
 
1281
- instance.options.onColumnFiltersChange == null ? void 0 : instance.options.onColumnFiltersChange(updateFn);
1269
+ table.options.onColumnFiltersChange == null ? void 0 : table.options.onColumnFiltersChange(updateFn);
1282
1270
  },
1283
1271
  setGlobalFilter: updater => {
1284
- instance.options.onGlobalFilterChange == null ? void 0 : instance.options.onGlobalFilterChange(updater);
1272
+ table.options.onGlobalFilterChange == null ? void 0 : table.options.onGlobalFilterChange(updater);
1285
1273
  },
1286
1274
  resetGlobalFilter: defaultState => {
1287
- instance.setGlobalFilter(defaultState ? undefined : instance.initialState.globalFilter);
1275
+ table.setGlobalFilter(defaultState ? undefined : table.initialState.globalFilter);
1288
1276
  },
1289
1277
  resetColumnFilters: defaultState => {
1290
- var _instance$initialStat, _instance$initialStat2;
1278
+ var _table$initialState$c, _table$initialState;
1291
1279
 
1292
- instance.setColumnFilters(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.columnFilters) != null ? _instance$initialStat : []);
1280
+ table.setColumnFilters(defaultState ? [] : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) != null ? _table$initialState$c : []);
1293
1281
  },
1294
- getPreFilteredRowModel: () => instance.getCoreRowModel(),
1295
- _getFilteredRowModel: instance.options.getFilteredRowModel && instance.options.getFilteredRowModel(instance),
1282
+ getPreFilteredRowModel: () => table.getCoreRowModel(),
1283
+ _getFilteredRowModel: table.options.getFilteredRowModel && table.options.getFilteredRowModel(table),
1296
1284
  getFilteredRowModel: () => {
1297
- if (instance.options.manualFiltering || !instance._getFilteredRowModel) {
1298
- return instance.getPreFilteredRowModel();
1285
+ if (table.options.manualFiltering || !table._getFilteredRowModel) {
1286
+ return table.getPreFilteredRowModel();
1299
1287
  }
1300
1288
 
1301
- return instance._getFilteredRowModel();
1289
+ return table._getFilteredRowModel();
1302
1290
  },
1303
- _getGlobalFacetedRowModel: instance.options.getFacetedRowModel && instance.options.getFacetedRowModel(instance, '__global__'),
1291
+ _getGlobalFacetedRowModel: table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, '__global__'),
1304
1292
  getGlobalFacetedRowModel: () => {
1305
- if (instance.options.manualFiltering || !instance._getGlobalFacetedRowModel) {
1306
- return instance.getPreFilteredRowModel();
1293
+ if (table.options.manualFiltering || !table._getGlobalFacetedRowModel) {
1294
+ return table.getPreFilteredRowModel();
1307
1295
  }
1308
1296
 
1309
- return instance._getGlobalFacetedRowModel();
1297
+ return table._getGlobalFacetedRowModel();
1310
1298
  },
1311
- _getGlobalFacetedUniqueValues: instance.options.getFacetedUniqueValues && instance.options.getFacetedUniqueValues(instance, '__global__'),
1299
+ _getGlobalFacetedUniqueValues: table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, '__global__'),
1312
1300
  getGlobalFacetedUniqueValues: () => {
1313
- if (!instance._getGlobalFacetedUniqueValues) {
1301
+ if (!table._getGlobalFacetedUniqueValues) {
1314
1302
  return new Map();
1315
1303
  }
1316
1304
 
1317
- return instance._getGlobalFacetedUniqueValues();
1305
+ return table._getGlobalFacetedUniqueValues();
1318
1306
  },
1319
- _getGlobalFacetedMinMaxValues: instance.options.getFacetedMinMaxValues && instance.options.getFacetedMinMaxValues(instance, '__global__'),
1307
+ _getGlobalFacetedMinMaxValues: table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, '__global__'),
1320
1308
  getGlobalFacetedMinMaxValues: () => {
1321
- if (!instance._getGlobalFacetedMinMaxValues) {
1309
+ if (!table._getGlobalFacetedMinMaxValues) {
1322
1310
  return;
1323
1311
  }
1324
1312
 
1325
- return instance._getGlobalFacetedMinMaxValues();
1313
+ return table._getGlobalFacetedMinMaxValues();
1326
1314
  }
1327
1315
  };
1328
1316
  }
@@ -1443,9 +1431,9 @@ const Grouping = {
1443
1431
  getDefaultColumnDef: () => {
1444
1432
  return {
1445
1433
  aggregatedCell: props => {
1446
- var _props$getValue$toStr, _props$getValue;
1434
+ var _toString, _props$getValue;
1447
1435
 
1448
- return (_props$getValue$toStr = (_props$getValue = props.getValue()) == null ? void 0 : _props$getValue.toString == null ? void 0 : _props$getValue.toString()) != null ? _props$getValue$toStr : null;
1436
+ return (_toString = (_props$getValue = props.getValue()) == null ? void 0 : _props$getValue.toString == null ? void 0 : _props$getValue.toString()) != null ? _toString : null;
1449
1437
  },
1450
1438
  aggregationFn: 'auto'
1451
1439
  };
@@ -1456,16 +1444,16 @@ const Grouping = {
1456
1444
  ...state
1457
1445
  };
1458
1446
  },
1459
- getDefaultOptions: instance => {
1447
+ getDefaultOptions: table => {
1460
1448
  return {
1461
- onGroupingChange: makeStateUpdater('grouping', instance),
1449
+ onGroupingChange: makeStateUpdater('grouping', table),
1462
1450
  groupedColumnMode: 'reorder'
1463
1451
  };
1464
1452
  },
1465
- createColumn: (column, instance) => {
1453
+ createColumn: (column, table) => {
1466
1454
  return {
1467
1455
  toggleGrouping: () => {
1468
- instance.setGrouping(old => {
1456
+ table.setGrouping(old => {
1469
1457
  // Find any existing grouping for this column
1470
1458
  if (old != null && old.includes(column.id)) {
1471
1459
  return old.filter(d => d !== column.id);
@@ -1477,17 +1465,17 @@ const Grouping = {
1477
1465
  getCanGroup: () => {
1478
1466
  var _ref, _ref2, _ref3, _column$columnDef$ena;
1479
1467
 
1480
- return (_ref = (_ref2 = (_ref3 = (_column$columnDef$ena = column.columnDef.enableGrouping) != null ? _column$columnDef$ena : true) != null ? _ref3 : instance.options.enableGrouping) != null ? _ref2 : true) != null ? _ref : !!column.accessorFn;
1468
+ return (_ref = (_ref2 = (_ref3 = (_column$columnDef$ena = column.columnDef.enableGrouping) != null ? _column$columnDef$ena : true) != null ? _ref3 : table.options.enableGrouping) != null ? _ref2 : true) != null ? _ref : !!column.accessorFn;
1481
1469
  },
1482
1470
  getIsGrouped: () => {
1483
- var _instance$getState$gr;
1471
+ var _table$getState$group;
1484
1472
 
1485
- return (_instance$getState$gr = instance.getState().grouping) == null ? void 0 : _instance$getState$gr.includes(column.id);
1473
+ return (_table$getState$group = table.getState().grouping) == null ? void 0 : _table$getState$group.includes(column.id);
1486
1474
  },
1487
1475
  getGroupedIndex: () => {
1488
- var _instance$getState$gr2;
1476
+ var _table$getState$group2;
1489
1477
 
1490
- return (_instance$getState$gr2 = instance.getState().grouping) == null ? void 0 : _instance$getState$gr2.indexOf(column.id);
1478
+ return (_table$getState$group2 = table.getState().grouping) == null ? void 0 : _table$getState$group2.indexOf(column.id);
1491
1479
  },
1492
1480
  getToggleGroupingHandler: () => {
1493
1481
  const canGroup = column.getCanGroup();
@@ -1497,7 +1485,7 @@ const Grouping = {
1497
1485
  };
1498
1486
  },
1499
1487
  getAutoAggregationFn: () => {
1500
- const firstRow = instance.getCoreRowModel().flatRows[0];
1488
+ const firstRow = table.getCoreRowModel().flatRows[0];
1501
1489
  const value = firstRow == null ? void 0 : firstRow.getValue(column.id);
1502
1490
 
1503
1491
  if (typeof value === 'number') {
@@ -1509,37 +1497,33 @@ const Grouping = {
1509
1497
  }
1510
1498
  },
1511
1499
  getAggregationFn: () => {
1512
- var _ref4;
1513
-
1514
- const userAggregationFns = instance.options.aggregationFns;
1515
-
1516
1500
  if (!column) {
1517
1501
  throw new Error();
1518
1502
  }
1519
1503
 
1520
- return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : (_ref4 = userAggregationFns == null ? void 0 : userAggregationFns[column.columnDef.aggregationFn]) != null ? _ref4 : aggregationFns[column.columnDef.aggregationFn];
1504
+ return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : aggregationFns[column.columnDef.aggregationFn];
1521
1505
  }
1522
1506
  };
1523
1507
  },
1524
- createInstance: instance => {
1508
+ createTable: table => {
1525
1509
  return {
1526
- setGrouping: updater => instance.options.onGroupingChange == null ? void 0 : instance.options.onGroupingChange(updater),
1510
+ setGrouping: updater => table.options.onGroupingChange == null ? void 0 : table.options.onGroupingChange(updater),
1527
1511
  resetGrouping: defaultState => {
1528
- var _instance$initialStat, _instance$initialStat2;
1512
+ var _table$initialState$g, _table$initialState;
1529
1513
 
1530
- instance.setGrouping(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.grouping) != null ? _instance$initialStat : []);
1514
+ table.setGrouping(defaultState ? [] : (_table$initialState$g = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.grouping) != null ? _table$initialState$g : []);
1531
1515
  },
1532
- getPreGroupedRowModel: () => instance.getFilteredRowModel(),
1516
+ getPreGroupedRowModel: () => table.getFilteredRowModel(),
1533
1517
  getGroupedRowModel: () => {
1534
- if (!instance._getGroupedRowModel && instance.options.getGroupedRowModel) {
1535
- instance._getGroupedRowModel = instance.options.getGroupedRowModel(instance);
1518
+ if (!table._getGroupedRowModel && table.options.getGroupedRowModel) {
1519
+ table._getGroupedRowModel = table.options.getGroupedRowModel(table);
1536
1520
  }
1537
1521
 
1538
- if (instance.options.manualGrouping || !instance._getGroupedRowModel) {
1539
- return instance.getPreGroupedRowModel();
1522
+ if (table.options.manualGrouping || !table._getGroupedRowModel) {
1523
+ return table.getPreGroupedRowModel();
1540
1524
  }
1541
1525
 
1542
- return instance._getGroupedRowModel();
1526
+ return table._getGroupedRowModel();
1543
1527
  }
1544
1528
  };
1545
1529
  },
@@ -1549,12 +1533,7 @@ const Grouping = {
1549
1533
  _groupingValuesCache: {}
1550
1534
  };
1551
1535
  },
1552
- createCell: (cell, column, row, instance) => {
1553
- const getRenderValue = () => {
1554
- var _cell$getValue;
1555
-
1556
- return (_cell$getValue = cell.getValue()) != null ? _cell$getValue : instance.options.renderFallbackValue;
1557
- };
1536
+ createCell: (cell, column, row, table) => {
1558
1537
 
1559
1538
  return {
1560
1539
  getIsGrouped: () => column.getIsGrouped() && column.id === row.groupingColumnId,
@@ -1563,22 +1542,6 @@ const Grouping = {
1563
1542
  var _row$subRows;
1564
1543
 
1565
1544
  return !cell.getIsGrouped() && !cell.getIsPlaceholder() && !!((_row$subRows = row.subRows) != null && _row$subRows.length);
1566
- },
1567
- renderAggregatedCell: () => {
1568
- if (process.env.NODE_ENV === 'development') {
1569
- if (!column.columnDef.aggregatedCell) {
1570
- console.warn('A columnDef.aggregatedCell template is recommended for displaying aggregated values.');
1571
- }
1572
- }
1573
-
1574
- const template = column.columnDef.aggregatedCell || column.columnDef.cell;
1575
- return template ? instance._render(template, {
1576
- instance,
1577
- column,
1578
- row,
1579
- cell,
1580
- getValue: getRenderValue
1581
- }) : null;
1582
1545
  }
1583
1546
  };
1584
1547
  }
@@ -1606,20 +1569,20 @@ const Ordering = {
1606
1569
  ...state
1607
1570
  };
1608
1571
  },
1609
- getDefaultOptions: instance => {
1572
+ getDefaultOptions: table => {
1610
1573
  return {
1611
- onColumnOrderChange: makeStateUpdater('columnOrder', instance)
1574
+ onColumnOrderChange: makeStateUpdater('columnOrder', table)
1612
1575
  };
1613
1576
  },
1614
- createInstance: instance => {
1577
+ createTable: table => {
1615
1578
  return {
1616
- setColumnOrder: updater => instance.options.onColumnOrderChange == null ? void 0 : instance.options.onColumnOrderChange(updater),
1579
+ setColumnOrder: updater => table.options.onColumnOrderChange == null ? void 0 : table.options.onColumnOrderChange(updater),
1617
1580
  resetColumnOrder: defaultState => {
1618
- var _instance$initialStat;
1581
+ var _table$initialState$c;
1619
1582
 
1620
- instance.setColumnOrder(defaultState ? [] : (_instance$initialStat = instance.initialState.columnOrder) != null ? _instance$initialStat : []);
1583
+ table.setColumnOrder(defaultState ? [] : (_table$initialState$c = table.initialState.columnOrder) != null ? _table$initialState$c : []);
1621
1584
  },
1622
- _getOrderColumnsFn: memo(() => [instance.getState().columnOrder, instance.getState().grouping, instance.options.groupedColumnMode], (columnOrder, grouping, groupedColumnMode) => columns => {
1585
+ _getOrderColumnsFn: memo(() => [table.getState().columnOrder, table.getState().grouping, table.options.groupedColumnMode], (columnOrder, grouping, groupedColumnMode) => columns => {
1623
1586
  // Sort grouped columns to the start of the column list
1624
1587
  // before the headers are built
1625
1588
  let orderedColumns = []; // If there is no order, return the normal columns
@@ -1647,7 +1610,7 @@ const Ordering = {
1647
1610
 
1648
1611
  return orderColumns(orderedColumns, grouping, groupedColumnMode);
1649
1612
  }, {
1650
- key: process.env.NODE_ENV === 'development' && 'getOrderColumnsFn' // debug: () => instance.options.debugAll ?? instance.options.debugTable,
1613
+ key: process.env.NODE_ENV === 'development' && 'getOrderColumnsFn' // debug: () => table.options.debugAll ?? table.options.debugTable,
1651
1614
 
1652
1615
  })
1653
1616
  };
@@ -1671,32 +1634,32 @@ const Pagination = {
1671
1634
  }
1672
1635
  };
1673
1636
  },
1674
- getDefaultOptions: instance => {
1637
+ getDefaultOptions: table => {
1675
1638
  return {
1676
- onPaginationChange: makeStateUpdater('pagination', instance)
1639
+ onPaginationChange: makeStateUpdater('pagination', table)
1677
1640
  };
1678
1641
  },
1679
- createInstance: instance => {
1642
+ createTable: table => {
1680
1643
  let registered = false;
1681
1644
  let queued = false;
1682
1645
  return {
1683
1646
  _autoResetPageIndex: () => {
1684
- var _ref, _instance$options$aut;
1647
+ var _ref, _table$options$autoRe;
1685
1648
 
1686
1649
  if (!registered) {
1687
- instance._queue(() => {
1650
+ table._queue(() => {
1688
1651
  registered = true;
1689
1652
  });
1690
1653
 
1691
1654
  return;
1692
1655
  }
1693
1656
 
1694
- if ((_ref = (_instance$options$aut = instance.options.autoResetAll) != null ? _instance$options$aut : instance.options.autoResetPageIndex) != null ? _ref : !instance.options.manualPagination) {
1657
+ if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetPageIndex) != null ? _ref : !table.options.manualPagination) {
1695
1658
  if (queued) return;
1696
1659
  queued = true;
1697
1660
 
1698
- instance._queue(() => {
1699
- instance.resetPageIndex();
1661
+ table._queue(() => {
1662
+ table.resetPageIndex();
1700
1663
  queued = false;
1701
1664
  });
1702
1665
  }
@@ -1707,17 +1670,17 @@ const Pagination = {
1707
1670
  return newState;
1708
1671
  };
1709
1672
 
1710
- return instance.options.onPaginationChange == null ? void 0 : instance.options.onPaginationChange(safeUpdater);
1673
+ return table.options.onPaginationChange == null ? void 0 : table.options.onPaginationChange(safeUpdater);
1711
1674
  },
1712
1675
  resetPagination: defaultState => {
1713
- var _instance$initialStat;
1676
+ var _table$initialState$p;
1714
1677
 
1715
- instance.setPagination(defaultState ? getDefaultPaginationState() : (_instance$initialStat = instance.initialState.pagination) != null ? _instance$initialStat : getDefaultPaginationState());
1678
+ table.setPagination(defaultState ? getDefaultPaginationState() : (_table$initialState$p = table.initialState.pagination) != null ? _table$initialState$p : getDefaultPaginationState());
1716
1679
  },
1717
1680
  setPageIndex: updater => {
1718
- instance.setPagination(old => {
1681
+ table.setPagination(old => {
1719
1682
  let pageIndex = functionalUpdate(updater, old.pageIndex);
1720
- const maxPageIndex = typeof instance.options.pageCount === 'undefined' || instance.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : instance.options.pageCount - 1;
1683
+ const maxPageIndex = typeof table.options.pageCount === 'undefined' || table.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : table.options.pageCount - 1;
1721
1684
  pageIndex = Math.min(Math.max(0, pageIndex), maxPageIndex);
1722
1685
  return { ...old,
1723
1686
  pageIndex
@@ -1725,17 +1688,17 @@ const Pagination = {
1725
1688
  });
1726
1689
  },
1727
1690
  resetPageIndex: defaultState => {
1728
- var _instance$initialStat2, _instance$initialStat3, _instance$initialStat4;
1691
+ var _table$initialState$p2, _table$initialState, _table$initialState$p3;
1729
1692
 
1730
- instance.setPageIndex(defaultState ? defaultPageIndex : (_instance$initialStat2 = (_instance$initialStat3 = instance.initialState) == null ? void 0 : (_instance$initialStat4 = _instance$initialStat3.pagination) == null ? void 0 : _instance$initialStat4.pageIndex) != null ? _instance$initialStat2 : defaultPageIndex);
1693
+ table.setPageIndex(defaultState ? defaultPageIndex : (_table$initialState$p2 = (_table$initialState = table.initialState) == null ? void 0 : (_table$initialState$p3 = _table$initialState.pagination) == null ? void 0 : _table$initialState$p3.pageIndex) != null ? _table$initialState$p2 : defaultPageIndex);
1731
1694
  },
1732
1695
  resetPageSize: defaultState => {
1733
- var _instance$initialStat5, _instance$initialStat6, _instance$initialStat7;
1696
+ var _table$initialState$p4, _table$initialState2, _table$initialState2$;
1734
1697
 
1735
- instance.setPageSize(defaultState ? defaultPageSize : (_instance$initialStat5 = (_instance$initialStat6 = instance.initialState) == null ? void 0 : (_instance$initialStat7 = _instance$initialStat6.pagination) == null ? void 0 : _instance$initialStat7.pageSize) != null ? _instance$initialStat5 : defaultPageSize);
1698
+ table.setPageSize(defaultState ? defaultPageSize : (_table$initialState$p4 = (_table$initialState2 = table.initialState) == null ? void 0 : (_table$initialState2$ = _table$initialState2.pagination) == null ? void 0 : _table$initialState2$.pageSize) != null ? _table$initialState$p4 : defaultPageSize);
1736
1699
  },
1737
1700
  setPageSize: updater => {
1738
- instance.setPagination(old => {
1701
+ table.setPagination(old => {
1739
1702
  const pageSize = Math.max(1, functionalUpdate(updater, old.pageSize));
1740
1703
  const topRowIndex = old.pageSize * old.pageIndex;
1741
1704
  const pageIndex = Math.floor(topRowIndex / pageSize);
@@ -1745,10 +1708,10 @@ const Pagination = {
1745
1708
  };
1746
1709
  });
1747
1710
  },
1748
- setPageCount: updater => instance.setPagination(old => {
1749
- var _instance$options$pag;
1711
+ setPageCount: updater => table.setPagination(old => {
1712
+ var _table$options$pageCo;
1750
1713
 
1751
- let newPageCount = functionalUpdate(updater, (_instance$options$pag = instance.options.pageCount) != null ? _instance$options$pag : -1);
1714
+ let newPageCount = functionalUpdate(updater, (_table$options$pageCo = table.options.pageCount) != null ? _table$options$pageCo : -1);
1752
1715
 
1753
1716
  if (typeof newPageCount === 'number') {
1754
1717
  newPageCount = Math.max(-1, newPageCount);
@@ -1758,7 +1721,7 @@ const Pagination = {
1758
1721
  pageCount: newPageCount
1759
1722
  };
1760
1723
  }),
1761
- getPageOptions: memo(() => [instance.getPageCount()], pageCount => {
1724
+ getPageOptions: memo(() => [table.getPageCount()], pageCount => {
1762
1725
  let pageOptions = [];
1763
1726
 
1764
1727
  if (pageCount && pageCount > 0) {
@@ -1769,17 +1732,17 @@ const Pagination = {
1769
1732
  }, {
1770
1733
  key: process.env.NODE_ENV === 'development' && 'getPageOptions',
1771
1734
  debug: () => {
1772
- var _instance$options$deb;
1735
+ var _table$options$debugA;
1773
1736
 
1774
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
1737
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
1775
1738
  }
1776
1739
  }),
1777
- getCanPreviousPage: () => instance.getState().pagination.pageIndex > 0,
1740
+ getCanPreviousPage: () => table.getState().pagination.pageIndex > 0,
1778
1741
  getCanNextPage: () => {
1779
1742
  const {
1780
1743
  pageIndex
1781
- } = instance.getState().pagination;
1782
- const pageCount = instance.getPageCount();
1744
+ } = table.getState().pagination;
1745
+ const pageCount = table.getPageCount();
1783
1746
 
1784
1747
  if (pageCount === -1) {
1785
1748
  return true;
@@ -1792,29 +1755,29 @@ const Pagination = {
1792
1755
  return pageIndex < pageCount - 1;
1793
1756
  },
1794
1757
  previousPage: () => {
1795
- return instance.setPageIndex(old => old - 1);
1758
+ return table.setPageIndex(old => old - 1);
1796
1759
  },
1797
1760
  nextPage: () => {
1798
- return instance.setPageIndex(old => {
1761
+ return table.setPageIndex(old => {
1799
1762
  return old + 1;
1800
1763
  });
1801
1764
  },
1802
- getPrePaginationRowModel: () => instance.getExpandedRowModel(),
1765
+ getPrePaginationRowModel: () => table.getExpandedRowModel(),
1803
1766
  getPaginationRowModel: () => {
1804
- if (!instance._getPaginationRowModel && instance.options.getPaginationRowModel) {
1805
- instance._getPaginationRowModel = instance.options.getPaginationRowModel(instance);
1767
+ if (!table._getPaginationRowModel && table.options.getPaginationRowModel) {
1768
+ table._getPaginationRowModel = table.options.getPaginationRowModel(table);
1806
1769
  }
1807
1770
 
1808
- if (instance.options.manualPagination || !instance._getPaginationRowModel) {
1809
- return instance.getPrePaginationRowModel();
1771
+ if (table.options.manualPagination || !table._getPaginationRowModel) {
1772
+ return table.getPrePaginationRowModel();
1810
1773
  }
1811
1774
 
1812
- return instance._getPaginationRowModel();
1775
+ return table._getPaginationRowModel();
1813
1776
  },
1814
1777
  getPageCount: () => {
1815
- var _instance$options$pag2;
1778
+ var _table$options$pageCo2;
1816
1779
 
1817
- return (_instance$options$pag2 = instance.options.pageCount) != null ? _instance$options$pag2 : Math.ceil(instance.getPrePaginationRowModel().rows.length / instance.getState().pagination.pageSize);
1780
+ return (_table$options$pageCo2 = table.options.pageCount) != null ? _table$options$pageCo2 : Math.ceil(table.getPrePaginationRowModel().rows.length / table.getState().pagination.pageSize);
1818
1781
  }
1819
1782
  };
1820
1783
  }
@@ -1833,16 +1796,16 @@ const Pinning = {
1833
1796
  ...state
1834
1797
  };
1835
1798
  },
1836
- getDefaultOptions: instance => {
1799
+ getDefaultOptions: table => {
1837
1800
  return {
1838
- onColumnPinningChange: makeStateUpdater('columnPinning', instance)
1801
+ onColumnPinningChange: makeStateUpdater('columnPinning', table)
1839
1802
  };
1840
1803
  },
1841
- createColumn: (column, instance) => {
1804
+ createColumn: (column, table) => {
1842
1805
  return {
1843
1806
  pin: position => {
1844
1807
  const columnIds = column.getLeafColumns().map(d => d.id).filter(Boolean);
1845
- instance.setColumnPinning(old => {
1808
+ table.setColumnPinning(old => {
1846
1809
  var _old$left3, _old$right3;
1847
1810
 
1848
1811
  if (position === 'right') {
@@ -1872,9 +1835,9 @@ const Pinning = {
1872
1835
  getCanPin: () => {
1873
1836
  const leafColumns = column.getLeafColumns();
1874
1837
  return leafColumns.some(d => {
1875
- var _d$columnDef$enablePi, _instance$options$ena;
1838
+ var _d$columnDef$enablePi, _table$options$enable;
1876
1839
 
1877
- return ((_d$columnDef$enablePi = d.columnDef.enablePinning) != null ? _d$columnDef$enablePi : true) && ((_instance$options$ena = instance.options.enablePinning) != null ? _instance$options$ena : true);
1840
+ return ((_d$columnDef$enablePi = d.columnDef.enablePinning) != null ? _d$columnDef$enablePi : true) && ((_table$options$enable = table.options.enablePinning) != null ? _table$options$enable : true);
1878
1841
  });
1879
1842
  },
1880
1843
  getIsPinned: () => {
@@ -1882,33 +1845,33 @@ const Pinning = {
1882
1845
  const {
1883
1846
  left,
1884
1847
  right
1885
- } = instance.getState().columnPinning;
1848
+ } = table.getState().columnPinning;
1886
1849
  const isLeft = leafColumnIds.some(d => left == null ? void 0 : left.includes(d));
1887
1850
  const isRight = leafColumnIds.some(d => right == null ? void 0 : right.includes(d));
1888
1851
  return isLeft ? 'left' : isRight ? 'right' : false;
1889
1852
  },
1890
1853
  getPinnedIndex: () => {
1891
- var _instance$getState$co, _instance$getState$co2, _instance$getState$co3;
1854
+ var _table$getState$colum, _table$getState$colum2, _table$getState$colum3;
1892
1855
 
1893
1856
  const position = column.getIsPinned();
1894
- return position ? (_instance$getState$co = (_instance$getState$co2 = instance.getState().columnPinning) == null ? void 0 : (_instance$getState$co3 = _instance$getState$co2[position]) == null ? void 0 : _instance$getState$co3.indexOf(column.id)) != null ? _instance$getState$co : -1 : 0;
1857
+ return position ? (_table$getState$colum = (_table$getState$colum2 = table.getState().columnPinning) == null ? void 0 : (_table$getState$colum3 = _table$getState$colum2[position]) == null ? void 0 : _table$getState$colum3.indexOf(column.id)) != null ? _table$getState$colum : -1 : 0;
1895
1858
  }
1896
1859
  };
1897
1860
  },
1898
- createRow: (row, instance) => {
1861
+ createRow: (row, table) => {
1899
1862
  return {
1900
- getCenterVisibleCells: memo(() => [row._getAllVisibleCells(), instance.getState().columnPinning.left, instance.getState().columnPinning.right], (allCells, left, right) => {
1863
+ getCenterVisibleCells: memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allCells, left, right) => {
1901
1864
  const leftAndRight = [...(left != null ? left : []), ...(right != null ? right : [])];
1902
1865
  return allCells.filter(d => !leftAndRight.includes(d.column.id));
1903
1866
  }, {
1904
1867
  key: process.env.NODE_ENV === 'production' && 'row.getCenterVisibleCells',
1905
1868
  debug: () => {
1906
- var _instance$options$deb;
1869
+ var _table$options$debugA;
1907
1870
 
1908
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugRows;
1871
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugRows;
1909
1872
  }
1910
1873
  }),
1911
- getLeftVisibleCells: memo(() => [row._getAllVisibleCells(), instance.getState().columnPinning.left,,], (allCells, left) => {
1874
+ getLeftVisibleCells: memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.left,,], (allCells, left) => {
1912
1875
  const cells = (left != null ? left : []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({ ...d,
1913
1876
  position: 'left'
1914
1877
  }));
@@ -1916,12 +1879,12 @@ const Pinning = {
1916
1879
  }, {
1917
1880
  key: process.env.NODE_ENV === 'production' && 'row.getLeftVisibleCells',
1918
1881
  debug: () => {
1919
- var _instance$options$deb2;
1882
+ var _table$options$debugA2;
1920
1883
 
1921
- return (_instance$options$deb2 = instance.options.debugAll) != null ? _instance$options$deb2 : instance.options.debugRows;
1884
+ return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugRows;
1922
1885
  }
1923
1886
  }),
1924
- getRightVisibleCells: memo(() => [row._getAllVisibleCells(), instance.getState().columnPinning.right], (allCells, right) => {
1887
+ getRightVisibleCells: memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.right], (allCells, right) => {
1925
1888
  const cells = (right != null ? right : []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({ ...d,
1926
1889
  position: 'left'
1927
1890
  }));
@@ -1929,25 +1892,25 @@ const Pinning = {
1929
1892
  }, {
1930
1893
  key: process.env.NODE_ENV === 'production' && 'row.getRightVisibleCells',
1931
1894
  debug: () => {
1932
- var _instance$options$deb3;
1895
+ var _table$options$debugA3;
1933
1896
 
1934
- return (_instance$options$deb3 = instance.options.debugAll) != null ? _instance$options$deb3 : instance.options.debugRows;
1897
+ return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugRows;
1935
1898
  }
1936
1899
  })
1937
1900
  };
1938
1901
  },
1939
- createInstance: instance => {
1902
+ createTable: table => {
1940
1903
  return {
1941
- setColumnPinning: updater => instance.options.onColumnPinningChange == null ? void 0 : instance.options.onColumnPinningChange(updater),
1904
+ setColumnPinning: updater => table.options.onColumnPinningChange == null ? void 0 : table.options.onColumnPinningChange(updater),
1942
1905
  resetColumnPinning: defaultState => {
1943
- var _instance$initialStat, _instance$initialStat2;
1906
+ var _table$initialState$c, _table$initialState;
1944
1907
 
1945
- return instance.setColumnPinning(defaultState ? getDefaultPinningState() : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.columnPinning) != null ? _instance$initialStat : getDefaultPinningState());
1908
+ return table.setColumnPinning(defaultState ? getDefaultPinningState() : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnPinning) != null ? _table$initialState$c : getDefaultPinningState());
1946
1909
  },
1947
1910
  getIsSomeColumnsPinned: position => {
1948
1911
  var _pinningState$positio;
1949
1912
 
1950
- const pinningState = instance.getState().columnPinning;
1913
+ const pinningState = table.getState().columnPinning;
1951
1914
 
1952
1915
  if (!position) {
1953
1916
  var _pinningState$left, _pinningState$right;
@@ -1957,35 +1920,35 @@ const Pinning = {
1957
1920
 
1958
1921
  return Boolean((_pinningState$positio = pinningState[position]) == null ? void 0 : _pinningState$positio.length);
1959
1922
  },
1960
- getLeftLeafColumns: memo(() => [instance.getAllLeafColumns(), instance.getState().columnPinning.left], (allColumns, left) => {
1923
+ getLeftLeafColumns: memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.left], (allColumns, left) => {
1961
1924
  return (left != null ? left : []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);
1962
1925
  }, {
1963
1926
  key: process.env.NODE_ENV === 'development' && 'getLeftLeafColumns',
1964
1927
  debug: () => {
1965
- var _instance$options$deb4;
1928
+ var _table$options$debugA4;
1966
1929
 
1967
- return (_instance$options$deb4 = instance.options.debugAll) != null ? _instance$options$deb4 : instance.options.debugColumns;
1930
+ return (_table$options$debugA4 = table.options.debugAll) != null ? _table$options$debugA4 : table.options.debugColumns;
1968
1931
  }
1969
1932
  }),
1970
- getRightLeafColumns: memo(() => [instance.getAllLeafColumns(), instance.getState().columnPinning.right], (allColumns, right) => {
1933
+ getRightLeafColumns: memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.right], (allColumns, right) => {
1971
1934
  return (right != null ? right : []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);
1972
1935
  }, {
1973
1936
  key: process.env.NODE_ENV === 'development' && 'getRightLeafColumns',
1974
1937
  debug: () => {
1975
- var _instance$options$deb5;
1938
+ var _table$options$debugA5;
1976
1939
 
1977
- return (_instance$options$deb5 = instance.options.debugAll) != null ? _instance$options$deb5 : instance.options.debugColumns;
1940
+ return (_table$options$debugA5 = table.options.debugAll) != null ? _table$options$debugA5 : table.options.debugColumns;
1978
1941
  }
1979
1942
  }),
1980
- getCenterLeafColumns: memo(() => [instance.getAllLeafColumns(), instance.getState().columnPinning.left, instance.getState().columnPinning.right], (allColumns, left, right) => {
1943
+ getCenterLeafColumns: memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, left, right) => {
1981
1944
  const leftAndRight = [...(left != null ? left : []), ...(right != null ? right : [])];
1982
1945
  return allColumns.filter(d => !leftAndRight.includes(d.id));
1983
1946
  }, {
1984
1947
  key: process.env.NODE_ENV === 'development' && 'getCenterLeafColumns',
1985
1948
  debug: () => {
1986
- var _instance$options$deb6;
1949
+ var _table$options$debugA6;
1987
1950
 
1988
- return (_instance$options$deb6 = instance.options.debugAll) != null ? _instance$options$deb6 : instance.options.debugColumns;
1951
+ return (_table$options$debugA6 = table.options.debugAll) != null ? _table$options$debugA6 : table.options.debugColumns;
1989
1952
  }
1990
1953
  })
1991
1954
  };
@@ -2000,9 +1963,9 @@ const RowSelection = {
2000
1963
  ...state
2001
1964
  };
2002
1965
  },
2003
- getDefaultOptions: instance => {
1966
+ getDefaultOptions: table => {
2004
1967
  return {
2005
- onRowSelectionChange: makeStateUpdater('rowSelection', instance),
1968
+ onRowSelectionChange: makeStateUpdater('rowSelection', table),
2006
1969
  enableRowSelection: true,
2007
1970
  enableMultiRowSelection: true,
2008
1971
  enableSubRowSelection: true // enableGroupingRowSelection: false,
@@ -2011,20 +1974,20 @@ const RowSelection = {
2011
1974
 
2012
1975
  };
2013
1976
  },
2014
- createInstance: instance => {
1977
+ createTable: table => {
2015
1978
  return {
2016
- setRowSelection: updater => instance.options.onRowSelectionChange == null ? void 0 : instance.options.onRowSelectionChange(updater),
1979
+ setRowSelection: updater => table.options.onRowSelectionChange == null ? void 0 : table.options.onRowSelectionChange(updater),
2017
1980
  resetRowSelection: defaultState => {
2018
- var _instance$initialStat;
1981
+ var _table$initialState$r;
2019
1982
 
2020
- return instance.setRowSelection(defaultState ? {} : (_instance$initialStat = instance.initialState.rowSelection) != null ? _instance$initialStat : {});
1983
+ return table.setRowSelection(defaultState ? {} : (_table$initialState$r = table.initialState.rowSelection) != null ? _table$initialState$r : {});
2021
1984
  },
2022
1985
  toggleAllRowsSelected: value => {
2023
- instance.setRowSelection(old => {
2024
- value = typeof value !== 'undefined' ? value : !instance.getIsAllRowsSelected();
1986
+ table.setRowSelection(old => {
1987
+ value = typeof value !== 'undefined' ? value : !table.getIsAllRowsSelected();
2025
1988
  const rowSelection = { ...old
2026
1989
  };
2027
- const preGroupedFlatRows = instance.getPreGroupedRowModel().flatRows; // We don't use `mutateRowIsSelected` here for performance reasons.
1990
+ const preGroupedFlatRows = table.getPreGroupedRowModel().flatRows; // We don't use `mutateRowIsSelected` here for performance reasons.
2028
1991
  // All of the rows are flat already, so it wouldn't be worth it
2029
1992
 
2030
1993
  if (value) {
@@ -2040,12 +2003,12 @@ const RowSelection = {
2040
2003
  return rowSelection;
2041
2004
  });
2042
2005
  },
2043
- toggleAllPageRowsSelected: value => instance.setRowSelection(old => {
2044
- const resolvedValue = typeof value !== 'undefined' ? value : !instance.getIsAllPageRowsSelected();
2006
+ toggleAllPageRowsSelected: value => table.setRowSelection(old => {
2007
+ const resolvedValue = typeof value !== 'undefined' ? value : !table.getIsAllPageRowsSelected();
2045
2008
  const rowSelection = { ...old
2046
2009
  };
2047
- instance.getRowModel().rows.forEach(row => {
2048
- mutateRowIsSelected(rowSelection, row.id, resolvedValue, instance);
2010
+ table.getRowModel().rows.forEach(row => {
2011
+ mutateRowIsSelected(rowSelection, row.id, resolvedValue, table);
2049
2012
  });
2050
2013
  return rowSelection;
2051
2014
  }),
@@ -2054,7 +2017,7 @@ const RowSelection = {
2054
2017
  // rows,
2055
2018
  // rowsById,
2056
2019
  // options: { selectGroupingRows, selectSubRows },
2057
- // } = instance
2020
+ // } = table
2058
2021
  // const findSelectedRow = (rows: Row[]) => {
2059
2022
  // let found
2060
2023
  // rows.find(d => {
@@ -2082,7 +2045,7 @@ const RowSelection = {
2082
2045
  // selectSubRows: selectSubRows!,
2083
2046
  // })
2084
2047
  // }
2085
- // instance.rows.forEach(row => {
2048
+ // table.rows.forEach(row => {
2086
2049
  // const isFirstRow = row.id === firstRow.id
2087
2050
  // const isLastRow = row.id === lastRow.id
2088
2051
  // if (isFirstRow || isLastRow) {
@@ -2097,10 +2060,10 @@ const RowSelection = {
2097
2060
  // addRow(row)
2098
2061
  // }
2099
2062
  // })
2100
- // instance.setRowSelection(selectedRowIds)
2063
+ // table.setRowSelection(selectedRowIds)
2101
2064
  // },
2102
- getPreSelectedRowModel: () => instance.getCoreRowModel(),
2103
- getSelectedRowModel: memo(() => [instance.getState().rowSelection, instance.getCoreRowModel()], (rowSelection, rowModel) => {
2065
+ getPreSelectedRowModel: () => table.getCoreRowModel(),
2066
+ getSelectedRowModel: memo(() => [table.getState().rowSelection, table.getCoreRowModel()], (rowSelection, rowModel) => {
2104
2067
  if (!Object.keys(rowSelection).length) {
2105
2068
  return {
2106
2069
  rows: [],
@@ -2109,16 +2072,16 @@ const RowSelection = {
2109
2072
  };
2110
2073
  }
2111
2074
 
2112
- return selectRowsFn(instance, rowModel);
2075
+ return selectRowsFn(table, rowModel);
2113
2076
  }, {
2114
2077
  key: process.env.NODE_ENV === 'development' && 'getSelectedRowModel',
2115
2078
  debug: () => {
2116
- var _instance$options$deb;
2079
+ var _table$options$debugA;
2117
2080
 
2118
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
2081
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
2119
2082
  }
2120
2083
  }),
2121
- getFilteredSelectedRowModel: memo(() => [instance.getState().rowSelection, instance.getFilteredRowModel()], (rowSelection, rowModel) => {
2084
+ getFilteredSelectedRowModel: memo(() => [table.getState().rowSelection, table.getFilteredRowModel()], (rowSelection, rowModel) => {
2122
2085
  if (!Object.keys(rowSelection).length) {
2123
2086
  return {
2124
2087
  rows: [],
@@ -2127,16 +2090,16 @@ const RowSelection = {
2127
2090
  };
2128
2091
  }
2129
2092
 
2130
- return selectRowsFn(instance, rowModel);
2093
+ return selectRowsFn(table, rowModel);
2131
2094
  }, {
2132
2095
  key: process.env.NODE_ENV === 'production' && 'getFilteredSelectedRowModel',
2133
2096
  debug: () => {
2134
- var _instance$options$deb2;
2097
+ var _table$options$debugA2;
2135
2098
 
2136
- return (_instance$options$deb2 = instance.options.debugAll) != null ? _instance$options$deb2 : instance.options.debugTable;
2099
+ return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugTable;
2137
2100
  }
2138
2101
  }),
2139
- getGroupedSelectedRowModel: memo(() => [instance.getState().rowSelection, instance.getSortedRowModel()], (rowSelection, rowModel) => {
2102
+ getGroupedSelectedRowModel: memo(() => [table.getState().rowSelection, table.getSortedRowModel()], (rowSelection, rowModel) => {
2140
2103
  if (!Object.keys(rowSelection).length) {
2141
2104
  return {
2142
2105
  rows: [],
@@ -2145,31 +2108,31 @@ const RowSelection = {
2145
2108
  };
2146
2109
  }
2147
2110
 
2148
- return selectRowsFn(instance, rowModel);
2111
+ return selectRowsFn(table, rowModel);
2149
2112
  }, {
2150
2113
  key: process.env.NODE_ENV === 'production' && 'getGroupedSelectedRowModel',
2151
2114
  debug: () => {
2152
- var _instance$options$deb3;
2115
+ var _table$options$debugA3;
2153
2116
 
2154
- return (_instance$options$deb3 = instance.options.debugAll) != null ? _instance$options$deb3 : instance.options.debugTable;
2117
+ return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugTable;
2155
2118
  }
2156
2119
  }),
2157
2120
  ///
2158
2121
  // getGroupingRowCanSelect: rowId => {
2159
- // const row = instance.getRow(rowId)
2122
+ // const row = table.getRow(rowId)
2160
2123
  // if (!row) {
2161
2124
  // throw new Error()
2162
2125
  // }
2163
- // if (typeof instance.options.enableGroupingRowSelection === 'function') {
2164
- // return instance.options.enableGroupingRowSelection(row)
2126
+ // if (typeof table.options.enableGroupingRowSelection === 'function') {
2127
+ // return table.options.enableGroupingRowSelection(row)
2165
2128
  // }
2166
- // return instance.options.enableGroupingRowSelection ?? false
2129
+ // return table.options.enableGroupingRowSelection ?? false
2167
2130
  // },
2168
2131
  getIsAllRowsSelected: () => {
2169
- const preFilteredFlatRows = instance.getPreFilteredRowModel().flatRows;
2132
+ const preFilteredFlatRows = table.getPreFilteredRowModel().flatRows;
2170
2133
  const {
2171
2134
  rowSelection
2172
- } = instance.getState();
2135
+ } = table.getState();
2173
2136
  let isAllRowsSelected = Boolean(preFilteredFlatRows.length && Object.keys(rowSelection).length);
2174
2137
 
2175
2138
  if (isAllRowsSelected) {
@@ -2181,10 +2144,10 @@ const RowSelection = {
2181
2144
  return isAllRowsSelected;
2182
2145
  },
2183
2146
  getIsAllPageRowsSelected: () => {
2184
- const paginationFlatRows = instance.getPaginationRowModel().flatRows;
2147
+ const paginationFlatRows = table.getPaginationRowModel().flatRows;
2185
2148
  const {
2186
2149
  rowSelection
2187
- } = instance.getState();
2150
+ } = table.getState();
2188
2151
  let isAllPageRowsSelected = !!paginationFlatRows.length;
2189
2152
 
2190
2153
  if (isAllPageRowsSelected && paginationFlatRows.some(row => !rowSelection[row.id])) {
@@ -2194,31 +2157,31 @@ const RowSelection = {
2194
2157
  return isAllPageRowsSelected;
2195
2158
  },
2196
2159
  getIsSomeRowsSelected: () => {
2197
- var _instance$getState$ro;
2160
+ var _table$getState$rowSe;
2198
2161
 
2199
- return !instance.getIsAllRowsSelected() && !!Object.keys((_instance$getState$ro = instance.getState().rowSelection) != null ? _instance$getState$ro : {}).length;
2162
+ return !table.getIsAllRowsSelected() && !!Object.keys((_table$getState$rowSe = table.getState().rowSelection) != null ? _table$getState$rowSe : {}).length;
2200
2163
  },
2201
2164
  getIsSomePageRowsSelected: () => {
2202
- const paginationFlatRows = instance.getPaginationRowModel().flatRows;
2203
- return instance.getIsAllPageRowsSelected() ? false : paginationFlatRows.some(d => d.getIsSelected() || d.getIsSomeSelected());
2165
+ const paginationFlatRows = table.getPaginationRowModel().flatRows;
2166
+ return table.getIsAllPageRowsSelected() ? false : paginationFlatRows.some(d => d.getIsSelected() || d.getIsSomeSelected());
2204
2167
  },
2205
2168
  getToggleAllRowsSelectedHandler: () => {
2206
2169
  return e => {
2207
- instance.toggleAllRowsSelected(e.target.checked);
2170
+ table.toggleAllRowsSelected(e.target.checked);
2208
2171
  };
2209
2172
  },
2210
2173
  getToggleAllPageRowsSelectedHandler: () => {
2211
2174
  return e => {
2212
- instance.toggleAllPageRowsSelected(e.target.checked);
2175
+ table.toggleAllPageRowsSelected(e.target.checked);
2213
2176
  };
2214
2177
  }
2215
2178
  };
2216
2179
  },
2217
- createRow: (row, instance) => {
2180
+ createRow: (row, table) => {
2218
2181
  return {
2219
2182
  toggleSelected: value => {
2220
2183
  const isSelected = row.getIsSelected();
2221
- instance.setRowSelection(old => {
2184
+ table.setRowSelection(old => {
2222
2185
  value = typeof value !== 'undefined' ? value : !isSelected;
2223
2186
 
2224
2187
  if (isSelected === value) {
@@ -2227,48 +2190,48 @@ const RowSelection = {
2227
2190
 
2228
2191
  const selectedRowIds = { ...old
2229
2192
  };
2230
- mutateRowIsSelected(selectedRowIds, row.id, value, instance);
2193
+ mutateRowIsSelected(selectedRowIds, row.id, value, table);
2231
2194
  return selectedRowIds;
2232
2195
  });
2233
2196
  },
2234
2197
  getIsSelected: () => {
2235
2198
  const {
2236
2199
  rowSelection
2237
- } = instance.getState();
2200
+ } = table.getState();
2238
2201
  return isRowSelected(row, rowSelection) === true;
2239
2202
  },
2240
2203
  getIsSomeSelected: () => {
2241
2204
  const {
2242
2205
  rowSelection
2243
- } = instance.getState();
2206
+ } = table.getState();
2244
2207
  return isRowSelected(row, rowSelection) === 'some';
2245
2208
  },
2246
2209
  getCanSelect: () => {
2247
- var _instance$options$ena;
2210
+ var _table$options$enable;
2248
2211
 
2249
- if (typeof instance.options.enableRowSelection === 'function') {
2250
- return instance.options.enableRowSelection(row);
2212
+ if (typeof table.options.enableRowSelection === 'function') {
2213
+ return table.options.enableRowSelection(row);
2251
2214
  }
2252
2215
 
2253
- return (_instance$options$ena = instance.options.enableRowSelection) != null ? _instance$options$ena : true;
2216
+ return (_table$options$enable = table.options.enableRowSelection) != null ? _table$options$enable : true;
2254
2217
  },
2255
2218
  getCanSelectSubRows: () => {
2256
- var _instance$options$ena2;
2219
+ var _table$options$enable2;
2257
2220
 
2258
- if (typeof instance.options.enableSubRowSelection === 'function') {
2259
- return instance.options.enableSubRowSelection(row);
2221
+ if (typeof table.options.enableSubRowSelection === 'function') {
2222
+ return table.options.enableSubRowSelection(row);
2260
2223
  }
2261
2224
 
2262
- return (_instance$options$ena2 = instance.options.enableSubRowSelection) != null ? _instance$options$ena2 : true;
2225
+ return (_table$options$enable2 = table.options.enableSubRowSelection) != null ? _table$options$enable2 : true;
2263
2226
  },
2264
2227
  getCanMultiSelect: () => {
2265
- var _instance$options$ena3;
2228
+ var _table$options$enable3;
2266
2229
 
2267
- if (typeof instance.options.enableMultiRowSelection === 'function') {
2268
- return instance.options.enableMultiRowSelection(row);
2230
+ if (typeof table.options.enableMultiRowSelection === 'function') {
2231
+ return table.options.enableMultiRowSelection(row);
2269
2232
  }
2270
2233
 
2271
- return (_instance$options$ena3 = instance.options.enableMultiRowSelection) != null ? _instance$options$ena3 : true;
2234
+ return (_table$options$enable3 = table.options.enableMultiRowSelection) != null ? _table$options$enable3 : true;
2272
2235
  },
2273
2236
  getToggleSelectedHandler: () => {
2274
2237
  const canSelect = row.getCanSelect();
@@ -2283,13 +2246,13 @@ const RowSelection = {
2283
2246
  }
2284
2247
  };
2285
2248
 
2286
- const mutateRowIsSelected = (selectedRowIds, id, value, instance) => {
2249
+ const mutateRowIsSelected = (selectedRowIds, id, value, table) => {
2287
2250
  var _row$subRows;
2288
2251
 
2289
- const row = instance.getRow(id);
2252
+ const row = table.getRow(id);
2290
2253
  row.getIsGrouped(); // if ( // TODO: enforce grouping row selection rules
2291
2254
  // !isGrouped ||
2292
- // (isGrouped && instance.options.enableGroupingRowSelection)
2255
+ // (isGrouped && table.options.enableGroupingRowSelection)
2293
2256
  // ) {
2294
2257
 
2295
2258
  if (value) {
@@ -2300,12 +2263,12 @@ const mutateRowIsSelected = (selectedRowIds, id, value, instance) => {
2300
2263
 
2301
2264
 
2302
2265
  if ((_row$subRows = row.subRows) != null && _row$subRows.length && row.getCanSelectSubRows()) {
2303
- row.subRows.forEach(row => mutateRowIsSelected(selectedRowIds, row.id, value, instance));
2266
+ row.subRows.forEach(row => mutateRowIsSelected(selectedRowIds, row.id, value, table));
2304
2267
  }
2305
2268
  };
2306
2269
 
2307
- function selectRowsFn(instance, rowModel) {
2308
- const rowSelection = instance.getState().rowSelection;
2270
+ function selectRowsFn(table, rowModel) {
2271
+ const rowSelection = table.getState().rowSelection;
2309
2272
  const newSelectedFlatRows = [];
2310
2273
  const newSelectedRowsById = {}; // Filters top level and nested rows
2311
2274
 
@@ -2339,7 +2302,7 @@ function selectRowsFn(instance, rowModel) {
2339
2302
  rowsById: newSelectedRowsById
2340
2303
  };
2341
2304
  }
2342
- function isRowSelected(row, selection, instance) {
2305
+ function isRowSelected(row, selection, table) {
2343
2306
  if (selection[row.id]) {
2344
2307
  return true;
2345
2308
  }
@@ -2485,18 +2448,18 @@ const Sorting = {
2485
2448
  sortingFn: 'auto'
2486
2449
  };
2487
2450
  },
2488
- getDefaultOptions: instance => {
2451
+ getDefaultOptions: table => {
2489
2452
  return {
2490
- onSortingChange: makeStateUpdater('sorting', instance),
2453
+ onSortingChange: makeStateUpdater('sorting', table),
2491
2454
  isMultiSortEvent: e => {
2492
2455
  return e.shiftKey;
2493
2456
  }
2494
2457
  };
2495
2458
  },
2496
- createColumn: (column, instance) => {
2459
+ createColumn: (column, table) => {
2497
2460
  return {
2498
2461
  getAutoSortingFn: () => {
2499
- const firstRows = instance.getFilteredRowModel().flatRows.slice(10);
2462
+ const firstRows = table.getFilteredRowModel().flatRows.slice(10);
2500
2463
  let isString = false;
2501
2464
 
2502
2465
  for (const row of firstRows) {
@@ -2522,7 +2485,7 @@ const Sorting = {
2522
2485
  return sortingFns.basic;
2523
2486
  },
2524
2487
  getAutoSortDir: () => {
2525
- const firstRow = instance.getFilteredRowModel().flatRows[0];
2488
+ const firstRow = table.getFilteredRowModel().flatRows[0];
2526
2489
  const value = firstRow == null ? void 0 : firstRow.getValue(column.id);
2527
2490
 
2528
2491
  if (typeof value === 'string') {
@@ -2532,29 +2495,25 @@ const Sorting = {
2532
2495
  return 'desc';
2533
2496
  },
2534
2497
  getSortingFn: () => {
2535
- var _ref;
2536
-
2537
- const userSortingFn = instance.options.sortingFns;
2538
-
2539
2498
  if (!column) {
2540
2499
  throw new Error();
2541
2500
  }
2542
2501
 
2543
- return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : (_ref = userSortingFn == null ? void 0 : userSortingFn[column.columnDef.sortingFn]) != null ? _ref : sortingFns[column.columnDef.sortingFn];
2502
+ return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : sortingFns[column.columnDef.sortingFn];
2544
2503
  },
2545
2504
  toggleSorting: (desc, multi) => {
2546
2505
  // if (column.columns.length) {
2547
2506
  // column.columns.forEach((c, i) => {
2548
2507
  // if (c.id) {
2549
- // instance.toggleColumnSorting(c.id, undefined, multi || !!i)
2508
+ // table.toggleColumnSorting(c.id, undefined, multi || !!i)
2550
2509
  // }
2551
2510
  // })
2552
2511
  // return
2553
2512
  // }
2554
- // this needs to be outside of instance.setSorting to be in sync with rerender
2513
+ // this needs to be outside of table.setSorting to be in sync with rerender
2555
2514
  const nextSortingOrder = column.getNextSortingOrder();
2556
- instance.setSorting(old => {
2557
- var _instance$options$ena, _instance$options$ena2;
2515
+ table.setSorting(old => {
2516
+ var _table$options$enable, _table$options$enable2;
2558
2517
 
2559
2518
  // Find any existing sorting for this column
2560
2519
  const existingSorting = old == null ? void 0 : old.find(d => d.id === column.id);
@@ -2583,9 +2542,9 @@ const Sorting = {
2583
2542
 
2584
2543
 
2585
2544
  if (sortAction === 'toggle' && ( // Must be toggling
2586
- (_instance$options$ena = instance.options.enableSortingRemoval) != null ? _instance$options$ena : true) && // If enableSortRemove, enable in general
2545
+ (_table$options$enable = table.options.enableSortingRemoval) != null ? _table$options$enable : true) && // If enableSortRemove, enable in general
2587
2546
  !hasDescDefined && ( // Must not be setting desc
2588
- multi ? (_instance$options$ena2 = instance.options.enableMultiRemove) != null ? _instance$options$ena2 : true : true) && // If multi, don't allow if enableMultiRemove
2547
+ multi ? (_table$options$enable2 = table.options.enableMultiRemove) != null ? _table$options$enable2 : true : true) && // If multi, don't allow if enableMultiRemove
2589
2548
  !nextSortingOrder // Finally, detect if it should indeed be removed
2590
2549
  ) {
2591
2550
  sortAction = 'remove';
@@ -2597,14 +2556,14 @@ const Sorting = {
2597
2556
  desc: hasDescDefined ? desc : nextSortingOrder === 'desc'
2598
2557
  }];
2599
2558
  } else if (sortAction === 'add' && old != null && old.length) {
2600
- var _instance$options$max;
2559
+ var _table$options$maxMul;
2601
2560
 
2602
2561
  newSorting = [...old, {
2603
2562
  id: column.id,
2604
2563
  desc: hasDescDefined ? desc : nextSortingOrder === 'desc'
2605
2564
  }]; // Take latest n columns
2606
2565
 
2607
- newSorting.splice(0, newSorting.length - ((_instance$options$max = instance.options.maxMultiSortColCount) != null ? _instance$options$max : Number.MAX_SAFE_INTEGER));
2566
+ newSorting.splice(0, newSorting.length - ((_table$options$maxMul = table.options.maxMultiSortColCount) != null ? _table$options$maxMul : Number.MAX_SAFE_INTEGER));
2608
2567
  } else if (sortAction === 'toggle' && old != null && old.length) {
2609
2568
  // This flips (or sets) the
2610
2569
  newSorting = old.map(d => {
@@ -2624,9 +2583,9 @@ const Sorting = {
2624
2583
  });
2625
2584
  },
2626
2585
  getNextSortingOrder: () => {
2627
- var _ref2, _column$columnDef$sor;
2586
+ var _ref, _column$columnDef$sor;
2628
2587
 
2629
- const sortDescFirst = (_ref2 = (_column$columnDef$sor = column.columnDef.sortDescFirst) != null ? _column$columnDef$sor : instance.options.sortDescFirst) != null ? _ref2 : column.getAutoSortDir() === 'desc';
2588
+ const sortDescFirst = (_ref = (_column$columnDef$sor = column.columnDef.sortDescFirst) != null ? _column$columnDef$sor : table.options.sortDescFirst) != null ? _ref : column.getAutoSortDir() === 'desc';
2630
2589
  const firstSortDirection = sortDescFirst ? 'desc' : 'asc';
2631
2590
  const isSorted = column.getIsSorted();
2632
2591
 
@@ -2641,59 +2600,59 @@ const Sorting = {
2641
2600
  }
2642
2601
  },
2643
2602
  getCanSort: () => {
2644
- var _column$columnDef$ena, _instance$options$ena3;
2603
+ var _column$columnDef$ena, _table$options$enable3;
2645
2604
 
2646
- return ((_column$columnDef$ena = column.columnDef.enableSorting) != null ? _column$columnDef$ena : true) && ((_instance$options$ena3 = instance.options.enableSorting) != null ? _instance$options$ena3 : true) && !!column.accessorFn;
2605
+ return ((_column$columnDef$ena = column.columnDef.enableSorting) != null ? _column$columnDef$ena : true) && ((_table$options$enable3 = table.options.enableSorting) != null ? _table$options$enable3 : true) && !!column.accessorFn;
2647
2606
  },
2648
2607
  getCanMultiSort: () => {
2649
- var _ref3, _column$columnDef$ena2;
2608
+ var _ref2, _column$columnDef$ena2;
2650
2609
 
2651
- return (_ref3 = (_column$columnDef$ena2 = column.columnDef.enableMultiSort) != null ? _column$columnDef$ena2 : instance.options.enableMultiSort) != null ? _ref3 : !!column.accessorFn;
2610
+ return (_ref2 = (_column$columnDef$ena2 = column.columnDef.enableMultiSort) != null ? _column$columnDef$ena2 : table.options.enableMultiSort) != null ? _ref2 : !!column.accessorFn;
2652
2611
  },
2653
2612
  getIsSorted: () => {
2654
- var _instance$getState$so;
2613
+ var _table$getState$sorti;
2655
2614
 
2656
- const columnSort = (_instance$getState$so = instance.getState().sorting) == null ? void 0 : _instance$getState$so.find(d => d.id === column.id);
2615
+ const columnSort = (_table$getState$sorti = table.getState().sorting) == null ? void 0 : _table$getState$sorti.find(d => d.id === column.id);
2657
2616
  return !columnSort ? false : columnSort.desc ? 'desc' : 'asc';
2658
2617
  },
2659
2618
  getSortIndex: () => {
2660
- var _instance$getState$so2, _instance$getState$so3;
2619
+ var _table$getState$sorti2, _table$getState$sorti3;
2661
2620
 
2662
- return (_instance$getState$so2 = (_instance$getState$so3 = instance.getState().sorting) == null ? void 0 : _instance$getState$so3.findIndex(d => d.id === column.id)) != null ? _instance$getState$so2 : -1;
2621
+ return (_table$getState$sorti2 = (_table$getState$sorti3 = table.getState().sorting) == null ? void 0 : _table$getState$sorti3.findIndex(d => d.id === column.id)) != null ? _table$getState$sorti2 : -1;
2663
2622
  },
2664
2623
  clearSorting: () => {
2665
2624
  //clear sorting for just 1 column
2666
- instance.setSorting(old => old != null && old.length ? old.filter(d => d.id !== column.id) : []);
2625
+ table.setSorting(old => old != null && old.length ? old.filter(d => d.id !== column.id) : []);
2667
2626
  },
2668
2627
  getToggleSortingHandler: () => {
2669
2628
  const canSort = column.getCanSort();
2670
2629
  return e => {
2671
2630
  if (!canSort) return;
2672
2631
  e.persist == null ? void 0 : e.persist();
2673
- column.toggleSorting == null ? void 0 : column.toggleSorting(undefined, column.getCanMultiSort() ? instance.options.isMultiSortEvent == null ? void 0 : instance.options.isMultiSortEvent(e) : false);
2632
+ column.toggleSorting == null ? void 0 : column.toggleSorting(undefined, column.getCanMultiSort() ? table.options.isMultiSortEvent == null ? void 0 : table.options.isMultiSortEvent(e) : false);
2674
2633
  };
2675
2634
  }
2676
2635
  };
2677
2636
  },
2678
- createInstance: instance => {
2637
+ createTable: table => {
2679
2638
  return {
2680
- setSorting: updater => instance.options.onSortingChange == null ? void 0 : instance.options.onSortingChange(updater),
2639
+ setSorting: updater => table.options.onSortingChange == null ? void 0 : table.options.onSortingChange(updater),
2681
2640
  resetSorting: defaultState => {
2682
- var _instance$initialStat, _instance$initialStat2;
2641
+ var _table$initialState$s, _table$initialState;
2683
2642
 
2684
- instance.setSorting(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.sorting) != null ? _instance$initialStat : []);
2643
+ table.setSorting(defaultState ? [] : (_table$initialState$s = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.sorting) != null ? _table$initialState$s : []);
2685
2644
  },
2686
- getPreSortedRowModel: () => instance.getGroupedRowModel(),
2645
+ getPreSortedRowModel: () => table.getGroupedRowModel(),
2687
2646
  getSortedRowModel: () => {
2688
- if (!instance._getSortedRowModel && instance.options.getSortedRowModel) {
2689
- instance._getSortedRowModel = instance.options.getSortedRowModel(instance);
2647
+ if (!table._getSortedRowModel && table.options.getSortedRowModel) {
2648
+ table._getSortedRowModel = table.options.getSortedRowModel(table);
2690
2649
  }
2691
2650
 
2692
- if (instance.options.manualSorting || !instance._getSortedRowModel) {
2693
- return instance.getPreSortedRowModel();
2651
+ if (table.options.manualSorting || !table._getSortedRowModel) {
2652
+ return table.getPreSortedRowModel();
2694
2653
  }
2695
2654
 
2696
- return instance._getSortedRowModel();
2655
+ return table._getSortedRowModel();
2697
2656
  }
2698
2657
  };
2699
2658
  }
@@ -2707,29 +2666,29 @@ const Visibility = {
2707
2666
  ...state
2708
2667
  };
2709
2668
  },
2710
- getDefaultOptions: instance => {
2669
+ getDefaultOptions: table => {
2711
2670
  return {
2712
- onColumnVisibilityChange: makeStateUpdater('columnVisibility', instance)
2671
+ onColumnVisibilityChange: makeStateUpdater('columnVisibility', table)
2713
2672
  };
2714
2673
  },
2715
- createColumn: (column, instance) => {
2674
+ createColumn: (column, table) => {
2716
2675
  return {
2717
2676
  toggleVisibility: value => {
2718
2677
  if (column.getCanHide()) {
2719
- instance.setColumnVisibility(old => ({ ...old,
2678
+ table.setColumnVisibility(old => ({ ...old,
2720
2679
  [column.id]: value != null ? value : !column.getIsVisible()
2721
2680
  }));
2722
2681
  }
2723
2682
  },
2724
2683
  getIsVisible: () => {
2725
- var _instance$getState$co, _instance$getState$co2;
2684
+ var _table$getState$colum, _table$getState$colum2;
2726
2685
 
2727
- return (_instance$getState$co = (_instance$getState$co2 = instance.getState().columnVisibility) == null ? void 0 : _instance$getState$co2[column.id]) != null ? _instance$getState$co : true;
2686
+ return (_table$getState$colum = (_table$getState$colum2 = table.getState().columnVisibility) == null ? void 0 : _table$getState$colum2[column.id]) != null ? _table$getState$colum : true;
2728
2687
  },
2729
2688
  getCanHide: () => {
2730
- var _column$columnDef$ena, _instance$options$ena;
2689
+ var _column$columnDef$ena, _table$options$enable;
2731
2690
 
2732
- return ((_column$columnDef$ena = column.columnDef.enableHiding) != null ? _column$columnDef$ena : true) && ((_instance$options$ena = instance.options.enableHiding) != null ? _instance$options$ena : true);
2691
+ return ((_column$columnDef$ena = column.columnDef.enableHiding) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableHiding) != null ? _table$options$enable : true);
2733
2692
  },
2734
2693
  getToggleVisibilityHandler: () => {
2735
2694
  return e => {
@@ -2738,69 +2697,69 @@ const Visibility = {
2738
2697
  }
2739
2698
  };
2740
2699
  },
2741
- createRow: (row, instance) => {
2700
+ createRow: (row, table) => {
2742
2701
  return {
2743
- _getAllVisibleCells: memo(() => [row.getAllCells(), instance.getState().columnVisibility], cells => {
2702
+ _getAllVisibleCells: memo(() => [row.getAllCells(), table.getState().columnVisibility], cells => {
2744
2703
  return cells.filter(cell => cell.column.getIsVisible());
2745
2704
  }, {
2746
2705
  key: process.env.NODE_ENV === 'production' && 'row._getAllVisibleCells',
2747
2706
  debug: () => {
2748
- var _instance$options$deb;
2707
+ var _table$options$debugA;
2749
2708
 
2750
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugRows;
2709
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugRows;
2751
2710
  }
2752
2711
  }),
2753
2712
  getVisibleCells: memo(() => [row.getLeftVisibleCells(), row.getCenterVisibleCells(), row.getRightVisibleCells()], (left, center, right) => [...left, ...center, ...right], {
2754
2713
  key: process.env.NODE_ENV === 'development' && 'row.getVisibleCells',
2755
2714
  debug: () => {
2756
- var _instance$options$deb2;
2715
+ var _table$options$debugA2;
2757
2716
 
2758
- return (_instance$options$deb2 = instance.options.debugAll) != null ? _instance$options$deb2 : instance.options.debugRows;
2717
+ return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugRows;
2759
2718
  }
2760
2719
  })
2761
2720
  };
2762
2721
  },
2763
- createInstance: instance => {
2722
+ createTable: table => {
2764
2723
  const makeVisibleColumnsMethod = (key, getColumns) => {
2765
2724
  return memo(() => [getColumns(), getColumns().filter(d => d.getIsVisible()).map(d => d.id).join('_')], columns => {
2766
2725
  return columns.filter(d => d.getIsVisible == null ? void 0 : d.getIsVisible());
2767
2726
  }, {
2768
2727
  key,
2769
2728
  debug: () => {
2770
- var _instance$options$deb3;
2729
+ var _table$options$debugA3;
2771
2730
 
2772
- return (_instance$options$deb3 = instance.options.debugAll) != null ? _instance$options$deb3 : instance.options.debugColumns;
2731
+ return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugColumns;
2773
2732
  }
2774
2733
  });
2775
2734
  };
2776
2735
 
2777
2736
  return {
2778
- getVisibleFlatColumns: makeVisibleColumnsMethod('getVisibleFlatColumns', () => instance.getAllFlatColumns()),
2779
- getVisibleLeafColumns: makeVisibleColumnsMethod('getVisibleLeafColumns', () => instance.getAllLeafColumns()),
2780
- getLeftVisibleLeafColumns: makeVisibleColumnsMethod('getLeftVisibleLeafColumns', () => instance.getLeftLeafColumns()),
2781
- getRightVisibleLeafColumns: makeVisibleColumnsMethod('getRightVisibleLeafColumns', () => instance.getRightLeafColumns()),
2782
- getCenterVisibleLeafColumns: makeVisibleColumnsMethod('getCenterVisibleLeafColumns', () => instance.getCenterLeafColumns()),
2783
- setColumnVisibility: updater => instance.options.onColumnVisibilityChange == null ? void 0 : instance.options.onColumnVisibilityChange(updater),
2737
+ getVisibleFlatColumns: makeVisibleColumnsMethod('getVisibleFlatColumns', () => table.getAllFlatColumns()),
2738
+ getVisibleLeafColumns: makeVisibleColumnsMethod('getVisibleLeafColumns', () => table.getAllLeafColumns()),
2739
+ getLeftVisibleLeafColumns: makeVisibleColumnsMethod('getLeftVisibleLeafColumns', () => table.getLeftLeafColumns()),
2740
+ getRightVisibleLeafColumns: makeVisibleColumnsMethod('getRightVisibleLeafColumns', () => table.getRightLeafColumns()),
2741
+ getCenterVisibleLeafColumns: makeVisibleColumnsMethod('getCenterVisibleLeafColumns', () => table.getCenterLeafColumns()),
2742
+ setColumnVisibility: updater => table.options.onColumnVisibilityChange == null ? void 0 : table.options.onColumnVisibilityChange(updater),
2784
2743
  resetColumnVisibility: defaultState => {
2785
- var _instance$initialStat;
2744
+ var _table$initialState$c;
2786
2745
 
2787
- instance.setColumnVisibility(defaultState ? {} : (_instance$initialStat = instance.initialState.columnVisibility) != null ? _instance$initialStat : {});
2746
+ table.setColumnVisibility(defaultState ? {} : (_table$initialState$c = table.initialState.columnVisibility) != null ? _table$initialState$c : {});
2788
2747
  },
2789
2748
  toggleAllColumnsVisible: value => {
2790
2749
  var _value;
2791
2750
 
2792
- value = (_value = value) != null ? _value : !instance.getIsAllColumnsVisible();
2793
- instance.setColumnVisibility(instance.getAllLeafColumns().reduce((obj, column) => ({ ...obj,
2751
+ value = (_value = value) != null ? _value : !table.getIsAllColumnsVisible();
2752
+ table.setColumnVisibility(table.getAllLeafColumns().reduce((obj, column) => ({ ...obj,
2794
2753
  [column.id]: !value ? !(column.getCanHide != null && column.getCanHide()) : value
2795
2754
  }), {}));
2796
2755
  },
2797
- getIsAllColumnsVisible: () => !instance.getAllLeafColumns().some(column => !(column.getIsVisible != null && column.getIsVisible())),
2798
- getIsSomeColumnsVisible: () => instance.getAllLeafColumns().some(column => column.getIsVisible == null ? void 0 : column.getIsVisible()),
2756
+ getIsAllColumnsVisible: () => !table.getAllLeafColumns().some(column => !(column.getIsVisible != null && column.getIsVisible())),
2757
+ getIsSomeColumnsVisible: () => table.getAllLeafColumns().some(column => column.getIsVisible == null ? void 0 : column.getIsVisible()),
2799
2758
  getToggleAllColumnsVisibilityHandler: () => {
2800
2759
  return e => {
2801
2760
  var _target;
2802
2761
 
2803
- instance.toggleAllColumnsVisible((_target = e.target) == null ? void 0 : _target.checked);
2762
+ table.toggleAllColumnsVisible((_target = e.target) == null ? void 0 : _target.checked);
2804
2763
  };
2805
2764
  }
2806
2765
  };
@@ -2809,24 +2768,24 @@ const Visibility = {
2809
2768
 
2810
2769
  const features = [Headers, Visibility, Ordering, Pinning, Filters, Sorting, Grouping, Expanding, Pagination, RowSelection, ColumnSizing]; //
2811
2770
 
2812
- function createTableInstance$1(options) {
2771
+ function createTable(options) {
2813
2772
  var _options$initialState;
2814
2773
 
2815
2774
  if (options.debugAll || options.debugTable) {
2816
2775
  console.info('Creating Table Instance...');
2817
2776
  }
2818
2777
 
2819
- let instance = {
2778
+ let table = {
2820
2779
  _features: features
2821
2780
  };
2822
2781
 
2823
- const defaultOptions = instance._features.reduce((obj, feature) => {
2824
- return Object.assign(obj, feature.getDefaultOptions == null ? void 0 : feature.getDefaultOptions(instance));
2782
+ const defaultOptions = table._features.reduce((obj, feature) => {
2783
+ return Object.assign(obj, feature.getDefaultOptions == null ? void 0 : feature.getDefaultOptions(table));
2825
2784
  }, {});
2826
2785
 
2827
2786
  const mergeOptions = options => {
2828
- if (instance.options.mergeOptions) {
2829
- return instance.options.mergeOptions(defaultOptions, options);
2787
+ if (table.options.mergeOptions) {
2788
+ return table.options.mergeOptions(defaultOptions, options);
2830
2789
  }
2831
2790
 
2832
2791
  return { ...defaultOptions,
@@ -2839,7 +2798,7 @@ function createTableInstance$1(options) {
2839
2798
  ...((_options$initialState = options.initialState) != null ? _options$initialState : {})
2840
2799
  };
2841
2800
 
2842
- instance._features.forEach(feature => {
2801
+ table._features.forEach(feature => {
2843
2802
  var _feature$getInitialSt;
2844
2803
 
2845
2804
  initialState = (_feature$getInitialSt = feature.getInitialState == null ? void 0 : feature.getInitialState(initialState)) != null ? _feature$getInitialSt : initialState;
@@ -2872,48 +2831,37 @@ function createTableInstance$1(options) {
2872
2831
  }
2873
2832
  },
2874
2833
  reset: () => {
2875
- instance.setState(instance.initialState);
2834
+ table.setState(table.initialState);
2876
2835
  },
2877
2836
  setOptions: updater => {
2878
- const newOptions = functionalUpdate(updater, instance.options);
2879
- instance.options = mergeOptions(newOptions);
2880
- },
2881
- _render: (template, props) => {
2882
- if (typeof instance.options.render === 'function') {
2883
- return instance.options.render(template, props);
2884
- }
2885
-
2886
- if (typeof template === 'function') {
2887
- return template(props);
2888
- }
2889
-
2890
- return template;
2837
+ const newOptions = functionalUpdate(updater, table.options);
2838
+ table.options = mergeOptions(newOptions);
2891
2839
  },
2892
2840
  getState: () => {
2893
- return instance.options.state;
2841
+ return table.options.state;
2894
2842
  },
2895
2843
  setState: updater => {
2896
- instance.options.onStateChange == null ? void 0 : instance.options.onStateChange(updater);
2844
+ table.options.onStateChange == null ? void 0 : table.options.onStateChange(updater);
2897
2845
  },
2898
2846
  _getRowId: (row, index, parent) => {
2899
- var _instance$options$get;
2847
+ var _table$options$getRow;
2900
2848
 
2901
- return (_instance$options$get = instance.options.getRowId == null ? void 0 : instance.options.getRowId(row, index, parent)) != null ? _instance$options$get : "" + (parent ? [parent.id, index].join('.') : index);
2849
+ return (_table$options$getRow = table.options.getRowId == null ? void 0 : table.options.getRowId(row, index, parent)) != null ? _table$options$getRow : "" + (parent ? [parent.id, index].join('.') : index);
2902
2850
  },
2903
2851
  getCoreRowModel: () => {
2904
- if (!instance._getCoreRowModel) {
2905
- instance._getCoreRowModel = instance.options.getCoreRowModel(instance);
2852
+ if (!table._getCoreRowModel) {
2853
+ table._getCoreRowModel = table.options.getCoreRowModel(table);
2906
2854
  }
2907
2855
 
2908
- return instance._getCoreRowModel();
2856
+ return table._getCoreRowModel();
2909
2857
  },
2910
2858
  // The final calls start at the bottom of the model,
2911
2859
  // expanded rows, which then work their way up
2912
2860
  getRowModel: () => {
2913
- return instance.getPaginationRowModel();
2861
+ return table.getPaginationRowModel();
2914
2862
  },
2915
2863
  getRow: id => {
2916
- const row = instance.getRowModel().rowsById[id];
2864
+ const row = table.getRowModel().rowsById[id];
2917
2865
 
2918
2866
  if (!row) {
2919
2867
  if (process.env.NODE_ENV !== 'production') {
@@ -2925,7 +2873,7 @@ function createTableInstance$1(options) {
2925
2873
 
2926
2874
  return row;
2927
2875
  },
2928
- _getDefaultColumnDef: memo(() => [instance.options.defaultColumn], defaultColumn => {
2876
+ _getDefaultColumnDef: memo(() => [table.options.defaultColumn], defaultColumn => {
2929
2877
  var _defaultColumn;
2930
2878
 
2931
2879
  defaultColumn = (_defaultColumn = defaultColumn) != null ? _defaultColumn : {};
@@ -2933,32 +2881,32 @@ function createTableInstance$1(options) {
2933
2881
  header: props => props.header.column.id,
2934
2882
  footer: props => props.header.column.id,
2935
2883
  cell: props => {
2936
- var _props$getValue$toStr, _props$getValue;
2884
+ var _toString, _props$renderValue;
2937
2885
 
2938
- return (_props$getValue$toStr = (_props$getValue = props.getValue()) == null ? void 0 : _props$getValue.toString == null ? void 0 : _props$getValue.toString()) != null ? _props$getValue$toStr : null;
2886
+ return (_toString = (_props$renderValue = props.renderValue()) == null ? void 0 : _props$renderValue.toString == null ? void 0 : _props$renderValue.toString()) != null ? _toString : null;
2939
2887
  },
2940
- ...instance._features.reduce((obj, feature) => {
2888
+ ...table._features.reduce((obj, feature) => {
2941
2889
  return Object.assign(obj, feature.getDefaultColumnDef == null ? void 0 : feature.getDefaultColumnDef());
2942
2890
  }, {}),
2943
2891
  ...defaultColumn
2944
2892
  };
2945
2893
  }, {
2946
2894
  debug: () => {
2947
- var _instance$options$deb;
2895
+ var _table$options$debugA;
2948
2896
 
2949
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugColumns;
2897
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugColumns;
2950
2898
  },
2951
2899
  key: process.env.NODE_ENV === 'development' && 'getDefaultColumnDef'
2952
2900
  }),
2953
- _getColumnDefs: () => instance.options.columns,
2954
- getAllColumns: memo(() => [instance._getColumnDefs()], columnDefs => {
2901
+ _getColumnDefs: () => table.options.columns,
2902
+ getAllColumns: memo(() => [table._getColumnDefs()], columnDefs => {
2955
2903
  const recurseColumns = function (columnDefs, parent, depth) {
2956
2904
  if (depth === void 0) {
2957
2905
  depth = 0;
2958
2906
  }
2959
2907
 
2960
2908
  return columnDefs.map(columnDef => {
2961
- const column = createColumn(instance, columnDef, depth, parent);
2909
+ const column = createColumn(table, columnDef, depth, parent);
2962
2910
  column.columns = columnDef.columns ? recurseColumns(columnDef.columns, column, depth + 1) : [];
2963
2911
  return column;
2964
2912
  });
@@ -2968,24 +2916,24 @@ function createTableInstance$1(options) {
2968
2916
  }, {
2969
2917
  key: process.env.NODE_ENV === 'development' && 'getAllColumns',
2970
2918
  debug: () => {
2971
- var _instance$options$deb2;
2919
+ var _table$options$debugA2;
2972
2920
 
2973
- return (_instance$options$deb2 = instance.options.debugAll) != null ? _instance$options$deb2 : instance.options.debugColumns;
2921
+ return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugColumns;
2974
2922
  }
2975
2923
  }),
2976
- getAllFlatColumns: memo(() => [instance.getAllColumns()], allColumns => {
2924
+ getAllFlatColumns: memo(() => [table.getAllColumns()], allColumns => {
2977
2925
  return allColumns.flatMap(column => {
2978
2926
  return column.getFlatColumns();
2979
2927
  });
2980
2928
  }, {
2981
2929
  key: process.env.NODE_ENV === 'development' && 'getAllFlatColumns',
2982
2930
  debug: () => {
2983
- var _instance$options$deb3;
2931
+ var _table$options$debugA3;
2984
2932
 
2985
- return (_instance$options$deb3 = instance.options.debugAll) != null ? _instance$options$deb3 : instance.options.debugColumns;
2933
+ return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugColumns;
2986
2934
  }
2987
2935
  }),
2988
- _getAllFlatColumnsById: memo(() => [instance.getAllFlatColumns()], flatColumns => {
2936
+ _getAllFlatColumnsById: memo(() => [table.getAllFlatColumns()], flatColumns => {
2989
2937
  return flatColumns.reduce((acc, column) => {
2990
2938
  acc[column.id] = column;
2991
2939
  return acc;
@@ -2993,24 +2941,24 @@ function createTableInstance$1(options) {
2993
2941
  }, {
2994
2942
  key: process.env.NODE_ENV === 'development' && 'getAllFlatColumnsById',
2995
2943
  debug: () => {
2996
- var _instance$options$deb4;
2944
+ var _table$options$debugA4;
2997
2945
 
2998
- return (_instance$options$deb4 = instance.options.debugAll) != null ? _instance$options$deb4 : instance.options.debugColumns;
2946
+ return (_table$options$debugA4 = table.options.debugAll) != null ? _table$options$debugA4 : table.options.debugColumns;
2999
2947
  }
3000
2948
  }),
3001
- getAllLeafColumns: memo(() => [instance.getAllColumns(), instance._getOrderColumnsFn()], (allColumns, orderColumns) => {
2949
+ getAllLeafColumns: memo(() => [table.getAllColumns(), table._getOrderColumnsFn()], (allColumns, orderColumns) => {
3002
2950
  let leafColumns = allColumns.flatMap(column => column.getLeafColumns());
3003
2951
  return orderColumns(leafColumns);
3004
2952
  }, {
3005
2953
  key: process.env.NODE_ENV === 'development' && 'getAllLeafColumns',
3006
2954
  debug: () => {
3007
- var _instance$options$deb5;
2955
+ var _table$options$debugA5;
3008
2956
 
3009
- return (_instance$options$deb5 = instance.options.debugAll) != null ? _instance$options$deb5 : instance.options.debugColumns;
2957
+ return (_table$options$debugA5 = table.options.debugAll) != null ? _table$options$debugA5 : table.options.debugColumns;
3010
2958
  }
3011
2959
  }),
3012
2960
  getColumn: columnId => {
3013
- const column = instance._getAllFlatColumnsById()[columnId];
2961
+ const column = table._getAllFlatColumnsById()[columnId];
3014
2962
 
3015
2963
  if (!column) {
3016
2964
  if (process.env.NODE_ENV !== 'production') {
@@ -3023,76 +2971,20 @@ function createTableInstance$1(options) {
3023
2971
  return column;
3024
2972
  }
3025
2973
  };
3026
- Object.assign(instance, coreInstance);
2974
+ Object.assign(table, coreInstance);
3027
2975
 
3028
- instance._features.forEach(feature => {
3029
- return Object.assign(instance, feature.createInstance == null ? void 0 : feature.createInstance(instance));
2976
+ table._features.forEach(feature => {
2977
+ return Object.assign(table, feature.createTable == null ? void 0 : feature.createTable(table));
3030
2978
  });
3031
2979
 
3032
- return instance;
3033
- }
3034
-
3035
- //
3036
- function createTableFactory(opts) {
3037
- return () => createTable$1(undefined, undefined, opts);
3038
- } // A lot of returns in here are `as any` for a reason. Unless you
3039
- // can find a better way to do this, then don't worry about them
3040
-
3041
- function createTable$1(_, __, options) {
3042
- const table = {
3043
- generics: undefined,
3044
- options: options != null ? options : {
3045
- render: (() => {
3046
- throw new Error('');
3047
- })()
3048
- },
3049
- // setGenerics: () => table as any,
3050
- setRowType: () => table,
3051
- setTableMetaType: () => table,
3052
- setColumnMetaType: () => table,
3053
- setFilterMetaType: () => table,
3054
- setOptions: newOptions => createTable$1(_, __, { ...options,
3055
- ...newOptions
3056
- }),
3057
- createDisplayColumn: column => ({ ...column,
3058
- columnDefType: 'display'
3059
- }),
3060
- createGroup: column => ({ ...column,
3061
- columnDefType: 'group'
3062
- }),
3063
- createDataColumn: (accessor, column) => {
3064
- column = { ...column,
3065
- columnDefType: 'data',
3066
- id: column.id
3067
- };
3068
-
3069
- if (typeof accessor === 'string') {
3070
- var _column$id;
3071
-
3072
- return { ...column,
3073
- id: (_column$id = column.id) != null ? _column$id : accessor,
3074
- accessorKey: accessor
3075
- };
3076
- }
3077
-
3078
- if (typeof accessor === 'function') {
3079
- return { ...column,
3080
- accessorFn: accessor
3081
- };
3082
- }
3083
-
3084
- throw new Error('Invalid accessor');
3085
- },
3086
- createOptions: options => options
3087
- };
3088
2980
  return table;
3089
2981
  }
3090
2982
 
3091
- function createCell(instance, row, column, columnId) {
2983
+ function createCell(table, row, column, columnId) {
3092
2984
  const getRenderValue = () => {
3093
2985
  var _cell$getValue;
3094
2986
 
3095
- return (_cell$getValue = cell.getValue()) != null ? _cell$getValue : instance.options.renderFallbackValue;
2987
+ return (_cell$getValue = cell.getValue()) != null ? _cell$getValue : table.options.renderFallbackValue;
3096
2988
  };
3097
2989
 
3098
2990
  const cell = {
@@ -3100,25 +2992,25 @@ function createCell(instance, row, column, columnId) {
3100
2992
  row,
3101
2993
  column,
3102
2994
  getValue: () => row.getValue(columnId),
3103
- renderCell: () => {
3104
- return column.columnDef.cell ? instance._render(column.columnDef.cell, {
3105
- instance,
3106
- column,
3107
- row,
3108
- cell: cell,
3109
- getValue: getRenderValue
3110
- }) : null;
3111
- }
2995
+ renderValue: getRenderValue,
2996
+ getContext: () => ({
2997
+ table,
2998
+ column,
2999
+ row,
3000
+ cell: cell,
3001
+ getValue: cell.getValue,
3002
+ renderValue: cell.renderValue
3003
+ })
3112
3004
  };
3113
3005
 
3114
- instance._features.forEach(feature => {
3115
- Object.assign(cell, feature.createCell == null ? void 0 : feature.createCell(cell, column, row, instance));
3006
+ table._features.forEach(feature => {
3007
+ Object.assign(cell, feature.createCell == null ? void 0 : feature.createCell(cell, column, row, table));
3116
3008
  }, {});
3117
3009
 
3118
3010
  return cell;
3119
3011
  }
3120
3012
 
3121
- const createRow = (instance, id, original, rowIndex, depth, subRows) => {
3013
+ const createRow = (table, id, original, rowIndex, depth, subRows) => {
3122
3014
  let row = {
3123
3015
  id,
3124
3016
  index: rowIndex,
@@ -3130,7 +3022,7 @@ const createRow = (instance, id, original, rowIndex, depth, subRows) => {
3130
3022
  return row._valuesCache[columnId];
3131
3023
  }
3132
3024
 
3133
- const column = instance.getColumn(columnId);
3025
+ const column = table.getColumn(columnId);
3134
3026
 
3135
3027
  if (!column.accessorFn) {
3136
3028
  return undefined;
@@ -3139,18 +3031,23 @@ const createRow = (instance, id, original, rowIndex, depth, subRows) => {
3139
3031
  row._valuesCache[columnId] = column.accessorFn(row.original, rowIndex);
3140
3032
  return row._valuesCache[columnId];
3141
3033
  },
3034
+ renderValue: columnId => {
3035
+ var _row$getValue;
3036
+
3037
+ return (_row$getValue = row.getValue(columnId)) != null ? _row$getValue : table.options.renderFallbackValue;
3038
+ },
3142
3039
  subRows: subRows != null ? subRows : [],
3143
3040
  getLeafRows: () => flattenBy(row.subRows, d => d.subRows),
3144
- getAllCells: memo(() => [instance.getAllLeafColumns()], leafColumns => {
3041
+ getAllCells: memo(() => [table.getAllLeafColumns()], leafColumns => {
3145
3042
  return leafColumns.map(column => {
3146
- return createCell(instance, row, column, column.id);
3043
+ return createCell(table, row, column, column.id);
3147
3044
  });
3148
3045
  }, {
3149
3046
  key: process.env.NODE_ENV === 'development' && 'row.getAllCells',
3150
3047
  debug: () => {
3151
- var _instance$options$deb;
3048
+ var _table$options$debugA;
3152
3049
 
3153
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugRows;
3050
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugRows;
3154
3051
  }
3155
3052
  }),
3156
3053
  _getAllCellsByColumnId: memo(() => [row.getAllCells()], allCells => {
@@ -3161,23 +3058,23 @@ const createRow = (instance, id, original, rowIndex, depth, subRows) => {
3161
3058
  }, {
3162
3059
  key: process.env.NODE_ENV === 'production' && 'row.getAllCellsByColumnId',
3163
3060
  debug: () => {
3164
- var _instance$options$deb2;
3061
+ var _table$options$debugA2;
3165
3062
 
3166
- return (_instance$options$deb2 = instance.options.debugAll) != null ? _instance$options$deb2 : instance.options.debugRows;
3063
+ return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugRows;
3167
3064
  }
3168
3065
  })
3169
3066
  };
3170
3067
 
3171
- for (let i = 0; i < instance._features.length; i++) {
3172
- const feature = instance._features[i];
3173
- Object.assign(row, feature == null ? void 0 : feature.createRow == null ? void 0 : feature.createRow(row, instance));
3068
+ for (let i = 0; i < table._features.length; i++) {
3069
+ const feature = table._features[i];
3070
+ Object.assign(row, feature == null ? void 0 : feature.createRow == null ? void 0 : feature.createRow(row, table));
3174
3071
  }
3175
3072
 
3176
3073
  return row;
3177
3074
  };
3178
3075
 
3179
3076
  function getCoreRowModel() {
3180
- return instance => memo(() => [instance.options.data], data => {
3077
+ return table => memo(() => [table.options.data], data => {
3181
3078
  const rowModel = {
3182
3079
  rows: [],
3183
3080
  flatRows: [],
@@ -3199,18 +3096,18 @@ function getCoreRowModel() {
3199
3096
  // }
3200
3097
  // }
3201
3098
  // Make the row
3202
- const row = createRow(instance, instance._getRowId(originalRows[i], i, parent), originalRows[i], i, depth); // Keep track of every row in a flat array
3099
+ const row = createRow(table, table._getRowId(originalRows[i], i, parent), originalRows[i], i, depth); // Keep track of every row in a flat array
3203
3100
 
3204
3101
  rowModel.flatRows.push(row); // Also keep track of every row by its ID
3205
3102
 
3206
- rowModel.rowsById[row.id] = row; // Push instance row into parent
3103
+ rowModel.rowsById[row.id] = row; // Push table row into parent
3207
3104
 
3208
3105
  rows.push(row); // Get the original subrows
3209
3106
 
3210
- if (instance.options.getSubRows) {
3107
+ if (table.options.getSubRows) {
3211
3108
  var _row$originalSubRows;
3212
3109
 
3213
- row.originalSubRows = instance.options.getSubRows(originalRows[i], i); // Then recursively access them
3110
+ row.originalSubRows = table.options.getSubRows(originalRows[i], i); // Then recursively access them
3214
3111
 
3215
3112
  if ((_row$originalSubRows = row.originalSubRows) != null && _row$originalSubRows.length) {
3216
3113
  row.subRows = accessRows(row.originalSubRows, depth + 1, row);
@@ -3226,24 +3123,24 @@ function getCoreRowModel() {
3226
3123
  }, {
3227
3124
  key: process.env.NODE_ENV === 'development' && 'getRowModel',
3228
3125
  debug: () => {
3229
- var _instance$options$deb;
3126
+ var _table$options$debugA;
3230
3127
 
3231
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3128
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3232
3129
  },
3233
3130
  onChange: () => {
3234
- instance._autoResetPageIndex();
3131
+ table._autoResetPageIndex();
3235
3132
  }
3236
3133
  });
3237
3134
  }
3238
3135
 
3239
- function filterRows(rows, filterRowImpl, instance) {
3240
- if (instance.options.filterFromLeafRows) {
3241
- return filterRowModelFromLeafs(rows, filterRowImpl, instance);
3136
+ function filterRows(rows, filterRowImpl, table) {
3137
+ if (table.options.filterFromLeafRows) {
3138
+ return filterRowModelFromLeafs(rows, filterRowImpl, table);
3242
3139
  }
3243
3140
 
3244
- return filterRowModelFromRoot(rows, filterRowImpl, instance);
3141
+ return filterRowModelFromRoot(rows, filterRowImpl, table);
3245
3142
  }
3246
- function filterRowModelFromLeafs(rowsToFilter, filterRow, instance) {
3143
+ function filterRowModelFromLeafs(rowsToFilter, filterRow, table) {
3247
3144
  const newFilteredFlatRows = [];
3248
3145
  const newFilteredRowsById = {};
3249
3146
 
@@ -3257,7 +3154,7 @@ function filterRowModelFromLeafs(rowsToFilter, filterRow, instance) {
3257
3154
  let row = rowsToFilter[i];
3258
3155
 
3259
3156
  if ((_row$subRows = row.subRows) != null && _row$subRows.length) {
3260
- const newRow = createRow(instance, row.id, row.original, row.index, row.depth);
3157
+ const newRow = createRow(table, row.id, row.original, row.index, row.depth);
3261
3158
  newRow.columnFilters = row.columnFilters;
3262
3159
  newRow.subRows = recurseFilterRows(row.subRows);
3263
3160
 
@@ -3284,7 +3181,7 @@ function filterRowModelFromLeafs(rowsToFilter, filterRow, instance) {
3284
3181
  rowsById: newFilteredRowsById
3285
3182
  };
3286
3183
  }
3287
- function filterRowModelFromRoot(rowsToFilter, filterRow, instance) {
3184
+ function filterRowModelFromRoot(rowsToFilter, filterRow, table) {
3288
3185
  const newFilteredFlatRows = [];
3289
3186
  const newFilteredRowsById = {}; // Filters top level and nested rows
3290
3187
 
@@ -3301,7 +3198,7 @@ function filterRowModelFromRoot(rowsToFilter, filterRow, instance) {
3301
3198
  var _row$subRows2;
3302
3199
 
3303
3200
  if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {
3304
- const newRow = createRow(instance, row.id, row.original, row.index, row.depth);
3201
+ const newRow = createRow(table, row.id, row.original, row.index, row.depth);
3305
3202
  newRow.subRows = recurseFilterRows(row.subRows);
3306
3203
  row = newRow;
3307
3204
  }
@@ -3323,7 +3220,7 @@ function filterRowModelFromRoot(rowsToFilter, filterRow, instance) {
3323
3220
  }
3324
3221
 
3325
3222
  function getFilteredRowModel() {
3326
- return instance => memo(() => [instance.getPreFilteredRowModel(), instance.getState().columnFilters, instance.getState().globalFilter], (rowModel, columnFilters, globalFilter) => {
3223
+ return table => memo(() => [table.getPreFilteredRowModel(), table.getState().columnFilters, table.getState().globalFilter], (rowModel, columnFilters, globalFilter) => {
3327
3224
  if (!rowModel.rows.length || !(columnFilters != null && columnFilters.length) && !globalFilter) {
3328
3225
  for (let i = 0; i < rowModel.flatRows.length; i++) {
3329
3226
  rowModel.flatRows[i].columnFilters = {};
@@ -3338,7 +3235,7 @@ function getFilteredRowModel() {
3338
3235
  (columnFilters != null ? columnFilters : []).forEach(d => {
3339
3236
  var _filterFn$resolveFilt;
3340
3237
 
3341
- const column = instance.getColumn(d.id);
3238
+ const column = table.getColumn(d.id);
3342
3239
 
3343
3240
  if (!column) {
3344
3241
  if (process.env.NODE_ENV !== 'production') {
@@ -3363,8 +3260,8 @@ function getFilteredRowModel() {
3363
3260
  });
3364
3261
  });
3365
3262
  const filterableIds = columnFilters.map(d => d.id);
3366
- const globalFilterFn = instance.getGlobalFilterFn();
3367
- const globallyFilterableColumns = instance.getAllLeafColumns().filter(column => column.getCanGlobalFilter());
3263
+ const globalFilterFn = table.getGlobalFilterFn();
3264
+ const globallyFilterableColumns = table.getAllLeafColumns().filter(column => column.getCanGlobalFilter());
3368
3265
 
3369
3266
  if (globalFilter && globalFilterFn && globallyFilterableColumns.length) {
3370
3267
  filterableIds.push('__global__');
@@ -3428,22 +3325,22 @@ function getFilteredRowModel() {
3428
3325
  }; // Filter final rows using all of the active filters
3429
3326
 
3430
3327
 
3431
- return filterRows(rowModel.rows, filterRowsImpl, instance);
3328
+ return filterRows(rowModel.rows, filterRowsImpl, table);
3432
3329
  }, {
3433
3330
  key: process.env.NODE_ENV === 'development' && 'getFilteredRowModel',
3434
3331
  debug: () => {
3435
- var _instance$options$deb;
3332
+ var _table$options$debugA;
3436
3333
 
3437
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3334
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3438
3335
  },
3439
3336
  onChange: () => {
3440
- instance._autoResetPageIndex();
3337
+ table._autoResetPageIndex();
3441
3338
  }
3442
3339
  });
3443
3340
  }
3444
3341
 
3445
3342
  function getFacetedRowModel() {
3446
- return (instance, columnId) => memo(() => [instance.getPreFilteredRowModel(), instance.getState().columnFilters, instance.getState().globalFilter, instance.getFilteredRowModel()], (preRowModel, columnFilters, globalFilter) => {
3343
+ return (table, columnId) => memo(() => [table.getPreFilteredRowModel(), table.getState().columnFilters, table.getState().globalFilter, table.getFilteredRowModel()], (preRowModel, columnFilters, globalFilter) => {
3447
3344
  if (!preRowModel.rows.length || !(columnFilters != null && columnFilters.length) && !globalFilter) {
3448
3345
  return preRowModel;
3449
3346
  }
@@ -3461,20 +3358,20 @@ function getFacetedRowModel() {
3461
3358
  return true;
3462
3359
  };
3463
3360
 
3464
- return filterRows(preRowModel.rows, filterRowsImpl, instance);
3361
+ return filterRows(preRowModel.rows, filterRowsImpl, table);
3465
3362
  }, {
3466
3363
  key: process.env.NODE_ENV === 'development' && 'getFacetedRowModel_' + columnId,
3467
3364
  debug: () => {
3468
- var _instance$options$deb;
3365
+ var _table$options$debugA;
3469
3366
 
3470
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3367
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3471
3368
  },
3472
3369
  onChange: () => {}
3473
3370
  });
3474
3371
  }
3475
3372
 
3476
3373
  function getFacetedUniqueValues() {
3477
- return (instance, columnId) => memo(() => [instance.getColumn(columnId).getFacetedRowModel()], facetedRowModel => {
3374
+ return (table, columnId) => memo(() => [table.getColumn(columnId).getFacetedRowModel()], facetedRowModel => {
3478
3375
  let facetedUniqueValues = new Map();
3479
3376
 
3480
3377
  for (let i = 0; i < facetedRowModel.flatRows.length; i++) {
@@ -3495,16 +3392,16 @@ function getFacetedUniqueValues() {
3495
3392
  }, {
3496
3393
  key: process.env.NODE_ENV === 'development' && 'getFacetedUniqueValues_' + columnId,
3497
3394
  debug: () => {
3498
- var _instance$options$deb;
3395
+ var _table$options$debugA;
3499
3396
 
3500
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3397
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3501
3398
  },
3502
3399
  onChange: () => {}
3503
3400
  });
3504
3401
  }
3505
3402
 
3506
3403
  function getFacetedMinMaxValues() {
3507
- return (instance, columnId) => memo(() => [instance.getColumn(columnId).getFacetedRowModel()], facetedRowModel => {
3404
+ return (table, columnId) => memo(() => [table.getColumn(columnId).getFacetedRowModel()], facetedRowModel => {
3508
3405
  var _facetedRowModel$flat;
3509
3406
 
3510
3407
  const firstValue = (_facetedRowModel$flat = facetedRowModel.flatRows[0]) == null ? void 0 : _facetedRowModel$flat.getValue(columnId);
@@ -3531,27 +3428,27 @@ function getFacetedMinMaxValues() {
3531
3428
  }, {
3532
3429
  key: process.env.NODE_ENV === 'development' && 'getFacetedMinMaxValues_' + columnId,
3533
3430
  debug: () => {
3534
- var _instance$options$deb;
3431
+ var _table$options$debugA;
3535
3432
 
3536
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3433
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3537
3434
  },
3538
3435
  onChange: () => {}
3539
3436
  });
3540
3437
  }
3541
3438
 
3542
3439
  function getSortedRowModel() {
3543
- return instance => memo(() => [instance.getState().sorting, instance.getPreSortedRowModel()], (sorting, rowModel) => {
3440
+ return table => memo(() => [table.getState().sorting, table.getPreSortedRowModel()], (sorting, rowModel) => {
3544
3441
  if (!rowModel.rows.length || !(sorting != null && sorting.length)) {
3545
3442
  return rowModel;
3546
3443
  }
3547
3444
 
3548
- const sortingState = instance.getState().sorting;
3445
+ const sortingState = table.getState().sorting;
3549
3446
  const sortedFlatRows = []; // Filter out sortings that correspond to non existing columns
3550
3447
 
3551
- const availableSorting = sortingState.filter(sort => instance.getColumn(sort.id).getCanSort());
3448
+ const availableSorting = sortingState.filter(sort => table.getColumn(sort.id).getCanSort());
3552
3449
  const columnInfoById = {};
3553
3450
  availableSorting.forEach(sortEntry => {
3554
- const column = instance.getColumn(sortEntry.id);
3451
+ const column = table.getColumn(sortEntry.id);
3555
3452
  columnInfoById[sortEntry.id] = {
3556
3453
  sortUndefined: column.columnDef.sortUndefined,
3557
3454
  invertSorting: column.columnDef.invertSorting,
@@ -3621,24 +3518,24 @@ function getSortedRowModel() {
3621
3518
  }, {
3622
3519
  key: process.env.NODE_ENV === 'development' && 'getSortedRowModel',
3623
3520
  debug: () => {
3624
- var _instance$options$deb;
3521
+ var _table$options$debugA;
3625
3522
 
3626
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3523
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3627
3524
  },
3628
3525
  onChange: () => {
3629
- instance._autoResetPageIndex();
3526
+ table._autoResetPageIndex();
3630
3527
  }
3631
3528
  });
3632
3529
  }
3633
3530
 
3634
3531
  function getGroupedRowModel() {
3635
- return instance => memo(() => [instance.getState().grouping, instance.getPreGroupedRowModel()], (grouping, rowModel) => {
3532
+ return table => memo(() => [table.getState().grouping, table.getPreGroupedRowModel()], (grouping, rowModel) => {
3636
3533
  if (!rowModel.rows.length || !grouping.length) {
3637
3534
  return rowModel;
3638
3535
  } // Filter the grouping list down to columns that exist
3639
3536
 
3640
3537
 
3641
- const existingGrouping = grouping.filter(columnId => instance.getColumn(columnId));
3538
+ const existingGrouping = grouping.filter(columnId => table.getColumn(columnId));
3642
3539
  const groupedFlatRows = [];
3643
3540
  const groupedRowsById = {}; // const onlyGroupedFlatRows: Row[] = [];
3644
3541
  // const onlyGroupedRowsById: Record<RowId, Row> = {};
@@ -3668,7 +3565,7 @@ function getGroupedRowModel() {
3668
3565
  const subRows = groupUpRecursively(groupedRows, depth + 1, id); // Flatten the leaf rows of the rows in this group
3669
3566
 
3670
3567
  const leafRows = depth ? flattenBy(groupedRows, row => row.subRows) : groupedRows;
3671
- const row = createRow(instance, id, undefined, index, depth);
3568
+ const row = createRow(table, id, undefined, index, depth);
3672
3569
  Object.assign(row, {
3673
3570
  groupingColumnId: columnId,
3674
3571
  groupingValue,
@@ -3695,7 +3592,7 @@ function getGroupedRowModel() {
3695
3592
  } // Aggregate the values
3696
3593
 
3697
3594
 
3698
- const column = instance.getColumn(columnId);
3595
+ const column = table.getColumn(columnId);
3699
3596
  const aggregateFn = column.getAggregationFn();
3700
3597
 
3701
3598
  if (aggregateFn) {
@@ -3738,15 +3635,15 @@ function getGroupedRowModel() {
3738
3635
  }, {
3739
3636
  key: process.env.NODE_ENV === 'development' && 'getGroupedRowModel',
3740
3637
  debug: () => {
3741
- var _instance$options$deb;
3638
+ var _table$options$debugA;
3742
3639
 
3743
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3640
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3744
3641
  },
3745
3642
  onChange: () => {
3746
- instance._queue(() => {
3747
- instance._autoResetExpanded();
3643
+ table._queue(() => {
3644
+ table._autoResetExpanded();
3748
3645
 
3749
- instance._autoResetPageIndex();
3646
+ table._autoResetPageIndex();
3750
3647
  });
3751
3648
  }
3752
3649
  });
@@ -3769,7 +3666,7 @@ function groupBy(rows, columnId) {
3769
3666
  }
3770
3667
 
3771
3668
  function getExpandedRowModel() {
3772
- return instance => memo(() => [instance.getState().expanded, instance.getPreExpandedRowModel(), instance.options.paginateExpandedRows], (expanded, rowModel, paginateExpandedRows) => {
3669
+ return table => memo(() => [table.getState().expanded, table.getPreExpandedRowModel(), table.options.paginateExpandedRows], (expanded, rowModel, paginateExpandedRows) => {
3773
3670
  if (!rowModel.rows.length || // Do not expand if rows are not included in pagination
3774
3671
  !paginateExpandedRows || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
3775
3672
  return rowModel;
@@ -3779,13 +3676,13 @@ function getExpandedRowModel() {
3779
3676
  }, {
3780
3677
  key: process.env.NODE_ENV === 'development' && 'getExpandedRowModel',
3781
3678
  debug: () => {
3782
- var _instance$options$deb;
3679
+ var _table$options$debugA;
3783
3680
 
3784
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3681
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3785
3682
  }
3786
3683
  });
3787
3684
  }
3788
- function expandRows(rowModel, instance) {
3685
+ function expandRows(rowModel, table) {
3789
3686
  const expandedRows = [];
3790
3687
 
3791
3688
  const handleRow = row => {
@@ -3807,7 +3704,7 @@ function expandRows(rowModel, instance) {
3807
3704
  }
3808
3705
 
3809
3706
  function getPaginationRowModel(opts) {
3810
- return instance => memo(() => [instance.getState().pagination, instance.getPrePaginationRowModel()], (pagination, rowModel) => {
3707
+ return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel()], (pagination, rowModel) => {
3811
3708
  if (!rowModel.rows.length) {
3812
3709
  return rowModel;
3813
3710
  }
@@ -3826,7 +3723,7 @@ function getPaginationRowModel(opts) {
3826
3723
  rows = rows.slice(pageStart, pageEnd);
3827
3724
  let paginatedRowModel;
3828
3725
 
3829
- if (!instance.options.paginateExpandedRows) {
3726
+ if (!table.options.paginateExpandedRows) {
3830
3727
  paginatedRowModel = expandRows({
3831
3728
  rows,
3832
3729
  flatRows,
@@ -3855,9 +3752,9 @@ function getPaginationRowModel(opts) {
3855
3752
  }, {
3856
3753
  key: process.env.NODE_ENV === 'development' && 'getPaginationRowModel',
3857
3754
  debug: () => {
3858
- var _instance$options$deb;
3755
+ var _table$options$debugA;
3859
3756
 
3860
- return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3757
+ return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3861
3758
  }
3862
3759
  });
3863
3760
  }
@@ -3996,7 +3893,7 @@ function wrapInPlaceholder(content) {
3996
3893
  });
3997
3894
  }
3998
3895
 
3999
- function render(component, props) {
3896
+ function flexRender(component, props) {
4000
3897
  if (!component) return null;
4001
3898
 
4002
3899
  if (isSvelteComponent(component)) {
@@ -4015,10 +3912,7 @@ function render(component, props) {
4015
3912
 
4016
3913
  return wrapInPlaceholder(component);
4017
3914
  }
4018
- const createTable = createTableFactory({
4019
- render
4020
- });
4021
- function createTableInstance(table, options) {
3915
+ function createSvelteTable(options) {
4022
3916
  let optionsStore;
4023
3917
 
4024
3918
  if ('subscribe' in options) {
@@ -4027,25 +3921,24 @@ function createTableInstance(table, options) {
4027
3921
  optionsStore = readable(options);
4028
3922
  }
4029
3923
 
4030
- let resolvedOptions = { ...table.options,
3924
+ let resolvedOptions = {
4031
3925
  state: {},
4032
3926
  // Dummy state
4033
3927
  onStateChange: () => {},
4034
3928
  // noop
4035
- render,
4036
3929
  renderFallbackValue: null,
4037
3930
  ...get(optionsStore)
4038
3931
  };
4039
- let instance = createTableInstance$1(resolvedOptions);
3932
+ let table = createTable(resolvedOptions);
4040
3933
  let stateStore = writable(
4041
3934
  /** @type {number} */
4042
- instance.initialState); // combine stores
3935
+ table.initialState); // combine stores
4043
3936
 
4044
3937
  let stateOptionsStore = derived([stateStore, optionsStore], s => s);
4045
- const instanceReadable = readable(instance, function start(set) {
3938
+ const tableReadable = readable(table, function start(set) {
4046
3939
  const unsubscribe = stateOptionsStore.subscribe(_ref => {
4047
3940
  let [state, options] = _ref;
4048
- instance.setOptions(prev => {
3941
+ table.setOptions(prev => {
4049
3942
  return { ...prev,
4050
3943
  ...options,
4051
3944
  state: { ...state,
@@ -4063,16 +3956,16 @@ function createTableInstance(table, options) {
4063
3956
  resolvedOptions.onStateChange == null ? void 0 : resolvedOptions.onStateChange(updater);
4064
3957
  }
4065
3958
  };
4066
- }); // it didn't seem to rerender without setting the instance
3959
+ }); // it didn't seem to rerender without setting the table
4067
3960
 
4068
- set(instance);
3961
+ set(table);
4069
3962
  });
4070
3963
  return function stop() {
4071
3964
  unsubscribe();
4072
3965
  };
4073
3966
  });
4074
- return instanceReadable;
3967
+ return tableReadable;
4075
3968
  }
4076
3969
 
4077
- export { ColumnSizing, Expanding, Filters, Grouping, Headers, Ordering, Pagination, Pinning, RowSelection, Sorting, Visibility, aggregationFns, buildHeaderGroups, createColumn, createRow, createTable, createTableFactory, createTableInstance, defaultColumnSizing, expandRows, filterFns, flattenBy, functionalUpdate, getCoreRowModel, getExpandedRowModel, getFacetedMinMaxValues, getFacetedRowModel, getFacetedUniqueValues, getFilteredRowModel, getGroupedRowModel, getPaginationRowModel, getSortedRowModel, isFunction, isRowSelected, makeStateUpdater, memo, noop, orderColumns, passiveEventSupported, reSplitAlphaNumeric, render, renderComponent, selectRowsFn, shouldAutoRemoveFilter, sortingFns };
3970
+ export { ColumnSizing, Expanding, Filters, Grouping, Headers, Ordering, Pagination, Pinning, RowSelection, Sorting, Visibility, aggregationFns, buildHeaderGroups, createColumn, createRow, createSvelteTable, createTable, defaultColumnSizing, expandRows, filterFns, flattenBy, flexRender, functionalUpdate, getCoreRowModel, getExpandedRowModel, getFacetedMinMaxValues, getFacetedRowModel, getFacetedUniqueValues, getFilteredRowModel, getGroupedRowModel, getPaginationRowModel, getSortedRowModel, isFunction, isRowSelected, makeStateUpdater, memo, noop, orderColumns, passiveEventSupported, reSplitAlphaNumeric, renderComponent, selectRowsFn, shouldAutoRemoveFilter, sortingFns };
4078
3971
  //# sourceMappingURL=index.js.map