@deephaven/iris-grid 0.32.1-demo.2 → 0.32.1-table-plugins.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"IrisGridContextMenuHandler.js","names":["React","FontAwesomeIcon","dhFilterFilled","vsRemove","vsCheck","vsFilter","debounce","ContextActions","ContextActionUtils","GLOBAL_SHORTCUTS","GridMouseHandler","GridRenderer","isEditableGridModel","isExpandableGridModel","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","getRowOptionFormatted","command","cellValue","len","truncate","length","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","name","hasReverse","REVERSE_TYPE","NONE","userColumnWidths","isColumnHidden","values","some","columnWidth","isColumnFreezable","getColumnHeaderParentGroup","undefined","isColumnFrozen","push","title","group","GROUP_HIDE_COLUMNS","action","hideColumnByVisibleIndex","disabled","unFreezeColumnByColumnName","freezeColumnByColumnName","order","showAllColumns","icon","iconColor","shortcut","TABLE","TOGGLE_QUICK_FILTER","GROUP_FILTER","toggleFilterBar","get","handleAdvancedMenuOpened","CLEAR_FILTERS","clearAllFilters","size","GROUP_SORT","sortByActions","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","isRowExpandable","expandingColumn","groupedColumns","depthForRow","cellText","isRowExpanded","GROUP_EXPAND_COLLAPSE","setRowExpanded","isExpandAllAvailable","hasExpandableRows","expandAll","collapseAll","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 GridRenderer,\n isEditableGridModel,\n isExpandableGridModel,\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_EXPAND_COLLAPSE = ContextActions.groups.high + 55;\n\n static GROUP_GOTO = ContextActions.groups.high + 60;\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 static getRowOptionFormatted(\n command: string,\n cellValue: string,\n len = 30\n ): string {\n return `${command} \"${GridRenderer.truncate(\n cellValue,\n len - command.length - 3\n )}\"`;\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, column.name);\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 // Expand/Collapse options\n if (isExpandableGridModel(model) && model.isRowExpandable(modelRow)) {\n // If there are grouped columns, then it is a rollup\n // For rollups, the column number will be the depth minus one\n const expandingColumn =\n model.groupedColumns.length > 0 ? model.depthForRow(modelRow) - 1 : 0;\n const cellValue = model.valueForCell(expandingColumn, modelRow);\n const cellText =\n cellValue == null\n ? 'null'\n : model.textForCell(expandingColumn, modelRow);\n\n actions.push({\n title: IrisGridContextMenuHandler.getRowOptionFormatted(\n model.isRowExpanded(modelRow) ? 'Collapse' : 'Expand',\n cellText\n ),\n group: IrisGridContextMenuHandler.GROUP_EXPAND_COLLAPSE,\n order: 10,\n action: () => {\n model.setRowExpanded(modelRow, !model.isRowExpanded(modelRow));\n },\n });\n\n if (model.isExpandAllAvailable === true) {\n actions.push({\n title: IrisGridContextMenuHandler.getRowOptionFormatted(\n 'Expand All in',\n cellText\n ),\n group: IrisGridContextMenuHandler.GROUP_EXPAND_COLLAPSE,\n order: 20,\n action: () => {\n model.setRowExpanded(modelRow, true, true);\n },\n });\n }\n }\n\n if (\n isExpandableGridModel(model) &&\n model.hasExpandableRows &&\n model.isExpandAllAvailable === true\n ) {\n actions.push({\n title: 'Expand Entire Table',\n group: IrisGridContextMenuHandler.GROUP_EXPAND_COLLAPSE,\n order: 30,\n action: () => {\n model.expandAll();\n },\n });\n\n actions.push({\n title: 'Collapse Entire Table',\n group: IrisGridContextMenuHandler.GROUP_EXPAND_COLLAPSE,\n order: 40,\n action: () => {\n model.collapseAll();\n },\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 &quot;{valueText}&quot;\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 &quot;{valueText}&quot;\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 &quot;{valueText ?? 'null'}&quot;\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 &quot;{previewValue}&quot;\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 &quot;null&quot;\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' : 'Ctrl+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,YAAY,EACZC,mBAAmB,EACnBC,qBAAqB,QAEhB,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,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AAKA,KAAK;EACzE;AACF;AAAC,gBArrDKxO,0BAA0B,gBACVtB,cAAc,CAAC0K,MAAM,CAACC,IAAI,GAAG,EAAE;AAAA,gBAD/CrJ,0BAA0B,wBAGFtB,cAAc,CAAC0K,MAAM,CAACC,IAAI,GAAG,EAAE;AAAA,gBAHvDrJ,0BAA0B,kBAKRtB,cAAc,CAAC0K,MAAM,CAACC,IAAI,GAAG,EAAE;AAAA,gBALjDrJ,0BAA0B,2BAOCtB,cAAc,CAAC0K,MAAM,CAACC,IAAI,GAAG,EAAE;AAAA,gBAP1DrJ,0BAA0B,gBASVtB,cAAc,CAAC0K,MAAM,CAACC,IAAI,GAAG,EAAE;AAAA,gBAT/CrJ,0BAA0B,gBAWVtB,cAAc,CAAC0K,MAAM,CAACC,IAAI,GAAG,EAAE;AAAA,gBAX/CrJ,0BAA0B,gBAaVtB,cAAc,CAAC0K,MAAM,CAACC,IAAI,GAAG,GAAG;AAAA,gBAbhDrJ,0BAA0B,kBAeRtB,cAAc,CAAC0K,MAAM,CAACC,IAAI,GAAG,GAAG;AAAA,gBAflDrJ,0BAA0B,2BAiBC;EAC7BkO,SAAS,EAAE,KAAK;EAChBE,UAAU,EAAE,MAAM;EAClBrH,IAAI,EAAE;AACR,CAAC;AAkqDH,eAAe/G,0BAA0B"}
1
+ {"version":3,"file":"IrisGridContextMenuHandler.js","names":["React","FontAwesomeIcon","dhFilterFilled","vsRemove","vsCheck","vsFilter","debounce","ContextActions","ContextActionUtils","GLOBAL_SHORTCUTS","GridMouseHandler","GridRenderer","isEditableGridModel","isExpandableGridModel","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","getRowOptionFormatted","command","cellValue","len","truncate","length","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","name","hasReverse","REVERSE_TYPE","NONE","userColumnWidths","isColumnHidden","values","some","columnWidth","isColumnFreezable","getColumnHeaderParentGroup","undefined","isColumnFrozen","push","title","group","GROUP_HIDE_COLUMNS","action","hideColumnByVisibleIndex","disabled","unFreezeColumnByColumnName","freezeColumnByColumnName","order","showAllColumns","icon","iconColor","shortcut","TABLE","TOGGLE_QUICK_FILTER","GROUP_FILTER","toggleFilterBar","get","handleAdvancedMenuOpened","CLEAR_FILTERS","clearAllFilters","size","GROUP_SORT","sortByActions","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","isRowExpandable","expandingColumn","groupedColumns","depthForRow","cellText","isRowExpanded","GROUP_EXPAND_COLLAPSE","setRowExpanded","isExpandAllAvailable","hasExpandableRows","expandAll","collapseAll","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 ResolvableContextAction,\n} from '@deephaven/components';\nimport {\n EventHandlerResult,\n Grid,\n GridMouseHandler,\n GridPoint,\n GridRenderer,\n isEditableGridModel,\n isExpandableGridModel,\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_EXPAND_COLLAPSE = ContextActions.groups.high + 55;\n\n static GROUP_GOTO = ContextActions.groups.high + 60;\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 static getRowOptionFormatted(\n command: string,\n cellValue: string,\n len = 30\n ): string {\n return `${command} \"${GridRenderer.truncate(\n cellValue,\n len - command.length - 3\n )}\"`;\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, column.name);\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 // Expand/Collapse options\n if (isExpandableGridModel(model) && model.isRowExpandable(modelRow)) {\n // If there are grouped columns, then it is a rollup\n // For rollups, the column number will be the depth minus one\n const expandingColumn =\n model.groupedColumns.length > 0 ? model.depthForRow(modelRow) - 1 : 0;\n const cellValue = model.valueForCell(expandingColumn, modelRow);\n const cellText =\n cellValue == null\n ? 'null'\n : model.textForCell(expandingColumn, modelRow);\n\n actions.push({\n title: IrisGridContextMenuHandler.getRowOptionFormatted(\n model.isRowExpanded(modelRow) ? 'Collapse' : 'Expand',\n cellText\n ),\n group: IrisGridContextMenuHandler.GROUP_EXPAND_COLLAPSE,\n order: 10,\n action: () => {\n model.setRowExpanded(modelRow, !model.isRowExpanded(modelRow));\n },\n });\n\n if (model.isExpandAllAvailable === true) {\n actions.push({\n title: IrisGridContextMenuHandler.getRowOptionFormatted(\n 'Expand All in',\n cellText\n ),\n group: IrisGridContextMenuHandler.GROUP_EXPAND_COLLAPSE,\n order: 20,\n action: () => {\n model.setRowExpanded(modelRow, true, true);\n },\n });\n }\n }\n\n if (\n isExpandableGridModel(model) &&\n model.hasExpandableRows &&\n model.isExpandAllAvailable === true\n ) {\n actions.push({\n title: 'Expand Entire Table',\n group: IrisGridContextMenuHandler.GROUP_EXPAND_COLLAPSE,\n order: 30,\n action: () => {\n model.expandAll();\n },\n });\n\n actions.push({\n title: 'Collapse Entire Table',\n group: IrisGridContextMenuHandler.GROUP_EXPAND_COLLAPSE,\n order: 40,\n action: () => {\n model.collapseAll();\n },\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: ResolvableContextAction[] = [];\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 &quot;{valueText}&quot;\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 &quot;{valueText}&quot;\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 &quot;{valueText ?? 'null'}&quot;\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 &quot;{previewValue}&quot;\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 &quot;null&quot;\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' : 'Ctrl+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,QAEX,uBAAuB;AAC9B,SAGEC,gBAAgB,EAEhBC,YAAY,EACZC,mBAAmB,EACnBC,qBAAqB,QAEhB,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,SAASnB,gBAAgB,CAAC;EAuBxD;AACF;AACA;AACA;AACA;AACA;AACA;EACE,OAAOoB,uBAAuB,CAC5BC,YAAgD,EAChDC,eAAgC,EAChCC,QAA6B,EACZ;IACjB,IAAIF,YAAY,IAAIE,QAAQ,KAAK,IAAI,EAAE;MACrC,OAAOF,YAAY,CAACG,GAAG,CAACF,eAAe,CAAC;IAC1C;IACA,IAAID,YAAY,IAAIE,QAAQ,KAAK,I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cAAc,CAAC0K,MAAM,CAACC,IAAI,GAAG,GAAG;AAAA,gBAbhDrJ,0BAA0B,kBAeRtB,cAAc,CAAC0K,MAAM,CAACC,IAAI,GAAG,GAAG;AAAA,gBAflDrJ,0BAA0B,2BAiBC;EAC7BkO,SAAS,EAAE,KAAK;EAChBE,UAAU,EAAE,MAAM;EAClBrH,IAAI,EAAE;AACR,CAAC;AAkqDH,eAAe/G,0BAA0B"}
@@ -1,5 +1,6 @@
1
1
  import type { Column } from '@deephaven/jsapi-shim';
2
2
  import AggregationOperation from './AggregationOperation';
3
+ export declare const SELECTABLE_OPTIONS: AggregationOperation[];
3
4
  /**
4
5
  * Check if an operation requires a rollup/table grouping
5
6
  * @param type The operation to check
@@ -1 +1 @@
1
- {"version":3,"file":"AggregationUtils.d.ts","sourceRoot":"","sources":["../../../src/sidebar/aggregations/AggregationUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,SAAU,oBAAoB,KAAG,OAM9D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,kBACZ,oBAAoB,cACvB,MAAM,KACjB,OA0BF,CAAC;AAEF,eAAO,MAAM,kBAAkB,YACpB,SAAS,MAAM,EAAE,iBACX,oBAAoB,KAClC,MAAM,EAAkE,CAAC;AAE5E,eAAO,MAAM,uBAAuB,YACzB,SAAS,MAAM,EAAE,iBACX,oBAAoB,YACzB,SAAS,MAAM,EAAE,UACnB,OAAO,KACd,MAAM,EAGwD,CAAC;;;;;;AAElE,wBAIE"}
1
+ {"version":3,"file":"AggregationUtils.d.ts","sourceRoot":"","sources":["../../../src/sidebar/aggregations/AggregationUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAE1D,eAAO,MAAM,kBAAkB,wBAc9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,SAAU,oBAAoB,KAAG,OAM9D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,kBACZ,oBAAoB,cACvB,MAAM,KACjB,OA0BF,CAAC;AAEF,eAAO,MAAM,kBAAkB,YACpB,SAAS,MAAM,EAAE,iBACX,oBAAoB,KAClC,MAAM,EAAkE,CAAC;AAE5E,eAAO,MAAM,uBAAuB,YACzB,SAAS,MAAM,EAAE,iBACX,oBAAoB,YACzB,SAAS,MAAM,EAAE,UACnB,OAAO,KACd,MAAM,EAGwD,CAAC;;;;;;AAElE,wBAIE"}
@@ -1,5 +1,7 @@
1
1
  import { TableUtils } from '@deephaven/jsapi-utils';
2
2
  import AggregationOperation from "./AggregationOperation.js";
3
+ export var SELECTABLE_OPTIONS = [AggregationOperation.SUM, AggregationOperation.ABS_SUM, AggregationOperation.MIN, AggregationOperation.MAX, AggregationOperation.VAR, AggregationOperation.AVG, AggregationOperation.STD, AggregationOperation.FIRST, AggregationOperation.LAST, AggregationOperation.COUNT_DISTINCT, AggregationOperation.DISTINCT, AggregationOperation.COUNT, AggregationOperation.UNIQUE];
4
+
3
5
  /**
4
6
  * Check if an operation requires a rollup/table grouping
5
7
  * @param type The operation to check
@@ -1 +1 @@
1
- {"version":3,"file":"AggregationUtils.js","names":["TableUtils","AggregationOperation","isRollupOperation","type","isValidOperation","operationType","columnType","COUNT","FIRST","LAST","COUNT_DISTINCT","DISTINCT","UNIQUE","MIN","MAX","isNumberType","isDateType","isTextType","SUM","ABS_SUM","VAR","AVG","STD","SKIP","filterValidColumns","columns","filter","c","getOperationColumnNames","selected","invert","map","name","includes"],"sources":["../../../src/sidebar/aggregations/AggregationUtils.ts"],"sourcesContent":["import type { Column } from '@deephaven/jsapi-shim';\nimport { TableUtils } from '@deephaven/jsapi-utils';\nimport AggregationOperation from './AggregationOperation';\n\n/**\n * Check if an operation requires a rollup/table grouping\n * @param type The operation to check\n * @returns True if this operation applies to the whole table, false if applies to columns\n */\nexport const isRollupOperation = (type: AggregationOperation): boolean => {\n switch (type) {\n // currently no rollup only operations, but there has been in the past\n default:\n return false;\n }\n};\n\n/**\n * Check if an operation is valid against the given column type\n * @param operationType The operation to check\n * @param columnType The column type to check against\n */\nexport const isValidOperation = (\n operationType: AggregationOperation,\n columnType: string\n): boolean => {\n switch (operationType) {\n case AggregationOperation.COUNT:\n case AggregationOperation.FIRST:\n case AggregationOperation.LAST:\n case AggregationOperation.COUNT_DISTINCT:\n case AggregationOperation.DISTINCT:\n case AggregationOperation.UNIQUE:\n return true;\n case AggregationOperation.MIN:\n case AggregationOperation.MAX:\n return (\n TableUtils.isNumberType(columnType) ||\n TableUtils.isDateType(columnType) ||\n TableUtils.isTextType(columnType)\n );\n case AggregationOperation.SUM:\n case AggregationOperation.ABS_SUM:\n case AggregationOperation.VAR:\n case AggregationOperation.AVG:\n case AggregationOperation.STD:\n return TableUtils.isNumberType(columnType);\n case AggregationOperation.SKIP:\n return false;\n // No default case - if AggregationOperation is added, we'll get a compile time error\n }\n};\n\nexport const filterValidColumns = (\n columns: readonly Column[],\n operationType: AggregationOperation\n): Column[] => columns.filter(c => isValidOperation(operationType, c.type));\n\nexport const getOperationColumnNames = (\n columns: readonly Column[],\n operationType: AggregationOperation,\n selected: readonly string[],\n invert: boolean\n): string[] =>\n filterValidColumns(columns, operationType)\n .map(({ name }) => name)\n .filter(name => (selected.includes(name) ? !invert : invert));\n\nexport default {\n isRollupOperation,\n filterValidColumns,\n getOperationColumnNames,\n};\n"],"mappings":"AACA,SAASA,UAAU,QAAQ,wBAAwB;AAAC,OAC7CC,oBAAoB;AAE3B;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,iBAAiB,GAAIC,IAA0B,IAAc;EACxE,QAAQA,IAAI;IACV;IACA;MACE,OAAO,KAAK;EAAC;AAEnB,CAAC;;AAED;AACA;AACA;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I;AAAA,EAAC,CACvBN,MAAM,CAACM,IAAI,IAAKH,QAAQ,CAACI,QAAQ,CAACD,IAAI,CAAC,GAAG,CAACF,MAAM,GAAGA,MAAO,CAAC;AAEjE,eAAe;EACb5B,iBAAiB;EACjBsB,kBAAkB;EAClBI;AACF,CAAC"}
1
+ {"version":3,"file":"AggregationUtils.js","names":["TableUtils","AggregationOperation","SELECTABLE_OPTIONS","SUM","ABS_SUM","MIN","MAX","VAR","AVG","STD","FIRST","LAST","COUNT_DISTINCT","DISTINCT","COUNT","UNIQUE","isRollupOperation","type","isValidOperation","operationType","columnType","isNumberType","isDateType","isTextType","SKIP","filterValidColumns","columns","filter","c","getOperationColumnNames","selected","invert","map","name","includes"],"sources":["../../../src/sidebar/aggregations/AggregationUtils.ts"],"sourcesContent":["import type { Column } from '@deephaven/jsapi-shim';\nimport { TableUtils } from '@deephaven/jsapi-utils';\nimport AggregationOperation from './AggregationOperation';\n\nexport const SELECTABLE_OPTIONS = [\n AggregationOperation.SUM,\n AggregationOperation.ABS_SUM,\n AggregationOperation.MIN,\n AggregationOperation.MAX,\n AggregationOperation.VAR,\n AggregationOperation.AVG,\n AggregationOperation.STD,\n AggregationOperation.FIRST,\n AggregationOperation.LAST,\n AggregationOperation.COUNT_DISTINCT,\n AggregationOperation.DISTINCT,\n AggregationOperation.COUNT,\n AggregationOperation.UNIQUE,\n];\n\n/**\n * Check if an operation requires a rollup/table grouping\n * @param type The operation to check\n * @returns True if this operation applies to the whole table, false if applies to columns\n */\nexport const isRollupOperation = (type: AggregationOperation): boolean => {\n switch (type) {\n // currently no rollup only operations, but there has been in the past\n default:\n return false;\n }\n};\n\n/**\n * Check if an operation is valid against the given column type\n * @param operationType The operation to check\n * @param columnType The column type to check against\n */\nexport const isValidOperation = (\n operationType: AggregationOperation,\n columnType: string\n): boolean => {\n switch (operationType) {\n case AggregationOperation.COUNT:\n case AggregationOperation.FIRST:\n case AggregationOperation.LAST:\n case AggregationOperation.COUNT_DISTINCT:\n case AggregationOperation.DISTINCT:\n case AggregationOperation.UNIQUE:\n return true;\n case AggregationOperation.MIN:\n case AggregationOperation.MAX:\n return (\n TableUtils.isNumberType(columnType) ||\n TableUtils.isDateType(columnType) ||\n TableUtils.isTextType(columnType)\n );\n case AggregationOperation.SUM:\n case AggregationOperation.ABS_SUM:\n case AggregationOperation.VAR:\n case AggregationOperation.AVG:\n case AggregationOperation.STD:\n return TableUtils.isNumberType(columnType);\n case AggregationOperation.SKIP:\n return false;\n // No default case - if AggregationOperation is added, we'll get a compile time error\n }\n};\n\nexport const filterValidColumns = (\n columns: readonly Column[],\n operationType: AggregationOperation\n): Column[] => columns.filter(c => isValidOperation(operationType, c.type));\n\nexport const getOperationColumnNames = (\n columns: readonly Column[],\n operationType: AggregationOperation,\n selected: readonly string[],\n invert: boolean\n): string[] =>\n filterValidColumns(columns, operationType)\n .map(({ name }) => name)\n .filter(name => (selected.includes(name) ? !invert : invert));\n\nexport default {\n isRollupOperation,\n filterValidColumns,\n getOperationColumnNames,\n};\n"],"mappings":"AACA,SAASA,UAAU,QAAQ,wBAAwB;AAAC,OAC7CC,oBAAoB;AAE3B,OAAO,IAAMC,kBAAkB,GAAG,CAChCD,oBAAoB,CAACE,GAAG,EACxBF,oBAAoB,CAACG,OAAO,EAC5BH,oBAAoB,CAACI,GAAG,EACxBJ,oBAAoB,CAACK,GAAG,EACxBL,oBAAoB,CAACM,GAAG,EACxBN,oBAAoB,CAACO,GAAG,EACxBP,oBAAoB,CAACQ,GAAG,EACxBR,oBAAoB,CAACS,KAAK,EAC1BT,oBAAoB,CAACU,IAAI,EACzBV,oBAAoB,CAACW,cAAc,EACnCX,oBAAoB,CAACY,QAAQ,EAC7BZ,oBAAoB,CAACa,KAAK,EAC1Bb,oBAAoB,CAACc,MAAM,CAC5B;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,iBAAiB,GAAIC,IAA0B,IAAc;EACxE,QAAQA,IAAI;IACV;IACA;MACE,OAAO,KAAK;EAA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AA,OAAKA,IAAI;AAAA,EAAC,CACvBN,MAAM,CAACM,IAAI,IAAKH,QAAQ,CAACI,QAAQ,CAACD,IAAI,CAAC,GAAG,CAACF,MAAM,GAAGA,MAAO,CAAC;AAEjE,eAAe;EACbf,iBAAiB;EACjBS,kBAAkB;EAClBI;AACF,CAAC"}
@@ -16,7 +16,6 @@ export type AggregationsProps = {
16
16
  onChange: (settings: AggregationSettings) => void;
17
17
  onEdit: (aggregation: Aggregation) => void;
18
18
  };
19
- export declare const SELECTABLE_OPTIONS: AggregationOperation[];
20
19
  declare function Aggregations({ isRollup, settings, onChange, onEdit, }: AggregationsProps): JSX.Element;
21
20
  export default Aggregations;
22
21
  //# sourceMappingURL=Aggregations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Aggregations.d.ts","sourceRoot":"","sources":["../../../src/sidebar/aggregations/Aggregations.tsx"],"names":[],"mappings":";AA4BA,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAE1D,OAAO,qBAAqB,CAAC;AAI7B,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,oBAAoB,CAAC;IAChC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC;IACrC,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,QAAQ,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAClD,MAAM,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,kBAAkB,wBAc9B,CAAC;AAEF,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,GACP,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAuPjC;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"Aggregations.d.ts","sourceRoot":"","sources":["../../../src/sidebar/aggregations/Aggregations.tsx"],"names":[],"mappings":";AA4BA,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAE1D,OAAO,qBAAqB,CAAC;AAI7B,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,oBAAoB,CAAC;IAChC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC;IACrC,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,QAAQ,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAClD,MAAM,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,GACP,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAuPjC;AAED,eAAe,YAAY,CAAC"}
@@ -10,11 +10,9 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
10
10
  import { dhNewCircleLargeFilled, vsTrash, vsEdit, dhWarningFilled } from '@deephaven/icons';
11
11
  import Log from '@deephaven/log';
12
12
  import { DraggableItemList, DragUtils, Option, Select, RadioItem, RadioGroup, Button } from '@deephaven/components';
13
- import AggregationOperation from "./AggregationOperation.js";
14
- import AggregationUtils from "./AggregationUtils.js";
13
+ import AggregationUtils, { SELECTABLE_OPTIONS } from "./AggregationUtils.js";
15
14
  import "./Aggregations.css";
16
15
  var log = Log.module('Aggregations');
17
- export var SELECTABLE_OPTIONS = [AggregationOperation.SUM, AggregationOperation.ABS_SUM, AggregationOperation.MIN, AggregationOperation.MAX, AggregationOperation.VAR, AggregationOperation.AVG, AggregationOperation.STD, AggregationOperation.FIRST, AggregationOperation.LAST, AggregationOperation.COUNT_DISTINCT, AggregationOperation.DISTINCT, AggregationOperation.COUNT, AggregationOperation.UNIQUE];
18
16
  function Aggregations(_ref) {
19
17
  var {
20
18
  isRollup,