@deephaven/iris-grid 0.22.3-deep-bot-test.14 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/dist/AdvancedFilterCreator.d.ts +1 -1
  2. package/dist/AdvancedFilterCreator.d.ts.map +1 -1
  3. package/dist/AdvancedFilterCreator.js +7 -65
  4. package/dist/AdvancedFilterCreator.js.map +1 -1
  5. package/dist/AdvancedFilterCreatorFilterItem.d.ts +1 -1
  6. package/dist/AdvancedFilterCreatorFilterItem.d.ts.map +1 -1
  7. package/dist/AdvancedFilterCreatorFilterItem.js +0 -23
  8. package/dist/AdvancedFilterCreatorFilterItem.js.map +1 -1
  9. package/dist/AdvancedFilterCreatorSelectValue.js +0 -52
  10. package/dist/AdvancedFilterCreatorSelectValue.js.map +1 -1
  11. package/dist/AdvancedFilterCreatorSelectValueList.d.ts +1 -5
  12. package/dist/AdvancedFilterCreatorSelectValueList.d.ts.map +1 -1
  13. package/dist/AdvancedFilterCreatorSelectValueList.js +2 -42
  14. package/dist/AdvancedFilterCreatorSelectValueList.js.map +1 -1
  15. package/dist/ColumnHeaderGroup.js +0 -11
  16. package/dist/ColumnHeaderGroup.js.map +1 -1
  17. package/dist/ColumnStatistics.js +1 -20
  18. package/dist/ColumnStatistics.js.map +1 -1
  19. package/dist/CommonTypes.d.ts +14 -14
  20. package/dist/CommonTypes.d.ts.map +1 -1
  21. package/dist/CrossColumnSearch.js +2 -23
  22. package/dist/CrossColumnSearch.js.map +1 -1
  23. package/dist/FilterInputField.js +2 -36
  24. package/dist/FilterInputField.js.map +1 -1
  25. package/dist/GotoRow.d.ts +1 -1
  26. package/dist/GotoRow.d.ts.map +1 -1
  27. package/dist/GotoRow.js +2 -7
  28. package/dist/GotoRow.js.map +1 -1
  29. package/dist/IrisGrid.d.ts +45 -39
  30. package/dist/IrisGrid.d.ts.map +1 -1
  31. package/dist/IrisGrid.js +77 -519
  32. package/dist/IrisGrid.js.map +1 -1
  33. package/dist/IrisGridBottomBar.d.ts +2 -2
  34. package/dist/IrisGridBottomBar.d.ts.map +1 -1
  35. package/dist/IrisGridBottomBar.js +2 -2
  36. package/dist/IrisGridBottomBar.js.map +1 -1
  37. package/dist/IrisGridCellOverflowModal.js +6 -21
  38. package/dist/IrisGridCellOverflowModal.js.map +1 -1
  39. package/dist/IrisGridCopyHandler.d.ts +3 -3
  40. package/dist/IrisGridCopyHandler.d.ts.map +1 -1
  41. package/dist/IrisGridCopyHandler.js +3 -50
  42. package/dist/IrisGridCopyHandler.js.map +1 -1
  43. package/dist/IrisGridMetricCalculator.js +2 -12
  44. package/dist/IrisGridMetricCalculator.js.map +1 -1
  45. package/dist/IrisGridModel.d.ts +3 -3
  46. package/dist/IrisGridModel.d.ts.map +1 -1
  47. package/dist/IrisGridModel.js +32 -58
  48. package/dist/IrisGridModel.js.map +1 -1
  49. package/dist/IrisGridModelFactory.js +0 -7
  50. package/dist/IrisGridModelFactory.js.map +1 -1
  51. package/dist/IrisGridModelUpdater.js +0 -4
  52. package/dist/IrisGridModelUpdater.js.map +1 -1
  53. package/dist/IrisGridPartitionSelector.js +0 -23
  54. package/dist/IrisGridPartitionSelector.js.map +1 -1
  55. package/dist/IrisGridProxyModel.js +9 -153
  56. package/dist/IrisGridProxyModel.js.map +1 -1
  57. package/dist/IrisGridRenderer.d.ts +1 -1
  58. package/dist/IrisGridRenderer.d.ts.map +1 -1
  59. package/dist/IrisGridRenderer.js +41 -183
  60. package/dist/IrisGridRenderer.js.map +1 -1
  61. package/dist/IrisGridShortcuts.js.map +1 -1
  62. package/dist/IrisGridTableModel.d.ts +3 -3
  63. package/dist/IrisGridTableModel.d.ts.map +1 -1
  64. package/dist/IrisGridTableModel.js +10 -90
  65. package/dist/IrisGridTableModel.js.map +1 -1
  66. package/dist/IrisGridTableModelTemplate.d.ts +3 -3
  67. package/dist/IrisGridTableModelTemplate.d.ts.map +1 -1
  68. package/dist/IrisGridTableModelTemplate.js +70 -461
  69. package/dist/IrisGridTableModelTemplate.js.map +1 -1
  70. package/dist/IrisGridTestUtils.js +0 -23
  71. package/dist/IrisGridTestUtils.js.map +1 -1
  72. package/dist/IrisGridTheme.d.ts +1 -1
  73. package/dist/IrisGridTheme.d.ts.map +1 -1
  74. package/dist/IrisGridTheme.js.map +1 -1
  75. package/dist/IrisGridTreeTableModel.js +3 -42
  76. package/dist/IrisGridTreeTableModel.js.map +1 -1
  77. package/dist/IrisGridUtils.d.ts +13 -7
  78. package/dist/IrisGridUtils.d.ts.map +1 -1
  79. package/dist/IrisGridUtils.js +98 -196
  80. package/dist/IrisGridUtils.js.map +1 -1
  81. package/dist/MissingKeyError.js +0 -7
  82. package/dist/MissingKeyError.js.map +1 -1
  83. package/dist/PartitionSelectorSearch.d.ts +2 -2
  84. package/dist/PartitionSelectorSearch.js +2 -48
  85. package/dist/PartitionSelectorSearch.js.map +1 -1
  86. package/dist/PendingDataBottomBar.d.ts +2 -2
  87. package/dist/PendingDataBottomBar.d.ts.map +1 -1
  88. package/dist/PendingDataBottomBar.js +2 -7
  89. package/dist/PendingDataBottomBar.js.map +1 -1
  90. package/dist/TableViewportUpdater.d.ts +2 -2
  91. package/dist/TableViewportUpdater.d.ts.map +1 -1
  92. package/dist/TableViewportUpdater.js +3 -29
  93. package/dist/TableViewportUpdater.js.map +1 -1
  94. package/dist/ToastBottomBar.d.ts +2 -2
  95. package/dist/ToastBottomBar.d.ts.map +1 -1
  96. package/dist/ToastBottomBar.js +2 -4
  97. package/dist/ToastBottomBar.js.map +1 -1
  98. package/dist/TreeTableViewportUpdater.js +0 -21
  99. package/dist/TreeTableViewportUpdater.js.map +1 -1
  100. package/dist/format-context-menus/CustomFormatAction.d.ts +1 -1
  101. package/dist/format-context-menus/CustomFormatAction.d.ts.map +1 -1
  102. package/dist/format-context-menus/CustomFormatAction.js +4 -25
  103. package/dist/format-context-menus/CustomFormatAction.js.map +1 -1
  104. package/dist/format-context-menus/DateTimeFormatContextMenu.js +0 -7
  105. package/dist/format-context-menus/DateTimeFormatContextMenu.js.map +1 -1
  106. package/dist/format-context-menus/DecimalFormatContextMenu.js +0 -9
  107. package/dist/format-context-menus/DecimalFormatContextMenu.js.map +1 -1
  108. package/dist/format-context-menus/FormatContextMenuUtils.js +3 -9
  109. package/dist/format-context-menus/FormatContextMenuUtils.js.map +1 -1
  110. package/dist/format-context-menus/IntegerFormatContextMenu.js +0 -8
  111. package/dist/format-context-menus/IntegerFormatContextMenu.js.map +1 -1
  112. package/dist/format-context-menus/index.js.map +1 -1
  113. package/dist/index.d.ts +3 -3
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +3 -3
  116. package/dist/index.js.map +1 -1
  117. package/dist/key-handlers/ClearFilterKeyHandler.js +0 -8
  118. package/dist/key-handlers/ClearFilterKeyHandler.js.map +1 -1
  119. package/dist/key-handlers/CopyKeyHandler.js +1 -10
  120. package/dist/key-handlers/CopyKeyHandler.js.map +1 -1
  121. package/dist/key-handlers/ReverseKeyHandler.js +0 -11
  122. package/dist/key-handlers/ReverseKeyHandler.js.map +1 -1
  123. package/dist/key-handlers/index.js.map +1 -1
  124. package/dist/mousehandlers/IrisGridCellOverflowMouseHandler.js +2 -32
  125. package/dist/mousehandlers/IrisGridCellOverflowMouseHandler.js.map +1 -1
  126. package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.js +4 -34
  127. package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.js.map +1 -1
  128. package/dist/mousehandlers/IrisGridColumnTooltipMouseHandler.js +0 -20
  129. package/dist/mousehandlers/IrisGridColumnTooltipMouseHandler.js.map +1 -1
  130. package/dist/mousehandlers/IrisGridContextMenuHandler.js +15 -105
  131. package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
  132. package/dist/mousehandlers/IrisGridDataSelectMouseHandler.js +0 -9
  133. package/dist/mousehandlers/IrisGridDataSelectMouseHandler.js.map +1 -1
  134. package/dist/mousehandlers/IrisGridFilterMouseHandler.js +0 -17
  135. package/dist/mousehandlers/IrisGridFilterMouseHandler.js.map +1 -1
  136. package/dist/mousehandlers/IrisGridSortMouseHandler.js +2 -15
  137. package/dist/mousehandlers/IrisGridSortMouseHandler.js.map +1 -1
  138. package/dist/mousehandlers/PendingMouseHandler.js +0 -6
  139. package/dist/mousehandlers/PendingMouseHandler.js.map +1 -1
  140. package/dist/mousehandlers/index.js.map +1 -1
  141. package/dist/sidebar/AdvancedSettings.js.map +1 -1
  142. package/dist/sidebar/AdvancedSettingsMenu.d.ts +6 -6
  143. package/dist/sidebar/AdvancedSettingsMenu.d.ts.map +1 -1
  144. package/dist/sidebar/AdvancedSettingsMenu.js +2 -6
  145. package/dist/sidebar/AdvancedSettingsMenu.js.map +1 -1
  146. package/dist/sidebar/AdvancedSettingsType.js +0 -2
  147. package/dist/sidebar/AdvancedSettingsType.js.map +1 -1
  148. package/dist/sidebar/ChartBuilder.d.ts +2 -2
  149. package/dist/sidebar/ChartBuilder.d.ts.map +1 -1
  150. package/dist/sidebar/ChartBuilder.js +2 -46
  151. package/dist/sidebar/ChartBuilder.js.map +1 -1
  152. package/dist/sidebar/CustomColumnBuilder.d.ts +2 -2
  153. package/dist/sidebar/CustomColumnBuilder.d.ts.map +1 -1
  154. package/dist/sidebar/CustomColumnBuilder.js +6 -58
  155. package/dist/sidebar/CustomColumnBuilder.js.map +1 -1
  156. package/dist/sidebar/CustomColumnInput.js +4 -15
  157. package/dist/sidebar/CustomColumnInput.js.map +1 -1
  158. package/dist/sidebar/InputEditor.js +5 -36
  159. package/dist/sidebar/InputEditor.js.map +1 -1
  160. package/dist/sidebar/OptionType.js +0 -2
  161. package/dist/sidebar/OptionType.js.map +1 -1
  162. package/dist/sidebar/RollupRows.d.ts +3 -3
  163. package/dist/sidebar/RollupRows.d.ts.map +1 -1
  164. package/dist/sidebar/RollupRows.js +9 -65
  165. package/dist/sidebar/RollupRows.js.map +1 -1
  166. package/dist/sidebar/SelectDistinctBuilder.js +0 -13
  167. package/dist/sidebar/SelectDistinctBuilder.js.map +1 -1
  168. package/dist/sidebar/TableCsvExporter.js +0 -52
  169. package/dist/sidebar/TableCsvExporter.js.map +1 -1
  170. package/dist/sidebar/TableSaver.d.ts +1 -1
  171. package/dist/sidebar/TableSaver.d.ts.map +1 -1
  172. package/dist/sidebar/TableSaver.js +10 -123
  173. package/dist/sidebar/TableSaver.js.map +1 -1
  174. package/dist/sidebar/VisibilityOrderingBuilder.d.ts +5 -4
  175. package/dist/sidebar/VisibilityOrderingBuilder.d.ts.map +1 -1
  176. package/dist/sidebar/VisibilityOrderingBuilder.js +37 -116
  177. package/dist/sidebar/VisibilityOrderingBuilder.js.map +1 -1
  178. package/dist/sidebar/aggregations/AggregationEdit.d.ts +2 -2
  179. package/dist/sidebar/aggregations/AggregationEdit.d.ts.map +1 -1
  180. package/dist/sidebar/aggregations/AggregationEdit.js +2 -14
  181. package/dist/sidebar/aggregations/AggregationEdit.js.map +1 -1
  182. package/dist/sidebar/aggregations/AggregationOperation.js +0 -2
  183. package/dist/sidebar/aggregations/AggregationOperation.js.map +1 -1
  184. package/dist/sidebar/aggregations/AggregationUtils.js +2 -5
  185. package/dist/sidebar/aggregations/AggregationUtils.js.map +1 -1
  186. package/dist/sidebar/aggregations/Aggregations.d.ts +4 -4
  187. package/dist/sidebar/aggregations/Aggregations.d.ts.map +1 -1
  188. package/dist/sidebar/aggregations/Aggregations.js +2 -12
  189. package/dist/sidebar/aggregations/Aggregations.js.map +1 -1
  190. package/dist/sidebar/conditional-formatting/ColumnFormatEditor.d.ts +1 -1
  191. package/dist/sidebar/conditional-formatting/ColumnFormatEditor.d.ts.map +1 -1
  192. package/dist/sidebar/conditional-formatting/ColumnFormatEditor.js +2 -16
  193. package/dist/sidebar/conditional-formatting/ColumnFormatEditor.js.map +1 -1
  194. package/dist/sidebar/conditional-formatting/ConditionEditor.d.ts +1 -1
  195. package/dist/sidebar/conditional-formatting/ConditionEditor.d.ts.map +1 -1
  196. package/dist/sidebar/conditional-formatting/ConditionEditor.js +2 -35
  197. package/dist/sidebar/conditional-formatting/ConditionEditor.js.map +1 -1
  198. package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.d.ts +4 -4
  199. package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.d.ts.map +1 -1
  200. package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.js +2 -12
  201. package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.js.map +1 -1
  202. package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.js +0 -3
  203. package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.js.map +1 -1
  204. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.d.ts +5 -5
  205. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.d.ts.map +1 -1
  206. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js +16 -26
  207. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js.map +1 -1
  208. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.d.ts +3 -3
  209. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.d.ts.map +1 -1
  210. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js +9 -172
  211. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js.map +1 -1
  212. package/dist/sidebar/conditional-formatting/RowFormatEditor.d.ts +1 -1
  213. package/dist/sidebar/conditional-formatting/RowFormatEditor.d.ts.map +1 -1
  214. package/dist/sidebar/conditional-formatting/RowFormatEditor.js +2 -16
  215. package/dist/sidebar/conditional-formatting/RowFormatEditor.js.map +1 -1
  216. package/dist/sidebar/conditional-formatting/StyleEditor.d.ts +1 -1
  217. package/dist/sidebar/conditional-formatting/StyleEditor.d.ts.map +1 -1
  218. package/dist/sidebar/conditional-formatting/StyleEditor.js +2 -12
  219. package/dist/sidebar/conditional-formatting/StyleEditor.js.map +1 -1
  220. package/dist/sidebar/icons/BarIcon.js +0 -3
  221. package/dist/sidebar/icons/BarIcon.js.map +1 -1
  222. package/dist/sidebar/icons/FormatColumnWhereIcon.js +2 -5
  223. package/dist/sidebar/icons/FormatColumnWhereIcon.js.map +1 -1
  224. package/dist/sidebar/icons/FormatRowWhereIcon.js +2 -5
  225. package/dist/sidebar/icons/FormatRowWhereIcon.js.map +1 -1
  226. package/dist/sidebar/icons/HistogramIcon.js +0 -3
  227. package/dist/sidebar/icons/HistogramIcon.js.map +1 -1
  228. package/dist/sidebar/icons/LineIcon.js +0 -3
  229. package/dist/sidebar/icons/LineIcon.js.map +1 -1
  230. package/dist/sidebar/icons/PieIcon.js +0 -3
  231. package/dist/sidebar/icons/PieIcon.js.map +1 -1
  232. package/dist/sidebar/icons/ScatterIcon.js +0 -3
  233. package/dist/sidebar/icons/ScatterIcon.js.map +1 -1
  234. package/dist/sidebar/icons/index.js.map +1 -1
  235. package/dist/sidebar/index.js.map +1 -1
  236. 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":";;AAAA,SACEA,uBADF,EAIEC,UAJF,QAKO,wBALP;OAMOC,sB;;AAIP,MAAMC,yBAAN,CAAgC;EAO9B;AACF;AACA;AACA;AACA;AACA;EACmB,OAAVC,UAAU,CACfC,SADe,EAEfC,cAFe,EAGY;IAC3B,IAAMC,WAAW,G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uB,UAAvB,CACpB,SADoB,EAEpB,IAFoB,EAGpBtB,yBAAyB,CAACQ,SAHN,EAIpBT,sBAAsB,CAAC0B,iBAAvB,CAAyCtB,cAAzC,CAJoB,CAAtB;IAOA,OAAO,CAACqB,aAAD,EAAgB,GAAGZ,mBAAnB,CAAP;EACD;;AApF6B;;gBAA1BZ,yB,eACe,E;;gBADfA,yB,eAGe,E;;gBAHfA,yB,mBAKmB,E;;AAkFzB,eAAeA,yBAAf"}
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;MAC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A,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":";;AAAA,SAEEA,sBAFF,QAGO,wBAHP;OAIOC,sB;;AAIP,MAAMC,wBAAN,CAA+B;EAS7B;AACF;AACA;AACA;AACA;AACA;EACmB,OAAVC,UAAU,CACfC,cADe,EAEfC,oBAFe,EAGY;IAC3B,IAAMC,WAAW,GAAG,CAClB;MACEC,MAAM,EAAEP,sBAAsB,CAACQ,cADjC;MAEEC,KAAK,EAAEP,wBAAwB,CAACQ;IAFlC,CADkB,EAKlB;MACEH,MAAM,EAAEP,sBAAsB,CAACW,mBADjC;MAEEF,KAAK,EAAEP,wBAAwB,CAACQ;IAFlC,CALkB,EASlB;MACEH,MAAM,EAAEP,sBAAsB,CAACY,eADjC;MAEEH,KAAK,EAAEP,wBAAwB,CAACQ;IAFlC,CATkB,EAalB;MACEH,MAAM,EAAEP,sBAAsB,CAACa,0BADjC;MAEEJ,K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BAAvB,CACtBK,YADsB,CAAxB;;QAGA,IAAIlC,sBAAsB,CAACoC,OAAvB,CAA+BD,eAA/B,CAAJ,EAAqD;UACnD9B,oBAAoB,CAAC8B,eAAD,CAApB;QACD;MACF,CAPD,MAOO;QACL9B,oBAAoB,CAAC,IAAD,CAApB;MACD;IACF,CAhBwB,CAA3B;IAmBA,OAAO,CAACa,mBAAD,EAAsB,GAAGI,mBAAzB,EAA8CQ,kBAA9C,CAAP;EACD;;AA9F4B;;gBAAzB5B,wB,kBACkB,E;;gBADlBA,wB,iBAGiB,E;;gBAHjBA,wB,sBAKsB,E;;gBALtBA,wB,iBAOiB,E;;AA0FvB,eAAeA,wBAAf"}
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,KAAP,MAAkB,OAAlB;AACA,SAEEC,oBAFF,QAGO,wBAHP;OAIOC,kB;;AAcP,MAAMC,sBAAN,CAA6B;EAC3B;AACF;AACA;AACA;EAC0B,OAAjBC,iBAAiB,CAACC,cAAD,EAAoD;IAC1E,OACE,CAACA,cAAD,IACA,CAAC,CACCJ,oBAAoB,CAACK,mBADtB,EAECL,oBAAoB,CAACM,mBAFtB,EAGCC,QAHD,CAGUH,cAAc,CAACI,IAHzB,CAFH;EAOD;EAED;AACF;AACA;AACA;;;EACyB,OAAhBC,gBAAgB,CAACL,cAAD,EAA6C;IAClE,OACEA,cAAc,IAAI,IAAlB,IACAA,cAAc,CAACI,IAAf,KAAwBR,oBAAoB,CAACK,mBAF/C;EAID;EAED;AACF;AACA;AACA;AACA;AACA;AACA;;;EACmB,OAAVK,UAAU,CACfC,KADe,EAEfC,MAFe,EAGfC,KAHe,EAIfC,UAJe,EAKU;IACzB,OAAO;MACLH,KADK;MAELI,WAAW,EAAEJ,KAFR;MAGLE,KAHK;MAILD,MAJK;MAKLE;IALK,CAAP;EAOD;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;;EAC+B,OAAtBE,sBAAsB,CAC3BJ,MAD2B,EAE3BC,KAF2B,EAG3BI,WAH2B,EAI3BH,UAJ2B,EAK3BI,QAL2B,EAMP;IACpB,OAAO;MACLP,KAAK,EAAEC,MAAM,CAACO,KADT;MAELJ,WAAW,EAAEH,MAAM,CAACO,KAFf;MAGLP,MAHK;MAILC,KAJK;MAKLC,UALK;MAMLM,WAAW,eACT,oBAAC,kBAAD;QACE,YAAY,EAAER,MAAM,CAACS,YADvB;QAEE,KAAK,EAAET,MAAM,CAACO,KAFhB;QAGE,WAAW,EAAEF,WAHf;QAIE,QAAQ,EAAEC;MAJZ;IAPG,CAAP;EAeD;;AA9E0B;;AAiF7B,eAAehB,sBAAf"}
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":";;AAAA,SAEEA,sBAFF,QAGO,wBAHP;OAIOC,sB;;AAIP,MAAMC,wBAAN,CAA+B;EAO7B;AACF;AACA;AACA;AACA;AACA;EACmB,OAAVC,UAAU,CACfC,cADe,EAEfC,oBAFe,EAGY;IAC3B,IAAMC,WAAW,GAAG,CAClB;MACEC,MAAM,EAAEP,sBAAsB,CAACQ,eADjC;MAEEC,KAAK,EAAEP,wBAAwB,CAACQ;IAFlC,CADkB,EAKlB;MACEH,MAAM,EAAEP,sBAAsB,CAACW,0BADjC;MAEEF,KAAK,EAAEP,wBAAwB,CAACQ;IAFlC,CALkB,CAApB;IAWA,IAAME,mBAAmB,GAAGX,sBAAsB,CAACY,UAAvB,CAC1B,SAD0B,EAE1B,IAF0B,EAG1BX,wBAAwB,CAACY,YAHC,EAI1Bb,sBAAsB,CAACc,iBAAvB,CAAyCX,cAAzC,CAJ0B,CAA5B;IAOA,IAAMY,mBAAmB,GAAGV,WAAW,CAACW,GAAZ,CAAgBC,IAAI,IAC9CjB,sBAAsB,CAACY,UAAvB,CACEK,IAAI,CAACX,MAAL,CAAYY,KADd,EAEED,IAAI,CAACX,MAFP,EAGEW,IAAI,CAACT,KAHP,EAIET,sBAAsB,CAACoB,YAAvB,CAAoCF,IAAI,CAACX,MAAzC,EAAiDH,cAAjD,CAJF,CAD0B,CAA5B;IASA,IAAMiB,gBAAgB,GAAGpB,sBAAsB,CAACoB,gBAAvB,CACvBjB,cADuB,CAAzB;IAIA,IAAMkB,YAAY,GAAGD,gBAAgB,GACjCjB,cADiC,GAEjCJ,sBAAsB,CAACuB,gBAAvB,EAFJ;IAIA,IAAMC,kBAAkB,GAAGvB,sBAAsB,CAACwB,sBAAvB,CACzBH,YADyB,EAEzBpB,wBAAwB,CAACwB,WAFA,EAGzB1B,sBAAsB,CAAC2B,qBAHE,EAIzBN,gBAJyB,EAKzBO,YAAY,IAAI;MACd,IAAIA,YAAY,IAAI,IAApB,EAA0B;QACxB,IAAMC,eAAe,GAAG7B,sBAAsB,CAACuB,gBAAvB,CACtBK,YADsB,CAAxB;;QAGA,IAAI5B,sBAAsB,CAAC8B,OAAvB,CAA+BD,eAA/B,CAAJ,EAAqD;UACnDxB,oBAAoB,CAACwB,eAAD,CAApB;QACD;MACF,CAPD,MAOO;QACLxB,oBAAoB,CAAC,IAAD,CAApB;MACD;IACF,CAhBwB,CAA3B;IAmBA,OAAO,CAACO,mBAAD,EAAsB,GAAGI,mBAAzB,EAA8CQ,kBAA9C,CAAP;EACD;;AAxE4B;;gBAAzBtB,wB,kBACkB,E;;gBADlBA,wB,iBAGiB,E;;gBAHjBA,wB,iBAKiB,E;;AAsEvB,eAAeA,wBAAf"}
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,o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;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,yB;SACXD,OAAO,IAAIE,wB;SACXF,OAAO,IAAIG,wB"}
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,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,iBAAi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Ac,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":["default","IrisGrid","SHORTCUTS","IrisGridModel","IrisGridTableModel","IrisGridTreeTableModel","IrisGridTableModelTemplate","IrisGridModelFactory","IrisGridTheme","IrisGridTestUtils","IrisGridUtils","TableViewportUpdater","TreeTableViewportUpdater"],"sources":["../src/index.ts"],"sourcesContent":["export * from './sidebar';\nexport * from './AdvancedFilterCreator';\nexport * from './CommonTypes';\nexport { default as IrisGrid } from './IrisGrid';\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 } from './IrisGrid';\nexport * from './IrisGrid';\nexport { default as TableViewportUpdater } from './TableViewportUpdater';\nexport { default as TreeTableViewportUpdater } from './TreeTableViewportUpdater';\n"],"mappings":";;;SAGSA,OAAO,IAAIC,Q;;SAEXD,OAAO,IAAIE,S;SACXF,OAAO,IAAIG,a;SACXH,OAAO,IAAII,kB;;SAEXJ,OAAO,IAAIK,sB;SACXL,OAAO,IAAIM,0B;;;SAGXN,OAAO,IAAIO,oB;SACXP,OAAO,IAAIQ,a;SAEXR,OAAO,IAAIS,iB;SACXT,OAAO,IAAIU,a;;SAEXV,O;;SAEAA,OAAO,IAAIW,oB;SACXX,OAAO,IAAIY,wB"}
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":";;AACA,SAASA,UAAT,QAA2B,iBAA3B;OAEOC,iB;;AAEP,MAAMC,qBAAN,SAAoCF,UAApC,CAA+C;EAG7CG,WAAW,CAACC,QAAD,EAAqB;IAC9B;;IAD8B;;IAG9B,KAAKA,QAAL,GAAgBA,QAAhB;EACD;;EAEDC,MAAM,CAACC,KAAD,EAAgC;IACpC,IAAIL,iBAAiB,CAACM,KAAlB,CAAwBC,aAAxB,CAAsCC,YAAtC,CAAmDH,KAAnD,CAAJ,EAA+D;MAC7D,KAAKF,QAAL,CAAcM,eAAd;MACA,OAAO,IAAP;IACD;;IACD,OAAO,KAAP;EACD;;AAf4C;;AAkB/C,eAAeR,qBAAf"}
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":";;AAAA;AAEA,SAASA,kBAAT,QAAmC,uBAAnC;AACA,SAASC,UAAT,QAA2B,iBAA3B;OAEOC,a;;AAEP,MAAMC,cAAN,SAA6BF,UAA7B,CAAwC;EAGtCG,WAAW,CAACC,QAAD,EAAqB;IAC9B;;IAD8B;;IAG9B,KAAKA,QAAL,GAAgBA,QAAhB;EACD;;EAEDC,MAAM,CAACC,KAAD,EAAgC;IACpC,IAAM;MAAEC;IAAF,IAAqB,KAAKH,QAAL,CAAcI,KAAzC;;IACA,IAAIF,KAAK,CAACG,GAAN,KAAc,GAAd,IAAqBV,kBAAkB,CAACW,iBAAnB,CAAqCJ,KAArC,CAAzB,EAAsE;MACpE,IAAIL,aAAa,CAACU,qBAAd,CAAoCJ,cAApC,CAAJ,EAAyD;QACvD,KAAKH,QAAL,CAAcQ,UAAd,CAAyBL,cAAzB;MACD,CAFD,MAEO;QACL,KAAKH,QAAL,CAAcQ,UAAd,CACEL,cADF,EAEE,KAFF,EAGE,KAHF,EAIE,qBAJF;MAMD;;MACD,OAAO,IAAP;IACD;;IACD,OAAO,KAAP;EACD;;AAzBqC;;AA4BxC,eAAeL,cAAf"}
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":";;AACA,SAASA,UAAT,QAA2B,iBAA3B;AACA,SAASC,UAAT,QAA2B,wBAA3B;OAEOC,iB;;AAEP,MAAMC,iBAAN,SAAgCH,UAAhC,CAA2C;EAGzCI,WAAW,CAACC,QAAD,EAAqB;IAC9B;;IAD8B;;IAG9B,KAAKA,QAAL,GAAgBA,QAAhB;EACD;;EAEDC,MAAM,CAACC,KAAD,EAAgC;IACpC,IAAIL,iBAAiB,CAACM,KAAlB,CAAwBC,OAAxB,CAAgCC,YAAhC,CAA6CH,KAA7C,CAAJ,EAAyD;MACvD,IAAI,CAAC,KAAKF,QAAL,CAAcM,YAAd,EAAL,EAAmC;QACjC,OAAO,KAAP;MACD;;MACD,IAAM;QAAEC;MAAF,IAAkB,KAAKP,QAAL,CAAcQ,KAAtC;;MACA,IAAID,WAAW,KAAKX,UAAU,CAACa,YAAX,CAAwBC,IAA5C,EAAkD;QAChD,KAAKV,QAAL,CAAcW,OAAd,CAAsBf,UAAU,CAACa,YAAX,CAAwBG,SAA9C;MACD,CAFD,MAEO;QACL,KAAKZ,QAAL,CAAcW,OAAd,CAAsBf,UAAU,CAACa,YAAX,CAAwBC,IAA9C;MACD;;MACD,OAAO,IAAP;IACD;;IACD,OAAO,KAAP;EACD;;AAvBwC;;AA0B3C,eAAeZ,iBAAf"}
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,c;SACXD,OAAO,IAAIE,iB;SACXF,OAAO,IAAIG,qB"}
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"}