@deephaven/js-plugin-pivot 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +10 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -10996,11 +10996,11 @@ class IrisGridPivotModel extends irisGrid.IrisGridModel {
10996
10996
  }
10997
10997
  expandAllColumns() {
10998
10998
  log$4.debug("expandAllColumns");
10999
- this.setColumnExpanded(this.keyColumns.length, true, true);
10999
+ this.setColumnExpanded(this.getGrandTotalsColumnIndex(), true, true);
11000
11000
  }
11001
11001
  collapseAllColumns() {
11002
11002
  log$4.debug("collapseAllColumns");
11003
- this.setColumnExpanded(this.keyColumns.length, false, true);
11003
+ this.setColumnExpanded(this.getGrandTotalsColumnIndex(), false, true);
11004
11004
  }
11005
11005
  isColumnExpandable(x, depth) {
11006
11006
  var _a;
@@ -11012,8 +11012,15 @@ class IrisGridPivotModel extends irisGrid.IrisGridModel {
11012
11012
  }
11013
11013
  return ((_a = this.columns[x]) == null ? void 0 : _a.hasChildren) ?? false;
11014
11014
  }
11015
+ /**
11016
+ * Get the index of the first grand totals column.
11017
+ * This is the column index that represents the root of the column hierarchy.
11018
+ */
11019
+ getGrandTotalsColumnIndex() {
11020
+ return this.keyColumns.length + (this.groupColumn == null ? 0 : 1);
11021
+ }
11015
11022
  isGrandTotalsColumn(x) {
11016
- const totalsStartIndex = this.keyColumns.length + (this.groupColumn == null ? 0 : 1);
11023
+ const totalsStartIndex = this.getGrandTotalsColumnIndex();
11017
11024
  return x >= totalsStartIndex && x < this.virtualColumns.length;
11018
11025
  }
11019
11026
  isColumnExpanded(x) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/js-plugin-pivot",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Pivot plugin for Deephaven",
5
5
  "keywords": [
6
6
  "Deephaven",
@@ -58,5 +58,5 @@
58
58
  "files": [
59
59
  "dist/index.js"
60
60
  ],
61
- "gitHead": "f4c63561653c0fc10fe62108c1020543d403fd8a"
61
+ "gitHead": "a90120783141bad37e4499a8870349181b4fc93c"
62
62
  }