@deephaven/iris-grid 1.27.4 → 1.27.5
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/FilterInputField.d.ts.map +1 -1
- package/dist/FilterInputField.js +17 -7
- package/dist/FilterInputField.js.map +1 -1
- package/dist/IrisGrid.d.ts +11 -1
- package/dist/IrisGrid.d.ts.map +1 -1
- package/dist/IrisGrid.js +389 -362
- package/dist/IrisGrid.js.map +1 -1
- package/dist/LazyIrisGrid.d.ts +4 -0
- package/dist/LazyIrisGrid.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.js +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
- package/package.json +2 -2
package/dist/IrisGrid.js
CHANGED
|
@@ -851,6 +851,8 @@ class IrisGrid extends Component {
|
|
|
851
851
|
customFilters = _this$props.customFilters,
|
|
852
852
|
quickFilters = _this$props.quickFilters,
|
|
853
853
|
sorts = _this$props.sorts,
|
|
854
|
+
isQuickFiltersControlled = _this$props.isQuickFiltersControlled,
|
|
855
|
+
isSortsControlled = _this$props.isSortsControlled,
|
|
854
856
|
getMetricCalculator = _this$props.getMetricCalculator;
|
|
855
857
|
if (model !== prevProps.model) {
|
|
856
858
|
this.stopListening(prevProps.model);
|
|
@@ -894,10 +896,10 @@ class IrisGrid extends Component {
|
|
|
894
896
|
resetRanges: true
|
|
895
897
|
});
|
|
896
898
|
}
|
|
897
|
-
if (sorts !== prevProps.sorts) {
|
|
899
|
+
if (sorts !== prevProps.sorts || !prevProps.isSortsControlled && isSortsControlled) {
|
|
898
900
|
this.updateSorts(sorts);
|
|
899
901
|
}
|
|
900
|
-
if (quickFilters !== prevProps.quickFilters) {
|
|
902
|
+
if (quickFilters !== prevProps.quickFilters || !prevProps.isQuickFiltersControlled && isQuickFiltersControlled) {
|
|
901
903
|
this.updateQuickFilters(quickFilters);
|
|
902
904
|
}
|
|
903
905
|
var loadingScrimStartTime = this.loadingScrimStartTime,
|
|
@@ -1073,7 +1075,8 @@ class IrisGrid extends Component {
|
|
|
1073
1075
|
quickFilters = _this$state2.quickFilters;
|
|
1074
1076
|
var newAdvancedFilters = replaceExisting ? new Map() : new Map(advancedFilters);
|
|
1075
1077
|
var newQuickFilters = replaceExisting ? new Map() : new Map(quickFilters);
|
|
1076
|
-
var
|
|
1078
|
+
var didAdvancedFiltersChange = replaceExisting && advancedFilters.size > 0;
|
|
1079
|
+
var didQuickFiltersChange = replaceExisting && quickFilters.size > 0;
|
|
1077
1080
|
inputFilters.forEach(_ref4 => {
|
|
1078
1081
|
var name = _ref4.name,
|
|
1079
1082
|
type = _ref4.type,
|
|
@@ -1084,19 +1087,21 @@ class IrisGrid extends Component {
|
|
|
1084
1087
|
return columnName === name && columnType === type;
|
|
1085
1088
|
});
|
|
1086
1089
|
if (modelIndex >= 0) {
|
|
1087
|
-
|
|
1088
|
-
|
|
1090
|
+
didAdvancedFiltersChange = newAdvancedFilters.delete(modelIndex) || didAdvancedFiltersChange;
|
|
1091
|
+
didQuickFiltersChange = this.applyQuickFilter(modelIndex, value, newQuickFilters) || didQuickFiltersChange;
|
|
1089
1092
|
} else {
|
|
1090
1093
|
log.error('Unable to find column for inputFilter', name, type, value);
|
|
1091
1094
|
}
|
|
1092
1095
|
});
|
|
1093
|
-
if (
|
|
1096
|
+
if (didQuickFiltersChange) {
|
|
1097
|
+
this.requestQuickFiltersChange(newQuickFilters);
|
|
1098
|
+
}
|
|
1099
|
+
if (didAdvancedFiltersChange) {
|
|
1094
1100
|
this.setState({
|
|
1095
|
-
quickFilters: newQuickFilters,
|
|
1096
1101
|
advancedFilters: newAdvancedFilters
|
|
1097
1102
|
});
|
|
1098
1103
|
}
|
|
1099
|
-
return
|
|
1104
|
+
return didQuickFiltersChange || didAdvancedFiltersChange;
|
|
1100
1105
|
}
|
|
1101
1106
|
|
|
1102
1107
|
/**
|
|
@@ -1162,20 +1167,13 @@ class IrisGrid extends Component {
|
|
|
1162
1167
|
*/
|
|
1163
1168
|
setQuickFilter(modelIndex, filter, text) {
|
|
1164
1169
|
log.debug('Setting quick filter', modelIndex, filter, text);
|
|
1165
|
-
this.
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
var newQuickFilters = new Map(quickFilters);
|
|
1171
|
-
newQuickFilters.set(modelIndex, {
|
|
1172
|
-
filter,
|
|
1173
|
-
text
|
|
1174
|
-
});
|
|
1175
|
-
return {
|
|
1176
|
-
quickFilters: newQuickFilters
|
|
1177
|
-
};
|
|
1170
|
+
var quickFilters = this.state.quickFilters;
|
|
1171
|
+
var newQuickFilters = new Map(quickFilters);
|
|
1172
|
+
newQuickFilters.set(modelIndex, {
|
|
1173
|
+
filter,
|
|
1174
|
+
text
|
|
1178
1175
|
});
|
|
1176
|
+
this.requestQuickFiltersChange(newQuickFilters);
|
|
1179
1177
|
}
|
|
1180
1178
|
|
|
1181
1179
|
/**
|
|
@@ -1191,9 +1189,12 @@ class IrisGrid extends Component {
|
|
|
1191
1189
|
this.clearAllFilters();
|
|
1192
1190
|
}
|
|
1193
1191
|
var model = this.props.model;
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
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;
|
|
1197
1198
|
var column = model.columns.find(c => c.name === columnName && c.type === columnType);
|
|
1198
1199
|
if (column == null) {
|
|
1199
1200
|
return;
|
|
@@ -1202,73 +1203,89 @@ class IrisGrid extends Component {
|
|
|
1202
1203
|
assertNotNull(columnIndex);
|
|
1203
1204
|
var combinedText = IrisGridUtils.combineFiltersFromList(columnType, filterList);
|
|
1204
1205
|
if (combinedText.length === 0) {
|
|
1205
|
-
|
|
1206
|
+
didQuickFiltersChange = newQuickFilters.delete(columnIndex) || didQuickFiltersChange;
|
|
1206
1207
|
} else {
|
|
1207
1208
|
var formatter = model.formatter;
|
|
1208
|
-
|
|
1209
|
+
newQuickFilters.set(columnIndex, {
|
|
1210
|
+
filter: this.makeQuickFilter(column, combinedText, formatter.timeZone),
|
|
1211
|
+
text: "".concat(combinedText)
|
|
1212
|
+
});
|
|
1213
|
+
didQuickFiltersChange = true;
|
|
1209
1214
|
}
|
|
1210
1215
|
});
|
|
1216
|
+
if (didQuickFiltersChange) {
|
|
1217
|
+
this.requestQuickFiltersChange(newQuickFilters);
|
|
1218
|
+
}
|
|
1211
1219
|
}
|
|
1212
1220
|
removeColumnFilter(modelRange) {
|
|
1213
|
-
this.startLoading('Filtering...', {
|
|
1214
|
-
resetRanges: true
|
|
1215
|
-
});
|
|
1216
1221
|
var clearRange = Array.isArray(modelRange) ? modelRange : [modelRange, modelRange];
|
|
1217
|
-
this.
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
}
|
|
1232
|
-
return {
|
|
1233
|
-
quickFilters: newQuickFilters,
|
|
1234
|
-
advancedFilters: newAdvancedFilters
|
|
1235
|
-
};
|
|
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
|
+
}
|
|
1232
|
+
});
|
|
1233
|
+
newQuickFilters.forEach((_, column) => {
|
|
1234
|
+
if (column >= clearRange[0] && column <= clearRange[1]) {
|
|
1235
|
+
newQuickFilters.delete(column);
|
|
1236
|
+
}
|
|
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
|
+
}
|
|
1237
1253
|
}
|
|
1238
1254
|
removeQuickFilter(modelColumn) {
|
|
1239
|
-
this.
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
this.
|
|
1243
|
-
var quickFilters = _ref0.quickFilters;
|
|
1244
|
-
var newQuickFilters = new Map(quickFilters);
|
|
1245
|
-
newQuickFilters.delete(modelColumn);
|
|
1246
|
-
return {
|
|
1247
|
-
quickFilters: newQuickFilters
|
|
1248
|
-
};
|
|
1249
|
-
});
|
|
1255
|
+
var quickFilters = this.state.quickFilters;
|
|
1256
|
+
var newQuickFilters = new Map(quickFilters);
|
|
1257
|
+
newQuickFilters.delete(modelColumn);
|
|
1258
|
+
this.requestQuickFiltersChange(newQuickFilters);
|
|
1250
1259
|
}
|
|
1251
1260
|
clearAllFilters() {
|
|
1252
1261
|
log.debug('Clearing all filters');
|
|
1253
|
-
var _this$
|
|
1254
|
-
advancedFilters = _this$
|
|
1255
|
-
quickFilters = _this$
|
|
1256
|
-
searchFilter = _this$
|
|
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;
|
|
1257
1267
|
if (quickFilters.size === 0 && advancedFilters.size === 0 && searchFilter === null) {
|
|
1258
1268
|
return;
|
|
1259
1269
|
}
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
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
|
+
}
|
|
1272
1289
|
}
|
|
1273
1290
|
clearAllAggregations() {
|
|
1274
1291
|
log.debug('Clearing all aggregations');
|
|
@@ -1294,9 +1311,9 @@ class IrisGrid extends Component {
|
|
|
1294
1311
|
*/
|
|
1295
1312
|
rebuildFilters() {
|
|
1296
1313
|
var model = this.props.model;
|
|
1297
|
-
var _this$
|
|
1298
|
-
advancedFilters = _this$
|
|
1299
|
-
quickFilters = _this$
|
|
1314
|
+
var _this$state5 = this.state,
|
|
1315
|
+
advancedFilters = _this$state5.advancedFilters,
|
|
1316
|
+
quickFilters = _this$state5.quickFilters;
|
|
1300
1317
|
if (advancedFilters.size === 0 && quickFilters.size === 0) {
|
|
1301
1318
|
log.debug('No filters to rebuild');
|
|
1302
1319
|
return;
|
|
@@ -1326,16 +1343,18 @@ class IrisGrid extends Component {
|
|
|
1326
1343
|
this.startLoading('Rebuilding filters...', {
|
|
1327
1344
|
resetRanges: true
|
|
1328
1345
|
});
|
|
1346
|
+
if (quickFilters.size > 0) {
|
|
1347
|
+
this.requestQuickFiltersChange(newQuickFilters);
|
|
1348
|
+
}
|
|
1329
1349
|
this.setState({
|
|
1330
|
-
quickFilters: newQuickFilters,
|
|
1331
1350
|
advancedFilters: newAdvancedFilters
|
|
1332
1351
|
});
|
|
1333
1352
|
}
|
|
1334
|
-
setFilters(
|
|
1335
|
-
var quickFilters =
|
|
1336
|
-
advancedFilters =
|
|
1353
|
+
setFilters(_ref8) {
|
|
1354
|
+
var quickFilters = _ref8.quickFilters,
|
|
1355
|
+
advancedFilters = _ref8.advancedFilters;
|
|
1356
|
+
this.requestQuickFiltersChange(quickFilters);
|
|
1337
1357
|
this.setState({
|
|
1338
|
-
quickFilters,
|
|
1339
1358
|
advancedFilters
|
|
1340
1359
|
});
|
|
1341
1360
|
}
|
|
@@ -1513,15 +1532,15 @@ class IrisGrid extends Component {
|
|
|
1513
1532
|
if (isPartitionedGridModel(model)) {
|
|
1514
1533
|
var data = this.getRowDataMap(rowIndex);
|
|
1515
1534
|
var partitionColumnSet = new Set(model.partitionColumns.map(column => column.name));
|
|
1516
|
-
var values = Object.entries(data).filter(
|
|
1517
|
-
var
|
|
1518
|
-
key =
|
|
1519
|
-
_ =
|
|
1535
|
+
var values = Object.entries(data).filter(_ref9 => {
|
|
1536
|
+
var _ref0 = _slicedToArray(_ref9, 2),
|
|
1537
|
+
key = _ref0[0],
|
|
1538
|
+
_ = _ref0[1];
|
|
1520
1539
|
return partitionColumnSet.has(key);
|
|
1521
|
-
}).map(
|
|
1522
|
-
var
|
|
1523
|
-
key =
|
|
1524
|
-
columnData =
|
|
1540
|
+
}).map(_ref1 => {
|
|
1541
|
+
var _ref10 = _slicedToArray(_ref1, 2),
|
|
1542
|
+
key = _ref10[0],
|
|
1543
|
+
columnData = _ref10[1];
|
|
1525
1544
|
return columnData.value;
|
|
1526
1545
|
});
|
|
1527
1546
|
var newPartition = {
|
|
@@ -1579,9 +1598,9 @@ class IrisGrid extends Component {
|
|
|
1579
1598
|
var _this$props5 = this.props,
|
|
1580
1599
|
model = _this$props5.model,
|
|
1581
1600
|
canCopy = _this$props5.canCopy;
|
|
1582
|
-
var _this$
|
|
1583
|
-
metricCalculator = _this$
|
|
1584
|
-
movedColumns = _this$
|
|
1601
|
+
var _this$state6 = this.state,
|
|
1602
|
+
metricCalculator = _this$state6.metricCalculator,
|
|
1603
|
+
movedColumns = _this$state6.movedColumns;
|
|
1585
1604
|
var userColumnWidths = metricCalculator.getUserColumnWidths();
|
|
1586
1605
|
if (canCopy) {
|
|
1587
1606
|
var copyOperation = {
|
|
@@ -1600,13 +1619,13 @@ class IrisGrid extends Component {
|
|
|
1600
1619
|
}
|
|
1601
1620
|
}
|
|
1602
1621
|
startLoading(loadingText) {
|
|
1603
|
-
var
|
|
1604
|
-
|
|
1605
|
-
resetRanges =
|
|
1606
|
-
|
|
1607
|
-
loadingCancelShown =
|
|
1608
|
-
|
|
1609
|
-
loadingBlocksGrid =
|
|
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;
|
|
1610
1629
|
this.setState({
|
|
1611
1630
|
loadingText,
|
|
1612
1631
|
loadingCancelShown,
|
|
@@ -1751,9 +1770,9 @@ class IrisGrid extends Component {
|
|
|
1751
1770
|
});
|
|
1752
1771
|
return;
|
|
1753
1772
|
}
|
|
1754
|
-
var _this$
|
|
1755
|
-
metricCalculator = _this$
|
|
1756
|
-
metrics = _this$
|
|
1773
|
+
var _this$state7 = this.state,
|
|
1774
|
+
metricCalculator = _this$state7.metricCalculator,
|
|
1775
|
+
metrics = _this$state7.metrics;
|
|
1757
1776
|
assertNotNull(metrics);
|
|
1758
1777
|
var metricState = this.getMetricState();
|
|
1759
1778
|
assertNotNull(metricState);
|
|
@@ -1773,16 +1792,16 @@ class IrisGrid extends Component {
|
|
|
1773
1792
|
}
|
|
1774
1793
|
hideColumnByVisibleIndex(columnVisibleIndex) {
|
|
1775
1794
|
var _this$grid5;
|
|
1776
|
-
var _this$
|
|
1777
|
-
metricCalculator = _this$
|
|
1778
|
-
movedColumns = _this$
|
|
1795
|
+
var _this$state8 = this.state,
|
|
1796
|
+
metricCalculator = _this$state8.metricCalculator,
|
|
1797
|
+
movedColumns = _this$state8.movedColumns;
|
|
1779
1798
|
metricCalculator.setColumnWidth(GridUtils.getModelIndex(columnVisibleIndex, movedColumns), 0);
|
|
1780
1799
|
(_this$grid5 = this.grid) === null || _this$grid5 === void 0 || _this$grid5.forceUpdate();
|
|
1781
1800
|
}
|
|
1782
1801
|
freezeColumnByColumnName(columnName) {
|
|
1783
|
-
var _this$
|
|
1784
|
-
frozenColumns = _this$
|
|
1785
|
-
movedColumns = _this$
|
|
1802
|
+
var _this$state9 = this.state,
|
|
1803
|
+
frozenColumns = _this$state9.frozenColumns,
|
|
1804
|
+
movedColumns = _this$state9.movedColumns;
|
|
1786
1805
|
var model = this.props.model;
|
|
1787
1806
|
log.debug2('freezing column', columnName);
|
|
1788
1807
|
var allFrozenColumns = frozenColumns == null ? new Set(model.frozenColumns) : new Set(frozenColumns);
|
|
@@ -1797,9 +1816,9 @@ class IrisGrid extends Component {
|
|
|
1797
1816
|
});
|
|
1798
1817
|
}
|
|
1799
1818
|
unFreezeColumnByColumnName(columnName) {
|
|
1800
|
-
var _this$
|
|
1801
|
-
frozenColumns = _this$
|
|
1802
|
-
movedColumns = _this$
|
|
1819
|
+
var _this$state0 = this.state,
|
|
1820
|
+
frozenColumns = _this$state0.frozenColumns,
|
|
1821
|
+
movedColumns = _this$state0.movedColumns;
|
|
1803
1822
|
var model = this.props.model;
|
|
1804
1823
|
log.debug2('unfreezing column', columnName);
|
|
1805
1824
|
var allFrozenColumns = frozenColumns == null ? new Set(model.frozenColumns) : new Set(frozenColumns);
|
|
@@ -1849,9 +1868,9 @@ class IrisGrid extends Component {
|
|
|
1849
1868
|
}
|
|
1850
1869
|
handleColumnVisibilityChanged(modelIndexes, isVisible) {
|
|
1851
1870
|
var _this$grid6;
|
|
1852
|
-
var _this$
|
|
1853
|
-
metricCalculator = _this$
|
|
1854
|
-
metrics = _this$
|
|
1871
|
+
var _this$state1 = this.state,
|
|
1872
|
+
metricCalculator = _this$state1.metricCalculator,
|
|
1873
|
+
metrics = _this$state1.metrics;
|
|
1855
1874
|
assertNotNull(metrics);
|
|
1856
1875
|
if (isVisible) {
|
|
1857
1876
|
modelIndexes.forEach(modelIndex => {
|
|
@@ -1930,9 +1949,9 @@ class IrisGrid extends Component {
|
|
|
1930
1949
|
}
|
|
1931
1950
|
handleViewportUpdated() {
|
|
1932
1951
|
var model = this.props.model;
|
|
1933
|
-
var _this$
|
|
1934
|
-
loadingText = _this$
|
|
1935
|
-
loadingSpinnerShown = _this$
|
|
1952
|
+
var _this$state10 = this.state,
|
|
1953
|
+
loadingText = _this$state10.loadingText,
|
|
1954
|
+
loadingSpinnerShown = _this$state10.loadingSpinnerShown;
|
|
1936
1955
|
var loadingMessage = 'Waiting for viewport...';
|
|
1937
1956
|
|
|
1938
1957
|
// pending and no timer already exists
|
|
@@ -1977,7 +1996,7 @@ class IrisGrid extends Component {
|
|
|
1977
1996
|
if (model.isColumnSortable(columnIndex)) {
|
|
1978
1997
|
var currentSorts = this.state.sorts;
|
|
1979
1998
|
var sorts = TableUtils.toggleSortForColumn(currentSorts, model.columns, modelColumn, addToExisting);
|
|
1980
|
-
this.
|
|
1999
|
+
this.requestSortsChange(sorts);
|
|
1981
2000
|
} else {
|
|
1982
2001
|
log.debug('Column type was not sortable', model.columns[columnIndex]);
|
|
1983
2002
|
}
|
|
@@ -1990,6 +2009,15 @@ class IrisGrid extends Component {
|
|
|
1990
2009
|
});
|
|
1991
2010
|
(_this$grid0 = this.grid) === null || _this$grid0 === void 0 || _this$grid0.forceUpdate();
|
|
1992
2011
|
}
|
|
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
|
+
}
|
|
1993
2021
|
updateQuickFilters(quickFilters) {
|
|
1994
2022
|
var _this$grid1;
|
|
1995
2023
|
var currentQuickFilters = this.state.quickFilters;
|
|
@@ -2008,27 +2036,31 @@ class IrisGrid extends Component {
|
|
|
2008
2036
|
});
|
|
2009
2037
|
(_this$grid1 = this.grid) === null || _this$grid1 === void 0 || _this$grid1.forceUpdate();
|
|
2010
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
|
+
}
|
|
2011
2048
|
sortColumn(modelColumn) {
|
|
2012
|
-
var _this$grid10;
|
|
2013
2049
|
var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TableUtils.sortDirection.none;
|
|
2014
2050
|
var isAbs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
2015
2051
|
var addToExisting = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
2016
2052
|
assertNotNull(modelColumn);
|
|
2017
2053
|
var model = this.props.model;
|
|
2018
2054
|
var sorts = TableUtils.sortColumn(model.sort, model.columns, modelColumn, direction, isAbs, addToExisting);
|
|
2019
|
-
this.
|
|
2020
|
-
this.setState({
|
|
2021
|
-
sorts
|
|
2022
|
-
});
|
|
2023
|
-
(_this$grid10 = this.grid) === null || _this$grid10 === void 0 || _this$grid10.forceUpdate();
|
|
2055
|
+
this.requestSortsChange(sorts);
|
|
2024
2056
|
}
|
|
2025
2057
|
reverse(reverse) {
|
|
2026
|
-
var _this$
|
|
2058
|
+
var _this$grid10;
|
|
2027
2059
|
this.startLoading('Reversing...');
|
|
2028
2060
|
this.setState({
|
|
2029
2061
|
reverse
|
|
2030
2062
|
});
|
|
2031
|
-
(_this$
|
|
2063
|
+
(_this$grid10 = this.grid) === null || _this$grid10 === void 0 || _this$grid10.forceUpdate();
|
|
2032
2064
|
}
|
|
2033
2065
|
isReversible() {
|
|
2034
2066
|
var model = this.props.model;
|
|
@@ -2061,15 +2093,15 @@ class IrisGrid extends Component {
|
|
|
2061
2093
|
this.focusFilterBar(columnIndex);
|
|
2062
2094
|
}
|
|
2063
2095
|
} else {
|
|
2064
|
-
var _this$
|
|
2065
|
-
(_this$
|
|
2096
|
+
var _this$grid11;
|
|
2097
|
+
(_this$grid11 = this.grid) === null || _this$grid11 === void 0 || _this$grid11.focus();
|
|
2066
2098
|
}
|
|
2067
2099
|
}
|
|
2068
2100
|
isTableSearchAvailable() {
|
|
2069
2101
|
var _model$layoutHints3, _dh$SearchDisplayMode, _dh$SearchDisplayMode2;
|
|
2070
|
-
var _this$
|
|
2071
|
-
model = _this$
|
|
2072
|
-
canToggleSearch = _this$
|
|
2102
|
+
var _this$props8 = this.props,
|
|
2103
|
+
model = _this$props8.model,
|
|
2104
|
+
canToggleSearch = _this$props8.canToggleSearch;
|
|
2073
2105
|
var dh = model.dh;
|
|
2074
2106
|
var searchDisplayMode = model === null || model === void 0 || (_model$layoutHints3 = model.layoutHints) === null || _model$layoutHints3 === void 0 ? void 0 : _model$layoutHints3.searchDisplayMode;
|
|
2075
2107
|
if (searchDisplayMode === ((_dh$SearchDisplayMode = dh.SearchDisplayMode) === null || _dh$SearchDisplayMode === void 0 ? void 0 : _dh$SearchDisplayMode.SEARCH_DISPLAY_HIDE)) {
|
|
@@ -2094,13 +2126,13 @@ class IrisGrid extends Component {
|
|
|
2094
2126
|
var _this$crossColumnRef2;
|
|
2095
2127
|
(_this$crossColumnRef2 = this.crossColumnRef) === null || _this$crossColumnRef2 === void 0 || _this$crossColumnRef2.current.focus();
|
|
2096
2128
|
} else {
|
|
2097
|
-
var _this$
|
|
2098
|
-
(_this$
|
|
2129
|
+
var _this$grid12;
|
|
2130
|
+
(_this$grid12 = this.grid) === null || _this$grid12 === void 0 || _this$grid12.focus();
|
|
2099
2131
|
}
|
|
2100
2132
|
});
|
|
2101
2133
|
}
|
|
2102
2134
|
toggleGotoRow() {
|
|
2103
|
-
var _this$
|
|
2135
|
+
var _this$grid13, _this$grid14;
|
|
2104
2136
|
var row = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
2105
2137
|
var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
2106
2138
|
var columnName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
@@ -2120,8 +2152,8 @@ class IrisGrid extends Component {
|
|
|
2120
2152
|
(_this$gotoRowRef$curr = this.gotoRowRef.current) === null || _this$gotoRowRef$curr === void 0 || _this$gotoRowRef$curr.focus();
|
|
2121
2153
|
return;
|
|
2122
2154
|
}
|
|
2123
|
-
var cursorRow = (_this$
|
|
2124
|
-
var cursorColumn = (_this$
|
|
2155
|
+
var cursorRow = (_this$grid13 = this.grid) === null || _this$grid13 === void 0 ? void 0 : _this$grid13.state.cursorRow;
|
|
2156
|
+
var cursorColumn = (_this$grid14 = this.grid) === null || _this$grid14 === void 0 ? void 0 : _this$grid14.state.cursorColumn;
|
|
2125
2157
|
if (cursorRow == null || cursorColumn == null) {
|
|
2126
2158
|
// if a cell is not selected / grid is not rendered
|
|
2127
2159
|
this.setState({
|
|
@@ -2266,7 +2298,6 @@ class IrisGrid extends Component {
|
|
|
2266
2298
|
this.setAdvancedFilter(index, filter, options);
|
|
2267
2299
|
}
|
|
2268
2300
|
handleAdvancedFilterSortChange(column, direction) {
|
|
2269
|
-
var _this$grid16;
|
|
2270
2301
|
var addToExisting = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
2271
2302
|
var model = this.props.model;
|
|
2272
2303
|
var columnIndex = model.getColumnIndexByName(column.name);
|
|
@@ -2283,19 +2314,15 @@ class IrisGrid extends Component {
|
|
|
2283
2314
|
}
|
|
2284
2315
|
var sorts = TableUtils.setSortForColumn(model.sort, columnName, newSort, addToExisting);
|
|
2285
2316
|
log.info('Setting table sorts', sorts);
|
|
2286
|
-
this.
|
|
2287
|
-
this.setState({
|
|
2288
|
-
sorts
|
|
2289
|
-
});
|
|
2290
|
-
(_this$grid16 = this.grid) === null || _this$grid16 === void 0 || _this$grid16.forceUpdate();
|
|
2317
|
+
this.requestSortsChange(sorts);
|
|
2291
2318
|
}
|
|
2292
2319
|
handleAdvancedFilterDone() {
|
|
2293
|
-
var _this$
|
|
2294
|
-
(_this$
|
|
2320
|
+
var _this$grid15;
|
|
2321
|
+
(_this$grid15 = this.grid) === null || _this$grid15 === void 0 || _this$grid15.focus();
|
|
2295
2322
|
}
|
|
2296
2323
|
handleAdvancedFilterToggleMaximize(column) {
|
|
2297
|
-
this.setState(
|
|
2298
|
-
var maximizedAdvancedFilter =
|
|
2324
|
+
this.setState(_ref12 => {
|
|
2325
|
+
var maximizedAdvancedFilter = _ref12.maximizedAdvancedFilter;
|
|
2299
2326
|
return {
|
|
2300
2327
|
maximizedAdvancedFilter: maximizedAdvancedFilter === column ? null : column
|
|
2301
2328
|
};
|
|
@@ -2321,9 +2348,9 @@ class IrisGrid extends Component {
|
|
|
2321
2348
|
}
|
|
2322
2349
|
handleAdvancedMenuClosed(columnIndex) {
|
|
2323
2350
|
var _this$filterInputRef;
|
|
2324
|
-
var _this$
|
|
2325
|
-
focusedFilterBarColumn = _this$
|
|
2326
|
-
isFilterBarShown = _this$
|
|
2351
|
+
var _this$state11 = this.state,
|
|
2352
|
+
focusedFilterBarColumn = _this$state11.focusedFilterBarColumn,
|
|
2353
|
+
isFilterBarShown = _this$state11.isFilterBarShown;
|
|
2327
2354
|
if (isFilterBarShown && focusedFilterBarColumn === columnIndex && ((_this$filterInputRef = this.filterInputRef) === null || _this$filterInputRef === void 0 ? void 0 : _this$filterInputRef.current) !== null) {
|
|
2328
2355
|
var _this$filterInputRef2;
|
|
2329
2356
|
(_this$filterInputRef2 = this.filterInputRef) === null || _this$filterInputRef2 === void 0 || _this$filterInputRef2.current.focus();
|
|
@@ -2348,9 +2375,9 @@ class IrisGrid extends Component {
|
|
|
2348
2375
|
// TODO: IDS-4242 Update Chart Preview
|
|
2349
2376
|
}
|
|
2350
2377
|
handleChartCreate(settings) {
|
|
2351
|
-
var _this$
|
|
2352
|
-
model = _this$
|
|
2353
|
-
onCreateChart = _this$
|
|
2378
|
+
var _this$props9 = this.props,
|
|
2379
|
+
model = _this$props9.model,
|
|
2380
|
+
onCreateChart = _this$props9.onCreateChart;
|
|
2354
2381
|
onCreateChart(settings, model);
|
|
2355
2382
|
}
|
|
2356
2383
|
handleGridError(error) {
|
|
@@ -2363,29 +2390,23 @@ class IrisGrid extends Component {
|
|
|
2363
2390
|
});
|
|
2364
2391
|
}
|
|
2365
2392
|
handleFilterBarChange(value) {
|
|
2366
|
-
this.
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
this.applyQuickFilter(modelIndex, value, newQuickFilters);
|
|
2377
|
-
}
|
|
2378
|
-
return {
|
|
2379
|
-
quickFilters: newQuickFilters
|
|
2380
|
-
};
|
|
2381
|
-
});
|
|
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);
|
|
2382
2403
|
}
|
|
2383
2404
|
handleFilterBarDone() {
|
|
2384
2405
|
var setGridFocus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
2385
2406
|
var defocusInput = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2386
2407
|
if (setGridFocus) {
|
|
2387
|
-
var _this$
|
|
2388
|
-
(_this$
|
|
2408
|
+
var _this$grid16;
|
|
2409
|
+
(_this$grid16 = this.grid) === null || _this$grid16 === void 0 || _this$grid16.focus();
|
|
2389
2410
|
}
|
|
2390
2411
|
if (defocusInput) {
|
|
2391
2412
|
this.setState({
|
|
@@ -2422,9 +2443,9 @@ class IrisGrid extends Component {
|
|
|
2422
2443
|
handleColumnAlignmentChange(modelIndex, alignment) {
|
|
2423
2444
|
var model = this.props.model;
|
|
2424
2445
|
var column = model.columns[modelIndex];
|
|
2425
|
-
this.setState(
|
|
2426
|
-
var
|
|
2427
|
-
columnAlignmentMap =
|
|
2446
|
+
this.setState(_ref13 => {
|
|
2447
|
+
var _ref13$columnAlignmen = _ref13.columnAlignmentMap,
|
|
2448
|
+
columnAlignmentMap = _ref13$columnAlignmen === void 0 ? EMPTY_MAP : _ref13$columnAlignmen;
|
|
2428
2449
|
var newColumnAlignmentMap = new Map(columnAlignmentMap);
|
|
2429
2450
|
if (alignment != null) {
|
|
2430
2451
|
newColumnAlignmentMap.set(column.name, alignment);
|
|
@@ -2449,8 +2470,8 @@ class IrisGrid extends Component {
|
|
|
2449
2470
|
});
|
|
2450
2471
|
}
|
|
2451
2472
|
handleMenuBack() {
|
|
2452
|
-
this.setState(
|
|
2453
|
-
var openOptions =
|
|
2473
|
+
this.setState(_ref14 => {
|
|
2474
|
+
var openOptions = _ref14.openOptions;
|
|
2454
2475
|
var newOptions = [...openOptions];
|
|
2455
2476
|
newOptions.pop();
|
|
2456
2477
|
return {
|
|
@@ -2459,21 +2480,21 @@ class IrisGrid extends Component {
|
|
|
2459
2480
|
});
|
|
2460
2481
|
}
|
|
2461
2482
|
handleMenuSelect(option) {
|
|
2462
|
-
this.setState(
|
|
2463
|
-
var openOptions =
|
|
2483
|
+
this.setState(_ref15 => {
|
|
2484
|
+
var openOptions = _ref15.openOptions;
|
|
2464
2485
|
return {
|
|
2465
2486
|
openOptions: [...openOptions, option]
|
|
2466
2487
|
};
|
|
2467
2488
|
});
|
|
2468
2489
|
}
|
|
2469
2490
|
handleRequestFailed(event) {
|
|
2470
|
-
var
|
|
2471
|
-
error =
|
|
2491
|
+
var _ref16 = event,
|
|
2492
|
+
error = _ref16.detail;
|
|
2472
2493
|
log.error('request failed:', error);
|
|
2473
2494
|
this.stopLoading();
|
|
2474
|
-
var _this$
|
|
2475
|
-
partitionConfig = _this$
|
|
2476
|
-
conditionalFormatEditIndex = _this$
|
|
2495
|
+
var _this$state13 = this.state,
|
|
2496
|
+
partitionConfig = _this$state13.partitionConfig,
|
|
2497
|
+
conditionalFormatEditIndex = _this$state13.conditionalFormatEditIndex;
|
|
2477
2498
|
if (isMissingPartitionError(error) && partitionConfig != null) {
|
|
2478
2499
|
// We'll try loading the initial partition again
|
|
2479
2500
|
this.startLoading('Reloading partition...', {
|
|
@@ -2512,11 +2533,11 @@ class IrisGrid extends Component {
|
|
|
2512
2533
|
* pending operations into a single scrim).
|
|
2513
2534
|
*/
|
|
2514
2535
|
handlePending(event) {
|
|
2515
|
-
var
|
|
2516
|
-
detail =
|
|
2517
|
-
var
|
|
2518
|
-
text =
|
|
2519
|
-
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;
|
|
2520
2541
|
if (this.loadingScrimStartTime == null) {
|
|
2521
2542
|
this.startLoading(text !== null && text !== void 0 ? text : 'Loading...', _objectSpread({
|
|
2522
2543
|
loadingCancelShown: false
|
|
@@ -2543,21 +2564,21 @@ class IrisGrid extends Component {
|
|
|
2543
2564
|
this.stopLoading();
|
|
2544
2565
|
}
|
|
2545
2566
|
handleUpdate() {
|
|
2546
|
-
var _this$
|
|
2567
|
+
var _this$grid17;
|
|
2547
2568
|
log.debug2('Received model update');
|
|
2548
|
-
var _this$
|
|
2549
|
-
advancedFilters = _this$
|
|
2550
|
-
aggregationSettings = _this$
|
|
2551
|
-
conditionalFormats = _this$
|
|
2552
|
-
conditionalFormatEditIndex = _this$
|
|
2553
|
-
conditionalFormatPreview = _this$
|
|
2554
|
-
customColumns = _this$
|
|
2555
|
-
quickFilters = _this$
|
|
2556
|
-
reverse = _this$
|
|
2557
|
-
rollupConfig = _this$
|
|
2558
|
-
searchFilter = _this$
|
|
2559
|
-
selectDistinctColumns = _this$
|
|
2560
|
-
sorts = _this$
|
|
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;
|
|
2561
2582
|
var config = {
|
|
2562
2583
|
advancedFilters,
|
|
2563
2584
|
aggregationSettings,
|
|
@@ -2577,7 +2598,7 @@ class IrisGrid extends Component {
|
|
|
2577
2598
|
} else {
|
|
2578
2599
|
this.lastLoadedConfig = null;
|
|
2579
2600
|
}
|
|
2580
|
-
(_this$
|
|
2601
|
+
(_this$grid17 = this.grid) === null || _this$grid17 === void 0 || _this$grid17.forceUpdate();
|
|
2581
2602
|
this.stopLoading();
|
|
2582
2603
|
}
|
|
2583
2604
|
handleTableChanged() {
|
|
@@ -2605,11 +2626,11 @@ class IrisGrid extends Component {
|
|
|
2605
2626
|
});
|
|
2606
2627
|
}
|
|
2607
2628
|
handleViewChanged(metrics) {
|
|
2608
|
-
var _this$grid$state, _this$
|
|
2629
|
+
var _this$grid$state, _this$grid18;
|
|
2609
2630
|
var model = this.props.model;
|
|
2610
|
-
var
|
|
2611
|
-
|
|
2612
|
-
selectionEndRow =
|
|
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;
|
|
2613
2634
|
var pendingRowCount = 0;
|
|
2614
2635
|
if (isEditableGridModel(model) && model.isEditable) {
|
|
2615
2636
|
assertNotNull(metrics);
|
|
@@ -2674,8 +2695,8 @@ class IrisGrid extends Component {
|
|
|
2674
2695
|
// Parsing them again causes a loop with undo/redo that makes it unusable
|
|
2675
2696
|
columnHeaderGroups: columnHeaderGroups.every(group => isColumnHeaderGroup(group) && group.isValid()) ? columnHeaderGroups : IrisGridUtils.parseColumnHeaderGroups(model, columnHeaderGroups).groups
|
|
2676
2697
|
}, () => {
|
|
2677
|
-
var _this$
|
|
2678
|
-
return (_this$
|
|
2698
|
+
var _this$grid19;
|
|
2699
|
+
return (_this$grid19 = this.grid) === null || _this$grid19 === void 0 ? void 0 : _this$grid19.forceUpdate();
|
|
2679
2700
|
});
|
|
2680
2701
|
}
|
|
2681
2702
|
handleTooltipRef(tooltip) {
|
|
@@ -2693,9 +2714,9 @@ class IrisGrid extends Component {
|
|
|
2693
2714
|
}
|
|
2694
2715
|
handleConditionalFormatCreate() {
|
|
2695
2716
|
log.debug('Create new conditional format');
|
|
2696
|
-
var _this$
|
|
2697
|
-
openOptions = _this$
|
|
2698
|
-
conditionalFormats = _this$
|
|
2717
|
+
var _this$state15 = this.state,
|
|
2718
|
+
openOptions = _this$state15.openOptions,
|
|
2719
|
+
conditionalFormats = _this$state15.conditionalFormats;
|
|
2699
2720
|
this.setState({
|
|
2700
2721
|
openOptions: [...openOptions, {
|
|
2701
2722
|
type: OptionType.CONDITIONAL_FORMATTING_EDIT,
|
|
@@ -2708,9 +2729,9 @@ class IrisGrid extends Component {
|
|
|
2708
2729
|
}
|
|
2709
2730
|
handleConditionalFormatEdit(index) {
|
|
2710
2731
|
log.debug('Edit conditional format', index);
|
|
2711
|
-
var _this$
|
|
2712
|
-
openOptions = _this$
|
|
2713
|
-
conditionalFormats = _this$
|
|
2732
|
+
var _this$state16 = this.state,
|
|
2733
|
+
openOptions = _this$state16.openOptions,
|
|
2734
|
+
conditionalFormats = _this$state16.conditionalFormats;
|
|
2714
2735
|
this.setState({
|
|
2715
2736
|
openOptions: [...openOptions, {
|
|
2716
2737
|
type: OptionType.CONDITIONAL_FORMATTING_EDIT,
|
|
@@ -2749,12 +2770,12 @@ class IrisGrid extends Component {
|
|
|
2749
2770
|
handleUpdateCustomColumns(customColumns) {
|
|
2750
2771
|
log.info("handleUpdateCustomColumns:", customColumns);
|
|
2751
2772
|
var model = this.props.model;
|
|
2752
|
-
var _this$
|
|
2753
|
-
movedColumns = _this$
|
|
2754
|
-
sorts = _this$
|
|
2755
|
-
quickFilters = _this$
|
|
2756
|
-
advancedFilters = _this$
|
|
2757
|
-
selectDistinctColumns = _this$
|
|
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;
|
|
2758
2779
|
var columns = model.columns;
|
|
2759
2780
|
var oldCustomColumns = model.customColumns.map(customColumn => "".concat(customColumn));
|
|
2760
2781
|
var removedColumnNames = IrisGridUtils.getRemovedCustomColumnNames(oldCustomColumns, customColumns);
|
|
@@ -2766,16 +2787,18 @@ class IrisGrid extends Component {
|
|
|
2766
2787
|
var newSelectDistinctColumns = IrisGridUtils.removeColumnsFromSelectDistinctColumns(selectDistinctColumns, removedColumnNames);
|
|
2767
2788
|
if (newSorts.length !== sorts.length) {
|
|
2768
2789
|
log.debug('removing sorts from removed custom columns...');
|
|
2769
|
-
this.
|
|
2770
|
-
sorts: newSorts
|
|
2771
|
-
});
|
|
2790
|
+
this.requestSortsChange(newSorts);
|
|
2772
2791
|
}
|
|
2773
2792
|
if (newQuickFilters.size !== quickFilters.size || newAdvancedFilters.size !== advancedFilters.size) {
|
|
2774
2793
|
log.debug("removing filters from removed custom columns...");
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
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
|
+
}
|
|
2779
2802
|
}
|
|
2780
2803
|
if (!deepEqual(movedColumns, newMovedColumns)) {
|
|
2781
2804
|
log.debug("change moved columns for removed custom columns", newMovedColumns);
|
|
@@ -2862,7 +2885,7 @@ class IrisGrid extends Component {
|
|
|
2862
2885
|
return this.discardPending();
|
|
2863
2886
|
}
|
|
2864
2887
|
handlePendingDataUpdated() {
|
|
2865
|
-
var _this$
|
|
2888
|
+
var _this$grid20;
|
|
2866
2889
|
log.debug('pending data updated');
|
|
2867
2890
|
var model = this.props.model;
|
|
2868
2891
|
var pendingDataMap = model.pendingDataMap,
|
|
@@ -2872,13 +2895,13 @@ class IrisGrid extends Component {
|
|
|
2872
2895
|
pendingDataErrors,
|
|
2873
2896
|
pendingSaveError: null
|
|
2874
2897
|
});
|
|
2875
|
-
(_this$
|
|
2898
|
+
(_this$grid20 = this.grid) === null || _this$grid20 === void 0 || _this$grid20.forceUpdate();
|
|
2876
2899
|
}
|
|
2877
2900
|
handleResizeColumn(modelIndex) {
|
|
2878
|
-
var _this$
|
|
2879
|
-
var _this$
|
|
2880
|
-
metrics = _this$
|
|
2881
|
-
metricCalculator = _this$
|
|
2901
|
+
var _this$grid21;
|
|
2902
|
+
var _this$state18 = this.state,
|
|
2903
|
+
metrics = _this$state18.metrics,
|
|
2904
|
+
metricCalculator = _this$state18.metricCalculator;
|
|
2882
2905
|
if (!metrics) throw new Error('Metrics not set');
|
|
2883
2906
|
var contentWidth = getOrThrow(metrics.contentColumnWidths, modelIndex);
|
|
2884
2907
|
var userWidths = metricCalculator.getUserColumnWidths();
|
|
@@ -2888,23 +2911,23 @@ class IrisGrid extends Component {
|
|
|
2888
2911
|
} else {
|
|
2889
2912
|
metricCalculator.setColumnWidth(modelIndex, contentWidth);
|
|
2890
2913
|
}
|
|
2891
|
-
(_this$
|
|
2914
|
+
(_this$grid21 = this.grid) === null || _this$grid21 === void 0 || _this$grid21.forceUpdate();
|
|
2892
2915
|
}
|
|
2893
2916
|
handleResizeAllColumns() {
|
|
2894
|
-
var _this$
|
|
2895
|
-
var _this$
|
|
2896
|
-
metrics = _this$
|
|
2897
|
-
metricCalculator = _this$
|
|
2917
|
+
var _this$grid22;
|
|
2918
|
+
var _this$state19 = this.state,
|
|
2919
|
+
metrics = _this$state19.metrics,
|
|
2920
|
+
metricCalculator = _this$state19.metricCalculator;
|
|
2898
2921
|
if (!metrics) throw new Error('Metrics not set');
|
|
2899
2922
|
var allColumns = [...metrics.allColumnWidths.entries()];
|
|
2900
|
-
var visibleColumns = allColumns.filter(
|
|
2901
|
-
var
|
|
2902
|
-
_ =
|
|
2903
|
-
width =
|
|
2923
|
+
var visibleColumns = allColumns.filter(_ref20 => {
|
|
2924
|
+
var _ref21 = _slicedToArray(_ref20, 2),
|
|
2925
|
+
_ = _ref21[0],
|
|
2926
|
+
width = _ref21[1];
|
|
2904
2927
|
return width !== 0;
|
|
2905
|
-
}).map(
|
|
2906
|
-
var
|
|
2907
|
-
modelIndex =
|
|
2928
|
+
}).map(_ref22 => {
|
|
2929
|
+
var _ref23 = _slicedToArray(_ref22, 1),
|
|
2930
|
+
modelIndex = _ref23[0];
|
|
2908
2931
|
return modelIndex;
|
|
2909
2932
|
});
|
|
2910
2933
|
var contentWidths = metrics.contentColumnWidths;
|
|
@@ -2926,7 +2949,7 @@ class IrisGrid extends Component {
|
|
|
2926
2949
|
metricCalculator.setColumnWidth(_modelIndex, _contentWidth);
|
|
2927
2950
|
}
|
|
2928
2951
|
}
|
|
2929
|
-
(_this$
|
|
2952
|
+
(_this$grid22 = this.grid) === null || _this$grid22 === void 0 || _this$grid22.forceUpdate();
|
|
2930
2953
|
}
|
|
2931
2954
|
|
|
2932
2955
|
/**
|
|
@@ -2967,8 +2990,8 @@ class IrisGrid extends Component {
|
|
|
2967
2990
|
if (shouldStartLoading) {
|
|
2968
2991
|
this.startLoading("Aggregating ".concat(aggregation.operation, "..."));
|
|
2969
2992
|
}
|
|
2970
|
-
this.setState(
|
|
2971
|
-
var aggregationSettings =
|
|
2993
|
+
this.setState(_ref24 => {
|
|
2994
|
+
var aggregationSettings = _ref24.aggregationSettings;
|
|
2972
2995
|
return {
|
|
2973
2996
|
selectedAggregation: aggregation,
|
|
2974
2997
|
aggregationSettings: _objectSpread(_objectSpread({}, aggregationSettings), {}, {
|
|
@@ -3010,6 +3033,7 @@ class IrisGrid extends Component {
|
|
|
3010
3033
|
this.resetGridViewState();
|
|
3011
3034
|
this.clearAllFilters();
|
|
3012
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);
|
|
3013
3037
|
|
|
3014
3038
|
// Have to clear select distinct since rollup uses the original columns, not the current ones.
|
|
3015
3039
|
// IrisGridProxyModel has a check to prevent model update
|
|
@@ -3018,7 +3042,6 @@ class IrisGrid extends Component {
|
|
|
3018
3042
|
rollupConfig,
|
|
3019
3043
|
movedColumns: EMPTY_ARRAY,
|
|
3020
3044
|
frozenColumns: EMPTY_ARRAY,
|
|
3021
|
-
sorts: EMPTY_ARRAY,
|
|
3022
3045
|
reverse: false,
|
|
3023
3046
|
selectDistinctColumns: EMPTY_ARRAY
|
|
3024
3047
|
});
|
|
@@ -3030,10 +3053,10 @@ class IrisGrid extends Component {
|
|
|
3030
3053
|
this.clearAllFilters();
|
|
3031
3054
|
this.clearAllAggregations();
|
|
3032
3055
|
this.startLoading("Selecting distinct values in ".concat(columnNames.length > 0 ? columnNames.join(', ') : '', "..."));
|
|
3056
|
+
this.requestSortsChange(EMPTY_ARRAY);
|
|
3033
3057
|
this.setState({
|
|
3034
3058
|
selectDistinctColumns: columnNames,
|
|
3035
3059
|
movedColumns: [],
|
|
3036
|
-
sorts: [],
|
|
3037
3060
|
reverse: false
|
|
3038
3061
|
});
|
|
3039
3062
|
}
|
|
@@ -3072,8 +3095,8 @@ class IrisGrid extends Component {
|
|
|
3072
3095
|
*/
|
|
3073
3096
|
removeEmptyAggregations() {
|
|
3074
3097
|
log.debug('removeEmptyAggregations');
|
|
3075
|
-
this.setState(
|
|
3076
|
-
var aggregationSettings =
|
|
3098
|
+
this.setState(_ref25 => {
|
|
3099
|
+
var aggregationSettings = _ref25.aggregationSettings;
|
|
3077
3100
|
var aggregations = aggregationSettings.aggregations;
|
|
3078
3101
|
var newAggregations = aggregations.filter(a => a.selected.length > 0 || a.invert);
|
|
3079
3102
|
if (newAggregations.length !== aggregations.length) {
|
|
@@ -3248,11 +3271,11 @@ class IrisGrid extends Component {
|
|
|
3248
3271
|
onStateChange(irisGridState, gridState);
|
|
3249
3272
|
}
|
|
3250
3273
|
handleOverflowClose() {
|
|
3251
|
-
var _this$
|
|
3274
|
+
var _this$grid23;
|
|
3252
3275
|
this.setState({
|
|
3253
3276
|
showOverflowModal: false
|
|
3254
3277
|
});
|
|
3255
|
-
(_this$
|
|
3278
|
+
(_this$grid23 = this.grid) === null || _this$grid23 === void 0 || _this$grid23.focus(); // Focus on the grid after closing the overflow modal
|
|
3256
3279
|
}
|
|
3257
3280
|
handleOpenNoPastePermissionModal(errorMessage) {
|
|
3258
3281
|
this.setState({
|
|
@@ -3267,9 +3290,9 @@ class IrisGrid extends Component {
|
|
|
3267
3290
|
}
|
|
3268
3291
|
getColumnBoundingRect() {
|
|
3269
3292
|
var _this$gridWrapper2;
|
|
3270
|
-
var _this$
|
|
3271
|
-
metrics = _this$
|
|
3272
|
-
shownColumnTooltip = _this$
|
|
3293
|
+
var _this$state20 = this.state,
|
|
3294
|
+
metrics = _this$state20.metrics,
|
|
3295
|
+
shownColumnTooltip = _this$state20.shownColumnTooltip;
|
|
3273
3296
|
assertNotNull(metrics);
|
|
3274
3297
|
assertNotNull(shownColumnTooltip);
|
|
3275
3298
|
var gridRect = (_this$gridWrapper2 = this.gridWrapper) === null || _this$gridWrapper2 === void 0 ? void 0 : _this$gridWrapper2.getBoundingClientRect();
|
|
@@ -3322,22 +3345,22 @@ class IrisGrid extends Component {
|
|
|
3322
3345
|
gotoRowError: 'Invalid row index'
|
|
3323
3346
|
});
|
|
3324
3347
|
} else if (rowInt === 0) {
|
|
3325
|
-
var _this$
|
|
3348
|
+
var _this$grid24;
|
|
3326
3349
|
this.setState({
|
|
3327
3350
|
gotoRowError: '',
|
|
3328
3351
|
gotoValueError: ''
|
|
3329
3352
|
});
|
|
3330
|
-
(_this$
|
|
3353
|
+
(_this$grid24 = this.grid) === null || _this$grid24 === void 0 || _this$grid24.setFocusRow(0);
|
|
3331
3354
|
} else if (rowInt < 0) {
|
|
3332
|
-
var _this$
|
|
3355
|
+
var _this$grid25;
|
|
3333
3356
|
this.setState({
|
|
3334
3357
|
gotoRowError: '',
|
|
3335
3358
|
gotoValueError: ''
|
|
3336
3359
|
});
|
|
3337
|
-
(_this$
|
|
3360
|
+
(_this$grid25 = this.grid) === null || _this$grid25 === void 0 || _this$grid25.setFocusRow(rowInt + rowCount);
|
|
3338
3361
|
} else {
|
|
3339
|
-
var _this$
|
|
3340
|
-
(_this$
|
|
3362
|
+
var _this$grid26;
|
|
3363
|
+
(_this$grid26 = this.grid) === null || _this$grid26 === void 0 || _this$grid26.setFocusRow(rowInt - 1);
|
|
3341
3364
|
this.setState({
|
|
3342
3365
|
gotoRowError: '',
|
|
3343
3366
|
gotoValueError: ''
|
|
@@ -3435,12 +3458,12 @@ class IrisGrid extends Component {
|
|
|
3435
3458
|
});
|
|
3436
3459
|
}
|
|
3437
3460
|
handleGotoValueSelectedColumnNameChanged(columnName) {
|
|
3438
|
-
var _this$
|
|
3461
|
+
var _this$grid27;
|
|
3439
3462
|
var model = this.props.model;
|
|
3440
|
-
var cursorRow = (_this$
|
|
3441
|
-
var _this$
|
|
3442
|
-
prevColumnName = _this$
|
|
3443
|
-
gotoValueManuallyChanged = _this$
|
|
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;
|
|
3444
3467
|
if (cursorRow != null) {
|
|
3445
3468
|
var index = model.getColumnIndexByName(columnName);
|
|
3446
3469
|
var column = IrisGridUtils.getColumnByName(model.columns, columnName);
|
|
@@ -3493,7 +3516,7 @@ class IrisGrid extends Component {
|
|
|
3493
3516
|
* @returns The filter input field element or null if not applicable
|
|
3494
3517
|
*/
|
|
3495
3518
|
getFilterBarInput(metrics, metricCalculator, focusedFilterBarColumn, quickFilters, advancedFilters) {
|
|
3496
|
-
var _this$
|
|
3519
|
+
var _this$grid28;
|
|
3497
3520
|
if (metrics == null || focusedFilterBarColumn == null) {
|
|
3498
3521
|
return null;
|
|
3499
3522
|
}
|
|
@@ -3548,7 +3571,7 @@ class IrisGrid extends Component {
|
|
|
3548
3571
|
onChange: this.handleFilterBarChange,
|
|
3549
3572
|
onDone: this.handleFilterBarDone,
|
|
3550
3573
|
onTab: this.handleFilterBarTab,
|
|
3551
|
-
onContextMenu: (_this$
|
|
3574
|
+
onContextMenu: (_this$grid28 = this.grid) === null || _this$grid28 === void 0 ? void 0 : _this$grid28.handleContextMenu,
|
|
3552
3575
|
debounceMs: debounceMs,
|
|
3553
3576
|
value: value
|
|
3554
3577
|
}, focusedFilterBarColumn);
|
|
@@ -3557,95 +3580,95 @@ class IrisGrid extends Component {
|
|
|
3557
3580
|
var _rollupConfig$columns7,
|
|
3558
3581
|
_rollupConfig$columns8,
|
|
3559
3582
|
_this7 = this,
|
|
3560
|
-
_this$
|
|
3583
|
+
_this$grid29,
|
|
3561
3584
|
_openOptions;
|
|
3562
|
-
var _this$
|
|
3563
|
-
children = _this$
|
|
3564
|
-
customFilters = _this$
|
|
3565
|
-
getDownloadWorker = _this$
|
|
3566
|
-
isSelectingColumn = _this$
|
|
3567
|
-
isStuckToBottom = _this$
|
|
3568
|
-
isStuckToRight = _this$
|
|
3569
|
-
model = _this$
|
|
3570
|
-
name = _this$
|
|
3571
|
-
onlyFetchVisibleColumns = _this$
|
|
3572
|
-
alwaysFetchColumns = _this$
|
|
3573
|
-
advancedSettings = _this$
|
|
3574
|
-
onAdvancedSettingsChange = _this$
|
|
3575
|
-
canDownloadCsv = _this$
|
|
3576
|
-
onCreateChart = _this$
|
|
3577
|
-
transformTableOptions = _this$
|
|
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;
|
|
3578
3601
|
var cellInputRendererRegistry = this.context.cellInputRendererRegistry;
|
|
3579
|
-
var _this$
|
|
3580
|
-
metricCalculator = _this$
|
|
3581
|
-
metrics = _this$
|
|
3582
|
-
isFilterBarShown = _this$
|
|
3583
|
-
isSelectingPartition = _this$
|
|
3584
|
-
isMenuShown = _this$
|
|
3585
|
-
isReady = _this$
|
|
3586
|
-
copyOperation = _this$
|
|
3587
|
-
focusedFilterBarColumn = _this$
|
|
3588
|
-
loadingText = _this$
|
|
3589
|
-
loadingScrimProgress = _this$
|
|
3590
|
-
loadingSpinnerShown = _this$
|
|
3591
|
-
loadingCancelShown = _this$
|
|
3592
|
-
loadingBlocksGrid = _this$
|
|
3593
|
-
shownColumnTooltip = _this$
|
|
3594
|
-
hoverAdvancedFilter = _this$
|
|
3595
|
-
shownAdvancedFilter = _this$
|
|
3596
|
-
maximizedAdvancedFilter = _this$
|
|
3597
|
-
hoverSelectColumn = _this$
|
|
3598
|
-
quickFilters = _this$
|
|
3599
|
-
advancedFilters = _this$
|
|
3600
|
-
searchFilter = _this$
|
|
3601
|
-
selectDistinctColumns = _this$
|
|
3602
|
-
movedColumns = _this$
|
|
3603
|
-
movedRows = _this$
|
|
3604
|
-
formatter = _this$
|
|
3605
|
-
conditionalFormats = _this$
|
|
3606
|
-
conditionalFormatPreview = _this$
|
|
3607
|
-
conditionalFormatEditIndex = _this$
|
|
3608
|
-
conditionalFormatError = _this$
|
|
3609
|
-
columnAlignmentMap = _this$
|
|
3610
|
-
sorts = _this$
|
|
3611
|
-
reverse = _this$
|
|
3612
|
-
customColumns = _this$
|
|
3613
|
-
selectedRanges = _this$
|
|
3614
|
-
isTableDownloading = _this$
|
|
3615
|
-
tableDownloadStatus = _this$
|
|
3616
|
-
tableDownloadProgress = _this$
|
|
3617
|
-
tableDownloadEstimatedTime = _this$
|
|
3618
|
-
showSearchBar = _this$
|
|
3619
|
-
searchValue = _this$
|
|
3620
|
-
selectedSearchColumns = _this$
|
|
3621
|
-
invertSearchColumns = _this$
|
|
3622
|
-
aggregationSettings = _this$
|
|
3623
|
-
selectedAggregation = _this$
|
|
3624
|
-
rollupConfig = _this$
|
|
3625
|
-
openOptions = _this$
|
|
3626
|
-
pendingSavePromise = _this$
|
|
3627
|
-
pendingSaveError = _this$
|
|
3628
|
-
pendingRowCount = _this$
|
|
3629
|
-
pendingDataErrors = _this$
|
|
3630
|
-
pendingDataMap = _this$
|
|
3631
|
-
toastMessage = _this$
|
|
3632
|
-
frozenColumns = _this$
|
|
3633
|
-
columnHeaderGroups = _this$
|
|
3634
|
-
showOverflowModal = _this$
|
|
3635
|
-
showNoPastePermissionModal = _this$
|
|
3636
|
-
noPastePermissionError = _this$
|
|
3637
|
-
overflowText = _this$
|
|
3638
|
-
overflowButtonTooltipProps = _this$
|
|
3639
|
-
expandCellTooltipProps = _this$
|
|
3640
|
-
hoverTooltipProps = _this$
|
|
3641
|
-
isGotoShown = _this$
|
|
3642
|
-
gotoRow = _this$
|
|
3643
|
-
gotoRowError = _this$
|
|
3644
|
-
gotoValueError = _this$
|
|
3645
|
-
gotoValueSelectedColumnName = _this$
|
|
3646
|
-
gotoValue = _this$
|
|
3647
|
-
gotoValueSelectedFilter = _this$
|
|
3648
|
-
partitionConfig = _this$
|
|
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;
|
|
3649
3672
|
if (!isReady) {
|
|
3650
3673
|
return null;
|
|
3651
3674
|
}
|
|
@@ -3812,8 +3835,8 @@ class IrisGrid extends Component {
|
|
|
3812
3835
|
return 1; // continue
|
|
3813
3836
|
}
|
|
3814
3837
|
var advancedFilter = advancedFilters.get(modelColumn);
|
|
3815
|
-
var
|
|
3816
|
-
advancedFilterOptions =
|
|
3838
|
+
var _ref26 = advancedFilter || {},
|
|
3839
|
+
advancedFilterOptions = _ref26.options;
|
|
3817
3840
|
var sort = TableUtils.getSortForColumn(model.sort, column.name);
|
|
3818
3841
|
var sortDirection = sort ? sort.direction : null;
|
|
3819
3842
|
if (!isSortDirection(sortDirection)) {
|
|
@@ -4054,7 +4077,7 @@ class IrisGrid extends Component {
|
|
|
4054
4077
|
movedColumns: movedColumns,
|
|
4055
4078
|
customColumns: customColumns,
|
|
4056
4079
|
hiddenColumns: hiddenColumns,
|
|
4057
|
-
alwaysFetchColumns: this.getAlwaysFetchColumns(alwaysFetchColumns, model.columns, movedColumns, model.floatingLeftColumnCount, model.floatingRightColumnCount, (_this$
|
|
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),
|
|
4058
4081
|
formatColumns: this.getCachedPreviewFormatColumns(model.dh, model.columns, conditionalFormats, conditionalFormatPreview,
|
|
4059
4082
|
// Disable the preview format when we press Back on the format edit page
|
|
4060
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),
|
|
@@ -4204,8 +4227,12 @@ _defineProperty(IrisGrid, "defaultProps", {
|
|
|
4204
4227
|
partitions: undefined,
|
|
4205
4228
|
partitionConfig: undefined,
|
|
4206
4229
|
quickFilters: EMPTY_MAP,
|
|
4230
|
+
isQuickFiltersControlled: false,
|
|
4231
|
+
onQuickFiltersChange: undefined,
|
|
4207
4232
|
selectDistinctColumns: EMPTY_ARRAY,
|
|
4208
4233
|
sorts: EMPTY_ARRAY,
|
|
4234
|
+
isSortsControlled: false,
|
|
4235
|
+
onSortsChange: undefined,
|
|
4209
4236
|
reverse: false,
|
|
4210
4237
|
customColumns: EMPTY_ARRAY,
|
|
4211
4238
|
aggregationSettings: DEFAULT_AGGREGATION_SETTINGS,
|