@syncfusion/ej2-treemap 19.4.52 → 20.1.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.
- package/CHANGELOG.md +14 -0
- package/dist/ej2-treemap.umd.min.js +2 -2
- package/dist/ej2-treemap.umd.min.js.map +1 -1
- package/dist/es6/ej2-treemap.es2015.js +26 -22
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +26 -22
- package/dist/es6/ej2-treemap.es5.js.map +1 -1
- package/dist/global/ej2-treemap.min.js +2 -2
- package/dist/global/ej2-treemap.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/treemap/layout/legend.js +1 -1
- package/src/treemap/model/pdf-export.js +2 -2
- package/src/treemap/model/theme.js +2 -2
- package/src/treemap/treemap.js +3 -3
- package/src/treemap/user-interaction/highlight-selection.js +12 -12
- package/src/treemap/user-interaction/tooltip.js +5 -1
- package/src/treemap/utils/enum.d.ts +5 -1
- package/src/treemap/utils/helper.js +1 -1
|
@@ -1343,7 +1343,7 @@ function removeClassNames(elements, type, treemap) {
|
|
|
1343
1343
|
for (var j = 0; j < elements.length; j++) {
|
|
1344
1344
|
element = isNullOrUndefined(elements[j].childNodes[0]) ? elements[j] :
|
|
1345
1345
|
elements[j].childNodes[0];
|
|
1346
|
-
options = treemap.layout.renderItems[element.id.split('
|
|
1346
|
+
options = treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])]['options'];
|
|
1347
1347
|
applyOptions(element, options);
|
|
1348
1348
|
elements[j].classList.remove(type);
|
|
1349
1349
|
j -= 1;
|
|
@@ -2529,7 +2529,7 @@ function getThemeStyle(theme) {
|
|
|
2529
2529
|
labelFontFamily: 'Helvetica Neue'
|
|
2530
2530
|
};
|
|
2531
2531
|
break;
|
|
2532
|
-
case '
|
|
2532
|
+
case 'fluent':
|
|
2533
2533
|
style = {
|
|
2534
2534
|
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
2535
2535
|
titleFontColor: '#201F1E',
|
|
@@ -2546,7 +2546,7 @@ function getThemeStyle(theme) {
|
|
|
2546
2546
|
labelFontFamily: 'Segoe UI'
|
|
2547
2547
|
};
|
|
2548
2548
|
break;
|
|
2549
|
-
case '
|
|
2549
|
+
case 'fluentdark':
|
|
2550
2550
|
style = {
|
|
2551
2551
|
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
2552
2552
|
titleFontColor: '#F3F2F1',
|
|
@@ -2797,8 +2797,8 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
2797
2797
|
var backgroundElement = exportElement.childNodes[0];
|
|
2798
2798
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
2799
2799
|
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
2800
|
-
if ((_this.control.theme === 'Tailwind' || _this.control.theme === 'TailwindDark' || _this.control.theme === 'Bootstrap5' || _this.control.theme === 'Bootstrap5Dark'
|
|
2801
|
-
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
2800
|
+
if ((_this.control.theme === 'Tailwind' || _this.control.theme === 'TailwindDark' || _this.control.theme === 'Bootstrap5' || _this.control.theme === 'Bootstrap5Dark'
|
|
2801
|
+
|| _this.control.theme === 'Fluent' || _this.control.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
2802
2802
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
2803
2803
|
}
|
|
2804
2804
|
}
|
|
@@ -3477,7 +3477,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3477
3477
|
this.trigger(click, clickArgs);
|
|
3478
3478
|
if (targetId.indexOf('_Item_Index') > -1) {
|
|
3479
3479
|
e.preventDefault();
|
|
3480
|
-
itemIndex = parseFloat(targetId.split('
|
|
3480
|
+
itemIndex = parseFloat(targetId.split('_Item_Index_')[1]);
|
|
3481
3481
|
eventArgs = {
|
|
3482
3482
|
cancel: false, name: itemClick, treemap: this, item: this.layout.renderItems[itemIndex], mouseEvent: e,
|
|
3483
3483
|
groupIndex: this.layout.renderItems[itemIndex]['groupIndex'], groupName: this.layout.renderItems[itemIndex]['name'],
|
|
@@ -3550,7 +3550,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3550
3550
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3551
3551
|
var childItems;
|
|
3552
3552
|
if (targetId.indexOf('_Item_Index') > -1) {
|
|
3553
|
-
item = this.layout.renderItems[parseFloat(targetId.split('
|
|
3553
|
+
item = this.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
|
|
3554
3554
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3555
3555
|
childItems = findChildren(item)['values'];
|
|
3556
3556
|
this.element.style.cursor = (!item['isLeafItem'] && childItems && childItems.length > 0 && this.enableDrillDown) ?
|
|
@@ -3678,7 +3678,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3678
3678
|
if (e.cancelable) {
|
|
3679
3679
|
e.preventDefault();
|
|
3680
3680
|
}
|
|
3681
|
-
index = parseFloat(targetId.split('
|
|
3681
|
+
index = parseFloat(targetId.split('_Item_Index_')[1]);
|
|
3682
3682
|
item = this.layout.renderItems[index];
|
|
3683
3683
|
var labelText = targetEle.innerHTML;
|
|
3684
3684
|
if (this.enableBreadcrumb) {
|
|
@@ -4890,7 +4890,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4890
4890
|
var stroke = void 0;
|
|
4891
4891
|
var strokeWidth = void 0;
|
|
4892
4892
|
var legendElement = void 0;
|
|
4893
|
-
targetItem = treemap.layout.renderItems[parseFloat(target.id.split('
|
|
4893
|
+
targetItem = treemap.layout.renderItems[parseFloat(target.id.split('_Item_Index_')[1])];
|
|
4894
4894
|
var svgRect = treemap.svgObject.getBoundingClientRect();
|
|
4895
4895
|
for (var i = 0; i < this.legendCollections.length; i++) {
|
|
4896
4896
|
currentData = this.legendCollections[i];
|
|
@@ -5164,14 +5164,14 @@ var TreeMapHighlight = /** @__PURE__ @class */ (function () {
|
|
|
5164
5164
|
if (this.highLightId !== targetId) {
|
|
5165
5165
|
treeMapElement = document.getElementById(treemap.element.id + '_TreeMap_' + treemap.layoutType + '_Layout');
|
|
5166
5166
|
var selectionElements = document.getElementsByClassName('treeMapSelection');
|
|
5167
|
-
item = this.treemap.layout.renderItems[parseFloat(targetId.split('
|
|
5167
|
+
item = this.treemap.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
|
|
5168
5168
|
var index = void 0;
|
|
5169
5169
|
if (this.treemap.legendSettings.visible) {
|
|
5170
5170
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5171
5171
|
var collection = this.treemap.treeMapLegendModule.legendCollections;
|
|
5172
5172
|
var length_1 = this.treemap.treeMapLegendModule.legendCollections.length;
|
|
5173
5173
|
index = getLegendIndex(length_1, item, treemap);
|
|
5174
|
-
this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById('
|
|
5174
|
+
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);
|
|
5175
5175
|
if (this.shapeElement !== null && (selectionModule ? this.shapeElement.getAttribute('id') !== selectionModule.legendSelectId : true)) {
|
|
5176
5176
|
if (selectionModule ? this.shapeElement !== selectionModule.shapeElement : true) {
|
|
5177
5177
|
this.currentElement.push({ currentElement: this.shapeElement });
|
|
@@ -5199,7 +5199,7 @@ var TreeMapHighlight = /** @__PURE__ @class */ (function () {
|
|
|
5199
5199
|
for (var i = 0; i < treeMapElement.childElementCount; i++) {
|
|
5200
5200
|
element = treeMapElement.childNodes[i];
|
|
5201
5201
|
process = true;
|
|
5202
|
-
item = treemap.layout.renderItems[element.id.split('
|
|
5202
|
+
item = treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])];
|
|
5203
5203
|
for (var j = 0; j < selectionElements.length; j++) {
|
|
5204
5204
|
if (element.id === selectionElements[j].id) {
|
|
5205
5205
|
process = false;
|
|
@@ -5237,7 +5237,7 @@ var TreeMapHighlight = /** @__PURE__ @class */ (function () {
|
|
|
5237
5237
|
removeLegend(this.legendHighlightCollection, 'highlight');
|
|
5238
5238
|
}
|
|
5239
5239
|
this.shapeTarget = 'highlight';
|
|
5240
|
-
var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('
|
|
5240
|
+
var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('_Legend_Shape_Index_')[1]) : parseFloat(targetId.split('_Legend_Index_')[1]);
|
|
5241
5241
|
var dataLength = this.treemap.treeMapLegendModule.legendCollections[index]['legendData'].length;
|
|
5242
5242
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5243
5243
|
var collection = this.treemap.treeMapLegendModule.legendCollections;
|
|
@@ -5247,7 +5247,7 @@ var TreeMapHighlight = /** @__PURE__ @class */ (function () {
|
|
|
5247
5247
|
if (this.treemap.treeMapLegendModule.legendCollections[index]['legendData'][i]['levelOrderName'] === this.treemap.layout.renderItems[j]['levelOrderName']) {
|
|
5248
5248
|
itemIndex = j;
|
|
5249
5249
|
groupIndex = this.treemap.layout.renderItems[j]['groupIndex'];
|
|
5250
|
-
var nodeEle = document.getElementById('
|
|
5250
|
+
var nodeEle = document.getElementById(this.treemap.element.id + '_Level_Index_' + groupIndex + '_Item_Index_' + itemIndex + '_RectPath');
|
|
5251
5251
|
if (i === 0) {
|
|
5252
5252
|
this.legendHighlightCollection = [];
|
|
5253
5253
|
pushCollection(this.legendHighlightCollection, legendIndex, j, targetEle, nodeEle, this.treemap.layout.renderItems, collection);
|
|
@@ -5369,7 +5369,7 @@ var TreeMapSelection = /** @__PURE__ @class */ (function () {
|
|
|
5369
5369
|
e.preventDefault();
|
|
5370
5370
|
if (this.treemap.selectionId !== targetId && this.legendSelect) {
|
|
5371
5371
|
treeMapElement = document.getElementById(layoutID);
|
|
5372
|
-
item = treemap.layout.renderItems[parseFloat(targetId.split('
|
|
5372
|
+
item = treemap.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
|
|
5373
5373
|
var index = void 0;
|
|
5374
5374
|
if (this.treemap.legendSettings.visible) {
|
|
5375
5375
|
this.shapeSelect = false;
|
|
@@ -5383,7 +5383,7 @@ var TreeMapSelection = /** @__PURE__ @class */ (function () {
|
|
|
5383
5383
|
highlightModule.shapeHighlightCollection = [];
|
|
5384
5384
|
}
|
|
5385
5385
|
index = getLegendIndex(length_3, item, treemap);
|
|
5386
|
-
this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById('
|
|
5386
|
+
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);
|
|
5387
5387
|
if (this.shapeElement !== null) {
|
|
5388
5388
|
this.shapeSelectId = this.shapeElement.getAttribute('id');
|
|
5389
5389
|
this.shapeSelectionCollection.push({ legendEle: this.shapeElement, oldFill: collection[index]['legendFill'],
|
|
@@ -5396,7 +5396,7 @@ var TreeMapSelection = /** @__PURE__ @class */ (function () {
|
|
|
5396
5396
|
orders = findHightLightItems(item, [], selection.mode, treemap);
|
|
5397
5397
|
for (var i = 0; i < treeMapElement.childElementCount; i++) {
|
|
5398
5398
|
element = treeMapElement.childNodes[i];
|
|
5399
|
-
item = treemap.layout.renderItems[element.id.split('
|
|
5399
|
+
item = treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])];
|
|
5400
5400
|
if (orders.indexOf(item['levelOrderName']) > -1) {
|
|
5401
5401
|
selectionElements.push(element);
|
|
5402
5402
|
treemap.levelSelection.push(element.id);
|
|
@@ -5456,14 +5456,14 @@ var TreeMapSelection = /** @__PURE__ @class */ (function () {
|
|
|
5456
5456
|
if (highlightModule) {
|
|
5457
5457
|
highlightModule.shapeTarget = 'selection';
|
|
5458
5458
|
}
|
|
5459
|
-
var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('
|
|
5459
|
+
var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('_Legend_Shape_Index_')[1]) : parseFloat(targetId.split('_Legend_Index_')[1]);
|
|
5460
5460
|
var dataLength = this.treemap.treeMapLegendModule.legendCollections[index]['legendData'].length;
|
|
5461
5461
|
for (var k = 0; k < dataLength; k++) {
|
|
5462
5462
|
for (var l = 0; l < this.treemap.layout.renderItems.length; l++) {
|
|
5463
5463
|
if (this.treemap.treeMapLegendModule.legendCollections[index]['legendData'][k]['levelOrderName'] === this.treemap.layout.renderItems[l]['levelOrderName']) {
|
|
5464
5464
|
itemIndex = l;
|
|
5465
5465
|
groupIndex = this.treemap.layout.renderItems[l]['groupIndex'];
|
|
5466
|
-
var nodeEle = document.getElementById('
|
|
5466
|
+
var nodeEle = document.getElementById(this.treemap.element.id + '_Level_Index_' + groupIndex + '_Item_Index_' + itemIndex + '_RectPath');
|
|
5467
5467
|
if (k === 0) {
|
|
5468
5468
|
pushCollection(this.legendSelectionCollection, legendIndex, l, targetEle_1, nodeEle, this.treemap.layout.renderItems, collection);
|
|
5469
5469
|
length_4 = this.legendSelectionCollection.length;
|
|
@@ -5515,7 +5515,7 @@ var TreeMapSelection = /** @__PURE__ @class */ (function () {
|
|
|
5515
5515
|
var orders = findHightLightItems(item, [], selection.mode, this.treemap);
|
|
5516
5516
|
for (var i = 0; i < treeMapElement.childElementCount; i++) {
|
|
5517
5517
|
element = treeMapElement.childNodes[i];
|
|
5518
|
-
item = this.treemap.layout.renderItems[element.id.split('
|
|
5518
|
+
item = this.treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])];
|
|
5519
5519
|
if (orders.indexOf(item['levelOrderName']) > -1) {
|
|
5520
5520
|
selectionElements.push(element);
|
|
5521
5521
|
this.treemap.levelSelection.push(element.id);
|
|
@@ -5531,7 +5531,7 @@ var TreeMapSelection = /** @__PURE__ @class */ (function () {
|
|
|
5531
5531
|
this.shapeElement = undefined;
|
|
5532
5532
|
removeShape(this.shapeSelectionCollection, 'selection');
|
|
5533
5533
|
index = getLegendIndex(length_5, items[m], this.treemap);
|
|
5534
|
-
this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById('
|
|
5534
|
+
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);
|
|
5535
5535
|
if (this.shapeElement !== null) {
|
|
5536
5536
|
this.shapeSelectId = this.shapeElement.getAttribute('id');
|
|
5537
5537
|
this.treemap.legendId.push(this.shapeSelectId);
|
|
@@ -5674,7 +5674,7 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
5674
5674
|
var tooltipContent = [];
|
|
5675
5675
|
var markerFill;
|
|
5676
5676
|
if (targetId.indexOf('_Item_Index') > -1) {
|
|
5677
|
-
item = this.treemap.layout.renderItems[parseFloat(targetId.split('
|
|
5677
|
+
item = this.treemap.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
|
|
5678
5678
|
if (!isNullOrUndefined(item)) {
|
|
5679
5679
|
toolTipHeader = item['name'];
|
|
5680
5680
|
value = item['weight'];
|
|
@@ -5754,6 +5754,10 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
5754
5754
|
textStyle: args['textStyle'],
|
|
5755
5755
|
fill: this.treemap.tooltipSettings.fill ? this.treemap.tooltipSettings.fill : this.treemap.themeStyle.tooltipFillColor
|
|
5756
5756
|
});
|
|
5757
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5758
|
+
if (this.treemap.isVue || this.treemap.isVue3) {
|
|
5759
|
+
this.svgTooltip.controlInstance = this.treemap;
|
|
5760
|
+
}
|
|
5757
5761
|
this.svgTooltip.opacity = this.treemap.themeStyle.tooltipFillOpacity || this.svgTooltip.opacity;
|
|
5758
5762
|
this.svgTooltip.appendTo(tooltipEle);
|
|
5759
5763
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|