@syncfusion/ej2-treemap 23.2.4 → 24.2.3
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/README.md +1 -1
- package/dist/ej2-treemap.min.js +2 -2
- 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 +23 -25
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +23 -25
- 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 +12 -12
- package/src/treemap/layout/legend.js +5 -3
- package/src/treemap/layout/render-panel.js +1 -1
- package/src/treemap/model/base.js +3 -3
- package/src/treemap/treemap-model.d.ts +1 -1
- package/src/treemap/treemap.d.ts +1 -1
- package/src/treemap/treemap.js +7 -10
- package/src/treemap/user-interaction/tooltip.js +8 -7
- package/src/treemap/utils/helper.js +0 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 24.2.3
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. 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@
|
|
3
|
+
"_id": "@syncfusion/ej2-treemap@24.1.41",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-5Xfl6U2LzgkU42iS4zd0axbamZ8NZRMGbv93CRVxc9frRMsfY/oMoafQzGbUQHanw8yfjlJcwjMo/2EfjAc7gw==",
|
|
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": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treemap/-/ej2-treemap-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treemap/-/ej2-treemap-24.1.41.tgz",
|
|
27
|
+
"_shasum": "9a11f76035bf287941f69b3f4f0875241beff02e",
|
|
28
28
|
"_spec": "@syncfusion/ej2-treemap@*",
|
|
29
|
-
"_where": "/jenkins/workspace/elease-
|
|
29
|
+
"_where": "/jenkins/workspace/elease-automation_release_24.1.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": "~
|
|
39
|
-
"@syncfusion/ej2-compression": "~
|
|
40
|
-
"@syncfusion/ej2-data": "~
|
|
41
|
-
"@syncfusion/ej2-file-utils": "~
|
|
42
|
-
"@syncfusion/ej2-pdf-export": "~
|
|
43
|
-
"@syncfusion/ej2-svg-base": "~
|
|
38
|
+
"@syncfusion/ej2-base": "~24.2.3",
|
|
39
|
+
"@syncfusion/ej2-compression": "~24.2.3",
|
|
40
|
+
"@syncfusion/ej2-data": "~24.2.3",
|
|
41
|
+
"@syncfusion/ej2-file-utils": "~24.2.3",
|
|
42
|
+
"@syncfusion/ej2-pdf-export": "~24.2.3",
|
|
43
|
+
"@syncfusion/ej2-svg-base": "~24.2.3"
|
|
44
44
|
},
|
|
45
45
|
"deprecated": false,
|
|
46
46
|
"description": "Essential JS 2 TreeMap Components",
|
|
@@ -81,6 +81,6 @@
|
|
|
81
81
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
82
82
|
},
|
|
83
83
|
"typings": "index.d.ts",
|
|
84
|
-
"version": "
|
|
84
|
+
"version": "24.2.3",
|
|
85
85
|
"sideEffects": false
|
|
86
86
|
}
|
|
@@ -97,9 +97,9 @@ var TreeMapLegend = /** @class */ (function () {
|
|
|
97
97
|
* parseFloat(legend.width) : parseFloat(legend.width) : null;
|
|
98
98
|
var legendHeight = (legend.height.length > 1) ? (legend.height.indexOf('%') > -1) ?
|
|
99
99
|
(treemap.availableSize.height / 100) * parseFloat(legend.height) : parseFloat(legend.height) : null;
|
|
100
|
-
titleTextStyle.fontFamily =
|
|
100
|
+
titleTextStyle.fontFamily = titleTextStyle.fontFamily || treemap.themeStyle.fontFamily;
|
|
101
101
|
titleTextStyle.fontWeight = titleTextStyle.fontWeight || treemap.themeStyle.titleFontWeight;
|
|
102
|
-
titleTextStyle.size = treemap.themeStyle.legendFontSize
|
|
102
|
+
titleTextStyle.size = titleTextStyle.size || treemap.themeStyle.legendFontSize;
|
|
103
103
|
var legendTitleSize = measureText(legendTitle, titleTextStyle);
|
|
104
104
|
var startX_1 = 0;
|
|
105
105
|
var startY_1 = 0;
|
|
@@ -642,8 +642,10 @@ var TreeMapLegend = /** @class */ (function () {
|
|
|
642
642
|
var _loop_1 = function (i) {
|
|
643
643
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
644
644
|
var collection = this_1.totalPages[page]['Collection'][i];
|
|
645
|
-
var legendElement = render.createGroup({ id: treemap.element.id + '_Legend_Index_' + i });
|
|
646
645
|
var legendText = collection['DisplayText'];
|
|
646
|
+
var legendElement = render.createGroup({ id: treemap.element.id + '_Legend_Index_' + i });
|
|
647
|
+
legendElement.setAttribute('aria-label', legendText + ' Legend');
|
|
648
|
+
legendElement.setAttribute('role', 'region');
|
|
647
649
|
var shapeId = treemap.element.id + '_Legend_Shape_Index_' + i;
|
|
648
650
|
var textId = treemap.element.id + '_Legend_Text_Index_' + i;
|
|
649
651
|
var shapeLocation = collection['Shape'];
|
|
@@ -552,7 +552,7 @@ var LayoutPanel = /** @class */ (function () {
|
|
|
552
552
|
itemGroup.setAttribute('aria-label', item['name']);
|
|
553
553
|
if ((_this.treemap.enableDrillDown && isLeafItem) || (_this.treemap.selectionSettings.enable || _this.treemap.highlightSettings.enable)) {
|
|
554
554
|
itemGroup.setAttribute('role', 'button');
|
|
555
|
-
itemGroup.setAttribute('tabindex',
|
|
555
|
+
itemGroup.setAttribute('tabindex', _this.treemap.tabIndex.toString());
|
|
556
556
|
itemGroup.style.cursor = _this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && (_this.treemap.enableDrillDown && item['groupIndex'] == (_this.treemap.levels.length - 1)) ? 'default' :
|
|
557
557
|
_this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && !_this.treemap.enableDrillDown ? 'default' : 'pointer';
|
|
558
558
|
}
|
|
@@ -207,7 +207,7 @@ var LegendSettings = /** @class */ (function (_super) {
|
|
|
207
207
|
Property('')
|
|
208
208
|
], LegendSettings.prototype, "height", void 0);
|
|
209
209
|
__decorate([
|
|
210
|
-
Complex({ size:
|
|
210
|
+
Complex({ size: null, fontFamily: null, fontWeight: null }, Font)
|
|
211
211
|
], LegendSettings.prototype, "textStyle", void 0);
|
|
212
212
|
__decorate([
|
|
213
213
|
Property(null)
|
|
@@ -237,7 +237,7 @@ var LegendSettings = /** @class */ (function (_super) {
|
|
|
237
237
|
Complex({}, CommonTitleSettings)
|
|
238
238
|
], LegendSettings.prototype, "title", void 0);
|
|
239
239
|
__decorate([
|
|
240
|
-
Complex({ size:
|
|
240
|
+
Complex({ size: null, fontFamily: null, fontWeight: null }, Font)
|
|
241
241
|
], LegendSettings.prototype, "titleStyle", void 0);
|
|
242
242
|
__decorate([
|
|
243
243
|
Property('Bottom')
|
|
@@ -375,7 +375,7 @@ var TooltipSettings = /** @class */ (function (_super) {
|
|
|
375
375
|
Complex({}, Border)
|
|
376
376
|
], TooltipSettings.prototype, "border", void 0);
|
|
377
377
|
__decorate([
|
|
378
|
-
Complex({ fontFamily:
|
|
378
|
+
Complex({ fontFamily: null, size: null, fontWeight: null }, Font)
|
|
379
379
|
], TooltipSettings.prototype, "textStyle", void 0);
|
|
380
380
|
return TooltipSettings;
|
|
381
381
|
}(ChildProperty));
|
package/src/treemap/treemap.d.ts
CHANGED
package/src/treemap/treemap.js
CHANGED
|
@@ -257,7 +257,7 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
257
257
|
var element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
|
|
258
258
|
element.setAttribute('aria-label', title.description || title.text);
|
|
259
259
|
element.setAttribute('role', '');
|
|
260
|
-
element.setAttribute('tabindex',
|
|
260
|
+
element.setAttribute('tabindex', this.tabIndex.toString());
|
|
261
261
|
if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
|
|
262
262
|
height = (this.availableSize.height - titleBounds.y - titlePadding - this.margin.bottom);
|
|
263
263
|
this.areaRect = new Rect(this.margin.left, titleBounds.y + titlePadding, width, height);
|
|
@@ -634,14 +634,8 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
634
634
|
*/
|
|
635
635
|
TreeMap.prototype.addTabIndex = function () {
|
|
636
636
|
this.element.setAttribute('aria-label', this.description || 'TreeMap Element');
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
this.element.setAttribute('tabindex', this.tabIndex.toString());
|
|
640
|
-
this.element.style.cursor = this.highlightSettings.enable && !this.selectionSettings.enable && !this.enableDrillDown ? 'default' : 'pointer';
|
|
641
|
-
}
|
|
642
|
-
else {
|
|
643
|
-
this.element.setAttribute('role', 'region');
|
|
644
|
-
}
|
|
637
|
+
this.element.setAttribute('role', 'region');
|
|
638
|
+
this.element.setAttribute('tabindex', this.tabIndex.toString());
|
|
645
639
|
};
|
|
646
640
|
/**
|
|
647
641
|
* This method handles the window resize event on treemap.
|
|
@@ -787,6 +781,9 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
787
781
|
eventArgs = { cancel: false, name: itemMove, treemap: this, item: item, mouseEvent: e };
|
|
788
782
|
this.trigger(itemMove, eventArgs);
|
|
789
783
|
}
|
|
784
|
+
else {
|
|
785
|
+
this.element.style.cursor = 'default';
|
|
786
|
+
}
|
|
790
787
|
this.notify(Browser.touchMoveEvent, e);
|
|
791
788
|
};
|
|
792
789
|
/**
|
|
@@ -1301,7 +1298,7 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
1301
1298
|
Property(null)
|
|
1302
1299
|
], TreeMap.prototype, "description", void 0);
|
|
1303
1300
|
__decorate([
|
|
1304
|
-
Property(
|
|
1301
|
+
Property(0)
|
|
1305
1302
|
], TreeMap.prototype, "tabIndex", void 0);
|
|
1306
1303
|
__decorate([
|
|
1307
1304
|
Property(null)
|
|
@@ -8,7 +8,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
8
8
|
return t;
|
|
9
9
|
};
|
|
10
10
|
import { Tooltip } from '@syncfusion/ej2-svg-base';
|
|
11
|
-
import { Browser, createElement, isNullOrUndefined
|
|
11
|
+
import { Browser, createElement, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
12
12
|
import { getMousePosition, textFormatter, formatValue } from '../utils/helper';
|
|
13
13
|
import { tooltipRendering } from '../model/constants';
|
|
14
14
|
/**
|
|
@@ -60,12 +60,12 @@ var TreeMapTooltip = /** @class */ (function () {
|
|
|
60
60
|
markerFill = item['options']['fill'];
|
|
61
61
|
}
|
|
62
62
|
if (this.treemap.enableRtl) {
|
|
63
|
-
tooltipContent = [
|
|
64
|
-
|
|
63
|
+
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ? textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
|
|
64
|
+
|| formatValue(value, this.treemap) + ' : ' + this.treemap.weightValuePath.toString()];
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
67
|
-
tooltipContent = [
|
|
68
|
-
|
|
67
|
+
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ? textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
|
|
68
|
+
|| this.treemap.weightValuePath.toString() + ' : ' + formatValue(value, this.treemap)];
|
|
69
69
|
}
|
|
70
70
|
if (document.getElementById(this.tooltipId)) {
|
|
71
71
|
tooltipEle = document.getElementById(this.tooltipId);
|
|
@@ -81,7 +81,7 @@ var TreeMapTooltip = /** @class */ (function () {
|
|
|
81
81
|
location = getMousePosition(pageX, pageY, this.treemap.svgObject);
|
|
82
82
|
location.y = (this.tooltipSettings.template) ? location.y + 10 : location.y;
|
|
83
83
|
this.tooltipSettings.textStyle.size = this.tooltipSettings.textStyle.size || this.treemap.themeStyle.tooltipFontSize;
|
|
84
|
-
this.tooltipSettings.textStyle.fontFamily = this.treemap.themeStyle.fontFamily;
|
|
84
|
+
this.tooltipSettings.textStyle.fontFamily = this.tooltipSettings.textStyle.fontFamily || this.treemap.themeStyle.fontFamily;
|
|
85
85
|
this.tooltipSettings.textStyle.fontStyle = !isNullOrUndefined(this.tooltipSettings.textStyle.fontStyle) ? this.tooltipSettings.textStyle.fontStyle : 'Normal';
|
|
86
86
|
this.tooltipSettings.textStyle.fontWeight = this.tooltipSettings.textStyle.fontWeight || this.treemap.themeStyle.fontWeight;
|
|
87
87
|
this.tooltipSettings.textStyle.color = this.treemap.themeStyle.tooltipFontColor
|
|
@@ -136,7 +136,8 @@ var TreeMapTooltip = /** @class */ (function () {
|
|
|
136
136
|
palette: [markerFill],
|
|
137
137
|
areaBounds: this.treemap.areaRect,
|
|
138
138
|
textStyle: args['textStyle'],
|
|
139
|
-
fill: this.treemap.tooltipSettings.fill ? this.treemap.tooltipSettings.fill : this.treemap.themeStyle.tooltipFillColor
|
|
139
|
+
fill: this.treemap.tooltipSettings.fill ? this.treemap.tooltipSettings.fill : this.treemap.themeStyle.tooltipFillColor,
|
|
140
|
+
enableShadow: true
|
|
140
141
|
});
|
|
141
142
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
142
143
|
if (this.treemap.isVue || this.treemap.isVue3) {
|
|
@@ -1060,8 +1060,6 @@ export function drawSymbol(location, shape, size, url, options, label) {
|
|
|
1060
1060
|
var svgRenderer = new SvgRenderer('');
|
|
1061
1061
|
var temp = renderLegendShape(location, size, shape, options, url);
|
|
1062
1062
|
var htmlElement = svgRenderer['draw' + temp.functionName](temp.renderOption);
|
|
1063
|
-
htmlElement.setAttribute('aria-label', label);
|
|
1064
|
-
htmlElement.setAttribute('role', 'region');
|
|
1065
1063
|
return htmlElement;
|
|
1066
1064
|
}
|
|
1067
1065
|
/**
|