@deephaven/iris-grid 0.22.3-beta.15 → 0.22.3-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AdvancedFilterCreator.js +7 -65
- package/dist/AdvancedFilterCreator.js.map +1 -1
- package/dist/AdvancedFilterCreatorFilterItem.js +0 -23
- package/dist/AdvancedFilterCreatorFilterItem.js.map +1 -1
- package/dist/AdvancedFilterCreatorSelectValue.js +0 -52
- package/dist/AdvancedFilterCreatorSelectValue.js.map +1 -1
- package/dist/AdvancedFilterCreatorSelectValueList.js +2 -42
- package/dist/AdvancedFilterCreatorSelectValueList.js.map +1 -1
- package/dist/ColumnHeaderGroup.js +0 -11
- package/dist/ColumnHeaderGroup.js.map +1 -1
- package/dist/ColumnStatistics.js +1 -20
- package/dist/ColumnStatistics.js.map +1 -1
- package/dist/CrossColumnSearch.js +2 -23
- package/dist/CrossColumnSearch.js.map +1 -1
- package/dist/FilterInputField.js +2 -36
- package/dist/FilterInputField.js.map +1 -1
- package/dist/GotoRow.d.ts +1 -1
- package/dist/GotoRow.d.ts.map +1 -1
- package/dist/GotoRow.js +2 -7
- package/dist/GotoRow.js.map +1 -1
- package/dist/IrisGrid.d.ts +41 -35
- package/dist/IrisGrid.d.ts.map +1 -1
- package/dist/IrisGrid.js +77 -519
- package/dist/IrisGrid.js.map +1 -1
- package/dist/IrisGridBottomBar.d.ts +1 -1
- package/dist/IrisGridBottomBar.d.ts.map +1 -1
- package/dist/IrisGridBottomBar.js +2 -2
- package/dist/IrisGridBottomBar.js.map +1 -1
- package/dist/IrisGridCellOverflowModal.js +6 -21
- package/dist/IrisGridCellOverflowModal.js.map +1 -1
- package/dist/IrisGridCopyHandler.js +3 -50
- package/dist/IrisGridCopyHandler.js.map +1 -1
- package/dist/IrisGridMetricCalculator.js +2 -12
- package/dist/IrisGridMetricCalculator.js.map +1 -1
- package/dist/IrisGridModel.js +32 -58
- package/dist/IrisGridModel.js.map +1 -1
- package/dist/IrisGridModelFactory.js +0 -7
- package/dist/IrisGridModelFactory.js.map +1 -1
- package/dist/IrisGridModelUpdater.js +0 -4
- package/dist/IrisGridModelUpdater.js.map +1 -1
- package/dist/IrisGridPartitionSelector.js +0 -23
- package/dist/IrisGridPartitionSelector.js.map +1 -1
- package/dist/IrisGridProxyModel.js +9 -153
- package/dist/IrisGridProxyModel.js.map +1 -1
- package/dist/IrisGridRenderer.js +41 -183
- package/dist/IrisGridRenderer.js.map +1 -1
- package/dist/IrisGridShortcuts.js.map +1 -1
- package/dist/IrisGridTableModel.d.ts +2 -2
- package/dist/IrisGridTableModel.d.ts.map +1 -1
- package/dist/IrisGridTableModel.js +10 -90
- package/dist/IrisGridTableModel.js.map +1 -1
- package/dist/IrisGridTableModelTemplate.d.ts +2 -2
- package/dist/IrisGridTableModelTemplate.d.ts.map +1 -1
- package/dist/IrisGridTableModelTemplate.js +70 -461
- package/dist/IrisGridTableModelTemplate.js.map +1 -1
- package/dist/IrisGridTestUtils.js +0 -23
- package/dist/IrisGridTestUtils.js.map +1 -1
- package/dist/IrisGridTheme.js.map +1 -1
- package/dist/IrisGridTreeTableModel.js +3 -42
- package/dist/IrisGridTreeTableModel.js.map +1 -1
- package/dist/IrisGridUtils.d.ts +11 -5
- package/dist/IrisGridUtils.d.ts.map +1 -1
- package/dist/IrisGridUtils.js +98 -196
- package/dist/IrisGridUtils.js.map +1 -1
- package/dist/MissingKeyError.js +0 -7
- package/dist/MissingKeyError.js.map +1 -1
- package/dist/PartitionSelectorSearch.js +2 -48
- package/dist/PartitionSelectorSearch.js.map +1 -1
- package/dist/PendingDataBottomBar.d.ts +1 -1
- package/dist/PendingDataBottomBar.d.ts.map +1 -1
- package/dist/PendingDataBottomBar.js +2 -7
- package/dist/PendingDataBottomBar.js.map +1 -1
- package/dist/TableViewportUpdater.d.ts +2 -2
- package/dist/TableViewportUpdater.d.ts.map +1 -1
- package/dist/TableViewportUpdater.js +3 -29
- package/dist/TableViewportUpdater.js.map +1 -1
- package/dist/ToastBottomBar.d.ts +1 -1
- package/dist/ToastBottomBar.d.ts.map +1 -1
- package/dist/ToastBottomBar.js +2 -4
- package/dist/ToastBottomBar.js.map +1 -1
- package/dist/TreeTableViewportUpdater.js +0 -21
- package/dist/TreeTableViewportUpdater.js.map +1 -1
- package/dist/format-context-menus/CustomFormatAction.js +4 -25
- package/dist/format-context-menus/CustomFormatAction.js.map +1 -1
- package/dist/format-context-menus/DateTimeFormatContextMenu.js +0 -7
- package/dist/format-context-menus/DateTimeFormatContextMenu.js.map +1 -1
- package/dist/format-context-menus/DecimalFormatContextMenu.js +0 -9
- package/dist/format-context-menus/DecimalFormatContextMenu.js.map +1 -1
- package/dist/format-context-menus/FormatContextMenuUtils.js +3 -9
- package/dist/format-context-menus/FormatContextMenuUtils.js.map +1 -1
- package/dist/format-context-menus/IntegerFormatContextMenu.js +0 -8
- package/dist/format-context-menus/IntegerFormatContextMenu.js.map +1 -1
- package/dist/format-context-menus/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/key-handlers/ClearFilterKeyHandler.js +0 -8
- package/dist/key-handlers/ClearFilterKeyHandler.js.map +1 -1
- package/dist/key-handlers/CopyKeyHandler.js +1 -10
- package/dist/key-handlers/CopyKeyHandler.js.map +1 -1
- package/dist/key-handlers/ReverseKeyHandler.js +0 -11
- package/dist/key-handlers/ReverseKeyHandler.js.map +1 -1
- package/dist/key-handlers/index.js.map +1 -1
- package/dist/mousehandlers/IrisGridCellOverflowMouseHandler.js +2 -32
- package/dist/mousehandlers/IrisGridCellOverflowMouseHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.js +4 -34
- package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridColumnTooltipMouseHandler.js +0 -20
- package/dist/mousehandlers/IrisGridColumnTooltipMouseHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.js +15 -105
- package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridDataSelectMouseHandler.js +0 -9
- package/dist/mousehandlers/IrisGridDataSelectMouseHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridFilterMouseHandler.js +0 -17
- package/dist/mousehandlers/IrisGridFilterMouseHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridSortMouseHandler.js +2 -15
- package/dist/mousehandlers/IrisGridSortMouseHandler.js.map +1 -1
- package/dist/mousehandlers/PendingMouseHandler.js +0 -6
- package/dist/mousehandlers/PendingMouseHandler.js.map +1 -1
- package/dist/mousehandlers/index.js.map +1 -1
- package/dist/sidebar/AdvancedSettings.js.map +1 -1
- package/dist/sidebar/AdvancedSettingsMenu.d.ts +4 -4
- package/dist/sidebar/AdvancedSettingsMenu.d.ts.map +1 -1
- package/dist/sidebar/AdvancedSettingsMenu.js +2 -6
- package/dist/sidebar/AdvancedSettingsMenu.js.map +1 -1
- package/dist/sidebar/AdvancedSettingsType.js +0 -2
- package/dist/sidebar/AdvancedSettingsType.js.map +1 -1
- package/dist/sidebar/ChartBuilder.js +2 -46
- package/dist/sidebar/ChartBuilder.js.map +1 -1
- package/dist/sidebar/CustomColumnBuilder.js +6 -58
- package/dist/sidebar/CustomColumnBuilder.js.map +1 -1
- package/dist/sidebar/CustomColumnInput.js +4 -15
- package/dist/sidebar/CustomColumnInput.js.map +1 -1
- package/dist/sidebar/InputEditor.js +5 -36
- package/dist/sidebar/InputEditor.js.map +1 -1
- package/dist/sidebar/OptionType.js +0 -2
- package/dist/sidebar/OptionType.js.map +1 -1
- package/dist/sidebar/RollupRows.js +9 -65
- package/dist/sidebar/RollupRows.js.map +1 -1
- package/dist/sidebar/SelectDistinctBuilder.js +0 -13
- package/dist/sidebar/SelectDistinctBuilder.js.map +1 -1
- package/dist/sidebar/TableCsvExporter.js +0 -52
- package/dist/sidebar/TableCsvExporter.js.map +1 -1
- package/dist/sidebar/TableSaver.d.ts +1 -1
- package/dist/sidebar/TableSaver.d.ts.map +1 -1
- package/dist/sidebar/TableSaver.js +10 -123
- package/dist/sidebar/TableSaver.js.map +1 -1
- package/dist/sidebar/VisibilityOrderingBuilder.d.ts +3 -2
- package/dist/sidebar/VisibilityOrderingBuilder.d.ts.map +1 -1
- package/dist/sidebar/VisibilityOrderingBuilder.js +37 -116
- package/dist/sidebar/VisibilityOrderingBuilder.js.map +1 -1
- package/dist/sidebar/aggregations/AggregationEdit.d.ts +1 -1
- package/dist/sidebar/aggregations/AggregationEdit.d.ts.map +1 -1
- package/dist/sidebar/aggregations/AggregationEdit.js +2 -14
- package/dist/sidebar/aggregations/AggregationEdit.js.map +1 -1
- package/dist/sidebar/aggregations/AggregationOperation.js +0 -2
- package/dist/sidebar/aggregations/AggregationOperation.js.map +1 -1
- package/dist/sidebar/aggregations/AggregationUtils.js +2 -5
- package/dist/sidebar/aggregations/AggregationUtils.js.map +1 -1
- package/dist/sidebar/aggregations/Aggregations.d.ts +1 -1
- package/dist/sidebar/aggregations/Aggregations.d.ts.map +1 -1
- package/dist/sidebar/aggregations/Aggregations.js +2 -12
- package/dist/sidebar/aggregations/Aggregations.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ColumnFormatEditor.d.ts +1 -1
- package/dist/sidebar/conditional-formatting/ColumnFormatEditor.d.ts.map +1 -1
- package/dist/sidebar/conditional-formatting/ColumnFormatEditor.js +2 -16
- package/dist/sidebar/conditional-formatting/ColumnFormatEditor.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionEditor.d.ts +1 -1
- package/dist/sidebar/conditional-formatting/ConditionEditor.d.ts.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionEditor.js +2 -35
- package/dist/sidebar/conditional-formatting/ConditionEditor.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.d.ts +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.d.ts.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.js +2 -12
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.js +0 -3
- package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.d.ts +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.d.ts.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js +16 -26
- package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js +9 -172
- package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js.map +1 -1
- package/dist/sidebar/conditional-formatting/RowFormatEditor.d.ts +1 -1
- package/dist/sidebar/conditional-formatting/RowFormatEditor.d.ts.map +1 -1
- package/dist/sidebar/conditional-formatting/RowFormatEditor.js +2 -16
- package/dist/sidebar/conditional-formatting/RowFormatEditor.js.map +1 -1
- package/dist/sidebar/conditional-formatting/StyleEditor.d.ts +1 -1
- package/dist/sidebar/conditional-formatting/StyleEditor.d.ts.map +1 -1
- package/dist/sidebar/conditional-formatting/StyleEditor.js +2 -12
- package/dist/sidebar/conditional-formatting/StyleEditor.js.map +1 -1
- package/dist/sidebar/icons/BarIcon.js +0 -3
- package/dist/sidebar/icons/BarIcon.js.map +1 -1
- package/dist/sidebar/icons/FormatColumnWhereIcon.js +2 -5
- package/dist/sidebar/icons/FormatColumnWhereIcon.js.map +1 -1
- package/dist/sidebar/icons/FormatRowWhereIcon.js +2 -5
- package/dist/sidebar/icons/FormatRowWhereIcon.js.map +1 -1
- package/dist/sidebar/icons/HistogramIcon.js +0 -3
- package/dist/sidebar/icons/HistogramIcon.js.map +1 -1
- package/dist/sidebar/icons/LineIcon.js +0 -3
- package/dist/sidebar/icons/LineIcon.js.map +1 -1
- package/dist/sidebar/icons/PieIcon.js +0 -3
- package/dist/sidebar/icons/PieIcon.js.map +1 -1
- package/dist/sidebar/icons/ScatterIcon.js +0 -3
- package/dist/sidebar/icons/ScatterIcon.js.map +1 -1
- package/dist/sidebar/icons/index.js.map +1 -1
- package/dist/sidebar/index.js.map +1 -1
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeFormatContextMenu.js","names":["DateTimeColumnFormatter","TableUtils","FormatContextMenuUtils","DateTimeFormatContextMenu","getOptions","formatter","selectedFormat","currentTime","Date","formatItems","group","dateGroup","formatString","timeGroup","dateTimeGroup","presetFormatOptions","map","item","format","makeFormat","TYPE_CONTEXT_PRESET","title","getFormattedString","dataType","DATETIME","makeOption","isSameFormat","defaultOption","isDefaultSelected"],"sources":["../../src/format-context-menus/DateTimeFormatContextMenu.ts"],"sourcesContent":["import {\n DateTimeColumnFormatter,\n Formatter,\n TableColumnFormat,\n TableUtils,\n} from '@deephaven/jsapi-utils';\nimport FormatContextMenuUtils, {\n FormatContextMenuOption,\n} from './FormatContextMenuUtils';\n\nclass DateTimeFormatContextMenu {\n static dateGroup = 10;\n\n static timeGroup = 20;\n\n static dateTimeGroup = 30;\n\n /**\n * Creates list of formatting options for DateTime context menu\n * @param formatter Formatter instance\n * @param selectedFormat Selected format object, null for no selected format\n * @returns Array of formatting options for the context menu\n */\n static getOptions(\n formatter: Formatter,\n selectedFormat: TableColumnFormat | null\n ): FormatContextMenuOption[] {\n const currentTime = new Date();\n const formatItems = [\n {\n group: DateTimeFormatContextMenu.dateGroup,\n formatString: 'yyyy-MM-dd',\n },\n {\n group: DateTimeFormatContextMenu.dateGroup,\n formatString: 'MM-dd-yyyy',\n },\n\n {\n group: DateTimeFormatContextMenu.timeGroup,\n formatString: 'HH:mm:ss',\n },\n {\n group: DateTimeFormatContextMenu.timeGroup,\n formatString: 'HH:mm:ss.SSS',\n },\n {\n group: DateTimeFormatContextMenu.timeGroup,\n formatString: 'HH:mm:ss.SSSSSSSSS',\n },\n\n {\n group: DateTimeFormatContextMenu.dateTimeGroup,\n formatString: `yyyy-MM-dd HH:mm:ss`,\n },\n {\n group: DateTimeFormatContextMenu.dateTimeGroup,\n formatString: `yyyy-MM-dd HH:mm:ss.SSS`,\n },\n {\n group: DateTimeFormatContextMenu.dateTimeGroup,\n formatString: `yyyy-MM-dd HH:mm:ss.SSSSSSSSS`,\n },\n ];\n\n const presetFormatOptions = formatItems.map(item => {\n const format = DateTimeColumnFormatter.makeFormat(\n '',\n item.formatString,\n DateTimeColumnFormatter.TYPE_CONTEXT_PRESET\n );\n const title = formatter.getFormattedString(\n currentTime,\n TableUtils.dataType.DATETIME,\n '',\n format\n );\n\n return FormatContextMenuUtils.makeOption(\n title,\n format,\n item.group,\n DateTimeColumnFormatter.isSameFormat(format, selectedFormat)\n );\n });\n\n const defaultOption = FormatContextMenuUtils.makeOption(\n 'Default',\n null,\n DateTimeFormatContextMenu.dateGroup,\n FormatContextMenuUtils.isDefaultSelected(selectedFormat)\n );\n\n return [defaultOption, ...presetFormatOptions];\n }\n}\n\nexport default DateTimeFormatContextMenu;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateTimeFormatContextMenu.js","names":["DateTimeColumnFormatter","TableUtils","FormatContextMenuUtils","DateTimeFormatContextMenu","getOptions","formatter","selectedFormat","currentTime","Date","formatItems","group","dateGroup","formatString","timeGroup","dateTimeGroup","presetFormatOptions","map","item","format","makeFormat","TYPE_CONTEXT_PRESET","title","getFormattedString","dataType","DATETIME","makeOption","isSameFormat","defaultOption","isDefaultSelected"],"sources":["../../src/format-context-menus/DateTimeFormatContextMenu.ts"],"sourcesContent":["import {\n DateTimeColumnFormatter,\n Formatter,\n TableColumnFormat,\n TableUtils,\n} from '@deephaven/jsapi-utils';\nimport FormatContextMenuUtils, {\n FormatContextMenuOption,\n} from './FormatContextMenuUtils';\n\nclass DateTimeFormatContextMenu {\n static dateGroup = 10;\n\n static timeGroup = 20;\n\n static dateTimeGroup = 30;\n\n /**\n * Creates list of formatting options for DateTime context menu\n * @param formatter Formatter instance\n * @param selectedFormat Selected format object, null for no selected format\n * @returns Array of formatting options for the context menu\n */\n static getOptions(\n formatter: Formatter,\n selectedFormat: TableColumnFormat | null\n ): FormatContextMenuOption[] {\n const currentTime = new Date();\n const formatItems = [\n {\n group: DateTimeFormatContextMenu.dateGroup,\n formatString: 'yyyy-MM-dd',\n },\n {\n group: DateTimeFormatContextMenu.dateGroup,\n formatString: 'MM-dd-yyyy',\n },\n\n {\n group: DateTimeFormatContextMenu.timeGroup,\n formatString: 'HH:mm:ss',\n },\n {\n group: DateTimeFormatContextMenu.timeGroup,\n formatString: 'HH:mm:ss.SSS',\n },\n {\n group: DateTimeFormatContextMenu.timeGroup,\n formatString: 'HH:mm:ss.SSSSSSSSS',\n },\n\n {\n group: DateTimeFormatContextMenu.dateTimeGroup,\n formatString: `yyyy-MM-dd HH:mm:ss`,\n },\n {\n group: DateTimeFormatContextMenu.dateTimeGroup,\n formatString: `yyyy-MM-dd HH:mm:ss.SSS`,\n },\n {\n group: DateTimeFormatContextMenu.dateTimeGroup,\n formatString: `yyyy-MM-dd HH:mm:ss.SSSSSSSSS`,\n },\n ];\n\n const presetFormatOptions = formatItems.map(item => {\n const format = DateTimeColumnFormatter.makeFormat(\n '',\n item.formatString,\n DateTimeColumnFormatter.TYPE_CONTEXT_PRESET\n );\n const title = formatter.getFormattedString(\n currentTime,\n TableUtils.dataType.DATETIME,\n '',\n format\n );\n\n return FormatContextMenuUtils.makeOption(\n title,\n format,\n item.group,\n DateTimeColumnFormatter.isSameFormat(format, selectedFormat)\n );\n });\n\n const defaultOption = FormatContextMenuUtils.makeOption(\n 'Default',\n null,\n DateTimeFormatContextMenu.dateGroup,\n FormatContextMenuUtils.isDefaultSelected(selectedFormat)\n );\n\n return [defaultOption, ...presetFormatOptions];\n }\n}\n\nexport default DateTimeFormatContextMenu;\n"],"mappings":";AAAA,SACEA,uBAAuB,EAGvBC,UAAU,QACL,wBAAwB;AAAC,OACzBC,sBAAsB;AAI7B,MAAMC,yBAAyB,CAAC;EAO9B;AACF;AACA;AACA;AACA;AACA;EACE,OAAOC,UAAU,CACfC,SAAoB,EACpBC,cAAwC,EACb;IAC3B,IAAMC,WAAW,GAAG,IAAIC,IAAI,EAAE;IAC9B,IAAMC,WAAW,GAAG,CAClB;MACEC,KAAK,EAAEP,yBAAyB,CAACQ,SAAS;MAC1CC,YAAY,EAAE;IAChB,CAAC,EACD;MACEF,KAAK,EAAEP,yBAAyB,CAACQ,SAAS;MAC1CC,YAAY,EAAE;IAChB,CAAC,EAED;MACEF,KAAK,EAAEP,yBAAyB,CAACU,SAAS;MAC1CD,YAAY,EAAE;IAChB,CAAC,EACD;MACEF,KAAK,EAAEP,yBAAyB,CAACU,SAAS;MAC1CD,YAAY,EAAE;IAChB,CAAC,EACD;MACEF,KAAK,EAAEP,yBAAyB,CAACU,SAAS;MAC1CD,YAAY,EAAE;IAChB,CAAC,EAED;MACEF,KAAK,EAAEP,yBAAyB,CAACW,aAAa;MAC9CF,YAAY;IACd,CAAC,EACD;MACEF,KAAK,EAAEP,yBAAyB,CAACW,aAAa;MAC9CF,YAAY;IACd,CAAC,EACD;MACEF,KAAK,EAAEP,yBAAyB,CAACW,aAAa;MAC9CF,YAAY;IACd,CAAC,CACF;IAED,IAAMG,mBAAmB,GAAGN,WAAW,CAACO,GAAG,CAACC,IAAI,IAAI;MAClD,IAAMC,MAAM,GAAGlB,uBAAuB,CAACmB,UAAU,CAC/C,EAAE,EACFF,IAAI,CAACL,YAAY,EACjBZ,uBAAuB,CAACoB,mBAAmB,CAC5C;MACD,IAAMC,KAAK,GAAGhB,SAAS,CAACiB,kBAAkB,CACxCf,WAAW,EACXN,UAAU,CAACsB,QAAQ,CAACC,QAAQ,EAC5B,EAAE,EACFN,MAAM,CACP;MAED,OAAOhB,sBAAsB,CAACuB,UAAU,CACtCJ,KAAK,EACLH,MAAM,EACND,IAAI,CAACP,KAAK,EACVV,uBAAuB,CAAC0B,YAAY,CAACR,MAAM,EAAEZ,cAAc,CAAC,CAC7D;IACH,CAAC,CAAC;IAEF,IAAMqB,aAAa,GAAGzB,sBAAsB,CAACuB,UAAU,CACrD,SAAS,EACT,IAAI,EACJtB,yBAAyB,CAACQ,SAAS,EACnCT,sBAAsB,CAAC0B,iBAAiB,CAACtB,cAAc,CAAC,CACzD;IAED,OAAO,CAACqB,aAAa,EAAE,GAAGZ,mBAAmB,CAAC;EAChD;AACF;AAAC,gBArFKZ,yBAAyB,eACV,EAAE;AAAA,gBADjBA,yBAAyB,eAGV,EAAE;AAAA,gBAHjBA,yBAAyB,mBAKN,EAAE;AAkF3B,eAAeA,yBAAyB"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
3
2
|
import { DecimalColumnFormatter } from '@deephaven/jsapi-utils';
|
|
4
3
|
import FormatContextMenuUtils from "./FormatContextMenuUtils.js";
|
|
5
|
-
|
|
6
4
|
class DecimalFormatContextMenu {
|
|
7
5
|
/**
|
|
8
6
|
* Creates list of formatting options for Decimal context menu
|
|
@@ -40,7 +38,6 @@ class DecimalFormatContextMenu {
|
|
|
40
38
|
var customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(customFormat, DecimalFormatContextMenu.customGroup, DecimalColumnFormatter.DEFAULT_FORMAT_STRING, isCustomSelected, formatString => {
|
|
41
39
|
if (formatString != null) {
|
|
42
40
|
var newCustomFormat = DecimalColumnFormatter.makeCustomFormat(formatString);
|
|
43
|
-
|
|
44
41
|
if (DecimalColumnFormatter.isValid(newCustomFormat)) {
|
|
45
42
|
onCustomFormatChange(newCustomFormat);
|
|
46
43
|
}
|
|
@@ -50,16 +47,10 @@ class DecimalFormatContextMenu {
|
|
|
50
47
|
});
|
|
51
48
|
return [defaultFormatOption, ...presetFormatOptions, customFormatOption];
|
|
52
49
|
}
|
|
53
|
-
|
|
54
50
|
}
|
|
55
|
-
|
|
56
51
|
_defineProperty(DecimalFormatContextMenu, "defaultGroup", 10);
|
|
57
|
-
|
|
58
52
|
_defineProperty(DecimalFormatContextMenu, "presetGroup", 20);
|
|
59
|
-
|
|
60
53
|
_defineProperty(DecimalFormatContextMenu, "presetRoundGroup", 30);
|
|
61
|
-
|
|
62
54
|
_defineProperty(DecimalFormatContextMenu, "customGroup", 40);
|
|
63
|
-
|
|
64
55
|
export default DecimalFormatContextMenu;
|
|
65
56
|
//# sourceMappingURL=DecimalFormatContextMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecimalFormatContextMenu.js","names":["DecimalColumnFormatter","FormatContextMenuUtils","DecimalFormatContextMenu","getOptions","selectedFormat","onCustomFormatChange","formatItems","format","FORMAT_PERCENT","group","presetGroup","FORMAT_BASIS_POINTS","FORMAT_MILLIONS","FORMAT_SCIENTIFIC_NOTATION","FORMAT_ROUND","presetRoundGroup","FORMAT_ROUND_TWO_DECIMALS","FORMAT_ROUND_FOUR_DECIMALS","defaultFormatOption","makeOption","defaultGroup","isDefaultSelected","presetFormatOptions","map","item","label","isSameFormat","isCustomSelected","customFormat","makeCustomFormat","customFormatOption","makeCustomFormatOption","customGroup","DEFAULT_FORMAT_STRING","formatString","newCustomFormat","isValid"],"sources":["../../src/format-context-menus/DecimalFormatContextMenu.ts"],"sourcesContent":["import {\n DecimalColumnFormat,\n DecimalColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport FormatContextMenuUtils, {\n FormatContextMenuOption,\n} from './FormatContextMenuUtils';\n\nclass DecimalFormatContextMenu {\n static defaultGroup = 10;\n\n static presetGroup = 20;\n\n static presetRoundGroup = 30;\n\n static customGroup = 40;\n\n /**\n * Creates list of formatting options for Decimal context menu\n * @param selectedFormat Selected format object, null for no selected format\n * @param onCustomFormatChange Callback to call when the custom format is changed\n * @returns Array of formatting options for the context menu\n */\n static getOptions(\n selectedFormat: DecimalColumnFormat,\n onCustomFormatChange: (value: DecimalColumnFormat | null) => void\n ): FormatContextMenuOption[] {\n const formatItems = [\n {\n format: DecimalColumnFormatter.FORMAT_PERCENT,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_BASIS_POINTS,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_MILLIONS,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_SCIENTIFIC_NOTATION,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND_TWO_DECIMALS,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND_FOUR_DECIMALS,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n ];\n\n const defaultFormatOption = FormatContextMenuUtils.makeOption(\n 'Default',\n null,\n DecimalFormatContextMenu.defaultGroup,\n FormatContextMenuUtils.isDefaultSelected(selectedFormat)\n );\n\n const presetFormatOptions = formatItems.map(item =>\n FormatContextMenuUtils.makeOption(\n item.format.label,\n item.format,\n item.group,\n DecimalColumnFormatter.isSameFormat(item.format, selectedFormat)\n )\n );\n\n const isCustomSelected = FormatContextMenuUtils.isCustomSelected(\n selectedFormat\n );\n\n const customFormat = isCustomSelected\n ? selectedFormat\n : DecimalColumnFormatter.makeCustomFormat();\n\n const customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(\n customFormat,\n DecimalFormatContextMenu.customGroup,\n DecimalColumnFormatter.DEFAULT_FORMAT_STRING,\n isCustomSelected,\n formatString => {\n if (formatString != null) {\n const newCustomFormat = DecimalColumnFormatter.makeCustomFormat(\n formatString\n );\n if (DecimalColumnFormatter.isValid(newCustomFormat)) {\n onCustomFormatChange(newCustomFormat);\n }\n } else {\n onCustomFormatChange(null);\n }\n }\n );\n\n return [defaultFormatOption, ...presetFormatOptions, customFormatOption];\n }\n}\n\nexport default DecimalFormatContextMenu;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DecimalFormatContextMenu.js","names":["DecimalColumnFormatter","FormatContextMenuUtils","DecimalFormatContextMenu","getOptions","selectedFormat","onCustomFormatChange","formatItems","format","FORMAT_PERCENT","group","presetGroup","FORMAT_BASIS_POINTS","FORMAT_MILLIONS","FORMAT_SCIENTIFIC_NOTATION","FORMAT_ROUND","presetRoundGroup","FORMAT_ROUND_TWO_DECIMALS","FORMAT_ROUND_FOUR_DECIMALS","defaultFormatOption","makeOption","defaultGroup","isDefaultSelected","presetFormatOptions","map","item","label","isSameFormat","isCustomSelected","customFormat","makeCustomFormat","customFormatOption","makeCustomFormatOption","customGroup","DEFAULT_FORMAT_STRING","formatString","newCustomFormat","isValid"],"sources":["../../src/format-context-menus/DecimalFormatContextMenu.ts"],"sourcesContent":["import {\n DecimalColumnFormat,\n DecimalColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport FormatContextMenuUtils, {\n FormatContextMenuOption,\n} from './FormatContextMenuUtils';\n\nclass DecimalFormatContextMenu {\n static defaultGroup = 10;\n\n static presetGroup = 20;\n\n static presetRoundGroup = 30;\n\n static customGroup = 40;\n\n /**\n * Creates list of formatting options for Decimal context menu\n * @param selectedFormat Selected format object, null for no selected format\n * @param onCustomFormatChange Callback to call when the custom format is changed\n * @returns Array of formatting options for the context menu\n */\n static getOptions(\n selectedFormat: DecimalColumnFormat,\n onCustomFormatChange: (value: DecimalColumnFormat | null) => void\n ): FormatContextMenuOption[] {\n const formatItems = [\n {\n format: DecimalColumnFormatter.FORMAT_PERCENT,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_BASIS_POINTS,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_MILLIONS,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_SCIENTIFIC_NOTATION,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND_TWO_DECIMALS,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND_FOUR_DECIMALS,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n ];\n\n const defaultFormatOption = FormatContextMenuUtils.makeOption(\n 'Default',\n null,\n DecimalFormatContextMenu.defaultGroup,\n FormatContextMenuUtils.isDefaultSelected(selectedFormat)\n );\n\n const presetFormatOptions = formatItems.map(item =>\n FormatContextMenuUtils.makeOption(\n item.format.label,\n item.format,\n item.group,\n DecimalColumnFormatter.isSameFormat(item.format, selectedFormat)\n )\n );\n\n const isCustomSelected = FormatContextMenuUtils.isCustomSelected(\n selectedFormat\n );\n\n const customFormat = isCustomSelected\n ? selectedFormat\n : DecimalColumnFormatter.makeCustomFormat();\n\n const customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(\n customFormat,\n DecimalFormatContextMenu.customGroup,\n DecimalColumnFormatter.DEFAULT_FORMAT_STRING,\n isCustomSelected,\n formatString => {\n if (formatString != null) {\n const newCustomFormat = DecimalColumnFormatter.makeCustomFormat(\n formatString\n );\n if (DecimalColumnFormatter.isValid(newCustomFormat)) {\n onCustomFormatChange(newCustomFormat);\n }\n } else {\n onCustomFormatChange(null);\n }\n }\n );\n\n return [defaultFormatOption, ...presetFormatOptions, customFormatOption];\n }\n}\n\nexport default DecimalFormatContextMenu;\n"],"mappings":";AAAA,SAEEA,sBAAsB,QACjB,wBAAwB;AAAC,OACzBC,sBAAsB;AAI7B,MAAMC,wBAAwB,CAAC;EAS7B;AACF;AACA;AACA;AACA;AACA;EACE,OAAOC,UAAU,CACfC,cAAmC,EACnCC,oBAAiE,EACtC;IAC3B,IAAMC,WAAW,GAAG,CAClB;MACEC,MAAM,EAAEP,sBAAsB,CAACQ,cAAc;MAC7CC,KAAK,EAAEP,wBAAwB,CAACQ;IAClC,CAAC,EACD;MACEH,MAAM,EAAEP,sBAAsB,CAACW,mBAAmB;MAClDF,KAAK,EAAEP,wBAAwB,CAACQ;IAClC,CAAC,EACD;MACEH,MAAM,EAAEP,sBAAsB,CAACY,eAAe;MAC9CH,KAAK,EAAEP,wBAAwB,CAACQ;IAClC,CAAC,EACD;MACEH,MAAM,EAAEP,sBAAsB,CAACa,0BAA0B;MACzDJ,KAAK,EAAEP,wBAAwB,CAACQ;IAClC,CAAC,EACD;MACEH,MAAM,EAAEP,sBAAsB,CAACc,YAAY;MAC3CL,KAAK,EAAEP,wBAAwB,CAACa;IAClC,CAAC,EACD;MACER,MAAM,EAAEP,sBAAsB,CAACgB,yBAAyB;MACxDP,KAAK,EAAEP,wBAAwB,CAACa;IAClC,CAAC,EACD;MACER,MAAM,EAAEP,sBAAsB,CAACiB,0BAA0B;MACzDR,KAAK,EAAEP,wBAAwB,CAACa;IAClC,CAAC,CACF;IAED,IAAMG,mBAAmB,GAAGjB,sBAAsB,CAACkB,UAAU,CAC3D,SAAS,EACT,IAAI,EACJjB,wBAAwB,CAACkB,YAAY,EACrCnB,sBAAsB,CAACoB,iBAAiB,CAACjB,cAAc,CAAC,CACzD;IAED,IAAMkB,mBAAmB,GAAGhB,WAAW,CAACiB,GAAG,CAACC,IAAI,IAC9CvB,sBAAsB,CAACkB,UAAU,CAC/BK,IAAI,CAACjB,MAAM,CAACkB,KAAK,EACjBD,IAAI,CAACjB,MAAM,EACXiB,IAAI,CAACf,KAAK,EACVT,sBAAsB,CAAC0B,YAAY,CAACF,IAAI,CAACjB,MAAM,EAAEH,cAAc,CAAC,CACjE,CACF;IAED,IAAMuB,gBAAgB,GAAG1B,sBAAsB,CAAC0B,gBAAgB,CAC9DvB,cAAc,CACf;IAED,IAAMwB,YAAY,GAAGD,gBAAgB,GACjCvB,cAAc,GACdJ,sBAAsB,CAAC6B,gBAAgB,EAAE;IAE7C,IAAMC,kBAAkB,GAAG7B,sBAAsB,CAAC8B,sBAAsB,CACtEH,YAAY,EACZ1B,wBAAwB,CAAC8B,WAAW,EACpChC,sBAAsB,CAACiC,qBAAqB,EAC5CN,gBAAgB,EAChBO,YAAY,IAAI;MACd,IAAIA,YAAY,IAAI,IAAI,EAAE;QACxB,IAAMC,eAAe,GAAGnC,sBAAsB,CAAC6B,gBAAgB,CAC7DK,YAAY,CACb;QACD,IAAIlC,sBAAsB,CAACoC,OAAO,CAACD,eAAe,CAAC,EAAE;UACnD9B,oBAAoB,CAAC8B,eAAe,CAAC;QACvC;MACF,CAAC,MAAM;QACL9B,oBAAoB,CAAC,IAAI,CAAC;MAC5B;IACF,CAAC,CACF;IAED,OAAO,CAACa,mBAAmB,EAAE,GAAGI,mBAAmB,EAAEQ,kBAAkB,CAAC;EAC1E;AACF;AAAC,gBA/FK5B,wBAAwB,kBACN,EAAE;AAAA,gBADpBA,wBAAwB,iBAGP,EAAE;AAAA,gBAHnBA,wBAAwB,sBAKF,EAAE;AAAA,gBALxBA,wBAAwB,iBAOP,EAAE;AA0FzB,eAAeA,wBAAwB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableColumnFormatter } from '@deephaven/jsapi-utils';
|
|
3
3
|
import CustomFormatAction from "./CustomFormatAction.js";
|
|
4
|
-
|
|
5
4
|
class FormatContextMenuUtils {
|
|
6
5
|
/**
|
|
7
6
|
* Returns true if default option should be active in the context menu
|
|
@@ -10,15 +9,15 @@ class FormatContextMenuUtils {
|
|
|
10
9
|
static isDefaultSelected(selectedFormat) {
|
|
11
10
|
return !selectedFormat || ![TableColumnFormatter.TYPE_CONTEXT_CUSTOM, TableColumnFormatter.TYPE_CONTEXT_PRESET].includes(selectedFormat.type);
|
|
12
11
|
}
|
|
12
|
+
|
|
13
13
|
/**
|
|
14
14
|
* Returns true if custom format option should be active in the context menu
|
|
15
15
|
* @param selectedFormat selected format object or null
|
|
16
16
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
17
|
static isCustomSelected(selectedFormat) {
|
|
20
18
|
return selectedFormat != null && selectedFormat.type === TableColumnFormatter.TYPE_CONTEXT_CUSTOM;
|
|
21
19
|
}
|
|
20
|
+
|
|
22
21
|
/**
|
|
23
22
|
* Creates context menu option
|
|
24
23
|
* @param title Context menu title
|
|
@@ -26,8 +25,6 @@ class FormatContextMenuUtils {
|
|
|
26
25
|
* @param group Context menu group
|
|
27
26
|
* @param isSelected Is current option selected
|
|
28
27
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
28
|
static makeOption(title, format, group, isSelected) {
|
|
32
29
|
return {
|
|
33
30
|
title,
|
|
@@ -37,6 +34,7 @@ class FormatContextMenuUtils {
|
|
|
37
34
|
isSelected
|
|
38
35
|
};
|
|
39
36
|
}
|
|
37
|
+
|
|
40
38
|
/**
|
|
41
39
|
* Creates context menu option with an input element
|
|
42
40
|
* @param format Format object
|
|
@@ -45,8 +43,6 @@ class FormatContextMenuUtils {
|
|
|
45
43
|
* @param isSelected Is current option selected
|
|
46
44
|
* @param onChange Input element onChange callback
|
|
47
45
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
46
|
static makeCustomFormatOption(format, group, placeholder, isSelected, onChange) {
|
|
51
47
|
return {
|
|
52
48
|
title: format.label,
|
|
@@ -62,8 +58,6 @@ class FormatContextMenuUtils {
|
|
|
62
58
|
})
|
|
63
59
|
};
|
|
64
60
|
}
|
|
65
|
-
|
|
66
61
|
}
|
|
67
|
-
|
|
68
62
|
export default FormatContextMenuUtils;
|
|
69
63
|
//# sourceMappingURL=FormatContextMenuUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormatContextMenuUtils.js","names":["React","TableColumnFormatter","CustomFormatAction","FormatContextMenuUtils","isDefaultSelected","selectedFormat","TYPE_CONTEXT_CUSTOM","TYPE_CONTEXT_PRESET","includes","type","isCustomSelected","makeOption","title","format","group","isSelected","description","makeCustomFormatOption","placeholder","onChange","label","menuElement","formatString"],"sources":["../../src/format-context-menus/FormatContextMenuUtils.tsx"],"sourcesContent":["import React from 'react';\nimport {\n TableColumnFormat,\n TableColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport CustomFormatAction from './CustomFormatAction';\n\nexport interface FormatContextMenuOption {\n title: string;\n description: string;\n group: number;\n format: TableColumnFormat | null;\n isSelected: boolean;\n}\n\nexport interface CustomFormatOption extends FormatContextMenuOption {\n menuElement: React.ReactElement;\n}\n\nclass FormatContextMenuUtils {\n /**\n * Returns true if default option should be active in the context menu\n * @param selectedFormat selected format object or null\n */\n static isDefaultSelected(selectedFormat: TableColumnFormat | null): boolean {\n return (\n !selectedFormat ||\n ![\n TableColumnFormatter.TYPE_CONTEXT_CUSTOM,\n TableColumnFormatter.TYPE_CONTEXT_PRESET,\n ].includes(selectedFormat.type)\n );\n }\n\n /**\n * Returns true if custom format option should be active in the context menu\n * @param selectedFormat selected format object or null\n */\n static isCustomSelected(selectedFormat: TableColumnFormat): boolean {\n return (\n selectedFormat != null &&\n selectedFormat.type === TableColumnFormatter.TYPE_CONTEXT_CUSTOM\n );\n }\n\n /**\n * Creates context menu option\n * @param title Context menu title\n * @param format Format object\n * @param group Context menu group\n * @param isSelected Is current option selected\n */\n static makeOption(\n title: string,\n format: TableColumnFormat | null,\n group: number,\n isSelected: boolean\n ): FormatContextMenuOption {\n return {\n title,\n description: title,\n group,\n format,\n isSelected,\n };\n }\n\n /**\n * Creates context menu option with an input element\n * @param format Format object\n * @param group Context menu group\n * @param placeholder Input element placeholder\n * @param isSelected Is current option selected\n * @param onChange Input element onChange callback\n */\n static makeCustomFormatOption(\n format: TableColumnFormat,\n group: number,\n placeholder: string,\n isSelected: boolean,\n onChange: (value: string | null) => void\n ): CustomFormatOption {\n return {\n title: format.label,\n description: format.label,\n format,\n group,\n isSelected,\n menuElement: (\n <CustomFormatAction\n formatString={format.formatString}\n title={format.label}\n placeholder={placeholder}\n onChange={onChange}\n />\n ),\n };\n }\n}\n\nexport default FormatContextMenuUtils;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"FormatContextMenuUtils.js","names":["React","TableColumnFormatter","CustomFormatAction","FormatContextMenuUtils","isDefaultSelected","selectedFormat","TYPE_CONTEXT_CUSTOM","TYPE_CONTEXT_PRESET","includes","type","isCustomSelected","makeOption","title","format","group","isSelected","description","makeCustomFormatOption","placeholder","onChange","label","menuElement","formatString"],"sources":["../../src/format-context-menus/FormatContextMenuUtils.tsx"],"sourcesContent":["import React from 'react';\nimport {\n TableColumnFormat,\n TableColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport CustomFormatAction from './CustomFormatAction';\n\nexport interface FormatContextMenuOption {\n title: string;\n description: string;\n group: number;\n format: TableColumnFormat | null;\n isSelected: boolean;\n}\n\nexport interface CustomFormatOption extends FormatContextMenuOption {\n menuElement: React.ReactElement;\n}\n\nclass FormatContextMenuUtils {\n /**\n * Returns true if default option should be active in the context menu\n * @param selectedFormat selected format object or null\n */\n static isDefaultSelected(selectedFormat: TableColumnFormat | null): boolean {\n return (\n !selectedFormat ||\n ![\n TableColumnFormatter.TYPE_CONTEXT_CUSTOM,\n TableColumnFormatter.TYPE_CONTEXT_PRESET,\n ].includes(selectedFormat.type)\n );\n }\n\n /**\n * Returns true if custom format option should be active in the context menu\n * @param selectedFormat selected format object or null\n */\n static isCustomSelected(selectedFormat: TableColumnFormat): boolean {\n return (\n selectedFormat != null &&\n selectedFormat.type === TableColumnFormatter.TYPE_CONTEXT_CUSTOM\n );\n }\n\n /**\n * Creates context menu option\n * @param title Context menu title\n * @param format Format object\n * @param group Context menu group\n * @param isSelected Is current option selected\n */\n static makeOption(\n title: string,\n format: TableColumnFormat | null,\n group: number,\n isSelected: boolean\n ): FormatContextMenuOption {\n return {\n title,\n description: title,\n group,\n format,\n isSelected,\n };\n }\n\n /**\n * Creates context menu option with an input element\n * @param format Format object\n * @param group Context menu group\n * @param placeholder Input element placeholder\n * @param isSelected Is current option selected\n * @param onChange Input element onChange callback\n */\n static makeCustomFormatOption(\n format: TableColumnFormat,\n group: number,\n placeholder: string,\n isSelected: boolean,\n onChange: (value: string | null) => void\n ): CustomFormatOption {\n return {\n title: format.label,\n description: format.label,\n format,\n group,\n isSelected,\n menuElement: (\n <CustomFormatAction\n formatString={format.formatString}\n title={format.label}\n placeholder={placeholder}\n onChange={onChange}\n />\n ),\n };\n }\n}\n\nexport default FormatContextMenuUtils;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAEEC,oBAAoB,QACf,wBAAwB;AAAC,OACzBC,kBAAkB;AAczB,MAAMC,sBAAsB,CAAC;EAC3B;AACF;AACA;AACA;EACE,OAAOC,iBAAiB,CAACC,cAAwC,EAAW;IAC1E,OACE,CAACA,cAAc,IACf,CAAC,CACCJ,oBAAoB,CAACK,mBAAmB,EACxCL,oBAAoB,CAACM,mBAAmB,CACzC,CAACC,QAAQ,CAACH,cAAc,CAACI,IAAI,CAAC;EAEnC;;EAEA;AACF;AACA;AACA;EACE,OAAOC,gBAAgB,CAACL,cAAiC,EAAW;IAClE,OACEA,cAAc,IAAI,IAAI,IACtBA,cAAc,CAACI,IAAI,KAAKR,oBAAoB,CAACK,mBAAmB;EAEpE;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACE,OAAOK,UAAU,CACfC,KAAa,EACbC,MAAgC,EAChCC,KAAa,EACbC,UAAmB,EACM;IACzB,OAAO;MACLH,KAAK;MACLI,WAAW,EAAEJ,KAAK;MAClBE,KAAK;MACLD,MAAM;MACNE;IACF,CAAC;EACH;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOE,sBAAsB,CAC3BJ,MAAyB,EACzBC,KAAa,EACbI,WAAmB,EACnBH,UAAmB,EACnBI,QAAwC,EACpB;IACpB,OAAO;MACLP,KAAK,EAAEC,MAAM,CAACO,KAAK;MACnBJ,WAAW,EAAEH,MAAM,CAACO,KAAK;MACzBP,MAAM;MACNC,KAAK;MACLC,UAAU;MACVM,WAAW,eACT,oBAAC,kBAAkB;QACjB,YAAY,EAAER,MAAM,CAACS,YAAa;QAClC,KAAK,EAAET,MAAM,CAACO,KAAM;QACpB,WAAW,EAAEF,WAAY;QACzB,QAAQ,EAAEC;MAAS;IAGzB,CAAC;EACH;AACF;AAEA,eAAehB,sBAAsB"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
3
2
|
import { IntegerColumnFormatter } from '@deephaven/jsapi-utils';
|
|
4
3
|
import FormatContextMenuUtils from "./FormatContextMenuUtils.js";
|
|
5
|
-
|
|
6
4
|
class IntegerFormatContextMenu {
|
|
7
5
|
/**
|
|
8
6
|
* Creates list of formatting options for Integer context menu
|
|
@@ -25,7 +23,6 @@ class IntegerFormatContextMenu {
|
|
|
25
23
|
var customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(customFormat, IntegerFormatContextMenu.customGroup, IntegerColumnFormatter.DEFAULT_FORMAT_STRING, isCustomSelected, formatString => {
|
|
26
24
|
if (formatString != null) {
|
|
27
25
|
var newCustomFormat = IntegerColumnFormatter.makeCustomFormat(formatString);
|
|
28
|
-
|
|
29
26
|
if (IntegerColumnFormatter.isValid(newCustomFormat)) {
|
|
30
27
|
onCustomFormatChange(newCustomFormat);
|
|
31
28
|
}
|
|
@@ -35,14 +32,9 @@ class IntegerFormatContextMenu {
|
|
|
35
32
|
});
|
|
36
33
|
return [defaultFormatOption, ...presetFormatOptions, customFormatOption];
|
|
37
34
|
}
|
|
38
|
-
|
|
39
35
|
}
|
|
40
|
-
|
|
41
36
|
_defineProperty(IntegerFormatContextMenu, "defaultGroup", 10);
|
|
42
|
-
|
|
43
37
|
_defineProperty(IntegerFormatContextMenu, "presetGroup", 20);
|
|
44
|
-
|
|
45
38
|
_defineProperty(IntegerFormatContextMenu, "customGroup", 30);
|
|
46
|
-
|
|
47
39
|
export default IntegerFormatContextMenu;
|
|
48
40
|
//# sourceMappingURL=IntegerFormatContextMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegerFormatContextMenu.js","names":["IntegerColumnFormatter","FormatContextMenuUtils","IntegerFormatContextMenu","getOptions","selectedFormat","onCustomFormatChange","formatItems","format","FORMAT_MILLIONS","group","presetGroup","FORMAT_SCIENTIFIC_NOTATION","defaultFormatOption","makeOption","defaultGroup","isDefaultSelected","presetFormatOptions","map","item","label","isSameFormat","isCustomSelected","customFormat","makeCustomFormat","customFormatOption","makeCustomFormatOption","customGroup","DEFAULT_FORMAT_STRING","formatString","newCustomFormat","isValid"],"sources":["../../src/format-context-menus/IntegerFormatContextMenu.ts"],"sourcesContent":["import {\n IntegerColumnFormat,\n IntegerColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport FormatContextMenuUtils, {\n FormatContextMenuOption,\n} from './FormatContextMenuUtils';\n\nclass IntegerFormatContextMenu {\n static defaultGroup = 10;\n\n static presetGroup = 20;\n\n static customGroup = 30;\n\n /**\n * Creates list of formatting options for Integer context menu\n * @param selectedFormat Selected format object, null for no selected format\n * @param onCustomFormatChange Callback to call when the custom format is changed\n * @returns Array of formatting options for the context menu\n */\n static getOptions(\n selectedFormat: IntegerColumnFormat,\n onCustomFormatChange: (value: IntegerColumnFormat | null) => void\n ): FormatContextMenuOption[] {\n const formatItems = [\n {\n format: IntegerColumnFormatter.FORMAT_MILLIONS,\n group: IntegerFormatContextMenu.presetGroup,\n },\n {\n format: IntegerColumnFormatter.FORMAT_SCIENTIFIC_NOTATION,\n group: IntegerFormatContextMenu.presetGroup,\n },\n ];\n\n const defaultFormatOption = FormatContextMenuUtils.makeOption(\n 'Default',\n null,\n IntegerFormatContextMenu.defaultGroup,\n FormatContextMenuUtils.isDefaultSelected(selectedFormat)\n );\n\n const presetFormatOptions = formatItems.map(item =>\n FormatContextMenuUtils.makeOption(\n item.format.label,\n item.format,\n item.group,\n IntegerColumnFormatter.isSameFormat(item.format, selectedFormat)\n )\n );\n\n const isCustomSelected = FormatContextMenuUtils.isCustomSelected(\n selectedFormat\n );\n\n const customFormat = isCustomSelected\n ? selectedFormat\n : IntegerColumnFormatter.makeCustomFormat();\n\n const customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(\n customFormat,\n IntegerFormatContextMenu.customGroup,\n IntegerColumnFormatter.DEFAULT_FORMAT_STRING,\n isCustomSelected,\n formatString => {\n if (formatString != null) {\n const newCustomFormat = IntegerColumnFormatter.makeCustomFormat(\n formatString\n );\n if (IntegerColumnFormatter.isValid(newCustomFormat)) {\n onCustomFormatChange(newCustomFormat);\n }\n } else {\n onCustomFormatChange(null);\n }\n }\n );\n\n return [defaultFormatOption, ...presetFormatOptions, customFormatOption];\n }\n}\n\nexport default IntegerFormatContextMenu;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"IntegerFormatContextMenu.js","names":["IntegerColumnFormatter","FormatContextMenuUtils","IntegerFormatContextMenu","getOptions","selectedFormat","onCustomFormatChange","formatItems","format","FORMAT_MILLIONS","group","presetGroup","FORMAT_SCIENTIFIC_NOTATION","defaultFormatOption","makeOption","defaultGroup","isDefaultSelected","presetFormatOptions","map","item","label","isSameFormat","isCustomSelected","customFormat","makeCustomFormat","customFormatOption","makeCustomFormatOption","customGroup","DEFAULT_FORMAT_STRING","formatString","newCustomFormat","isValid"],"sources":["../../src/format-context-menus/IntegerFormatContextMenu.ts"],"sourcesContent":["import {\n IntegerColumnFormat,\n IntegerColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport FormatContextMenuUtils, {\n FormatContextMenuOption,\n} from './FormatContextMenuUtils';\n\nclass IntegerFormatContextMenu {\n static defaultGroup = 10;\n\n static presetGroup = 20;\n\n static customGroup = 30;\n\n /**\n * Creates list of formatting options for Integer context menu\n * @param selectedFormat Selected format object, null for no selected format\n * @param onCustomFormatChange Callback to call when the custom format is changed\n * @returns Array of formatting options for the context menu\n */\n static getOptions(\n selectedFormat: IntegerColumnFormat,\n onCustomFormatChange: (value: IntegerColumnFormat | null) => void\n ): FormatContextMenuOption[] {\n const formatItems = [\n {\n format: IntegerColumnFormatter.FORMAT_MILLIONS,\n group: IntegerFormatContextMenu.presetGroup,\n },\n {\n format: IntegerColumnFormatter.FORMAT_SCIENTIFIC_NOTATION,\n group: IntegerFormatContextMenu.presetGroup,\n },\n ];\n\n const defaultFormatOption = FormatContextMenuUtils.makeOption(\n 'Default',\n null,\n IntegerFormatContextMenu.defaultGroup,\n FormatContextMenuUtils.isDefaultSelected(selectedFormat)\n );\n\n const presetFormatOptions = formatItems.map(item =>\n FormatContextMenuUtils.makeOption(\n item.format.label,\n item.format,\n item.group,\n IntegerColumnFormatter.isSameFormat(item.format, selectedFormat)\n )\n );\n\n const isCustomSelected = FormatContextMenuUtils.isCustomSelected(\n selectedFormat\n );\n\n const customFormat = isCustomSelected\n ? selectedFormat\n : IntegerColumnFormatter.makeCustomFormat();\n\n const customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(\n customFormat,\n IntegerFormatContextMenu.customGroup,\n IntegerColumnFormatter.DEFAULT_FORMAT_STRING,\n isCustomSelected,\n formatString => {\n if (formatString != null) {\n const newCustomFormat = IntegerColumnFormatter.makeCustomFormat(\n formatString\n );\n if (IntegerColumnFormatter.isValid(newCustomFormat)) {\n onCustomFormatChange(newCustomFormat);\n }\n } else {\n onCustomFormatChange(null);\n }\n }\n );\n\n return [defaultFormatOption, ...presetFormatOptions, customFormatOption];\n }\n}\n\nexport default IntegerFormatContextMenu;\n"],"mappings":";AAAA,SAEEA,sBAAsB,QACjB,wBAAwB;AAAC,OACzBC,sBAAsB;AAI7B,MAAMC,wBAAwB,CAAC;EAO7B;AACF;AACA;AACA;AACA;AACA;EACE,OAAOC,UAAU,CACfC,cAAmC,EACnCC,oBAAiE,EACtC;IAC3B,IAAMC,WAAW,GAAG,CAClB;MACEC,MAAM,EAAEP,sBAAsB,CAACQ,eAAe;MAC9CC,KAAK,EAAEP,wBAAwB,CAACQ;IAClC,CAAC,EACD;MACEH,MAAM,EAAEP,sBAAsB,CAACW,0BAA0B;MACzDF,KAAK,EAAEP,wBAAwB,CAACQ;IAClC,CAAC,CACF;IAED,IAAME,mBAAmB,GAAGX,sBAAsB,CAACY,UAAU,CAC3D,SAAS,EACT,IAAI,EACJX,wBAAwB,CAACY,YAAY,EACrCb,sBAAsB,CAACc,iBAAiB,CAACX,cAAc,CAAC,CACzD;IAED,IAAMY,mBAAmB,GAAGV,WAAW,CAACW,GAAG,CAACC,IAAI,IAC9CjB,sBAAsB,CAACY,UAAU,CAC/BK,IAAI,CAACX,MAAM,CAACY,KAAK,EACjBD,IAAI,CAACX,MAAM,EACXW,IAAI,CAACT,KAAK,EACVT,sBAAsB,CAACoB,YAAY,CAACF,IAAI,CAACX,MAAM,EAAEH,cAAc,CAAC,CACjE,CACF;IAED,IAAMiB,gBAAgB,GAAGpB,sBAAsB,CAACoB,gBAAgB,CAC9DjB,cAAc,CACf;IAED,IAAMkB,YAAY,GAAGD,gBAAgB,GACjCjB,cAAc,GACdJ,sBAAsB,CAACuB,gBAAgB,EAAE;IAE7C,IAAMC,kBAAkB,GAAGvB,sBAAsB,CAACwB,sBAAsB,CACtEH,YAAY,EACZpB,wBAAwB,CAACwB,WAAW,EACpC1B,sBAAsB,CAAC2B,qBAAqB,EAC5CN,gBAAgB,EAChBO,YAAY,IAAI;MACd,IAAIA,YAAY,IAAI,IAAI,EAAE;QACxB,IAAMC,eAAe,GAAG7B,sBAAsB,CAACuB,gBAAgB,CAC7DK,YAAY,CACb;QACD,IAAI5B,sBAAsB,CAAC8B,OAAO,CAACD,eAAe,CAAC,EAAE;UACnDxB,oBAAoB,CAACwB,eAAe,CAAC;QACvC;MACF,CAAC,MAAM;QACLxB,oBAAoB,CAAC,IAAI,CAAC;MAC5B;IACF,CAAC,CACF;IAED,OAAO,CAACO,mBAAmB,EAAE,GAAGI,mBAAmB,EAAEQ,kBAAkB,CAAC;EAC1E;AACF;AAAC,gBAzEKtB,wBAAwB,kBACN,EAAE;AAAA,gBADpBA,wBAAwB,iBAGP,EAAE;AAAA,gBAHnBA,wBAAwB,iBAKP,EAAE;AAsEzB,eAAeA,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","DateTimeFormatContextMenu","DecimalFormatContextMenu","IntegerFormatContextMenu"],"sources":["../../src/format-context-menus/index.ts"],"sourcesContent":["export { default as DateTimeFormatContextMenu } from './DateTimeFormatContextMenu';\nexport { default as DecimalFormatContextMenu } from './DecimalFormatContextMenu';\nexport { default as IntegerFormatContextMenu } from './IntegerFormatContextMenu';\n"],"mappings":"SAASA,OAAO,IAAIC,
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","DateTimeFormatContextMenu","DecimalFormatContextMenu","IntegerFormatContextMenu"],"sources":["../../src/format-context-menus/index.ts"],"sourcesContent":["export { default as DateTimeFormatContextMenu } from './DateTimeFormatContextMenu';\nexport { default as DecimalFormatContextMenu } from './DecimalFormatContextMenu';\nexport { default as IntegerFormatContextMenu } from './IntegerFormatContextMenu';\n"],"mappings":"SAASA,OAAO,IAAIC,yBAAyB;AAAA,SACpCD,OAAO,IAAIE,wBAAwB;AAAA,SACnCF,OAAO,IAAIG,wBAAwB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import IrisGrid from './IrisGrid';
|
|
2
|
+
export default IrisGrid;
|
|
3
|
+
export { IrisGrid };
|
|
1
4
|
export * from './sidebar';
|
|
2
5
|
export * from './AdvancedFilterCreator';
|
|
3
6
|
export * from './CommonTypes';
|
|
4
|
-
export { default as IrisGrid } from './IrisGrid';
|
|
5
7
|
export * from './IrisGrid';
|
|
6
8
|
export { default as SHORTCUTS } from './IrisGridShortcuts';
|
|
7
9
|
export { default as IrisGridModel } from './IrisGridModel';
|
|
@@ -17,8 +19,6 @@ export type { IrisGridThemeType } from './IrisGridTheme';
|
|
|
17
19
|
export { default as IrisGridTestUtils } from './IrisGridTestUtils';
|
|
18
20
|
export { default as IrisGridUtils } from './IrisGridUtils';
|
|
19
21
|
export * from './IrisGridUtils';
|
|
20
|
-
export { default } from './IrisGrid';
|
|
21
|
-
export * from './IrisGrid';
|
|
22
22
|
export { default as TableViewportUpdater } from './TableViewportUpdater';
|
|
23
23
|
export { default as TreeTableViewportUpdater } from './TreeTableViewportUpdater';
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACrF,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import IrisGrid from "./IrisGrid.js";
|
|
2
|
+
export default IrisGrid;
|
|
3
|
+
export { IrisGrid };
|
|
1
4
|
export * from "./sidebar/index.js";
|
|
2
5
|
export * from "./AdvancedFilterCreator.js";
|
|
3
6
|
export * from "./CommonTypes.js";
|
|
4
|
-
export { default as IrisGrid } from "./IrisGrid.js";
|
|
5
7
|
export * from "./IrisGrid.js";
|
|
6
8
|
export { default as SHORTCUTS } from "./IrisGridShortcuts.js";
|
|
7
9
|
export { default as IrisGridModel } from "./IrisGridModel.js";
|
|
@@ -16,8 +18,6 @@ export { default as IrisGridTheme } from "./IrisGridTheme.js";
|
|
|
16
18
|
export { default as IrisGridTestUtils } from "./IrisGridTestUtils.js";
|
|
17
19
|
export { default as IrisGridUtils } from "./IrisGridUtils.js";
|
|
18
20
|
export * from "./IrisGridUtils.js";
|
|
19
|
-
export { default } from "./IrisGrid.js";
|
|
20
|
-
export * from "./IrisGrid.js";
|
|
21
21
|
export { default as TableViewportUpdater } from "./TableViewportUpdater.js";
|
|
22
22
|
export { default as TreeTableViewportUpdater } from "./TreeTableViewportUpdater.js";
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["IrisGrid","default","SHORTCUTS","IrisGridModel","IrisGridTableModel","IrisGridTreeTableModel","IrisGridTableModelTemplate","IrisGridModelFactory","IrisGridTheme","IrisGridTestUtils","IrisGridUtils","TableViewportUpdater","TreeTableViewportUpdater"],"sources":["../src/index.ts"],"sourcesContent":["import IrisGrid from './IrisGrid';\n\nexport default IrisGrid;\nexport { IrisGrid };\nexport * from './sidebar';\nexport * from './AdvancedFilterCreator';\nexport * from './CommonTypes';\nexport * from './IrisGrid';\nexport { default as SHORTCUTS } from './IrisGridShortcuts';\nexport { default as IrisGridModel } from './IrisGridModel';\nexport { default as IrisGridTableModel } from './IrisGridTableModel';\nexport * from './IrisGridTableModel';\nexport { default as IrisGridTreeTableModel } from './IrisGridTreeTableModel';\nexport { default as IrisGridTableModelTemplate } from './IrisGridTableModelTemplate';\nexport * from './IrisGridTableModelTemplate';\nexport * from './IrisGridTreeTableModel';\nexport { default as IrisGridModelFactory } from './IrisGridModelFactory';\nexport { default as IrisGridTheme } from './IrisGridTheme';\nexport type { IrisGridThemeType } from './IrisGridTheme';\nexport { default as IrisGridTestUtils } from './IrisGridTestUtils';\nexport { default as IrisGridUtils } from './IrisGridUtils';\nexport * from './IrisGridUtils';\nexport { default as TableViewportUpdater } from './TableViewportUpdater';\nexport { default as TreeTableViewportUpdater } from './TreeTableViewportUpdater';\n"],"mappings":"OAAOA,QAAQ;AAEf,eAAeA,QAAQ;AACvB,SAASA,QAAQ;AAAG;AAAA;AAAA;AAAA;AAAA,SAKXC,OAAO,IAAIC,SAAS;AAAA,SACpBD,OAAO,IAAIE,aAAa;AAAA,SACxBF,OAAO,IAAIG,kBAAkB;AAAA;AAAA,SAE7BH,OAAO,IAAII,sBAAsB;AAAA,SACjCJ,OAAO,IAAIK,0BAA0B;AAAA;AAAA;AAAA,SAGrCL,OAAO,IAAIM,oBAAoB;AAAA,SAC/BN,OAAO,IAAIO,aAAa;AAAA,SAExBP,OAAO,IAAIQ,iBAAiB;AAAA,SAC5BR,OAAO,IAAIS,aAAa;AAAA;AAAA,SAExBT,OAAO,IAAIU,oBAAoB;AAAA,SAC/BV,OAAO,IAAIW,wBAAwB"}
|
|
@@ -1,27 +1,19 @@
|
|
|
1
1
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
3
2
|
import { KeyHandler } from '@deephaven/grid';
|
|
4
3
|
import IrisGridShortcuts from "../IrisGridShortcuts.js";
|
|
5
|
-
|
|
6
4
|
class ClearFilterKeyHandler extends KeyHandler {
|
|
7
5
|
constructor(irisGrid) {
|
|
8
6
|
super();
|
|
9
|
-
|
|
10
7
|
_defineProperty(this, "irisGrid", void 0);
|
|
11
|
-
|
|
12
8
|
this.irisGrid = irisGrid;
|
|
13
9
|
}
|
|
14
|
-
|
|
15
10
|
onDown(event) {
|
|
16
11
|
if (IrisGridShortcuts.TABLE.CLEAR_FILTERS.matchesEvent(event)) {
|
|
17
12
|
this.irisGrid.clearAllFilters();
|
|
18
13
|
return true;
|
|
19
14
|
}
|
|
20
|
-
|
|
21
15
|
return false;
|
|
22
16
|
}
|
|
23
|
-
|
|
24
17
|
}
|
|
25
|
-
|
|
26
18
|
export default ClearFilterKeyHandler;
|
|
27
19
|
//# sourceMappingURL=ClearFilterKeyHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClearFilterKeyHandler.js","names":["KeyHandler","IrisGridShortcuts","ClearFilterKeyHandler","constructor","irisGrid","onDown","event","TABLE","CLEAR_FILTERS","matchesEvent","clearAllFilters"],"sources":["../../src/key-handlers/ClearFilterKeyHandler.ts"],"sourcesContent":["import { KeyboardEvent } from 'react';\nimport { KeyHandler } from '@deephaven/grid';\nimport { IrisGrid } from '../IrisGrid';\nimport IrisGridShortcuts from '../IrisGridShortcuts';\n\nclass ClearFilterKeyHandler extends KeyHandler {\n private irisGrid: IrisGrid;\n\n constructor(irisGrid: IrisGrid) {\n super();\n\n this.irisGrid = irisGrid;\n }\n\n onDown(event: KeyboardEvent): boolean {\n if (IrisGridShortcuts.TABLE.CLEAR_FILTERS.matchesEvent(event)) {\n this.irisGrid.clearAllFilters();\n return true;\n }\n return false;\n }\n}\n\nexport default ClearFilterKeyHandler;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClearFilterKeyHandler.js","names":["KeyHandler","IrisGridShortcuts","ClearFilterKeyHandler","constructor","irisGrid","onDown","event","TABLE","CLEAR_FILTERS","matchesEvent","clearAllFilters"],"sources":["../../src/key-handlers/ClearFilterKeyHandler.ts"],"sourcesContent":["import { KeyboardEvent } from 'react';\nimport { KeyHandler } from '@deephaven/grid';\nimport { IrisGrid } from '../IrisGrid';\nimport IrisGridShortcuts from '../IrisGridShortcuts';\n\nclass ClearFilterKeyHandler extends KeyHandler {\n private irisGrid: IrisGrid;\n\n constructor(irisGrid: IrisGrid) {\n super();\n\n this.irisGrid = irisGrid;\n }\n\n onDown(event: KeyboardEvent): boolean {\n if (IrisGridShortcuts.TABLE.CLEAR_FILTERS.matchesEvent(event)) {\n this.irisGrid.clearAllFilters();\n return true;\n }\n return false;\n }\n}\n\nexport default ClearFilterKeyHandler;\n"],"mappings":";AACA,SAASA,UAAU,QAAQ,iBAAiB;AAAC,OAEtCC,iBAAiB;AAExB,MAAMC,qBAAqB,SAASF,UAAU,CAAC;EAG7CG,WAAW,CAACC,QAAkB,EAAE;IAC9B,KAAK,EAAE;IAAC;IAER,IAAI,CAACA,QAAQ,GAAGA,QAAQ;EAC1B;EAEAC,MAAM,CAACC,KAAoB,EAAW;IACpC,IAAIL,iBAAiB,CAACM,KAAK,CAACC,aAAa,CAACC,YAAY,CAACH,KAAK,CAAC,EAAE;MAC7D,IAAI,CAACF,QAAQ,CAACM,eAAe,EAAE;MAC/B,OAAO,IAAI;IACb;IACA,OAAO,KAAK;EACd;AACF;AAEA,eAAeR,qBAAqB"}
|
|
@@ -1,38 +1,29 @@
|
|
|
1
1
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
3
2
|
/* eslint class-methods-use-this: "off" */
|
|
3
|
+
|
|
4
4
|
import { ContextActionUtils } from '@deephaven/components';
|
|
5
5
|
import { KeyHandler } from '@deephaven/grid';
|
|
6
6
|
import IrisGridUtils from "../IrisGridUtils.js";
|
|
7
|
-
|
|
8
7
|
class CopyKeyHandler extends KeyHandler {
|
|
9
8
|
constructor(irisGrid) {
|
|
10
9
|
super();
|
|
11
|
-
|
|
12
10
|
_defineProperty(this, "irisGrid", void 0);
|
|
13
|
-
|
|
14
11
|
this.irisGrid = irisGrid;
|
|
15
12
|
}
|
|
16
|
-
|
|
17
13
|
onDown(event) {
|
|
18
14
|
var {
|
|
19
15
|
selectedRanges
|
|
20
16
|
} = this.irisGrid.state;
|
|
21
|
-
|
|
22
17
|
if (event.key === 'c' && ContextActionUtils.isModifierKeyDown(event)) {
|
|
23
18
|
if (IrisGridUtils.isValidSnapshotRanges(selectedRanges)) {
|
|
24
19
|
this.irisGrid.copyRanges(selectedRanges);
|
|
25
20
|
} else {
|
|
26
21
|
this.irisGrid.copyRanges(selectedRanges, false, false, 'Invalid copy ranges');
|
|
27
22
|
}
|
|
28
|
-
|
|
29
23
|
return true;
|
|
30
24
|
}
|
|
31
|
-
|
|
32
25
|
return false;
|
|
33
26
|
}
|
|
34
|
-
|
|
35
27
|
}
|
|
36
|
-
|
|
37
28
|
export default CopyKeyHandler;
|
|
38
29
|
//# sourceMappingURL=CopyKeyHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyKeyHandler.js","names":["ContextActionUtils","KeyHandler","IrisGridUtils","CopyKeyHandler","constructor","irisGrid","onDown","event","selectedRanges","state","key","isModifierKeyDown","isValidSnapshotRanges","copyRanges"],"sources":["../../src/key-handlers/CopyKeyHandler.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport { KeyboardEvent } from 'react';\nimport { ContextActionUtils } from '@deephaven/components';\nimport { KeyHandler } from '@deephaven/grid';\nimport { IrisGrid } from '../IrisGrid';\nimport IrisGridUtils from '../IrisGridUtils';\n\nclass CopyKeyHandler extends KeyHandler {\n private irisGrid: IrisGrid;\n\n constructor(irisGrid: IrisGrid) {\n super();\n\n this.irisGrid = irisGrid;\n }\n\n onDown(event: KeyboardEvent): boolean {\n const { selectedRanges } = this.irisGrid.state;\n if (event.key === 'c' && ContextActionUtils.isModifierKeyDown(event)) {\n if (IrisGridUtils.isValidSnapshotRanges(selectedRanges)) {\n this.irisGrid.copyRanges(selectedRanges);\n } else {\n this.irisGrid.copyRanges(\n selectedRanges,\n false,\n false,\n 'Invalid copy ranges'\n );\n }\n return true;\n }\n return false;\n }\n}\n\nexport default CopyKeyHandler;\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"CopyKeyHandler.js","names":["ContextActionUtils","KeyHandler","IrisGridUtils","CopyKeyHandler","constructor","irisGrid","onDown","event","selectedRanges","state","key","isModifierKeyDown","isValidSnapshotRanges","copyRanges"],"sources":["../../src/key-handlers/CopyKeyHandler.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport { KeyboardEvent } from 'react';\nimport { ContextActionUtils } from '@deephaven/components';\nimport { KeyHandler } from '@deephaven/grid';\nimport { IrisGrid } from '../IrisGrid';\nimport IrisGridUtils from '../IrisGridUtils';\n\nclass CopyKeyHandler extends KeyHandler {\n private irisGrid: IrisGrid;\n\n constructor(irisGrid: IrisGrid) {\n super();\n\n this.irisGrid = irisGrid;\n }\n\n onDown(event: KeyboardEvent): boolean {\n const { selectedRanges } = this.irisGrid.state;\n if (event.key === 'c' && ContextActionUtils.isModifierKeyDown(event)) {\n if (IrisGridUtils.isValidSnapshotRanges(selectedRanges)) {\n this.irisGrid.copyRanges(selectedRanges);\n } else {\n this.irisGrid.copyRanges(\n selectedRanges,\n false,\n false,\n 'Invalid copy ranges'\n );\n }\n return true;\n }\n return false;\n }\n}\n\nexport default CopyKeyHandler;\n"],"mappings":";AAAA;;AAEA,SAASA,kBAAkB,QAAQ,uBAAuB;AAC1D,SAASC,UAAU,QAAQ,iBAAiB;AAAC,OAEtCC,aAAa;AAEpB,MAAMC,cAAc,SAASF,UAAU,CAAC;EAGtCG,WAAW,CAACC,QAAkB,EAAE;IAC9B,KAAK,EAAE;IAAC;IAER,IAAI,CAACA,QAAQ,GAAGA,QAAQ;EAC1B;EAEAC,MAAM,CAACC,KAAoB,EAAW;IACpC,IAAM;MAAEC;IAAe,CAAC,GAAG,IAAI,CAACH,QAAQ,CAACI,KAAK;IAC9C,IAAIF,KAAK,CAACG,GAAG,KAAK,GAAG,IAAIV,kBAAkB,CAACW,iBAAiB,CAACJ,KAAK,CAAC,EAAE;MACpE,IAAIL,aAAa,CAACU,qBAAqB,CAACJ,cAAc,CAAC,EAAE;QACvD,IAAI,CAACH,QAAQ,CAACQ,UAAU,CAACL,cAAc,CAAC;MAC1C,CAAC,MAAM;QACL,IAAI,CAACH,QAAQ,CAACQ,UAAU,CACtBL,cAAc,EACd,KAAK,EACL,KAAK,EACL,qBAAqB,CACtB;MACH;MACA,OAAO,IAAI;IACb;IACA,OAAO,KAAK;EACd;AACF;AAEA,eAAeL,cAAc"}
|
|
@@ -1,41 +1,30 @@
|
|
|
1
1
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
3
2
|
import { KeyHandler } from '@deephaven/grid';
|
|
4
3
|
import { TableUtils } from '@deephaven/jsapi-utils';
|
|
5
4
|
import IrisGridShortcuts from "../IrisGridShortcuts.js";
|
|
6
|
-
|
|
7
5
|
class ReverseKeyHandler extends KeyHandler {
|
|
8
6
|
constructor(irisGrid) {
|
|
9
7
|
super();
|
|
10
|
-
|
|
11
8
|
_defineProperty(this, "irisGrid", void 0);
|
|
12
|
-
|
|
13
9
|
this.irisGrid = irisGrid;
|
|
14
10
|
}
|
|
15
|
-
|
|
16
11
|
onDown(event) {
|
|
17
12
|
if (IrisGridShortcuts.TABLE.REVERSE.matchesEvent(event)) {
|
|
18
13
|
if (!this.irisGrid.isReversible()) {
|
|
19
14
|
return false;
|
|
20
15
|
}
|
|
21
|
-
|
|
22
16
|
var {
|
|
23
17
|
reverseType
|
|
24
18
|
} = this.irisGrid.state;
|
|
25
|
-
|
|
26
19
|
if (reverseType === TableUtils.REVERSE_TYPE.NONE) {
|
|
27
20
|
this.irisGrid.reverse(TableUtils.REVERSE_TYPE.POST_SORT);
|
|
28
21
|
} else {
|
|
29
22
|
this.irisGrid.reverse(TableUtils.REVERSE_TYPE.NONE);
|
|
30
23
|
}
|
|
31
|
-
|
|
32
24
|
return true;
|
|
33
25
|
}
|
|
34
|
-
|
|
35
26
|
return false;
|
|
36
27
|
}
|
|
37
|
-
|
|
38
28
|
}
|
|
39
|
-
|
|
40
29
|
export default ReverseKeyHandler;
|
|
41
30
|
//# sourceMappingURL=ReverseKeyHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReverseKeyHandler.js","names":["KeyHandler","TableUtils","IrisGridShortcuts","ReverseKeyHandler","constructor","irisGrid","onDown","event","TABLE","REVERSE","matchesEvent","isReversible","reverseType","state","REVERSE_TYPE","NONE","reverse","POST_SORT"],"sources":["../../src/key-handlers/ReverseKeyHandler.ts"],"sourcesContent":["import { KeyboardEvent } from 'react';\nimport { KeyHandler } from '@deephaven/grid';\nimport { TableUtils } from '@deephaven/jsapi-utils';\nimport { IrisGrid } from '../IrisGrid';\nimport IrisGridShortcuts from '../IrisGridShortcuts';\n\nclass ReverseKeyHandler extends KeyHandler {\n private irisGrid: IrisGrid;\n\n constructor(irisGrid: IrisGrid) {\n super();\n\n this.irisGrid = irisGrid;\n }\n\n onDown(event: KeyboardEvent): boolean {\n if (IrisGridShortcuts.TABLE.REVERSE.matchesEvent(event)) {\n if (!this.irisGrid.isReversible()) {\n return false;\n }\n const { reverseType } = this.irisGrid.state;\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 return true;\n }\n return false;\n }\n}\n\nexport default ReverseKeyHandler;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReverseKeyHandler.js","names":["KeyHandler","TableUtils","IrisGridShortcuts","ReverseKeyHandler","constructor","irisGrid","onDown","event","TABLE","REVERSE","matchesEvent","isReversible","reverseType","state","REVERSE_TYPE","NONE","reverse","POST_SORT"],"sources":["../../src/key-handlers/ReverseKeyHandler.ts"],"sourcesContent":["import { KeyboardEvent } from 'react';\nimport { KeyHandler } from '@deephaven/grid';\nimport { TableUtils } from '@deephaven/jsapi-utils';\nimport { IrisGrid } from '../IrisGrid';\nimport IrisGridShortcuts from '../IrisGridShortcuts';\n\nclass ReverseKeyHandler extends KeyHandler {\n private irisGrid: IrisGrid;\n\n constructor(irisGrid: IrisGrid) {\n super();\n\n this.irisGrid = irisGrid;\n }\n\n onDown(event: KeyboardEvent): boolean {\n if (IrisGridShortcuts.TABLE.REVERSE.matchesEvent(event)) {\n if (!this.irisGrid.isReversible()) {\n return false;\n }\n const { reverseType } = this.irisGrid.state;\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 return true;\n }\n return false;\n }\n}\n\nexport default ReverseKeyHandler;\n"],"mappings":";AACA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,UAAU,QAAQ,wBAAwB;AAAC,OAE7CC,iBAAiB;AAExB,MAAMC,iBAAiB,SAASH,UAAU,CAAC;EAGzCI,WAAW,CAACC,QAAkB,EAAE;IAC9B,KAAK,EAAE;IAAC;IAER,IAAI,CAACA,QAAQ,GAAGA,QAAQ;EAC1B;EAEAC,MAAM,CAACC,KAAoB,EAAW;IACpC,IAAIL,iBAAiB,CAACM,KAAK,CAACC,OAAO,CAACC,YAAY,CAACH,KAAK,CAAC,EAAE;MACvD,IAAI,CAAC,IAAI,CAACF,QAAQ,CAACM,YAAY,EAAE,EAAE;QACjC,OAAO,KAAK;MACd;MACA,IAAM;QAAEC;MAAY,CAAC,GAAG,IAAI,CAACP,QAAQ,CAACQ,KAAK;MAC3C,IAAID,WAAW,KAAKX,UAAU,CAACa,YAAY,CAACC,IAAI,EAAE;QAChD,IAAI,CAACV,QAAQ,CAACW,OAAO,CAACf,UAAU,CAACa,YAAY,CAACG,SAAS,CAAC;MAC1D,CAAC,MAAM;QACL,IAAI,CAACZ,QAAQ,CAACW,OAAO,CAACf,UAAU,CAACa,YAAY,CAACC,IAAI,CAAC;MACrD;MACA,OAAO,IAAI;IACb;IACA,OAAO,KAAK;EACd;AACF;AAEA,eAAeZ,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","CopyKeyHandler","ReverseKeyHandler","ClearFilterKeyHandler"],"sources":["../../src/key-handlers/index.ts"],"sourcesContent":["export { default as CopyKeyHandler } from './CopyKeyHandler';\nexport { default as ReverseKeyHandler } from './ReverseKeyHandler';\nexport { default as ClearFilterKeyHandler } from './ClearFilterKeyHandler';\n"],"mappings":"SAASA,OAAO,IAAIC,
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","CopyKeyHandler","ReverseKeyHandler","ClearFilterKeyHandler"],"sources":["../../src/key-handlers/index.ts"],"sourcesContent":["export { default as CopyKeyHandler } from './CopyKeyHandler';\nexport { default as ReverseKeyHandler } from './ReverseKeyHandler';\nexport { default as ClearFilterKeyHandler } from './ClearFilterKeyHandler';\n"],"mappings":"SAASA,OAAO,IAAIC,cAAc;AAAA,SACzBD,OAAO,IAAIE,iBAAiB;AAAA,SAC5BF,OAAO,IAAIG,qBAAqB"}
|