@syncfusion/ej2-treemap 20.3.47 → 20.3.59

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.3.47
3
+ * version : 20.3.59
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-treemap@*",
3
- "_id": "@syncfusion/ej2-treemap@16.30.8",
3
+ "_id": "@syncfusion/ej2-treemap@20.3.56",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-JwUy66HrBScRNb6zrjFgsz2QSKNtYgTwL7n3fHbrgy7t2W6leTOGZj3ZSjJUVvHqA6LX9zZtijssdg87rN+jew==",
5
+ "_integrity": "sha512-xH6m8oF4jRwdzcQCylKPoBWXCJr3ERSHzTyMBbM/ccxBmUQfwohLJOYTmT1Dj164OAS8+co1YZ5vIxQSDjkh7Q==",
6
6
  "_location": "/@syncfusion/ej2-treemap",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,10 +23,10 @@
23
23
  "/@syncfusion/ej2-react-treemap",
24
24
  "/@syncfusion/ej2-vue-treemap"
25
25
  ],
26
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-treemap/-/ej2-treemap-16.30.8.tgz",
27
- "_shasum": "6f1c2738e6e72bf212a8b6c4edd0431d3fadad05",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treemap/-/ej2-treemap-20.3.56.tgz",
27
+ "_shasum": "24a095f720f1e3ee0514b7c74a8d8fbc3202211a",
28
28
  "_spec": "@syncfusion/ej2-treemap@*",
29
- "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
29
+ "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
30
30
  "author": {
31
31
  "name": "Syncfusion Inc."
32
32
  },
@@ -35,12 +35,12 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~20.3.47",
39
- "@syncfusion/ej2-compression": "~20.3.47",
40
- "@syncfusion/ej2-data": "~20.3.47",
41
- "@syncfusion/ej2-file-utils": "~20.3.47",
42
- "@syncfusion/ej2-pdf-export": "~20.3.47",
43
- "@syncfusion/ej2-svg-base": "~20.3.47"
38
+ "@syncfusion/ej2-base": "~20.3.56",
39
+ "@syncfusion/ej2-compression": "~20.3.56",
40
+ "@syncfusion/ej2-data": "~20.3.56",
41
+ "@syncfusion/ej2-file-utils": "~20.3.56",
42
+ "@syncfusion/ej2-pdf-export": "~20.3.56",
43
+ "@syncfusion/ej2-svg-base": "~20.3.56"
44
44
  },
45
45
  "deprecated": false,
46
46
  "description": "Essential JS 2 TreeMap Components",
@@ -73,6 +73,6 @@
73
73
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
74
74
  },
75
75
  "typings": "index.d.ts",
76
- "version": "20.3.47",
76
+ "version": "20.3.59",
77
77
  "sideEffects": false
78
78
  }
@@ -65,6 +65,9 @@ var TreeMapLegend = /** @class */ (function () {
65
65
  this.findPaletteLegendItems(LevelsData.levelsData[0], 'Parent');
66
66
  }
67
67
  if (this.legendCollections.length > 0) {
68
+ this.legendCollections.sort(function (firstItem, nextItem) { return (firstItem.levelIndex > nextItem.levelIndex) ? 1 : (firstItem.levelIndex < nextItem.levelIndex) ? -1 : 0; });
69
+ this.legendCollections.sort(function (firstItem, nextItem) { return (firstItem.groupIndex > nextItem.groupIndex) ? 1 : (firstItem.groupIndex < nextItem.groupIndex) ? -1 : 0; });
70
+ this.legendCollections.sort(function (firstItem, nextItem) { return (firstItem.leafIndex > nextItem.leafIndex) ? 1 : (firstItem.leafIndex < nextItem.leafIndex) ? -1 : 0; });
68
71
  var defaultSize = 25;
69
72
  var textPadding = 10;
70
73
  var position = legend.position;
@@ -403,8 +406,8 @@ var TreeMapLegend = /** @class */ (function () {
403
406
  groupIndex = data[i]['groupIndex'];
404
407
  isLeafItem = (this.treemap.levels.length === 0 || groupIndex === this.treemap.levels.length);
405
408
  colorMapping = isLeafItem ? leaf.colorMapping : levels[groupIndex].colorMapping;
406
- for (var _i = 0, colorMapping_1 = colorMapping; _i < colorMapping_1.length; _i++) {
407
- var colorMap = colorMapping_1[_i];
409
+ for (var j = 0; j < colorMapping.length; j++) {
410
+ var colorMap = colorMapping[j];
408
411
  gradientElement = null;
409
412
  rangeValue = Number(currentData[this.treemap.rangeColorValuePath]);
410
413
  equalValue = currentData[this.treemap.equalColorValuePath];
@@ -465,8 +468,8 @@ var TreeMapLegend = /** @class */ (function () {
465
468
  fill = ((Object.prototype.toString.call(colorMap.color) === '[object Array]')) && isNullOrUndefined(gradientElement)
466
469
  && isNullOrUndefined(colorMap.value) ? this.legendGradientColor(colorMap, legendIndex) : fill;
467
470
  this.legendCollections.push({
468
- actualValue: actualValue,
469
- legendName: legendText, legendFill: fill, legendData: [],
471
+ actualValue: actualValue, levelIndex: !isLeafItem ? j : -1, leafIndex: isLeafItem ? j : -1,
472
+ legendName: legendText, legendFill: fill, legendData: [], groupIndex: !isLeafItem ? groupIndex : -1,
470
473
  gradientElement: !isNullOrUndefined(gradientElement) ? gradientElement : isNullOrUndefined(colorMap.value)
471
474
  ? this.legendLinearGradient : null, name: data[i]['name'],
472
475
  opacity: this.treemap.legendSettings.opacity, borderColor: this.treemap.legendSettings.border.color,
@@ -631,28 +631,30 @@ var TreeMap = /** @class */ (function (_super) {
631
631
  */
632
632
  TreeMap.prototype.resizeOnTreeMap = function (e) {
633
633
  var _this = this;
634
- this.isResize = true;
635
- var args = {
636
- name: resize,
637
- cancel: false,
638
- previousSize: this.availableSize,
639
- currentSize: new Size(0, 0),
640
- treemap: this
641
- };
642
- if (this.resizeTo) {
643
- clearTimeout(this.resizeTo);
644
- }
645
- if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-treemap')) {
646
- this.resizeTo = setTimeout(function () {
647
- _this.unWireEVents();
648
- _this.createSvg();
649
- _this.refreshing = true;
650
- _this.wireEVents();
651
- args.currentSize = _this.availableSize;
652
- _this.trigger(resize, args, function (observedArgs) {
653
- _this.render();
654
- });
655
- }, 500);
634
+ if (!this.isDestroyed) {
635
+ this.isResize = true;
636
+ var args_1 = {
637
+ name: resize,
638
+ cancel: false,
639
+ previousSize: this.availableSize,
640
+ currentSize: new Size(0, 0),
641
+ treemap: this
642
+ };
643
+ if (this.resizeTo) {
644
+ clearTimeout(this.resizeTo);
645
+ }
646
+ if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-treemap')) {
647
+ this.resizeTo = setTimeout(function () {
648
+ _this.unWireEVents();
649
+ _this.createSvg();
650
+ _this.refreshing = true;
651
+ _this.wireEVents();
652
+ args_1.currentSize = _this.availableSize;
653
+ _this.trigger(resize, args_1, function (observedArgs) {
654
+ _this.render();
655
+ });
656
+ }, 500);
657
+ }
656
658
  }
657
659
  };
658
660
  /**
@@ -1086,29 +1088,31 @@ var TreeMap = /** @class */ (function (_super) {
1086
1088
  * @private
1087
1089
  */
1088
1090
  TreeMap.prototype.onPropertyChanged = function (newProp, oldProp) {
1089
- var render = false;
1090
- for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
1091
- var prop = _a[_i];
1092
- switch (prop) {
1093
- case 'background':
1094
- this.renderBorder();
1095
- break;
1096
- case 'height':
1097
- case 'width':
1098
- case 'layoutType':
1099
- case 'levels':
1100
- case 'drillDownView':
1101
- case 'renderDirection':
1102
- case 'leafItemSettings':
1103
- case 'legendSettings':
1104
- case 'dataSource':
1105
- render = true;
1106
- break;
1091
+ if (!this.isDestroyed) {
1092
+ var render = false;
1093
+ for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
1094
+ var prop = _a[_i];
1095
+ switch (prop) {
1096
+ case 'background':
1097
+ this.renderBorder();
1098
+ break;
1099
+ case 'height':
1100
+ case 'width':
1101
+ case 'layoutType':
1102
+ case 'levels':
1103
+ case 'drillDownView':
1104
+ case 'renderDirection':
1105
+ case 'leafItemSettings':
1106
+ case 'legendSettings':
1107
+ case 'dataSource':
1108
+ render = true;
1109
+ break;
1110
+ }
1111
+ }
1112
+ if (render) {
1113
+ this.createSvg();
1114
+ this.renderElements();
1107
1115
  }
1108
- }
1109
- if (render) {
1110
- this.createSvg();
1111
- this.renderElements();
1112
1116
  }
1113
1117
  };
1114
1118
  /**
@@ -59,7 +59,9 @@ var TreeMapTooltip = /** @class */ (function () {
59
59
  toolTipHeader = item['name'];
60
60
  value = item['weight'];
61
61
  toolTipData = item['data'];
62
- markerFill = item['options']['fill'];
62
+ if (!isNullOrUndefined(item['options'])) {
63
+ markerFill = item['options']['fill'];
64
+ }
63
65
  if (this.treemap.enableRtl) {
64
66
  tooltipContent = [textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) ||
65
67
  formatValue(value, this.treemap) + ' : ' + this.treemap.weightValuePath.toString()];