@hpcc-js/tree 2.39.4 → 2.39.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es6.js CHANGED
@@ -2,8 +2,8 @@ import { ITree } from '@hpcc-js/api';
2
2
  import { rgb, d3Event, interpolateZoom, SVGWidget, select, SVGZoomWidget, Utility, PropertyExt, Platform, max as max$1, Palette, HTMLWidget, scaleLinear, scaleSqrt, interpolate } from '@hpcc-js/common';
3
3
 
4
4
  var PKG_NAME = "@hpcc-js/tree";
5
- var PKG_VERSION = "2.39.4";
6
- var BUILD_VERSION = "2.103.1";
5
+ var PKG_VERSION = "2.39.7";
6
+ var BUILD_VERSION = "2.103.6";
7
7
 
8
8
  /*! *****************************************************************************
9
9
  Copyright (c) Microsoft Corporation.
@@ -1495,7 +1495,12 @@ var Dendrogram = /** @class */ (function (_super) {
1495
1495
  tmp = tmp.children[0];
1496
1496
  }
1497
1497
  if (d.depth > 0) {
1498
- context.click(context.rowToObj(tmp.origRows[0]), context.mappings()[d.depth - 1].column(), true);
1498
+ if (tmp.origRows) {
1499
+ context.click(context.rowToObj(tmp.origRows[0]), context.mappings()[d.depth - 1].column(), true);
1500
+ }
1501
+ else {
1502
+ context.click(tmp.data, context.mappings()[d.depth - 1].column(), true);
1503
+ }
1499
1504
  }
1500
1505
  })
1501
1506
  .on("dblclick", function (d) {
@@ -1504,7 +1509,12 @@ var Dendrogram = /** @class */ (function (_super) {
1504
1509
  tmp = tmp.children[0];
1505
1510
  }
1506
1511
  if (d.depth > 0) {
1507
- context.dblclick(context.rowToObj(tmp.origRows[0]), context.mappings()[d.depth - 1].column(), true);
1512
+ if (tmp.origRows) {
1513
+ context.dblclick(context.rowToObj(tmp.origRows[0]), context.mappings()[d.depth - 1].column(), true);
1514
+ }
1515
+ else {
1516
+ context.dblclick(tmp.data, context.mappings()[d.depth - 1].column(), true);
1517
+ }
1508
1518
  }
1509
1519
  })
1510
1520
  .each(function () {
@@ -2580,7 +2590,7 @@ var Treemap = /** @class */ (function (_super) {
2580
2590
  function Treemap() {
2581
2591
  var _this = _super.call(this) || this;
2582
2592
  ITree.call(_this);
2583
- Utility.SimpleSelectionMixin.call(_this);
2593
+ Utility.SimpleSelectionMixin.call(_this, true);
2584
2594
  return _this;
2585
2595
  }
2586
2596
  Treemap.prototype.getTilingMethod = function () {
@@ -2670,25 +2680,35 @@ var Treemap = /** @class */ (function (_super) {
2670
2680
  .attr("class", "node")
2671
2681
  .call(this._selection.enter.bind(this._selection))
2672
2682
  .on("click", function (d) {
2673
- if (d && d.origRows) {
2683
+ if (d) {
2674
2684
  var columnLabel_1 = "";
2675
2685
  context.mappings().forEach(function (mapping) {
2676
2686
  if (mapping.column()) {
2677
2687
  columnLabel_1 = mapping.column();
2678
2688
  }
2679
2689
  });
2680
- context.click(context.rowToObj(d.origRows[0]), columnLabel_1, context._selection.selected(this));
2690
+ if (d.origRows) {
2691
+ context.click(context.rowToObj(d.origRows[0]), columnLabel_1, context._selection.selected(this));
2692
+ }
2693
+ else {
2694
+ context.click(d.data, columnLabel_1, context._selection.selected(this));
2695
+ }
2681
2696
  }
2682
2697
  })
2683
2698
  .on("dblclick", function (d) {
2684
- if (d && d.origRows) {
2699
+ if (d) {
2685
2700
  var columnLabel_2 = "";
2686
2701
  context.mappings().forEach(function (mapping) {
2687
2702
  if (mapping.column()) {
2688
2703
  columnLabel_2 = mapping.column();
2689
2704
  }
2690
2705
  });
2691
- context.dblclick(context.rowToObj(d.origRows[0]), columnLabel_2, context._selection.selected(this));
2706
+ if (d.origRows) {
2707
+ context.dblclick(context.rowToObj(d.origRows[0]), columnLabel_2, context._selection.selected(this));
2708
+ }
2709
+ else {
2710
+ context.dblclick(d.data, columnLabel_2, context._selection.selected(this));
2711
+ }
2692
2712
  }
2693
2713
  })
2694
2714
  .merge(node)