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