@popmenu/table 0.64.0 → 0.65.0

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.
package/build/index.es.js CHANGED
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import React__default, { createElement, forwardRef, createContext, useContext, useState, useRef, isValidElement } from 'react';
3
3
  import { Pagination } from '@material-ui/lab';
4
4
  import { useReactTable, getCoreRowModel, getSortedRowModel, getFilteredRowModel, getPaginationRowModel, flexRender } from '@tanstack/react-table';
5
- import { makeStyles, Typography as Typography$2, Link as Link$2, Paper as Paper$2, Box, Select, TextField, Popover, ButtonBase, InputAdornment, useTheme as useTheme$1 } from '@material-ui/core';
5
+ import { makeStyles, Typography as Typography$2, Link as Link$2, Paper as Paper$2, Box, FormControl, InputLabel, Select, TextField, Popover, ButtonBase, InputAdornment, useTheme as useTheme$1 } from '@material-ui/core';
6
6
  import CommonAlert from '@material-ui/lab/Alert';
7
7
  import '@material-ui/core/AppBar';
8
8
  import MuiAvatar from '@material-ui/core/Avatar';
@@ -786,7 +786,7 @@ Link$1.defaultProps = {
786
786
  };
787
787
  Link$1.displayName = 'Link';
788
788
 
789
- var useStyles$7 = makeStyles(function (_a) {
789
+ var useStyles$8 = makeStyles(function (_a) {
790
790
  var spacing = _a.spacing;
791
791
  return ({
792
792
  root: {
@@ -800,7 +800,7 @@ var useStyles$7 = makeStyles(function (_a) {
800
800
  });
801
801
  var Paper$1 = forwardRef(function (props, ref) {
802
802
  var legacyStyles = props.legacyStyles, restProps = __rest$2(props, ["legacyStyles"]);
803
- var classes = useStyles$7(props);
803
+ var classes = useStyles$8(props);
804
804
  return React__default.createElement(Paper$2, __assign$2({}, ref, { classes: __assign$2({}, (legacyStyles && classes)) }, restProps));
805
805
  });
806
806
  Paper$1.displayName = 'Paper';
@@ -1015,7 +1015,7 @@ var TableBody = function (props) {
1015
1015
  return React__default.createElement("tbody", __assign$3({}, restProps), children);
1016
1016
  };
1017
1017
 
1018
- var useStyles$6 = makeStyles(function (_a) {
1018
+ var useStyles$7 = makeStyles(function (_a) {
1019
1019
  var typography = _a.typography;
1020
1020
  return ({
1021
1021
  root: function (_a) {
@@ -1046,7 +1046,7 @@ var TableFooter = function (props) {
1046
1046
  return (React__default.createElement(Box, { display: "flex", justifyContent: "center", alignItems: "end", paddingTop: 3, paddingBottom: 4 }, props.children));
1047
1047
  };
1048
1048
 
1049
- var useStyles$4 = makeStyles(function (theme) { return ({
1049
+ var useStyles$6 = makeStyles(function (theme) { return ({
1050
1050
  buttonLabel: {
1051
1051
  fontWeight: 400,
1052
1052
  },
@@ -1200,18 +1200,20 @@ function SvgSearch(props) {
1200
1200
  })));
1201
1201
  }
1202
1202
 
1203
- var useStyles$3 = makeStyles(function (theme) { return ({
1203
+ var useStyles$4 = makeStyles(function (theme) { return ({
1204
1204
  icon: {
1205
1205
  marginRight: theme.spacing(1.5),
1206
1206
  marginTop: theme.spacing(0.5),
1207
1207
  scale: 1.5,
1208
1208
  },
1209
- placeholder: {
1210
- opacity: 0.5,
1211
- },
1212
1209
  selectContainer: {
1213
1210
  padding: '8px 0',
1214
1211
  },
1212
+ selectRoot: {
1213
+ '&:focus': {
1214
+ backgroundColor: 'transparent',
1215
+ },
1216
+ },
1215
1217
  hidden: {
1216
1218
  display: 'none',
1217
1219
  },
@@ -1220,12 +1222,14 @@ var useStyles$3 = makeStyles(function (theme) { return ({
1220
1222
  var TableContext = createContext({});
1221
1223
 
1222
1224
  var SelectFilter = function (props) {
1225
+ var _a, _b, _c;
1223
1226
  var options = props.options, columnId = props.columnId, multiple = props.multiple;
1224
- var classes = useStyles$3();
1227
+ var classes = useStyles$4();
1225
1228
  var table = useContext(TableContext);
1226
- var _a = useState(false), open = _a[0], setOpen = _a[1];
1229
+ var _d = useState(false), open = _d[0], setOpen = _d[1];
1227
1230
  var column = table.getColumn(columnId);
1228
1231
  var meta = column.columnDef.meta;
1232
+ var filterName = (_a = meta === null || meta === void 0 ? void 0 : meta.filter) === null || _a === void 0 ? void 0 : _a.name;
1229
1233
  var value = column.getFilterValue();
1230
1234
  var fallbackValue = multiple ? [] : '';
1231
1235
  var filteredOptions = options.map(function (option) {
@@ -1242,6 +1246,18 @@ var SelectFilter = function (props) {
1242
1246
  return __assign$3(__assign$3({}, option), { hide: false });
1243
1247
  });
1244
1248
  var filteredOptionsCount = filteredOptions.filter(function (option) { return !(option === null || option === void 0 ? void 0 : option.hide); }).length;
1249
+ var renderedValue = '';
1250
+ if (value && filteredOptions && filteredOptionsCount > 0) {
1251
+ if (typeof value === 'string' || typeof value === 'number') {
1252
+ renderedValue = (_c = (_b = filteredOptions.find(function (option) { return option.value === value; })) === null || _b === void 0 ? void 0 : _b.label) !== null && _c !== void 0 ? _c : filterName;
1253
+ }
1254
+ else if (Array.isArray(value) && value.length > 0) {
1255
+ renderedValue = value.length + " selected";
1256
+ }
1257
+ else {
1258
+ renderedValue = filterName;
1259
+ }
1260
+ }
1245
1261
  var handleChange = function (event) {
1246
1262
  event.stopPropagation();
1247
1263
  column.setFilterValue(event.target.value);
@@ -1254,23 +1270,25 @@ var SelectFilter = function (props) {
1254
1270
  }
1255
1271
  };
1256
1272
  return (React__default.createElement(Box, { className: classes.selectContainer },
1257
- React__default.createElement(Select, { variant: "outlined", open: open, onOpen: function () { return setOpen(true); }, onClose: function () { return setOpen(false); }, value: value || fallbackValue, displayEmpty: true, multiple: multiple, renderValue: function () { return React__default.createElement(Typography$1, { className: classes.placeholder }, meta === null || meta === void 0 ? void 0 : meta.filter.name); }, disabled: !filteredOptionsCount, IconComponent: SvgChevronDown, onChange: handleChange, fullWidth: true, classes: {
1258
- root: classes.selectInput,
1259
- icon: classes.icon,
1260
- }, MenuProps: {
1261
- disablePortal: true,
1262
- anchorOrigin: {
1263
- vertical: 'bottom',
1264
- horizontal: 'left',
1265
- },
1266
- transformOrigin: {
1267
- vertical: 'top',
1268
- horizontal: 'left',
1269
- },
1270
- getContentAnchorEl: null,
1271
- } }, filteredOptions.map(function (option, index) {
1272
- return (React__default.createElement(MenuItem, { classes: { root: option.hide ? classes.hidden : undefined }, key: "option-" + value + "-" + index, value: option.value, onClick: handleItemClick }, option.label));
1273
- }))));
1273
+ React__default.createElement(FormControl, { variant: "outlined", fullWidth: true },
1274
+ React__default.createElement(InputLabel, { id: "select-filter-label-" + filterName }, filterName || 'filter'),
1275
+ React__default.createElement(Select, { variant: "outlined", open: open, onOpen: function () { return setOpen(true); }, onClose: function () { return setOpen(false); }, value: value || fallbackValue, displayEmpty: true, multiple: multiple, renderValue: function () { return React__default.createElement(Typography$1, null, renderedValue); }, label: filterName || 'filter', labelId: "select-filter-label-" + filterName, disabled: !filteredOptionsCount, IconComponent: SvgChevronDown, onChange: handleChange, fullWidth: true, classes: {
1276
+ root: classes.selectRoot,
1277
+ icon: classes.icon,
1278
+ }, MenuProps: {
1279
+ disablePortal: true,
1280
+ anchorOrigin: {
1281
+ vertical: 'bottom',
1282
+ horizontal: 'left',
1283
+ },
1284
+ transformOrigin: {
1285
+ vertical: 'top',
1286
+ horizontal: 'left',
1287
+ },
1288
+ getContentAnchorEl: null,
1289
+ } }, filteredOptions.map(function (option, index) {
1290
+ return (React__default.createElement(MenuItem, { classes: { root: option.hide ? classes.hidden : undefined }, key: "option-" + value + "-" + index, value: option.value, onClick: handleItemClick }, option.label));
1291
+ })))));
1274
1292
  };
1275
1293
 
1276
1294
  var FilterControl = function (props) {
@@ -1359,7 +1377,7 @@ function makeFormatSelectedFilterText(table) {
1359
1377
 
1360
1378
  var Panel = function (props) {
1361
1379
  var anchorEl = props.anchorEl, onClose = props.onClose;
1362
- var classes = useStyles$4();
1380
+ var classes = useStyles$6();
1363
1381
  var table = useContext(TableContext);
1364
1382
  var paperRef = useRef(null);
1365
1383
  var columnFilters = useColumnFilters(table).columnFilters;
@@ -3156,7 +3174,7 @@ createTheme(adminLightOptions);
3156
3174
  var adminDarkOptions = __assign$1(__assign$1(__assign$1(__assign$1({ themeName: 'Admin Dark', palette: __assign$1(__assign$1(__assign$1({}, basePalette), adminDarkPalette), dataVizPalette), breakpoints: adminThemeBreakpoints, typography: adminThemeTypography, overrides: overrides }, adminDarkPlaceholder), adminThemeZIndex), adminThemeStatus), adminThemeDefaultProps);
3157
3175
  createTheme(adminDarkOptions);
3158
3176
 
3159
- var useStyles$2 = makeStyles({
3177
+ var useStyles$3 = makeStyles({
3160
3178
  root: {
3161
3179
  justifySelf: 'end',
3162
3180
  },
@@ -3164,7 +3182,7 @@ var useStyles$2 = makeStyles({
3164
3182
 
3165
3183
  var Trigger = function (props) {
3166
3184
  var _a = props.label, label = _a === void 0 ? 'Filter' : _a, onClick = props.onClick;
3167
- var classes = useStyles$2();
3185
+ var classes = useStyles$3();
3168
3186
  return (React__default.createElement(Button, { className: classes.root, onClick: onClick, startIcon: React__default.createElement(Icon$1, { icon: SvgFilter }), textTransform: "none", variant: "ghost" }, label));
3169
3187
  };
3170
3188
 
@@ -3181,16 +3199,18 @@ var FilterPanel = function () {
3181
3199
  React__default.createElement(Panel, { onClose: handleClose, anchorEl: anchorEl })));
3182
3200
  };
3183
3201
 
3184
- var useStyles$1 = makeStyles({
3202
+ var useStyles$2 = makeStyles({
3185
3203
  root: {
3186
3204
  justifySelf: 'start',
3187
- width: 300,
3205
+ maxWidth: 300,
3206
+ minWidth: 200,
3207
+ width: '100%',
3188
3208
  },
3189
3209
  });
3190
3210
 
3191
3211
  var GlobalFilter = function (props) {
3192
3212
  var value = props.value, setValue = props.setValue, restProps = __rest$3(props, ["value", "setValue"]);
3193
- var classes = useStyles$1();
3213
+ var classes = useStyles$2();
3194
3214
  var handleChange = function (e) {
3195
3215
  setValue(e.target.value);
3196
3216
  };
@@ -3225,7 +3245,7 @@ var TableHeaderRow = function (props) {
3225
3245
  // }
3226
3246
  // return width
3227
3247
  // }
3228
- var useStyles = makeStyles(function (theme) { return ({
3248
+ var useStyles$1 = makeStyles(function (theme) { return ({
3229
3249
  root: {
3230
3250
  borderBottomStyle: 'solid',
3231
3251
  borderBottomWidth: 2,
@@ -3242,31 +3262,706 @@ var useStyles = makeStyles(function (theme) { return ({
3242
3262
  },
3243
3263
  }); });
3244
3264
 
3265
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
3266
+
3267
+ /**
3268
+ * A specialized version of `_.reduce` for arrays without support for
3269
+ * iteratee shorthands.
3270
+ *
3271
+ * @private
3272
+ * @param {Array} [array] The array to iterate over.
3273
+ * @param {Function} iteratee The function invoked per iteration.
3274
+ * @param {*} [accumulator] The initial value.
3275
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
3276
+ * the initial value.
3277
+ * @returns {*} Returns the accumulated value.
3278
+ */
3279
+
3280
+ function arrayReduce$1(array, iteratee, accumulator, initAccum) {
3281
+ var index = -1,
3282
+ length = array == null ? 0 : array.length;
3283
+
3284
+ if (initAccum && length) {
3285
+ accumulator = array[++index];
3286
+ }
3287
+ while (++index < length) {
3288
+ accumulator = iteratee(accumulator, array[index], index, array);
3289
+ }
3290
+ return accumulator;
3291
+ }
3292
+
3293
+ var _arrayReduce = arrayReduce$1;
3294
+
3295
+ /**
3296
+ * The base implementation of `_.propertyOf` without support for deep paths.
3297
+ *
3298
+ * @private
3299
+ * @param {Object} object The object to query.
3300
+ * @returns {Function} Returns the new accessor function.
3301
+ */
3302
+
3303
+ function basePropertyOf$1(object) {
3304
+ return function(key) {
3305
+ return object == null ? undefined : object[key];
3306
+ };
3307
+ }
3308
+
3309
+ var _basePropertyOf = basePropertyOf$1;
3310
+
3311
+ var basePropertyOf = _basePropertyOf;
3312
+
3313
+ /** Used to map Latin Unicode letters to basic Latin letters. */
3314
+ var deburredLetters = {
3315
+ // Latin-1 Supplement block.
3316
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
3317
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
3318
+ '\xc7': 'C', '\xe7': 'c',
3319
+ '\xd0': 'D', '\xf0': 'd',
3320
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
3321
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
3322
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
3323
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
3324
+ '\xd1': 'N', '\xf1': 'n',
3325
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
3326
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
3327
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
3328
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
3329
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
3330
+ '\xc6': 'Ae', '\xe6': 'ae',
3331
+ '\xde': 'Th', '\xfe': 'th',
3332
+ '\xdf': 'ss',
3333
+ // Latin Extended-A block.
3334
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
3335
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
3336
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
3337
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
3338
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
3339
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
3340
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
3341
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
3342
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
3343
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
3344
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
3345
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
3346
+ '\u0134': 'J', '\u0135': 'j',
3347
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
3348
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
3349
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
3350
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
3351
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
3352
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
3353
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
3354
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
3355
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
3356
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
3357
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
3358
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
3359
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
3360
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
3361
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
3362
+ '\u0174': 'W', '\u0175': 'w',
3363
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
3364
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
3365
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
3366
+ '\u0132': 'IJ', '\u0133': 'ij',
3367
+ '\u0152': 'Oe', '\u0153': 'oe',
3368
+ '\u0149': "'n", '\u017f': 's'
3369
+ };
3370
+
3371
+ /**
3372
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
3373
+ * letters to basic Latin letters.
3374
+ *
3375
+ * @private
3376
+ * @param {string} letter The matched letter to deburr.
3377
+ * @returns {string} Returns the deburred letter.
3378
+ */
3379
+ var deburrLetter$1 = basePropertyOf(deburredLetters);
3380
+
3381
+ var _deburrLetter = deburrLetter$1;
3382
+
3383
+ /** Detect free variable `global` from Node.js. */
3384
+
3385
+ var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
3386
+
3387
+ var _freeGlobal = freeGlobal$1;
3388
+
3389
+ var freeGlobal = _freeGlobal;
3390
+
3391
+ /** Detect free variable `self`. */
3392
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
3393
+
3394
+ /** Used as a reference to the global object. */
3395
+ var root$1 = freeGlobal || freeSelf || Function('return this')();
3396
+
3397
+ var _root = root$1;
3398
+
3399
+ var root = _root;
3400
+
3401
+ /** Built-in value references. */
3402
+ var Symbol$3 = root.Symbol;
3403
+
3404
+ var _Symbol = Symbol$3;
3405
+
3406
+ /**
3407
+ * A specialized version of `_.map` for arrays without support for iteratee
3408
+ * shorthands.
3409
+ *
3410
+ * @private
3411
+ * @param {Array} [array] The array to iterate over.
3412
+ * @param {Function} iteratee The function invoked per iteration.
3413
+ * @returns {Array} Returns the new mapped array.
3414
+ */
3415
+
3416
+ function arrayMap$1(array, iteratee) {
3417
+ var index = -1,
3418
+ length = array == null ? 0 : array.length,
3419
+ result = Array(length);
3420
+
3421
+ while (++index < length) {
3422
+ result[index] = iteratee(array[index], index, array);
3423
+ }
3424
+ return result;
3425
+ }
3426
+
3427
+ var _arrayMap = arrayMap$1;
3428
+
3429
+ /**
3430
+ * Checks if `value` is classified as an `Array` object.
3431
+ *
3432
+ * @static
3433
+ * @memberOf _
3434
+ * @since 0.1.0
3435
+ * @category Lang
3436
+ * @param {*} value The value to check.
3437
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
3438
+ * @example
3439
+ *
3440
+ * _.isArray([1, 2, 3]);
3441
+ * // => true
3442
+ *
3443
+ * _.isArray(document.body.children);
3444
+ * // => false
3445
+ *
3446
+ * _.isArray('abc');
3447
+ * // => false
3448
+ *
3449
+ * _.isArray(_.noop);
3450
+ * // => false
3451
+ */
3452
+
3453
+ var isArray$1 = Array.isArray;
3454
+
3455
+ var isArray_1 = isArray$1;
3456
+
3457
+ var Symbol$2 = _Symbol;
3458
+
3459
+ /** Used for built-in method references. */
3460
+ var objectProto$1 = Object.prototype;
3461
+
3462
+ /** Used to check objects for own properties. */
3463
+ var hasOwnProperty = objectProto$1.hasOwnProperty;
3464
+
3465
+ /**
3466
+ * Used to resolve the
3467
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3468
+ * of values.
3469
+ */
3470
+ var nativeObjectToString$1 = objectProto$1.toString;
3471
+
3472
+ /** Built-in value references. */
3473
+ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
3474
+
3475
+ /**
3476
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
3477
+ *
3478
+ * @private
3479
+ * @param {*} value The value to query.
3480
+ * @returns {string} Returns the raw `toStringTag`.
3481
+ */
3482
+ function getRawTag$1(value) {
3483
+ var isOwn = hasOwnProperty.call(value, symToStringTag$1),
3484
+ tag = value[symToStringTag$1];
3485
+
3486
+ try {
3487
+ value[symToStringTag$1] = undefined;
3488
+ var unmasked = true;
3489
+ } catch (e) {}
3490
+
3491
+ var result = nativeObjectToString$1.call(value);
3492
+ if (unmasked) {
3493
+ if (isOwn) {
3494
+ value[symToStringTag$1] = tag;
3495
+ } else {
3496
+ delete value[symToStringTag$1];
3497
+ }
3498
+ }
3499
+ return result;
3500
+ }
3501
+
3502
+ var _getRawTag = getRawTag$1;
3503
+
3504
+ /** Used for built-in method references. */
3505
+
3506
+ var objectProto = Object.prototype;
3507
+
3508
+ /**
3509
+ * Used to resolve the
3510
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3511
+ * of values.
3512
+ */
3513
+ var nativeObjectToString = objectProto.toString;
3514
+
3515
+ /**
3516
+ * Converts `value` to a string using `Object.prototype.toString`.
3517
+ *
3518
+ * @private
3519
+ * @param {*} value The value to convert.
3520
+ * @returns {string} Returns the converted string.
3521
+ */
3522
+ function objectToString$1(value) {
3523
+ return nativeObjectToString.call(value);
3524
+ }
3525
+
3526
+ var _objectToString = objectToString$1;
3527
+
3528
+ var Symbol$1 = _Symbol,
3529
+ getRawTag = _getRawTag,
3530
+ objectToString = _objectToString;
3531
+
3532
+ /** `Object#toString` result references. */
3533
+ var nullTag = '[object Null]',
3534
+ undefinedTag = '[object Undefined]';
3535
+
3536
+ /** Built-in value references. */
3537
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
3538
+
3539
+ /**
3540
+ * The base implementation of `getTag` without fallbacks for buggy environments.
3541
+ *
3542
+ * @private
3543
+ * @param {*} value The value to query.
3544
+ * @returns {string} Returns the `toStringTag`.
3545
+ */
3546
+ function baseGetTag$1(value) {
3547
+ if (value == null) {
3548
+ return value === undefined ? undefinedTag : nullTag;
3549
+ }
3550
+ return (symToStringTag && symToStringTag in Object(value))
3551
+ ? getRawTag(value)
3552
+ : objectToString(value);
3553
+ }
3554
+
3555
+ var _baseGetTag = baseGetTag$1;
3556
+
3557
+ /**
3558
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
3559
+ * and has a `typeof` result of "object".
3560
+ *
3561
+ * @static
3562
+ * @memberOf _
3563
+ * @since 4.0.0
3564
+ * @category Lang
3565
+ * @param {*} value The value to check.
3566
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
3567
+ * @example
3568
+ *
3569
+ * _.isObjectLike({});
3570
+ * // => true
3571
+ *
3572
+ * _.isObjectLike([1, 2, 3]);
3573
+ * // => true
3574
+ *
3575
+ * _.isObjectLike(_.noop);
3576
+ * // => false
3577
+ *
3578
+ * _.isObjectLike(null);
3579
+ * // => false
3580
+ */
3581
+
3582
+ function isObjectLike$1(value) {
3583
+ return value != null && typeof value == 'object';
3584
+ }
3585
+
3586
+ var isObjectLike_1 = isObjectLike$1;
3587
+
3588
+ var baseGetTag = _baseGetTag,
3589
+ isObjectLike = isObjectLike_1;
3590
+
3591
+ /** `Object#toString` result references. */
3592
+ var symbolTag = '[object Symbol]';
3593
+
3594
+ /**
3595
+ * Checks if `value` is classified as a `Symbol` primitive or object.
3596
+ *
3597
+ * @static
3598
+ * @memberOf _
3599
+ * @since 4.0.0
3600
+ * @category Lang
3601
+ * @param {*} value The value to check.
3602
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
3603
+ * @example
3604
+ *
3605
+ * _.isSymbol(Symbol.iterator);
3606
+ * // => true
3607
+ *
3608
+ * _.isSymbol('abc');
3609
+ * // => false
3610
+ */
3611
+ function isSymbol$1(value) {
3612
+ return typeof value == 'symbol' ||
3613
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
3614
+ }
3615
+
3616
+ var isSymbol_1 = isSymbol$1;
3617
+
3618
+ var Symbol = _Symbol,
3619
+ arrayMap = _arrayMap,
3620
+ isArray = isArray_1,
3621
+ isSymbol = isSymbol_1;
3622
+
3623
+ /** Used as references for various `Number` constants. */
3624
+ var INFINITY = 1 / 0;
3625
+
3626
+ /** Used to convert symbols to primitives and strings. */
3627
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
3628
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
3629
+
3630
+ /**
3631
+ * The base implementation of `_.toString` which doesn't convert nullish
3632
+ * values to empty strings.
3633
+ *
3634
+ * @private
3635
+ * @param {*} value The value to process.
3636
+ * @returns {string} Returns the string.
3637
+ */
3638
+ function baseToString$1(value) {
3639
+ // Exit early for strings to avoid a performance hit in some environments.
3640
+ if (typeof value == 'string') {
3641
+ return value;
3642
+ }
3643
+ if (isArray(value)) {
3644
+ // Recursively convert values (susceptible to call stack limits).
3645
+ return arrayMap(value, baseToString$1) + '';
3646
+ }
3647
+ if (isSymbol(value)) {
3648
+ return symbolToString ? symbolToString.call(value) : '';
3649
+ }
3650
+ var result = (value + '');
3651
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
3652
+ }
3653
+
3654
+ var _baseToString = baseToString$1;
3655
+
3656
+ var baseToString = _baseToString;
3657
+
3658
+ /**
3659
+ * Converts `value` to a string. An empty string is returned for `null`
3660
+ * and `undefined` values. The sign of `-0` is preserved.
3661
+ *
3662
+ * @static
3663
+ * @memberOf _
3664
+ * @since 4.0.0
3665
+ * @category Lang
3666
+ * @param {*} value The value to convert.
3667
+ * @returns {string} Returns the converted string.
3668
+ * @example
3669
+ *
3670
+ * _.toString(null);
3671
+ * // => ''
3672
+ *
3673
+ * _.toString(-0);
3674
+ * // => '-0'
3675
+ *
3676
+ * _.toString([1, 2, 3]);
3677
+ * // => '1,2,3'
3678
+ */
3679
+ function toString$2(value) {
3680
+ return value == null ? '' : baseToString(value);
3681
+ }
3682
+
3683
+ var toString_1 = toString$2;
3684
+
3685
+ var deburrLetter = _deburrLetter,
3686
+ toString$1 = toString_1;
3687
+
3688
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
3689
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
3690
+
3691
+ /** Used to compose unicode character classes. */
3692
+ var rsComboMarksRange$1 = '\\u0300-\\u036f',
3693
+ reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
3694
+ rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
3695
+ rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
3696
+
3697
+ /** Used to compose unicode capture groups. */
3698
+ var rsCombo$1 = '[' + rsComboRange$1 + ']';
3699
+
3700
+ /**
3701
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
3702
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
3703
+ */
3704
+ var reComboMark = RegExp(rsCombo$1, 'g');
3705
+
3706
+ /**
3707
+ * Deburrs `string` by converting
3708
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
3709
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
3710
+ * letters to basic Latin letters and removing
3711
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
3712
+ *
3713
+ * @static
3714
+ * @memberOf _
3715
+ * @since 3.0.0
3716
+ * @category String
3717
+ * @param {string} [string=''] The string to deburr.
3718
+ * @returns {string} Returns the deburred string.
3719
+ * @example
3720
+ *
3721
+ * _.deburr('déjà vu');
3722
+ * // => 'deja vu'
3723
+ */
3724
+ function deburr$1(string) {
3725
+ string = toString$1(string);
3726
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
3727
+ }
3728
+
3729
+ var deburr_1 = deburr$1;
3730
+
3731
+ /** Used to match words composed of alphanumeric characters. */
3732
+
3733
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
3734
+
3735
+ /**
3736
+ * Splits an ASCII `string` into an array of its words.
3737
+ *
3738
+ * @private
3739
+ * @param {string} The string to inspect.
3740
+ * @returns {Array} Returns the words of `string`.
3741
+ */
3742
+ function asciiWords$1(string) {
3743
+ return string.match(reAsciiWord) || [];
3744
+ }
3745
+
3746
+ var _asciiWords = asciiWords$1;
3747
+
3748
+ /** Used to detect strings that need a more robust regexp to match words. */
3749
+
3750
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
3751
+
3752
+ /**
3753
+ * Checks if `string` contains a word composed of Unicode symbols.
3754
+ *
3755
+ * @private
3756
+ * @param {string} string The string to inspect.
3757
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
3758
+ */
3759
+ function hasUnicodeWord$1(string) {
3760
+ return reHasUnicodeWord.test(string);
3761
+ }
3762
+
3763
+ var _hasUnicodeWord = hasUnicodeWord$1;
3764
+
3765
+ /** Used to compose unicode character classes. */
3766
+
3767
+ var rsAstralRange = '\\ud800-\\udfff',
3768
+ rsComboMarksRange = '\\u0300-\\u036f',
3769
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
3770
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
3771
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
3772
+ rsDingbatRange = '\\u2700-\\u27bf',
3773
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
3774
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
3775
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
3776
+ rsPunctuationRange = '\\u2000-\\u206f',
3777
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
3778
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
3779
+ rsVarRange = '\\ufe0e\\ufe0f',
3780
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
3781
+
3782
+ /** Used to compose unicode capture groups. */
3783
+ var rsApos$1 = "['\u2019]",
3784
+ rsBreak = '[' + rsBreakRange + ']',
3785
+ rsCombo = '[' + rsComboRange + ']',
3786
+ rsDigits = '\\d+',
3787
+ rsDingbat = '[' + rsDingbatRange + ']',
3788
+ rsLower = '[' + rsLowerRange + ']',
3789
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
3790
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
3791
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
3792
+ rsNonAstral = '[^' + rsAstralRange + ']',
3793
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
3794
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
3795
+ rsUpper = '[' + rsUpperRange + ']',
3796
+ rsZWJ = '\\u200d';
3797
+
3798
+ /** Used to compose unicode regexes. */
3799
+ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
3800
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
3801
+ rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
3802
+ rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
3803
+ reOptMod = rsModifier + '?',
3804
+ rsOptVar = '[' + rsVarRange + ']?',
3805
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
3806
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
3807
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
3808
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
3809
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
3810
+
3811
+ /** Used to match complex or compound words. */
3812
+ var reUnicodeWord = RegExp([
3813
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
3814
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
3815
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
3816
+ rsUpper + '+' + rsOptContrUpper,
3817
+ rsOrdUpper,
3818
+ rsOrdLower,
3819
+ rsDigits,
3820
+ rsEmoji
3821
+ ].join('|'), 'g');
3822
+
3823
+ /**
3824
+ * Splits a Unicode `string` into an array of its words.
3825
+ *
3826
+ * @private
3827
+ * @param {string} The string to inspect.
3828
+ * @returns {Array} Returns the words of `string`.
3829
+ */
3830
+ function unicodeWords$1(string) {
3831
+ return string.match(reUnicodeWord) || [];
3832
+ }
3833
+
3834
+ var _unicodeWords = unicodeWords$1;
3835
+
3836
+ var asciiWords = _asciiWords,
3837
+ hasUnicodeWord = _hasUnicodeWord,
3838
+ toString = toString_1,
3839
+ unicodeWords = _unicodeWords;
3840
+
3841
+ /**
3842
+ * Splits `string` into an array of its words.
3843
+ *
3844
+ * @static
3845
+ * @memberOf _
3846
+ * @since 3.0.0
3847
+ * @category String
3848
+ * @param {string} [string=''] The string to inspect.
3849
+ * @param {RegExp|string} [pattern] The pattern to match words.
3850
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
3851
+ * @returns {Array} Returns the words of `string`.
3852
+ * @example
3853
+ *
3854
+ * _.words('fred, barney, & pebbles');
3855
+ * // => ['fred', 'barney', 'pebbles']
3856
+ *
3857
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
3858
+ * // => ['fred', 'barney', '&', 'pebbles']
3859
+ */
3860
+ function words$1(string, pattern, guard) {
3861
+ string = toString(string);
3862
+ pattern = guard ? undefined : pattern;
3863
+
3864
+ if (pattern === undefined) {
3865
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
3866
+ }
3867
+ return string.match(pattern) || [];
3868
+ }
3869
+
3870
+ var words_1 = words$1;
3871
+
3872
+ var arrayReduce = _arrayReduce,
3873
+ deburr = deburr_1,
3874
+ words = words_1;
3875
+
3876
+ /** Used to compose unicode capture groups. */
3877
+ var rsApos = "['\u2019]";
3878
+
3879
+ /** Used to match apostrophes. */
3880
+ var reApos = RegExp(rsApos, 'g');
3881
+
3882
+ /**
3883
+ * Creates a function like `_.camelCase`.
3884
+ *
3885
+ * @private
3886
+ * @param {Function} callback The function to combine each word.
3887
+ * @returns {Function} Returns the new compounder function.
3888
+ */
3889
+ function createCompounder$1(callback) {
3890
+ return function(string) {
3891
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
3892
+ };
3893
+ }
3894
+
3895
+ var _createCompounder = createCompounder$1;
3896
+
3897
+ var createCompounder = _createCompounder;
3898
+
3899
+ /**
3900
+ * Converts `string` to
3901
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
3902
+ *
3903
+ * @static
3904
+ * @memberOf _
3905
+ * @since 3.0.0
3906
+ * @category String
3907
+ * @param {string} [string=''] The string to convert.
3908
+ * @returns {string} Returns the kebab cased string.
3909
+ * @example
3910
+ *
3911
+ * _.kebabCase('Foo Bar');
3912
+ * // => 'foo-bar'
3913
+ *
3914
+ * _.kebabCase('fooBar');
3915
+ * // => 'foo-bar'
3916
+ *
3917
+ * _.kebabCase('__FOO_BAR__');
3918
+ * // => 'foo-bar'
3919
+ */
3920
+ var kebabCase = createCompounder(function(result, word, index) {
3921
+ return result + (index ? '-' : '') + word.toLowerCase();
3922
+ });
3923
+
3924
+ var kebabCase_1 = kebabCase;
3925
+
3245
3926
  var TableHeaderCell = function (props) {
3927
+ var _a;
3246
3928
  var children = props.children, context = props.context, restProps = __rest$3(props, ["children", "context"]);
3247
3929
  var sortable = context.header.column.getCanSort();
3248
3930
  var sorted = context.header.column.getIsSorted();
3249
3931
  var handleSort = context.header.column.getToggleSortingHandler();
3250
- var classes = useStyles(__assign$3(__assign$3({}, props), { sortable: sortable }));
3251
- var _a = useTheme$1(), spacing = _a.spacing, palette = _a.palette;
3932
+ var classes = useStyles$1(__assign$3(__assign$3({}, props), { sortable: sortable }));
3933
+ var _b = useTheme$1(), spacing = _b.spacing, palette = _b.palette;
3252
3934
  var sortIndicators = {
3253
3935
  asc: SvgChevronUp,
3254
3936
  desc: SvgChevronDown,
3255
3937
  };
3938
+ var idBase = (_a = context.table.options.meta) === null || _a === void 0 ? void 0 : _a.idBase;
3939
+ var dataTourIdProps = idBase && sortable ? { 'data-tour-id': kebabCase_1("sort " + idBase + " on " + context.header.column.id) } : {};
3256
3940
  return (React__default.createElement("th", __assign$3({ className: classes.root }, restProps),
3257
- React__default.createElement(Box, { className: classes.box, display: "flex", alignItems: "center", gridGap: spacing(1), onClick: handleSort },
3941
+ React__default.createElement(Box, __assign$3({ className: classes.box, display: "flex", alignItems: "center", gridGap: spacing(1), onClick: handleSort }, dataTourIdProps),
3258
3942
  children,
3259
3943
  sortable && !sorted && React__default.createElement(Icon$1, { icon: SvgSort, color: palette.grey[500] }),
3260
3944
  sortable && sorted && React__default.createElement(Icon$1, { icon: sortIndicators[sorted] }))));
3261
3945
  };
3262
3946
 
3947
+ var useStyles = makeStyles({
3948
+ chip: {
3949
+ overflow: 'visible',
3950
+ height: 'auto',
3951
+ },
3952
+ label: {
3953
+ whiteSpace: 'normal',
3954
+ },
3955
+ });
3956
+
3263
3957
  var ColumnFilterChip = function (props) {
3264
3958
  var columnFilter = props.columnFilter, onClick = props.onClick, label = props.label;
3265
- return (React__default.createElement(Chip, { onDelete: function () { return onClick(columnFilter); }, label: React__default.createElement(Box, { display: "flex", gridGap: 4 },
3959
+ var classes = useStyles();
3960
+ return (React__default.createElement(Chip, { className: classes.chip, onDelete: function () { return onClick(columnFilter); }, label: React__default.createElement(Box, { display: "flex", gridGap: 4, flexWrap: "wrap" },
3266
3961
  React__default.createElement(Typography$1, null,
3267
3962
  label[0],
3268
3963
  ":"),
3269
- React__default.createElement(Typography$1, __assign$3({ weight: "semi-bold" }, { component: 'span' }), label[1])) }));
3964
+ React__default.createElement(Typography$1, __assign$3({ className: classes.label, weight: "semi-bold" }, { component: 'span' }), label[1])) }));
3270
3965
  };
3271
3966
 
3272
3967
  var ColumnFilterResetButton = function (props) {
@@ -3275,13 +3970,14 @@ var ColumnFilterResetButton = function (props) {
3275
3970
  };
3276
3971
 
3277
3972
  var defaultTableProps = {
3973
+ enableSortingRemoval: true,
3278
3974
  fullWidth: true,
3279
3975
  sortable: false,
3280
3976
  searchable: false,
3281
3977
  };
3282
3978
  var Table = function (props) {
3283
- var data = props.data, columns = props.columns, loading = props.loading, searchable = props.searchable, sortable = props.sortable, externalFilterState = props.filterState, externalGlobalFilterState = props.globalFilterState, externalPaginationState = props.paginationState, externalSortingState = props.sortingState, externalVisibilityState = props.visibilityState, pageCount = props.pageCount, GlobalFilterProps = props.GlobalFilterProps, Empty = props.Empty;
3284
- var classes = useStyles$6(props);
3979
+ var data = props.data, columns = props.columns, enableSortingRemoval = props.enableSortingRemoval, loading = props.loading, searchable = props.searchable, sortable = props.sortable, externalFilterState = props.filterState, externalGlobalFilterState = props.globalFilterState, externalPaginationState = props.paginationState, externalSortingState = props.sortingState, externalVisibilityState = props.visibilityState, pageCount = props.pageCount, GlobalFilterProps = props.GlobalFilterProps, Empty = props.Empty, idBase = props.idBase;
3980
+ var classes = useStyles$7(props);
3285
3981
  var rootRef = useRef(null);
3286
3982
  // Prepare Empty State
3287
3983
  var isEmpty = data.length === 0;
@@ -3306,7 +4002,7 @@ var Table = function (props) {
3306
4002
  var columnVisibility = (externalVisibilityState || [])[0];
3307
4003
  var isControlledColumnVisibility = Boolean(externalVisibilityState);
3308
4004
  // Init table instance
3309
- var table = useReactTable(__assign$3(__assign$3(__assign$3(__assign$3({ data: data, columns: columns, state: __assign$3(__assign$3(__assign$3(__assign$3(__assign$3({}, (isControlledPagination && { pagination: pagination })), (isControlledGlobalFilter && { globalFilter: globalFilter })), (isControlledColumnFilters && { columnFilters: columnFilters })), (isControlledColumnVisibility && { columnVisibility: columnVisibility })), (isControlledColumnSort && { sorting: sorting })), enableSorting: sortable, globalFilterFn: coercedValueIncludesString, getCoreRowModel: getCoreRowModel(), getSortedRowModel: getSortedRowModel(), getFilteredRowModel: getFilteredRowModel(), getPaginationRowModel: getPaginationRowModel() }, (isControlledPagination && controlledPaginationOptions)), (isControlledGlobalFilter && controlledGlobalFilterOptions)), (isControlledColumnFilters && controlledColumnFiltersOptions)), (isControlledColumnSort && controlledColumnSortOptions)));
4005
+ var table = useReactTable(__assign$3(__assign$3(__assign$3(__assign$3(__assign$3({ data: data, columns: columns, state: __assign$3(__assign$3(__assign$3(__assign$3(__assign$3({}, (isControlledPagination && { pagination: pagination })), (isControlledGlobalFilter && { globalFilter: globalFilter })), (isControlledColumnFilters && { columnFilters: columnFilters })), (isControlledColumnVisibility && { columnVisibility: columnVisibility })), (isControlledColumnSort && { sorting: sorting })), enableSorting: sortable, enableSortingRemoval: enableSortingRemoval, globalFilterFn: coercedValueIncludesString, getCoreRowModel: getCoreRowModel(), getSortedRowModel: getSortedRowModel(), getFilteredRowModel: getFilteredRowModel(), getPaginationRowModel: getPaginationRowModel() }, (isControlledPagination && controlledPaginationOptions)), (isControlledGlobalFilter && controlledGlobalFilterOptions)), (isControlledColumnFilters && controlledColumnFiltersOptions)), (isControlledColumnSort && controlledColumnSortOptions)), { meta: { idBase: idBase } }));
3310
4006
  var _f = useColumnFilters(table), selectedColumnFilters = _f.selectedColumnFilters, hasColumnFilters = _f.hasColumnFilters, deselectColumnFilter = _f.deselectColumnFilter, formatSelectedFilterText = _f.formatSelectedFilterText, resetColumnFilters = _f.resetColumnFilters;
3311
4007
  var handlePagination = function (_e, pageNumber) {
3312
4008
  var pageIndex = pageNumber - 1;
@@ -3318,7 +4014,7 @@ var Table = function (props) {
3318
4014
  minHeight: getTableMinHeight(rootRef, table.getState().pagination.pageSize),
3319
4015
  })),
3320
4016
  showControls && (React__default.createElement(Box, null,
3321
- React__default.createElement(Box, { display: "grid", gridAutoFlow: "column", marginBottom: 3 },
4017
+ React__default.createElement(Box, { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(150px, 1fr))", marginBottom: 3 },
3322
4018
  (searchable || isControlledGlobalFilter) && (React__default.createElement(GlobalFilter, __assign$3({}, GlobalFilterProps, { value: table.getState().globalFilter, setValue: table.setGlobalFilter }))),
3323
4019
  hasColumnFilters && React__default.createElement(FilterPanel, null)),
3324
4020
  React__default.createElement(Box, { display: "flex", flexWrap: "wrap", gridGap: 8 },