@deephaven/iris-grid 1.27.3 → 1.27.5-alpha-nodehttp2-config.98bcfa9.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/dist/IrisGrid.js CHANGED
@@ -72,18 +72,6 @@ var DEFAULT_AGGREGATION_SETTINGS = Object.freeze({
72
72
  showOnTop: false
73
73
  });
74
74
  var UNFORMATTED_DATE_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS z";
75
- function isEmptyConfig(_ref) {
76
- var advancedFilters = _ref.advancedFilters,
77
- aggregationSettings = _ref.aggregationSettings,
78
- customColumns = _ref.customColumns,
79
- quickFilters = _ref.quickFilters,
80
- reverse = _ref.reverse,
81
- rollupConfig = _ref.rollupConfig,
82
- searchFilter = _ref.searchFilter,
83
- selectDistinctColumns = _ref.selectDistinctColumns,
84
- sorts = _ref.sorts;
85
- return advancedFilters.size === 0 && aggregationSettings.aggregations.length === 0 && customColumns.length === 0 && quickFilters.size === 0 && !reverse && rollupConfig == null && searchFilter == null && selectDistinctColumns.length === 0 && sorts.length === 0;
86
- }
87
75
 
88
76
  /**
89
77
  * The subset of `IrisGridProps` that overrides how the grid presents its
@@ -308,8 +296,8 @@ class IrisGrid extends Component {
308
296
  })).sort((a, b) => {
309
297
  var _a$item$order, _b$item$order;
310
298
  return ((_a$item$order = a.item.order) !== null && _a$item$order !== void 0 ? _a$item$order : Infinity) - ((_b$item$order = b.item.order) !== null && _b$item$order !== void 0 ? _b$item$order : Infinity) || a.index - b.index;
311
- }).map(_ref2 => {
312
- var item = _ref2.item;
299
+ }).map(_ref => {
300
+ var item = _ref.item;
313
301
  return item;
314
302
  });
315
303
  return Object.freeze(sortedItems);
@@ -332,10 +320,10 @@ class IrisGrid extends Component {
332
320
  }));
333
321
  _defineProperty(this, "getAggregationMap", memoize((columns, aggregations) => {
334
322
  var aggregationMap = {};
335
- aggregations.forEach(_ref3 => {
336
- var operation = _ref3.operation,
337
- selected = _ref3.selected,
338
- invert = _ref3.invert;
323
+ aggregations.forEach(_ref2 => {
324
+ var operation = _ref2.operation,
325
+ selected = _ref2.selected,
326
+ invert = _ref2.invert;
339
327
  aggregationMap[operation] = AggregationUtils.getOperationColumnNames(columns, operation, selected, invert);
340
328
  });
341
329
  return aggregationMap;
@@ -470,10 +458,11 @@ class IrisGrid extends Component {
470
458
  leading: false,
471
459
  trailing: true
472
460
  }));
473
- // Apply live changes
461
+ // Apply live changes; clear any previous preview error on each new update
474
462
  _defineProperty(this, "handleConditionalFormatEditorUpdate", debounce(conditionalFormatPreview => {
475
463
  this.setState({
476
- conditionalFormatPreview
464
+ conditionalFormatPreview,
465
+ conditionalFormatError: null
477
466
  });
478
467
  }, SET_CONDITIONAL_FORMAT_DEBOUNCE));
479
468
  _defineProperty(this, "handleDownloadProgressUpdate", throttle((tableDownloadProgress, tableDownloadEstimatedTime) => {
@@ -799,6 +788,7 @@ class IrisGrid extends Component {
799
788
  conditionalFormats,
800
789
  conditionalFormatEditIndex: null,
801
790
  conditionalFormatPreview: undefined,
791
+ conditionalFormatError: null,
802
792
  // Column user is hovering over for selection
803
793
  hoverSelectColumn: null,
804
794
  isTableDownloading: false,
@@ -859,7 +849,10 @@ class IrisGrid extends Component {
859
849
  settings = _this$props.settings,
860
850
  model = _this$props.model,
861
851
  customFilters = _this$props.customFilters,
852
+ quickFilters = _this$props.quickFilters,
862
853
  sorts = _this$props.sorts,
854
+ isQuickFiltersControlled = _this$props.isQuickFiltersControlled,
855
+ isSortsControlled = _this$props.isSortsControlled,
863
856
  getMetricCalculator = _this$props.getMetricCalculator;
864
857
  if (model !== prevProps.model) {
865
858
  this.stopListening(prevProps.model);
@@ -903,9 +896,12 @@ class IrisGrid extends Component {
903
896
  resetRanges: true
904
897
  });
905
898
  }
906
- if (sorts !== prevProps.sorts) {
899
+ if (sorts !== prevProps.sorts || !prevProps.isSortsControlled && isSortsControlled) {
907
900
  this.updateSorts(sorts);
908
901
  }
902
+ if (quickFilters !== prevProps.quickFilters || !prevProps.isQuickFiltersControlled && isQuickFiltersControlled) {
903
+ this.updateQuickFilters(quickFilters);
904
+ }
909
905
  var loadingScrimStartTime = this.loadingScrimStartTime,
910
906
  loadingScrimFinishTime = this.loadingScrimFinishTime;
911
907
  if (loadingScrimStartTime != null && loadingScrimFinishTime != null) {
@@ -1041,7 +1037,7 @@ class IrisGrid extends Component {
1041
1037
  return rowIndex != null ? modelRows.get(rowIndex) : null;
1042
1038
  }
1043
1039
  getTheme() {
1044
- var _ref4;
1040
+ var _ref3;
1045
1041
  var _this$props3 = this.props,
1046
1042
  model = _this$props3.model,
1047
1043
  theme = _this$props3.theme,
@@ -1049,7 +1045,7 @@ class IrisGrid extends Component {
1049
1045
  var _this$context = this.context,
1050
1046
  contextTheme = _this$context.theme,
1051
1047
  contextDensity = _this$context.density;
1052
- return this.getCachedTheme(contextTheme, theme, (_ref4 = isEditableGridModel(model) && model.isEditable) !== null && _ref4 !== void 0 ? _ref4 : false, model.floatingTopRowCount + model.floatingBottomRowCount, density !== null && density !== void 0 ? density : contextDensity);
1048
+ return this.getCachedTheme(contextTheme, theme, (_ref3 = isEditableGridModel(model) && model.isEditable) !== null && _ref3 !== void 0 ? _ref3 : false, model.floatingTopRowCount + model.floatingBottomRowCount, density !== null && density !== void 0 ? density : contextDensity);
1053
1049
  }
1054
1050
  getVisibleColumn(modelIndex) {
1055
1051
  var movedColumns = this.state.movedColumns;
@@ -1079,30 +1075,33 @@ class IrisGrid extends Component {
1079
1075
  quickFilters = _this$state2.quickFilters;
1080
1076
  var newAdvancedFilters = replaceExisting ? new Map() : new Map(advancedFilters);
1081
1077
  var newQuickFilters = replaceExisting ? new Map() : new Map(quickFilters);
1082
- var isChanged = replaceExisting && advancedFilters.size > 0;
1083
- inputFilters.forEach(_ref5 => {
1084
- var name = _ref5.name,
1085
- type = _ref5.type,
1086
- value = _ref5.value;
1087
- var modelIndex = model.columns.findIndex(_ref6 => {
1088
- var columnName = _ref6.name,
1089
- columnType = _ref6.type;
1078
+ var didAdvancedFiltersChange = replaceExisting && advancedFilters.size > 0;
1079
+ var didQuickFiltersChange = replaceExisting && quickFilters.size > 0;
1080
+ inputFilters.forEach(_ref4 => {
1081
+ var name = _ref4.name,
1082
+ type = _ref4.type,
1083
+ value = _ref4.value;
1084
+ var modelIndex = model.columns.findIndex(_ref5 => {
1085
+ var columnName = _ref5.name,
1086
+ columnType = _ref5.type;
1090
1087
  return columnName === name && columnType === type;
1091
1088
  });
1092
1089
  if (modelIndex >= 0) {
1093
- isChanged = newAdvancedFilters.delete(modelIndex) || isChanged;
1094
- isChanged = this.applyQuickFilter(modelIndex, value, newQuickFilters) || isChanged;
1090
+ didAdvancedFiltersChange = newAdvancedFilters.delete(modelIndex) || didAdvancedFiltersChange;
1091
+ didQuickFiltersChange = this.applyQuickFilter(modelIndex, value, newQuickFilters) || didQuickFiltersChange;
1095
1092
  } else {
1096
1093
  log.error('Unable to find column for inputFilter', name, type, value);
1097
1094
  }
1098
1095
  });
1099
- if (isChanged) {
1096
+ if (didQuickFiltersChange) {
1097
+ this.requestQuickFiltersChange(newQuickFilters);
1098
+ }
1099
+ if (didAdvancedFiltersChange) {
1100
1100
  this.setState({
1101
- quickFilters: newQuickFilters,
1102
1101
  advancedFilters: newAdvancedFilters
1103
1102
  });
1104
1103
  }
1105
- return isChanged;
1104
+ return didQuickFiltersChange || didAdvancedFiltersChange;
1106
1105
  }
1107
1106
 
1108
1107
  /**
@@ -1143,8 +1142,8 @@ class IrisGrid extends Component {
1143
1142
  this.startLoading('Filtering...', {
1144
1143
  resetRanges: true
1145
1144
  });
1146
- this.setState(_ref7 => {
1147
- var advancedFilters = _ref7.advancedFilters;
1145
+ this.setState(_ref6 => {
1146
+ var advancedFilters = _ref6.advancedFilters;
1148
1147
  var newAdvancedFilters = new Map(advancedFilters);
1149
1148
  if (filter == null) {
1150
1149
  newAdvancedFilters.delete(modelIndex);
@@ -1168,20 +1167,13 @@ class IrisGrid extends Component {
1168
1167
  */
1169
1168
  setQuickFilter(modelIndex, filter, text) {
1170
1169
  log.debug('Setting quick filter', modelIndex, filter, text);
1171
- this.startLoading('Filtering...', {
1172
- resetRanges: true
1173
- });
1174
- this.setState(_ref8 => {
1175
- var quickFilters = _ref8.quickFilters;
1176
- var newQuickFilters = new Map(quickFilters);
1177
- newQuickFilters.set(modelIndex, {
1178
- filter,
1179
- text
1180
- });
1181
- return {
1182
- quickFilters: newQuickFilters
1183
- };
1170
+ var quickFilters = this.state.quickFilters;
1171
+ var newQuickFilters = new Map(quickFilters);
1172
+ newQuickFilters.set(modelIndex, {
1173
+ filter,
1174
+ text
1184
1175
  });
1176
+ this.requestQuickFiltersChange(newQuickFilters);
1185
1177
  }
1186
1178
 
1187
1179
  /**
@@ -1197,9 +1189,12 @@ class IrisGrid extends Component {
1197
1189
  this.clearAllFilters();
1198
1190
  }
1199
1191
  var model = this.props.model;
1200
- filterMap.forEach((_ref9, columnName) => {
1201
- var columnType = _ref9.columnType,
1202
- filterList = _ref9.filterList;
1192
+ var quickFilters = this.state.quickFilters;
1193
+ var newQuickFilters = clearFiltersOnLinkerFilterUpdate ? new Map() : new Map(quickFilters);
1194
+ var didQuickFiltersChange = false;
1195
+ filterMap.forEach((_ref7, columnName) => {
1196
+ var columnType = _ref7.columnType,
1197
+ filterList = _ref7.filterList;
1203
1198
  var column = model.columns.find(c => c.name === columnName && c.type === columnType);
1204
1199
  if (column == null) {
1205
1200
  return;
@@ -1208,73 +1203,89 @@ class IrisGrid extends Component {
1208
1203
  assertNotNull(columnIndex);
1209
1204
  var combinedText = IrisGridUtils.combineFiltersFromList(columnType, filterList);
1210
1205
  if (combinedText.length === 0) {
1211
- this.removeQuickFilter(columnIndex);
1206
+ didQuickFiltersChange = newQuickFilters.delete(columnIndex) || didQuickFiltersChange;
1212
1207
  } else {
1213
1208
  var formatter = model.formatter;
1214
- this.setQuickFilter(columnIndex, this.makeQuickFilter(column, combinedText, formatter.timeZone), "".concat(combinedText));
1209
+ newQuickFilters.set(columnIndex, {
1210
+ filter: this.makeQuickFilter(column, combinedText, formatter.timeZone),
1211
+ text: "".concat(combinedText)
1212
+ });
1213
+ didQuickFiltersChange = true;
1215
1214
  }
1216
1215
  });
1216
+ if (didQuickFiltersChange) {
1217
+ this.requestQuickFiltersChange(newQuickFilters);
1218
+ }
1217
1219
  }
1218
1220
  removeColumnFilter(modelRange) {
1219
- this.startLoading('Filtering...', {
1220
- resetRanges: true
1221
- });
1222
1221
  var clearRange = Array.isArray(modelRange) ? modelRange : [modelRange, modelRange];
1223
- this.setState(_ref0 => {
1224
- var advancedFilters = _ref0.advancedFilters,
1225
- quickFilters = _ref0.quickFilters;
1226
- var newAdvancedFilters = advancedFilters ? new Map(advancedFilters) : new Map();
1227
- var newQuickFilters = quickFilters ? new Map(quickFilters) : new Map();
1228
- newAdvancedFilters.forEach((_, column) => {
1229
- if (column >= clearRange[0] && column <= clearRange[1]) {
1230
- newAdvancedFilters.delete(column);
1231
- }
1232
- });
1233
- newQuickFilters.forEach((_, column) => {
1234
- if (column >= clearRange[0] && column <= clearRange[1]) {
1235
- newQuickFilters.delete(column);
1236
- }
1237
- });
1238
- return {
1239
- quickFilters: newQuickFilters,
1240
- advancedFilters: newAdvancedFilters
1241
- };
1222
+ var _this$state3 = this.state,
1223
+ advancedFilters = _this$state3.advancedFilters,
1224
+ quickFilters = _this$state3.quickFilters;
1225
+ var isQuickFiltersControlled = this.props.isQuickFiltersControlled;
1226
+ var newAdvancedFilters = new Map(advancedFilters);
1227
+ var newQuickFilters = new Map(quickFilters);
1228
+ newAdvancedFilters.forEach((_, column) => {
1229
+ if (column >= clearRange[0] && column <= clearRange[1]) {
1230
+ newAdvancedFilters.delete(column);
1231
+ }
1242
1232
  });
1233
+ newQuickFilters.forEach((_, column) => {
1234
+ if (column >= clearRange[0] && column <= clearRange[1]) {
1235
+ newQuickFilters.delete(column);
1236
+ }
1237
+ });
1238
+ var didAdvancedFiltersChange = newAdvancedFilters.size !== advancedFilters.size;
1239
+ var didQuickFiltersChange = newQuickFilters.size !== quickFilters.size;
1240
+ if (didQuickFiltersChange) {
1241
+ this.requestQuickFiltersChange(newQuickFilters);
1242
+ }
1243
+ if (didAdvancedFiltersChange) {
1244
+ if (!didQuickFiltersChange || isQuickFiltersControlled) {
1245
+ this.startLoading('Filtering...', {
1246
+ resetRanges: true
1247
+ });
1248
+ }
1249
+ this.setState({
1250
+ advancedFilters: newAdvancedFilters
1251
+ });
1252
+ }
1243
1253
  }
1244
1254
  removeQuickFilter(modelColumn) {
1245
- this.startLoading('Clearing Filter...', {
1246
- resetRanges: true
1247
- });
1248
- this.setState(_ref1 => {
1249
- var quickFilters = _ref1.quickFilters;
1250
- var newQuickFilters = new Map(quickFilters);
1251
- newQuickFilters.delete(modelColumn);
1252
- return {
1253
- quickFilters: newQuickFilters
1254
- };
1255
- });
1255
+ var quickFilters = this.state.quickFilters;
1256
+ var newQuickFilters = new Map(quickFilters);
1257
+ newQuickFilters.delete(modelColumn);
1258
+ this.requestQuickFiltersChange(newQuickFilters);
1256
1259
  }
1257
1260
  clearAllFilters() {
1258
1261
  log.debug('Clearing all filters');
1259
- var _this$state3 = this.state,
1260
- advancedFilters = _this$state3.advancedFilters,
1261
- quickFilters = _this$state3.quickFilters,
1262
- searchFilter = _this$state3.searchFilter;
1262
+ var _this$state4 = this.state,
1263
+ advancedFilters = _this$state4.advancedFilters,
1264
+ quickFilters = _this$state4.quickFilters,
1265
+ searchFilter = _this$state4.searchFilter;
1266
+ var isQuickFiltersControlled = this.props.isQuickFiltersControlled;
1263
1267
  if (quickFilters.size === 0 && advancedFilters.size === 0 && searchFilter === null) {
1264
1268
  return;
1265
1269
  }
1266
-
1267
- // if there is an active quick filter input field, reset it as well
1268
- this.clearGridInputField();
1269
- this.startLoading('Clearing Filters...', {
1270
- resetRanges: true
1271
- });
1272
- this.setState({
1273
- quickFilters: new Map(),
1274
- advancedFilters: new Map(),
1275
- searchValue: '',
1276
- searchFilter: undefined
1277
- });
1270
+ if (quickFilters.size > 0) {
1271
+ this.requestQuickFiltersChange(EMPTY_MAP);
1272
+ }
1273
+ var hasOtherFilters = advancedFilters.size > 0 || searchFilter != null;
1274
+ if (hasOtherFilters) {
1275
+ if (quickFilters.size === 0 || isQuickFiltersControlled) {
1276
+ this.startLoading('Clearing Filters...', {
1277
+ resetRanges: true
1278
+ });
1279
+ }
1280
+ this.setState({
1281
+ advancedFilters: new Map(),
1282
+ searchValue: '',
1283
+ searchFilter: undefined
1284
+ });
1285
+ }
1286
+ if (!isQuickFiltersControlled) {
1287
+ this.clearGridInputField();
1288
+ }
1278
1289
  }
1279
1290
  clearAllAggregations() {
1280
1291
  log.debug('Clearing all aggregations');
@@ -1300,9 +1311,9 @@ class IrisGrid extends Component {
1300
1311
  */
1301
1312
  rebuildFilters() {
1302
1313
  var model = this.props.model;
1303
- var _this$state4 = this.state,
1304
- advancedFilters = _this$state4.advancedFilters,
1305
- quickFilters = _this$state4.quickFilters;
1314
+ var _this$state5 = this.state,
1315
+ advancedFilters = _this$state5.advancedFilters,
1316
+ quickFilters = _this$state5.quickFilters;
1306
1317
  if (advancedFilters.size === 0 && quickFilters.size === 0) {
1307
1318
  log.debug('No filters to rebuild');
1308
1319
  return;
@@ -1332,16 +1343,18 @@ class IrisGrid extends Component {
1332
1343
  this.startLoading('Rebuilding filters...', {
1333
1344
  resetRanges: true
1334
1345
  });
1346
+ if (quickFilters.size > 0) {
1347
+ this.requestQuickFiltersChange(newQuickFilters);
1348
+ }
1335
1349
  this.setState({
1336
- quickFilters: newQuickFilters,
1337
1350
  advancedFilters: newAdvancedFilters
1338
1351
  });
1339
1352
  }
1340
- setFilters(_ref10) {
1341
- var quickFilters = _ref10.quickFilters,
1342
- advancedFilters = _ref10.advancedFilters;
1353
+ setFilters(_ref8) {
1354
+ var quickFilters = _ref8.quickFilters,
1355
+ advancedFilters = _ref8.advancedFilters;
1356
+ this.requestQuickFiltersChange(quickFilters);
1343
1357
  this.setState({
1344
- quickFilters,
1345
1358
  advancedFilters
1346
1359
  });
1347
1360
  }
@@ -1519,15 +1532,15 @@ class IrisGrid extends Component {
1519
1532
  if (isPartitionedGridModel(model)) {
1520
1533
  var data = this.getRowDataMap(rowIndex);
1521
1534
  var partitionColumnSet = new Set(model.partitionColumns.map(column => column.name));
1522
- var values = Object.entries(data).filter(_ref11 => {
1523
- var _ref12 = _slicedToArray(_ref11, 2),
1524
- key = _ref12[0],
1525
- _ = _ref12[1];
1535
+ var values = Object.entries(data).filter(_ref9 => {
1536
+ var _ref0 = _slicedToArray(_ref9, 2),
1537
+ key = _ref0[0],
1538
+ _ = _ref0[1];
1526
1539
  return partitionColumnSet.has(key);
1527
- }).map(_ref13 => {
1528
- var _ref14 = _slicedToArray(_ref13, 2),
1529
- key = _ref14[0],
1530
- columnData = _ref14[1];
1540
+ }).map(_ref1 => {
1541
+ var _ref10 = _slicedToArray(_ref1, 2),
1542
+ key = _ref10[0],
1543
+ columnData = _ref10[1];
1531
1544
  return columnData.value;
1532
1545
  });
1533
1546
  var newPartition = {
@@ -1585,9 +1598,9 @@ class IrisGrid extends Component {
1585
1598
  var _this$props5 = this.props,
1586
1599
  model = _this$props5.model,
1587
1600
  canCopy = _this$props5.canCopy;
1588
- var _this$state5 = this.state,
1589
- metricCalculator = _this$state5.metricCalculator,
1590
- movedColumns = _this$state5.movedColumns;
1601
+ var _this$state6 = this.state,
1602
+ metricCalculator = _this$state6.metricCalculator,
1603
+ movedColumns = _this$state6.movedColumns;
1591
1604
  var userColumnWidths = metricCalculator.getUserColumnWidths();
1592
1605
  if (canCopy) {
1593
1606
  var copyOperation = {
@@ -1606,13 +1619,13 @@ class IrisGrid extends Component {
1606
1619
  }
1607
1620
  }
1608
1621
  startLoading(loadingText) {
1609
- var _ref15 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
1610
- _ref15$resetRanges = _ref15.resetRanges,
1611
- resetRanges = _ref15$resetRanges === void 0 ? false : _ref15$resetRanges,
1612
- _ref15$loadingCancelS = _ref15.loadingCancelShown,
1613
- loadingCancelShown = _ref15$loadingCancelS === void 0 ? true : _ref15$loadingCancelS,
1614
- _ref15$loadingBlocksG = _ref15.loadingBlocksGrid,
1615
- loadingBlocksGrid = _ref15$loadingBlocksG === void 0 ? true : _ref15$loadingBlocksG;
1622
+ var _ref11 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
1623
+ _ref11$resetRanges = _ref11.resetRanges,
1624
+ resetRanges = _ref11$resetRanges === void 0 ? false : _ref11$resetRanges,
1625
+ _ref11$loadingCancelS = _ref11.loadingCancelShown,
1626
+ loadingCancelShown = _ref11$loadingCancelS === void 0 ? true : _ref11$loadingCancelS,
1627
+ _ref11$loadingBlocksG = _ref11.loadingBlocksGrid,
1628
+ loadingBlocksGrid = _ref11$loadingBlocksG === void 0 ? true : _ref11$loadingBlocksG;
1616
1629
  this.setState({
1617
1630
  loadingText,
1618
1631
  loadingCancelShown,
@@ -1670,6 +1683,9 @@ class IrisGrid extends Component {
1670
1683
  var _this$lastLoadedConfi = this.lastLoadedConfig,
1671
1684
  advancedFilters = _this$lastLoadedConfi.advancedFilters,
1672
1685
  aggregationSettings = _this$lastLoadedConfi.aggregationSettings,
1686
+ conditionalFormats = _this$lastLoadedConfi.conditionalFormats,
1687
+ conditionalFormatEditIndex = _this$lastLoadedConfi.conditionalFormatEditIndex,
1688
+ conditionalFormatPreview = _this$lastLoadedConfi.conditionalFormatPreview,
1673
1689
  customColumns = _this$lastLoadedConfi.customColumns,
1674
1690
  quickFilters = _this$lastLoadedConfi.quickFilters,
1675
1691
  reverse = _this$lastLoadedConfi.reverse,
@@ -1681,6 +1697,9 @@ class IrisGrid extends Component {
1681
1697
  this.setState({
1682
1698
  advancedFilters,
1683
1699
  aggregationSettings,
1700
+ conditionalFormats,
1701
+ conditionalFormatEditIndex,
1702
+ conditionalFormatPreview,
1684
1703
  customColumns,
1685
1704
  quickFilters,
1686
1705
  reverse,
@@ -1694,6 +1713,9 @@ class IrisGrid extends Component {
1694
1713
  this.setState({
1695
1714
  advancedFilters: new Map(),
1696
1715
  aggregationSettings: DEFAULT_AGGREGATION_SETTINGS,
1716
+ conditionalFormats: [],
1717
+ conditionalFormatEditIndex: null,
1718
+ conditionalFormatPreview: undefined,
1697
1719
  customColumns: [],
1698
1720
  quickFilters: new Map(),
1699
1721
  reverse: false,
@@ -1709,7 +1731,7 @@ class IrisGrid extends Component {
1709
1731
  * @returns true if there's a previously known safe state or if some of the current state isn't empty.
1710
1732
  */
1711
1733
  canRollback() {
1712
- return this.lastLoadedConfig != null || !isEmptyConfig(this.state);
1734
+ return this.lastLoadedConfig != null || !IrisGridUtils.isEmptyConfig(this.state);
1713
1735
  }
1714
1736
  startListening(model) {
1715
1737
  model.addEventListener(IrisGridModel.EVENT.UPDATED, this.handleUpdate);
@@ -1748,9 +1770,9 @@ class IrisGrid extends Component {
1748
1770
  });
1749
1771
  return;
1750
1772
  }
1751
- var _this$state6 = this.state,
1752
- metricCalculator = _this$state6.metricCalculator,
1753
- metrics = _this$state6.metrics;
1773
+ var _this$state7 = this.state,
1774
+ metricCalculator = _this$state7.metricCalculator,
1775
+ metrics = _this$state7.metrics;
1754
1776
  assertNotNull(metrics);
1755
1777
  var metricState = this.getMetricState();
1756
1778
  assertNotNull(metricState);
@@ -1770,16 +1792,16 @@ class IrisGrid extends Component {
1770
1792
  }
1771
1793
  hideColumnByVisibleIndex(columnVisibleIndex) {
1772
1794
  var _this$grid5;
1773
- var _this$state7 = this.state,
1774
- metricCalculator = _this$state7.metricCalculator,
1775
- movedColumns = _this$state7.movedColumns;
1795
+ var _this$state8 = this.state,
1796
+ metricCalculator = _this$state8.metricCalculator,
1797
+ movedColumns = _this$state8.movedColumns;
1776
1798
  metricCalculator.setColumnWidth(GridUtils.getModelIndex(columnVisibleIndex, movedColumns), 0);
1777
1799
  (_this$grid5 = this.grid) === null || _this$grid5 === void 0 || _this$grid5.forceUpdate();
1778
1800
  }
1779
1801
  freezeColumnByColumnName(columnName) {
1780
- var _this$state8 = this.state,
1781
- frozenColumns = _this$state8.frozenColumns,
1782
- movedColumns = _this$state8.movedColumns;
1802
+ var _this$state9 = this.state,
1803
+ frozenColumns = _this$state9.frozenColumns,
1804
+ movedColumns = _this$state9.movedColumns;
1783
1805
  var model = this.props.model;
1784
1806
  log.debug2('freezing column', columnName);
1785
1807
  var allFrozenColumns = frozenColumns == null ? new Set(model.frozenColumns) : new Set(frozenColumns);
@@ -1794,9 +1816,9 @@ class IrisGrid extends Component {
1794
1816
  });
1795
1817
  }
1796
1818
  unFreezeColumnByColumnName(columnName) {
1797
- var _this$state9 = this.state,
1798
- frozenColumns = _this$state9.frozenColumns,
1799
- movedColumns = _this$state9.movedColumns;
1819
+ var _this$state0 = this.state,
1820
+ frozenColumns = _this$state0.frozenColumns,
1821
+ movedColumns = _this$state0.movedColumns;
1800
1822
  var model = this.props.model;
1801
1823
  log.debug2('unfreezing column', columnName);
1802
1824
  var allFrozenColumns = frozenColumns == null ? new Set(model.frozenColumns) : new Set(frozenColumns);
@@ -1846,9 +1868,9 @@ class IrisGrid extends Component {
1846
1868
  }
1847
1869
  handleColumnVisibilityChanged(modelIndexes, isVisible) {
1848
1870
  var _this$grid6;
1849
- var _this$state0 = this.state,
1850
- metricCalculator = _this$state0.metricCalculator,
1851
- metrics = _this$state0.metrics;
1871
+ var _this$state1 = this.state,
1872
+ metricCalculator = _this$state1.metricCalculator,
1873
+ metrics = _this$state1.metrics;
1852
1874
  assertNotNull(metrics);
1853
1875
  if (isVisible) {
1854
1876
  modelIndexes.forEach(modelIndex => {
@@ -1927,9 +1949,9 @@ class IrisGrid extends Component {
1927
1949
  }
1928
1950
  handleViewportUpdated() {
1929
1951
  var model = this.props.model;
1930
- var _this$state1 = this.state,
1931
- loadingText = _this$state1.loadingText,
1932
- loadingSpinnerShown = _this$state1.loadingSpinnerShown;
1952
+ var _this$state10 = this.state,
1953
+ loadingText = _this$state10.loadingText,
1954
+ loadingSpinnerShown = _this$state10.loadingSpinnerShown;
1933
1955
  var loadingMessage = 'Waiting for viewport...';
1934
1956
 
1935
1957
  // pending and no timer already exists
@@ -1974,7 +1996,7 @@ class IrisGrid extends Component {
1974
1996
  if (model.isColumnSortable(columnIndex)) {
1975
1997
  var currentSorts = this.state.sorts;
1976
1998
  var sorts = TableUtils.toggleSortForColumn(currentSorts, model.columns, modelColumn, addToExisting);
1977
- this.updateSorts(sorts);
1999
+ this.requestSortsChange(sorts);
1978
2000
  } else {
1979
2001
  log.debug('Column type was not sortable', model.columns[columnIndex]);
1980
2002
  }
@@ -1987,19 +2009,50 @@ class IrisGrid extends Component {
1987
2009
  });
1988
2010
  (_this$grid0 = this.grid) === null || _this$grid0 === void 0 || _this$grid0.forceUpdate();
1989
2011
  }
1990
- sortColumn(modelColumn) {
2012
+ requestSortsChange(sorts) {
2013
+ var _this$props6 = this.props,
2014
+ isSortsControlled = _this$props6.isSortsControlled,
2015
+ onSortsChange = _this$props6.onSortsChange;
2016
+ onSortsChange === null || onSortsChange === void 0 || onSortsChange(sorts);
2017
+ if (!isSortsControlled) {
2018
+ this.updateSorts(sorts);
2019
+ }
2020
+ }
2021
+ updateQuickFilters(quickFilters) {
1991
2022
  var _this$grid1;
2023
+ var currentQuickFilters = this.state.quickFilters;
2024
+ if (quickFilters == null) {
2025
+ if (currentQuickFilters.size === 0) {
2026
+ return;
2027
+ }
2028
+ } else if (quickFilters === currentQuickFilters) {
2029
+ return;
2030
+ }
2031
+ this.startLoading('Filtering...', {
2032
+ resetRanges: true
2033
+ });
2034
+ this.setState({
2035
+ quickFilters: quickFilters !== null && quickFilters !== void 0 ? quickFilters : EMPTY_MAP
2036
+ });
2037
+ (_this$grid1 = this.grid) === null || _this$grid1 === void 0 || _this$grid1.forceUpdate();
2038
+ }
2039
+ requestQuickFiltersChange(quickFilters) {
2040
+ var _this$props7 = this.props,
2041
+ isQuickFiltersControlled = _this$props7.isQuickFiltersControlled,
2042
+ onQuickFiltersChange = _this$props7.onQuickFiltersChange;
2043
+ onQuickFiltersChange === null || onQuickFiltersChange === void 0 || onQuickFiltersChange(quickFilters);
2044
+ if (!isQuickFiltersControlled) {
2045
+ this.updateQuickFilters(quickFilters);
2046
+ }
2047
+ }
2048
+ sortColumn(modelColumn) {
1992
2049
  var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TableUtils.sortDirection.none;
1993
2050
  var isAbs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1994
2051
  var addToExisting = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1995
2052
  assertNotNull(modelColumn);
1996
2053
  var model = this.props.model;
1997
2054
  var sorts = TableUtils.sortColumn(model.sort, model.columns, modelColumn, direction, isAbs, addToExisting);
1998
- this.startLoading('Sorting...');
1999
- this.setState({
2000
- sorts
2001
- });
2002
- (_this$grid1 = this.grid) === null || _this$grid1 === void 0 || _this$grid1.forceUpdate();
2055
+ this.requestSortsChange(sorts);
2003
2056
  }
2004
2057
  reverse(reverse) {
2005
2058
  var _this$grid10;
@@ -2046,9 +2099,9 @@ class IrisGrid extends Component {
2046
2099
  }
2047
2100
  isTableSearchAvailable() {
2048
2101
  var _model$layoutHints3, _dh$SearchDisplayMode, _dh$SearchDisplayMode2;
2049
- var _this$props6 = this.props,
2050
- model = _this$props6.model,
2051
- canToggleSearch = _this$props6.canToggleSearch;
2102
+ var _this$props8 = this.props,
2103
+ model = _this$props8.model,
2104
+ canToggleSearch = _this$props8.canToggleSearch;
2052
2105
  var dh = model.dh;
2053
2106
  var searchDisplayMode = model === null || model === void 0 || (_model$layoutHints3 = model.layoutHints) === null || _model$layoutHints3 === void 0 ? void 0 : _model$layoutHints3.searchDisplayMode;
2054
2107
  if (searchDisplayMode === ((_dh$SearchDisplayMode = dh.SearchDisplayMode) === null || _dh$SearchDisplayMode === void 0 ? void 0 : _dh$SearchDisplayMode.SEARCH_DISPLAY_HIDE)) {
@@ -2245,7 +2298,6 @@ class IrisGrid extends Component {
2245
2298
  this.setAdvancedFilter(index, filter, options);
2246
2299
  }
2247
2300
  handleAdvancedFilterSortChange(column, direction) {
2248
- var _this$grid15;
2249
2301
  var addToExisting = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
2250
2302
  var model = this.props.model;
2251
2303
  var columnIndex = model.getColumnIndexByName(column.name);
@@ -2262,19 +2314,15 @@ class IrisGrid extends Component {
2262
2314
  }
2263
2315
  var sorts = TableUtils.setSortForColumn(model.sort, columnName, newSort, addToExisting);
2264
2316
  log.info('Setting table sorts', sorts);
2265
- this.startLoading('Sorting...');
2266
- this.setState({
2267
- sorts
2268
- });
2269
- (_this$grid15 = this.grid) === null || _this$grid15 === void 0 || _this$grid15.forceUpdate();
2317
+ this.requestSortsChange(sorts);
2270
2318
  }
2271
2319
  handleAdvancedFilterDone() {
2272
- var _this$grid16;
2273
- (_this$grid16 = this.grid) === null || _this$grid16 === void 0 || _this$grid16.focus();
2320
+ var _this$grid15;
2321
+ (_this$grid15 = this.grid) === null || _this$grid15 === void 0 || _this$grid15.focus();
2274
2322
  }
2275
2323
  handleAdvancedFilterToggleMaximize(column) {
2276
- this.setState(_ref16 => {
2277
- var maximizedAdvancedFilter = _ref16.maximizedAdvancedFilter;
2324
+ this.setState(_ref12 => {
2325
+ var maximizedAdvancedFilter = _ref12.maximizedAdvancedFilter;
2278
2326
  return {
2279
2327
  maximizedAdvancedFilter: maximizedAdvancedFilter === column ? null : column
2280
2328
  };
@@ -2300,9 +2348,9 @@ class IrisGrid extends Component {
2300
2348
  }
2301
2349
  handleAdvancedMenuClosed(columnIndex) {
2302
2350
  var _this$filterInputRef;
2303
- var _this$state10 = this.state,
2304
- focusedFilterBarColumn = _this$state10.focusedFilterBarColumn,
2305
- isFilterBarShown = _this$state10.isFilterBarShown;
2351
+ var _this$state11 = this.state,
2352
+ focusedFilterBarColumn = _this$state11.focusedFilterBarColumn,
2353
+ isFilterBarShown = _this$state11.isFilterBarShown;
2306
2354
  if (isFilterBarShown && focusedFilterBarColumn === columnIndex && ((_this$filterInputRef = this.filterInputRef) === null || _this$filterInputRef === void 0 ? void 0 : _this$filterInputRef.current) !== null) {
2307
2355
  var _this$filterInputRef2;
2308
2356
  (_this$filterInputRef2 = this.filterInputRef) === null || _this$filterInputRef2 === void 0 || _this$filterInputRef2.current.focus();
@@ -2327,9 +2375,9 @@ class IrisGrid extends Component {
2327
2375
  // TODO: IDS-4242 Update Chart Preview
2328
2376
  }
2329
2377
  handleChartCreate(settings) {
2330
- var _this$props7 = this.props,
2331
- model = _this$props7.model,
2332
- onCreateChart = _this$props7.onCreateChart;
2378
+ var _this$props9 = this.props,
2379
+ model = _this$props9.model,
2380
+ onCreateChart = _this$props9.onCreateChart;
2333
2381
  onCreateChart(settings, model);
2334
2382
  }
2335
2383
  handleGridError(error) {
@@ -2342,29 +2390,23 @@ class IrisGrid extends Component {
2342
2390
  });
2343
2391
  }
2344
2392
  handleFilterBarChange(value) {
2345
- this.startLoading('Filtering...', {
2346
- resetRanges: true
2347
- });
2348
- this.setState(_ref17 => {
2349
- var focusedFilterBarColumn = _ref17.focusedFilterBarColumn,
2350
- quickFilters = _ref17.quickFilters;
2351
- var newQuickFilters = new Map(quickFilters);
2352
- if (focusedFilterBarColumn != null) {
2353
- var modelIndex = this.getModelColumn(focusedFilterBarColumn);
2354
- assertNotNull(modelIndex);
2355
- this.applyQuickFilter(modelIndex, value, newQuickFilters);
2356
- }
2357
- return {
2358
- quickFilters: newQuickFilters
2359
- };
2360
- });
2393
+ var _this$state12 = this.state,
2394
+ focusedFilterBarColumn = _this$state12.focusedFilterBarColumn,
2395
+ quickFilters = _this$state12.quickFilters;
2396
+ var newQuickFilters = new Map(quickFilters);
2397
+ if (focusedFilterBarColumn != null) {
2398
+ var modelIndex = this.getModelColumn(focusedFilterBarColumn);
2399
+ assertNotNull(modelIndex);
2400
+ this.applyQuickFilter(modelIndex, value, newQuickFilters);
2401
+ }
2402
+ this.requestQuickFiltersChange(newQuickFilters);
2361
2403
  }
2362
2404
  handleFilterBarDone() {
2363
2405
  var setGridFocus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
2364
2406
  var defocusInput = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2365
2407
  if (setGridFocus) {
2366
- var _this$grid17;
2367
- (_this$grid17 = this.grid) === null || _this$grid17 === void 0 || _this$grid17.focus();
2408
+ var _this$grid16;
2409
+ (_this$grid16 = this.grid) === null || _this$grid16 === void 0 || _this$grid16.focus();
2368
2410
  }
2369
2411
  if (defocusInput) {
2370
2412
  this.setState({
@@ -2401,9 +2443,9 @@ class IrisGrid extends Component {
2401
2443
  handleColumnAlignmentChange(modelIndex, alignment) {
2402
2444
  var model = this.props.model;
2403
2445
  var column = model.columns[modelIndex];
2404
- this.setState(_ref18 => {
2405
- var _ref18$columnAlignmen = _ref18.columnAlignmentMap,
2406
- columnAlignmentMap = _ref18$columnAlignmen === void 0 ? EMPTY_MAP : _ref18$columnAlignmen;
2446
+ this.setState(_ref13 => {
2447
+ var _ref13$columnAlignmen = _ref13.columnAlignmentMap,
2448
+ columnAlignmentMap = _ref13$columnAlignmen === void 0 ? EMPTY_MAP : _ref13$columnAlignmen;
2407
2449
  var newColumnAlignmentMap = new Map(columnAlignmentMap);
2408
2450
  if (alignment != null) {
2409
2451
  newColumnAlignmentMap.set(column.name, alignment);
@@ -2428,8 +2470,8 @@ class IrisGrid extends Component {
2428
2470
  });
2429
2471
  }
2430
2472
  handleMenuBack() {
2431
- this.setState(_ref19 => {
2432
- var openOptions = _ref19.openOptions;
2473
+ this.setState(_ref14 => {
2474
+ var openOptions = _ref14.openOptions;
2433
2475
  var newOptions = [...openOptions];
2434
2476
  newOptions.pop();
2435
2477
  return {
@@ -2438,19 +2480,21 @@ class IrisGrid extends Component {
2438
2480
  });
2439
2481
  }
2440
2482
  handleMenuSelect(option) {
2441
- this.setState(_ref20 => {
2442
- var openOptions = _ref20.openOptions;
2483
+ this.setState(_ref15 => {
2484
+ var openOptions = _ref15.openOptions;
2443
2485
  return {
2444
2486
  openOptions: [...openOptions, option]
2445
2487
  };
2446
2488
  });
2447
2489
  }
2448
2490
  handleRequestFailed(event) {
2449
- var _ref21 = event,
2450
- error = _ref21.detail;
2491
+ var _ref16 = event,
2492
+ error = _ref16.detail;
2451
2493
  log.error('request failed:', error);
2452
2494
  this.stopLoading();
2453
- var partitionConfig = this.state.partitionConfig;
2495
+ var _this$state13 = this.state,
2496
+ partitionConfig = _this$state13.partitionConfig,
2497
+ conditionalFormatEditIndex = _this$state13.conditionalFormatEditIndex;
2454
2498
  if (isMissingPartitionError(error) && partitionConfig != null) {
2455
2499
  // We'll try loading the initial partition again
2456
2500
  this.startLoading('Reloading partition...', {
@@ -2461,6 +2505,14 @@ class IrisGrid extends Component {
2461
2505
  }, () => {
2462
2506
  this.initState();
2463
2507
  });
2508
+ } else if (conditionalFormatEditIndex !== null) {
2509
+ var _errorMessage;
2510
+ // Preview format failed — surface error in the editor instead of rolling back
2511
+ var errorMessage = (_errorMessage = error === null || error === void 0 ? void 0 : error.errorMessage) !== null && _errorMessage !== void 0 ? _errorMessage : String(error);
2512
+ this.setState({
2513
+ conditionalFormatError: errorMessage,
2514
+ conditionalFormatPreview: undefined
2515
+ });
2464
2516
  } else if (this.canRollback()) {
2465
2517
  this.startLoading('Rolling back changes...', {
2466
2518
  resetRanges: true
@@ -2481,11 +2533,11 @@ class IrisGrid extends Component {
2481
2533
  * pending operations into a single scrim).
2482
2534
  */
2483
2535
  handlePending(event) {
2484
- var _ref22 = event,
2485
- detail = _ref22.detail;
2486
- var _ref23 = detail !== null && detail !== void 0 ? detail : {},
2487
- text = _ref23.text,
2488
- options = _ref23.options;
2536
+ var _ref17 = event,
2537
+ detail = _ref17.detail;
2538
+ var _ref18 = detail !== null && detail !== void 0 ? detail : {},
2539
+ text = _ref18.text,
2540
+ options = _ref18.options;
2489
2541
  if (this.loadingScrimStartTime == null) {
2490
2542
  this.startLoading(text !== null && text !== void 0 ? text : 'Loading...', _objectSpread({
2491
2543
  loadingCancelShown: false
@@ -2512,21 +2564,27 @@ class IrisGrid extends Component {
2512
2564
  this.stopLoading();
2513
2565
  }
2514
2566
  handleUpdate() {
2515
- var _this$grid18;
2567
+ var _this$grid17;
2516
2568
  log.debug2('Received model update');
2517
- var _this$state11 = this.state,
2518
- advancedFilters = _this$state11.advancedFilters,
2519
- aggregationSettings = _this$state11.aggregationSettings,
2520
- customColumns = _this$state11.customColumns,
2521
- quickFilters = _this$state11.quickFilters,
2522
- reverse = _this$state11.reverse,
2523
- rollupConfig = _this$state11.rollupConfig,
2524
- searchFilter = _this$state11.searchFilter,
2525
- selectDistinctColumns = _this$state11.selectDistinctColumns,
2526
- sorts = _this$state11.sorts;
2569
+ var _this$state14 = this.state,
2570
+ advancedFilters = _this$state14.advancedFilters,
2571
+ aggregationSettings = _this$state14.aggregationSettings,
2572
+ conditionalFormats = _this$state14.conditionalFormats,
2573
+ conditionalFormatEditIndex = _this$state14.conditionalFormatEditIndex,
2574
+ conditionalFormatPreview = _this$state14.conditionalFormatPreview,
2575
+ customColumns = _this$state14.customColumns,
2576
+ quickFilters = _this$state14.quickFilters,
2577
+ reverse = _this$state14.reverse,
2578
+ rollupConfig = _this$state14.rollupConfig,
2579
+ searchFilter = _this$state14.searchFilter,
2580
+ selectDistinctColumns = _this$state14.selectDistinctColumns,
2581
+ sorts = _this$state14.sorts;
2527
2582
  var config = {
2528
2583
  advancedFilters,
2529
2584
  aggregationSettings,
2585
+ conditionalFormats,
2586
+ conditionalFormatEditIndex,
2587
+ conditionalFormatPreview,
2530
2588
  customColumns,
2531
2589
  quickFilters,
2532
2590
  reverse,
@@ -2535,12 +2593,12 @@ class IrisGrid extends Component {
2535
2593
  selectDistinctColumns,
2536
2594
  sorts
2537
2595
  };
2538
- if (!isEmptyConfig(config)) {
2596
+ if (!IrisGridUtils.isEmptyConfig(config)) {
2539
2597
  this.lastLoadedConfig = config;
2540
2598
  } else {
2541
2599
  this.lastLoadedConfig = null;
2542
2600
  }
2543
- (_this$grid18 = this.grid) === null || _this$grid18 === void 0 || _this$grid18.forceUpdate();
2601
+ (_this$grid17 = this.grid) === null || _this$grid17 === void 0 || _this$grid17.forceUpdate();
2544
2602
  this.stopLoading();
2545
2603
  }
2546
2604
  handleTableChanged() {
@@ -2568,11 +2626,11 @@ class IrisGrid extends Component {
2568
2626
  });
2569
2627
  }
2570
2628
  handleViewChanged(metrics) {
2571
- var _this$grid$state, _this$grid19;
2629
+ var _this$grid$state, _this$grid18;
2572
2630
  var model = this.props.model;
2573
- var _ref24 = (_this$grid$state = (_this$grid19 = this.grid) === null || _this$grid19 === void 0 ? void 0 : _this$grid19.state) !== null && _this$grid$state !== void 0 ? _this$grid$state : {},
2574
- _ref24$selectionEndRo = _ref24.selectionEndRow,
2575
- selectionEndRow = _ref24$selectionEndRo === void 0 ? 0 : _ref24$selectionEndRo;
2631
+ var _ref19 = (_this$grid$state = (_this$grid18 = this.grid) === null || _this$grid18 === void 0 ? void 0 : _this$grid18.state) !== null && _this$grid$state !== void 0 ? _this$grid$state : {},
2632
+ _ref19$selectionEndRo = _ref19.selectionEndRow,
2633
+ selectionEndRow = _ref19$selectionEndRo === void 0 ? 0 : _ref19$selectionEndRo;
2576
2634
  var pendingRowCount = 0;
2577
2635
  if (isEditableGridModel(model) && model.isEditable) {
2578
2636
  assertNotNull(metrics);
@@ -2637,8 +2695,8 @@ class IrisGrid extends Component {
2637
2695
  // Parsing them again causes a loop with undo/redo that makes it unusable
2638
2696
  columnHeaderGroups: columnHeaderGroups.every(group => isColumnHeaderGroup(group) && group.isValid()) ? columnHeaderGroups : IrisGridUtils.parseColumnHeaderGroups(model, columnHeaderGroups).groups
2639
2697
  }, () => {
2640
- var _this$grid20;
2641
- return (_this$grid20 = this.grid) === null || _this$grid20 === void 0 ? void 0 : _this$grid20.forceUpdate();
2698
+ var _this$grid19;
2699
+ return (_this$grid19 = this.grid) === null || _this$grid19 === void 0 ? void 0 : _this$grid19.forceUpdate();
2642
2700
  });
2643
2701
  }
2644
2702
  handleTooltipRef(tooltip) {
@@ -2656,9 +2714,9 @@ class IrisGrid extends Component {
2656
2714
  }
2657
2715
  handleConditionalFormatCreate() {
2658
2716
  log.debug('Create new conditional format');
2659
- var _this$state12 = this.state,
2660
- openOptions = _this$state12.openOptions,
2661
- conditionalFormats = _this$state12.conditionalFormats;
2717
+ var _this$state15 = this.state,
2718
+ openOptions = _this$state15.openOptions,
2719
+ conditionalFormats = _this$state15.conditionalFormats;
2662
2720
  this.setState({
2663
2721
  openOptions: [...openOptions, {
2664
2722
  type: OptionType.CONDITIONAL_FORMATTING_EDIT,
@@ -2671,9 +2729,9 @@ class IrisGrid extends Component {
2671
2729
  }
2672
2730
  handleConditionalFormatEdit(index) {
2673
2731
  log.debug('Edit conditional format', index);
2674
- var _this$state13 = this.state,
2675
- openOptions = _this$state13.openOptions,
2676
- conditionalFormats = _this$state13.conditionalFormats;
2732
+ var _this$state16 = this.state,
2733
+ openOptions = _this$state16.openOptions,
2734
+ conditionalFormats = _this$state16.conditionalFormats;
2677
2735
  this.setState({
2678
2736
  openOptions: [...openOptions, {
2679
2737
  type: OptionType.CONDITIONAL_FORMATTING_EDIT,
@@ -2705,18 +2763,19 @@ class IrisGrid extends Component {
2705
2763
  // Not resetting conditionalFormatPreview here
2706
2764
  // to prevent editor fields change during the menu transition
2707
2765
  this.setState({
2708
- conditionalFormatEditIndex: null
2766
+ conditionalFormatEditIndex: null,
2767
+ conditionalFormatError: null
2709
2768
  });
2710
2769
  }
2711
2770
  handleUpdateCustomColumns(customColumns) {
2712
2771
  log.info("handleUpdateCustomColumns:", customColumns);
2713
2772
  var model = this.props.model;
2714
- var _this$state14 = this.state,
2715
- movedColumns = _this$state14.movedColumns,
2716
- sorts = _this$state14.sorts,
2717
- quickFilters = _this$state14.quickFilters,
2718
- advancedFilters = _this$state14.advancedFilters,
2719
- selectDistinctColumns = _this$state14.selectDistinctColumns;
2773
+ var _this$state17 = this.state,
2774
+ movedColumns = _this$state17.movedColumns,
2775
+ sorts = _this$state17.sorts,
2776
+ quickFilters = _this$state17.quickFilters,
2777
+ advancedFilters = _this$state17.advancedFilters,
2778
+ selectDistinctColumns = _this$state17.selectDistinctColumns;
2720
2779
  var columns = model.columns;
2721
2780
  var oldCustomColumns = model.customColumns.map(customColumn => "".concat(customColumn));
2722
2781
  var removedColumnNames = IrisGridUtils.getRemovedCustomColumnNames(oldCustomColumns, customColumns);
@@ -2728,16 +2787,18 @@ class IrisGrid extends Component {
2728
2787
  var newSelectDistinctColumns = IrisGridUtils.removeColumnsFromSelectDistinctColumns(selectDistinctColumns, removedColumnNames);
2729
2788
  if (newSorts.length !== sorts.length) {
2730
2789
  log.debug('removing sorts from removed custom columns...');
2731
- this.setState({
2732
- sorts: newSorts
2733
- });
2790
+ this.requestSortsChange(newSorts);
2734
2791
  }
2735
2792
  if (newQuickFilters.size !== quickFilters.size || newAdvancedFilters.size !== advancedFilters.size) {
2736
2793
  log.debug("removing filters from removed custom columns...");
2737
- this.setState({
2738
- quickFilters: newQuickFilters,
2739
- advancedFilters: newAdvancedFilters
2740
- });
2794
+ if (newQuickFilters.size !== quickFilters.size) {
2795
+ this.requestQuickFiltersChange(newQuickFilters);
2796
+ }
2797
+ if (newAdvancedFilters.size !== advancedFilters.size) {
2798
+ this.setState({
2799
+ advancedFilters: newAdvancedFilters
2800
+ });
2801
+ }
2741
2802
  }
2742
2803
  if (!deepEqual(movedColumns, newMovedColumns)) {
2743
2804
  log.debug("change moved columns for removed custom columns", newMovedColumns);
@@ -2824,7 +2885,7 @@ class IrisGrid extends Component {
2824
2885
  return this.discardPending();
2825
2886
  }
2826
2887
  handlePendingDataUpdated() {
2827
- var _this$grid21;
2888
+ var _this$grid20;
2828
2889
  log.debug('pending data updated');
2829
2890
  var model = this.props.model;
2830
2891
  var pendingDataMap = model.pendingDataMap,
@@ -2834,13 +2895,13 @@ class IrisGrid extends Component {
2834
2895
  pendingDataErrors,
2835
2896
  pendingSaveError: null
2836
2897
  });
2837
- (_this$grid21 = this.grid) === null || _this$grid21 === void 0 || _this$grid21.forceUpdate();
2898
+ (_this$grid20 = this.grid) === null || _this$grid20 === void 0 || _this$grid20.forceUpdate();
2838
2899
  }
2839
2900
  handleResizeColumn(modelIndex) {
2840
- var _this$grid22;
2841
- var _this$state15 = this.state,
2842
- metrics = _this$state15.metrics,
2843
- metricCalculator = _this$state15.metricCalculator;
2901
+ var _this$grid21;
2902
+ var _this$state18 = this.state,
2903
+ metrics = _this$state18.metrics,
2904
+ metricCalculator = _this$state18.metricCalculator;
2844
2905
  if (!metrics) throw new Error('Metrics not set');
2845
2906
  var contentWidth = getOrThrow(metrics.contentColumnWidths, modelIndex);
2846
2907
  var userWidths = metricCalculator.getUserColumnWidths();
@@ -2850,23 +2911,23 @@ class IrisGrid extends Component {
2850
2911
  } else {
2851
2912
  metricCalculator.setColumnWidth(modelIndex, contentWidth);
2852
2913
  }
2853
- (_this$grid22 = this.grid) === null || _this$grid22 === void 0 || _this$grid22.forceUpdate();
2914
+ (_this$grid21 = this.grid) === null || _this$grid21 === void 0 || _this$grid21.forceUpdate();
2854
2915
  }
2855
2916
  handleResizeAllColumns() {
2856
- var _this$grid23;
2857
- var _this$state16 = this.state,
2858
- metrics = _this$state16.metrics,
2859
- metricCalculator = _this$state16.metricCalculator;
2917
+ var _this$grid22;
2918
+ var _this$state19 = this.state,
2919
+ metrics = _this$state19.metrics,
2920
+ metricCalculator = _this$state19.metricCalculator;
2860
2921
  if (!metrics) throw new Error('Metrics not set');
2861
2922
  var allColumns = [...metrics.allColumnWidths.entries()];
2862
- var visibleColumns = allColumns.filter(_ref25 => {
2863
- var _ref26 = _slicedToArray(_ref25, 2),
2864
- _ = _ref26[0],
2865
- width = _ref26[1];
2923
+ var visibleColumns = allColumns.filter(_ref20 => {
2924
+ var _ref21 = _slicedToArray(_ref20, 2),
2925
+ _ = _ref21[0],
2926
+ width = _ref21[1];
2866
2927
  return width !== 0;
2867
- }).map(_ref27 => {
2868
- var _ref28 = _slicedToArray(_ref27, 1),
2869
- modelIndex = _ref28[0];
2928
+ }).map(_ref22 => {
2929
+ var _ref23 = _slicedToArray(_ref22, 1),
2930
+ modelIndex = _ref23[0];
2870
2931
  return modelIndex;
2871
2932
  });
2872
2933
  var contentWidths = metrics.contentColumnWidths;
@@ -2888,7 +2949,7 @@ class IrisGrid extends Component {
2888
2949
  metricCalculator.setColumnWidth(_modelIndex, _contentWidth);
2889
2950
  }
2890
2951
  }
2891
- (_this$grid23 = this.grid) === null || _this$grid23 === void 0 || _this$grid23.forceUpdate();
2952
+ (_this$grid22 = this.grid) === null || _this$grid22 === void 0 || _this$grid22.forceUpdate();
2892
2953
  }
2893
2954
 
2894
2955
  /**
@@ -2929,8 +2990,8 @@ class IrisGrid extends Component {
2929
2990
  if (shouldStartLoading) {
2930
2991
  this.startLoading("Aggregating ".concat(aggregation.operation, "..."));
2931
2992
  }
2932
- this.setState(_ref29 => {
2933
- var aggregationSettings = _ref29.aggregationSettings;
2993
+ this.setState(_ref24 => {
2994
+ var aggregationSettings = _ref24.aggregationSettings;
2934
2995
  return {
2935
2996
  selectedAggregation: aggregation,
2936
2997
  aggregationSettings: _objectSpread(_objectSpread({}, aggregationSettings), {}, {
@@ -2972,6 +3033,7 @@ class IrisGrid extends Component {
2972
3033
  this.resetGridViewState();
2973
3034
  this.clearAllFilters();
2974
3035
  this.startLoading("Grouping by columns ".concat((_rollupConfig$columns5 = rollupConfig === null || rollupConfig === void 0 || (_rollupConfig$columns6 = rollupConfig.columns) === null || _rollupConfig$columns6 === void 0 ? void 0 : _rollupConfig$columns6.join(', ')) !== null && _rollupConfig$columns5 !== void 0 ? _rollupConfig$columns5 : '', "..."));
3036
+ this.requestSortsChange(EMPTY_ARRAY);
2975
3037
 
2976
3038
  // Have to clear select distinct since rollup uses the original columns, not the current ones.
2977
3039
  // IrisGridProxyModel has a check to prevent model update
@@ -2980,7 +3042,6 @@ class IrisGrid extends Component {
2980
3042
  rollupConfig,
2981
3043
  movedColumns: EMPTY_ARRAY,
2982
3044
  frozenColumns: EMPTY_ARRAY,
2983
- sorts: EMPTY_ARRAY,
2984
3045
  reverse: false,
2985
3046
  selectDistinctColumns: EMPTY_ARRAY
2986
3047
  });
@@ -2992,10 +3053,10 @@ class IrisGrid extends Component {
2992
3053
  this.clearAllFilters();
2993
3054
  this.clearAllAggregations();
2994
3055
  this.startLoading("Selecting distinct values in ".concat(columnNames.length > 0 ? columnNames.join(', ') : '', "..."));
3056
+ this.requestSortsChange(EMPTY_ARRAY);
2995
3057
  this.setState({
2996
3058
  selectDistinctColumns: columnNames,
2997
3059
  movedColumns: [],
2998
- sorts: [],
2999
3060
  reverse: false
3000
3061
  });
3001
3062
  }
@@ -3034,8 +3095,8 @@ class IrisGrid extends Component {
3034
3095
  */
3035
3096
  removeEmptyAggregations() {
3036
3097
  log.debug('removeEmptyAggregations');
3037
- this.setState(_ref30 => {
3038
- var aggregationSettings = _ref30.aggregationSettings;
3098
+ this.setState(_ref25 => {
3099
+ var aggregationSettings = _ref25.aggregationSettings;
3039
3100
  var aggregations = aggregationSettings.aggregations;
3040
3101
  var newAggregations = aggregations.filter(a => a.selected.length > 0 || a.invert);
3041
3102
  if (newAggregations.length !== aggregations.length) {
@@ -3210,11 +3271,11 @@ class IrisGrid extends Component {
3210
3271
  onStateChange(irisGridState, gridState);
3211
3272
  }
3212
3273
  handleOverflowClose() {
3213
- var _this$grid24;
3274
+ var _this$grid23;
3214
3275
  this.setState({
3215
3276
  showOverflowModal: false
3216
3277
  });
3217
- (_this$grid24 = this.grid) === null || _this$grid24 === void 0 || _this$grid24.focus(); // Focus on the grid after closing the overflow modal
3278
+ (_this$grid23 = this.grid) === null || _this$grid23 === void 0 || _this$grid23.focus(); // Focus on the grid after closing the overflow modal
3218
3279
  }
3219
3280
  handleOpenNoPastePermissionModal(errorMessage) {
3220
3281
  this.setState({
@@ -3229,9 +3290,9 @@ class IrisGrid extends Component {
3229
3290
  }
3230
3291
  getColumnBoundingRect() {
3231
3292
  var _this$gridWrapper2;
3232
- var _this$state17 = this.state,
3233
- metrics = _this$state17.metrics,
3234
- shownColumnTooltip = _this$state17.shownColumnTooltip;
3293
+ var _this$state20 = this.state,
3294
+ metrics = _this$state20.metrics,
3295
+ shownColumnTooltip = _this$state20.shownColumnTooltip;
3235
3296
  assertNotNull(metrics);
3236
3297
  assertNotNull(shownColumnTooltip);
3237
3298
  var gridRect = (_this$gridWrapper2 = this.gridWrapper) === null || _this$gridWrapper2 === void 0 ? void 0 : _this$gridWrapper2.getBoundingClientRect();
@@ -3284,22 +3345,22 @@ class IrisGrid extends Component {
3284
3345
  gotoRowError: 'Invalid row index'
3285
3346
  });
3286
3347
  } else if (rowInt === 0) {
3287
- var _this$grid25;
3348
+ var _this$grid24;
3288
3349
  this.setState({
3289
3350
  gotoRowError: '',
3290
3351
  gotoValueError: ''
3291
3352
  });
3292
- (_this$grid25 = this.grid) === null || _this$grid25 === void 0 || _this$grid25.setFocusRow(0);
3353
+ (_this$grid24 = this.grid) === null || _this$grid24 === void 0 || _this$grid24.setFocusRow(0);
3293
3354
  } else if (rowInt < 0) {
3294
- var _this$grid26;
3355
+ var _this$grid25;
3295
3356
  this.setState({
3296
3357
  gotoRowError: '',
3297
3358
  gotoValueError: ''
3298
3359
  });
3299
- (_this$grid26 = this.grid) === null || _this$grid26 === void 0 || _this$grid26.setFocusRow(rowInt + rowCount);
3360
+ (_this$grid25 = this.grid) === null || _this$grid25 === void 0 || _this$grid25.setFocusRow(rowInt + rowCount);
3300
3361
  } else {
3301
- var _this$grid27;
3302
- (_this$grid27 = this.grid) === null || _this$grid27 === void 0 || _this$grid27.setFocusRow(rowInt - 1);
3362
+ var _this$grid26;
3363
+ (_this$grid26 = this.grid) === null || _this$grid26 === void 0 || _this$grid26.setFocusRow(rowInt - 1);
3303
3364
  this.setState({
3304
3365
  gotoRowError: '',
3305
3366
  gotoValueError: ''
@@ -3397,12 +3458,12 @@ class IrisGrid extends Component {
3397
3458
  });
3398
3459
  }
3399
3460
  handleGotoValueSelectedColumnNameChanged(columnName) {
3400
- var _this$grid28;
3461
+ var _this$grid27;
3401
3462
  var model = this.props.model;
3402
- var cursorRow = (_this$grid28 = this.grid) === null || _this$grid28 === void 0 ? void 0 : _this$grid28.state.cursorRow;
3403
- var _this$state18 = this.state,
3404
- prevColumnName = _this$state18.gotoValueSelectedColumnName,
3405
- gotoValueManuallyChanged = _this$state18.gotoValueManuallyChanged;
3463
+ var cursorRow = (_this$grid27 = this.grid) === null || _this$grid27 === void 0 ? void 0 : _this$grid27.state.cursorRow;
3464
+ var _this$state21 = this.state,
3465
+ prevColumnName = _this$state21.gotoValueSelectedColumnName,
3466
+ gotoValueManuallyChanged = _this$state21.gotoValueManuallyChanged;
3406
3467
  if (cursorRow != null) {
3407
3468
  var index = model.getColumnIndexByName(columnName);
3408
3469
  var column = IrisGridUtils.getColumnByName(model.columns, columnName);
@@ -3455,7 +3516,7 @@ class IrisGrid extends Component {
3455
3516
  * @returns The filter input field element or null if not applicable
3456
3517
  */
3457
3518
  getFilterBarInput(metrics, metricCalculator, focusedFilterBarColumn, quickFilters, advancedFilters) {
3458
- var _this$grid29;
3519
+ var _this$grid28;
3459
3520
  if (metrics == null || focusedFilterBarColumn == null) {
3460
3521
  return null;
3461
3522
  }
@@ -3510,7 +3571,7 @@ class IrisGrid extends Component {
3510
3571
  onChange: this.handleFilterBarChange,
3511
3572
  onDone: this.handleFilterBarDone,
3512
3573
  onTab: this.handleFilterBarTab,
3513
- onContextMenu: (_this$grid29 = this.grid) === null || _this$grid29 === void 0 ? void 0 : _this$grid29.handleContextMenu,
3574
+ onContextMenu: (_this$grid28 = this.grid) === null || _this$grid28 === void 0 ? void 0 : _this$grid28.handleContextMenu,
3514
3575
  debounceMs: debounceMs,
3515
3576
  value: value
3516
3577
  }, focusedFilterBarColumn);
@@ -3519,94 +3580,95 @@ class IrisGrid extends Component {
3519
3580
  var _rollupConfig$columns7,
3520
3581
  _rollupConfig$columns8,
3521
3582
  _this7 = this,
3522
- _this$grid30,
3583
+ _this$grid29,
3523
3584
  _openOptions;
3524
- var _this$props8 = this.props,
3525
- children = _this$props8.children,
3526
- customFilters = _this$props8.customFilters,
3527
- getDownloadWorker = _this$props8.getDownloadWorker,
3528
- isSelectingColumn = _this$props8.isSelectingColumn,
3529
- isStuckToBottom = _this$props8.isStuckToBottom,
3530
- isStuckToRight = _this$props8.isStuckToRight,
3531
- model = _this$props8.model,
3532
- name = _this$props8.name,
3533
- onlyFetchVisibleColumns = _this$props8.onlyFetchVisibleColumns,
3534
- alwaysFetchColumns = _this$props8.alwaysFetchColumns,
3535
- advancedSettings = _this$props8.advancedSettings,
3536
- onAdvancedSettingsChange = _this$props8.onAdvancedSettingsChange,
3537
- canDownloadCsv = _this$props8.canDownloadCsv,
3538
- onCreateChart = _this$props8.onCreateChart,
3539
- transformTableOptions = _this$props8.transformTableOptions;
3585
+ var _this$props0 = this.props,
3586
+ children = _this$props0.children,
3587
+ customFilters = _this$props0.customFilters,
3588
+ getDownloadWorker = _this$props0.getDownloadWorker,
3589
+ isSelectingColumn = _this$props0.isSelectingColumn,
3590
+ isStuckToBottom = _this$props0.isStuckToBottom,
3591
+ isStuckToRight = _this$props0.isStuckToRight,
3592
+ model = _this$props0.model,
3593
+ name = _this$props0.name,
3594
+ onlyFetchVisibleColumns = _this$props0.onlyFetchVisibleColumns,
3595
+ alwaysFetchColumns = _this$props0.alwaysFetchColumns,
3596
+ advancedSettings = _this$props0.advancedSettings,
3597
+ onAdvancedSettingsChange = _this$props0.onAdvancedSettingsChange,
3598
+ canDownloadCsv = _this$props0.canDownloadCsv,
3599
+ onCreateChart = _this$props0.onCreateChart,
3600
+ transformTableOptions = _this$props0.transformTableOptions;
3540
3601
  var cellInputRendererRegistry = this.context.cellInputRendererRegistry;
3541
- var _this$state19 = this.state,
3542
- metricCalculator = _this$state19.metricCalculator,
3543
- metrics = _this$state19.metrics,
3544
- isFilterBarShown = _this$state19.isFilterBarShown,
3545
- isSelectingPartition = _this$state19.isSelectingPartition,
3546
- isMenuShown = _this$state19.isMenuShown,
3547
- isReady = _this$state19.isReady,
3548
- copyOperation = _this$state19.copyOperation,
3549
- focusedFilterBarColumn = _this$state19.focusedFilterBarColumn,
3550
- loadingText = _this$state19.loadingText,
3551
- loadingScrimProgress = _this$state19.loadingScrimProgress,
3552
- loadingSpinnerShown = _this$state19.loadingSpinnerShown,
3553
- loadingCancelShown = _this$state19.loadingCancelShown,
3554
- loadingBlocksGrid = _this$state19.loadingBlocksGrid,
3555
- shownColumnTooltip = _this$state19.shownColumnTooltip,
3556
- hoverAdvancedFilter = _this$state19.hoverAdvancedFilter,
3557
- shownAdvancedFilter = _this$state19.shownAdvancedFilter,
3558
- maximizedAdvancedFilter = _this$state19.maximizedAdvancedFilter,
3559
- hoverSelectColumn = _this$state19.hoverSelectColumn,
3560
- quickFilters = _this$state19.quickFilters,
3561
- advancedFilters = _this$state19.advancedFilters,
3562
- searchFilter = _this$state19.searchFilter,
3563
- selectDistinctColumns = _this$state19.selectDistinctColumns,
3564
- movedColumns = _this$state19.movedColumns,
3565
- movedRows = _this$state19.movedRows,
3566
- formatter = _this$state19.formatter,
3567
- conditionalFormats = _this$state19.conditionalFormats,
3568
- conditionalFormatPreview = _this$state19.conditionalFormatPreview,
3569
- conditionalFormatEditIndex = _this$state19.conditionalFormatEditIndex,
3570
- columnAlignmentMap = _this$state19.columnAlignmentMap,
3571
- sorts = _this$state19.sorts,
3572
- reverse = _this$state19.reverse,
3573
- customColumns = _this$state19.customColumns,
3574
- selectedRanges = _this$state19.selectedRanges,
3575
- isTableDownloading = _this$state19.isTableDownloading,
3576
- tableDownloadStatus = _this$state19.tableDownloadStatus,
3577
- tableDownloadProgress = _this$state19.tableDownloadProgress,
3578
- tableDownloadEstimatedTime = _this$state19.tableDownloadEstimatedTime,
3579
- showSearchBar = _this$state19.showSearchBar,
3580
- searchValue = _this$state19.searchValue,
3581
- selectedSearchColumns = _this$state19.selectedSearchColumns,
3582
- invertSearchColumns = _this$state19.invertSearchColumns,
3583
- aggregationSettings = _this$state19.aggregationSettings,
3584
- selectedAggregation = _this$state19.selectedAggregation,
3585
- rollupConfig = _this$state19.rollupConfig,
3586
- openOptions = _this$state19.openOptions,
3587
- pendingSavePromise = _this$state19.pendingSavePromise,
3588
- pendingSaveError = _this$state19.pendingSaveError,
3589
- pendingRowCount = _this$state19.pendingRowCount,
3590
- pendingDataErrors = _this$state19.pendingDataErrors,
3591
- pendingDataMap = _this$state19.pendingDataMap,
3592
- toastMessage = _this$state19.toastMessage,
3593
- frozenColumns = _this$state19.frozenColumns,
3594
- columnHeaderGroups = _this$state19.columnHeaderGroups,
3595
- showOverflowModal = _this$state19.showOverflowModal,
3596
- showNoPastePermissionModal = _this$state19.showNoPastePermissionModal,
3597
- noPastePermissionError = _this$state19.noPastePermissionError,
3598
- overflowText = _this$state19.overflowText,
3599
- overflowButtonTooltipProps = _this$state19.overflowButtonTooltipProps,
3600
- expandCellTooltipProps = _this$state19.expandCellTooltipProps,
3601
- hoverTooltipProps = _this$state19.hoverTooltipProps,
3602
- isGotoShown = _this$state19.isGotoShown,
3603
- gotoRow = _this$state19.gotoRow,
3604
- gotoRowError = _this$state19.gotoRowError,
3605
- gotoValueError = _this$state19.gotoValueError,
3606
- gotoValueSelectedColumnName = _this$state19.gotoValueSelectedColumnName,
3607
- gotoValue = _this$state19.gotoValue,
3608
- gotoValueSelectedFilter = _this$state19.gotoValueSelectedFilter,
3609
- partitionConfig = _this$state19.partitionConfig;
3602
+ var _this$state22 = this.state,
3603
+ metricCalculator = _this$state22.metricCalculator,
3604
+ metrics = _this$state22.metrics,
3605
+ isFilterBarShown = _this$state22.isFilterBarShown,
3606
+ isSelectingPartition = _this$state22.isSelectingPartition,
3607
+ isMenuShown = _this$state22.isMenuShown,
3608
+ isReady = _this$state22.isReady,
3609
+ copyOperation = _this$state22.copyOperation,
3610
+ focusedFilterBarColumn = _this$state22.focusedFilterBarColumn,
3611
+ loadingText = _this$state22.loadingText,
3612
+ loadingScrimProgress = _this$state22.loadingScrimProgress,
3613
+ loadingSpinnerShown = _this$state22.loadingSpinnerShown,
3614
+ loadingCancelShown = _this$state22.loadingCancelShown,
3615
+ loadingBlocksGrid = _this$state22.loadingBlocksGrid,
3616
+ shownColumnTooltip = _this$state22.shownColumnTooltip,
3617
+ hoverAdvancedFilter = _this$state22.hoverAdvancedFilter,
3618
+ shownAdvancedFilter = _this$state22.shownAdvancedFilter,
3619
+ maximizedAdvancedFilter = _this$state22.maximizedAdvancedFilter,
3620
+ hoverSelectColumn = _this$state22.hoverSelectColumn,
3621
+ quickFilters = _this$state22.quickFilters,
3622
+ advancedFilters = _this$state22.advancedFilters,
3623
+ searchFilter = _this$state22.searchFilter,
3624
+ selectDistinctColumns = _this$state22.selectDistinctColumns,
3625
+ movedColumns = _this$state22.movedColumns,
3626
+ movedRows = _this$state22.movedRows,
3627
+ formatter = _this$state22.formatter,
3628
+ conditionalFormats = _this$state22.conditionalFormats,
3629
+ conditionalFormatPreview = _this$state22.conditionalFormatPreview,
3630
+ conditionalFormatEditIndex = _this$state22.conditionalFormatEditIndex,
3631
+ conditionalFormatError = _this$state22.conditionalFormatError,
3632
+ columnAlignmentMap = _this$state22.columnAlignmentMap,
3633
+ sorts = _this$state22.sorts,
3634
+ reverse = _this$state22.reverse,
3635
+ customColumns = _this$state22.customColumns,
3636
+ selectedRanges = _this$state22.selectedRanges,
3637
+ isTableDownloading = _this$state22.isTableDownloading,
3638
+ tableDownloadStatus = _this$state22.tableDownloadStatus,
3639
+ tableDownloadProgress = _this$state22.tableDownloadProgress,
3640
+ tableDownloadEstimatedTime = _this$state22.tableDownloadEstimatedTime,
3641
+ showSearchBar = _this$state22.showSearchBar,
3642
+ searchValue = _this$state22.searchValue,
3643
+ selectedSearchColumns = _this$state22.selectedSearchColumns,
3644
+ invertSearchColumns = _this$state22.invertSearchColumns,
3645
+ aggregationSettings = _this$state22.aggregationSettings,
3646
+ selectedAggregation = _this$state22.selectedAggregation,
3647
+ rollupConfig = _this$state22.rollupConfig,
3648
+ openOptions = _this$state22.openOptions,
3649
+ pendingSavePromise = _this$state22.pendingSavePromise,
3650
+ pendingSaveError = _this$state22.pendingSaveError,
3651
+ pendingRowCount = _this$state22.pendingRowCount,
3652
+ pendingDataErrors = _this$state22.pendingDataErrors,
3653
+ pendingDataMap = _this$state22.pendingDataMap,
3654
+ toastMessage = _this$state22.toastMessage,
3655
+ frozenColumns = _this$state22.frozenColumns,
3656
+ columnHeaderGroups = _this$state22.columnHeaderGroups,
3657
+ showOverflowModal = _this$state22.showOverflowModal,
3658
+ showNoPastePermissionModal = _this$state22.showNoPastePermissionModal,
3659
+ noPastePermissionError = _this$state22.noPastePermissionError,
3660
+ overflowText = _this$state22.overflowText,
3661
+ overflowButtonTooltipProps = _this$state22.overflowButtonTooltipProps,
3662
+ expandCellTooltipProps = _this$state22.expandCellTooltipProps,
3663
+ hoverTooltipProps = _this$state22.hoverTooltipProps,
3664
+ isGotoShown = _this$state22.isGotoShown,
3665
+ gotoRow = _this$state22.gotoRow,
3666
+ gotoRowError = _this$state22.gotoRowError,
3667
+ gotoValueError = _this$state22.gotoValueError,
3668
+ gotoValueSelectedColumnName = _this$state22.gotoValueSelectedColumnName,
3669
+ gotoValue = _this$state22.gotoValue,
3670
+ gotoValueSelectedFilter = _this$state22.gotoValueSelectedFilter,
3671
+ partitionConfig = _this$state22.partitionConfig;
3610
3672
  if (!isReady) {
3611
3673
  return null;
3612
3674
  }
@@ -3773,8 +3835,8 @@ class IrisGrid extends Component {
3773
3835
  return 1; // continue
3774
3836
  }
3775
3837
  var advancedFilter = advancedFilters.get(modelColumn);
3776
- var _ref31 = advancedFilter || {},
3777
- advancedFilterOptions = _ref31.options;
3838
+ var _ref26 = advancedFilter || {},
3839
+ advancedFilterOptions = _ref26.options;
3778
3840
  var sort = TableUtils.getSortForColumn(model.sort, column.name);
3779
3841
  var sortDirection = sort ? sort.direction : null;
3780
3842
  if (!isSortDirection(sortDirection)) {
@@ -3844,6 +3906,7 @@ class IrisGrid extends Component {
3844
3906
  dh: model.dh,
3845
3907
  columns: model.columns,
3846
3908
  rule: conditionalFormatPreview,
3909
+ errorMessage: conditionalFormatError !== null && conditionalFormatError !== void 0 ? conditionalFormatError : undefined,
3847
3910
  onUpdate: this.handleConditionalFormatEditorUpdate,
3848
3911
  onSave: this.handleConditionalFormatEditorSave,
3849
3912
  onCancel: this.handleConditionalFormatEditorCancel
@@ -4014,7 +4077,7 @@ class IrisGrid extends Component {
4014
4077
  movedColumns: movedColumns,
4015
4078
  customColumns: customColumns,
4016
4079
  hiddenColumns: hiddenColumns,
4017
- alwaysFetchColumns: this.getAlwaysFetchColumns(alwaysFetchColumns, model.columns, movedColumns, model.floatingLeftColumnCount, model.floatingRightColumnCount, (_this$grid30 = this.grid) === null || _this$grid30 === void 0 || (_this$grid30 = _this$grid30.state.draggingColumn) === null || _this$grid30 === void 0 ? void 0 : _this$grid30.range),
4080
+ alwaysFetchColumns: this.getAlwaysFetchColumns(alwaysFetchColumns, model.columns, movedColumns, model.floatingLeftColumnCount, model.floatingRightColumnCount, (_this$grid29 = this.grid) === null || _this$grid29 === void 0 || (_this$grid29 = _this$grid29.state.draggingColumn) === null || _this$grid29 === void 0 ? void 0 : _this$grid29.range),
4018
4081
  formatColumns: this.getCachedPreviewFormatColumns(model.dh, model.columns, conditionalFormats, conditionalFormatPreview,
4019
4082
  // Disable the preview format when we press Back on the format edit page
4020
4083
  ((_openOptions = openOptions[openOptions.length - 1]) === null || _openOptions === void 0 ? void 0 : _openOptions.type) === OptionType.CONDITIONAL_FORMATTING_EDIT ? conditionalFormatEditIndex !== null && conditionalFormatEditIndex !== void 0 ? conditionalFormatEditIndex : undefined : undefined),
@@ -4164,8 +4227,12 @@ _defineProperty(IrisGrid, "defaultProps", {
4164
4227
  partitions: undefined,
4165
4228
  partitionConfig: undefined,
4166
4229
  quickFilters: EMPTY_MAP,
4230
+ isQuickFiltersControlled: false,
4231
+ onQuickFiltersChange: undefined,
4167
4232
  selectDistinctColumns: EMPTY_ARRAY,
4168
4233
  sorts: EMPTY_ARRAY,
4234
+ isSortsControlled: false,
4235
+ onSortsChange: undefined,
4169
4236
  reverse: false,
4170
4237
  customColumns: EMPTY_ARRAY,
4171
4238
  aggregationSettings: DEFAULT_AGGREGATION_SETTINGS,