material-react-table 0.7.0-alpha.1 → 0.7.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/MaterialReactTable.d.ts +195 -58
  2. package/dist/material-react-table.cjs.development.js +239 -931
  3. package/dist/material-react-table.cjs.development.js.map +1 -1
  4. package/dist/material-react-table.cjs.production.min.js +1 -1
  5. package/dist/material-react-table.cjs.production.min.js.map +1 -1
  6. package/dist/material-react-table.esm.js +239 -931
  7. package/dist/material-react-table.esm.js.map +1 -1
  8. package/dist/utils.d.ts +1 -1
  9. package/package.json +1 -1
  10. package/src/MaterialReactTable.tsx +364 -126
  11. package/src/body/MRT_TableBody.tsx +1 -1
  12. package/src/body/MRT_TableBodyCell.tsx +3 -3
  13. package/src/body/MRT_TableBodyRow.tsx +2 -2
  14. package/src/body/MRT_TableDetailPanel.tsx +6 -4
  15. package/src/buttons/MRT_CopyButton.tsx +2 -2
  16. package/src/buttons/MRT_EditActionButtons.tsx +4 -2
  17. package/src/buttons/MRT_ExpandButton.tsx +1 -1
  18. package/src/buttons/MRT_ToggleColumnActionMenuButton.tsx +5 -2
  19. package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +1 -1
  20. package/src/buttons/MRT_ToggleSearchButton.tsx +6 -1
  21. package/src/footer/MRT_TableFooter.tsx +1 -1
  22. package/src/footer/MRT_TableFooterCell.tsx +2 -2
  23. package/src/footer/MRT_TableFooterRow.tsx +1 -1
  24. package/src/head/MRT_TableHead.tsx +1 -1
  25. package/src/head/MRT_TableHeadCell.tsx +22 -29
  26. package/src/head/MRT_TableHeadRow.tsx +1 -1
  27. package/src/inputs/MRT_EditCellTextField.tsx +7 -7
  28. package/src/inputs/MRT_FilterTextField.tsx +2 -2
  29. package/src/inputs/MRT_SearchTextField.tsx +8 -3
  30. package/src/inputs/MRT_SelectCheckbox.tsx +9 -7
  31. package/src/menus/MRT_RowActionMenu.tsx +5 -3
  32. package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +4 -5
  33. package/src/table/MRT_Table.tsx +1 -1
  34. package/src/table/MRT_TableContainer.tsx +16 -20
  35. package/src/table/MRT_TablePaper.tsx +9 -5
  36. package/src/toolbar/MRT_LinearProgressBar.tsx +1 -1
  37. package/src/toolbar/MRT_TablePagination.tsx +3 -2
  38. package/src/toolbar/MRT_ToolbarAlertBanner.tsx +2 -1
  39. package/src/toolbar/MRT_ToolbarBottom.tsx +1 -1
  40. package/src/toolbar/MRT_ToolbarInternalButtons.tsx +5 -4
  41. package/src/toolbar/MRT_ToolbarTop.tsx +2 -2
@@ -30,42 +30,6 @@ import { createTable, useTable, columnFilterRowsFn, expandRowsFn, globalFilterRo
30
30
  import { IconButton, Menu, MenuItem, FormControlLabel, Switch, Box, Button, Divider, ListItemIcon, Tooltip, Checkbox, debounce, Collapse, TextField, InputAdornment, TablePagination, useMediaQuery, Chip, Alert, LinearProgress, Toolbar, alpha, TableCell, TableSortLabel, TableRow, TableHead, Skeleton, TableBody, TableFooter, Table, TableContainer, Paper } from '@mui/material';
31
31
  import { matchSorter } from 'match-sorter';
32
32
 
33
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
34
- try {
35
- var info = gen[key](arg);
36
- var value = info.value;
37
- } catch (error) {
38
- reject(error);
39
- return;
40
- }
41
-
42
- if (info.done) {
43
- resolve(value);
44
- } else {
45
- Promise.resolve(value).then(_next, _throw);
46
- }
47
- }
48
-
49
- function _asyncToGenerator(fn) {
50
- return function () {
51
- var self = this,
52
- args = arguments;
53
- return new Promise(function (resolve, reject) {
54
- var gen = fn.apply(self, args);
55
-
56
- function _next(value) {
57
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
58
- }
59
-
60
- function _throw(err) {
61
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
62
- }
63
-
64
- _next(undefined);
65
- });
66
- };
67
- }
68
-
69
33
  function _extends() {
70
34
  _extends = Object.assign || function (target) {
71
35
  for (var i = 1; i < arguments.length; i++) {
@@ -233,7 +197,11 @@ var MRT_ExpandButton = function MRT_ExpandButton(_ref) {
233
197
 
234
198
  var handleToggleExpand = function handleToggleExpand(event) {
235
199
  row.toggleExpanded();
236
- onRowExpandChange == null ? void 0 : onRowExpandChange(event, row);
200
+ onRowExpandChange == null ? void 0 : onRowExpandChange({
201
+ event: event,
202
+ row: row,
203
+ tableInstance: tableInstance
204
+ });
237
205
  };
238
206
 
239
207
  return React.createElement(IconButton, {
@@ -562,11 +530,11 @@ var MRT_ShowHideColumnsMenuItems = function MRT_ShowHideColumnsMenuItems(_ref) {
562
530
  column.toggleVisibility();
563
531
  }
564
532
 
565
- onColumnHide == null ? void 0 : onColumnHide(column, Object.entries(columnVisibility).filter(function (entry) {
566
- return entry[1];
567
- }).map(function (entry) {
568
- return entry[0];
569
- }));
533
+ onColumnHide == null ? void 0 : onColumnHide({
534
+ column: column,
535
+ columnVisibility: columnVisibility,
536
+ tableInstance: tableInstance
537
+ });
570
538
  };
571
539
 
572
540
  return React.createElement(React.Fragment, null, React.createElement(MenuItem, {
@@ -936,8 +904,6 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
936
904
  };
937
905
 
938
906
  var MRT_RowActionMenu = function MRT_RowActionMenu(_ref) {
939
- var _renderRowActionMenuI;
940
-
941
907
  var anchorEl = _ref.anchorEl,
942
908
  handleEdit = _ref.handleEdit,
943
909
  row = _ref.row,
@@ -967,770 +933,14 @@ var MRT_RowActionMenu = function MRT_RowActionMenu(_ref) {
967
933
  sx: commonMenuItemStyles$1
968
934
  }, React.createElement(Box, {
969
935
  sx: commonListItemStyles
970
- }, React.createElement(ListItemIcon, null, React.createElement(EditIcon, null)), localization.edit)), (_renderRowActionMenuI = renderRowActionMenuItems == null ? void 0 : renderRowActionMenuItems(row, tableInstance, function () {
971
- return setAnchorEl(null);
972
- })) != null ? _renderRowActionMenuI : null);
973
- };
974
-
975
- function createCommonjsModule(fn, module) {
976
- return module = { exports: {} }, fn(module, module.exports), module.exports;
977
- }
978
-
979
- var runtime_1 = createCommonjsModule(function (module) {
980
- /**
981
- * Copyright (c) 2014-present, Facebook, Inc.
982
- *
983
- * This source code is licensed under the MIT license found in the
984
- * LICENSE file in the root directory of this source tree.
985
- */
986
-
987
- var runtime = (function (exports) {
988
-
989
- var Op = Object.prototype;
990
- var hasOwn = Op.hasOwnProperty;
991
- var undefined$1; // More compressible than void 0.
992
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
993
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
994
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
995
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
996
-
997
- function define(obj, key, value) {
998
- Object.defineProperty(obj, key, {
999
- value: value,
1000
- enumerable: true,
1001
- configurable: true,
1002
- writable: true
1003
- });
1004
- return obj[key];
1005
- }
1006
- try {
1007
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
1008
- define({}, "");
1009
- } catch (err) {
1010
- define = function(obj, key, value) {
1011
- return obj[key] = value;
1012
- };
1013
- }
1014
-
1015
- function wrap(innerFn, outerFn, self, tryLocsList) {
1016
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
1017
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
1018
- var generator = Object.create(protoGenerator.prototype);
1019
- var context = new Context(tryLocsList || []);
1020
-
1021
- // The ._invoke method unifies the implementations of the .next,
1022
- // .throw, and .return methods.
1023
- generator._invoke = makeInvokeMethod(innerFn, self, context);
1024
-
1025
- return generator;
1026
- }
1027
- exports.wrap = wrap;
1028
-
1029
- // Try/catch helper to minimize deoptimizations. Returns a completion
1030
- // record like context.tryEntries[i].completion. This interface could
1031
- // have been (and was previously) designed to take a closure to be
1032
- // invoked without arguments, but in all the cases we care about we
1033
- // already have an existing method we want to call, so there's no need
1034
- // to create a new function object. We can even get away with assuming
1035
- // the method takes exactly one argument, since that happens to be true
1036
- // in every case, so we don't have to touch the arguments object. The
1037
- // only additional allocation required is the completion record, which
1038
- // has a stable shape and so hopefully should be cheap to allocate.
1039
- function tryCatch(fn, obj, arg) {
1040
- try {
1041
- return { type: "normal", arg: fn.call(obj, arg) };
1042
- } catch (err) {
1043
- return { type: "throw", arg: err };
1044
- }
1045
- }
1046
-
1047
- var GenStateSuspendedStart = "suspendedStart";
1048
- var GenStateSuspendedYield = "suspendedYield";
1049
- var GenStateExecuting = "executing";
1050
- var GenStateCompleted = "completed";
1051
-
1052
- // Returning this object from the innerFn has the same effect as
1053
- // breaking out of the dispatch switch statement.
1054
- var ContinueSentinel = {};
1055
-
1056
- // Dummy constructor functions that we use as the .constructor and
1057
- // .constructor.prototype properties for functions that return Generator
1058
- // objects. For full spec compliance, you may wish to configure your
1059
- // minifier not to mangle the names of these two functions.
1060
- function Generator() {}
1061
- function GeneratorFunction() {}
1062
- function GeneratorFunctionPrototype() {}
1063
-
1064
- // This is a polyfill for %IteratorPrototype% for environments that
1065
- // don't natively support it.
1066
- var IteratorPrototype = {};
1067
- define(IteratorPrototype, iteratorSymbol, function () {
1068
- return this;
1069
- });
1070
-
1071
- var getProto = Object.getPrototypeOf;
1072
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
1073
- if (NativeIteratorPrototype &&
1074
- NativeIteratorPrototype !== Op &&
1075
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
1076
- // This environment has a native %IteratorPrototype%; use it instead
1077
- // of the polyfill.
1078
- IteratorPrototype = NativeIteratorPrototype;
1079
- }
1080
-
1081
- var Gp = GeneratorFunctionPrototype.prototype =
1082
- Generator.prototype = Object.create(IteratorPrototype);
1083
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
1084
- define(Gp, "constructor", GeneratorFunctionPrototype);
1085
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
1086
- GeneratorFunction.displayName = define(
1087
- GeneratorFunctionPrototype,
1088
- toStringTagSymbol,
1089
- "GeneratorFunction"
1090
- );
1091
-
1092
- // Helper for defining the .next, .throw, and .return methods of the
1093
- // Iterator interface in terms of a single ._invoke method.
1094
- function defineIteratorMethods(prototype) {
1095
- ["next", "throw", "return"].forEach(function(method) {
1096
- define(prototype, method, function(arg) {
1097
- return this._invoke(method, arg);
1098
- });
1099
- });
1100
- }
1101
-
1102
- exports.isGeneratorFunction = function(genFun) {
1103
- var ctor = typeof genFun === "function" && genFun.constructor;
1104
- return ctor
1105
- ? ctor === GeneratorFunction ||
1106
- // For the native GeneratorFunction constructor, the best we can
1107
- // do is to check its .name property.
1108
- (ctor.displayName || ctor.name) === "GeneratorFunction"
1109
- : false;
1110
- };
1111
-
1112
- exports.mark = function(genFun) {
1113
- if (Object.setPrototypeOf) {
1114
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
1115
- } else {
1116
- genFun.__proto__ = GeneratorFunctionPrototype;
1117
- define(genFun, toStringTagSymbol, "GeneratorFunction");
1118
- }
1119
- genFun.prototype = Object.create(Gp);
1120
- return genFun;
1121
- };
1122
-
1123
- // Within the body of any async function, `await x` is transformed to
1124
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
1125
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
1126
- // meant to be awaited.
1127
- exports.awrap = function(arg) {
1128
- return { __await: arg };
1129
- };
1130
-
1131
- function AsyncIterator(generator, PromiseImpl) {
1132
- function invoke(method, arg, resolve, reject) {
1133
- var record = tryCatch(generator[method], generator, arg);
1134
- if (record.type === "throw") {
1135
- reject(record.arg);
1136
- } else {
1137
- var result = record.arg;
1138
- var value = result.value;
1139
- if (value &&
1140
- typeof value === "object" &&
1141
- hasOwn.call(value, "__await")) {
1142
- return PromiseImpl.resolve(value.__await).then(function(value) {
1143
- invoke("next", value, resolve, reject);
1144
- }, function(err) {
1145
- invoke("throw", err, resolve, reject);
1146
- });
1147
- }
1148
-
1149
- return PromiseImpl.resolve(value).then(function(unwrapped) {
1150
- // When a yielded Promise is resolved, its final value becomes
1151
- // the .value of the Promise<{value,done}> result for the
1152
- // current iteration.
1153
- result.value = unwrapped;
1154
- resolve(result);
1155
- }, function(error) {
1156
- // If a rejected Promise was yielded, throw the rejection back
1157
- // into the async generator function so it can be handled there.
1158
- return invoke("throw", error, resolve, reject);
1159
- });
1160
- }
1161
- }
1162
-
1163
- var previousPromise;
1164
-
1165
- function enqueue(method, arg) {
1166
- function callInvokeWithMethodAndArg() {
1167
- return new PromiseImpl(function(resolve, reject) {
1168
- invoke(method, arg, resolve, reject);
1169
- });
1170
- }
1171
-
1172
- return previousPromise =
1173
- // If enqueue has been called before, then we want to wait until
1174
- // all previous Promises have been resolved before calling invoke,
1175
- // so that results are always delivered in the correct order. If
1176
- // enqueue has not been called before, then it is important to
1177
- // call invoke immediately, without waiting on a callback to fire,
1178
- // so that the async generator function has the opportunity to do
1179
- // any necessary setup in a predictable way. This predictability
1180
- // is why the Promise constructor synchronously invokes its
1181
- // executor callback, and why async functions synchronously
1182
- // execute code before the first await. Since we implement simple
1183
- // async functions in terms of async generators, it is especially
1184
- // important to get this right, even though it requires care.
1185
- previousPromise ? previousPromise.then(
1186
- callInvokeWithMethodAndArg,
1187
- // Avoid propagating failures to Promises returned by later
1188
- // invocations of the iterator.
1189
- callInvokeWithMethodAndArg
1190
- ) : callInvokeWithMethodAndArg();
1191
- }
1192
-
1193
- // Define the unified helper method that is used to implement .next,
1194
- // .throw, and .return (see defineIteratorMethods).
1195
- this._invoke = enqueue;
1196
- }
1197
-
1198
- defineIteratorMethods(AsyncIterator.prototype);
1199
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
1200
- return this;
1201
- });
1202
- exports.AsyncIterator = AsyncIterator;
1203
-
1204
- // Note that simple async functions are implemented on top of
1205
- // AsyncIterator objects; they just return a Promise for the value of
1206
- // the final result produced by the iterator.
1207
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
1208
- if (PromiseImpl === void 0) PromiseImpl = Promise;
1209
-
1210
- var iter = new AsyncIterator(
1211
- wrap(innerFn, outerFn, self, tryLocsList),
1212
- PromiseImpl
1213
- );
1214
-
1215
- return exports.isGeneratorFunction(outerFn)
1216
- ? iter // If outerFn is a generator, return the full iterator.
1217
- : iter.next().then(function(result) {
1218
- return result.done ? result.value : iter.next();
1219
- });
1220
- };
1221
-
1222
- function makeInvokeMethod(innerFn, self, context) {
1223
- var state = GenStateSuspendedStart;
1224
-
1225
- return function invoke(method, arg) {
1226
- if (state === GenStateExecuting) {
1227
- throw new Error("Generator is already running");
1228
- }
1229
-
1230
- if (state === GenStateCompleted) {
1231
- if (method === "throw") {
1232
- throw arg;
1233
- }
1234
-
1235
- // Be forgiving, per 25.3.3.3.3 of the spec:
1236
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
1237
- return doneResult();
1238
- }
1239
-
1240
- context.method = method;
1241
- context.arg = arg;
1242
-
1243
- while (true) {
1244
- var delegate = context.delegate;
1245
- if (delegate) {
1246
- var delegateResult = maybeInvokeDelegate(delegate, context);
1247
- if (delegateResult) {
1248
- if (delegateResult === ContinueSentinel) continue;
1249
- return delegateResult;
1250
- }
1251
- }
1252
-
1253
- if (context.method === "next") {
1254
- // Setting context._sent for legacy support of Babel's
1255
- // function.sent implementation.
1256
- context.sent = context._sent = context.arg;
1257
-
1258
- } else if (context.method === "throw") {
1259
- if (state === GenStateSuspendedStart) {
1260
- state = GenStateCompleted;
1261
- throw context.arg;
1262
- }
1263
-
1264
- context.dispatchException(context.arg);
1265
-
1266
- } else if (context.method === "return") {
1267
- context.abrupt("return", context.arg);
1268
- }
1269
-
1270
- state = GenStateExecuting;
1271
-
1272
- var record = tryCatch(innerFn, self, context);
1273
- if (record.type === "normal") {
1274
- // If an exception is thrown from innerFn, we leave state ===
1275
- // GenStateExecuting and loop back for another invocation.
1276
- state = context.done
1277
- ? GenStateCompleted
1278
- : GenStateSuspendedYield;
1279
-
1280
- if (record.arg === ContinueSentinel) {
1281
- continue;
1282
- }
1283
-
1284
- return {
1285
- value: record.arg,
1286
- done: context.done
1287
- };
1288
-
1289
- } else if (record.type === "throw") {
1290
- state = GenStateCompleted;
1291
- // Dispatch the exception by looping back around to the
1292
- // context.dispatchException(context.arg) call above.
1293
- context.method = "throw";
1294
- context.arg = record.arg;
1295
- }
1296
- }
1297
- };
1298
- }
1299
-
1300
- // Call delegate.iterator[context.method](context.arg) and handle the
1301
- // result, either by returning a { value, done } result from the
1302
- // delegate iterator, or by modifying context.method and context.arg,
1303
- // setting context.delegate to null, and returning the ContinueSentinel.
1304
- function maybeInvokeDelegate(delegate, context) {
1305
- var method = delegate.iterator[context.method];
1306
- if (method === undefined$1) {
1307
- // A .throw or .return when the delegate iterator has no .throw
1308
- // method always terminates the yield* loop.
1309
- context.delegate = null;
1310
-
1311
- if (context.method === "throw") {
1312
- // Note: ["return"] must be used for ES3 parsing compatibility.
1313
- if (delegate.iterator["return"]) {
1314
- // If the delegate iterator has a return method, give it a
1315
- // chance to clean up.
1316
- context.method = "return";
1317
- context.arg = undefined$1;
1318
- maybeInvokeDelegate(delegate, context);
1319
-
1320
- if (context.method === "throw") {
1321
- // If maybeInvokeDelegate(context) changed context.method from
1322
- // "return" to "throw", let that override the TypeError below.
1323
- return ContinueSentinel;
1324
- }
1325
- }
1326
-
1327
- context.method = "throw";
1328
- context.arg = new TypeError(
1329
- "The iterator does not provide a 'throw' method");
1330
- }
1331
-
1332
- return ContinueSentinel;
1333
- }
1334
-
1335
- var record = tryCatch(method, delegate.iterator, context.arg);
1336
-
1337
- if (record.type === "throw") {
1338
- context.method = "throw";
1339
- context.arg = record.arg;
1340
- context.delegate = null;
1341
- return ContinueSentinel;
1342
- }
1343
-
1344
- var info = record.arg;
1345
-
1346
- if (! info) {
1347
- context.method = "throw";
1348
- context.arg = new TypeError("iterator result is not an object");
1349
- context.delegate = null;
1350
- return ContinueSentinel;
1351
- }
1352
-
1353
- if (info.done) {
1354
- // Assign the result of the finished delegate to the temporary
1355
- // variable specified by delegate.resultName (see delegateYield).
1356
- context[delegate.resultName] = info.value;
1357
-
1358
- // Resume execution at the desired location (see delegateYield).
1359
- context.next = delegate.nextLoc;
1360
-
1361
- // If context.method was "throw" but the delegate handled the
1362
- // exception, let the outer generator proceed normally. If
1363
- // context.method was "next", forget context.arg since it has been
1364
- // "consumed" by the delegate iterator. If context.method was
1365
- // "return", allow the original .return call to continue in the
1366
- // outer generator.
1367
- if (context.method !== "return") {
1368
- context.method = "next";
1369
- context.arg = undefined$1;
1370
- }
1371
-
1372
- } else {
1373
- // Re-yield the result returned by the delegate method.
1374
- return info;
1375
- }
1376
-
1377
- // The delegate iterator is finished, so forget it and continue with
1378
- // the outer generator.
1379
- context.delegate = null;
1380
- return ContinueSentinel;
1381
- }
1382
-
1383
- // Define Generator.prototype.{next,throw,return} in terms of the
1384
- // unified ._invoke helper method.
1385
- defineIteratorMethods(Gp);
1386
-
1387
- define(Gp, toStringTagSymbol, "Generator");
1388
-
1389
- // A Generator should always return itself as the iterator object when the
1390
- // @@iterator function is called on it. Some browsers' implementations of the
1391
- // iterator prototype chain incorrectly implement this, causing the Generator
1392
- // object to not be returned from this call. This ensures that doesn't happen.
1393
- // See https://github.com/facebook/regenerator/issues/274 for more details.
1394
- define(Gp, iteratorSymbol, function() {
1395
- return this;
1396
- });
1397
-
1398
- define(Gp, "toString", function() {
1399
- return "[object Generator]";
1400
- });
1401
-
1402
- function pushTryEntry(locs) {
1403
- var entry = { tryLoc: locs[0] };
1404
-
1405
- if (1 in locs) {
1406
- entry.catchLoc = locs[1];
1407
- }
1408
-
1409
- if (2 in locs) {
1410
- entry.finallyLoc = locs[2];
1411
- entry.afterLoc = locs[3];
1412
- }
1413
-
1414
- this.tryEntries.push(entry);
1415
- }
1416
-
1417
- function resetTryEntry(entry) {
1418
- var record = entry.completion || {};
1419
- record.type = "normal";
1420
- delete record.arg;
1421
- entry.completion = record;
1422
- }
1423
-
1424
- function Context(tryLocsList) {
1425
- // The root entry object (effectively a try statement without a catch
1426
- // or a finally block) gives us a place to store values thrown from
1427
- // locations where there is no enclosing try statement.
1428
- this.tryEntries = [{ tryLoc: "root" }];
1429
- tryLocsList.forEach(pushTryEntry, this);
1430
- this.reset(true);
1431
- }
1432
-
1433
- exports.keys = function(object) {
1434
- var keys = [];
1435
- for (var key in object) {
1436
- keys.push(key);
1437
- }
1438
- keys.reverse();
1439
-
1440
- // Rather than returning an object with a next method, we keep
1441
- // things simple and return the next function itself.
1442
- return function next() {
1443
- while (keys.length) {
1444
- var key = keys.pop();
1445
- if (key in object) {
1446
- next.value = key;
1447
- next.done = false;
1448
- return next;
1449
- }
1450
- }
1451
-
1452
- // To avoid creating an additional object, we just hang the .value
1453
- // and .done properties off the next function object itself. This
1454
- // also ensures that the minifier will not anonymize the function.
1455
- next.done = true;
1456
- return next;
1457
- };
1458
- };
1459
-
1460
- function values(iterable) {
1461
- if (iterable) {
1462
- var iteratorMethod = iterable[iteratorSymbol];
1463
- if (iteratorMethod) {
1464
- return iteratorMethod.call(iterable);
1465
- }
1466
-
1467
- if (typeof iterable.next === "function") {
1468
- return iterable;
1469
- }
1470
-
1471
- if (!isNaN(iterable.length)) {
1472
- var i = -1, next = function next() {
1473
- while (++i < iterable.length) {
1474
- if (hasOwn.call(iterable, i)) {
1475
- next.value = iterable[i];
1476
- next.done = false;
1477
- return next;
1478
- }
1479
- }
1480
-
1481
- next.value = undefined$1;
1482
- next.done = true;
1483
-
1484
- return next;
1485
- };
1486
-
1487
- return next.next = next;
1488
- }
1489
- }
1490
-
1491
- // Return an iterator with no values.
1492
- return { next: doneResult };
1493
- }
1494
- exports.values = values;
1495
-
1496
- function doneResult() {
1497
- return { value: undefined$1, done: true };
1498
- }
1499
-
1500
- Context.prototype = {
1501
- constructor: Context,
1502
-
1503
- reset: function(skipTempReset) {
1504
- this.prev = 0;
1505
- this.next = 0;
1506
- // Resetting context._sent for legacy support of Babel's
1507
- // function.sent implementation.
1508
- this.sent = this._sent = undefined$1;
1509
- this.done = false;
1510
- this.delegate = null;
1511
-
1512
- this.method = "next";
1513
- this.arg = undefined$1;
1514
-
1515
- this.tryEntries.forEach(resetTryEntry);
1516
-
1517
- if (!skipTempReset) {
1518
- for (var name in this) {
1519
- // Not sure about the optimal order of these conditions:
1520
- if (name.charAt(0) === "t" &&
1521
- hasOwn.call(this, name) &&
1522
- !isNaN(+name.slice(1))) {
1523
- this[name] = undefined$1;
1524
- }
1525
- }
1526
- }
1527
- },
1528
-
1529
- stop: function() {
1530
- this.done = true;
1531
-
1532
- var rootEntry = this.tryEntries[0];
1533
- var rootRecord = rootEntry.completion;
1534
- if (rootRecord.type === "throw") {
1535
- throw rootRecord.arg;
1536
- }
1537
-
1538
- return this.rval;
1539
- },
1540
-
1541
- dispatchException: function(exception) {
1542
- if (this.done) {
1543
- throw exception;
1544
- }
1545
-
1546
- var context = this;
1547
- function handle(loc, caught) {
1548
- record.type = "throw";
1549
- record.arg = exception;
1550
- context.next = loc;
1551
-
1552
- if (caught) {
1553
- // If the dispatched exception was caught by a catch block,
1554
- // then let that catch block handle the exception normally.
1555
- context.method = "next";
1556
- context.arg = undefined$1;
1557
- }
1558
-
1559
- return !! caught;
1560
- }
1561
-
1562
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1563
- var entry = this.tryEntries[i];
1564
- var record = entry.completion;
1565
-
1566
- if (entry.tryLoc === "root") {
1567
- // Exception thrown outside of any try block that could handle
1568
- // it, so set the completion value of the entire function to
1569
- // throw the exception.
1570
- return handle("end");
1571
- }
1572
-
1573
- if (entry.tryLoc <= this.prev) {
1574
- var hasCatch = hasOwn.call(entry, "catchLoc");
1575
- var hasFinally = hasOwn.call(entry, "finallyLoc");
1576
-
1577
- if (hasCatch && hasFinally) {
1578
- if (this.prev < entry.catchLoc) {
1579
- return handle(entry.catchLoc, true);
1580
- } else if (this.prev < entry.finallyLoc) {
1581
- return handle(entry.finallyLoc);
1582
- }
1583
-
1584
- } else if (hasCatch) {
1585
- if (this.prev < entry.catchLoc) {
1586
- return handle(entry.catchLoc, true);
1587
- }
1588
-
1589
- } else if (hasFinally) {
1590
- if (this.prev < entry.finallyLoc) {
1591
- return handle(entry.finallyLoc);
1592
- }
1593
-
1594
- } else {
1595
- throw new Error("try statement without catch or finally");
1596
- }
1597
- }
1598
- }
1599
- },
1600
-
1601
- abrupt: function(type, arg) {
1602
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1603
- var entry = this.tryEntries[i];
1604
- if (entry.tryLoc <= this.prev &&
1605
- hasOwn.call(entry, "finallyLoc") &&
1606
- this.prev < entry.finallyLoc) {
1607
- var finallyEntry = entry;
1608
- break;
1609
- }
1610
- }
1611
-
1612
- if (finallyEntry &&
1613
- (type === "break" ||
1614
- type === "continue") &&
1615
- finallyEntry.tryLoc <= arg &&
1616
- arg <= finallyEntry.finallyLoc) {
1617
- // Ignore the finally entry if control is not jumping to a
1618
- // location outside the try/catch block.
1619
- finallyEntry = null;
1620
- }
1621
-
1622
- var record = finallyEntry ? finallyEntry.completion : {};
1623
- record.type = type;
1624
- record.arg = arg;
1625
-
1626
- if (finallyEntry) {
1627
- this.method = "next";
1628
- this.next = finallyEntry.finallyLoc;
1629
- return ContinueSentinel;
1630
- }
1631
-
1632
- return this.complete(record);
1633
- },
1634
-
1635
- complete: function(record, afterLoc) {
1636
- if (record.type === "throw") {
1637
- throw record.arg;
1638
- }
1639
-
1640
- if (record.type === "break" ||
1641
- record.type === "continue") {
1642
- this.next = record.arg;
1643
- } else if (record.type === "return") {
1644
- this.rval = this.arg = record.arg;
1645
- this.method = "return";
1646
- this.next = "end";
1647
- } else if (record.type === "normal" && afterLoc) {
1648
- this.next = afterLoc;
1649
- }
1650
-
1651
- return ContinueSentinel;
1652
- },
1653
-
1654
- finish: function(finallyLoc) {
1655
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1656
- var entry = this.tryEntries[i];
1657
- if (entry.finallyLoc === finallyLoc) {
1658
- this.complete(entry.completion, entry.afterLoc);
1659
- resetTryEntry(entry);
1660
- return ContinueSentinel;
1661
- }
1662
- }
1663
- },
1664
-
1665
- "catch": function(tryLoc) {
1666
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1667
- var entry = this.tryEntries[i];
1668
- if (entry.tryLoc === tryLoc) {
1669
- var record = entry.completion;
1670
- if (record.type === "throw") {
1671
- var thrown = record.arg;
1672
- resetTryEntry(entry);
1673
- }
1674
- return thrown;
1675
- }
1676
- }
1677
-
1678
- // The context.catch method must only be called with a location
1679
- // argument that corresponds to a known catch block.
1680
- throw new Error("illegal catch attempt");
1681
- },
1682
-
1683
- delegateYield: function(iterable, resultName, nextLoc) {
1684
- this.delegate = {
1685
- iterator: values(iterable),
1686
- resultName: resultName,
1687
- nextLoc: nextLoc
1688
- };
1689
-
1690
- if (this.method === "next") {
1691
- // Deliberately forget the last sent value so that we don't
1692
- // accidentally pass it on to the delegate.
1693
- this.arg = undefined$1;
1694
- }
1695
-
1696
- return ContinueSentinel;
936
+ }, React.createElement(ListItemIcon, null, React.createElement(EditIcon, null)), localization.edit)), renderRowActionMenuItems == null ? void 0 : renderRowActionMenuItems({
937
+ row: row,
938
+ tableInstance: tableInstance,
939
+ closeMenu: function closeMenu() {
940
+ return setAnchorEl(null);
1697
941
  }
1698
- };
1699
-
1700
- // Regardless of whether this script is executing as a CommonJS module
1701
- // or not, return the runtime object so that we can declare the variable
1702
- // regeneratorRuntime in the outer scope, which allows this module to be
1703
- // injected easily by `bin/regenerator --include-runtime script.js`.
1704
- return exports;
1705
-
1706
- }(
1707
- // If this script is executing as a CommonJS module, use module.exports
1708
- // as the regeneratorRuntime namespace. Otherwise create a new empty
1709
- // object. Either way, the resulting object will be used to initialize
1710
- // the regeneratorRuntime variable at the top of this file.
1711
- module.exports
1712
- ));
1713
-
1714
- try {
1715
- regeneratorRuntime = runtime;
1716
- } catch (accidentalStrictMode) {
1717
- // This module should not be running in strict mode, so the above
1718
- // assignment should always work unless something is misconfigured. Just
1719
- // in case runtime.js accidentally runs in strict mode, in modern engines
1720
- // we can explicitly access globalThis. In older engines we can escape
1721
- // strict mode using a global Function call. This could conceivably fail
1722
- // if a Content Security Policy forbids using Function, but in that case
1723
- // the proper solution is to fix the accidental strict mode problem. If
1724
- // you've misconfigured your bundler to force strict mode and applied a
1725
- // CSP to forbid Function, and you're not willing to fix either of those
1726
- // problems, please detail your unique predicament in a GitHub issue.
1727
- if (typeof globalThis === "object") {
1728
- globalThis.regeneratorRuntime = runtime;
1729
- } else {
1730
- Function("r", "regeneratorRuntime = r")(runtime);
1731
- }
1732
- }
1733
- });
942
+ }));
943
+ };
1734
944
 
1735
945
  var MRT_EditActionButtons = function MRT_EditActionButtons(_ref) {
1736
946
  var row = _ref.row,
@@ -1744,6 +954,9 @@ var MRT_EditActionButtons = function MRT_EditActionButtons(_ref) {
1744
954
  onRowEditSubmit = _tableInstance$option.onRowEditSubmit,
1745
955
  setCurrentEditingRow = _tableInstance$option.setCurrentEditingRow;
1746
956
 
957
+ var _getState = getState(),
958
+ currentEditingRow = _getState.currentEditingRow;
959
+
1747
960
  var handleCancel = function handleCancel() {
1748
961
  var _row$original;
1749
962
 
@@ -1751,32 +964,13 @@ var MRT_EditActionButtons = function MRT_EditActionButtons(_ref) {
1751
964
  setCurrentEditingRow(null);
1752
965
  };
1753
966
 
1754
- var handleSave = /*#__PURE__*/function () {
1755
- var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
1756
- var _getState$currentEdit;
1757
-
1758
- return runtime_1.wrap(function _callee$(_context) {
1759
- while (1) {
1760
- switch (_context.prev = _context.next) {
1761
- case 0:
1762
- _context.next = 2;
1763
- return onRowEditSubmit == null ? void 0 : onRowEditSubmit((_getState$currentEdit = getState().currentEditingRow) != null ? _getState$currentEdit : row);
1764
-
1765
- case 2:
1766
- setCurrentEditingRow(null);
1767
-
1768
- case 3:
1769
- case "end":
1770
- return _context.stop();
1771
- }
1772
- }
1773
- }, _callee);
1774
- }));
1775
-
1776
- return function handleSave() {
1777
- return _ref2.apply(this, arguments);
1778
- };
1779
- }();
967
+ var handleSave = function handleSave() {
968
+ onRowEditSubmit == null ? void 0 : onRowEditSubmit({
969
+ row: currentEditingRow != null ? currentEditingRow : row,
970
+ tableInstance: tableInstance
971
+ });
972
+ setCurrentEditingRow(null);
973
+ };
1780
974
 
1781
975
  return React.createElement(Box, {
1782
976
  sx: {
@@ -1841,7 +1035,10 @@ var MRT_ToggleRowActionMenuButton = function MRT_ToggleRowActionMenuButton(_ref)
1841
1035
  setAnchorEl(null);
1842
1036
  };
1843
1037
 
1844
- return React.createElement(React.Fragment, null, renderRowActions ? React.createElement(React.Fragment, null, renderRowActions(row, tableInstance)) : row.id === (currentEditingRow == null ? void 0 : currentEditingRow.id) ? React.createElement(MRT_EditActionButtons, {
1038
+ return React.createElement(React.Fragment, null, renderRowActions ? React.createElement(React.Fragment, null, renderRowActions({
1039
+ row: row,
1040
+ tableInstance: tableInstance
1041
+ })) : row.id === (currentEditingRow == null ? void 0 : currentEditingRow.id) ? React.createElement(MRT_EditActionButtons, {
1845
1042
  row: row,
1846
1043
  tableInstance: tableInstance
1847
1044
  }) : !renderRowActionMenuItems && enableRowEditing ? React.createElement(Tooltip, {
@@ -1893,18 +1090,31 @@ var MRT_SelectCheckbox = function MRT_SelectCheckbox(_ref) {
1893
1090
  var _getToggleAllRowsSele;
1894
1091
 
1895
1092
  getToggleAllRowsSelectedProps == null ? void 0 : (_getToggleAllRowsSele = getToggleAllRowsSelectedProps()) == null ? void 0 : _getToggleAllRowsSele.onChange == null ? void 0 : _getToggleAllRowsSele.onChange(event);
1896
- onSelectAllChange == null ? void 0 : onSelectAllChange(event, event.target.checked ? getRowModel().flatRows : []);
1093
+ onSelectAllChange == null ? void 0 : onSelectAllChange({
1094
+ event: event,
1095
+ selectedRows: event.target.checked ? getRowModel().flatRows : [],
1096
+ tableInstance: tableInstance
1097
+ });
1897
1098
  } else if (row) {
1898
1099
  var _row$getToggleSelecte;
1899
1100
 
1900
1101
  row == null ? void 0 : (_row$getToggleSelecte = row.getToggleSelectedProps()) == null ? void 0 : _row$getToggleSelecte.onChange == null ? void 0 : _row$getToggleSelecte.onChange(event);
1901
- onSelectChange == null ? void 0 : onSelectChange(event, row, event.target.checked ? [].concat(getSelectedRowModel().flatRows, [row]) : getSelectedRowModel().flatRows.filter(function (selectedRow) {
1902
- return selectedRow.id !== row.id;
1903
- }));
1102
+ onSelectChange == null ? void 0 : onSelectChange({
1103
+ event: event,
1104
+ row: row,
1105
+ selectedRows: event.target.checked ? [].concat(getSelectedRowModel().flatRows, [row]) : getSelectedRowModel().flatRows.filter(function (selectedRow) {
1106
+ return selectedRow.id !== row.id;
1107
+ }),
1108
+ tableInstance: tableInstance
1109
+ });
1904
1110
  }
1905
1111
  };
1906
1112
 
1907
- var mTableBodyRowSelectCheckboxProps = muiSelectCheckboxProps instanceof Function ? muiSelectCheckboxProps(selectAll, row, tableInstance) : muiSelectCheckboxProps;
1113
+ var mTableBodyRowSelectCheckboxProps = muiSelectCheckboxProps instanceof Function ? muiSelectCheckboxProps({
1114
+ isSelectAll: !!selectAll,
1115
+ row: row,
1116
+ tableInstance: tableInstance
1117
+ }) : muiSelectCheckboxProps;
1908
1118
  var rtSelectCheckboxProps = selectAll ? getToggleAllRowsSelectedProps() : row == null ? void 0 : row.getToggleSelectedProps();
1909
1119
 
1910
1120
  var checkboxProps = _extends({}, rtSelectCheckboxProps, mTableBodyRowSelectCheckboxProps);
@@ -1959,7 +1169,10 @@ var MRT_SearchTextField = function MRT_SearchTextField(_ref) {
1959
1169
  var _event$target$value;
1960
1170
 
1961
1171
  setGlobalFilter((_event$target$value = event.target.value) != null ? _event$target$value : undefined);
1962
- onGlobalFilterChange == null ? void 0 : onGlobalFilterChange(event);
1172
+ onGlobalFilterChange == null ? void 0 : onGlobalFilterChange({
1173
+ event: event,
1174
+ tableInstance: tableInstance
1175
+ });
1963
1176
  }, 200), []);
1964
1177
 
1965
1178
  var handleGlobalFilterMenuOpen = function handleGlobalFilterMenuOpen(event) {
@@ -1971,6 +1184,9 @@ var MRT_SearchTextField = function MRT_SearchTextField(_ref) {
1971
1184
  setGlobalFilter(undefined);
1972
1185
  };
1973
1186
 
1187
+ var textFieldProps = muiSearchTextFieldProps instanceof Function ? muiSearchTextFieldProps({
1188
+ tableInstance: tableInstance
1189
+ }) : muiSearchTextFieldProps;
1974
1190
  return React.createElement(Collapse, {
1975
1191
  "in": showSearch,
1976
1192
  orientation: "horizontal"
@@ -2012,10 +1228,10 @@ var MRT_SearchTextField = function MRT_SearchTextField(_ref) {
2012
1228
  fontSize: "small"
2013
1229
  })))
2014
1230
  }
2015
- }, muiSearchTextFieldProps, {
1231
+ }, textFieldProps, {
2016
1232
  sx: _extends({
2017
1233
  justifySelf: 'end'
2018
- }, muiSearchTextFieldProps == null ? void 0 : muiSearchTextFieldProps.sx)
1234
+ }, textFieldProps == null ? void 0 : textFieldProps.sx)
2019
1235
  })), React.createElement(MRT_FilterTypeMenu, {
2020
1236
  anchorEl: anchorEl,
2021
1237
  setAnchorEl: setAnchorEl,
@@ -2156,12 +1372,16 @@ var MRT_ToggleSearchButton = function MRT_ToggleSearchButton(_ref) {
2156
1372
  var _getState = getState(),
2157
1373
  showSearch = _getState.showSearch;
2158
1374
 
1375
+ var textFieldProps = muiSearchTextFieldProps instanceof Function ? muiSearchTextFieldProps({
1376
+ tableInstance: tableInstance
1377
+ }) : muiSearchTextFieldProps;
1378
+
2159
1379
  var handleToggleSearch = function handleToggleSearch() {
2160
1380
  setShowSearch(!showSearch);
2161
1381
  setTimeout(function () {
2162
- var _document$getElementB, _muiSearchTextFieldPr;
1382
+ var _document$getElementB, _textFieldProps$id;
2163
1383
 
2164
- return (_document$getElementB = document.getElementById((_muiSearchTextFieldPr = muiSearchTextFieldProps == null ? void 0 : muiSearchTextFieldProps.id) != null ? _muiSearchTextFieldPr : "mrt-" + idPrefix + "-search-text-field")) == null ? void 0 : _document$getElementB.focus();
1384
+ return (_document$getElementB = document.getElementById((_textFieldProps$id = textFieldProps == null ? void 0 : textFieldProps.id) != null ? _textFieldProps$id : "mrt-" + idPrefix + "-search-text-field")) == null ? void 0 : _document$getElementB.focus();
2165
1385
  }, 200);
2166
1386
  };
2167
1387
 
@@ -2185,12 +1405,13 @@ var MRT_ToolbarInternalButtons = function MRT_ToolbarInternalButtons(_ref) {
2185
1405
  renderToolbarInternalActions = _tableInstance$option.renderToolbarInternalActions;
2186
1406
 
2187
1407
  if (renderToolbarInternalActions) {
2188
- return React.createElement(React.Fragment, null, renderToolbarInternalActions(tableInstance, {
2189
- MRT_ToggleSearchButton: MRT_ToggleSearchButton,
2190
- MRT_ToggleFiltersButton: MRT_ToggleFiltersButton,
1408
+ return React.createElement(React.Fragment, null, renderToolbarInternalActions({
1409
+ MRT_FullScreenToggleButton: MRT_FullScreenToggleButton,
2191
1410
  MRT_ShowHideColumnsButton: MRT_ShowHideColumnsButton,
2192
1411
  MRT_ToggleDensePaddingButton: MRT_ToggleDensePaddingButton,
2193
- MRT_FullScreenToggleButton: MRT_FullScreenToggleButton
1412
+ MRT_ToggleFiltersButton: MRT_ToggleFiltersButton,
1413
+ MRT_ToggleSearchButton: MRT_ToggleSearchButton,
1414
+ tableInstance: tableInstance
2194
1415
  }));
2195
1416
  }
2196
1417
 
@@ -2229,7 +1450,9 @@ var MRT_TablePagination = function MRT_TablePagination(_ref) {
2229
1450
  _getState$pagination$2 = _getState$pagination.pageIndex,
2230
1451
  pageIndex = _getState$pagination$2 === void 0 ? 0 : _getState$pagination$2;
2231
1452
 
2232
- var tablePaginationProps = muiTablePaginationProps instanceof Function ? muiTablePaginationProps(tableInstance) : muiTablePaginationProps;
1453
+ var tablePaginationProps = muiTablePaginationProps instanceof Function ? muiTablePaginationProps({
1454
+ tableInstance: tableInstance
1455
+ }) : muiTablePaginationProps;
2233
1456
 
2234
1457
  var handleChangeRowsPerPage = function handleChangeRowsPerPage(event) {
2235
1458
  setPageSize(+event.target.value);
@@ -2237,6 +1460,11 @@ var MRT_TablePagination = function MRT_TablePagination(_ref) {
2237
1460
 
2238
1461
  var showFirstLastPageButtons = getPrePaginationRowModel().rows.length / pageSize > 2;
2239
1462
  return React.createElement(TablePagination, Object.assign({
1463
+ SelectProps: {
1464
+ sx: {
1465
+ m: '0 1rem 0 1ch'
1466
+ }
1467
+ },
2240
1468
  component: "div",
2241
1469
  count: getPrePaginationRowModel().rows.length,
2242
1470
  onPageChange: function onPageChange(_, newPage) {
@@ -2245,11 +1473,7 @@ var MRT_TablePagination = function MRT_TablePagination(_ref) {
2245
1473
  onRowsPerPageChange: handleChangeRowsPerPage,
2246
1474
  page: pageIndex,
2247
1475
  rowsPerPage: pageSize,
2248
- SelectProps: {
2249
- sx: {
2250
- m: '0 1rem 0 1ch'
2251
- }
2252
- },
1476
+ rowsPerPageOptions: [5, 10, 20, 25, 50, 100],
2253
1477
  showFirstButton: showFirstLastPageButtons,
2254
1478
  showLastButton: showFirstLastPageButtons
2255
1479
  }, tablePaginationProps, {
@@ -2280,7 +1504,9 @@ var MRT_ToolbarAlertBanner = function MRT_ToolbarAlertBanner(_ref) {
2280
1504
  grouping = _getState.grouping;
2281
1505
 
2282
1506
  var isMobile = useMediaQuery('(max-width:720px)');
2283
- var alertProps = muiTableToolbarAlertBannerProps instanceof Function ? muiTableToolbarAlertBannerProps(tableInstance) : muiTableToolbarAlertBannerProps;
1507
+ var alertProps = muiTableToolbarAlertBannerProps instanceof Function ? muiTableToolbarAlertBannerProps({
1508
+ tableInstance: tableInstance
1509
+ }) : muiTableToolbarAlertBannerProps;
2284
1510
  var selectMessage = getSelectedRowModel().rows.length > 0 ? (_localization$selecte = localization.selectedCountOfRowCountRowsSelected) == null ? void 0 : (_localization$selecte2 = _localization$selecte.replace('{selectedCount}', getSelectedRowModel().rows.length.toString())) == null ? void 0 : _localization$selecte2.replace('{rowCount}', getPrePaginationRowModel().rows.length.toString()) : null;
2285
1511
  var groupedByMessage = grouping.length > 0 ? React.createElement("span", null, localization.groupedBy, ' ', grouping.map(function (columnId, index) {
2286
1512
  var _tableInstance$getAll;
@@ -2320,7 +1546,7 @@ var MRT_ToolbarAlertBanner = function MRT_ToolbarAlertBanner(_ref) {
2320
1546
  sx: {
2321
1547
  p: '0.5rem 1rem'
2322
1548
  }
2323
- }, selectMessage, groupedByMessage)));
1549
+ }, selectMessage, React.createElement("br", null), groupedByMessage)));
2324
1550
  };
2325
1551
 
2326
1552
  var MRT_LinearProgressBar = function MRT_LinearProgressBar(_ref) {
@@ -2329,7 +1555,9 @@ var MRT_LinearProgressBar = function MRT_LinearProgressBar(_ref) {
2329
1555
  muiLinearProgressProps = _tableInstance$option.muiLinearProgressProps,
2330
1556
  isReloading = _tableInstance$option.isReloading,
2331
1557
  isLoading = _tableInstance$option.isLoading;
2332
- var linearProgressProps = muiLinearProgressProps instanceof Function ? muiLinearProgressProps(tableInstance) : muiLinearProgressProps;
1558
+ var linearProgressProps = muiLinearProgressProps instanceof Function ? muiLinearProgressProps({
1559
+ tableInstance: tableInstance
1560
+ }) : muiLinearProgressProps;
2333
1561
  return React.createElement(Collapse, {
2334
1562
  "in": isReloading || isLoading,
2335
1563
  unmountOnExit: true
@@ -2369,7 +1597,9 @@ var MRT_ToolbarTop = function MRT_ToolbarTop(_ref2) {
2369
1597
  var _getState = getState(),
2370
1598
  isFullScreen = _getState.isFullScreen;
2371
1599
 
2372
- var toolbarProps = muiTableToolbarTopProps instanceof Function ? muiTableToolbarTopProps(tableInstance) : muiTableToolbarTopProps;
1600
+ var toolbarProps = muiTableToolbarTopProps instanceof Function ? muiTableToolbarTopProps({
1601
+ tableInstance: tableInstance
1602
+ }) : muiTableToolbarTopProps;
2373
1603
  return React.createElement(Toolbar, Object.assign({
2374
1604
  id: "mrt-" + idPrefix + "-toolbar-top",
2375
1605
  variant: "dense"
@@ -2390,7 +1620,9 @@ var MRT_ToolbarTop = function MRT_ToolbarTop(_ref2) {
2390
1620
  display: 'flex',
2391
1621
  justifyContent: 'space-between'
2392
1622
  }
2393
- }, (_renderToolbarCustomA = renderToolbarCustomActions == null ? void 0 : renderToolbarCustomActions(tableInstance)) != null ? _renderToolbarCustomA : React.createElement("span", null), React.createElement(Box, {
1623
+ }, (_renderToolbarCustomA = renderToolbarCustomActions == null ? void 0 : renderToolbarCustomActions({
1624
+ tableInstance: tableInstance
1625
+ })) != null ? _renderToolbarCustomA : React.createElement("span", null), React.createElement(Box, {
2394
1626
  sx: {
2395
1627
  display: 'flex',
2396
1628
  gap: '0.5rem',
@@ -2423,7 +1655,9 @@ var MRT_ToolbarBottom = function MRT_ToolbarBottom(_ref) {
2423
1655
  var _getState = getState(),
2424
1656
  isFullScreen = _getState.isFullScreen;
2425
1657
 
2426
- var toolbarProps = muiTableToolbarBottomProps instanceof Function ? muiTableToolbarBottomProps(tableInstance) : muiTableToolbarBottomProps;
1658
+ var toolbarProps = muiTableToolbarBottomProps instanceof Function ? muiTableToolbarBottomProps({
1659
+ tableInstance: tableInstance
1660
+ }) : muiTableToolbarBottomProps;
2427
1661
  return React.createElement(Toolbar, Object.assign({
2428
1662
  id: "mrt-" + idPrefix + "-toolbar-bottom",
2429
1663
  variant: "dense"
@@ -2477,8 +1711,14 @@ var MRT_FilterTextField = function MRT_FilterTextField(_ref) {
2477
1711
  anchorEl = _useState[0],
2478
1712
  setAnchorEl = _useState[1];
2479
1713
 
2480
- var mTableHeadCellFilterTextFieldProps = muiTableHeadCellFilterTextFieldProps instanceof Function ? muiTableHeadCellFilterTextFieldProps(column) : muiTableHeadCellFilterTextFieldProps;
2481
- var mcTableHeadCellFilterTextFieldProps = column.muiTableHeadCellFilterTextFieldProps instanceof Function ? column.muiTableHeadCellFilterTextFieldProps(column) : column.muiTableHeadCellFilterTextFieldProps;
1714
+ var mTableHeadCellFilterTextFieldProps = muiTableHeadCellFilterTextFieldProps instanceof Function ? muiTableHeadCellFilterTextFieldProps({
1715
+ column: column,
1716
+ tableInstance: tableInstance
1717
+ }) : muiTableHeadCellFilterTextFieldProps;
1718
+ var mcTableHeadCellFilterTextFieldProps = column.muiTableHeadCellFilterTextFieldProps instanceof Function ? column.muiTableHeadCellFilterTextFieldProps({
1719
+ column: column,
1720
+ tableInstance: tableInstance
1721
+ }) : column.muiTableHeadCellFilterTextFieldProps;
2482
1722
 
2483
1723
  var textFieldProps = _extends({}, mTableHeadCellFilterTextFieldProps, mcTableHeadCellFilterTextFieldProps);
2484
1724
 
@@ -2655,8 +1895,14 @@ var MRT_ToggleColumnActionMenuButton = function MRT_ToggleColumnActionMenuButton
2655
1895
  setAnchorEl(event.currentTarget);
2656
1896
  };
2657
1897
 
2658
- var mTableHeadCellColumnActionsButtonProps = muiTableHeadCellColumnActionsButtonProps instanceof Function ? muiTableHeadCellColumnActionsButtonProps(column) : muiTableHeadCellColumnActionsButtonProps;
2659
- var mcTableHeadCellColumnActionsButtonProps = column.muiTableHeadCellColumnActionsButtonProps instanceof Function ? column.muiTableHeadCellColumnActionsButtonProps(column) : column.muiTableHeadCellColumnActionsButtonProps;
1898
+ var mTableHeadCellColumnActionsButtonProps = muiTableHeadCellColumnActionsButtonProps instanceof Function ? muiTableHeadCellColumnActionsButtonProps({
1899
+ column: column,
1900
+ tableInstance: tableInstance
1901
+ }) : muiTableHeadCellColumnActionsButtonProps;
1902
+ var mcTableHeadCellColumnActionsButtonProps = column.muiTableHeadCellColumnActionsButtonProps instanceof Function ? column.muiTableHeadCellColumnActionsButtonProps({
1903
+ column: column,
1904
+ tableInstance: tableInstance
1905
+ }) : column.muiTableHeadCellColumnActionsButtonProps;
2660
1906
 
2661
1907
  var iconButtonProps = _extends({}, mTableHeadCellColumnActionsButtonProps, mcTableHeadCellColumnActionsButtonProps);
2662
1908
 
@@ -2691,7 +1937,7 @@ var MRT_ToggleColumnActionMenuButton = function MRT_ToggleColumnActionMenuButton
2691
1937
  };
2692
1938
 
2693
1939
  var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
2694
- var _column$Header;
1940
+ var _getState2, _getState2$currentFil, _column$Header;
2695
1941
 
2696
1942
  var header = _ref.header,
2697
1943
  tableInstance = _ref.tableInstance;
@@ -2712,34 +1958,21 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
2712
1958
  showFilters = _getState.showFilters;
2713
1959
 
2714
1960
  var column = header.column;
2715
- var mTableHeadCellProps = muiTableHeadCellProps instanceof Function ? muiTableHeadCellProps(column) : muiTableHeadCellProps;
2716
- var mcTableHeadCellProps = column.muiTableHeadCellProps instanceof Function ? column.muiTableHeadCellProps(column) : column.muiTableHeadCellProps;
1961
+ var mTableHeadCellProps = muiTableHeadCellProps instanceof Function ? muiTableHeadCellProps({
1962
+ column: column,
1963
+ tableInstance: tableInstance
1964
+ }) : muiTableHeadCellProps;
1965
+ var mcTableHeadCellProps = column.muiTableHeadCellProps instanceof Function ? column.muiTableHeadCellProps({
1966
+ column: column,
1967
+ tableInstance: tableInstance
1968
+ }) : column.muiTableHeadCellProps;
2717
1969
 
2718
1970
  var tableCellProps = _extends({}, header.getHeaderProps(), mTableHeadCellProps, mcTableHeadCellProps);
2719
1971
 
2720
- var sortTooltip = !!column.getIsSorted() ? column.getIsSorted() === 'desc' ? localization.clearSort : localization.sortByColumnDesc.replace('{column}', column.header) : localization.sortByColumnAsc.replace('{column}', column.header); // const filterType = getState()?.currentFilterTypes?.[id];
2721
-
2722
- var filterTooltip = ''; // !!getColumnFilterValue()
2723
- // ? localization.filteringByColumn
2724
- // .replace('{column}', String(headerString))
2725
- // .replace(
2726
- // '{filterType}',
2727
- // filterType instanceof Function
2728
- // ? ''
2729
- // : // @ts-ignore
2730
- // localization[
2731
- // `filter${
2732
- // filterType.charAt(0).toUpperCase() + filterType.slice(1)
2733
- // }`
2734
- // ],
2735
- // )
2736
- // .replace(
2737
- // '{filterValue}',
2738
- // getColumnFilterValue() as string,
2739
- // )
2740
- // .replace('" "', '')
2741
- // : localization.showHideFilters;
2742
-
1972
+ var sortTooltip = !!column.getIsSorted() ? column.getIsSorted() === 'desc' ? localization.clearSort : localization.sortByColumnDesc.replace('{column}', column.header) : localization.sortByColumnAsc.replace('{column}', column.header);
1973
+ var filterType = (_getState2 = getState()) == null ? void 0 : (_getState2$currentFil = _getState2.currentFilterTypes) == null ? void 0 : _getState2$currentFil[header.id];
1974
+ var filterTooltip = !!column.getColumnFilterValue() ? localization.filteringByColumn.replace('{column}', String(column.header)).replace('{filterType}', filterType instanceof Function ? '' : // @ts-ignore
1975
+ localization["filter" + (filterType.charAt(0).toUpperCase() + filterType.slice(1))]).replace('{filterValue}', column.getColumnFilterValue()).replace('" "', '') : localization.showHideFilters;
2743
1976
  var headerElement = (_column$Header = column == null ? void 0 : column.Header == null ? void 0 : column.Header({
2744
1977
  header: header,
2745
1978
  tableInstance: tableInstance
@@ -2860,7 +2093,10 @@ var MRT_TableHeadRow = function MRT_TableHeadRow(_ref) {
2860
2093
  var headerGroup = _ref.headerGroup,
2861
2094
  tableInstance = _ref.tableInstance;
2862
2095
  var muiTableHeadRowProps = tableInstance.options.muiTableHeadRowProps;
2863
- var mTableHeadRowProps = muiTableHeadRowProps instanceof Function ? muiTableHeadRowProps(headerGroup) : muiTableHeadRowProps;
2096
+ var mTableHeadRowProps = muiTableHeadRowProps instanceof Function ? muiTableHeadRowProps({
2097
+ headerGroup: headerGroup,
2098
+ tableInstance: tableInstance
2099
+ }) : muiTableHeadRowProps;
2864
2100
 
2865
2101
  var tableRowProps = _extends({}, headerGroup == null ? void 0 : headerGroup.getHeaderGroupProps(), mTableHeadRowProps);
2866
2102
 
@@ -2881,7 +2117,9 @@ var MRT_TableHead = function MRT_TableHead(_ref) {
2881
2117
  getLeftHeaderGroups = tableInstance.getLeftHeaderGroups,
2882
2118
  getRightHeaderGroups = tableInstance.getRightHeaderGroups,
2883
2119
  muiTableHeadProps = tableInstance.options.muiTableHeadProps;
2884
- var tableHeadProps = muiTableHeadProps instanceof Function ? muiTableHeadProps(tableInstance) : muiTableHeadProps;
2120
+ var tableHeadProps = muiTableHeadProps instanceof Function ? muiTableHeadProps({
2121
+ tableInstance: tableInstance
2122
+ }) : muiTableHeadProps;
2885
2123
  var getHeaderGroupsMap = {
2886
2124
  center: getCenterHeaderGroups,
2887
2125
  left: getLeftHeaderGroups,
@@ -2901,7 +2139,9 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
2901
2139
  var cell = _ref.cell,
2902
2140
  tableInstance = _ref.tableInstance;
2903
2141
  var getState = tableInstance.getState,
2904
- muiTableBodyCellEditTextFieldProps = tableInstance.options.muiTableBodyCellEditTextFieldProps;
2142
+ _tableInstance$option = tableInstance.options,
2143
+ enableRowEditing = _tableInstance$option.enableRowEditing,
2144
+ muiTableBodyCellEditTextFieldProps = _tableInstance$option.muiTableBodyCellEditTextFieldProps;
2905
2145
  var column = cell.column,
2906
2146
  row = cell.row;
2907
2147
 
@@ -2912,16 +2152,30 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
2912
2152
  // });
2913
2153
  }
2914
2154
 
2915
- column.onCellEditChange == null ? void 0 : column.onCellEditChange(event, cell);
2155
+ column.onCellEditChange == null ? void 0 : column.onCellEditChange({
2156
+ event: event,
2157
+ cell: cell,
2158
+ tableInstance: tableInstance
2159
+ });
2916
2160
  };
2917
2161
 
2918
- var mTableBodyCellEditTextFieldProps = muiTableBodyCellEditTextFieldProps instanceof Function ? muiTableBodyCellEditTextFieldProps(cell) : muiTableBodyCellEditTextFieldProps;
2919
- var mcTableBodyCellEditTextFieldProps = column.muiTableBodyCellEditTextFieldProps instanceof Function ? column.muiTableBodyCellEditTextFieldProps(cell) : column.muiTableBodyCellEditTextFieldProps;
2162
+ var mTableBodyCellEditTextFieldProps = muiTableBodyCellEditTextFieldProps instanceof Function ? muiTableBodyCellEditTextFieldProps({
2163
+ cell: cell,
2164
+ tableInstance: tableInstance
2165
+ }) : muiTableBodyCellEditTextFieldProps;
2166
+ var mcTableBodyCellEditTextFieldProps = column.muiTableBodyCellEditTextFieldProps instanceof Function ? column.muiTableBodyCellEditTextFieldProps({
2167
+ cell: cell,
2168
+ tableInstance: tableInstance
2169
+ }) : column.muiTableBodyCellEditTextFieldProps;
2920
2170
 
2921
- var textFieldProps = _extends({}, mTableBodyCellEditTextFieldProps, mcTableBodyCellEditTextFieldProps); // if (enableEditing && Edit) {
2922
- // return <>{Edit({ ...textFieldProps, cell })}</>;
2923
- // }
2171
+ var textFieldProps = _extends({}, mTableBodyCellEditTextFieldProps, mcTableBodyCellEditTextFieldProps);
2924
2172
 
2173
+ if (enableRowEditing && column.enableEditing !== false && column.Edit) {
2174
+ return React.createElement(React.Fragment, null, column.Edit == null ? void 0 : column.Edit({
2175
+ cell: cell,
2176
+ tableInstance: tableInstance
2177
+ }));
2178
+ }
2925
2179
 
2926
2180
  return React.createElement(TextField, Object.assign({
2927
2181
  margin: "dense",
@@ -2955,8 +2209,14 @@ var MRT_CopyButton = function MRT_CopyButton(_ref) {
2955
2209
  }, 4000);
2956
2210
  };
2957
2211
 
2958
- var mTableBodyCellCopyButtonProps = muiTableBodyCellCopyButtonProps instanceof Function ? muiTableBodyCellCopyButtonProps(cell) : muiTableBodyCellCopyButtonProps;
2959
- var mcTableBodyCellCopyButtonProps = cell.column.muiTableBodyCellCopyButtonProps instanceof Function ? cell.column.muiTableBodyCellCopyButtonProps(cell) : cell.column.muiTableBodyCellCopyButtonProps;
2212
+ var mTableBodyCellCopyButtonProps = muiTableBodyCellCopyButtonProps instanceof Function ? muiTableBodyCellCopyButtonProps({
2213
+ cell: cell,
2214
+ tableInstance: tableInstance
2215
+ }) : muiTableBodyCellCopyButtonProps;
2216
+ var mcTableBodyCellCopyButtonProps = cell.column.muiTableBodyCellCopyButtonProps instanceof Function ? cell.column.muiTableBodyCellCopyButtonProps({
2217
+ cell: cell,
2218
+ tableInstance: tableInstance
2219
+ }) : cell.column.muiTableBodyCellCopyButtonProps;
2960
2220
 
2961
2221
  var buttonProps = _extends({}, mTableBodyCellCopyButtonProps, mcTableBodyCellCopyButtonProps);
2962
2222
 
@@ -3010,8 +2270,14 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
3010
2270
 
3011
2271
  var column = cell.column,
3012
2272
  row = cell.row;
3013
- var mTableCellBodyProps = muiTableBodyCellProps instanceof Function ? muiTableBodyCellProps(cell) : muiTableBodyCellProps;
3014
- var mcTableCellBodyProps = column.muiTableBodyCellProps instanceof Function ? column.muiTableBodyCellProps(cell) : column.muiTableBodyCellProps;
2273
+ var mTableCellBodyProps = muiTableBodyCellProps instanceof Function ? muiTableBodyCellProps({
2274
+ cell: cell,
2275
+ tableInstance: tableInstance
2276
+ }) : muiTableBodyCellProps;
2277
+ var mcTableCellBodyProps = column.muiTableBodyCellProps instanceof Function ? column.muiTableBodyCellProps({
2278
+ cell: cell,
2279
+ tableInstance: tableInstance
2280
+ }) : column.muiTableBodyCellProps;
3015
2281
 
3016
2282
  var tableCellProps = _extends({}, cell.getCellProps(), mTableCellBodyProps, mcTableCellBodyProps);
3017
2283
 
@@ -3020,7 +2286,11 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
3020
2286
  }, [column.columnDefType, column.getWidth()]);
3021
2287
  return React.createElement(TableCell, Object.assign({
3022
2288
  onClick: function onClick(event) {
3023
- return onCellClick == null ? void 0 : onCellClick(event, cell);
2289
+ return onCellClick == null ? void 0 : onCellClick({
2290
+ event: event,
2291
+ cell: cell,
2292
+ tableInstance: tableInstance
2293
+ });
3024
2294
  }
3025
2295
  }, tableCellProps, {
3026
2296
  sx: _extends({
@@ -3054,12 +2324,22 @@ var MRT_TableDetailPanel = function MRT_TableDetailPanel(_ref) {
3054
2324
  muiTableDetailPanelProps = _tableInstance$option.muiTableDetailPanelProps,
3055
2325
  onDetailPanelClick = _tableInstance$option.onDetailPanelClick,
3056
2326
  renderDetailPanel = _tableInstance$option.renderDetailPanel;
3057
- var tableRowProps = muiTableBodyRowProps instanceof Function ? muiTableBodyRowProps(row) : muiTableBodyRowProps;
3058
- var tableCellProps = muiTableDetailPanelProps instanceof Function ? muiTableDetailPanelProps(row) : muiTableDetailPanelProps;
2327
+ var tableRowProps = muiTableBodyRowProps instanceof Function ? muiTableBodyRowProps({
2328
+ row: row,
2329
+ tableInstance: tableInstance
2330
+ }) : muiTableBodyRowProps;
2331
+ var tableCellProps = muiTableDetailPanelProps instanceof Function ? muiTableDetailPanelProps({
2332
+ row: row,
2333
+ tableInstance: tableInstance
2334
+ }) : muiTableDetailPanelProps;
3059
2335
  return React.createElement(TableRow, Object.assign({}, tableRowProps), React.createElement(TableCell, Object.assign({
3060
2336
  colSpan: getVisibleFlatColumns().length + 10,
3061
2337
  onClick: function onClick(event) {
3062
- return onDetailPanelClick == null ? void 0 : onDetailPanelClick(event, row);
2338
+ return onDetailPanelClick == null ? void 0 : onDetailPanelClick({
2339
+ event: event,
2340
+ row: row,
2341
+ tableInstance: tableInstance
2342
+ });
3063
2343
  }
3064
2344
  }, tableCellProps, {
3065
2345
  sx: _extends({
@@ -3070,7 +2350,10 @@ var MRT_TableDetailPanel = function MRT_TableDetailPanel(_ref) {
3070
2350
  }, tableCellProps == null ? void 0 : tableCellProps.sx)
3071
2351
  }), React.createElement(Collapse, {
3072
2352
  "in": row.getIsExpanded()
3073
- }, renderDetailPanel == null ? void 0 : renderDetailPanel(row))));
2353
+ }, renderDetailPanel == null ? void 0 : renderDetailPanel({
2354
+ row: row,
2355
+ tableInstance: tableInstance
2356
+ }))));
3074
2357
  };
3075
2358
 
3076
2359
  var MRT_TableBodyRow = function MRT_TableBodyRow(_ref) {
@@ -3088,7 +2371,10 @@ var MRT_TableBodyRow = function MRT_TableBodyRow(_ref) {
3088
2371
  getRightVisibleCells = row.getRightVisibleCells,
3089
2372
  getRowProps = row.getRowProps,
3090
2373
  getVisibleCells = row.getVisibleCells;
3091
- var mTableBodyRowProps = muiTableBodyRowProps instanceof Function ? muiTableBodyRowProps(row) : muiTableBodyRowProps;
2374
+ var mTableBodyRowProps = muiTableBodyRowProps instanceof Function ? muiTableBodyRowProps({
2375
+ row: row,
2376
+ tableInstance: tableInstance
2377
+ }) : muiTableBodyRowProps;
3092
2378
 
3093
2379
  var tableRowProps = _extends({}, getRowProps(), mTableBodyRowProps);
3094
2380
 
@@ -3101,7 +2387,11 @@ var MRT_TableBodyRow = function MRT_TableBodyRow(_ref) {
3101
2387
  return React.createElement(React.Fragment, null, React.createElement(TableRow, Object.assign({
3102
2388
  hover: true,
3103
2389
  onClick: function onClick(event) {
3104
- return onRowClick == null ? void 0 : onRowClick(event, row);
2390
+ return onRowClick == null ? void 0 : onRowClick({
2391
+ event: event,
2392
+ row: row,
2393
+ tableInstance: tableInstance
2394
+ });
3105
2395
  },
3106
2396
  selected: getIsSelected()
3107
2397
  }, tableRowProps), getVisibleCellsMap[pinned]().map(function (cell) {
@@ -3126,7 +2416,9 @@ var MRT_TableBody = function MRT_TableBody(_ref) {
3126
2416
  enablePagination = _tableInstance$option.enablePagination,
3127
2417
  muiTableBodyProps = _tableInstance$option.muiTableBodyProps;
3128
2418
  var rows = enablePagination ? getPaginationRowModel().rows : getPrePaginationRowModel().rows;
3129
- var mTableBodyProps = muiTableBodyProps instanceof Function ? muiTableBodyProps(tableInstance) : muiTableBodyProps;
2419
+ var mTableBodyProps = muiTableBodyProps instanceof Function ? muiTableBodyProps({
2420
+ tableInstance: tableInstance
2421
+ }) : muiTableBodyProps;
3130
2422
 
3131
2423
  var tableBodyProps = _extends({}, getTableBodyProps(), mTableBodyProps);
3132
2424
 
@@ -3154,8 +2446,14 @@ var MRT_TableFooterCell = function MRT_TableFooterCell(_ref) {
3154
2446
  isDensePadding = _getState.isDensePadding;
3155
2447
 
3156
2448
  var column = footer.column;
3157
- var mTableFooterCellProps = muiTableFooterCellProps instanceof Function ? muiTableFooterCellProps(column) : muiTableFooterCellProps;
3158
- var mcTableFooterCellProps = column.muiTableFooterCellProps instanceof Function ? column.muiTableFooterCellProps(column) : column.muiTableFooterCellProps;
2449
+ var mTableFooterCellProps = muiTableFooterCellProps instanceof Function ? muiTableFooterCellProps({
2450
+ column: column,
2451
+ tableInstance: tableInstance
2452
+ }) : muiTableFooterCellProps;
2453
+ var mcTableFooterCellProps = column.muiTableFooterCellProps instanceof Function ? column.muiTableFooterCellProps({
2454
+ column: column,
2455
+ tableInstance: tableInstance
2456
+ }) : column.muiTableFooterCellProps;
3159
2457
 
3160
2458
  var tableCellProps = _extends({}, footer.getFooterProps(), mTableFooterCellProps, mcTableFooterCellProps);
3161
2459
 
@@ -3190,7 +2488,10 @@ var MRT_TableFooterRow = function MRT_TableFooterRow(_ref) {
3190
2488
  if (!((_footerGroup$headers = footerGroup.headers) != null && _footerGroup$headers.some(function (h) {
3191
2489
  return h.column.columnDef.footer || h.column.Footer;
3192
2490
  }))) return null;
3193
- var mTableFooterRowProps = muiTableFooterRowProps instanceof Function ? muiTableFooterRowProps(footerGroup) : muiTableFooterRowProps;
2491
+ var mTableFooterRowProps = muiTableFooterRowProps instanceof Function ? muiTableFooterRowProps({
2492
+ footerGroup: footerGroup,
2493
+ tableInstance: tableInstance
2494
+ }) : muiTableFooterRowProps;
3194
2495
 
3195
2496
  var tableRowProps = _extends({}, footerGroup.getFooterGroupProps(), mTableFooterRowProps);
3196
2497
 
@@ -3211,7 +2512,9 @@ var MRT_TableFooter = function MRT_TableFooter(_ref) {
3211
2512
  getLeftFooterGroups = tableInstance.getLeftFooterGroups,
3212
2513
  getRightFooterGroups = tableInstance.getRightFooterGroups,
3213
2514
  muiTableFooterProps = tableInstance.options.muiTableFooterProps;
3214
- var tableFooterProps = muiTableFooterProps instanceof Function ? muiTableFooterProps(tableInstance) : muiTableFooterProps;
2515
+ var tableFooterProps = muiTableFooterProps instanceof Function ? muiTableFooterProps({
2516
+ tableInstance: tableInstance
2517
+ }) : muiTableFooterProps;
3215
2518
  var getFooterGroupsMap = {
3216
2519
  center: getCenterFooterGroups,
3217
2520
  left: getLeftFooterGroups,
@@ -3236,7 +2539,9 @@ var MRT_Table = function MRT_Table(_ref) {
3236
2539
  hideTableFooter = _tableInstance$option.hideTableFooter,
3237
2540
  hideTableHead = _tableInstance$option.hideTableHead,
3238
2541
  muiTableProps = _tableInstance$option.muiTableProps;
3239
- var mTableProps = muiTableProps instanceof Function ? muiTableProps(tableInstance) : muiTableProps;
2542
+ var mTableProps = muiTableProps instanceof Function ? muiTableProps({
2543
+ tableInstance: tableInstance
2544
+ }) : muiTableProps;
3240
2545
 
3241
2546
  var tableProps = _extends({}, getTableProps(), mTableProps);
3242
2547
 
@@ -3287,7 +2592,9 @@ var MRT_TableContainer = function MRT_TableContainer(_ref2) {
3287
2592
  totalToolbarHeight = _useState[0],
3288
2593
  setTotalToolbarHeight = _useState[1];
3289
2594
 
3290
- var tableContainerProps = muiTableContainerProps instanceof Function ? muiTableContainerProps(tableInstance) : muiTableContainerProps;
2595
+ var tableContainerProps = muiTableContainerProps instanceof Function ? muiTableContainerProps({
2596
+ tableInstance: tableInstance
2597
+ }) : muiTableContainerProps;
3291
2598
  useLayoutEffect(function () {
3292
2599
  var _document$getElementB, _document, _document$getElementB2, _document$getElementB3, _document2, _document2$getElement;
3293
2600
 
@@ -3309,9 +2616,7 @@ var MRT_TableContainer = function MRT_TableContainer(_ref2) {
3309
2616
  display: 'grid',
3310
2617
  gridTemplateColumns: getLeftTableWidth() + "fr " + getCenterTableWidth() + "fr " + getRightTableWidth() + "fr"
3311
2618
  }
3312
- }, React.createElement(Box // @ts-ignore
3313
- , {
3314
- // @ts-ignore
2619
+ }, React.createElement(Box, {
3315
2620
  sx: function sx(theme) {
3316
2621
  var _columnPinning$left;
3317
2622
 
@@ -3324,8 +2629,7 @@ var MRT_TableContainer = function MRT_TableContainer(_ref2) {
3324
2629
  }, React.createElement(MRT_Table, {
3325
2630
  pinned: "left",
3326
2631
  tableInstance: tableInstance
3327
- })), React.createElement(Box // @ts-ignore
3328
- , {
2632
+ })), React.createElement(Box, {
3329
2633
  sx: function sx(theme) {
3330
2634
  return commonBoxStyles({
3331
2635
  theme: theme
@@ -3334,9 +2638,7 @@ var MRT_TableContainer = function MRT_TableContainer(_ref2) {
3334
2638
  }, React.createElement(MRT_Table, {
3335
2639
  pinned: "center",
3336
2640
  tableInstance: tableInstance
3337
- })), React.createElement(Box // @ts-ignore
3338
- , {
3339
- // @ts-ignore
2641
+ })), React.createElement(Box, {
3340
2642
  sx: function sx(theme) {
3341
2643
  var _columnPinning$right;
3342
2644
 
@@ -3375,23 +2677,29 @@ var MRT_TablePaper = function MRT_TablePaper(_ref) {
3375
2677
  }
3376
2678
  }
3377
2679
  }, [isFullScreen]);
3378
- var tablePaperProps = muiTablePaperProps instanceof Function ? muiTablePaperProps(tableInstance) : muiTablePaperProps;
2680
+ var tablePaperProps = muiTablePaperProps instanceof Function ? muiTablePaperProps({
2681
+ tableInstance: tableInstance
2682
+ }) : muiTablePaperProps;
3379
2683
  return React.createElement(Paper, Object.assign({
3380
2684
  elevation: 2
3381
2685
  }, tablePaperProps, {
3382
2686
  sx: _extends({
3383
- bottom: isFullScreen ? '0' : undefined,
2687
+ transition: 'all 0.2s ease-in-out'
2688
+ }, tablePaperProps == null ? void 0 : tablePaperProps.sx),
2689
+ style: {
3384
2690
  height: isFullScreen ? '100%' : undefined,
3385
2691
  left: isFullScreen ? '0' : undefined,
3386
- m: isFullScreen ? '0' : undefined,
2692
+ margin: isFullScreen ? '0' : undefined,
2693
+ maxHeight: isFullScreen ? '100%' : undefined,
2694
+ maxWidth: isFullScreen ? '100%' : undefined,
3387
2695
  overflowY: !isFullScreen ? 'hidden' : undefined,
3388
2696
  position: isFullScreen ? 'fixed' : undefined,
3389
2697
  right: isFullScreen ? '0' : undefined,
3390
2698
  top: isFullScreen ? '0' : undefined,
3391
- transition: 'all 0.2s ease-in-out',
3392
2699
  width: isFullScreen ? '100vw' : undefined,
3393
- zIndex: isFullScreen ? 1200 : 1
3394
- }, tablePaperProps == null ? void 0 : tablePaperProps.sx)
2700
+ zIndex: isFullScreen ? 1200 : 1,
2701
+ bottom: isFullScreen ? '0' : undefined
2702
+ }
3395
2703
  }), !hideToolbarTop && React.createElement(MRT_ToolbarTop, {
3396
2704
  tableInstance: tableInstance
3397
2705
  }), React.createElement(MRT_TableContainer, {