@deephaven/iris-grid 0.26.2-beta.3 → 0.27.1-beta.2
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/GotoRow.css +21 -3
- package/dist/GotoRow.css.map +1 -1
- package/dist/GotoRow.d.ts +11 -2
- package/dist/GotoRow.d.ts.map +1 -1
- package/dist/GotoRow.js +186 -18
- package/dist/GotoRow.js.map +1 -1
- package/dist/IrisGrid.d.ts +12 -2
- package/dist/IrisGrid.d.ts.map +1 -1
- package/dist/IrisGrid.js +174 -31
- package/dist/IrisGrid.js.map +1 -1
- package/dist/IrisGridModel.d.ts +3 -1
- package/dist/IrisGridModel.d.ts.map +1 -1
- package/dist/IrisGridModel.js +4 -0
- package/dist/IrisGridModel.js.map +1 -1
- package/dist/IrisGridProxyModel.d.ts +3 -1
- package/dist/IrisGridProxyModel.d.ts.map +1 -1
- package/dist/IrisGridProxyModel.js +11 -0
- package/dist/IrisGridProxyModel.js.map +1 -1
- package/dist/IrisGridTableModel.d.ts +3 -1
- package/dist/IrisGridTableModel.d.ts.map +1 -1
- package/dist/IrisGridTableModel.js +9 -0
- package/dist/IrisGridTableModel.js.map +1 -1
- package/dist/IrisGridTableModelTemplate.d.ts +2 -1
- package/dist/IrisGridTableModelTemplate.d.ts.map +1 -1
- package/dist/IrisGridTableModelTemplate.js +3 -0
- package/dist/IrisGridTableModelTemplate.js.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.js +17 -15
- package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
- package/dist/sidebar/CustomColumnBuilder.d.ts +2 -7
- package/dist/sidebar/CustomColumnBuilder.d.ts.map +1 -1
- package/dist/sidebar/CustomColumnBuilder.js +39 -14
- package/dist/sidebar/CustomColumnBuilder.js.map +1 -1
- package/dist/sidebar/CustomColumnInput.d.ts +4 -20
- package/dist/sidebar/CustomColumnInput.d.ts.map +1 -1
- package/dist/sidebar/CustomColumnInput.js +80 -91
- package/dist/sidebar/CustomColumnInput.js.map +1 -1
- package/dist/sidebar/InputEditor.d.ts +2 -2
- package/dist/sidebar/InputEditor.d.ts.map +1 -1
- package/dist/sidebar/InputEditor.js +9 -8
- package/dist/sidebar/InputEditor.js.map +1 -1
- package/package.json +15 -15
|
@@ -53,7 +53,7 @@ declare class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
53
53
|
debouncedUpdateCustomFormat: DebouncedFunc<(modelIndex: number, selectedFormat: TableColumnFormat | null) => void>;
|
|
54
54
|
constructor(irisGrid: IrisGrid);
|
|
55
55
|
componentWillUnmount(): void;
|
|
56
|
-
getHeaderActions(
|
|
56
|
+
getHeaderActions(modelIndex: ModelIndex, gridPoint: GridPoint): ContextAction[];
|
|
57
57
|
getCellActions(modelColumn: number | undefined | null, grid: Grid, gridPoint: GridPoint): ContextAction[];
|
|
58
58
|
onContextMenu(gridPoint: GridPoint, grid: Grid, event: React.MouseEvent<Element, MouseEvent>): EventHandlerResult;
|
|
59
59
|
dateFormatActions(column: Column): ContextAction[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrisGridContextMenuHandler.d.ts","sourceRoot":"","sources":["../../src/mousehandlers/IrisGridContextMenuHandler.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,EACL,aAAa,EAId,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,IAAI,EACJ,gBAAgB,EAChB,SAAS,EAET,UAAU,
|
|
1
|
+
{"version":3,"file":"IrisGridContextMenuHandler.d.ts","sourceRoot":"","sources":["../../src/mousehandlers/IrisGridContextMenuHandler.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,EACL,aAAa,EAId,MAAM,uBAAuB,CAAC;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GAAG,IAAI,GAC5B,aAAa,EAAE;IA8KlB,oBAAoB,CAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,EAChC,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAC5B,aAAa,EAAE;IA8GlB,iBAAiB,CACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,OAAO,EACrB,KAAK,EAAE,OAAO,EACd,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,EAChC,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAC5B,aAAa,EAAE;IA4JlB,iBAAiB,CACf,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,WAAW,EACzB,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAC5B,aAAa,EAAE;IAsElB,aAAa,CACX,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,UAAU,EACvB,UAAU,EAAE,IAAI,GAAG,IAAI,GACtB,aAAa,EAAE;IA+FlB,qBAAqB,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,UAAU,GACtB,aAAa,EAAE;IA4ElB,eAAe,CACb,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,EACxB,SAAS,GAAE,aAAoB,EAC/B,KAAK,UAAQ,GACZ,OAAO;CAMX;AAED,eAAe,0BAA0B,CAAC"}
|
|
@@ -91,21 +91,21 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
91
91
|
componentWillUnmount() {
|
|
92
92
|
this.debouncedUpdateCustomFormat.flush();
|
|
93
93
|
}
|
|
94
|
-
getHeaderActions(
|
|
94
|
+
getHeaderActions(modelIndex, gridPoint) {
|
|
95
95
|
var {
|
|
96
96
|
irisGrid
|
|
97
97
|
} = this;
|
|
98
98
|
var {
|
|
99
|
-
column:
|
|
99
|
+
column: visibleIndex
|
|
100
100
|
} = gridPoint;
|
|
101
|
-
assertNotNull(
|
|
101
|
+
assertNotNull(visibleIndex);
|
|
102
102
|
var {
|
|
103
103
|
model
|
|
104
104
|
} = irisGrid.props;
|
|
105
105
|
var {
|
|
106
106
|
columns
|
|
107
107
|
} = model;
|
|
108
|
-
var column = columns[
|
|
108
|
+
var column = columns[modelIndex];
|
|
109
109
|
var actions = [];
|
|
110
110
|
var {
|
|
111
111
|
metrics,
|
|
@@ -123,23 +123,25 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
123
123
|
contextMenuReverseIconColor
|
|
124
124
|
} = theme;
|
|
125
125
|
var modelSort = model.sort;
|
|
126
|
-
var columnSort = TableUtils.getSortForColumn(modelSort,
|
|
126
|
+
var columnSort = TableUtils.getSortForColumn(modelSort, modelIndex);
|
|
127
127
|
var hasReverse = reverseType !== TableUtils.REVERSE_TYPE.NONE;
|
|
128
128
|
var {
|
|
129
129
|
userColumnWidths
|
|
130
130
|
} = metrics;
|
|
131
131
|
var isColumnHidden = [...userColumnWidths.values()].some(columnWidth => columnWidth === 0);
|
|
132
|
-
var
|
|
132
|
+
var isColumnFreezable = model.getColumnHeaderParentGroup(modelIndex, 0) === undefined;
|
|
133
|
+
var isColumnFrozen = model.isColumnFrozen(modelIndex);
|
|
133
134
|
actions.push({
|
|
134
135
|
title: 'Hide Column',
|
|
135
136
|
group: IrisGridContextMenuHandler.GROUP_HIDE_COLUMNS,
|
|
136
137
|
action: () => {
|
|
137
|
-
this.irisGrid.hideColumnByVisibleIndex(
|
|
138
|
+
this.irisGrid.hideColumnByVisibleIndex(visibleIndex);
|
|
138
139
|
}
|
|
139
140
|
});
|
|
140
141
|
actions.push({
|
|
141
142
|
title: isColumnFrozen ? 'Unfreeze Column' : 'Freeze Column',
|
|
142
143
|
group: IrisGridContextMenuHandler.GROUP_HIDE_COLUMNS,
|
|
144
|
+
disabled: !isColumnFreezable,
|
|
143
145
|
action: () => {
|
|
144
146
|
if (isColumnFrozen) {
|
|
145
147
|
this.irisGrid.unFreezeColumnByColumnName(column.name);
|
|
@@ -165,17 +167,17 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
165
167
|
group: IrisGridContextMenuHandler.GROUP_FILTER,
|
|
166
168
|
order: 10,
|
|
167
169
|
action: () => {
|
|
168
|
-
this.irisGrid.toggleFilterBar(
|
|
170
|
+
this.irisGrid.toggleFilterBar(visibleIndex);
|
|
169
171
|
}
|
|
170
172
|
});
|
|
171
173
|
actions.push({
|
|
172
174
|
title: 'Advanced Filters',
|
|
173
|
-
icon: advancedFilters.get(
|
|
175
|
+
icon: advancedFilters.get(modelIndex) ? dhFilterFilled : vsFilter,
|
|
174
176
|
iconColor: filterIconColor,
|
|
175
177
|
group: IrisGridContextMenuHandler.GROUP_FILTER,
|
|
176
178
|
order: 20,
|
|
177
179
|
action: () => {
|
|
178
|
-
this.irisGrid.handleAdvancedMenuOpened(
|
|
180
|
+
this.irisGrid.handleAdvancedMenuOpened(visibleIndex);
|
|
179
181
|
}
|
|
180
182
|
});
|
|
181
183
|
actions.push({
|
|
@@ -195,7 +197,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
195
197
|
iconColor: contextMenuSortIconColor,
|
|
196
198
|
group: IrisGridContextMenuHandler.GROUP_SORT,
|
|
197
199
|
order: 10,
|
|
198
|
-
actions: this.sortByActions(column,
|
|
200
|
+
actions: this.sortByActions(column, modelIndex, columnSort)
|
|
199
201
|
});
|
|
200
202
|
actions.push({
|
|
201
203
|
title: 'Add Additional Sort',
|
|
@@ -210,7 +212,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
210
212
|
disabled: columnSort && modelSort.length === 1 || hasReverse && modelSort.length === 1 || columnSort && hasReverse && modelSort.length === 2 || modelSort.length === 0,
|
|
211
213
|
group: IrisGridContextMenuHandler.GROUP_SORT,
|
|
212
214
|
order: 20,
|
|
213
|
-
actions: this.additionalSortActions(column,
|
|
215
|
+
actions: this.additionalSortActions(column, modelIndex)
|
|
214
216
|
});
|
|
215
217
|
actions.push({
|
|
216
218
|
title: 'Clear Table Sorting',
|
|
@@ -219,7 +221,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
219
221
|
modelSort.length === 0 || hasReverse && modelSort.length === 1,
|
|
220
222
|
group: IrisGridContextMenuHandler.GROUP_SORT,
|
|
221
223
|
action: () => {
|
|
222
|
-
this.irisGrid.sortColumn(
|
|
224
|
+
this.irisGrid.sortColumn(visibleIndex, IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.none);
|
|
223
225
|
},
|
|
224
226
|
order: 30
|
|
225
227
|
});
|
|
@@ -245,7 +247,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
245
247
|
group: IrisGridContextMenuHandler.GROUP_COPY,
|
|
246
248
|
action: () => {
|
|
247
249
|
var _model$textForColumnH;
|
|
248
|
-
copyToClipboard((_model$textForColumnH = model.textForColumnHeader(
|
|
250
|
+
copyToClipboard((_model$textForColumnH = model.textForColumnHeader(modelIndex)) !== null && _model$textForColumnH !== void 0 ? _model$textForColumnH : '').catch(e => log.error('Unable to copy header', e));
|
|
249
251
|
}
|
|
250
252
|
});
|
|
251
253
|
if (TableUtils.isDateType(column.type)) {
|
|
@@ -390,7 +392,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
390
392
|
shortcut: SHORTCUTS.TABLE.GOTO_ROW,
|
|
391
393
|
group: IrisGridContextMenuHandler.GROUP_GOTO,
|
|
392
394
|
order: 10,
|
|
393
|
-
action: () => this.irisGrid.toggleGotoRow("".concat(rowIndex + 1))
|
|
395
|
+
action: () => this.irisGrid.toggleGotoRow("".concat(rowIndex + 1), "".concat(value), column.name)
|
|
394
396
|
};
|
|
395
397
|
actions.push(gotoRow);
|
|
396
398
|
if (canCopy) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrisGridContextMenuHandler.js","names":["React","FontAwesomeIcon","dhFilterFilled","vsRemove","vsCheck","vsFilter","debounce","ContextActions","ContextActionUtils","GLOBAL_SHORTCUTS","GridMouseHandler","isEditableGridModel","dh","TableColumnFormatter","DateTimeColumnFormatter","TableUtils","Log","assertNotNull","copyToClipboard","DateTimeFormatContextMenu","DecimalFormatContextMenu","IntegerFormatContextMenu","SHORTCUTS","log","module","DEBOUNCE_UPDATE_FORMAT","CONTEXT_MENU_DATE_FORMAT","IrisGridContextMenuHandler","getQuickFilterCondition","columnFilter","newColumnFilter","operator","and","or","getQuickFilterText","filterText","newFilterText","getOperatorAsText","getNumberValueEqualsFilter","column","value","filter","Number","POSITIVE_INFINITY","FilterCondition","invoke","greaterThan","FilterValue","ofNumber","NEGATIVE_INFINITY","lessThan","isNaN","filterValue","getFilterValueForNumberOrChar","type","eq","columnType","isCharType","ofString","String","fromCharCode","constructor","irisGrid","debouncedUpdateCustomFormat","handleFormatSelection","componentWillUnmount","flush","getHeaderActions","modelColumn","gridPoint","columnIndex","model","props","columns","actions","metrics","reverseType","quickFilters","advancedFilters","searchFilter","state","theme","getTheme","filterIconColor","filterBarActiveColor","contextMenuSortIconColor","contextMenuReverseIconColor","modelSort","sort","columnSort","getSortForColumn","hasReverse","REVERSE_TYPE","NONE","userColumnWidths","isColumnHidden","values","some","columnWidth","isColumnFrozen","push","title","group","GROUP_HIDE_COLUMNS","action","hideColumnByVisibleIndex","unFreezeColumnByColumnName","name","freezeColumnByColumnName","order","showAllColumns","disabled","icon","iconColor","shortcut","TABLE","TOGGLE_QUICK_FILTER","GROUP_FILTER","toggleFilterBar","get","handleAdvancedMenuOpened","CLEAR_FILTERS","clearAllFilters","size","GROUP_SORT","sortByActions","length","additionalSortActions","sortColumn","COLUMN_SORT_DIRECTION","none","isReversible","REVERSE","reverse","POST_SORT","GROUP_COPY","textForColumnHeader","catch","e","error","isDateType","GROUP_FORMAT","dateFormatActions","isNumberType","numberFormatActions","undefined","getCellActions","grid","row","rowIndex","canCopy","modelRow","getModelRow","valueForCell","valueText","textForCell","settings","dateFilterFormatter","timeZone","showTimeZone","showTSeparator","defaultDateTimeFormatString","previewFilterFormatter","isFilterable","filterMenu","nullFilterActions","groups","high","isBooleanType","booleanFilterActions","numberValueText","numberFilterActions","dateValueText","format","previewValue","dateFilterActions","stringFilterActions","gotoRow","GOTO_ROW","GROUP_GOTO","toggleGotoRow","copyCell","onContextMenu","event","y","columnHeaderDepth","getModelColumn","isFilterBarShown","selectedRanges","columnHeaderHeight","gridY","columnHeaderMaxDepth","removeColumnFilter","has","COPY","copyRanges","isEditable","GROUP_EDIT","deleteRanges","gridWrapper","triggerMenu","pageX","pageY","formatter","selectedFormat","getColumnFormat","formatOptions","getOptions","description","isSelected","i","modelIndex","getColumnIndexByName","isDecimalType","isIntegerType","TYPE_CONTEXT_CUSTOM","quickFilter","newQuickFilter","text","menuElement","setQuickFilter","low","notEq","contains","not","isFinite","valueFilter","greaterThanOrEqualTo","lessThanOrEqualTo","isTrue","isFalse","isNull","sortActions","ascending","checkColumnSort","descending","color","isMacPlatform","direction","isAbs"],"sources":["../../src/mousehandlers/IrisGridContextMenuHandler.tsx"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport {\n dhFilterFilled,\n vsRemove,\n vsCheck,\n vsFilter,\n IconDefinition,\n} from '@deephaven/icons';\nimport debounce from 'lodash.debounce';\nimport {\n ContextAction,\n ContextActions,\n ContextActionUtils,\n GLOBAL_SHORTCUTS,\n} from '@deephaven/components';\nimport {\n EventHandlerResult,\n Grid,\n GridMouseHandler,\n GridPoint,\n isEditableGridModel,\n ModelIndex,\n VisibleIndex,\n} from '@deephaven/grid';\nimport dh, {\n Column,\n FilterCondition,\n FilterValue,\n Sort,\n} from '@deephaven/jsapi-shim';\nimport {\n TableColumnFormatter,\n DateTimeColumnFormatter,\n TableUtils,\n TableColumnFormat,\n IntegerColumnFormat,\n SortDirection,\n} from '@deephaven/jsapi-utils';\nimport Log from '@deephaven/log';\nimport type { DebouncedFunc } from 'lodash';\nimport { assertNotNull, copyToClipboard } from '@deephaven/utils';\nimport {\n DateTimeFormatContextMenu,\n DecimalFormatContextMenu,\n IntegerFormatContextMenu,\n} from '../format-context-menus';\nimport './IrisGridContextMenuHandler.scss';\nimport SHORTCUTS from '../IrisGridShortcuts';\nimport IrisGrid from '../IrisGrid';\nimport { QuickFilter } from '../CommonTypes';\n\nconst log = Log.module('IrisGridContextMenuHandler');\n\nconst DEBOUNCE_UPDATE_FORMAT = 150;\nconst CONTEXT_MENU_DATE_FORMAT = 'yyyy-MM-dd HH:mm:ss.SSSSSSSSS';\n\n/**\n * Used to eat the mouse event in the bottom right corner of the scroll bar\n */\nclass IrisGridContextMenuHandler extends GridMouseHandler {\n static GROUP_EDIT = ContextActions.groups.high + 10;\n\n static GROUP_HIDE_COLUMNS = ContextActions.groups.high + 25;\n\n static GROUP_FILTER = ContextActions.groups.high + 50;\n\n static GROUP_GOTO = ContextActions.groups.high + 51;\n\n static GROUP_SORT = ContextActions.groups.high + 75;\n\n static GROUP_COPY = ContextActions.groups.high + 100;\n\n static GROUP_FORMAT = ContextActions.groups.high + 150;\n\n static COLUMN_SORT_DIRECTION = {\n ascending: 'ASC',\n descending: 'DESC',\n none: null,\n } as const;\n\n /**\n * Get filter condition for quick filter and combines with a new filter using the operator specified,\n * returns new filter if no operator supplied.\n * @param columnFilter\n * @param newColumnFilter\n * @param operator\n */\n static getQuickFilterCondition(\n columnFilter: FilterCondition | null | undefined,\n newColumnFilter: FilterCondition,\n operator?: '&&' | '||' | null\n ): FilterCondition {\n if (columnFilter && operator === '&&') {\n return columnFilter.and(newColumnFilter);\n }\n if (columnFilter && operator === '||') {\n return columnFilter.or(newColumnFilter);\n }\n return newColumnFilter;\n }\n\n /**\n * combines filter text with operator if declared\n * @param filterText\n * @param newFilterText\n * @param operator\n */\n static getQuickFilterText(\n filterText: string | null | undefined,\n newFilterText: string,\n operator?: '&&' | '||' | null\n ): string {\n return operator && filterText != null\n ? `${filterText} ${operator} ${newFilterText}`\n : newFilterText;\n }\n\n /**\n * Converts operator to text string,\n */\n static getOperatorAsText(operator: '&&' | '||'): 'And' | 'Or' {\n return operator === '&&' ? 'And' : 'Or';\n }\n\n /**\n * Gets an equality filter for the provided numeric value\n * @param column The column to make the filter for\n * @param value The value to get the equality filter for\n */\n static getNumberValueEqualsFilter(\n column: Column,\n value: number\n ): FilterCondition {\n const columnFilter = column.filter();\n if (value === Number.POSITIVE_INFINITY) {\n return dh.FilterCondition.invoke('isInf', columnFilter).and(\n columnFilter.greaterThan(dh.FilterValue.ofNumber(0))\n );\n }\n if (value === Number.NEGATIVE_INFINITY) {\n return dh.FilterCondition.invoke('isInf', columnFilter).and(\n columnFilter.lessThan(dh.FilterValue.ofNumber(0))\n );\n }\n if (Number.isNaN(value)) {\n return dh.FilterCondition.invoke('isNaN', columnFilter);\n }\n\n const filterValue = IrisGridContextMenuHandler.getFilterValueForNumberOrChar(\n column.type,\n value\n );\n return columnFilter.eq(filterValue);\n }\n\n static getFilterValueForNumberOrChar(\n columnType: string,\n value: unknown\n ): FilterValue {\n return TableUtils.isCharType(columnType)\n ? dh.FilterValue.ofString(String.fromCharCode(value as number))\n : dh.FilterValue.ofNumber(value);\n }\n\n irisGrid: IrisGrid;\n\n debouncedUpdateCustomFormat: DebouncedFunc<\n (modelIndex: number, selectedFormat: TableColumnFormat | null) => void\n >;\n\n constructor(irisGrid: IrisGrid) {\n super();\n\n this.debouncedUpdateCustomFormat = debounce(\n irisGrid.handleFormatSelection,\n DEBOUNCE_UPDATE_FORMAT\n );\n\n this.irisGrid = irisGrid;\n }\n\n componentWillUnmount(): void {\n this.debouncedUpdateCustomFormat.flush();\n }\n\n getHeaderActions(modelColumn: number, gridPoint: GridPoint): ContextAction[] {\n const { irisGrid } = this;\n const { column: columnIndex } = gridPoint;\n assertNotNull(columnIndex);\n const { model } = irisGrid.props;\n const { columns } = model;\n const column = columns[modelColumn];\n\n const actions = [] as ContextAction[];\n\n const {\n metrics,\n reverseType,\n quickFilters,\n advancedFilters,\n searchFilter,\n } = irisGrid.state;\n const theme = irisGrid.getTheme();\n assertNotNull(metrics);\n const {\n filterIconColor,\n filterBarActiveColor,\n contextMenuSortIconColor,\n contextMenuReverseIconColor,\n } = theme;\n\n const modelSort = model.sort;\n const columnSort = TableUtils.getSortForColumn(modelSort, modelColumn);\n const hasReverse = reverseType !== TableUtils.REVERSE_TYPE.NONE;\n const { userColumnWidths } = metrics;\n const isColumnHidden = [...userColumnWidths.values()].some(\n columnWidth => columnWidth === 0\n );\n const isColumnFrozen = model.isColumnFrozen(columnIndex as VisibleIndex);\n actions.push({\n title: 'Hide Column',\n group: IrisGridContextMenuHandler.GROUP_HIDE_COLUMNS,\n action: () => {\n this.irisGrid.hideColumnByVisibleIndex(columnIndex as VisibleIndex);\n },\n });\n actions.push({\n title: isColumnFrozen ? 'Unfreeze Column' : 'Freeze Column',\n group: IrisGridContextMenuHandler.GROUP_HIDE_COLUMNS,\n action: () => {\n if (isColumnFrozen) {\n this.irisGrid.unFreezeColumnByColumnName(column.name);\n } else {\n this.irisGrid.freezeColumnByColumnName(column.name);\n }\n },\n order: 10,\n });\n actions.push({\n title: 'Show All Columns',\n group: IrisGridContextMenuHandler.GROUP_HIDE_COLUMNS,\n action: () => {\n this.irisGrid.showAllColumns();\n },\n disabled: !isColumnHidden,\n });\n actions.push({\n title: 'Quick Filters',\n icon: vsRemove,\n iconColor: filterBarActiveColor,\n shortcut: SHORTCUTS.TABLE.TOGGLE_QUICK_FILTER,\n group: IrisGridContextMenuHandler.GROUP_FILTER,\n order: 10,\n action: () => {\n this.irisGrid.toggleFilterBar(columnIndex);\n },\n });\n actions.push({\n title: 'Advanced Filters',\n icon: advancedFilters.get(modelColumn) ? dhFilterFilled : vsFilter,\n iconColor: filterIconColor,\n group: IrisGridContextMenuHandler.GROUP_FILTER,\n order: 20,\n action: () => {\n this.irisGrid.handleAdvancedMenuOpened(columnIndex);\n },\n });\n actions.push({\n title: 'Clear Table Filters',\n group: IrisGridContextMenuHandler.GROUP_FILTER,\n order: 40,\n // this just displays the shortcut, the actual listener is in irisgrid handleKeyDown\n shortcut: SHORTCUTS.TABLE.CLEAR_FILTERS,\n action: () => {\n this.irisGrid.clearAllFilters();\n },\n disabled: !(\n quickFilters.size > 0 ||\n advancedFilters.size > 0 ||\n searchFilter != null\n ),\n });\n actions.push({\n title: 'Sort by',\n icon: vsRemove,\n iconColor: contextMenuSortIconColor,\n group: IrisGridContextMenuHandler.GROUP_SORT,\n order: 10,\n actions: this.sortByActions(column, modelColumn, columnSort),\n });\n actions.push({\n title: 'Add Additional Sort',\n /**\n * disable conditions:\n * 1. table is sorted only by this column\n * 2. table is only reversed\n * 3. 1 & 2 combined\n * 4. table has no sort\n * reverse is a type of sort, so needs to be accounted for in exclusions\n * */\n disabled:\n (columnSort && modelSort.length === 1) ||\n (hasReverse && modelSort.length === 1) ||\n (columnSort && hasReverse && modelSort.length === 2) ||\n modelSort.length === 0,\n group: IrisGridContextMenuHandler.GROUP_SORT,\n order: 20,\n actions: this.additionalSortActions(column, modelColumn),\n });\n actions.push({\n title: 'Clear Table Sorting',\n disabled:\n // reverse is a type of sort, but special and needs to be exluded despite being part of model.sort\n modelSort.length === 0 || (hasReverse && modelSort.length === 1),\n group: IrisGridContextMenuHandler.GROUP_SORT,\n action: () => {\n this.irisGrid.sortColumn(\n columnIndex,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.none\n );\n },\n order: 30,\n });\n actions.push({\n title:\n reverseType === TableUtils.REVERSE_TYPE.NONE\n ? 'Reverse Table'\n : 'Clear Reverse Table',\n icon: vsRemove,\n iconColor: contextMenuReverseIconColor,\n group: IrisGridContextMenuHandler.GROUP_SORT,\n order: 40,\n disabled: !model.isReversible,\n // this just displays the shortcut, the actual listener is in irisgrid handleKeyDown\n shortcut: SHORTCUTS.TABLE.REVERSE,\n action: () => {\n if (reverseType === TableUtils.REVERSE_TYPE.NONE) {\n this.irisGrid.reverse(TableUtils.REVERSE_TYPE.POST_SORT);\n } else {\n this.irisGrid.reverse(TableUtils.REVERSE_TYPE.NONE);\n }\n },\n });\n actions.push({\n title: 'Copy Column Name',\n group: IrisGridContextMenuHandler.GROUP_COPY,\n action: () => {\n copyToClipboard(model.textForColumnHeader(modelColumn) ?? '').catch(e =>\n log.error('Unable to copy header', e)\n );\n },\n });\n\n if (TableUtils.isDateType(column.type)) {\n actions.push({\n title: 'Date/Time Format',\n group: IrisGridContextMenuHandler.GROUP_FORMAT,\n actions: this.dateFormatActions(column),\n });\n } else if (TableUtils.isNumberType(column.type)) {\n actions.push({\n title: 'Number Format',\n group: IrisGridContextMenuHandler.GROUP_FORMAT,\n actions: this.numberFormatActions(column) ?? undefined,\n });\n }\n return actions;\n }\n\n getCellActions(\n modelColumn: number | undefined | null,\n grid: Grid,\n gridPoint: GridPoint\n ): ContextAction[] {\n assertNotNull(modelColumn);\n const { irisGrid } = this;\n const { column: columnIndex, row: rowIndex } = gridPoint;\n const { model, canCopy } = irisGrid.props;\n const { columns } = model;\n const modelRow = irisGrid.getModelRow(rowIndex);\n assertNotNull(modelRow);\n const value = model.valueForCell(modelColumn, modelRow);\n\n const valueText = model.textForCell(modelColumn, modelRow);\n const column = columns[modelColumn];\n\n const actions = [] as ContextAction[];\n\n const { quickFilters } = irisGrid.state;\n const theme = irisGrid.getTheme();\n const { filterIconColor } = theme;\n const { settings } = irisGrid.props;\n\n const dateFilterFormatter = new DateTimeColumnFormatter({\n timeZone: settings?.timeZone,\n showTimeZone: false,\n showTSeparator: true,\n defaultDateTimeFormatString: CONTEXT_MENU_DATE_FORMAT,\n });\n const previewFilterFormatter = new DateTimeColumnFormatter({\n timeZone: settings?.timeZone,\n showTimeZone: settings?.showTimeZone,\n showTSeparator: settings?.showTSeparator,\n defaultDateTimeFormatString: CONTEXT_MENU_DATE_FORMAT,\n });\n\n if (column == null || rowIndex == null) return actions;\n\n // grid data area context menu options\n if (model.isFilterable(modelColumn)) {\n // cell data area contextmenu options\n const filterMenu = {\n title: 'Filter By Value',\n icon: vsRemove,\n iconColor: filterIconColor,\n group: IrisGridContextMenuHandler.GROUP_FILTER,\n order: 10,\n actions: [],\n } as {\n title: string;\n icon: IconDefinition;\n iconColor: string;\n group: number;\n order: number;\n actions: ContextAction[];\n };\n\n if (value == null) {\n if (quickFilters.get(modelColumn)) {\n filterMenu.actions.push({\n title: 'And',\n actions: this.nullFilterActions(\n column,\n quickFilters.get(modelColumn),\n '&&'\n ),\n order: 2,\n group: ContextActions.groups.high,\n });\n }\n filterMenu.actions.push(...this.nullFilterActions(column));\n } else if (TableUtils.isBooleanType(column.type)) {\n // boolean should have OR condition, and handles it's own null menu options\n if (quickFilters.get(modelColumn)) {\n filterMenu.actions.push({\n title: 'Or',\n actions: this.booleanFilterActions(\n column,\n valueText,\n quickFilters.get(modelColumn),\n '||'\n ),\n order: 2,\n group: ContextActions.groups.high,\n });\n }\n filterMenu.actions.push(\n ...this.booleanFilterActions(column, valueText)\n );\n } else if (\n TableUtils.isNumberType(column.type) ||\n TableUtils.isCharType(column.type)\n ) {\n // Chars get treated like numbers in terms of which filters are available\n assertNotNull(modelColumn);\n // We want to show the full unformatted value if it's a number, so user knows which value they are matching\n // If it's a Char we just show the char\n const numberValueText = TableUtils.isCharType(column.type)\n ? String.fromCharCode(value as number)\n : `${value}`;\n\n if (quickFilters.get(modelColumn)) {\n filterMenu.actions.push({\n title: 'And',\n actions: this.numberFilterActions(\n column,\n numberValueText,\n value,\n quickFilters.get(modelColumn),\n '&&'\n ),\n order: 2,\n group: ContextActions.groups.high,\n });\n }\n filterMenu.actions.push(\n ...this.numberFilterActions(\n column,\n numberValueText,\n value,\n quickFilters.get(modelColumn)\n )\n );\n } else if (TableUtils.isDateType(column.type)) {\n const dateValueText = dateFilterFormatter.format(value as Date);\n const previewValue = previewFilterFormatter.format(value as Date);\n if (quickFilters.get(modelColumn)) {\n filterMenu.actions.push({\n title: 'And',\n actions: this.dateFilterActions(\n column,\n dateValueText,\n previewValue,\n value,\n quickFilters.get(modelColumn),\n '&&'\n ),\n order: 2,\n group: ContextActions.groups.high,\n });\n }\n filterMenu.actions.push(\n ...this.dateFilterActions(\n column,\n dateValueText,\n previewValue,\n value,\n quickFilters.get(modelColumn)\n )\n );\n } else {\n if (quickFilters.get(modelColumn)) {\n filterMenu.actions.push({\n title: 'And',\n\n actions: this.stringFilterActions(\n column,\n valueText,\n value,\n quickFilters.get(modelColumn),\n '&&'\n ),\n order: 2,\n group: ContextActions.groups.high,\n });\n }\n filterMenu.actions.push(\n ...this.stringFilterActions(column, valueText, value)\n );\n }\n\n if (filterMenu.actions != null && filterMenu.actions.length > 0) {\n actions.push(filterMenu);\n }\n }\n\n const gotoRow = {\n title: 'Go to',\n iconColor: filterIconColor,\n shortcut: SHORTCUTS.TABLE.GOTO_ROW,\n group: IrisGridContextMenuHandler.GROUP_GOTO,\n order: 10,\n action: () => this.irisGrid.toggleGotoRow(`${rowIndex + 1}`),\n };\n actions.push(gotoRow);\n\n if (canCopy) {\n actions.push({\n title: 'Copy Cell',\n group: IrisGridContextMenuHandler.GROUP_COPY,\n order: 10,\n action: () => {\n irisGrid.copyCell(columnIndex, rowIndex);\n },\n });\n\n actions.push({\n title: 'Copy Cell Unformatted',\n group: IrisGridContextMenuHandler.GROUP_COPY,\n order: 20,\n action: () => {\n irisGrid.copyCell(columnIndex, rowIndex, true);\n },\n });\n }\n\n return actions;\n }\n\n onContextMenu(\n gridPoint: GridPoint,\n grid: Grid,\n event: React.MouseEvent<Element, MouseEvent>\n ): EventHandlerResult {\n const { irisGrid } = this;\n const {\n y,\n column: columnIndex,\n row: rowIndex,\n columnHeaderDepth,\n } = gridPoint;\n const modelColumn = irisGrid.getModelColumn(columnIndex);\n const modelRow = irisGrid.getModelRow(rowIndex);\n\n const { model, canCopy } = irisGrid.props;\n const { columns } = model;\n\n const {\n metrics,\n isFilterBarShown,\n quickFilters,\n advancedFilters,\n selectedRanges,\n } = irisGrid.state;\n\n assertNotNull(metrics);\n\n const { columnHeaderHeight, gridY, columnHeaderMaxDepth } = metrics;\n\n const actions = [] as ContextAction[];\n\n if (modelColumn != null && modelRow != null) {\n const value = model.valueForCell(modelColumn, modelRow);\n\n const valueText = model.textForCell(modelColumn, modelRow);\n const column = columns[modelColumn];\n\n const { onContextMenu } = irisGrid.props;\n\n if (column != null) {\n actions.push(\n onContextMenu({\n model,\n value,\n valueText,\n column,\n rowIndex,\n columnIndex,\n modelRow,\n modelColumn,\n })\n );\n }\n }\n\n if (modelColumn != null && model.isFilterable(modelColumn)) {\n // Clear column filter should still be available after last row\n // And should be available in both header and body context menus\n actions.push({\n title: 'Clear Column Filter',\n group: IrisGridContextMenuHandler.GROUP_FILTER,\n order: 30,\n action: () => {\n this.irisGrid.removeColumnFilter(modelColumn);\n },\n disabled: !(\n quickFilters.has(modelColumn) || advancedFilters.has(modelColumn)\n ),\n });\n }\n\n if (\n isFilterBarShown\n ? y <= gridY\n : y <= columnHeaderHeight * columnHeaderMaxDepth &&\n columnHeaderDepth === 0\n ) {\n // grid header context menu options\n if (modelColumn != null) {\n actions.push(...this.getHeaderActions(modelColumn, gridPoint));\n }\n } else {\n // grid body context menu options\n if (modelColumn != null && modelRow != null) {\n actions.push(...this.getCellActions(modelColumn, grid, gridPoint));\n }\n\n // blank space context menu options\n if (canCopy && selectedRanges.length > 0) {\n actions.push({\n title: 'Copy Selection',\n shortcut: GLOBAL_SHORTCUTS.COPY,\n group: IrisGridContextMenuHandler.GROUP_COPY,\n order: 30,\n action: () => {\n irisGrid.copyRanges(selectedRanges);\n },\n });\n\n actions.push({\n title: 'Copy Selection w/ Headers',\n group: IrisGridContextMenuHandler.GROUP_COPY,\n order: 40,\n action: () => {\n irisGrid.copyRanges(selectedRanges, true);\n },\n });\n }\n\n if (\n isEditableGridModel(model) &&\n model.isEditable &&\n selectedRanges.length > 0\n ) {\n actions.push({\n title: 'Delete Selected Rows',\n group: IrisGridContextMenuHandler.GROUP_EDIT,\n order: 50,\n action: () => {\n this.irisGrid.deleteRanges(selectedRanges);\n },\n });\n }\n }\n\n if (actions.length === 0) {\n return false;\n }\n\n assertNotNull(irisGrid.gridWrapper);\n\n ContextActions.triggerMenu(\n irisGrid.gridWrapper,\n event.pageX,\n event.pageY,\n actions\n );\n return true;\n }\n\n dateFormatActions(column: Column): ContextAction[] {\n const { model } = this.irisGrid.props;\n const { formatter } = model;\n const selectedFormat = formatter.getColumnFormat(column.type, column.name);\n\n const formatOptions = DateTimeFormatContextMenu.getOptions(\n formatter,\n selectedFormat\n );\n\n const actions = [];\n\n for (let i = 0; i < formatOptions.length; i += 1) {\n const { description, format, group, isSelected, title } = formatOptions[\n i\n ];\n actions.push({\n title,\n description,\n icon: isSelected ? vsCheck : undefined,\n group,\n order: i,\n action: () => {\n const modelIndex = model.getColumnIndexByName(column.name);\n assertNotNull(modelIndex);\n this.irisGrid.handleFormatSelection(modelIndex, format);\n },\n });\n }\n return actions;\n }\n\n numberFormatActions(column: Column): ContextAction[] | null {\n const { model } = this.irisGrid.props;\n const { formatter } = model;\n const selectedFormat = formatter.getColumnFormat(\n column.type,\n column.name\n ) as IntegerColumnFormat;\n let formatOptions;\n\n const columnIndex = model.getColumnIndexByName(column.name);\n if (TableUtils.isDecimalType(column.type)) {\n formatOptions = DecimalFormatContextMenu.getOptions(\n selectedFormat,\n format => {\n assertNotNull(columnIndex);\n this.debouncedUpdateCustomFormat(columnIndex, format);\n }\n );\n } else if (TableUtils.isIntegerType(column.type)) {\n formatOptions = IntegerFormatContextMenu.getOptions(\n selectedFormat,\n format => {\n assertNotNull(columnIndex);\n this.debouncedUpdateCustomFormat(columnIndex, format);\n }\n );\n } else {\n log.error('Invalid column type in numberFormatActions');\n return null;\n }\n\n const actions = [];\n\n for (let i = 0; i < formatOptions.length; i += 1) {\n const { format, isSelected } = formatOptions[i];\n actions.push({\n ...formatOptions[i],\n icon: isSelected ? vsCheck : undefined,\n order: i,\n action: () => {\n if (\n columnIndex === undefined &&\n format &&\n format.type === TableColumnFormatter.TYPE_CONTEXT_CUSTOM\n ) {\n return;\n }\n assertNotNull(columnIndex);\n this.irisGrid.handleFormatSelection(columnIndex, format);\n },\n });\n }\n return actions;\n }\n\n stringFilterActions(\n column: Column,\n valueText: string | null,\n value?: unknown,\n quickFilter?: QuickFilter,\n operator?: '&&' | '||' | null\n ): ContextAction[] {\n const filterValue = dh.FilterValue.ofString(value);\n let newQuickFilter:\n | {\n filter: null | FilterCondition | undefined;\n text: string | null;\n }\n | undefined\n | null = quickFilter;\n if (!newQuickFilter) {\n newQuickFilter = { filter: null, text: null };\n }\n const { filter, text: filterText } = newQuickFilter;\n const actions = [];\n const { model } = this.irisGrid.props;\n const columnIndex = model.getColumnIndexByName(column.name);\n assertNotNull(columnIndex);\n\n actions.push({\n menuElement: (\n <div className=\"iris-grid-filter-menu-item-value\">\n {operator\n ? IrisGridContextMenuHandler.getOperatorAsText(operator)\n : ''}{' '}\n "{valueText}"\n </div>\n ),\n order: 1,\n group: ContextActions.groups.high,\n });\n\n actions.push({\n title: 'text is exactly',\n description: `Show only rows where ${column.name} is ${value} (case sensitive)`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().eq(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `=${valueText}`,\n operator\n )\n );\n },\n order: 10,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'text is not exactly',\n description: `Show only rows where ${column.name} is not ${valueText} (case sensitive)`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().notEq(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `!=${valueText}`,\n operator\n )\n );\n },\n order: 20,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: `text contains`,\n description: `Show only rows where ${column.name} contains ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().contains(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `~${valueText}`,\n operator\n )\n );\n },\n order: 30,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'text does not contain',\n description: `Show only rows where ${column.name} does not contain ${value}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().contains(filterValue).not(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `!~${valueText}`,\n operator\n )\n );\n },\n order: 40,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'text starts with',\n description: `Show only rows where ${column.name} starts with ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().invoke('startsWith', filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `${valueText}*`,\n operator\n )\n );\n },\n order: 50,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'text ends with',\n description: `Show only rows where ${column.name} ends with ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().invoke('endsWith', filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `*${valueText}`,\n operator\n )\n );\n },\n order: 60,\n group: ContextActions.groups.low,\n });\n return actions;\n }\n\n numberFilterActions(\n column: Column,\n valueText: string,\n value: unknown,\n quickFilter?: QuickFilter | null,\n operator?: '&&' | '||' | null\n ): ContextAction[] {\n const filterValue = IrisGridContextMenuHandler.getFilterValueForNumberOrChar(\n column.type,\n value\n );\n let filter: FilterCondition | null = null;\n let filterText: string | null = null;\n if (quickFilter) {\n filter = quickFilter.filter;\n filterText = quickFilter.text;\n }\n const actions = [];\n const isFinite =\n value !== Number.POSITIVE_INFINITY &&\n value !== Number.NEGATIVE_INFINITY &&\n !Number.isNaN(value);\n const { model } = this.irisGrid.props;\n const columnIndex = model.getColumnIndexByName(column.name);\n assertNotNull(columnIndex);\n actions.push({\n menuElement: (\n <div className=\"iris-grid-filter-menu-item-value\">\n {operator\n ? IrisGridContextMenuHandler.getOperatorAsText(operator)\n : ''}{' '}\n "{valueText}"\n </div>\n ),\n order: 1,\n group: ContextActions.groups.high,\n });\n actions.push({\n title: 'is equal to',\n description: `Show only rows where ${column.name} is ${valueText}`,\n action: () => {\n const valueFilter = IrisGridContextMenuHandler.getNumberValueEqualsFilter(\n column,\n value as number\n );\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n valueFilter,\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `=${valueText}`,\n operator\n )\n );\n },\n order: 10,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'is not equal to',\n description: `Show only rows where ${column.name} is not ${valueText}`,\n action: () => {\n const valueFilter = IrisGridContextMenuHandler.getNumberValueEqualsFilter(\n column,\n value as number\n ).not();\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n valueFilter,\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `!=${valueText}`,\n operator\n )\n );\n },\n order: 20,\n group: ContextActions.groups.low,\n });\n\n // IDS-6092 Less/greater than filters don't make sense for Infinite/NaN\n // 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\n // They do not work in Powell though, so disable them.\n if (isFinite && !TableUtils.isCharType(column.type)) {\n actions.push({\n title: 'greater than',\n description: `Show only rows where ${column.name} is greater than ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().greaterThan(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `>${valueText}`,\n operator\n )\n );\n },\n order: 30,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'greater than or equal to',\n description: `Show only rows where ${column.name} is greater than or equal to ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().greaterThanOrEqualTo(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `>=${valueText}`,\n operator\n )\n );\n },\n order: 40,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'less than',\n description: `Show only rows where ${column.name} is less than ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().lessThan(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `<${valueText}`,\n operator\n )\n );\n },\n order: 50,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'less than or equal to',\n description: `Show only rows where ${column.name} is less than or equal to ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().lessThanOrEqualTo(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `<=${valueText}`,\n operator\n )\n );\n },\n order: 60,\n group: ContextActions.groups.low,\n });\n }\n return actions;\n }\n\n booleanFilterActions(\n column: Column,\n valueText: string | null,\n quickFilter?: QuickFilter | null,\n operator?: '&&' | '||' | null\n ): ContextAction[] {\n const actions: ContextAction[] = [];\n\n const { model } = this.irisGrid.props;\n const { filter, text: filterText } = quickFilter || {};\n const columnIndex = model.getColumnIndexByName(column.name);\n assertNotNull(columnIndex);\n\n actions.push({\n menuElement: (\n <div className=\"iris-grid-filter-menu-item-value\">\n {operator\n ? IrisGridContextMenuHandler.getOperatorAsText(operator)\n : ''}{' '}\n "{valueText ?? 'null'}"\n </div>\n ),\n order: 1,\n group: ContextActions.groups.high,\n });\n\n actions.push({\n title: 'true',\n description: `Show only rows where ${column.name} is true`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().isTrue(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n 'true',\n operator\n )\n );\n },\n order: 10,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'false',\n description: `Show only rows where ${column.name} is false`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().isFalse(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n 'false',\n operator\n )\n );\n },\n order: 20,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'is null',\n description: `Show only rows where ${column.name} is null`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().isNull(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n 'null',\n operator\n )\n );\n },\n order: 30,\n group: ContextActions.groups.low,\n });\n\n actions.push({\n title: 'is not null',\n description: `Show only rows where ${column.name} is not null`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().isNull().not(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n '!null',\n operator\n )\n );\n },\n order: 40,\n group: ContextActions.groups.low,\n });\n\n return actions;\n }\n\n dateFilterActions(\n column: Column,\n valueText: string,\n previewValue: unknown,\n value: unknown,\n quickFilter?: QuickFilter | null,\n operator?: '&&' | '||' | null\n ): ContextAction[] {\n const filterValue = dh.FilterValue.ofNumber(value);\n\n let filter: FilterCondition | null = null;\n let filterText: string | null = null;\n if (quickFilter) {\n filter = quickFilter.filter;\n filterText = quickFilter.text;\n }\n const { model } = this.irisGrid.props;\n const columnIndex = model.getColumnIndexByName(column.name);\n assertNotNull(columnIndex);\n\n const actions = [];\n\n actions.push({\n menuElement: (\n <div className=\"iris-grid-filter-menu-item-value\">\n {operator\n ? IrisGridContextMenuHandler.getOperatorAsText(operator)\n : ''}{' '}\n "{previewValue}"\n </div>\n ),\n order: 1,\n group: ContextActions.groups.high,\n });\n actions.push({\n title: 'date is',\n description: `Show only rows where ${column.name} is ${previewValue}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().eq(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `=${valueText}`,\n operator\n )\n );\n },\n order: 10,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'date is not',\n description: `Show only rows where ${column.name} is not ${previewValue}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().notEq(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `!=${valueText}`,\n operator\n )\n );\n },\n order: 20,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'date is before',\n description: `Show only rows where ${column.name} is before ${previewValue}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().lessThan(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `<${valueText}`,\n operator\n )\n );\n },\n order: 30,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'date is before or equal',\n description: `Show only rows where ${column.name} is before or equal to ${previewValue}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().lessThanOrEqualTo(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `<=${valueText}`,\n operator\n )\n );\n },\n order: 40,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'date is after',\n description: `Show only rows where ${column.name} is greater than ${previewValue}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().greaterThan(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `>${valueText}`,\n operator\n )\n );\n },\n order: 50,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'date is after or equal',\n description: `Show only rows where ${column.name} is after or equal to ${previewValue}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().greaterThanOrEqualTo(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `>=${valueText}`,\n operator\n )\n );\n },\n order: 60,\n group: ContextActions.groups.low,\n });\n return actions;\n }\n\n nullFilterActions(\n column: Column,\n quickFilter?: QuickFilter,\n operator?: '&&' | '||' | null\n ): ContextAction[] {\n let filter: FilterCondition | null = null;\n let filterText: string | null = null;\n if (quickFilter) {\n filter = quickFilter.filter;\n filterText = quickFilter.text;\n }\n const actions = [];\n const { model } = this.irisGrid.props;\n const columnIndex = model.getColumnIndexByName(column.name);\n assertNotNull(columnIndex);\n\n actions.push({\n menuElement: (\n <div className=\"iris-grid-filter-menu-item-value\">\n {operator\n ? IrisGridContextMenuHandler.getOperatorAsText(operator)\n : ''}{' '}\n "null"\n </div>\n ),\n order: 1,\n group: ContextActions.groups.high,\n });\n actions.push({\n title: 'is null',\n description: `Show only rows where ${column.name} is null`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().isNull(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n 'null',\n operator\n )\n );\n },\n order: 10,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'is not null',\n description: `Show only rows where ${column.name} is not null`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().isNull().not(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n '!null',\n operator\n )\n );\n },\n order: 20,\n group: ContextActions.groups.low,\n });\n\n return actions;\n }\n\n sortByActions(\n column: Column,\n modelColumn: ModelIndex,\n columnSort: Sort | null\n ): ContextAction[] {\n const theme = this.irisGrid.getTheme();\n const { contextMenuSortIconColor } = theme;\n const sortActions = [\n {\n title: `${column.name} Ascending`,\n order: 10,\n action: () => {\n this.irisGrid.sortColumn(\n modelColumn,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.ascending\n );\n },\n icon: this.checkColumnSort(\n columnSort,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.ascending\n )\n ? vsRemove\n : undefined,\n iconColor: contextMenuSortIconColor,\n },\n {\n title: `${column.name} Descending`,\n order: 20,\n action: () => {\n this.irisGrid.sortColumn(\n modelColumn,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.descending\n );\n },\n icon: this.checkColumnSort(\n columnSort,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.descending\n )\n ? vsRemove\n : undefined,\n iconColor: contextMenuSortIconColor,\n },\n {\n title: `Remove Sort`,\n order: 50,\n action: () => {\n this.irisGrid.sortColumn(\n modelColumn,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.none,\n false,\n true\n );\n },\n disabled: !columnSort,\n },\n ];\n if (TableUtils.isNumberType(column.type)) {\n sortActions.push({\n title: `ABS(${column.name}) Ascending`,\n order: 30,\n action: () => {\n this.irisGrid.sortColumn(\n modelColumn,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.ascending,\n true\n );\n },\n icon: this.checkColumnSort(\n columnSort,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.ascending,\n true\n )\n ? vsRemove\n : undefined,\n iconColor: contextMenuSortIconColor,\n });\n sortActions.push({\n title: `ABS(${column.name}) Descending`,\n order: 40,\n action: () => {\n this.irisGrid.sortColumn(\n modelColumn,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.descending,\n true\n );\n },\n icon: this.checkColumnSort(\n columnSort,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.descending,\n true\n )\n ? vsRemove\n : undefined,\n iconColor: contextMenuSortIconColor,\n });\n }\n return sortActions;\n }\n\n additionalSortActions(\n column: Column,\n columnIndex: ModelIndex\n ): ContextAction[] {\n const theme = this.irisGrid.getTheme();\n const { contextMenuSortIconColor } = theme;\n const additionalSortActions = [\n {\n title: 'Add Sort By',\n menuElement: (\n <div className=\"btn-context-menu menu-title\">\n <span className=\"icon\">\n <FontAwesomeIcon\n icon={vsRemove}\n style={{ color: contextMenuSortIconColor ?? undefined }}\n />\n </span>\n <span className=\"title\">Add Additional Sort</span>\n <span className=\"shortcut\">\n {ContextActionUtils.isMacPlatform() ? '⌘Click' : '^Click'}\n </span>\n </div>\n ),\n order: 1,\n },\n {\n title: `${column.name} Ascending`,\n order: 10,\n action: () => {\n this.irisGrid.sortColumn(\n columnIndex,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.ascending,\n false,\n true\n );\n },\n },\n {\n title: `${column.name} Descending`,\n order: 20,\n action: () => {\n this.irisGrid.sortColumn(\n columnIndex,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.descending,\n false,\n true\n );\n },\n },\n ];\n if (TableUtils.isNumberType(column.type)) {\n additionalSortActions.push({\n title: `ABS(${column.name}) Ascending`,\n order: 30,\n action: () => {\n this.irisGrid.sortColumn(\n columnIndex,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.ascending,\n true,\n true\n );\n },\n });\n additionalSortActions.push({\n title: `ABS(${column.name}) Descending`,\n order: 40,\n action: () => {\n this.irisGrid.sortColumn(\n columnIndex,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.descending,\n true,\n true\n );\n },\n });\n }\n return additionalSortActions;\n }\n\n checkColumnSort(\n columnSort?: Sort | null,\n direction: SortDirection = null,\n isAbs = false\n ): boolean {\n if (!columnSort) {\n return false;\n }\n return columnSort.direction === direction && columnSort.isAbs === isAbs;\n }\n}\n\nexport default IrisGridContextMenuHandler;\n"],"mappings":";;;;;AAAA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SACEC,cAAc,EACdC,QAAQ,EACRC,OAAO,EACPC,QAAQ,QAEH,kBAAkB;AACzB,OAAOC,QAAQ,MAAM,iBAAiB;AACtC,SAEEC,cAAc,EACdC,kBAAkB,EAClBC,gBAAgB,QACX,uBAAuB;AAC9B,SAGEC,gBAAgB,EAEhBC,mBAAmB,QAGd,iBAAiB;AACxB,OAAOC,EAAE,MAKF,uBAAuB;AAC9B,SACEC,oBAAoB,EACpBC,uBAAuB,EACvBC,UAAU,QAIL,wBAAwB;AAC/B,OAAOC,GAAG,MAAM,gBAAgB;AAEhC,SAASC,aAAa,EAAEC,eAAe,QAAQ,kBAAkB;AAAC,SAEhEC,yBAAyB,EACzBC,wBAAwB,EACxBC,wBAAwB;AAAA;AAAA,OAGnBC,SAAS;AAIhB,IAAMC,GAAG,GAAGP,GAAG,CAACQ,MAAM,CAAC,4BAA4B,CAAC;AAEpD,IAAMC,sBAAsB,GAAG,GAAG;AAClC,IAAMC,wBAAwB,GAAG,+BAA+B;;AAEhE;AACA;AACA;AACA,MAAMC,0BAA0B,SAASjB,gBAAgB,CAAC;EAqBxD;AACF;AACA;AACA;AACA;AACA;AACA;EACE,OAAOkB,uBAAuB,CAC5BC,YAAgD,EAChDC,eAAgC,EAChCC,QAA6B,EACZ;IACjB,IAAIF,YAAY,IAAIE,QAAQ,KAAK,IAAI,EAAE;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0B,wBAGFpB,cAAc,CAAC+J,MAAM,CAACC,IAAI,GAAG,EAAE;AAAA,gBAHvD5I,0BAA0B,kBAKRpB,cAAc,CAAC+J,MAAM,CAACC,IAAI,GAAG,EAAE;AAAA,gBALjD5I,0BAA0B,gBAOVpB,cAAc,CAAC+J,MAAM,CAACC,IAAI,GAAG,EAAE;AAAA,gBAP/C5I,0BAA0B,gBASVpB,cAAc,CAAC+J,MAAM,CAACC,IAAI,GAAG,EAAE;AAAA,gBAT/C5I,0BAA0B,gBAWVpB,cAAc,CAAC+J,MAAM,CAACC,IAAI,GAAG,GAAG;AAAA,gBAXhD5I,0BAA0B,kBAaRpB,cAAc,CAAC+J,MAAM,CAACC,IAAI,GAAG,GAAG;AAAA,gBAblD5I,0BAA0B,2BAeC;EAC7B8M,SAAS,EAAE,KAAK;EAChBE,UAAU,EAAE,MAAM;EAClBzG,IAAI,EAAE;AACR,CAAC;AAilDH,eAAevG,0BAA0B"}
|
|
1
|
+
{"version":3,"file":"IrisGridContextMenuHandler.js","names":["React","FontAwesomeIcon","dhFilterFilled","vsRemove","vsCheck","vsFilter","debounce","ContextActions","ContextActionUtils","GLOBAL_SHORTCUTS","GridMouseHandler","isEditableGridModel","dh","TableColumnFormatter","DateTimeColumnFormatter","TableUtils","Log","assertNotNull","copyToClipboard","DateTimeFormatContextMenu","DecimalFormatContextMenu","IntegerFormatContextMenu","SHORTCUTS","log","module","DEBOUNCE_UPDATE_FORMAT","CONTEXT_MENU_DATE_FORMAT","IrisGridContextMenuHandler","getQuickFilterCondition","columnFilter","newColumnFilter","operator","and","or","getQuickFilterText","filterText","newFilterText","getOperatorAsText","getNumberValueEqualsFilter","column","value","filter","Number","POSITIVE_INFINITY","FilterCondition","invoke","greaterThan","FilterValue","ofNumber","NEGATIVE_INFINITY","lessThan","isNaN","filterValue","getFilterValueForNumberOrChar","type","eq","columnType","isCharType","ofString","String","fromCharCode","constructor","irisGrid","debouncedUpdateCustomFormat","handleFormatSelection","componentWillUnmount","flush","getHeaderActions","modelIndex","gridPoint","visibleIndex","model","props","columns","actions","metrics","reverseType","quickFilters","advancedFilters","searchFilter","state","theme","getTheme","filterIconColor","filterBarActiveColor","contextMenuSortIconColor","contextMenuReverseIconColor","modelSort","sort","columnSort","getSortForColumn","hasReverse","REVERSE_TYPE","NONE","userColumnWidths","isColumnHidden","values","some","columnWidth","isColumnFreezable","getColumnHeaderParentGroup","undefined","isColumnFrozen","push","title","group","GROUP_HIDE_COLUMNS","action","hideColumnByVisibleIndex","disabled","unFreezeColumnByColumnName","name","freezeColumnByColumnName","order","showAllColumns","icon","iconColor","shortcut","TABLE","TOGGLE_QUICK_FILTER","GROUP_FILTER","toggleFilterBar","get","handleAdvancedMenuOpened","CLEAR_FILTERS","clearAllFilters","size","GROUP_SORT","sortByActions","length","additionalSortActions","sortColumn","COLUMN_SORT_DIRECTION","none","isReversible","REVERSE","reverse","POST_SORT","GROUP_COPY","textForColumnHeader","catch","e","error","isDateType","GROUP_FORMAT","dateFormatActions","isNumberType","numberFormatActions","getCellActions","modelColumn","grid","columnIndex","row","rowIndex","canCopy","modelRow","getModelRow","valueForCell","valueText","textForCell","settings","dateFilterFormatter","timeZone","showTimeZone","showTSeparator","defaultDateTimeFormatString","previewFilterFormatter","isFilterable","filterMenu","nullFilterActions","groups","high","isBooleanType","booleanFilterActions","numberValueText","numberFilterActions","dateValueText","format","previewValue","dateFilterActions","stringFilterActions","gotoRow","GOTO_ROW","GROUP_GOTO","toggleGotoRow","copyCell","onContextMenu","event","y","columnHeaderDepth","getModelColumn","isFilterBarShown","selectedRanges","columnHeaderHeight","gridY","columnHeaderMaxDepth","removeColumnFilter","has","COPY","copyRanges","isEditable","GROUP_EDIT","deleteRanges","gridWrapper","triggerMenu","pageX","pageY","formatter","selectedFormat","getColumnFormat","formatOptions","getOptions","description","isSelected","i","getColumnIndexByName","isDecimalType","isIntegerType","TYPE_CONTEXT_CUSTOM","quickFilter","newQuickFilter","text","menuElement","setQuickFilter","low","notEq","contains","not","isFinite","valueFilter","greaterThanOrEqualTo","lessThanOrEqualTo","isTrue","isFalse","isNull","sortActions","ascending","checkColumnSort","descending","color","isMacPlatform","direction","isAbs"],"sources":["../../src/mousehandlers/IrisGridContextMenuHandler.tsx"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport {\n dhFilterFilled,\n vsRemove,\n vsCheck,\n vsFilter,\n IconDefinition,\n} from '@deephaven/icons';\nimport debounce from 'lodash.debounce';\nimport {\n ContextAction,\n ContextActions,\n ContextActionUtils,\n GLOBAL_SHORTCUTS,\n} from '@deephaven/components';\nimport {\n EventHandlerResult,\n Grid,\n GridMouseHandler,\n GridPoint,\n isEditableGridModel,\n ModelIndex,\n} from '@deephaven/grid';\nimport dh, {\n Column,\n FilterCondition,\n FilterValue,\n Sort,\n} from '@deephaven/jsapi-shim';\nimport {\n TableColumnFormatter,\n DateTimeColumnFormatter,\n TableUtils,\n TableColumnFormat,\n IntegerColumnFormat,\n SortDirection,\n} from '@deephaven/jsapi-utils';\nimport Log from '@deephaven/log';\nimport type { DebouncedFunc } from 'lodash';\nimport { assertNotNull, copyToClipboard } from '@deephaven/utils';\nimport {\n DateTimeFormatContextMenu,\n DecimalFormatContextMenu,\n IntegerFormatContextMenu,\n} from '../format-context-menus';\nimport './IrisGridContextMenuHandler.scss';\nimport SHORTCUTS from '../IrisGridShortcuts';\nimport IrisGrid from '../IrisGrid';\nimport { QuickFilter } from '../CommonTypes';\n\nconst log = Log.module('IrisGridContextMenuHandler');\n\nconst DEBOUNCE_UPDATE_FORMAT = 150;\nconst CONTEXT_MENU_DATE_FORMAT = 'yyyy-MM-dd HH:mm:ss.SSSSSSSSS';\n\n/**\n * Used to eat the mouse event in the bottom right corner of the scroll bar\n */\nclass IrisGridContextMenuHandler extends GridMouseHandler {\n static GROUP_EDIT = ContextActions.groups.high + 10;\n\n static GROUP_HIDE_COLUMNS = ContextActions.groups.high + 25;\n\n static GROUP_FILTER = ContextActions.groups.high + 50;\n\n static GROUP_GOTO = ContextActions.groups.high + 51;\n\n static GROUP_SORT = ContextActions.groups.high + 75;\n\n static GROUP_COPY = ContextActions.groups.high + 100;\n\n static GROUP_FORMAT = ContextActions.groups.high + 150;\n\n static COLUMN_SORT_DIRECTION = {\n ascending: 'ASC',\n descending: 'DESC',\n none: null,\n } as const;\n\n /**\n * Get filter condition for quick filter and combines with a new filter using the operator specified,\n * returns new filter if no operator supplied.\n * @param columnFilter\n * @param newColumnFilter\n * @param operator\n */\n static getQuickFilterCondition(\n columnFilter: FilterCondition | null | undefined,\n newColumnFilter: FilterCondition,\n operator?: '&&' | '||' | null\n ): FilterCondition {\n if (columnFilter && operator === '&&') {\n return columnFilter.and(newColumnFilter);\n }\n if (columnFilter && operator === '||') {\n return columnFilter.or(newColumnFilter);\n }\n return newColumnFilter;\n }\n\n /**\n * combines filter text with operator if declared\n * @param filterText\n * @param newFilterText\n * @param operator\n */\n static getQuickFilterText(\n filterText: string | null | undefined,\n newFilterText: string,\n operator?: '&&' | '||' | null\n ): string {\n return operator && filterText != null\n ? `${filterText} ${operator} ${newFilterText}`\n : newFilterText;\n }\n\n /**\n * Converts operator to text string,\n */\n static getOperatorAsText(operator: '&&' | '||'): 'And' | 'Or' {\n return operator === '&&' ? 'And' : 'Or';\n }\n\n /**\n * Gets an equality filter for the provided numeric value\n * @param column The column to make the filter for\n * @param value The value to get the equality filter for\n */\n static getNumberValueEqualsFilter(\n column: Column,\n value: number\n ): FilterCondition {\n const columnFilter = column.filter();\n if (value === Number.POSITIVE_INFINITY) {\n return dh.FilterCondition.invoke('isInf', columnFilter).and(\n columnFilter.greaterThan(dh.FilterValue.ofNumber(0))\n );\n }\n if (value === Number.NEGATIVE_INFINITY) {\n return dh.FilterCondition.invoke('isInf', columnFilter).and(\n columnFilter.lessThan(dh.FilterValue.ofNumber(0))\n );\n }\n if (Number.isNaN(value)) {\n return dh.FilterCondition.invoke('isNaN', columnFilter);\n }\n\n const filterValue = IrisGridContextMenuHandler.getFilterValueForNumberOrChar(\n column.type,\n value\n );\n return columnFilter.eq(filterValue);\n }\n\n static getFilterValueForNumberOrChar(\n columnType: string,\n value: unknown\n ): FilterValue {\n return TableUtils.isCharType(columnType)\n ? dh.FilterValue.ofString(String.fromCharCode(value as number))\n : dh.FilterValue.ofNumber(value);\n }\n\n irisGrid: IrisGrid;\n\n debouncedUpdateCustomFormat: DebouncedFunc<\n (modelIndex: number, selectedFormat: TableColumnFormat | null) => void\n >;\n\n constructor(irisGrid: IrisGrid) {\n super();\n\n this.debouncedUpdateCustomFormat = debounce(\n irisGrid.handleFormatSelection,\n DEBOUNCE_UPDATE_FORMAT\n );\n\n this.irisGrid = irisGrid;\n }\n\n componentWillUnmount(): void {\n this.debouncedUpdateCustomFormat.flush();\n }\n\n getHeaderActions(\n modelIndex: ModelIndex,\n gridPoint: GridPoint\n ): ContextAction[] {\n const { irisGrid } = this;\n const { column: visibleIndex } = gridPoint;\n assertNotNull(visibleIndex);\n const { model } = irisGrid.props;\n const { columns } = model;\n const column = columns[modelIndex];\n\n const actions = [] as ContextAction[];\n\n const {\n metrics,\n reverseType,\n quickFilters,\n advancedFilters,\n searchFilter,\n } = irisGrid.state;\n const theme = irisGrid.getTheme();\n assertNotNull(metrics);\n const {\n filterIconColor,\n filterBarActiveColor,\n contextMenuSortIconColor,\n contextMenuReverseIconColor,\n } = theme;\n\n const modelSort = model.sort;\n const columnSort = TableUtils.getSortForColumn(modelSort, modelIndex);\n const hasReverse = reverseType !== TableUtils.REVERSE_TYPE.NONE;\n const { userColumnWidths } = metrics;\n const isColumnHidden = [...userColumnWidths.values()].some(\n columnWidth => columnWidth === 0\n );\n const isColumnFreezable =\n model.getColumnHeaderParentGroup(modelIndex, 0) === undefined;\n const isColumnFrozen = model.isColumnFrozen(modelIndex);\n actions.push({\n title: 'Hide Column',\n group: IrisGridContextMenuHandler.GROUP_HIDE_COLUMNS,\n action: () => {\n this.irisGrid.hideColumnByVisibleIndex(visibleIndex);\n },\n });\n actions.push({\n title: isColumnFrozen ? 'Unfreeze Column' : 'Freeze Column',\n group: IrisGridContextMenuHandler.GROUP_HIDE_COLUMNS,\n disabled: !isColumnFreezable,\n action: () => {\n if (isColumnFrozen) {\n this.irisGrid.unFreezeColumnByColumnName(column.name);\n } else {\n this.irisGrid.freezeColumnByColumnName(column.name);\n }\n },\n order: 10,\n });\n actions.push({\n title: 'Show All Columns',\n group: IrisGridContextMenuHandler.GROUP_HIDE_COLUMNS,\n action: () => {\n this.irisGrid.showAllColumns();\n },\n disabled: !isColumnHidden,\n });\n actions.push({\n title: 'Quick Filters',\n icon: vsRemove,\n iconColor: filterBarActiveColor,\n shortcut: SHORTCUTS.TABLE.TOGGLE_QUICK_FILTER,\n group: IrisGridContextMenuHandler.GROUP_FILTER,\n order: 10,\n action: () => {\n this.irisGrid.toggleFilterBar(visibleIndex);\n },\n });\n actions.push({\n title: 'Advanced Filters',\n icon: advancedFilters.get(modelIndex) ? dhFilterFilled : vsFilter,\n iconColor: filterIconColor,\n group: IrisGridContextMenuHandler.GROUP_FILTER,\n order: 20,\n action: () => {\n this.irisGrid.handleAdvancedMenuOpened(visibleIndex);\n },\n });\n actions.push({\n title: 'Clear Table Filters',\n group: IrisGridContextMenuHandler.GROUP_FILTER,\n order: 40,\n // this just displays the shortcut, the actual listener is in irisgrid handleKeyDown\n shortcut: SHORTCUTS.TABLE.CLEAR_FILTERS,\n action: () => {\n this.irisGrid.clearAllFilters();\n },\n disabled: !(\n quickFilters.size > 0 ||\n advancedFilters.size > 0 ||\n searchFilter != null\n ),\n });\n actions.push({\n title: 'Sort by',\n icon: vsRemove,\n iconColor: contextMenuSortIconColor,\n group: IrisGridContextMenuHandler.GROUP_SORT,\n order: 10,\n actions: this.sortByActions(column, modelIndex, columnSort),\n });\n actions.push({\n title: 'Add Additional Sort',\n /**\n * disable conditions:\n * 1. table is sorted only by this column\n * 2. table is only reversed\n * 3. 1 & 2 combined\n * 4. table has no sort\n * reverse is a type of sort, so needs to be accounted for in exclusions\n * */\n disabled:\n (columnSort && modelSort.length === 1) ||\n (hasReverse && modelSort.length === 1) ||\n (columnSort && hasReverse && modelSort.length === 2) ||\n modelSort.length === 0,\n group: IrisGridContextMenuHandler.GROUP_SORT,\n order: 20,\n actions: this.additionalSortActions(column, modelIndex),\n });\n actions.push({\n title: 'Clear Table Sorting',\n disabled:\n // reverse is a type of sort, but special and needs to be exluded despite being part of model.sort\n modelSort.length === 0 || (hasReverse && modelSort.length === 1),\n group: IrisGridContextMenuHandler.GROUP_SORT,\n action: () => {\n this.irisGrid.sortColumn(\n visibleIndex,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.none\n );\n },\n order: 30,\n });\n actions.push({\n title:\n reverseType === TableUtils.REVERSE_TYPE.NONE\n ? 'Reverse Table'\n : 'Clear Reverse Table',\n icon: vsRemove,\n iconColor: contextMenuReverseIconColor,\n group: IrisGridContextMenuHandler.GROUP_SORT,\n order: 40,\n disabled: !model.isReversible,\n // this just displays the shortcut, the actual listener is in irisgrid handleKeyDown\n shortcut: SHORTCUTS.TABLE.REVERSE,\n action: () => {\n if (reverseType === TableUtils.REVERSE_TYPE.NONE) {\n this.irisGrid.reverse(TableUtils.REVERSE_TYPE.POST_SORT);\n } else {\n this.irisGrid.reverse(TableUtils.REVERSE_TYPE.NONE);\n }\n },\n });\n actions.push({\n title: 'Copy Column Name',\n group: IrisGridContextMenuHandler.GROUP_COPY,\n action: () => {\n copyToClipboard(model.textForColumnHeader(modelIndex) ?? '').catch(e =>\n log.error('Unable to copy header', e)\n );\n },\n });\n\n if (TableUtils.isDateType(column.type)) {\n actions.push({\n title: 'Date/Time Format',\n group: IrisGridContextMenuHandler.GROUP_FORMAT,\n actions: this.dateFormatActions(column),\n });\n } else if (TableUtils.isNumberType(column.type)) {\n actions.push({\n title: 'Number Format',\n group: IrisGridContextMenuHandler.GROUP_FORMAT,\n actions: this.numberFormatActions(column) ?? undefined,\n });\n }\n return actions;\n }\n\n getCellActions(\n modelColumn: number | undefined | null,\n grid: Grid,\n gridPoint: GridPoint\n ): ContextAction[] {\n assertNotNull(modelColumn);\n const { irisGrid } = this;\n const { column: columnIndex, row: rowIndex } = gridPoint;\n const { model, canCopy } = irisGrid.props;\n const { columns } = model;\n const modelRow = irisGrid.getModelRow(rowIndex);\n assertNotNull(modelRow);\n const value = model.valueForCell(modelColumn, modelRow);\n\n const valueText = model.textForCell(modelColumn, modelRow);\n const column = columns[modelColumn];\n\n const actions = [] as ContextAction[];\n\n const { quickFilters } = irisGrid.state;\n const theme = irisGrid.getTheme();\n const { filterIconColor } = theme;\n const { settings } = irisGrid.props;\n\n const dateFilterFormatter = new DateTimeColumnFormatter({\n timeZone: settings?.timeZone,\n showTimeZone: false,\n showTSeparator: true,\n defaultDateTimeFormatString: CONTEXT_MENU_DATE_FORMAT,\n });\n const previewFilterFormatter = new DateTimeColumnFormatter({\n timeZone: settings?.timeZone,\n showTimeZone: settings?.showTimeZone,\n showTSeparator: settings?.showTSeparator,\n defaultDateTimeFormatString: CONTEXT_MENU_DATE_FORMAT,\n });\n\n if (column == null || rowIndex == null) return actions;\n\n // grid data area context menu options\n if (model.isFilterable(modelColumn)) {\n // cell data area contextmenu options\n const filterMenu = {\n title: 'Filter By Value',\n icon: vsRemove,\n iconColor: filterIconColor,\n group: IrisGridContextMenuHandler.GROUP_FILTER,\n order: 10,\n actions: [],\n } as {\n title: string;\n icon: IconDefinition;\n iconColor: string;\n group: number;\n order: number;\n actions: ContextAction[];\n };\n\n if (value == null) {\n if (quickFilters.get(modelColumn)) {\n filterMenu.actions.push({\n title: 'And',\n actions: this.nullFilterActions(\n column,\n quickFilters.get(modelColumn),\n '&&'\n ),\n order: 2,\n group: ContextActions.groups.high,\n });\n }\n filterMenu.actions.push(...this.nullFilterActions(column));\n } else if (TableUtils.isBooleanType(column.type)) {\n // boolean should have OR condition, and handles it's own null menu options\n if (quickFilters.get(modelColumn)) {\n filterMenu.actions.push({\n title: 'Or',\n actions: this.booleanFilterActions(\n column,\n valueText,\n quickFilters.get(modelColumn),\n '||'\n ),\n order: 2,\n group: ContextActions.groups.high,\n });\n }\n filterMenu.actions.push(\n ...this.booleanFilterActions(column, valueText)\n );\n } else if (\n TableUtils.isNumberType(column.type) ||\n TableUtils.isCharType(column.type)\n ) {\n // Chars get treated like numbers in terms of which filters are available\n assertNotNull(modelColumn);\n // We want to show the full unformatted value if it's a number, so user knows which value they are matching\n // If it's a Char we just show the char\n const numberValueText = TableUtils.isCharType(column.type)\n ? String.fromCharCode(value as number)\n : `${value}`;\n\n if (quickFilters.get(modelColumn)) {\n filterMenu.actions.push({\n title: 'And',\n actions: this.numberFilterActions(\n column,\n numberValueText,\n value,\n quickFilters.get(modelColumn),\n '&&'\n ),\n order: 2,\n group: ContextActions.groups.high,\n });\n }\n filterMenu.actions.push(\n ...this.numberFilterActions(\n column,\n numberValueText,\n value,\n quickFilters.get(modelColumn)\n )\n );\n } else if (TableUtils.isDateType(column.type)) {\n const dateValueText = dateFilterFormatter.format(value as Date);\n const previewValue = previewFilterFormatter.format(value as Date);\n if (quickFilters.get(modelColumn)) {\n filterMenu.actions.push({\n title: 'And',\n actions: this.dateFilterActions(\n column,\n dateValueText,\n previewValue,\n value,\n quickFilters.get(modelColumn),\n '&&'\n ),\n order: 2,\n group: ContextActions.groups.high,\n });\n }\n filterMenu.actions.push(\n ...this.dateFilterActions(\n column,\n dateValueText,\n previewValue,\n value,\n quickFilters.get(modelColumn)\n )\n );\n } else {\n if (quickFilters.get(modelColumn)) {\n filterMenu.actions.push({\n title: 'And',\n\n actions: this.stringFilterActions(\n column,\n valueText,\n value,\n quickFilters.get(modelColumn),\n '&&'\n ),\n order: 2,\n group: ContextActions.groups.high,\n });\n }\n filterMenu.actions.push(\n ...this.stringFilterActions(column, valueText, value)\n );\n }\n\n if (filterMenu.actions != null && filterMenu.actions.length > 0) {\n actions.push(filterMenu);\n }\n }\n\n const gotoRow = {\n title: 'Go to',\n iconColor: filterIconColor,\n shortcut: SHORTCUTS.TABLE.GOTO_ROW,\n group: IrisGridContextMenuHandler.GROUP_GOTO,\n order: 10,\n action: () =>\n this.irisGrid.toggleGotoRow(`${rowIndex + 1}`, `${value}`, column.name),\n };\n actions.push(gotoRow);\n\n if (canCopy) {\n actions.push({\n title: 'Copy Cell',\n group: IrisGridContextMenuHandler.GROUP_COPY,\n order: 10,\n action: () => {\n irisGrid.copyCell(columnIndex, rowIndex);\n },\n });\n\n actions.push({\n title: 'Copy Cell Unformatted',\n group: IrisGridContextMenuHandler.GROUP_COPY,\n order: 20,\n action: () => {\n irisGrid.copyCell(columnIndex, rowIndex, true);\n },\n });\n }\n\n return actions;\n }\n\n onContextMenu(\n gridPoint: GridPoint,\n grid: Grid,\n event: React.MouseEvent<Element, MouseEvent>\n ): EventHandlerResult {\n const { irisGrid } = this;\n const {\n y,\n column: columnIndex,\n row: rowIndex,\n columnHeaderDepth,\n } = gridPoint;\n const modelColumn = irisGrid.getModelColumn(columnIndex);\n const modelRow = irisGrid.getModelRow(rowIndex);\n\n const { model, canCopy } = irisGrid.props;\n const { columns } = model;\n\n const {\n metrics,\n isFilterBarShown,\n quickFilters,\n advancedFilters,\n selectedRanges,\n } = irisGrid.state;\n\n assertNotNull(metrics);\n\n const { columnHeaderHeight, gridY, columnHeaderMaxDepth } = metrics;\n\n const actions = [] as ContextAction[];\n\n if (modelColumn != null && modelRow != null) {\n const value = model.valueForCell(modelColumn, modelRow);\n\n const valueText = model.textForCell(modelColumn, modelRow);\n const column = columns[modelColumn];\n\n const { onContextMenu } = irisGrid.props;\n\n if (column != null) {\n actions.push(\n onContextMenu({\n model,\n value,\n valueText,\n column,\n rowIndex,\n columnIndex,\n modelRow,\n modelColumn,\n })\n );\n }\n }\n\n if (modelColumn != null && model.isFilterable(modelColumn)) {\n // Clear column filter should still be available after last row\n // And should be available in both header and body context menus\n actions.push({\n title: 'Clear Column Filter',\n group: IrisGridContextMenuHandler.GROUP_FILTER,\n order: 30,\n action: () => {\n this.irisGrid.removeColumnFilter(modelColumn);\n },\n disabled: !(\n quickFilters.has(modelColumn) || advancedFilters.has(modelColumn)\n ),\n });\n }\n\n if (\n isFilterBarShown\n ? y <= gridY\n : y <= columnHeaderHeight * columnHeaderMaxDepth &&\n columnHeaderDepth === 0\n ) {\n // grid header context menu options\n if (modelColumn != null) {\n actions.push(...this.getHeaderActions(modelColumn, gridPoint));\n }\n } else {\n // grid body context menu options\n if (modelColumn != null && modelRow != null) {\n actions.push(...this.getCellActions(modelColumn, grid, gridPoint));\n }\n\n // blank space context menu options\n if (canCopy && selectedRanges.length > 0) {\n actions.push({\n title: 'Copy Selection',\n shortcut: GLOBAL_SHORTCUTS.COPY,\n group: IrisGridContextMenuHandler.GROUP_COPY,\n order: 30,\n action: () => {\n irisGrid.copyRanges(selectedRanges);\n },\n });\n\n actions.push({\n title: 'Copy Selection w/ Headers',\n group: IrisGridContextMenuHandler.GROUP_COPY,\n order: 40,\n action: () => {\n irisGrid.copyRanges(selectedRanges, true);\n },\n });\n }\n\n if (\n isEditableGridModel(model) &&\n model.isEditable &&\n selectedRanges.length > 0\n ) {\n actions.push({\n title: 'Delete Selected Rows',\n group: IrisGridContextMenuHandler.GROUP_EDIT,\n order: 50,\n action: () => {\n this.irisGrid.deleteRanges(selectedRanges);\n },\n });\n }\n }\n\n if (actions.length === 0) {\n return false;\n }\n\n assertNotNull(irisGrid.gridWrapper);\n\n ContextActions.triggerMenu(\n irisGrid.gridWrapper,\n event.pageX,\n event.pageY,\n actions\n );\n return true;\n }\n\n dateFormatActions(column: Column): ContextAction[] {\n const { model } = this.irisGrid.props;\n const { formatter } = model;\n const selectedFormat = formatter.getColumnFormat(column.type, column.name);\n\n const formatOptions = DateTimeFormatContextMenu.getOptions(\n formatter,\n selectedFormat\n );\n\n const actions = [];\n\n for (let i = 0; i < formatOptions.length; i += 1) {\n const { description, format, group, isSelected, title } = formatOptions[\n i\n ];\n actions.push({\n title,\n description,\n icon: isSelected ? vsCheck : undefined,\n group,\n order: i,\n action: () => {\n const modelIndex = model.getColumnIndexByName(column.name);\n assertNotNull(modelIndex);\n this.irisGrid.handleFormatSelection(modelIndex, format);\n },\n });\n }\n return actions;\n }\n\n numberFormatActions(column: Column): ContextAction[] | null {\n const { model } = this.irisGrid.props;\n const { formatter } = model;\n const selectedFormat = formatter.getColumnFormat(\n column.type,\n column.name\n ) as IntegerColumnFormat;\n let formatOptions;\n\n const columnIndex = model.getColumnIndexByName(column.name);\n if (TableUtils.isDecimalType(column.type)) {\n formatOptions = DecimalFormatContextMenu.getOptions(\n selectedFormat,\n format => {\n assertNotNull(columnIndex);\n this.debouncedUpdateCustomFormat(columnIndex, format);\n }\n );\n } else if (TableUtils.isIntegerType(column.type)) {\n formatOptions = IntegerFormatContextMenu.getOptions(\n selectedFormat,\n format => {\n assertNotNull(columnIndex);\n this.debouncedUpdateCustomFormat(columnIndex, format);\n }\n );\n } else {\n log.error('Invalid column type in numberFormatActions');\n return null;\n }\n\n const actions = [];\n\n for (let i = 0; i < formatOptions.length; i += 1) {\n const { format, isSelected } = formatOptions[i];\n actions.push({\n ...formatOptions[i],\n icon: isSelected ? vsCheck : undefined,\n order: i,\n action: () => {\n if (\n columnIndex === undefined &&\n format &&\n format.type === TableColumnFormatter.TYPE_CONTEXT_CUSTOM\n ) {\n return;\n }\n assertNotNull(columnIndex);\n this.irisGrid.handleFormatSelection(columnIndex, format);\n },\n });\n }\n return actions;\n }\n\n stringFilterActions(\n column: Column,\n valueText: string | null,\n value?: unknown,\n quickFilter?: QuickFilter,\n operator?: '&&' | '||' | null\n ): ContextAction[] {\n const filterValue = dh.FilterValue.ofString(value);\n let newQuickFilter:\n | {\n filter: null | FilterCondition | undefined;\n text: string | null;\n }\n | undefined\n | null = quickFilter;\n if (!newQuickFilter) {\n newQuickFilter = { filter: null, text: null };\n }\n const { filter, text: filterText } = newQuickFilter;\n const actions = [];\n const { model } = this.irisGrid.props;\n const columnIndex = model.getColumnIndexByName(column.name);\n assertNotNull(columnIndex);\n\n actions.push({\n menuElement: (\n <div className=\"iris-grid-filter-menu-item-value\">\n {operator\n ? IrisGridContextMenuHandler.getOperatorAsText(operator)\n : ''}{' '}\n "{valueText}"\n </div>\n ),\n order: 1,\n group: ContextActions.groups.high,\n });\n\n actions.push({\n title: 'text is exactly',\n description: `Show only rows where ${column.name} is ${value} (case sensitive)`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().eq(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `=${valueText}`,\n operator\n )\n );\n },\n order: 10,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'text is not exactly',\n description: `Show only rows where ${column.name} is not ${valueText} (case sensitive)`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().notEq(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `!=${valueText}`,\n operator\n )\n );\n },\n order: 20,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: `text contains`,\n description: `Show only rows where ${column.name} contains ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().contains(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `~${valueText}`,\n operator\n )\n );\n },\n order: 30,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'text does not contain',\n description: `Show only rows where ${column.name} does not contain ${value}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().contains(filterValue).not(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `!~${valueText}`,\n operator\n )\n );\n },\n order: 40,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'text starts with',\n description: `Show only rows where ${column.name} starts with ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().invoke('startsWith', filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `${valueText}*`,\n operator\n )\n );\n },\n order: 50,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'text ends with',\n description: `Show only rows where ${column.name} ends with ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().invoke('endsWith', filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `*${valueText}`,\n operator\n )\n );\n },\n order: 60,\n group: ContextActions.groups.low,\n });\n return actions;\n }\n\n numberFilterActions(\n column: Column,\n valueText: string,\n value: unknown,\n quickFilter?: QuickFilter | null,\n operator?: '&&' | '||' | null\n ): ContextAction[] {\n const filterValue = IrisGridContextMenuHandler.getFilterValueForNumberOrChar(\n column.type,\n value\n );\n let filter: FilterCondition | null = null;\n let filterText: string | null = null;\n if (quickFilter) {\n filter = quickFilter.filter;\n filterText = quickFilter.text;\n }\n const actions = [];\n const isFinite =\n value !== Number.POSITIVE_INFINITY &&\n value !== Number.NEGATIVE_INFINITY &&\n !Number.isNaN(value);\n const { model } = this.irisGrid.props;\n const columnIndex = model.getColumnIndexByName(column.name);\n assertNotNull(columnIndex);\n actions.push({\n menuElement: (\n <div className=\"iris-grid-filter-menu-item-value\">\n {operator\n ? IrisGridContextMenuHandler.getOperatorAsText(operator)\n : ''}{' '}\n "{valueText}"\n </div>\n ),\n order: 1,\n group: ContextActions.groups.high,\n });\n actions.push({\n title: 'is equal to',\n description: `Show only rows where ${column.name} is ${valueText}`,\n action: () => {\n const valueFilter = IrisGridContextMenuHandler.getNumberValueEqualsFilter(\n column,\n value as number\n );\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n valueFilter,\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `=${valueText}`,\n operator\n )\n );\n },\n order: 10,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'is not equal to',\n description: `Show only rows where ${column.name} is not ${valueText}`,\n action: () => {\n const valueFilter = IrisGridContextMenuHandler.getNumberValueEqualsFilter(\n column,\n value as number\n ).not();\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n valueFilter,\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `!=${valueText}`,\n operator\n )\n );\n },\n order: 20,\n group: ContextActions.groups.low,\n });\n\n // IDS-6092 Less/greater than filters don't make sense for Infinite/NaN\n // 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\n // They do not work in Powell though, so disable them.\n if (isFinite && !TableUtils.isCharType(column.type)) {\n actions.push({\n title: 'greater than',\n description: `Show only rows where ${column.name} is greater than ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().greaterThan(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `>${valueText}`,\n operator\n )\n );\n },\n order: 30,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'greater than or equal to',\n description: `Show only rows where ${column.name} is greater than or equal to ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().greaterThanOrEqualTo(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `>=${valueText}`,\n operator\n )\n );\n },\n order: 40,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'less than',\n description: `Show only rows where ${column.name} is less than ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().lessThan(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `<${valueText}`,\n operator\n )\n );\n },\n order: 50,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'less than or equal to',\n description: `Show only rows where ${column.name} is less than or equal to ${valueText}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().lessThanOrEqualTo(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `<=${valueText}`,\n operator\n )\n );\n },\n order: 60,\n group: ContextActions.groups.low,\n });\n }\n return actions;\n }\n\n booleanFilterActions(\n column: Column,\n valueText: string | null,\n quickFilter?: QuickFilter | null,\n operator?: '&&' | '||' | null\n ): ContextAction[] {\n const actions: ContextAction[] = [];\n\n const { model } = this.irisGrid.props;\n const { filter, text: filterText } = quickFilter || {};\n const columnIndex = model.getColumnIndexByName(column.name);\n assertNotNull(columnIndex);\n\n actions.push({\n menuElement: (\n <div className=\"iris-grid-filter-menu-item-value\">\n {operator\n ? IrisGridContextMenuHandler.getOperatorAsText(operator)\n : ''}{' '}\n "{valueText ?? 'null'}"\n </div>\n ),\n order: 1,\n group: ContextActions.groups.high,\n });\n\n actions.push({\n title: 'true',\n description: `Show only rows where ${column.name} is true`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().isTrue(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n 'true',\n operator\n )\n );\n },\n order: 10,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'false',\n description: `Show only rows where ${column.name} is false`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().isFalse(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n 'false',\n operator\n )\n );\n },\n order: 20,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'is null',\n description: `Show only rows where ${column.name} is null`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().isNull(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n 'null',\n operator\n )\n );\n },\n order: 30,\n group: ContextActions.groups.low,\n });\n\n actions.push({\n title: 'is not null',\n description: `Show only rows where ${column.name} is not null`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().isNull().not(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n '!null',\n operator\n )\n );\n },\n order: 40,\n group: ContextActions.groups.low,\n });\n\n return actions;\n }\n\n dateFilterActions(\n column: Column,\n valueText: string,\n previewValue: unknown,\n value: unknown,\n quickFilter?: QuickFilter | null,\n operator?: '&&' | '||' | null\n ): ContextAction[] {\n const filterValue = dh.FilterValue.ofNumber(value);\n\n let filter: FilterCondition | null = null;\n let filterText: string | null = null;\n if (quickFilter) {\n filter = quickFilter.filter;\n filterText = quickFilter.text;\n }\n const { model } = this.irisGrid.props;\n const columnIndex = model.getColumnIndexByName(column.name);\n assertNotNull(columnIndex);\n\n const actions = [];\n\n actions.push({\n menuElement: (\n <div className=\"iris-grid-filter-menu-item-value\">\n {operator\n ? IrisGridContextMenuHandler.getOperatorAsText(operator)\n : ''}{' '}\n "{previewValue}"\n </div>\n ),\n order: 1,\n group: ContextActions.groups.high,\n });\n actions.push({\n title: 'date is',\n description: `Show only rows where ${column.name} is ${previewValue}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().eq(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `=${valueText}`,\n operator\n )\n );\n },\n order: 10,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'date is not',\n description: `Show only rows where ${column.name} is not ${previewValue}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().notEq(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `!=${valueText}`,\n operator\n )\n );\n },\n order: 20,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'date is before',\n description: `Show only rows where ${column.name} is before ${previewValue}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().lessThan(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `<${valueText}`,\n operator\n )\n );\n },\n order: 30,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'date is before or equal',\n description: `Show only rows where ${column.name} is before or equal to ${previewValue}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().lessThanOrEqualTo(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `<=${valueText}`,\n operator\n )\n );\n },\n order: 40,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'date is after',\n description: `Show only rows where ${column.name} is greater than ${previewValue}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().greaterThan(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `>${valueText}`,\n operator\n )\n );\n },\n order: 50,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'date is after or equal',\n description: `Show only rows where ${column.name} is after or equal to ${previewValue}`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().greaterThanOrEqualTo(filterValue),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n `>=${valueText}`,\n operator\n )\n );\n },\n order: 60,\n group: ContextActions.groups.low,\n });\n return actions;\n }\n\n nullFilterActions(\n column: Column,\n quickFilter?: QuickFilter,\n operator?: '&&' | '||' | null\n ): ContextAction[] {\n let filter: FilterCondition | null = null;\n let filterText: string | null = null;\n if (quickFilter) {\n filter = quickFilter.filter;\n filterText = quickFilter.text;\n }\n const actions = [];\n const { model } = this.irisGrid.props;\n const columnIndex = model.getColumnIndexByName(column.name);\n assertNotNull(columnIndex);\n\n actions.push({\n menuElement: (\n <div className=\"iris-grid-filter-menu-item-value\">\n {operator\n ? IrisGridContextMenuHandler.getOperatorAsText(operator)\n : ''}{' '}\n "null"\n </div>\n ),\n order: 1,\n group: ContextActions.groups.high,\n });\n actions.push({\n title: 'is null',\n description: `Show only rows where ${column.name} is null`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().isNull(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n 'null',\n operator\n )\n );\n },\n order: 10,\n group: ContextActions.groups.low,\n });\n actions.push({\n title: 'is not null',\n description: `Show only rows where ${column.name} is not null`,\n action: () => {\n this.irisGrid.setQuickFilter(\n columnIndex,\n IrisGridContextMenuHandler.getQuickFilterCondition(\n filter,\n column.filter().isNull().not(),\n operator\n ),\n IrisGridContextMenuHandler.getQuickFilterText(\n filterText,\n '!null',\n operator\n )\n );\n },\n order: 20,\n group: ContextActions.groups.low,\n });\n\n return actions;\n }\n\n sortByActions(\n column: Column,\n modelColumn: ModelIndex,\n columnSort: Sort | null\n ): ContextAction[] {\n const theme = this.irisGrid.getTheme();\n const { contextMenuSortIconColor } = theme;\n const sortActions = [\n {\n title: `${column.name} Ascending`,\n order: 10,\n action: () => {\n this.irisGrid.sortColumn(\n modelColumn,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.ascending\n );\n },\n icon: this.checkColumnSort(\n columnSort,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.ascending\n )\n ? vsRemove\n : undefined,\n iconColor: contextMenuSortIconColor,\n },\n {\n title: `${column.name} Descending`,\n order: 20,\n action: () => {\n this.irisGrid.sortColumn(\n modelColumn,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.descending\n );\n },\n icon: this.checkColumnSort(\n columnSort,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.descending\n )\n ? vsRemove\n : undefined,\n iconColor: contextMenuSortIconColor,\n },\n {\n title: `Remove Sort`,\n order: 50,\n action: () => {\n this.irisGrid.sortColumn(\n modelColumn,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.none,\n false,\n true\n );\n },\n disabled: !columnSort,\n },\n ];\n if (TableUtils.isNumberType(column.type)) {\n sortActions.push({\n title: `ABS(${column.name}) Ascending`,\n order: 30,\n action: () => {\n this.irisGrid.sortColumn(\n modelColumn,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.ascending,\n true\n );\n },\n icon: this.checkColumnSort(\n columnSort,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.ascending,\n true\n )\n ? vsRemove\n : undefined,\n iconColor: contextMenuSortIconColor,\n });\n sortActions.push({\n title: `ABS(${column.name}) Descending`,\n order: 40,\n action: () => {\n this.irisGrid.sortColumn(\n modelColumn,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.descending,\n true\n );\n },\n icon: this.checkColumnSort(\n columnSort,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.descending,\n true\n )\n ? vsRemove\n : undefined,\n iconColor: contextMenuSortIconColor,\n });\n }\n return sortActions;\n }\n\n additionalSortActions(\n column: Column,\n columnIndex: ModelIndex\n ): ContextAction[] {\n const theme = this.irisGrid.getTheme();\n const { contextMenuSortIconColor } = theme;\n const additionalSortActions = [\n {\n title: 'Add Sort By',\n menuElement: (\n <div className=\"btn-context-menu menu-title\">\n <span className=\"icon\">\n <FontAwesomeIcon\n icon={vsRemove}\n style={{ color: contextMenuSortIconColor ?? undefined }}\n />\n </span>\n <span className=\"title\">Add Additional Sort</span>\n <span className=\"shortcut\">\n {ContextActionUtils.isMacPlatform() ? '⌘Click' : '^Click'}\n </span>\n </div>\n ),\n order: 1,\n },\n {\n title: `${column.name} Ascending`,\n order: 10,\n action: () => {\n this.irisGrid.sortColumn(\n columnIndex,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.ascending,\n false,\n true\n );\n },\n },\n {\n title: `${column.name} Descending`,\n order: 20,\n action: () => {\n this.irisGrid.sortColumn(\n columnIndex,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.descending,\n false,\n true\n );\n },\n },\n ];\n if (TableUtils.isNumberType(column.type)) {\n additionalSortActions.push({\n title: `ABS(${column.name}) Ascending`,\n order: 30,\n action: () => {\n this.irisGrid.sortColumn(\n columnIndex,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.ascending,\n true,\n true\n );\n },\n });\n additionalSortActions.push({\n title: `ABS(${column.name}) Descending`,\n order: 40,\n action: () => {\n this.irisGrid.sortColumn(\n columnIndex,\n IrisGridContextMenuHandler.COLUMN_SORT_DIRECTION.descending,\n true,\n true\n );\n },\n });\n }\n return additionalSortActions;\n }\n\n checkColumnSort(\n columnSort?: Sort | null,\n direction: SortDirection = null,\n isAbs = false\n ): boolean {\n if (!columnSort) {\n return false;\n }\n return columnSort.direction === direction && columnSort.isAbs === isAbs;\n }\n}\n\nexport default IrisGridContextMenuHandler;\n"],"mappings":";;;;;AAAA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SACEC,cAAc,EACdC,QAAQ,EACRC,OAAO,EACPC,QAAQ,QAEH,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