@syncfusion/ej2-treemap 19.4.48 → 20.1.47-14088
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/CHANGELOG.md +96 -80
- package/README.md +69 -69
- package/dist/ej2-treemap.umd.min.js +1 -10
- package/dist/ej2-treemap.umd.min.js.map +1 -1
- package/dist/es6/ej2-treemap.es2015.js +80 -71
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +138 -129
- package/dist/es6/ej2-treemap.es5.js.map +1 -1
- package/helper/e2e/index.js +3 -3
- package/helper/e2e/treemap-helper.js +13 -13
- package/license +9 -9
- package/package.json +78 -78
- package/src/treemap/layout/legend.js +1 -1
- package/src/treemap/model/base-model.d.ts +485 -485
- package/src/treemap/model/base.js +19 -19
- package/src/treemap/model/interface.d.ts +17 -17
- package/src/treemap/model/pdf-export.js +2 -2
- package/src/treemap/model/theme.js +2 -2
- package/src/treemap/treemap-model.d.ts +221 -221
- package/src/treemap/treemap.d.ts +2 -1
- package/src/treemap/treemap.js +51 -46
- package/src/treemap/user-interaction/highlight-selection.js +12 -12
- package/src/treemap/user-interaction/tooltip.js +14 -10
- package/src/treemap/utils/enum.d.ts +5 -1
- package/src/treemap/utils/helper.js +5 -5
- package/.eslintrc.json +0 -244
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -72
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -49
- package/dist/global/ej2-treemap.min.js +0 -11
- package/dist/global/ej2-treemap.min.js.map +0 -1
- package/dist/global/index.d.ts +0 -14
- package/tslint.json +0 -111
package/src/treemap/treemap.js
CHANGED
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Tree Map Components
|
|
7
7
|
*/
|
|
8
|
-
var __extends = (this && this.__extends) || (function () {
|
|
9
|
-
var extendStatics = function (d, b) {
|
|
10
|
-
extendStatics = Object.setPrototypeOf ||
|
|
11
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
12
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
13
|
-
return extendStatics(d, b);
|
|
14
|
-
};
|
|
15
|
-
return function (d, b) {
|
|
16
|
-
extendStatics(d, b);
|
|
17
|
-
function __() { this.constructor = d; }
|
|
18
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
19
|
-
};
|
|
20
|
-
})();
|
|
21
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
22
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
25
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
26
|
-
};
|
|
8
|
+
var __extends = (this && this.__extends) || (function () {
|
|
9
|
+
var extendStatics = function (d, b) {
|
|
10
|
+
extendStatics = Object.setPrototypeOf ||
|
|
11
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
12
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
13
|
+
return extendStatics(d, b);
|
|
14
|
+
};
|
|
15
|
+
return function (d, b) {
|
|
16
|
+
extendStatics(d, b);
|
|
17
|
+
function __() { this.constructor = d; }
|
|
18
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
19
|
+
};
|
|
20
|
+
})();
|
|
21
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
22
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
25
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
26
|
+
};
|
|
27
27
|
import { Component, NotifyPropertyChanges, Property, extend, Ajax } from '@syncfusion/ej2-base';
|
|
28
28
|
import { Complex, Collection } from '@syncfusion/ej2-base';
|
|
29
29
|
import { Event, Internationalization } from '@syncfusion/ej2-base';
|
|
@@ -578,7 +578,7 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
578
578
|
EventHandler.remove(this.element, Browser.touchMoveEvent, this.mouseMoveOnTreeMap);
|
|
579
579
|
EventHandler.remove(this.element, Browser.touchEndEvent, this.mouseEndOnTreeMap);
|
|
580
580
|
EventHandler.remove(this.element, 'pointerleave mouseleave', this.mouseLeaveOnTreeMap);
|
|
581
|
-
window.removeEventListener('resize', this.
|
|
581
|
+
window.removeEventListener('resize', this.resizeEvent);
|
|
582
582
|
};
|
|
583
583
|
/**
|
|
584
584
|
* To bind event handlers for treemap.
|
|
@@ -593,7 +593,8 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
593
593
|
EventHandler.add(this.element, Browser.touchMoveEvent, this.mouseMoveOnTreeMap, this);
|
|
594
594
|
EventHandler.add(this.element, Browser.touchEndEvent, this.mouseEndOnTreeMap, this);
|
|
595
595
|
EventHandler.add(this.element, 'pointerleave mouseleave', this.mouseLeaveOnTreeMap, this);
|
|
596
|
-
|
|
596
|
+
this.resizeEvent = this.resizeOnTreeMap.bind(this);
|
|
597
|
+
window.addEventListener('resize', this.resizeEvent);
|
|
597
598
|
};
|
|
598
599
|
/**
|
|
599
600
|
* Method to set culture for maps
|
|
@@ -619,28 +620,32 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
619
620
|
*/
|
|
620
621
|
TreeMap.prototype.resizeOnTreeMap = function (e) {
|
|
621
622
|
var _this = this;
|
|
622
|
-
this.
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
this.
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
623
|
+
if (!this.isDestroyed) {
|
|
624
|
+
this.isResize = true;
|
|
625
|
+
var args_1 = {
|
|
626
|
+
name: resize,
|
|
627
|
+
cancel: false,
|
|
628
|
+
previousSize: this.availableSize,
|
|
629
|
+
currentSize: new Size(0, 0),
|
|
630
|
+
treemap: this
|
|
631
|
+
};
|
|
632
|
+
if (this.resizeTo) {
|
|
633
|
+
clearTimeout(this.resizeTo);
|
|
634
|
+
}
|
|
635
|
+
if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-treemap')) {
|
|
636
|
+
this.resizeTo = setTimeout(function () {
|
|
637
|
+
_this.unWireEVents();
|
|
638
|
+
_this.createSvg();
|
|
639
|
+
_this.refreshing = true;
|
|
640
|
+
_this.wireEVents();
|
|
641
|
+
args_1.currentSize = _this.availableSize;
|
|
642
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
643
|
+
_this.trigger(resize, args_1, function (observedArgs) {
|
|
644
|
+
_this.render();
|
|
645
|
+
_this.refreshing = false;
|
|
646
|
+
});
|
|
647
|
+
}, 500);
|
|
648
|
+
}
|
|
644
649
|
}
|
|
645
650
|
};
|
|
646
651
|
/**
|
|
@@ -659,7 +664,7 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
659
664
|
this.trigger(click, clickArgs);
|
|
660
665
|
if (targetId.indexOf('_Item_Index') > -1) {
|
|
661
666
|
e.preventDefault();
|
|
662
|
-
itemIndex = parseFloat(targetId.split('
|
|
667
|
+
itemIndex = parseFloat(targetId.split('_Item_Index_')[1]);
|
|
663
668
|
eventArgs = {
|
|
664
669
|
cancel: false, name: itemClick, treemap: this, item: this.layout.renderItems[itemIndex], mouseEvent: e,
|
|
665
670
|
groupIndex: this.layout.renderItems[itemIndex]['groupIndex'], groupName: this.layout.renderItems[itemIndex]['name'],
|
|
@@ -732,7 +737,7 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
732
737
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
733
738
|
var childItems;
|
|
734
739
|
if (targetId.indexOf('_Item_Index') > -1) {
|
|
735
|
-
item = this.layout.renderItems[parseFloat(targetId.split('
|
|
740
|
+
item = this.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
|
|
736
741
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
737
742
|
childItems = findChildren(item)['values'];
|
|
738
743
|
this.element.style.cursor = (!item['isLeafItem'] && childItems && childItems.length > 0 && this.enableDrillDown) ?
|
|
@@ -860,7 +865,7 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
860
865
|
if (e.cancelable) {
|
|
861
866
|
e.preventDefault();
|
|
862
867
|
}
|
|
863
|
-
index = parseFloat(targetId.split('
|
|
868
|
+
index = parseFloat(targetId.split('_Item_Index_')[1]);
|
|
864
869
|
item = this.layout.renderItems[index];
|
|
865
870
|
var labelText = targetEle.innerHTML;
|
|
866
871
|
if (this.enableBreadcrumb) {
|
|
@@ -43,14 +43,14 @@ var TreeMapHighlight = /** @class */ (function () {
|
|
|
43
43
|
if (this.highLightId !== targetId) {
|
|
44
44
|
treeMapElement = document.getElementById(treemap.element.id + '_TreeMap_' + treemap.layoutType + '_Layout');
|
|
45
45
|
var selectionElements = document.getElementsByClassName('treeMapSelection');
|
|
46
|
-
item = this.treemap.layout.renderItems[parseFloat(targetId.split('
|
|
46
|
+
item = this.treemap.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
|
|
47
47
|
var index = void 0;
|
|
48
48
|
if (this.treemap.legendSettings.visible) {
|
|
49
49
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
50
|
var collection = this.treemap.treeMapLegendModule.legendCollections;
|
|
51
51
|
var length_1 = this.treemap.treeMapLegendModule.legendCollections.length;
|
|
52
52
|
index = getLegendIndex(length_1, item, treemap);
|
|
53
|
-
this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById('
|
|
53
|
+
this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById(this.treemap.element.id + '_Legend_Shape_Index_' + index) : document.getElementById(this.treemap.element.id + '_Legend_Index_' + index);
|
|
54
54
|
if (this.shapeElement !== null && (selectionModule ? this.shapeElement.getAttribute('id') !== selectionModule.legendSelectId : true)) {
|
|
55
55
|
if (selectionModule ? this.shapeElement !== selectionModule.shapeElement : true) {
|
|
56
56
|
this.currentElement.push({ currentElement: this.shapeElement });
|
|
@@ -78,7 +78,7 @@ var TreeMapHighlight = /** @class */ (function () {
|
|
|
78
78
|
for (var i = 0; i < treeMapElement.childElementCount; i++) {
|
|
79
79
|
element = treeMapElement.childNodes[i];
|
|
80
80
|
process = true;
|
|
81
|
-
item = treemap.layout.renderItems[element.id.split('
|
|
81
|
+
item = treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])];
|
|
82
82
|
for (var j = 0; j < selectionElements.length; j++) {
|
|
83
83
|
if (element.id === selectionElements[j].id) {
|
|
84
84
|
process = false;
|
|
@@ -116,7 +116,7 @@ var TreeMapHighlight = /** @class */ (function () {
|
|
|
116
116
|
removeLegend(this.legendHighlightCollection, 'highlight');
|
|
117
117
|
}
|
|
118
118
|
this.shapeTarget = 'highlight';
|
|
119
|
-
var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('
|
|
119
|
+
var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('_Legend_Shape_Index_')[1]) : parseFloat(targetId.split('_Legend_Index_')[1]);
|
|
120
120
|
var dataLength = this.treemap.treeMapLegendModule.legendCollections[index]['legendData'].length;
|
|
121
121
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
122
122
|
var collection = this.treemap.treeMapLegendModule.legendCollections;
|
|
@@ -126,7 +126,7 @@ var TreeMapHighlight = /** @class */ (function () {
|
|
|
126
126
|
if (this.treemap.treeMapLegendModule.legendCollections[index]['legendData'][i]['levelOrderName'] === this.treemap.layout.renderItems[j]['levelOrderName']) {
|
|
127
127
|
itemIndex = j;
|
|
128
128
|
groupIndex = this.treemap.layout.renderItems[j]['groupIndex'];
|
|
129
|
-
var nodeEle = document.getElementById('
|
|
129
|
+
var nodeEle = document.getElementById(this.treemap.element.id + '_Level_Index_' + groupIndex + '_Item_Index_' + itemIndex + '_RectPath');
|
|
130
130
|
if (i === 0) {
|
|
131
131
|
this.legendHighlightCollection = [];
|
|
132
132
|
pushCollection(this.legendHighlightCollection, legendIndex, j, targetEle, nodeEle, this.treemap.layout.renderItems, collection);
|
|
@@ -250,7 +250,7 @@ var TreeMapSelection = /** @class */ (function () {
|
|
|
250
250
|
e.preventDefault();
|
|
251
251
|
if (this.treemap.selectionId !== targetId && this.legendSelect) {
|
|
252
252
|
treeMapElement = document.getElementById(layoutID);
|
|
253
|
-
item = treemap.layout.renderItems[parseFloat(targetId.split('
|
|
253
|
+
item = treemap.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
|
|
254
254
|
var index = void 0;
|
|
255
255
|
if (this.treemap.legendSettings.visible) {
|
|
256
256
|
this.shapeSelect = false;
|
|
@@ -264,7 +264,7 @@ var TreeMapSelection = /** @class */ (function () {
|
|
|
264
264
|
highlightModule.shapeHighlightCollection = [];
|
|
265
265
|
}
|
|
266
266
|
index = getLegendIndex(length_3, item, treemap);
|
|
267
|
-
this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById('
|
|
267
|
+
this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById(this.treemap.element.id + '_Legend_Shape_Index_' + index) : document.getElementById(this.treemap.element.id + '_Legend_Index_' + index);
|
|
268
268
|
if (this.shapeElement !== null) {
|
|
269
269
|
this.shapeSelectId = this.shapeElement.getAttribute('id');
|
|
270
270
|
this.shapeSelectionCollection.push({ legendEle: this.shapeElement, oldFill: collection[index]['legendFill'],
|
|
@@ -277,7 +277,7 @@ var TreeMapSelection = /** @class */ (function () {
|
|
|
277
277
|
orders = findHightLightItems(item, [], selection.mode, treemap);
|
|
278
278
|
for (var i = 0; i < treeMapElement.childElementCount; i++) {
|
|
279
279
|
element = treeMapElement.childNodes[i];
|
|
280
|
-
item = treemap.layout.renderItems[element.id.split('
|
|
280
|
+
item = treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])];
|
|
281
281
|
if (orders.indexOf(item['levelOrderName']) > -1) {
|
|
282
282
|
selectionElements.push(element);
|
|
283
283
|
treemap.levelSelection.push(element.id);
|
|
@@ -337,14 +337,14 @@ var TreeMapSelection = /** @class */ (function () {
|
|
|
337
337
|
if (highlightModule) {
|
|
338
338
|
highlightModule.shapeTarget = 'selection';
|
|
339
339
|
}
|
|
340
|
-
var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('
|
|
340
|
+
var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('_Legend_Shape_Index_')[1]) : parseFloat(targetId.split('_Legend_Index_')[1]);
|
|
341
341
|
var dataLength = this.treemap.treeMapLegendModule.legendCollections[index]['legendData'].length;
|
|
342
342
|
for (var k = 0; k < dataLength; k++) {
|
|
343
343
|
for (var l = 0; l < this.treemap.layout.renderItems.length; l++) {
|
|
344
344
|
if (this.treemap.treeMapLegendModule.legendCollections[index]['legendData'][k]['levelOrderName'] === this.treemap.layout.renderItems[l]['levelOrderName']) {
|
|
345
345
|
itemIndex = l;
|
|
346
346
|
groupIndex = this.treemap.layout.renderItems[l]['groupIndex'];
|
|
347
|
-
var nodeEle = document.getElementById('
|
|
347
|
+
var nodeEle = document.getElementById(this.treemap.element.id + '_Level_Index_' + groupIndex + '_Item_Index_' + itemIndex + '_RectPath');
|
|
348
348
|
if (k === 0) {
|
|
349
349
|
pushCollection(this.legendSelectionCollection, legendIndex, l, targetEle_1, nodeEle, this.treemap.layout.renderItems, collection);
|
|
350
350
|
length_4 = this.legendSelectionCollection.length;
|
|
@@ -396,7 +396,7 @@ var TreeMapSelection = /** @class */ (function () {
|
|
|
396
396
|
var orders = findHightLightItems(item, [], selection.mode, this.treemap);
|
|
397
397
|
for (var i = 0; i < treeMapElement.childElementCount; i++) {
|
|
398
398
|
element = treeMapElement.childNodes[i];
|
|
399
|
-
item = this.treemap.layout.renderItems[element.id.split('
|
|
399
|
+
item = this.treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])];
|
|
400
400
|
if (orders.indexOf(item['levelOrderName']) > -1) {
|
|
401
401
|
selectionElements.push(element);
|
|
402
402
|
this.treemap.levelSelection.push(element.id);
|
|
@@ -412,7 +412,7 @@ var TreeMapSelection = /** @class */ (function () {
|
|
|
412
412
|
this.shapeElement = undefined;
|
|
413
413
|
removeShape(this.shapeSelectionCollection, 'selection');
|
|
414
414
|
index = getLegendIndex(length_5, items[m], this.treemap);
|
|
415
|
-
this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById('
|
|
415
|
+
this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById(this.treemap.element.id + '_Legend_Shape_Index_' + index) : document.getElementById(this.treemap.element.id + '_Legend_Index_' + index);
|
|
416
416
|
if (this.shapeElement !== null) {
|
|
417
417
|
this.shapeSelectId = this.shapeElement.getAttribute('id');
|
|
418
418
|
this.treemap.legendId.push(this.shapeSelectId);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
|
|
7
|
-
t[p[i]] = s[p[i]];
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
|
|
7
|
+
t[p[i]] = s[p[i]];
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
10
|
import { Tooltip } from '@syncfusion/ej2-svg-base';
|
|
11
11
|
import { Browser, createElement, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
12
12
|
import { getMousePosition, textFormatter, formatValue } from '../utils/helper';
|
|
@@ -54,7 +54,7 @@ var TreeMapTooltip = /** @class */ (function () {
|
|
|
54
54
|
var tooltipContent = [];
|
|
55
55
|
var markerFill;
|
|
56
56
|
if (targetId.indexOf('_Item_Index') > -1) {
|
|
57
|
-
item = this.treemap.layout.renderItems[parseFloat(targetId.split('
|
|
57
|
+
item = this.treemap.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
|
|
58
58
|
if (!isNullOrUndefined(item)) {
|
|
59
59
|
toolTipHeader = item['name'];
|
|
60
60
|
value = item['weight'];
|
|
@@ -134,6 +134,10 @@ var TreeMapTooltip = /** @class */ (function () {
|
|
|
134
134
|
textStyle: args['textStyle'],
|
|
135
135
|
fill: this.treemap.tooltipSettings.fill ? this.treemap.tooltipSettings.fill : this.treemap.themeStyle.tooltipFillColor
|
|
136
136
|
});
|
|
137
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
138
|
+
if (this.treemap.isVue || this.treemap.isVue3) {
|
|
139
|
+
this.svgTooltip.controlInstance = this.treemap;
|
|
140
|
+
}
|
|
137
141
|
this.svgTooltip.opacity = this.treemap.themeStyle.tooltipFillOpacity || this.svgTooltip.opacity;
|
|
138
142
|
this.svgTooltip.appendTo(tooltipEle);
|
|
139
143
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -197,7 +197,11 @@ export declare type TreeMapTheme =
|
|
|
197
197
|
/** Render a treemap with Bootstrap5 theme. */
|
|
198
198
|
'Bootstrap5' |
|
|
199
199
|
/** Render a treemap with Bootstrap5 dark theme. */
|
|
200
|
-
'Bootstrap5Dark'
|
|
200
|
+
'Bootstrap5Dark' |
|
|
201
|
+
/** Render a treemap with Fluent theme. */
|
|
202
|
+
'Fluent' |
|
|
203
|
+
/** Render a treemap with Fluent dark theme. */
|
|
204
|
+
'FluentDark';
|
|
201
205
|
/**
|
|
202
206
|
* Defines the rendering directions to render the treemap items in the treemap.
|
|
203
207
|
*/
|
|
@@ -492,7 +492,7 @@ value, weightValuePath) {
|
|
|
492
492
|
var dataValue = value;
|
|
493
493
|
if (!isNullOrUndefined(colorMapping[i].from) && !isNullOrUndefined(colorMapping[i].to)
|
|
494
494
|
&& !isNullOrUndefined(colorMapping[i].value)) {
|
|
495
|
-
if ((value >= colorMapping[i].from && colorMapping[i].to >= value) && (colorMapping[i].value === equalValue)) {
|
|
495
|
+
if ((value >= colorMapping[i].from && colorMapping[i].to >= value) && (colorMapping[i].value.toString() === equalValue)) {
|
|
496
496
|
isEqualColor = true;
|
|
497
497
|
if (Object.prototype.toString.call(colorMapping[i].color) === '[object Array]') {
|
|
498
498
|
fill = !isEqualColor ? colorCollections(colorMapping[i], dataValue) : colorMapping[i].color[0];
|
|
@@ -504,8 +504,8 @@ value, weightValuePath) {
|
|
|
504
504
|
}
|
|
505
505
|
else if ((!isNullOrUndefined(colorMapping[i].from) && !isNullOrUndefined(colorMapping[i].to))
|
|
506
506
|
|| !isNullOrUndefined((colorMapping[i].value))) {
|
|
507
|
-
if ((value >= colorMapping[i].from && colorMapping[i].to >= value) || (colorMapping[i].value === equalValue)) {
|
|
508
|
-
if (colorMapping[i].value === equalValue) {
|
|
507
|
+
if ((value >= colorMapping[i].from && colorMapping[i].to >= value) || (colorMapping[i].value.toString() === equalValue)) {
|
|
508
|
+
if (colorMapping[i].value.toString() === equalValue) {
|
|
509
509
|
isEqualColor = true;
|
|
510
510
|
}
|
|
511
511
|
if (Object.prototype.toString.call(colorMapping[i].color) === '[object Array]') {
|
|
@@ -516,7 +516,7 @@ value, weightValuePath) {
|
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
if (((value >= colorMapping[i].from && value <= colorMapping[i].to) || (colorMapping[i].value === equalValue))
|
|
519
|
+
if (((value >= colorMapping[i].from && value <= colorMapping[i].to) || (colorMapping[i].value.toString() === equalValue))
|
|
520
520
|
&& !isNullOrUndefined(colorMapping[i].minOpacity) && !isNullOrUndefined(colorMapping[i].maxOpacity) && fill) {
|
|
521
521
|
opacity = deSaturationColor(weightValuePath, colorMapping[i], fill, value);
|
|
522
522
|
}
|
|
@@ -762,7 +762,7 @@ export function removeClassNames(elements, type, treemap) {
|
|
|
762
762
|
for (var j = 0; j < elements.length; j++) {
|
|
763
763
|
element = isNullOrUndefined(elements[j].childNodes[0]) ? elements[j] :
|
|
764
764
|
elements[j].childNodes[0];
|
|
765
|
-
options = treemap.layout.renderItems[element.id.split('
|
|
765
|
+
options = treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])]['options'];
|
|
766
766
|
applyOptions(element, options);
|
|
767
767
|
elements[j].classList.remove(type);
|
|
768
768
|
j -= 1;
|
package/.eslintrc.json
DELETED
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": true,
|
|
4
|
-
"es2021": true
|
|
5
|
-
},
|
|
6
|
-
"extends": [
|
|
7
|
-
"eslint:recommended",
|
|
8
|
-
"plugin:@typescript-eslint/recommended",
|
|
9
|
-
"plugin:jsdoc/recommended"
|
|
10
|
-
],
|
|
11
|
-
"parser": "@typescript-eslint/parser",
|
|
12
|
-
"parserOptions": {
|
|
13
|
-
"ecmaFeatures": { "js": true },
|
|
14
|
-
"ecmaVersion": 2018,
|
|
15
|
-
"project": "./tsconfig.json",
|
|
16
|
-
"sourceType": "module"
|
|
17
|
-
},
|
|
18
|
-
"plugins": [
|
|
19
|
-
"@typescript-eslint",
|
|
20
|
-
"@typescript-eslint/tslint",
|
|
21
|
-
"jsdoc"
|
|
22
|
-
],
|
|
23
|
-
"rules": {
|
|
24
|
-
"use-isnan": "error",
|
|
25
|
-
"@typescript-eslint/no-inferrable-types": "off",
|
|
26
|
-
"@typescript-eslint/ban-types": ["warn", {
|
|
27
|
-
"types": {
|
|
28
|
-
"Object": false,
|
|
29
|
-
"object": false,
|
|
30
|
-
"{}": false,
|
|
31
|
-
"Function": false
|
|
32
|
-
}
|
|
33
|
-
}],
|
|
34
|
-
"jsdoc/check-tag-names": 0,
|
|
35
|
-
"@typescript-eslint/tslint/config": [
|
|
36
|
-
"error",
|
|
37
|
-
{
|
|
38
|
-
"rules": {
|
|
39
|
-
"ban": true,
|
|
40
|
-
"chai-vague-errors": true,
|
|
41
|
-
"max-func-body-length": [
|
|
42
|
-
true,
|
|
43
|
-
120,
|
|
44
|
-
{
|
|
45
|
-
"ignore-parameters-to-function-regex": "describe"
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
"missing-jsdoc": true,
|
|
49
|
-
"no-backbone-get-set-outside-model": false,
|
|
50
|
-
"no-cookies": false,
|
|
51
|
-
"no-delete-expression": false,
|
|
52
|
-
"no-disable-auto-sanitization": true,
|
|
53
|
-
"no-duplicate-case": true,
|
|
54
|
-
"no-duplicate-parameter-names": true,
|
|
55
|
-
"no-empty-interfaces": false,
|
|
56
|
-
"no-exec-script": true,
|
|
57
|
-
"no-function-expression": false,
|
|
58
|
-
"no-multiple-var-decl": false,
|
|
59
|
-
"no-string-based-set-immediate": false,
|
|
60
|
-
"no-string-based-set-interval": false,
|
|
61
|
-
"no-unnecessary-bind": false,
|
|
62
|
-
"no-unused-imports": true,
|
|
63
|
-
"no-with-statement": false,
|
|
64
|
-
"prefer-array-literal": false,
|
|
65
|
-
"typedef": [
|
|
66
|
-
true,
|
|
67
|
-
"call-signature",
|
|
68
|
-
"parameter",
|
|
69
|
-
"property-declaration",
|
|
70
|
-
"variable-declaration",
|
|
71
|
-
"arrow-parameter",
|
|
72
|
-
"member-variable-declaration"
|
|
73
|
-
],
|
|
74
|
-
"use-named-parameter": false,
|
|
75
|
-
"valid-typeof": true,
|
|
76
|
-
"whitespace": [
|
|
77
|
-
true,
|
|
78
|
-
"check-branch",
|
|
79
|
-
"check-decl",
|
|
80
|
-
"check-operator",
|
|
81
|
-
"check-separator",
|
|
82
|
-
"check-type"
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
"no-control-regex": "error",
|
|
88
|
-
"no-constant-condition": "error",
|
|
89
|
-
"no-invalid-regexp": "error",
|
|
90
|
-
"curly": "error",
|
|
91
|
-
"eol-last": [
|
|
92
|
-
"error",
|
|
93
|
-
"always"
|
|
94
|
-
],
|
|
95
|
-
"guard-for-in": "error",
|
|
96
|
-
"no-labels": "error",
|
|
97
|
-
"max-len": [
|
|
98
|
-
"error",
|
|
99
|
-
{
|
|
100
|
-
"code": 140,
|
|
101
|
-
"tabWidth": 4,
|
|
102
|
-
"ignoreComments": true,
|
|
103
|
-
"ignoreStrings": true,
|
|
104
|
-
"ignoreTemplateLiterals": true,
|
|
105
|
-
"ignoreRegExpLiterals": true
|
|
106
|
-
}
|
|
107
|
-
],
|
|
108
|
-
"no-console": [
|
|
109
|
-
"error",
|
|
110
|
-
{
|
|
111
|
-
"allow": [
|
|
112
|
-
"warn",
|
|
113
|
-
"dir",
|
|
114
|
-
"timeLog",
|
|
115
|
-
"assert",
|
|
116
|
-
"clear",
|
|
117
|
-
"count",
|
|
118
|
-
"countReset",
|
|
119
|
-
"group",
|
|
120
|
-
"groupEnd",
|
|
121
|
-
"table",
|
|
122
|
-
"dirxml",
|
|
123
|
-
"error",
|
|
124
|
-
"groupCollapsed",
|
|
125
|
-
"Console",
|
|
126
|
-
"profile",
|
|
127
|
-
"profileEnd",
|
|
128
|
-
"timeStamp",
|
|
129
|
-
"context"
|
|
130
|
-
]
|
|
131
|
-
}
|
|
132
|
-
],
|
|
133
|
-
"no-redeclare": [
|
|
134
|
-
"error",
|
|
135
|
-
{
|
|
136
|
-
"builtinGlobals": true
|
|
137
|
-
}
|
|
138
|
-
],
|
|
139
|
-
"@typescript-eslint/no-parameter-properties": "error",
|
|
140
|
-
"@typescript-eslint/indent": [
|
|
141
|
-
"error",
|
|
142
|
-
4,
|
|
143
|
-
{
|
|
144
|
-
"CallExpression": {
|
|
145
|
-
"arguments": "first"
|
|
146
|
-
},
|
|
147
|
-
"FunctionDeclaration": {
|
|
148
|
-
"parameters": "first"
|
|
149
|
-
},
|
|
150
|
-
"FunctionExpression": {
|
|
151
|
-
"parameters": "first"
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
],
|
|
155
|
-
"no-debugger": "error",
|
|
156
|
-
"no-eval": "error",
|
|
157
|
-
"no-extra-semi": "error",
|
|
158
|
-
"no-throw-literal": "error",
|
|
159
|
-
"no-fallthrough": "error",
|
|
160
|
-
"comma-dangle": [
|
|
161
|
-
"error",
|
|
162
|
-
"never"
|
|
163
|
-
],
|
|
164
|
-
"no-trailing-spaces": "error",
|
|
165
|
-
"@typescript-eslint/no-unused-expressions": "error",
|
|
166
|
-
"@typescript-eslint/no-var-requires": "error",
|
|
167
|
-
"one-var": [
|
|
168
|
-
"error",
|
|
169
|
-
"never"
|
|
170
|
-
],
|
|
171
|
-
"@typescript-eslint/no-explicit-any": "error",
|
|
172
|
-
"no-cond-assign": [
|
|
173
|
-
"error",
|
|
174
|
-
"always"
|
|
175
|
-
],
|
|
176
|
-
"@typescript-eslint/consistent-type-assertions": "off",
|
|
177
|
-
"jsdoc/check-alignment": "error",
|
|
178
|
-
"no-empty": "error",
|
|
179
|
-
"quotes": [
|
|
180
|
-
"error",
|
|
181
|
-
"single"
|
|
182
|
-
],
|
|
183
|
-
"semi": [
|
|
184
|
-
"error",
|
|
185
|
-
"always"
|
|
186
|
-
],
|
|
187
|
-
"eqeqeq": [
|
|
188
|
-
"error",
|
|
189
|
-
"smart"
|
|
190
|
-
],
|
|
191
|
-
"valid-typeof": [
|
|
192
|
-
"error",
|
|
193
|
-
{
|
|
194
|
-
"requireStringLiterals": true
|
|
195
|
-
}
|
|
196
|
-
],
|
|
197
|
-
"camelcase": [
|
|
198
|
-
"error",
|
|
199
|
-
{
|
|
200
|
-
"properties": "always",
|
|
201
|
-
"ignoreDestructuring": true,
|
|
202
|
-
"ignoreImports": true
|
|
203
|
-
}
|
|
204
|
-
],
|
|
205
|
-
"no-irregular-whitespace": [
|
|
206
|
-
"error",
|
|
207
|
-
{
|
|
208
|
-
"skipStrings": true,
|
|
209
|
-
"skipComments": true,
|
|
210
|
-
"skipRegExps": true,
|
|
211
|
-
"skipTemplates": true
|
|
212
|
-
}
|
|
213
|
-
],
|
|
214
|
-
"valid-jsdoc": [
|
|
215
|
-
"error",
|
|
216
|
-
{
|
|
217
|
-
"prefer": {
|
|
218
|
-
"arg": "param",
|
|
219
|
-
"argument": "param",
|
|
220
|
-
"class": "constructor",
|
|
221
|
-
"return": "returns",
|
|
222
|
-
"virtual": "abstract"
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
],
|
|
226
|
-
"no-var": "error",
|
|
227
|
-
"radix": "error"
|
|
228
|
-
},
|
|
229
|
-
"reportUnusedDisableDirectives": true,
|
|
230
|
-
"overrides": [
|
|
231
|
-
{
|
|
232
|
-
"files": [
|
|
233
|
-
"node_modules",
|
|
234
|
-
"dist",
|
|
235
|
-
"public",
|
|
236
|
-
"coverage",
|
|
237
|
-
"test-report"
|
|
238
|
-
],
|
|
239
|
-
"rules": {
|
|
240
|
-
"no-unused-expressions": "off"
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
]
|
|
244
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Bug description
|
|
2
|
-
|
|
3
|
-
Clearly and concisely describe the problem or feature (this cannot be empty).
|
|
4
|
-
|
|
5
|
-
## Root cause
|
|
6
|
-
|
|
7
|
-
Briefly describe the root cause and analysis of the problem.
|
|
8
|
-
If there is an internal discussion on the forum, provide the link.
|
|
9
|
-
|
|
10
|
-
## Reason for not identifying earlier
|
|
11
|
-
|
|
12
|
-
Find how it was missed in our earlier testing and development and by whom it was missed. This will help prevent similar mistakes in the future.
|
|
13
|
-
|
|
14
|
-
### Reason
|
|
15
|
-
|
|
16
|
-
Provide reason for missing.
|
|
17
|
-
|
|
18
|
-
### Action taken:
|
|
19
|
-
|
|
20
|
-
Provide the action plan taken to avoid this issue further. Also, mention if we addressed any other area in the same product based on this learning.
|
|
21
|
-
|
|
22
|
-
### Related Area for missing test case:
|
|
23
|
-
|
|
24
|
-
Unit test case / E2E test case / Manual testing
|
|
25
|
-
|
|
26
|
-
## Is it a breaking issue?
|
|
27
|
-
|
|
28
|
-
If it is a breaking issue, provide the commit detail which caused this break.
|
|
29
|
-
|
|
30
|
-
## Solution description
|
|
31
|
-
|
|
32
|
-
Describe your code changes in detail for reviewers.
|
|
33
|
-
|
|
34
|
-
### Cause:
|
|
35
|
-
|
|
36
|
-
Technical explanation for cause.
|
|
37
|
-
|
|
38
|
-
### Fix:
|
|
39
|
-
|
|
40
|
-
Technical explanation for your fix.
|
|
41
|
-
|
|
42
|
-
## Output screenshots
|
|
43
|
-
|
|
44
|
-
Post the output screenshots if an UI is affected or added due to this bug.
|
|
45
|
-
|
|
46
|
-
### Before issue fix output image:
|
|
47
|
-
|
|
48
|
-
Provide issue image before fix.
|
|
49
|
-
|
|
50
|
-
### After issue fix output image:
|
|
51
|
-
|
|
52
|
-
Provide issue fixed image with your fix.
|
|
53
|
-
|
|
54
|
-
## Areas affected and ensured
|
|
55
|
-
|
|
56
|
-
List the areas affected by your code changes.
|
|
57
|
-
|
|
58
|
-
## Additional checklist
|
|
59
|
-
|
|
60
|
-
- [ ] Did you run the automation against your fix? <b> Yes | No Your Explanation </b>
|
|
61
|
-
|
|
62
|
-
- [ ] Is there any API name change? <b> Yes | No Your Explanation </b>
|
|
63
|
-
|
|
64
|
-
- [ ] Is there any existing behavior change of other features due to this code change? <b> Yes | No Your Explanation </b>
|
|
65
|
-
|
|
66
|
-
- [ ] Did you record this case in the unit test or UI test? <b> Yes | No Your Explanation </b>
|
|
67
|
-
|
|
68
|
-
- [ ] Did you added issue fix comment? <b> Yes | No Your Explanation </b>
|
|
69
|
-
|
|
70
|
-
- [ ] Did you tested this issue fix for all browsers? <b> [ ] Chrome [ ] Firefox [ ] Edge [ ] Internet Explorer </b>
|
|
71
|
-
|
|
72
|
-
- [ ] Does it have any known issues? <b> Yes | No Your Explanation </b>
|