@deephaven/iris-grid 0.57.2-beta.0 → 0.58.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 (110) hide show
  1. package/dist/AdvancedFilterCreator.css.map +1 -1
  2. package/dist/AdvancedFilterCreatorFilterItem.css.map +1 -1
  3. package/dist/AdvancedFilterCreatorSelectValue.css.map +1 -1
  4. package/dist/ColumnStatistics.css.map +1 -1
  5. package/dist/ColumnStatistics.d.ts +4 -4
  6. package/dist/ColumnStatistics.d.ts.map +1 -1
  7. package/dist/ColumnStatistics.js +4 -2
  8. package/dist/ColumnStatistics.js.map +1 -1
  9. package/dist/CrossColumnSearch.d.ts +2 -1
  10. package/dist/CrossColumnSearch.d.ts.map +1 -1
  11. package/dist/CrossColumnSearch.js +11 -8
  12. package/dist/CrossColumnSearch.js.map +1 -1
  13. package/dist/FilterInputField.css +11 -8
  14. package/dist/FilterInputField.css.map +1 -1
  15. package/dist/GotoRow.css.map +1 -1
  16. package/dist/IrisGrid.css +9 -6
  17. package/dist/IrisGrid.css.map +1 -1
  18. package/dist/IrisGrid.d.ts +6 -2
  19. package/dist/IrisGrid.d.ts.map +1 -1
  20. package/dist/IrisGrid.js +45 -8
  21. package/dist/IrisGrid.js.map +1 -1
  22. package/dist/IrisGridBottomBar.css +2 -3
  23. package/dist/IrisGridBottomBar.css.map +1 -1
  24. package/dist/IrisGridCellOverflowModal.js +1 -1
  25. package/dist/IrisGridCellOverflowModal.js.map +1 -1
  26. package/dist/IrisGridCopyHandler.css +1 -2
  27. package/dist/IrisGridCopyHandler.css.map +1 -1
  28. package/dist/IrisGridCopyHandler.d.ts +12 -4
  29. package/dist/IrisGridCopyHandler.d.ts.map +1 -1
  30. package/dist/IrisGridCopyHandler.js +72 -32
  31. package/dist/IrisGridCopyHandler.js.map +1 -1
  32. package/dist/IrisGridModel.d.ts +41 -13
  33. package/dist/IrisGridModel.d.ts.map +1 -1
  34. package/dist/IrisGridModel.js +47 -7
  35. package/dist/IrisGridModel.js.map +1 -1
  36. package/dist/IrisGridPartitionSelector.css.map +1 -1
  37. package/dist/IrisGridProxyModel.d.ts +2 -0
  38. package/dist/IrisGridProxyModel.d.ts.map +1 -1
  39. package/dist/IrisGridProxyModel.js +6 -0
  40. package/dist/IrisGridProxyModel.js.map +1 -1
  41. package/dist/IrisGridRenderer.js +1 -1
  42. package/dist/IrisGridRenderer.js.map +1 -1
  43. package/dist/IrisGridTableModelTemplate.d.ts +10 -12
  44. package/dist/IrisGridTableModelTemplate.d.ts.map +1 -1
  45. package/dist/IrisGridTableModelTemplate.js +35 -34
  46. package/dist/IrisGridTableModelTemplate.js.map +1 -1
  47. package/dist/IrisGridTheme.d.ts.map +1 -1
  48. package/dist/IrisGridTheme.js +1 -0
  49. package/dist/IrisGridTheme.js.map +1 -1
  50. package/dist/IrisGridTheme.module.css +1 -0
  51. package/dist/IrisGridTheme.module.css.map +1 -1
  52. package/dist/IrisGridTreeTableModel.d.ts +14 -4
  53. package/dist/IrisGridTreeTableModel.d.ts.map +1 -1
  54. package/dist/IrisGridTreeTableModel.js +89 -10
  55. package/dist/IrisGridTreeTableModel.js.map +1 -1
  56. package/dist/PartitionSelectorSearch.css +2 -2
  57. package/dist/PartitionSelectorSearch.css.map +1 -1
  58. package/dist/PendingDataBottomBar.css +1 -8
  59. package/dist/PendingDataBottomBar.css.map +1 -1
  60. package/dist/format-context-menus/CustomFormatAction.css +1 -1
  61. package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.d.ts.map +1 -1
  62. package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.js +1 -1
  63. package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.js.map +1 -1
  64. package/dist/mousehandlers/IrisGridContextMenuHandler.css +2 -2
  65. package/dist/mousehandlers/IrisGridContextMenuHandler.css.map +1 -1
  66. package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts +1 -1
  67. package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts.map +1 -1
  68. package/dist/mousehandlers/IrisGridContextMenuHandler.js +57 -43
  69. package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
  70. package/dist/mousehandlers/IrisGridCopyCellMouseHandler.d.ts +10 -0
  71. package/dist/mousehandlers/IrisGridCopyCellMouseHandler.d.ts.map +1 -0
  72. package/dist/mousehandlers/IrisGridCopyCellMouseHandler.js +34 -0
  73. package/dist/mousehandlers/IrisGridCopyCellMouseHandler.js.map +1 -0
  74. package/dist/mousehandlers/index.d.ts +1 -0
  75. package/dist/mousehandlers/index.d.ts.map +1 -1
  76. package/dist/mousehandlers/index.js +1 -0
  77. package/dist/mousehandlers/index.js.map +1 -1
  78. package/dist/sidebar/ChartBuilder.css.map +1 -1
  79. package/dist/sidebar/CustomColumnBuilder.css +3 -3
  80. package/dist/sidebar/CustomColumnBuilder.css.map +1 -1
  81. package/dist/sidebar/CustomColumnBuilder.d.ts.map +1 -1
  82. package/dist/sidebar/CustomColumnBuilder.js +2 -5
  83. package/dist/sidebar/CustomColumnBuilder.js.map +1 -1
  84. package/dist/sidebar/InputEditor.css.map +1 -1
  85. package/dist/sidebar/RollupRows.css +3 -2
  86. package/dist/sidebar/RollupRows.css.map +1 -1
  87. package/dist/sidebar/SelectDistinctBuilder.css.map +1 -1
  88. package/dist/sidebar/TableCsvExporter.css.map +1 -1
  89. package/dist/sidebar/aggregations/AggregationEdit.css.map +1 -1
  90. package/dist/sidebar/aggregations/AggregationEdit.d.ts +2 -2
  91. package/dist/sidebar/aggregations/AggregationEdit.d.ts.map +1 -1
  92. package/dist/sidebar/aggregations/AggregationEdit.js.map +1 -1
  93. package/dist/sidebar/aggregations/AggregationUtils.d.ts +5 -5
  94. package/dist/sidebar/aggregations/AggregationUtils.d.ts.map +1 -1
  95. package/dist/sidebar/aggregations/AggregationUtils.js +1 -1
  96. package/dist/sidebar/aggregations/AggregationUtils.js.map +1 -1
  97. package/dist/sidebar/aggregations/Aggregations.css.map +1 -1
  98. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.css +1 -1
  99. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.css.map +1 -1
  100. package/dist/sidebar/conditional-formatting/StyleEditor.css +1 -1
  101. package/dist/sidebar/conditional-formatting/StyleEditor.css.map +1 -1
  102. package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.css +4 -2
  103. package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.css.map +1 -1
  104. package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.d.ts +3 -2
  105. package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.d.ts.map +1 -1
  106. package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.js +13 -3
  107. package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.js.map +1 -1
  108. package/dist/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.css +4 -4
  109. package/dist/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.css.map +1 -1
  110. package/package.json +15 -15
@@ -21,7 +21,6 @@ import { isColumnHeaderGroup } from "./ColumnHeaderGroup.js";
21
21
  var log = Log.module('IrisGridTableModel');
22
22
  var SET_VIEWPORT_THROTTLE = 150;
23
23
  var APPLY_VIEWPORT_THROTTLE = 0;
24
- var EMPTY_ARRAY = [];
25
24
  export function isIrisGridTableModelTemplate(model) {
26
25
  return model.table !== undefined;
27
26
  }
@@ -403,7 +402,10 @@ class IrisGridTableModelTemplate extends IrisGridModel {
403
402
  }
404
403
  get rowCount() {
405
404
  var _this$totals$operatio, _this$totals, _this$totals$operatio2;
406
- return this.table.size + this.pendingNewRowCount + ((_this$totals$operatio = (_this$totals = this.totals) === null || _this$totals === void 0 ? void 0 : (_this$totals$operatio2 = _this$totals.operationOrder) === null || _this$totals$operatio2 === void 0 ? void 0 : _this$totals$operatio2.length) !== null && _this$totals$operatio !== void 0 ? _this$totals$operatio : 0);
405
+ return (
406
+ // Table size can be negative if the table isn't ready yet
407
+ Math.max(this.table.size, 0) + this.pendingNewRowCount + ((_this$totals$operatio = (_this$totals = this.totals) === null || _this$totals === void 0 ? void 0 : (_this$totals$operatio2 = _this$totals.operationOrder) === null || _this$totals$operatio2 === void 0 ? void 0 : _this$totals$operatio2.length) !== null && _this$totals$operatio !== void 0 ? _this$totals$operatio : 0)
408
+ );
407
409
  }
408
410
  get pendingDataErrors() {
409
411
  var _this$inputTable$keyC, _this$inputTable;
@@ -494,7 +496,6 @@ class IrisGridTableModelTemplate extends IrisGridModel {
494
496
 
495
497
  // Use a separate cache from memoization just for the strings that are currently displayed
496
498
  if (((_this$formattedString = this.formattedStringData[x]) === null || _this$formattedString === void 0 ? void 0 : _this$formattedString[y]) === undefined) {
497
- var _this$totalsColumn;
498
499
  var _value = this.valueForCell(x, y);
499
500
  if (_value === null) {
500
501
  return null;
@@ -502,7 +503,7 @@ class IrisGridTableModelTemplate extends IrisGridModel {
502
503
  if (_value === undefined) {
503
504
  return undefined;
504
505
  }
505
- var _column = (_this$totalsColumn = this.totalsColumn(x, y)) !== null && _this$totalsColumn !== void 0 ? _this$totalsColumn : this.columns[x];
506
+ var _column = this.sourceColumn(x, y);
506
507
  var hasCustomColumnFormat = this.getCachedCustomColumnFormatFlag(this.formatter, _column.name, _column.type);
507
508
  var formatOverride;
508
509
  if (!hasCustomColumnFormat) {
@@ -568,8 +569,7 @@ class IrisGridTableModelTemplate extends IrisGridModel {
568
569
 
569
570
  // Fallback to formatting based on the value/type of the cell
570
571
  if (_value2 != null) {
571
- var _this$totalsColumn2;
572
- var _column2 = (_this$totalsColumn2 = this.totalsColumn(x, y)) !== null && _this$totalsColumn2 !== void 0 ? _this$totalsColumn2 : this.columns[x];
572
+ var _column2 = this.sourceColumn(x, y);
573
573
  if (TableUtils.isDateType(_column2.type) || _column2.name === 'Date') {
574
574
  assertNotNull(theme.dateColor);
575
575
  return theme.dateColor;
@@ -658,12 +658,13 @@ class IrisGridTableModelTemplate extends IrisGridModel {
658
658
  return (format === null || format === void 0 ? void 0 : format.formatDataBar) != null ? 'dataBar' : 'text';
659
659
  }
660
660
  textForColumnHeader(x) {
661
+ var _header$displayName;
661
662
  var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
662
663
  var header = this.columnAtDepth(x, depth);
663
664
  if (isColumnHeaderGroup(header)) {
664
665
  return header.isNew ? '' : header.name;
665
666
  }
666
- return header === null || header === void 0 ? void 0 : header.name;
667
+ return (_header$displayName = header === null || header === void 0 ? void 0 : header.displayName) !== null && _header$displayName !== void 0 ? _header$displayName : header === null || header === void 0 ? void 0 : header.name;
667
668
  }
668
669
  colorForColumnHeader(x) {
669
670
  var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
@@ -723,13 +724,6 @@ class IrisGridTableModelTemplate extends IrisGridModel {
723
724
  var _this$layoutHints2;
724
725
  return this.getMemoizedInitialMovedColumns((_this$layoutHints2 = this.layoutHints) !== null && _this$layoutHints2 !== void 0 ? _this$layoutHints2 : undefined);
725
726
  }
726
-
727
- /**
728
- * Not currently used by anything.
729
- */
730
- get initialMovedRows() {
731
- return EMPTY_ARRAY;
732
- }
733
727
  get initialColumnHeaderGroups() {
734
728
  var _this$layoutHints3;
735
729
  return this.getMemoizedInitialColumnHeaderGroups((_this$layoutHints3 = this.layoutHints) !== null && _this$layoutHints3 !== void 0 ? _this$layoutHints3 : undefined);
@@ -765,9 +759,6 @@ class IrisGridTableModelTemplate extends IrisGridModel {
765
759
  this.columnHeaderParentMap = parentMap;
766
760
  this._columnHeaderGroupMap = groupMap;
767
761
  }
768
- get groupedColumns() {
769
- return [];
770
- }
771
762
  row(y) {
772
763
  var _this$totals$operatio5, _this$totals4, _this$totals4$operati, _this$totals$showOnTo, _this$totals5, _this$viewportData$of, _this$viewportData, _this$viewportData$ro, _this$viewportData2, _this$viewportData2$r;
773
764
  var totalsRowCount = (_this$totals$operatio5 = (_this$totals4 = this.totals) === null || _this$totals4 === void 0 ? void 0 : (_this$totals4$operati = _this$totals4.operationOrder) === null || _this$totals4$operati === void 0 ? void 0 : _this$totals4$operati.length) !== null && _this$totals$operatio5 !== void 0 ? _this$totals$operatio5 : 0;
@@ -790,25 +781,35 @@ class IrisGridTableModelTemplate extends IrisGridModel {
790
781
  }
791
782
 
792
783
  /**
793
- * Retrieve the totals column if this is a totals row, or null otherwise
794
- * @param x Column index to get the totals column from
795
- * @param y Row index to get the totals column from
784
+ * Retrieve the source column for given coordinates.
785
+ * - Retrieve the totals column if this is a totals row
786
+ * - Retrieve the source column if it's a proxied column
787
+ * - Otherwise return the column at the given index
788
+ * @param column Column index to get the source column from
789
+ * @param row Row index to get the source column from
796
790
  */
797
- totalsColumn(x, y) {
798
- var _this$totals7, _this$totals$defaultO, _this$totals8, _this$totalsTable;
799
- var totalsRow = this.totalsRow(y);
800
- if (totalsRow == null) return null;
801
- var operation = (_this$totals7 = this.totals) === null || _this$totals7 === void 0 ? void 0 : _this$totals7.operationOrder[totalsRow];
802
- var defaultOperation = (_this$totals$defaultO = (_this$totals8 = this.totals) === null || _this$totals8 === void 0 ? void 0 : _this$totals8.defaultOperation) !== null && _this$totals$defaultO !== void 0 ? _this$totals$defaultO : AggregationOperation.SUM;
803
- var tableColumn = this.columns[x];
791
+ sourceColumn(column, row) {
792
+ var totalsRow = this.totalsRow(row);
793
+ if (totalsRow != null) {
794
+ var _this$totals7, _this$totals$defaultO, _this$totals8, _this$totalsTable;
795
+ var operation = (_this$totals7 = this.totals) === null || _this$totals7 === void 0 ? void 0 : _this$totals7.operationOrder[totalsRow];
796
+ var defaultOperation = (_this$totals$defaultO = (_this$totals8 = this.totals) === null || _this$totals8 === void 0 ? void 0 : _this$totals8.defaultOperation) !== null && _this$totals$defaultO !== void 0 ? _this$totals$defaultO : AggregationOperation.SUM;
797
+ var tableColumn = this.columns[column];
804
798
 
805
- // Find the matching totals table column for the operation
806
- // When there are multiple aggregations, the column name will be the original name of the column with the operation appended afterward
807
- // When the the operation is the default operation OR there is only one operation, then the totals column name is just the original column name
808
- return (_this$totalsTable = this.totalsTable) === null || _this$totalsTable === void 0 ? void 0 : _this$totalsTable.columns.find(column => {
809
- var _this$totals9;
810
- return column.name === "".concat(tableColumn.name, "__").concat(operation) || (operation === defaultOperation || ((_this$totals9 = this.totals) === null || _this$totals9 === void 0 ? void 0 : _this$totals9.operationOrder.length) === 1) && column.name === tableColumn.name;
811
- });
799
+ // Find the matching totals table column for the operation
800
+ // When there are multiple aggregations, the column name will be the original name of the column with the operation appended afterward
801
+ // When the the operation is the default operation OR there is only one operation, then the totals column name is just the original column name
802
+ var totalsColumn = (_this$totalsTable = this.totalsTable) === null || _this$totalsTable === void 0 ? void 0 : _this$totalsTable.columns.find(col => {
803
+ var _this$totals9;
804
+ return col.name === "".concat(tableColumn.name, "__").concat(operation) || (operation === defaultOperation || ((_this$totals9 = this.totals) === null || _this$totals9 === void 0 ? void 0 : _this$totals9.operationOrder.length) === 1) && col.name === tableColumn.name;
805
+ });
806
+ if (totalsColumn != null) {
807
+ return totalsColumn;
808
+ }
809
+ // There may be cases were the totals table doesn't have a column, such as when there's a virtual column
810
+ }
811
+
812
+ return this.columns[column];
812
813
  }
813
814
 
814
815
  /**