@deephaven/iris-grid 0.15.2-beta.0 → 0.15.3-beta.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/AdvancedFilterCreator.d.ts +1 -2
- package/dist/AdvancedFilterCreator.d.ts.map +1 -1
- package/dist/AdvancedFilterCreator.js +20 -17
- package/dist/AdvancedFilterCreator.js.map +1 -1
- package/dist/AdvancedFilterCreatorFilterItem.d.ts.map +1 -1
- package/dist/AdvancedFilterCreatorFilterItem.js +10 -6
- package/dist/AdvancedFilterCreatorFilterItem.js.map +1 -1
- package/dist/AdvancedFilterCreatorSelectValue.d.ts +1 -2
- package/dist/AdvancedFilterCreatorSelectValue.d.ts.map +1 -1
- package/dist/AdvancedFilterCreatorSelectValue.js +1 -2
- package/dist/AdvancedFilterCreatorSelectValue.js.map +1 -1
- package/dist/AdvancedFilterCreatorSelectValueList.d.ts +1 -2
- package/dist/AdvancedFilterCreatorSelectValueList.d.ts.map +1 -1
- package/dist/AdvancedFilterCreatorSelectValueList.js +10 -10
- package/dist/AdvancedFilterCreatorSelectValueList.js.map +1 -1
- package/dist/ColumnHeaderGroup.d.ts +18 -0
- package/dist/ColumnHeaderGroup.d.ts.map +1 -0
- package/dist/ColumnHeaderGroup.js +51 -0
- package/dist/ColumnHeaderGroup.js.map +1 -0
- package/dist/IrisGrid.css +13 -5
- package/dist/IrisGrid.css.map +1 -1
- package/dist/IrisGrid.d.ts +9 -8
- package/dist/IrisGrid.d.ts.map +1 -1
- package/dist/IrisGrid.js +30 -21
- package/dist/IrisGrid.js.map +1 -1
- package/dist/IrisGridCellOverflowModal.d.ts.map +1 -1
- package/dist/IrisGridCellOverflowModal.js +29 -5
- package/dist/IrisGridCellOverflowModal.js.map +1 -1
- package/dist/IrisGridMetricCalculator.d.ts.map +1 -1
- package/dist/IrisGridMetricCalculator.js +2 -6
- package/dist/IrisGridMetricCalculator.js.map +1 -1
- package/dist/IrisGridPartitionSelector.d.ts +0 -1
- package/dist/IrisGridPartitionSelector.d.ts.map +1 -1
- package/dist/IrisGridProxyModel.d.ts +4 -0
- package/dist/IrisGridProxyModel.d.ts.map +1 -1
- package/dist/IrisGridProxyModel.js +16 -0
- package/dist/IrisGridProxyModel.js.map +1 -1
- package/dist/IrisGridRenderer.d.ts +10 -2
- package/dist/IrisGridRenderer.d.ts.map +1 -1
- package/dist/IrisGridRenderer.js +74 -22
- package/dist/IrisGridRenderer.js.map +1 -1
- package/dist/IrisGridTableModel.d.ts +1 -5
- package/dist/IrisGridTableModel.d.ts.map +1 -1
- package/dist/IrisGridTableModel.js +1 -45
- package/dist/IrisGridTableModel.js.map +1 -1
- package/dist/IrisGridTableModelTemplate.d.ts +25 -6
- package/dist/IrisGridTableModelTemplate.d.ts.map +1 -1
- package/dist/IrisGridTableModelTemplate.js +318 -7
- package/dist/IrisGridTableModelTemplate.js.map +1 -1
- package/dist/IrisGridTheme.js +1 -1
- package/dist/IrisGridTheme.js.map +1 -1
- package/dist/IrisGridTheme.module.css +1 -0
- package/dist/IrisGridTheme.module.css.map +1 -1
- package/dist/IrisGridUtils.d.ts +2 -2
- package/dist/IrisGridUtils.d.ts.map +1 -1
- package/dist/IrisGridUtils.js +42 -32
- package/dist/IrisGridUtils.js.map +1 -1
- package/dist/PartitionSelectorSearch.d.ts +0 -1
- package/dist/PartitionSelectorSearch.d.ts.map +1 -1
- package/dist/TableViewportUpdater.d.ts +0 -1
- package/dist/TableViewportUpdater.d.ts.map +1 -1
- package/dist/TreeTableViewportUpdater.d.ts +0 -1
- package/dist/TreeTableViewportUpdater.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridColumnTooltipMouseHandler.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridColumnTooltipMouseHandler.js +4 -12
- package/dist/mousehandlers/IrisGridColumnTooltipMouseHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts +16 -13
- package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.js +291 -227
- package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridFilterMouseHandler.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridFilterMouseHandler.js +14 -4
- package/dist/mousehandlers/IrisGridFilterMouseHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridSortMouseHandler.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridSortMouseHandler.js +4 -8
- package/dist/mousehandlers/IrisGridSortMouseHandler.js.map +1 -1
- package/dist/sidebar/RollupRows.d.ts +0 -1
- package/dist/sidebar/RollupRows.d.ts.map +1 -1
- package/dist/sidebar/TableSaver.d.ts +0 -1
- package/dist/sidebar/TableSaver.d.ts.map +1 -1
- package/dist/sidebar/VisibilityOrderingBuilder.d.ts +0 -1
- package/dist/sidebar/VisibilityOrderingBuilder.d.ts.map +1 -1
- package/package.json +16 -16
|
@@ -27,33 +27,41 @@ var CONTEXT_MENU_DATE_FORMAT = 'yyyy-MM-dd HH:mm:ss.SSSSSSSSS';
|
|
|
27
27
|
|
|
28
28
|
class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
29
29
|
/**
|
|
30
|
-
* Get filter condition for quick filter with
|
|
31
|
-
* returns new filter if
|
|
32
|
-
* if filters are additive, returns filter conditions combined with 'and'.
|
|
30
|
+
* Get filter condition for quick filter and combines with a new filter using the operator specified,
|
|
31
|
+
* returns new filter if no operator supplied.
|
|
33
32
|
* @param columnFilter
|
|
34
33
|
* @param newColumnFilter
|
|
35
|
-
* @param
|
|
34
|
+
* @param operator
|
|
36
35
|
*/
|
|
37
|
-
static getQuickFilterCondition(columnFilter, newColumnFilter) {
|
|
38
|
-
|
|
36
|
+
static getQuickFilterCondition(columnFilter, newColumnFilter, operator) {
|
|
37
|
+
if (columnFilter && operator === '&&') {
|
|
38
|
+
return columnFilter.and(newColumnFilter);
|
|
39
|
+
}
|
|
39
40
|
|
|
40
|
-
if (
|
|
41
|
-
return newColumnFilter;
|
|
41
|
+
if (columnFilter && operator === '||') {
|
|
42
|
+
return columnFilter.or(newColumnFilter);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
return
|
|
45
|
+
return newColumnFilter;
|
|
45
46
|
}
|
|
46
47
|
/**
|
|
47
|
-
* combines filter text with
|
|
48
|
+
* combines filter text with operator if declared
|
|
48
49
|
* @param filterText
|
|
49
50
|
* @param newFilterText
|
|
50
|
-
* @param
|
|
51
|
+
* @param operator
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
static getQuickFilterText(filterText, newFilterText, operator) {
|
|
56
|
+
return operator && filterText ? "".concat(filterText, " ").concat(operator, " ").concat(newFilterText) : newFilterText;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Converts operator to text string,
|
|
51
60
|
*/
|
|
52
61
|
|
|
53
62
|
|
|
54
|
-
static
|
|
55
|
-
|
|
56
|
-
return additive && filterText ? "".concat(filterText, " && ").concat(newFilterText) : newFilterText;
|
|
63
|
+
static getOperatorAsText(operator) {
|
|
64
|
+
return operator === '&&' ? 'And' : 'Or';
|
|
57
65
|
}
|
|
58
66
|
/**
|
|
59
67
|
* Gets an equality filter for the provided numeric value
|
|
@@ -196,7 +204,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
196
204
|
action: () => {
|
|
197
205
|
this.irisGrid.clearAllFilters();
|
|
198
206
|
},
|
|
199
|
-
disabled: !(quickFilters.size > 0 || advancedFilters.size > 0 || searchFilter
|
|
207
|
+
disabled: !(quickFilters.size > 0 || advancedFilters.size > 0 || searchFilter != null)
|
|
200
208
|
});
|
|
201
209
|
actions.push({
|
|
202
210
|
title: 'Sort by',
|
|
@@ -253,7 +261,9 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
253
261
|
title: 'Copy Column Name',
|
|
254
262
|
group: IrisGridContextMenuHandler.GROUP_COPY,
|
|
255
263
|
action: () => {
|
|
256
|
-
|
|
264
|
+
var _model$textForColumnH;
|
|
265
|
+
|
|
266
|
+
ContextActionUtils.copyToClipboard((_model$textForColumnH = model.textForColumnHeader(modelColumn)) !== null && _model$textForColumnH !== void 0 ? _model$textForColumnH : '').catch(e => log.error('Unable to copy header', e));
|
|
257
267
|
}
|
|
258
268
|
});
|
|
259
269
|
|
|
@@ -319,131 +329,121 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
319
329
|
showTimeZone: settings === null || settings === void 0 ? void 0 : settings.showTimeZone,
|
|
320
330
|
showTSeparator: settings === null || settings === void 0 ? void 0 : settings.showTSeparator,
|
|
321
331
|
defaultDateTimeFormatString: CONTEXT_MENU_DATE_FORMAT
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
if (column != null && rowIndex != null) {
|
|
325
|
-
if (model.isFilterable(modelColumn)) {
|
|
326
|
-
// cell data area contextmenu options
|
|
327
|
-
var filterMenu = {
|
|
328
|
-
title: 'Filter By Value',
|
|
329
|
-
icon: vsRemove,
|
|
330
|
-
iconColor: filterIconColor,
|
|
331
|
-
group: IrisGridContextMenuHandler.GROUP_FILTER,
|
|
332
|
-
order: 10,
|
|
333
|
-
actions: []
|
|
334
|
-
};
|
|
335
|
-
var andFilterMenu = {
|
|
336
|
-
title: 'Add Filter By Value',
|
|
337
|
-
icon: vsRemove,
|
|
338
|
-
iconColor: filterIconColor,
|
|
339
|
-
group: IrisGridContextMenuHandler.GROUP_FILTER,
|
|
340
|
-
order: 20,
|
|
341
|
-
actions: [],
|
|
342
|
-
disabled: !quickFilters.get(modelColumn)
|
|
343
|
-
};
|
|
344
|
-
var gotoRow = {
|
|
345
|
-
title: 'Go to',
|
|
346
|
-
shortcut: SHORTCUTS.TABLE.GOTO_ROW,
|
|
347
|
-
group: IrisGridContextMenuHandler.GROUP_GOTO,
|
|
348
|
-
order: 10,
|
|
349
|
-
action: () => this.irisGrid.toggleGotoRow("".concat(rowIndex + 1))
|
|
350
|
-
};
|
|
351
|
-
|
|
352
|
-
if (value != null) {
|
|
353
|
-
// Chars get treated like numbers in terms of which filters are available
|
|
354
|
-
if (TableUtils.isNumberType(column.type) || TableUtils.isCharType(column.type)) {
|
|
355
|
-
assertNotNull(modelColumn); // We want to show the full unformatted value if it's a number, so user knows which value they are matching
|
|
356
|
-
// If it's a Char we just show the char
|
|
357
|
-
|
|
358
|
-
var numberValueText = TableUtils.isCharType(column.type) ? String.fromCharCode(value) : "".concat(value);
|
|
359
|
-
filterMenu.actions = this.numberFilterActions(column, numberValueText, value, quickFilters.get(modelColumn));
|
|
360
|
-
andFilterMenu.actions = this.numberFilterActions(column, numberValueText, value, quickFilters.get(modelColumn), true);
|
|
361
|
-
} else if (TableUtils.isBooleanType(column.type)) {
|
|
362
|
-
filterMenu.actions = this.booleanFilterActions(column, valueText);
|
|
363
|
-
andFilterMenu.actions = this.booleanFilterActions(column, valueText, quickFilters.get(modelColumn), true);
|
|
364
|
-
} else if (TableUtils.isDateType(column.type)) {
|
|
365
|
-
var dateValueText = dateFilterFormatter.format(value);
|
|
366
|
-
var previewValue = previewFilterFormatter.format(value);
|
|
367
|
-
filterMenu.actions = this.dateFilterActions(column, dateValueText, previewValue, value);
|
|
368
|
-
andFilterMenu.actions = this.dateFilterActions(column, dateValueText, previewValue, value, quickFilters.get(modelColumn), true);
|
|
369
|
-
} else {
|
|
370
|
-
filterMenu.actions = this.stringFilterActions(column, valueText, value);
|
|
371
|
-
andFilterMenu.actions = this.stringFilterActions(column, valueText, value, quickFilters.get(modelColumn), true);
|
|
372
|
-
}
|
|
373
|
-
} else {
|
|
374
|
-
filterMenu.actions = this.nullFilterActions(column);
|
|
375
|
-
andFilterMenu.actions = this.nullFilterActions(column, quickFilters.get(modelColumn), true);
|
|
376
|
-
}
|
|
332
|
+
});
|
|
333
|
+
if (column == null || rowIndex == null) return actions; // grid data area context menu options
|
|
377
334
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
335
|
+
if (model.isFilterable(modelColumn)) {
|
|
336
|
+
// cell data area contextmenu options
|
|
337
|
+
var filterMenu = {
|
|
338
|
+
title: 'Filter By Value',
|
|
339
|
+
icon: vsRemove,
|
|
340
|
+
iconColor: filterIconColor,
|
|
341
|
+
group: IrisGridContextMenuHandler.GROUP_FILTER,
|
|
342
|
+
order: 10,
|
|
343
|
+
actions: []
|
|
344
|
+
};
|
|
381
345
|
|
|
382
|
-
|
|
383
|
-
|
|
346
|
+
if (value == null) {
|
|
347
|
+
if (quickFilters.get(modelColumn)) {
|
|
348
|
+
filterMenu.actions.push({
|
|
349
|
+
title: 'And',
|
|
350
|
+
actions: this.nullFilterActions(column, quickFilters.get(modelColumn), '&&'),
|
|
351
|
+
order: 2,
|
|
352
|
+
group: ContextActions.groups.high
|
|
353
|
+
});
|
|
384
354
|
}
|
|
385
355
|
|
|
386
|
-
actions.push(
|
|
387
|
-
}
|
|
356
|
+
filterMenu.actions.push(...this.nullFilterActions(column));
|
|
357
|
+
} else if (TableUtils.isBooleanType(column.type)) {
|
|
358
|
+
// boolean should have OR condition, and handles it's own null menu options
|
|
359
|
+
if (quickFilters.get(modelColumn)) {
|
|
360
|
+
filterMenu.actions.push({
|
|
361
|
+
title: 'Or',
|
|
362
|
+
actions: this.booleanFilterActions(column, valueText, quickFilters.get(modelColumn), '||'),
|
|
363
|
+
order: 2,
|
|
364
|
+
group: ContextActions.groups.high
|
|
365
|
+
});
|
|
366
|
+
}
|
|
388
367
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
} // data area, including blank space context menu options
|
|
368
|
+
filterMenu.actions.push(...this.booleanFilterActions(column, valueText));
|
|
369
|
+
} else if (TableUtils.isNumberType(column.type) || TableUtils.isCharType(column.type)) {
|
|
370
|
+
// Chars get treated like numbers in terms of which filters are available
|
|
371
|
+
assertNotNull(modelColumn); // We want to show the full unformatted value if it's a number, so user knows which value they are matching
|
|
372
|
+
// If it's a Char we just show the char
|
|
373
|
+
|
|
374
|
+
var numberValueText = TableUtils.isCharType(column.type) ? String.fromCharCode(value) : "".concat(value);
|
|
375
|
+
|
|
376
|
+
if (quickFilters.get(modelColumn)) {
|
|
377
|
+
filterMenu.actions.push({
|
|
378
|
+
title: 'And',
|
|
379
|
+
actions: this.numberFilterActions(column, numberValueText, value, quickFilters.get(modelColumn), '&&'),
|
|
380
|
+
order: 2,
|
|
381
|
+
group: ContextActions.groups.high
|
|
382
|
+
});
|
|
383
|
+
}
|
|
408
384
|
|
|
385
|
+
filterMenu.actions.push(...this.numberFilterActions(column, numberValueText, value, quickFilters.get(modelColumn)));
|
|
386
|
+
} else if (TableUtils.isDateType(column.type)) {
|
|
387
|
+
var dateValueText = dateFilterFormatter.format(value);
|
|
388
|
+
var previewValue = previewFilterFormatter.format(value);
|
|
389
|
+
|
|
390
|
+
if (quickFilters.get(modelColumn)) {
|
|
391
|
+
filterMenu.actions.push({
|
|
392
|
+
title: 'And',
|
|
393
|
+
actions: this.dateFilterActions(column, dateValueText, previewValue, value, quickFilters.get(modelColumn), '&&'),
|
|
394
|
+
order: 2,
|
|
395
|
+
group: ContextActions.groups.high
|
|
396
|
+
});
|
|
397
|
+
}
|
|
409
398
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
399
|
+
filterMenu.actions.push(...this.dateFilterActions(column, dateValueText, previewValue, value, quickFilters.get(modelColumn)));
|
|
400
|
+
} else {
|
|
401
|
+
if (quickFilters.get(modelColumn)) {
|
|
402
|
+
filterMenu.actions.push({
|
|
403
|
+
title: 'And',
|
|
404
|
+
actions: this.stringFilterActions(column, valueText, value, quickFilters.get(modelColumn), '&&'),
|
|
405
|
+
order: 2,
|
|
406
|
+
group: ContextActions.groups.high
|
|
407
|
+
});
|
|
408
|
+
}
|
|
413
409
|
|
|
414
|
-
|
|
415
|
-
if (canCopy) {
|
|
416
|
-
actions.push({
|
|
417
|
-
title: 'Copy Selection',
|
|
418
|
-
shortcut: GLOBAL_SHORTCUTS.COPY,
|
|
419
|
-
group: IrisGridContextMenuHandler.GROUP_COPY,
|
|
420
|
-
order: 30,
|
|
421
|
-
action: () => {
|
|
422
|
-
irisGrid.copyRanges(selectedRanges);
|
|
423
|
-
}
|
|
424
|
-
});
|
|
425
|
-
actions.push({
|
|
426
|
-
title: 'Copy Selection w/ Headers',
|
|
427
|
-
group: IrisGridContextMenuHandler.GROUP_COPY,
|
|
428
|
-
order: 40,
|
|
429
|
-
action: () => {
|
|
430
|
-
irisGrid.copyRanges(selectedRanges, true);
|
|
431
|
-
}
|
|
432
|
-
});
|
|
410
|
+
filterMenu.actions.push(...this.stringFilterActions(column, valueText, value));
|
|
433
411
|
}
|
|
434
412
|
|
|
435
|
-
if (
|
|
436
|
-
actions.push(
|
|
437
|
-
title: 'Delete Selected Rows',
|
|
438
|
-
group: IrisGridContextMenuHandler.GROUP_EDIT,
|
|
439
|
-
order: 50,
|
|
440
|
-
action: () => {
|
|
441
|
-
this.irisGrid.deleteRanges(selectedRanges);
|
|
442
|
-
}
|
|
443
|
-
});
|
|
413
|
+
if (filterMenu.actions != null && filterMenu.actions.length > 0) {
|
|
414
|
+
actions.push(filterMenu);
|
|
444
415
|
}
|
|
445
416
|
}
|
|
446
417
|
|
|
418
|
+
var gotoRow = {
|
|
419
|
+
title: 'Go to',
|
|
420
|
+
iconColor: filterIconColor,
|
|
421
|
+
shortcut: SHORTCUTS.TABLE.GOTO_ROW,
|
|
422
|
+
group: IrisGridContextMenuHandler.GROUP_GOTO,
|
|
423
|
+
order: 10,
|
|
424
|
+
action: () => this.irisGrid.toggleGotoRow("".concat(rowIndex + 1))
|
|
425
|
+
};
|
|
426
|
+
actions.push(gotoRow);
|
|
427
|
+
|
|
428
|
+
if (canCopy) {
|
|
429
|
+
actions.push({
|
|
430
|
+
title: 'Copy Cell',
|
|
431
|
+
group: IrisGridContextMenuHandler.GROUP_COPY,
|
|
432
|
+
order: 10,
|
|
433
|
+
action: () => {
|
|
434
|
+
irisGrid.copyCell(columnIndex, rowIndex);
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
actions.push({
|
|
438
|
+
title: 'Copy Cell Unformatted',
|
|
439
|
+
group: IrisGridContextMenuHandler.GROUP_COPY,
|
|
440
|
+
order: 20,
|
|
441
|
+
action: () => {
|
|
442
|
+
irisGrid.copyCell(columnIndex, rowIndex, true);
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
|
|
447
447
|
return actions;
|
|
448
448
|
}
|
|
449
449
|
|
|
@@ -454,12 +454,14 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
454
454
|
var {
|
|
455
455
|
y,
|
|
456
456
|
column: columnIndex,
|
|
457
|
-
row: rowIndex
|
|
457
|
+
row: rowIndex,
|
|
458
|
+
columnHeaderDepth
|
|
458
459
|
} = gridPoint;
|
|
459
460
|
var modelColumn = irisGrid.getModelColumn(columnIndex);
|
|
460
461
|
var modelRow = irisGrid.getModelRow(rowIndex);
|
|
461
462
|
var {
|
|
462
|
-
model
|
|
463
|
+
model,
|
|
464
|
+
canCopy
|
|
463
465
|
} = irisGrid.props;
|
|
464
466
|
var {
|
|
465
467
|
columns
|
|
@@ -468,12 +470,14 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
468
470
|
metrics,
|
|
469
471
|
isFilterBarShown,
|
|
470
472
|
quickFilters,
|
|
471
|
-
advancedFilters
|
|
473
|
+
advancedFilters,
|
|
474
|
+
selectedRanges
|
|
472
475
|
} = irisGrid.state;
|
|
473
476
|
assertNotNull(metrics);
|
|
474
477
|
var {
|
|
475
478
|
columnHeaderHeight,
|
|
476
|
-
gridY
|
|
479
|
+
gridY,
|
|
480
|
+
columnHeaderMaxDepth
|
|
477
481
|
} = metrics;
|
|
478
482
|
var actions = [];
|
|
479
483
|
|
|
@@ -497,30 +501,63 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
497
501
|
modelColumn
|
|
498
502
|
}));
|
|
499
503
|
}
|
|
504
|
+
}
|
|
500
505
|
|
|
501
|
-
|
|
506
|
+
if (modelColumn != null && model.isFilterable(modelColumn)) {
|
|
507
|
+
// Clear column filter should still be available after last row
|
|
508
|
+
// And should be available in both header and body context menus
|
|
509
|
+
actions.push({
|
|
510
|
+
title: 'Clear Column Filter',
|
|
511
|
+
group: IrisGridContextMenuHandler.GROUP_FILTER,
|
|
512
|
+
order: 30,
|
|
513
|
+
action: () => {
|
|
514
|
+
this.irisGrid.removeColumnFilter(modelColumn);
|
|
515
|
+
},
|
|
516
|
+
disabled: !(quickFilters.has(modelColumn) || advancedFilters.has(modelColumn))
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
if (isFilterBarShown ? y <= gridY : y <= columnHeaderHeight * columnHeaderMaxDepth && columnHeaderDepth === 0) {
|
|
521
|
+
// grid header context menu options
|
|
522
|
+
if (modelColumn != null) {
|
|
523
|
+
actions.push(...this.getHeaderActions(modelColumn, gridPoint));
|
|
524
|
+
}
|
|
525
|
+
} else {
|
|
526
|
+
// grid body context menu options
|
|
527
|
+
if (modelColumn != null && modelRow != null) {
|
|
528
|
+
actions.push(...this.getCellActions(modelColumn, grid, gridPoint));
|
|
529
|
+
} // blank space context menu options
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
if (canCopy && selectedRanges.length > 0) {
|
|
502
533
|
actions.push({
|
|
503
|
-
title: '
|
|
504
|
-
|
|
534
|
+
title: 'Copy Selection',
|
|
535
|
+
shortcut: GLOBAL_SHORTCUTS.COPY,
|
|
536
|
+
group: IrisGridContextMenuHandler.GROUP_COPY,
|
|
505
537
|
order: 30,
|
|
506
538
|
action: () => {
|
|
507
|
-
|
|
508
|
-
}
|
|
509
|
-
|
|
539
|
+
irisGrid.copyRanges(selectedRanges);
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
actions.push({
|
|
543
|
+
title: 'Copy Selection w/ Headers',
|
|
544
|
+
group: IrisGridContextMenuHandler.GROUP_COPY,
|
|
545
|
+
order: 40,
|
|
546
|
+
action: () => {
|
|
547
|
+
irisGrid.copyRanges(selectedRanges, true);
|
|
548
|
+
}
|
|
510
549
|
});
|
|
511
550
|
}
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
if (modelColumn != null) {
|
|
515
|
-
var _column = columns[modelColumn];
|
|
516
551
|
|
|
517
|
-
if (
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
552
|
+
if (isEditableGridModel(model) && model.isEditable && selectedRanges.length > 0) {
|
|
553
|
+
actions.push({
|
|
554
|
+
title: 'Delete Selected Rows',
|
|
555
|
+
group: IrisGridContextMenuHandler.GROUP_EDIT,
|
|
556
|
+
order: 50,
|
|
557
|
+
action: () => {
|
|
558
|
+
this.irisGrid.deleteRanges(selectedRanges);
|
|
559
|
+
}
|
|
560
|
+
});
|
|
524
561
|
}
|
|
525
562
|
}
|
|
526
563
|
|
|
@@ -634,8 +671,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
634
671
|
return actions;
|
|
635
672
|
}
|
|
636
673
|
|
|
637
|
-
stringFilterActions(column, valueText, value, quickFilter) {
|
|
638
|
-
var additive = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
674
|
+
stringFilterActions(column, valueText, value, quickFilter, operator) {
|
|
639
675
|
var filterValue = dh.FilterValue.ofString(value);
|
|
640
676
|
var newQuickFilter = quickFilter;
|
|
641
677
|
|
|
@@ -659,62 +695,68 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
659
695
|
actions.push({
|
|
660
696
|
menuElement: /*#__PURE__*/React.createElement("div", {
|
|
661
697
|
className: "iris-grid-filter-menu-item-value"
|
|
662
|
-
}, "\"", valueText, "\""),
|
|
663
|
-
order: 1
|
|
698
|
+
}, operator ? IrisGridContextMenuHandler.getOperatorAsText(operator) : '', ' ', "\"", valueText, "\""),
|
|
699
|
+
order: 1,
|
|
700
|
+
group: ContextActions.groups.high
|
|
664
701
|
});
|
|
665
702
|
actions.push({
|
|
666
703
|
title: 'text is exactly',
|
|
667
704
|
description: "Show only rows where ".concat(column.name, " is ").concat(value, " (case sensitive)"),
|
|
668
705
|
action: () => {
|
|
669
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().eq(filterValue),
|
|
706
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().eq(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "=".concat(valueText), operator));
|
|
670
707
|
},
|
|
671
|
-
order: 10
|
|
708
|
+
order: 10,
|
|
709
|
+
group: ContextActions.groups.low
|
|
672
710
|
});
|
|
673
711
|
actions.push({
|
|
674
712
|
title: 'text is not exactly',
|
|
675
713
|
description: "Show only rows where ".concat(column.name, " is not ").concat(valueText, " (case sensitive)"),
|
|
676
714
|
action: () => {
|
|
677
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().notEq(filterValue),
|
|
715
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().notEq(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "!=".concat(valueText), operator));
|
|
678
716
|
},
|
|
679
|
-
order: 20
|
|
717
|
+
order: 20,
|
|
718
|
+
group: ContextActions.groups.low
|
|
680
719
|
});
|
|
681
720
|
actions.push({
|
|
682
721
|
title: "text contains",
|
|
683
722
|
description: "Show only rows where ".concat(column.name, " contains ").concat(valueText),
|
|
684
723
|
action: () => {
|
|
685
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().contains(filterValue),
|
|
724
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().contains(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "~".concat(valueText), operator));
|
|
686
725
|
},
|
|
687
|
-
order: 30
|
|
726
|
+
order: 30,
|
|
727
|
+
group: ContextActions.groups.low
|
|
688
728
|
});
|
|
689
729
|
actions.push({
|
|
690
730
|
title: 'text does not contain',
|
|
691
731
|
description: "Show only rows where ".concat(column.name, " does not contain ").concat(value),
|
|
692
732
|
action: () => {
|
|
693
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().contains(filterValue).not(),
|
|
733
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().contains(filterValue).not(), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "!~".concat(valueText), operator));
|
|
694
734
|
},
|
|
695
|
-
order: 40
|
|
735
|
+
order: 40,
|
|
736
|
+
group: ContextActions.groups.low
|
|
696
737
|
});
|
|
697
738
|
actions.push({
|
|
698
739
|
title: 'text starts with',
|
|
699
740
|
description: "Show only rows where ".concat(column.name, " starts with ").concat(valueText),
|
|
700
741
|
action: () => {
|
|
701
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().invoke('startsWith', filterValue),
|
|
742
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().invoke('startsWith', filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "".concat(valueText, "*"), operator));
|
|
702
743
|
},
|
|
703
|
-
order: 50
|
|
744
|
+
order: 50,
|
|
745
|
+
group: ContextActions.groups.low
|
|
704
746
|
});
|
|
705
747
|
actions.push({
|
|
706
748
|
title: 'text ends with',
|
|
707
749
|
description: "Show only rows where ".concat(column.name, " ends with ").concat(valueText),
|
|
708
750
|
action: () => {
|
|
709
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().invoke('endsWith', filterValue),
|
|
751
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().invoke('endsWith', filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "*".concat(valueText), operator));
|
|
710
752
|
},
|
|
711
|
-
order: 60
|
|
753
|
+
order: 60,
|
|
754
|
+
group: ContextActions.groups.low
|
|
712
755
|
});
|
|
713
756
|
return actions;
|
|
714
757
|
}
|
|
715
758
|
|
|
716
|
-
numberFilterActions(column, valueText, value, quickFilter) {
|
|
717
|
-
var additive = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
759
|
+
numberFilterActions(column, valueText, value, quickFilter, operator) {
|
|
718
760
|
var filterValue = IrisGridContextMenuHandler.getFilterValueForNumberOrChar(column.type, value);
|
|
719
761
|
var filter = null;
|
|
720
762
|
var filterText = null;
|
|
@@ -734,26 +776,29 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
734
776
|
actions.push({
|
|
735
777
|
menuElement: /*#__PURE__*/React.createElement("div", {
|
|
736
778
|
className: "iris-grid-filter-menu-item-value"
|
|
737
|
-
},
|
|
738
|
-
order: 1
|
|
779
|
+
}, operator ? IrisGridContextMenuHandler.getOperatorAsText(operator) : '', ' ', "\"", valueText, "\""),
|
|
780
|
+
order: 1,
|
|
781
|
+
group: ContextActions.groups.high
|
|
739
782
|
});
|
|
740
783
|
actions.push({
|
|
741
784
|
title: 'is equal to',
|
|
742
785
|
description: "Show only rows where ".concat(column.name, " is ").concat(valueText),
|
|
743
786
|
action: () => {
|
|
744
787
|
var valueFilter = IrisGridContextMenuHandler.getNumberValueEqualsFilter(column, value);
|
|
745
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, valueFilter,
|
|
788
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, valueFilter, operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "=".concat(valueText), operator));
|
|
746
789
|
},
|
|
747
|
-
order: 10
|
|
790
|
+
order: 10,
|
|
791
|
+
group: ContextActions.groups.low
|
|
748
792
|
});
|
|
749
793
|
actions.push({
|
|
750
794
|
title: 'is not equal to',
|
|
751
795
|
description: "Show only rows where ".concat(column.name, " is not ").concat(valueText),
|
|
752
796
|
action: () => {
|
|
753
797
|
var valueFilter = IrisGridContextMenuHandler.getNumberValueEqualsFilter(column, value).not();
|
|
754
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, valueFilter,
|
|
798
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, valueFilter, operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "!=".concat(valueText), operator));
|
|
755
799
|
},
|
|
756
|
-
order: 20
|
|
800
|
+
order: 20,
|
|
801
|
+
group: ContextActions.groups.low
|
|
757
802
|
}); // IDS-6092 Less/greater than filters don't make sense for Infinite/NaN
|
|
758
803
|
// TODO (DH-11799): These char filters should work in Bard, with the merge for DH-11040: https://gitlab.eng.illumon.com/illumon/iris/merge_requests/5801
|
|
759
804
|
// They do not work in Powell though, so disable them.
|
|
@@ -763,91 +808,101 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
763
808
|
title: 'greater than',
|
|
764
809
|
description: "Show only rows where ".concat(column.name, " is greater than ").concat(valueText),
|
|
765
810
|
action: () => {
|
|
766
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().greaterThan(filterValue),
|
|
811
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().greaterThan(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, ">".concat(valueText), operator));
|
|
767
812
|
},
|
|
768
|
-
order: 30
|
|
813
|
+
order: 30,
|
|
814
|
+
group: ContextActions.groups.low
|
|
769
815
|
});
|
|
770
816
|
actions.push({
|
|
771
817
|
title: 'greater than or equal to',
|
|
772
818
|
description: "Show only rows where ".concat(column.name, " is greater than or equal to ").concat(valueText),
|
|
773
819
|
action: () => {
|
|
774
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().greaterThanOrEqualTo(filterValue),
|
|
820
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().greaterThanOrEqualTo(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, ">=".concat(valueText), operator));
|
|
775
821
|
},
|
|
776
|
-
order: 40
|
|
822
|
+
order: 40,
|
|
823
|
+
group: ContextActions.groups.low
|
|
777
824
|
});
|
|
778
825
|
actions.push({
|
|
779
826
|
title: 'less than',
|
|
780
827
|
description: "Show only rows where ".concat(column.name, " is less than ").concat(valueText),
|
|
781
828
|
action: () => {
|
|
782
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().lessThan(filterValue),
|
|
829
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().lessThan(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "<".concat(valueText), operator));
|
|
783
830
|
},
|
|
784
|
-
order: 50
|
|
831
|
+
order: 50,
|
|
832
|
+
group: ContextActions.groups.low
|
|
785
833
|
});
|
|
786
834
|
actions.push({
|
|
787
835
|
title: 'less than or equal to',
|
|
788
836
|
description: "Show only rows where ".concat(column.name, " is less than or equal to ").concat(valueText),
|
|
789
837
|
action: () => {
|
|
790
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().lessThanOrEqualTo(filterValue),
|
|
838
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().lessThanOrEqualTo(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "<=".concat(valueText), operator));
|
|
791
839
|
},
|
|
792
|
-
order: 60
|
|
840
|
+
order: 60,
|
|
841
|
+
group: ContextActions.groups.low
|
|
793
842
|
});
|
|
794
843
|
}
|
|
795
844
|
|
|
796
845
|
return actions;
|
|
797
846
|
}
|
|
798
847
|
|
|
799
|
-
booleanFilterActions(column, valueText, quickFilter) {
|
|
800
|
-
var additive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
848
|
+
booleanFilterActions(column, valueText, quickFilter, operator) {
|
|
801
849
|
var actions = [];
|
|
802
|
-
|
|
803
|
-
if (quickFilter == null) {
|
|
804
|
-
return actions;
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
var {
|
|
808
|
-
filter,
|
|
809
|
-
text: filterText
|
|
810
|
-
} = quickFilter;
|
|
811
850
|
var {
|
|
812
851
|
model
|
|
813
852
|
} = this.irisGrid.props;
|
|
853
|
+
var {
|
|
854
|
+
filter,
|
|
855
|
+
text: filterText
|
|
856
|
+
} = quickFilter || {};
|
|
814
857
|
var columnIndex = model.getColumnIndexByName(column.name);
|
|
815
858
|
assertNotNull(columnIndex);
|
|
816
859
|
actions.push({
|
|
817
860
|
menuElement: /*#__PURE__*/React.createElement("div", {
|
|
818
861
|
className: "iris-grid-filter-menu-item-value"
|
|
819
|
-
},
|
|
820
|
-
order: 1
|
|
862
|
+
}, operator ? IrisGridContextMenuHandler.getOperatorAsText(operator) : '', ' ', "\"", valueText || 'null', "\""),
|
|
863
|
+
order: 1,
|
|
864
|
+
group: ContextActions.groups.high
|
|
821
865
|
});
|
|
822
866
|
actions.push({
|
|
823
867
|
title: 'true',
|
|
824
868
|
description: "Show only rows where ".concat(column.name, " is true"),
|
|
825
869
|
action: () => {
|
|
826
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isTrue(),
|
|
870
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isTrue(), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, 'true', operator));
|
|
827
871
|
},
|
|
828
|
-
order: 10
|
|
872
|
+
order: 10,
|
|
873
|
+
group: ContextActions.groups.low
|
|
829
874
|
});
|
|
830
875
|
actions.push({
|
|
831
876
|
title: 'false',
|
|
832
877
|
description: "Show only rows where ".concat(column.name, " is false"),
|
|
833
878
|
action: () => {
|
|
834
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isFalse(),
|
|
879
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isFalse(), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, 'false', operator));
|
|
835
880
|
},
|
|
836
|
-
order: 20
|
|
881
|
+
order: 20,
|
|
882
|
+
group: ContextActions.groups.low
|
|
837
883
|
});
|
|
838
884
|
actions.push({
|
|
839
|
-
title: 'null',
|
|
885
|
+
title: 'is null',
|
|
840
886
|
description: "Show only rows where ".concat(column.name, " is null"),
|
|
841
887
|
action: () => {
|
|
842
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isNull(),
|
|
888
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isNull(), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, 'null', operator));
|
|
843
889
|
},
|
|
844
|
-
order: 30
|
|
890
|
+
order: 30,
|
|
891
|
+
group: ContextActions.groups.low
|
|
892
|
+
});
|
|
893
|
+
actions.push({
|
|
894
|
+
title: 'is not null',
|
|
895
|
+
description: "Show only rows where ".concat(column.name, " is not null"),
|
|
896
|
+
action: () => {
|
|
897
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isNull().not(), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, '!null', operator));
|
|
898
|
+
},
|
|
899
|
+
order: 40,
|
|
900
|
+
group: ContextActions.groups.low
|
|
845
901
|
});
|
|
846
902
|
return actions;
|
|
847
903
|
}
|
|
848
904
|
|
|
849
|
-
dateFilterActions(column, valueText, previewValue, value, quickFilter) {
|
|
850
|
-
var additive = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
|
|
905
|
+
dateFilterActions(column, valueText, previewValue, value, quickFilter, operator) {
|
|
851
906
|
var filterValue = dh.FilterValue.ofNumber(value);
|
|
852
907
|
var filter = null;
|
|
853
908
|
var filterText = null;
|
|
@@ -866,62 +921,68 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
866
921
|
actions.push({
|
|
867
922
|
menuElement: /*#__PURE__*/React.createElement("div", {
|
|
868
923
|
className: "iris-grid-filter-menu-item-value"
|
|
869
|
-
},
|
|
870
|
-
order: 1
|
|
924
|
+
}, operator ? IrisGridContextMenuHandler.getOperatorAsText(operator) : '', ' ', "\"", previewValue, "\""),
|
|
925
|
+
order: 1,
|
|
926
|
+
group: ContextActions.groups.high
|
|
871
927
|
});
|
|
872
928
|
actions.push({
|
|
873
929
|
title: 'date is',
|
|
874
930
|
description: "Show only rows where ".concat(column.name, " is ").concat(previewValue),
|
|
875
931
|
action: () => {
|
|
876
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().eq(filterValue),
|
|
932
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().eq(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "=".concat(valueText), operator));
|
|
877
933
|
},
|
|
878
|
-
order: 10
|
|
934
|
+
order: 10,
|
|
935
|
+
group: ContextActions.groups.low
|
|
879
936
|
});
|
|
880
937
|
actions.push({
|
|
881
938
|
title: 'date is not',
|
|
882
939
|
description: "Show only rows where ".concat(column.name, " is not ").concat(previewValue),
|
|
883
940
|
action: () => {
|
|
884
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().notEq(filterValue),
|
|
941
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().notEq(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "!=".concat(valueText), operator));
|
|
885
942
|
},
|
|
886
|
-
order: 20
|
|
943
|
+
order: 20,
|
|
944
|
+
group: ContextActions.groups.low
|
|
887
945
|
});
|
|
888
946
|
actions.push({
|
|
889
947
|
title: 'date is before',
|
|
890
948
|
description: "Show only rows where ".concat(column.name, " is before ").concat(previewValue),
|
|
891
949
|
action: () => {
|
|
892
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().lessThan(filterValue),
|
|
950
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().lessThan(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "<".concat(valueText), operator));
|
|
893
951
|
},
|
|
894
|
-
order: 30
|
|
952
|
+
order: 30,
|
|
953
|
+
group: ContextActions.groups.low
|
|
895
954
|
});
|
|
896
955
|
actions.push({
|
|
897
956
|
title: 'date is before or equal',
|
|
898
957
|
description: "Show only rows where ".concat(column.name, " is before or equal to ").concat(previewValue),
|
|
899
958
|
action: () => {
|
|
900
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().lessThanOrEqualTo(filterValue),
|
|
959
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().lessThanOrEqualTo(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "<=".concat(valueText), operator));
|
|
901
960
|
},
|
|
902
|
-
order: 40
|
|
961
|
+
order: 40,
|
|
962
|
+
group: ContextActions.groups.low
|
|
903
963
|
});
|
|
904
964
|
actions.push({
|
|
905
965
|
title: 'date is after',
|
|
906
966
|
description: "Show only rows where ".concat(column.name, " is greater than ").concat(previewValue),
|
|
907
967
|
action: () => {
|
|
908
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().greaterThan(filterValue),
|
|
968
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().greaterThan(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, ">".concat(valueText), operator));
|
|
909
969
|
},
|
|
910
|
-
order: 50
|
|
970
|
+
order: 50,
|
|
971
|
+
group: ContextActions.groups.low
|
|
911
972
|
});
|
|
912
973
|
actions.push({
|
|
913
974
|
title: 'date is after or equal',
|
|
914
975
|
description: "Show only rows where ".concat(column.name, " is after or equal to ").concat(previewValue),
|
|
915
976
|
action: () => {
|
|
916
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().greaterThanOrEqualTo(filterValue),
|
|
977
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().greaterThanOrEqualTo(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, ">=".concat(valueText), operator));
|
|
917
978
|
},
|
|
918
|
-
order: 60
|
|
979
|
+
order: 60,
|
|
980
|
+
group: ContextActions.groups.low
|
|
919
981
|
});
|
|
920
982
|
return actions;
|
|
921
983
|
}
|
|
922
984
|
|
|
923
|
-
nullFilterActions(column, quickFilter) {
|
|
924
|
-
var additive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
985
|
+
nullFilterActions(column, quickFilter, operator) {
|
|
925
986
|
var filter = null;
|
|
926
987
|
var filterText = null;
|
|
927
988
|
|
|
@@ -939,24 +1000,27 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
939
1000
|
actions.push({
|
|
940
1001
|
menuElement: /*#__PURE__*/React.createElement("div", {
|
|
941
1002
|
className: "iris-grid-filter-menu-item-value"
|
|
942
|
-
},
|
|
943
|
-
order: 1
|
|
1003
|
+
}, operator ? IrisGridContextMenuHandler.getOperatorAsText(operator) : '', ' ', "\"null\""),
|
|
1004
|
+
order: 1,
|
|
1005
|
+
group: ContextActions.groups.high
|
|
944
1006
|
});
|
|
945
1007
|
actions.push({
|
|
946
|
-
title: '
|
|
1008
|
+
title: 'is null',
|
|
947
1009
|
description: "Show only rows where ".concat(column.name, " is null"),
|
|
948
1010
|
action: () => {
|
|
949
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isNull(),
|
|
1011
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isNull(), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, 'null', operator));
|
|
950
1012
|
},
|
|
951
|
-
order: 10
|
|
1013
|
+
order: 10,
|
|
1014
|
+
group: ContextActions.groups.low
|
|
952
1015
|
});
|
|
953
1016
|
actions.push({
|
|
954
|
-
title: 'not
|
|
1017
|
+
title: 'is not null',
|
|
955
1018
|
description: "Show only rows where ".concat(column.name, " is not null"),
|
|
956
1019
|
action: () => {
|
|
957
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isNull().not(),
|
|
1020
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isNull().not(), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, '!null', operator));
|
|
958
1021
|
},
|
|
959
|
-
order: 20
|
|
1022
|
+
order: 20,
|
|
1023
|
+
group: ContextActions.groups.low
|
|
960
1024
|
});
|
|
961
1025
|
return actions;
|
|
962
1026
|
}
|