@syncfusion/ej2-treemap 25.1.35 → 25.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/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 +29 -14
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +27 -12
- 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.d.ts +11 -1
- package/src/treemap/layout/legend.js +14 -5
- package/src/treemap/layout/render-panel.js +3 -2
- package/src/treemap/model/interface.d.ts +3 -0
- package/src/treemap/model/print.js +1 -0
- package/src/treemap/treemap.d.ts +4 -0
- package/src/treemap/treemap.js +2 -1
- package/src/treemap/user-interaction/tooltip.d.ts +2 -0
- package/src/treemap/user-interaction/tooltip.js +6 -2
- package/src/treemap/utils/enum.d.ts +1 -0
- package/src/treemap/utils/helper.d.ts +1 -2
- package/src/treemap/utils/helper.js +1 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 25.
|
|
3
|
+
* version : 25.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@25.1.35",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-cammG0kT1v7yX5m5icGgKH+Yhn3EXEVozjdClFSsJOR1cLIx5ZpjmYLxoZNvyhT5OPRhFDlZ3I8lzSResAiozg==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-treemap",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-treemap",
|
|
24
24
|
"/@syncfusion/ej2-vue-treemap"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-treemap/-/ej2-treemap-25.1.35.tgz",
|
|
27
|
+
"_shasum": "d8aabc67b6bdfe95e29aea829c2dc717d94cc544",
|
|
28
28
|
"_spec": "@syncfusion/ej2-treemap@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~25.
|
|
39
|
-
"@syncfusion/ej2-compression": "~25.
|
|
40
|
-
"@syncfusion/ej2-data": "~25.
|
|
41
|
-
"@syncfusion/ej2-file-utils": "~25.
|
|
42
|
-
"@syncfusion/ej2-pdf-export": "~25.
|
|
43
|
-
"@syncfusion/ej2-svg-base": "~25.
|
|
38
|
+
"@syncfusion/ej2-base": "~25.2.3",
|
|
39
|
+
"@syncfusion/ej2-compression": "~25.2.3",
|
|
40
|
+
"@syncfusion/ej2-data": "~25.2.3",
|
|
41
|
+
"@syncfusion/ej2-file-utils": "~25.2.3",
|
|
42
|
+
"@syncfusion/ej2-pdf-export": "~25.2.3",
|
|
43
|
+
"@syncfusion/ej2-svg-base": "~25.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": "25.
|
|
84
|
+
"version": "25.2.3",
|
|
85
85
|
"sideEffects": false
|
|
86
86
|
}
|
|
@@ -39,6 +39,8 @@ export declare class TreeMapLegend {
|
|
|
39
39
|
constructor(treemap: TreeMap);
|
|
40
40
|
/**
|
|
41
41
|
* method for legend
|
|
42
|
+
*
|
|
43
|
+
* @returns {void}
|
|
42
44
|
* @private
|
|
43
45
|
*/
|
|
44
46
|
renderLegend(): void;
|
|
@@ -52,6 +54,7 @@ export declare class TreeMapLegend {
|
|
|
52
54
|
private isAddNewLegendData;
|
|
53
55
|
/**
|
|
54
56
|
* To draw the legend
|
|
57
|
+
*
|
|
55
58
|
* @private
|
|
56
59
|
*/
|
|
57
60
|
drawLegend(): void;
|
|
@@ -69,10 +72,15 @@ export declare class TreeMapLegend {
|
|
|
69
72
|
renderInteractivePointer(e: PointerEvent | TouchEvent): void;
|
|
70
73
|
private drawInteractivePointer;
|
|
71
74
|
private getLegendAlignment;
|
|
72
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* @param {PointerEvent} e - Specifies the event.
|
|
77
|
+
* @returns {void}
|
|
78
|
+
* @private
|
|
79
|
+
*/
|
|
73
80
|
mouseUpHandler(e: PointerEvent): void;
|
|
74
81
|
/**
|
|
75
82
|
* To remove the interactive pointer
|
|
83
|
+
*
|
|
76
84
|
* @private
|
|
77
85
|
*/
|
|
78
86
|
removeInteractivePointer(): void;
|
|
@@ -94,11 +102,13 @@ export declare class TreeMapLegend {
|
|
|
94
102
|
wireEvents(element: Element): void;
|
|
95
103
|
/**
|
|
96
104
|
* To add the event listener
|
|
105
|
+
*
|
|
97
106
|
* @private
|
|
98
107
|
*/
|
|
99
108
|
addEventListener(): void;
|
|
100
109
|
/**
|
|
101
110
|
* To remove the event listener
|
|
111
|
+
*
|
|
102
112
|
* @private
|
|
103
113
|
*/
|
|
104
114
|
removeEventListener(): void;
|
|
@@ -21,9 +21,10 @@ var TreeMapLegend = /** @class */ (function () {
|
|
|
21
21
|
this.treemap = treemap;
|
|
22
22
|
this.addEventListener();
|
|
23
23
|
}
|
|
24
|
-
// eslint-disable-next-line valid-jsdoc
|
|
25
24
|
/**
|
|
26
25
|
* method for legend
|
|
26
|
+
*
|
|
27
|
+
* @returns {void}
|
|
27
28
|
* @private
|
|
28
29
|
*/
|
|
29
30
|
TreeMapLegend.prototype.renderLegend = function () {
|
|
@@ -549,6 +550,7 @@ var TreeMapLegend = /** @class */ (function () {
|
|
|
549
550
|
// eslint-disable-next-line valid-jsdoc
|
|
550
551
|
/**
|
|
551
552
|
* To draw the legend
|
|
553
|
+
*
|
|
552
554
|
* @private
|
|
553
555
|
*/
|
|
554
556
|
TreeMapLegend.prototype.drawLegend = function () {
|
|
@@ -661,7 +663,7 @@ var TreeMapLegend = /** @class */ (function () {
|
|
|
661
663
|
};
|
|
662
664
|
treemap.trigger(legendItemRendering, eventArgs, function (observedArgs) {
|
|
663
665
|
var renderOptions = new PathOption(shapeId, observedArgs.fill, strokeWidth_1, isLineShape_1 ? collection['Fill'] : strokeColor_1, legend.opacity, '');
|
|
664
|
-
legendElement.appendChild(drawSymbol(shapeLocation, observedArgs.shape, shapeSize, observedArgs.imageUrl, renderOptions
|
|
666
|
+
legendElement.appendChild(drawSymbol(shapeLocation, observedArgs.shape, shapeSize, observedArgs.imageUrl, renderOptions));
|
|
665
667
|
textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'start', legendText, '', '');
|
|
666
668
|
renderTextElement(textOptions, legend.textStyle, legend.textStyle.color || treemap.themeStyle.legendTextColor, legendElement);
|
|
667
669
|
_this.legendGroup.appendChild(legendElement);
|
|
@@ -754,7 +756,8 @@ var TreeMapLegend = /** @class */ (function () {
|
|
|
754
756
|
var textSize = measureText(trimTitle, textStyle);
|
|
755
757
|
if (legendTitle) {
|
|
756
758
|
textOptions = new TextOption(this.treemap.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - (spacing / 2), 'middle', trimTitle, '');
|
|
757
|
-
var textElement = renderTextElement(textOptions, textStyle, textStyle.color ||
|
|
759
|
+
var textElement = renderTextElement(textOptions, textStyle, textStyle.color ||
|
|
760
|
+
this.treemap.themeStyle.legendTitleColor, this.legendGroup);
|
|
758
761
|
textElement.setAttribute('role', 'region');
|
|
759
762
|
textElement.setAttribute('aria-label', legendTitle);
|
|
760
763
|
}
|
|
@@ -906,8 +909,11 @@ var TreeMapLegend = /** @class */ (function () {
|
|
|
906
909
|
this.translate = new Location(x, y);
|
|
907
910
|
}
|
|
908
911
|
};
|
|
909
|
-
|
|
910
|
-
|
|
912
|
+
/**
|
|
913
|
+
* @param {PointerEvent} e - Specifies the event.
|
|
914
|
+
* @returns {void}
|
|
915
|
+
* @private
|
|
916
|
+
*/
|
|
911
917
|
TreeMapLegend.prototype.mouseUpHandler = function (e) {
|
|
912
918
|
this.renderInteractivePointer(e);
|
|
913
919
|
clearTimeout(this.clearTimeout);
|
|
@@ -916,6 +922,7 @@ var TreeMapLegend = /** @class */ (function () {
|
|
|
916
922
|
// eslint-disable-next-line valid-jsdoc
|
|
917
923
|
/**
|
|
918
924
|
* To remove the interactive pointer
|
|
925
|
+
*
|
|
919
926
|
* @private
|
|
920
927
|
*/
|
|
921
928
|
TreeMapLegend.prototype.removeInteractivePointer = function () {
|
|
@@ -954,6 +961,7 @@ var TreeMapLegend = /** @class */ (function () {
|
|
|
954
961
|
// eslint-disable-next-line valid-jsdoc
|
|
955
962
|
/**
|
|
956
963
|
* To add the event listener
|
|
964
|
+
*
|
|
957
965
|
* @private
|
|
958
966
|
*/
|
|
959
967
|
TreeMapLegend.prototype.addEventListener = function () {
|
|
@@ -966,6 +974,7 @@ var TreeMapLegend = /** @class */ (function () {
|
|
|
966
974
|
// eslint-disable-next-line valid-jsdoc
|
|
967
975
|
/**
|
|
968
976
|
* To remove the event listener
|
|
977
|
+
*
|
|
969
978
|
* @private
|
|
970
979
|
*/
|
|
971
980
|
TreeMapLegend.prototype.removeEventListener = function () {
|
|
@@ -550,10 +550,11 @@ var LayoutPanel = /** @class */ (function () {
|
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
552
|
itemGroup.setAttribute('aria-label', item['name']);
|
|
553
|
-
if ((_this.treemap.enableDrillDown && isLeafItem) || (_this.treemap.selectionSettings.enable ||
|
|
553
|
+
if ((_this.treemap.enableDrillDown && isLeafItem) || (_this.treemap.selectionSettings.enable ||
|
|
554
|
+
_this.treemap.highlightSettings.enable)) {
|
|
554
555
|
itemGroup.setAttribute('role', 'button');
|
|
555
556
|
itemGroup.setAttribute('tabindex', _this.treemap.tabIndex.toString());
|
|
556
|
-
itemGroup.style.cursor = _this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && (_this.treemap.enableDrillDown && item['groupIndex']
|
|
557
|
+
itemGroup.style.cursor = _this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && (_this.treemap.enableDrillDown && item['groupIndex'] === (_this.treemap.levels.length - 1)) ? 'default' :
|
|
557
558
|
_this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && !_this.treemap.enableDrillDown ? 'default' : 'pointer';
|
|
558
559
|
}
|
|
559
560
|
else {
|
|
@@ -160,6 +160,7 @@ export interface IItemClickEventArgs extends ITreeMapEventArgs {
|
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
162
162
|
* Defines the event argument of the treemap item data.
|
|
163
|
+
*
|
|
163
164
|
* @private
|
|
164
165
|
*/
|
|
165
166
|
export interface IItemDataEventArgs {
|
|
@@ -349,6 +350,7 @@ export interface ITreeMapTooltipRenderEventArgs extends ITreeMapEventArgs {
|
|
|
349
350
|
}
|
|
350
351
|
/**
|
|
351
352
|
* Specifies the event arguments available for the tooltip events in the treemap.
|
|
353
|
+
*
|
|
352
354
|
* @private
|
|
353
355
|
*/
|
|
354
356
|
export interface ITreeMapTooltipArgs extends ITreeMapEventArgs {
|
|
@@ -454,6 +456,7 @@ export interface IShapes {
|
|
|
454
456
|
}
|
|
455
457
|
/**
|
|
456
458
|
* Defines the theme supported for treemap.
|
|
459
|
+
*
|
|
457
460
|
* @private
|
|
458
461
|
*/
|
|
459
462
|
export interface IThemeStyle {
|
|
@@ -61,6 +61,7 @@ var Print = /** @class */ (function () {
|
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
63
|
var exportElement = treeMap.element.cloneNode(true);
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
64
65
|
var backgroundElement = exportElement.getElementsByTagName('svg')[0];
|
|
65
66
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
66
67
|
backgroundElement = backgroundElement.childNodes[0];
|
package/src/treemap/treemap.d.ts
CHANGED
|
@@ -41,21 +41,25 @@ import { PdfExport } from './model/pdf-export';
|
|
|
41
41
|
export declare class TreeMap extends Component<HTMLElement> implements INotifyPropertyChanged {
|
|
42
42
|
/**
|
|
43
43
|
* Sets and gets the module that is used to add tooltip in the treemap.
|
|
44
|
+
*
|
|
44
45
|
* @private
|
|
45
46
|
*/
|
|
46
47
|
treeMapTooltipModule: TreeMapTooltip;
|
|
47
48
|
/**
|
|
48
49
|
* Sets and gets the module that is used to add highlight functionality in the treemap.
|
|
50
|
+
*
|
|
49
51
|
* @private
|
|
50
52
|
*/
|
|
51
53
|
treeMapHighlightModule: TreeMapHighlight;
|
|
52
54
|
/**
|
|
53
55
|
* Sets and gets the module that is used to add selection functionality in the treemap.
|
|
56
|
+
*
|
|
54
57
|
* @private
|
|
55
58
|
*/
|
|
56
59
|
treeMapSelectionModule: TreeMapSelection;
|
|
57
60
|
/**
|
|
58
61
|
* Sets and gets the module that is used to add legend in the treemap.
|
|
62
|
+
*
|
|
59
63
|
* @private
|
|
60
64
|
*/
|
|
61
65
|
treeMapLegendModule: TreeMapLegend;
|
package/src/treemap/treemap.js
CHANGED
|
@@ -127,8 +127,9 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
127
127
|
fetchApiModule.onSuccess = function (args) {
|
|
128
128
|
if (!isNullOrUndefined(args.type) && args.type === 'application/octet-stream') {
|
|
129
129
|
var reader_1 = new FileReader();
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
130
131
|
var treemap_1 = _this;
|
|
131
|
-
reader_1.onload = function (
|
|
132
|
+
reader_1.onload = function () {
|
|
132
133
|
args = JSON.parse(reader_1.result.toString());
|
|
133
134
|
treemap_1.dataSource = args;
|
|
134
135
|
treemap_1.renderTreeMapElements();
|
|
@@ -16,11 +16,13 @@ export declare class TreeMapTooltip {
|
|
|
16
16
|
removeTooltip(): void;
|
|
17
17
|
/**
|
|
18
18
|
* To bind events for tooltip module
|
|
19
|
+
*
|
|
19
20
|
* @private
|
|
20
21
|
*/
|
|
21
22
|
addEventListener(): void;
|
|
22
23
|
/**
|
|
23
24
|
* To unbind events for tooltip module
|
|
25
|
+
*
|
|
24
26
|
* @private
|
|
25
27
|
*/
|
|
26
28
|
removeEventListener(): void;
|
|
@@ -60,11 +60,13 @@ var TreeMapTooltip = /** @class */ (function () {
|
|
|
60
60
|
markerFill = item['options']['fill'];
|
|
61
61
|
}
|
|
62
62
|
if (this.treemap.enableRtl) {
|
|
63
|
-
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
|
|
63
|
+
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
|
|
64
|
+
textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
|
|
64
65
|
|| formatValue(value, this.treemap) + ' : ' + this.treemap.weightValuePath.toString()];
|
|
65
66
|
}
|
|
66
67
|
else {
|
|
67
|
-
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
|
|
68
|
+
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
|
|
69
|
+
textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
|
|
68
70
|
|| this.treemap.weightValuePath.toString() + ' : ' + formatValue(value, this.treemap)];
|
|
69
71
|
}
|
|
70
72
|
if (document.getElementById(this.tooltipId)) {
|
|
@@ -168,6 +170,7 @@ var TreeMapTooltip = /** @class */ (function () {
|
|
|
168
170
|
// eslint-disable-next-line valid-jsdoc
|
|
169
171
|
/**
|
|
170
172
|
* To bind events for tooltip module
|
|
173
|
+
*
|
|
171
174
|
* @private
|
|
172
175
|
*/
|
|
173
176
|
TreeMapTooltip.prototype.addEventListener = function () {
|
|
@@ -180,6 +183,7 @@ var TreeMapTooltip = /** @class */ (function () {
|
|
|
180
183
|
// eslint-disable-next-line valid-jsdoc
|
|
181
184
|
/**
|
|
182
185
|
* To unbind events for tooltip module
|
|
186
|
+
*
|
|
183
187
|
* @private
|
|
184
188
|
*/
|
|
185
189
|
TreeMapTooltip.prototype.removeEventListener = function () {
|
|
@@ -434,11 +434,10 @@ export declare function colorNameToHex(color: string): string;
|
|
|
434
434
|
* @param {Size} size - Specifies the size
|
|
435
435
|
* @param {string} url - Specifies the url
|
|
436
436
|
* @param {PathOption} options - Specifies the options
|
|
437
|
-
* @param {string} label - Specifies the label
|
|
438
437
|
* @returns {Element} - Returns the element
|
|
439
438
|
* @private
|
|
440
439
|
*/
|
|
441
|
-
export declare function drawSymbol(location: Location, shape: string, size: Size, url: string, options: PathOption
|
|
440
|
+
export declare function drawSymbol(location: Location, shape: string, size: Size, url: string, options: PathOption): Element;
|
|
442
441
|
/**
|
|
443
442
|
* @param {Location} location - Specifies the location
|
|
444
443
|
* @param {Size} size - Specifies the size
|
|
@@ -1052,11 +1052,10 @@ export function colorNameToHex(color) {
|
|
|
1052
1052
|
* @param {Size} size - Specifies the size
|
|
1053
1053
|
* @param {string} url - Specifies the url
|
|
1054
1054
|
* @param {PathOption} options - Specifies the options
|
|
1055
|
-
* @param {string} label - Specifies the label
|
|
1056
1055
|
* @returns {Element} - Returns the element
|
|
1057
1056
|
* @private
|
|
1058
1057
|
*/
|
|
1059
|
-
export function drawSymbol(location, shape, size, url, options
|
|
1058
|
+
export function drawSymbol(location, shape, size, url, options) {
|
|
1060
1059
|
var svgRenderer = new SvgRenderer('');
|
|
1061
1060
|
var temp = renderLegendShape(location, size, shape, options, url);
|
|
1062
1061
|
var htmlElement = svgRenderer['draw' + temp.functionName](temp.renderOption);
|