@deephaven/iris-grid 0.41.2-beta.0 → 0.41.2-beta.4
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/AdvancedFilterCreatorSelectValueList.d.ts +2 -2
- package/dist/AdvancedFilterCreatorSelectValueList.d.ts.map +1 -1
- package/dist/AdvancedFilterCreatorSelectValueList.js +12 -1
- package/dist/AdvancedFilterCreatorSelectValueList.js.map +1 -1
- package/dist/IrisGrid.css +3 -0
- package/dist/IrisGrid.css.map +1 -1
- package/dist/IrisGrid.d.ts +2 -2
- package/dist/IrisGrid.d.ts.map +1 -1
- package/dist/IrisGrid.js.map +1 -1
- package/dist/IrisGridCellRendererUtils.d.ts +7 -0
- package/dist/IrisGridCellRendererUtils.d.ts.map +1 -0
- package/dist/IrisGridCellRendererUtils.js +20 -0
- package/dist/IrisGridCellRendererUtils.js.map +1 -0
- package/dist/IrisGridDataBarCellRenderer.d.ts +7 -0
- package/dist/IrisGridDataBarCellRenderer.d.ts.map +1 -0
- package/dist/IrisGridDataBarCellRenderer.js +10 -0
- package/dist/IrisGridDataBarCellRenderer.js.map +1 -0
- package/dist/IrisGridIcons.d.ts +4 -0
- package/dist/IrisGridIcons.d.ts.map +1 -0
- package/dist/IrisGridIcons.js +25 -0
- package/dist/IrisGridIcons.js.map +1 -0
- package/dist/IrisGridRenderer.d.ts +18 -26
- package/dist/IrisGridRenderer.d.ts.map +1 -1
- package/dist/IrisGridRenderer.js +64 -205
- package/dist/IrisGridRenderer.js.map +1 -1
- package/dist/IrisGridTableModelTemplate.d.ts +2 -2
- package/dist/IrisGridTableModelTemplate.d.ts.map +1 -1
- package/dist/IrisGridTableModelTemplate.js +15 -3
- package/dist/IrisGridTableModelTemplate.js.map +1 -1
- package/dist/IrisGridTextCellRenderer.d.ts +20 -0
- package/dist/IrisGridTextCellRenderer.d.ts.map +1 -0
- package/dist/IrisGridTextCellRenderer.js +139 -0
- package/dist/IrisGridTextCellRenderer.js.map +1 -0
- package/dist/IrisGridTheme.d.ts.map +1 -1
- package/dist/IrisGridTheme.js +4 -1
- package/dist/IrisGridTheme.js.map +1 -1
- package/dist/IrisGridTheme.module.css +3 -0
- package/dist/IrisGridTheme.module.css.map +1 -1
- package/dist/IrisGridUtils.d.ts +12 -12
- package/dist/IrisGridUtils.d.ts.map +1 -1
- package/dist/IrisGridUtils.js +7 -3
- package/dist/IrisGridUtils.js.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts +1 -0
- package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.js +73 -7
- package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridTokenMouseHandler.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridTokenMouseHandler.js +18 -3
- package/dist/mousehandlers/IrisGridTokenMouseHandler.js.map +1 -1
- package/package.json +16 -16
|
@@ -307,6 +307,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
307
307
|
actions: []
|
|
308
308
|
};
|
|
309
309
|
if (value == null) {
|
|
310
|
+
// null gets a special menu
|
|
310
311
|
if (quickFilters.get(modelColumn)) {
|
|
311
312
|
filterMenu.actions.push({
|
|
312
313
|
title: 'And',
|
|
@@ -316,6 +317,17 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
316
317
|
});
|
|
317
318
|
}
|
|
318
319
|
filterMenu.actions.push(...this.nullFilterActions(column));
|
|
320
|
+
} else if (value === '') {
|
|
321
|
+
// empty string gets a special menu
|
|
322
|
+
if (quickFilters.get(modelColumn)) {
|
|
323
|
+
filterMenu.actions.push({
|
|
324
|
+
title: 'And',
|
|
325
|
+
actions: this.emptyStringFilterActions(column, quickFilters.get(modelColumn), '&&'),
|
|
326
|
+
order: 2,
|
|
327
|
+
group: ContextActions.groups.high
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
filterMenu.actions.push(...this.emptyStringFilterActions(column));
|
|
319
331
|
} else if (TableUtils.isBooleanType(column.type)) {
|
|
320
332
|
// boolean should have OR condition, and handles it's own null menu options
|
|
321
333
|
if (quickFilters.get(modelColumn)) {
|
|
@@ -696,6 +708,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
696
708
|
model
|
|
697
709
|
} = this.irisGrid.props;
|
|
698
710
|
var columnIndex = model.getColumnIndexByName(column.name);
|
|
711
|
+
var quickFilterValueText = TableUtils.escapeQuickTextFilter(valueText);
|
|
699
712
|
assertNotNull(columnIndex);
|
|
700
713
|
actions.push({
|
|
701
714
|
menuElement: /*#__PURE__*/React.createElement("div", {
|
|
@@ -708,7 +721,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
708
721
|
title: 'text is exactly',
|
|
709
722
|
description: "Show only rows where ".concat(column.name, " is ").concat(value, " (case sensitive)"),
|
|
710
723
|
action: () => {
|
|
711
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().eq(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "
|
|
724
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().eq(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "".concat(quickFilterValueText), operator));
|
|
712
725
|
},
|
|
713
726
|
order: 10,
|
|
714
727
|
group: ContextActions.groups.low
|
|
@@ -717,7 +730,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
717
730
|
title: 'text is not exactly',
|
|
718
731
|
description: "Show only rows where ".concat(column.name, " is not ").concat(valueText, " (case sensitive)"),
|
|
719
732
|
action: () => {
|
|
720
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().notEq(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "!=".concat(
|
|
733
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().notEq(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "!=".concat(quickFilterValueText), operator));
|
|
721
734
|
},
|
|
722
735
|
order: 20,
|
|
723
736
|
group: ContextActions.groups.low
|
|
@@ -726,7 +739,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
726
739
|
title: "text contains",
|
|
727
740
|
description: "Show only rows where ".concat(column.name, " contains ").concat(valueText),
|
|
728
741
|
action: () => {
|
|
729
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().contains(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "~".concat(
|
|
742
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isNull().not().and(column.filter().contains(filterValue)), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "~".concat(quickFilterValueText), operator));
|
|
730
743
|
},
|
|
731
744
|
order: 30,
|
|
732
745
|
group: ContextActions.groups.low
|
|
@@ -735,7 +748,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
735
748
|
title: 'text does not contain',
|
|
736
749
|
description: "Show only rows where ".concat(column.name, " does not contain ").concat(value),
|
|
737
750
|
action: () => {
|
|
738
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().contains(filterValue).not(), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "!~".concat(
|
|
751
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isNull().or(column.filter().contains(filterValue).not()), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "!~".concat(quickFilterValueText), operator));
|
|
739
752
|
},
|
|
740
753
|
order: 40,
|
|
741
754
|
group: ContextActions.groups.low
|
|
@@ -744,7 +757,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
744
757
|
title: 'text starts with',
|
|
745
758
|
description: "Show only rows where ".concat(column.name, " starts with ").concat(valueText),
|
|
746
759
|
action: () => {
|
|
747
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().invoke('startsWith', filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "".concat(
|
|
760
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isNull().not().and(column.filter().invoke('startsWith', filterValue)), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "".concat(quickFilterValueText, "*"), operator));
|
|
748
761
|
},
|
|
749
762
|
order: 50,
|
|
750
763
|
group: ContextActions.groups.low
|
|
@@ -753,7 +766,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
753
766
|
title: 'text ends with',
|
|
754
767
|
description: "Show only rows where ".concat(column.name, " ends with ").concat(valueText),
|
|
755
768
|
action: () => {
|
|
756
|
-
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().invoke('endsWith', filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "*".concat(
|
|
769
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().isNull().not().and(column.filter().invoke('endsWith', filterValue)), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "*".concat(quickFilterValueText), operator));
|
|
757
770
|
},
|
|
758
771
|
order: 60,
|
|
759
772
|
group: ContextActions.groups.low
|
|
@@ -982,6 +995,57 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
982
995
|
});
|
|
983
996
|
return actions;
|
|
984
997
|
}
|
|
998
|
+
emptyStringFilterActions(column, quickFilter, operator) {
|
|
999
|
+
var {
|
|
1000
|
+
dh
|
|
1001
|
+
} = this;
|
|
1002
|
+
var filterValue = dh.FilterValue.ofString('');
|
|
1003
|
+
var newQuickFilter = quickFilter;
|
|
1004
|
+
if (!newQuickFilter) {
|
|
1005
|
+
newQuickFilter = {
|
|
1006
|
+
filter: null,
|
|
1007
|
+
text: null
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
var {
|
|
1011
|
+
filter,
|
|
1012
|
+
text: filterText
|
|
1013
|
+
} = newQuickFilter;
|
|
1014
|
+
var actions = [];
|
|
1015
|
+
var {
|
|
1016
|
+
model
|
|
1017
|
+
} = this.irisGrid.props;
|
|
1018
|
+
var columnIndex = model.getColumnIndexByName(column.name);
|
|
1019
|
+
assertNotNull(columnIndex);
|
|
1020
|
+
actions.push({
|
|
1021
|
+
menuElement: /*#__PURE__*/React.createElement("div", {
|
|
1022
|
+
className: "iris-grid-filter-menu-item-value"
|
|
1023
|
+
}, operator ? IrisGridContextMenuHandler.getOperatorAsText(operator) : '', ' ', /*#__PURE__*/React.createElement("i", {
|
|
1024
|
+
className: "text-muted"
|
|
1025
|
+
}, "empty")),
|
|
1026
|
+
order: 1,
|
|
1027
|
+
group: ContextActions.groups.high
|
|
1028
|
+
});
|
|
1029
|
+
actions.push({
|
|
1030
|
+
title: 'is empty string',
|
|
1031
|
+
description: "Show only rows where ".concat(column.name, " is empty"),
|
|
1032
|
+
action: () => {
|
|
1033
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().eq(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "=", operator));
|
|
1034
|
+
},
|
|
1035
|
+
order: 10,
|
|
1036
|
+
group: ContextActions.groups.low
|
|
1037
|
+
});
|
|
1038
|
+
actions.push({
|
|
1039
|
+
title: 'is not empty string',
|
|
1040
|
+
description: "Show only rows where ".concat(column.name, " is not empty"),
|
|
1041
|
+
action: () => {
|
|
1042
|
+
this.irisGrid.setQuickFilter(columnIndex, IrisGridContextMenuHandler.getQuickFilterCondition(filter, column.filter().notEq(filterValue), operator), IrisGridContextMenuHandler.getQuickFilterText(filterText, "!=", operator));
|
|
1043
|
+
},
|
|
1044
|
+
order: 20,
|
|
1045
|
+
group: ContextActions.groups.low
|
|
1046
|
+
});
|
|
1047
|
+
return actions;
|
|
1048
|
+
}
|
|
985
1049
|
nullFilterActions(column, quickFilter, operator) {
|
|
986
1050
|
var filter = null;
|
|
987
1051
|
var filterText = null;
|
|
@@ -998,7 +1062,9 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
998
1062
|
actions.push({
|
|
999
1063
|
menuElement: /*#__PURE__*/React.createElement("div", {
|
|
1000
1064
|
className: "iris-grid-filter-menu-item-value"
|
|
1001
|
-
}, operator ? IrisGridContextMenuHandler.getOperatorAsText(operator) : '', ' ', "
|
|
1065
|
+
}, operator ? IrisGridContextMenuHandler.getOperatorAsText(operator) : '', ' ', /*#__PURE__*/React.createElement("i", {
|
|
1066
|
+
className: "text-muted"
|
|
1067
|
+
}, "null")),
|
|
1002
1068
|
order: 1,
|
|
1003
1069
|
group: ContextActions.groups.high
|
|
1004
1070
|
});
|