@syncfusion/ej2-treemap 30.1.37 → 30.2.4
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 +4 -0
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +4 -0
- 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 +17 -51
- package/src/treemap/treemap.d.ts +1 -0
- package/src/treemap/treemap.js +4 -0
- package/dist/ts/index.d.ts +0 -4
- package/dist/ts/index.ts +0 -4
- package/dist/ts/treemap/index.d.ts +0 -19
- package/dist/ts/treemap/index.ts +0 -19
- package/dist/ts/treemap/layout/legend.d.ts +0 -137
- package/dist/ts/treemap/layout/legend.ts +0 -1095
- package/dist/ts/treemap/layout/render-panel.d.ts +0 -47
- package/dist/ts/treemap/layout/render-panel.ts +0 -758
- package/dist/ts/treemap/model/base-model.d.ts +0 -795
- package/dist/ts/treemap/model/base.d.ts +0 -671
- package/dist/ts/treemap/model/base.ts +0 -798
- package/dist/ts/treemap/model/constants.d.ts +0 -117
- package/dist/ts/treemap/model/constants.ts +0 -118
- package/dist/ts/treemap/model/image-export.d.ts +0 -34
- package/dist/ts/treemap/model/image-export.ts +0 -117
- package/dist/ts/treemap/model/interface.d.ts +0 -555
- package/dist/ts/treemap/model/interface.ts +0 -583
- package/dist/ts/treemap/model/pdf-export.d.ts +0 -36
- package/dist/ts/treemap/model/pdf-export.ts +0 -105
- package/dist/ts/treemap/model/print.d.ts +0 -45
- package/dist/ts/treemap/model/print.ts +0 -106
- package/dist/ts/treemap/model/theme.d.ts +0 -19
- package/dist/ts/treemap/model/theme.ts +0 -450
- package/dist/ts/treemap/treemap-model.d.ts +0 -374
- package/dist/ts/treemap/treemap.d.ts +0 -724
- package/dist/ts/treemap/treemap.ts +0 -1817
- package/dist/ts/treemap/user-interaction/highlight-selection.d.ts +0 -118
- package/dist/ts/treemap/user-interaction/highlight-selection.ts +0 -799
- package/dist/ts/treemap/user-interaction/tooltip.d.ts +0 -42
- package/dist/ts/treemap/user-interaction/tooltip.ts +0 -228
- package/dist/ts/treemap/utils/enum.d.ts +0 -256
- package/dist/ts/treemap/utils/enum.ts +0 -263
- package/dist/ts/treemap/utils/helper.d.ts +0 -543
- package/dist/ts/treemap/utils/helper.ts +0 -1453
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TreeMap constants doc
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Triggers when the treemap is on load.
|
|
6
|
-
*
|
|
7
|
-
* @private
|
|
8
|
-
*/
|
|
9
|
-
export declare const load: string;
|
|
10
|
-
/**
|
|
11
|
-
* Triggers after treemap rendered.
|
|
12
|
-
*
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
export declare const loaded: string;
|
|
16
|
-
/**
|
|
17
|
-
* Trigger before call the print method.
|
|
18
|
-
*
|
|
19
|
-
* @private
|
|
20
|
-
*/
|
|
21
|
-
export declare const beforePrint: string;
|
|
22
|
-
/**
|
|
23
|
-
* Trigger before each treemap item rendered.
|
|
24
|
-
*
|
|
25
|
-
* @private
|
|
26
|
-
*/
|
|
27
|
-
export declare const itemRendering: string;
|
|
28
|
-
/**
|
|
29
|
-
* Trigger after click on treemap item.
|
|
30
|
-
*
|
|
31
|
-
* @private
|
|
32
|
-
*/
|
|
33
|
-
export declare const drillStart: string;
|
|
34
|
-
/**
|
|
35
|
-
* Trigger after drill start event completed.
|
|
36
|
-
*
|
|
37
|
-
* @private
|
|
38
|
-
*/
|
|
39
|
-
export declare const drillEnd: string;
|
|
40
|
-
/**
|
|
41
|
-
* Trigger after select the treemap item.
|
|
42
|
-
*
|
|
43
|
-
* @private
|
|
44
|
-
*/
|
|
45
|
-
export declare const itemSelected: string;
|
|
46
|
-
/**
|
|
47
|
-
* Trigger after hover on the treemap item.
|
|
48
|
-
*
|
|
49
|
-
* @private
|
|
50
|
-
*/
|
|
51
|
-
export declare const itemHighlight: string;
|
|
52
|
-
/**
|
|
53
|
-
* Trigger after mouse hover on the treemap item.
|
|
54
|
-
*
|
|
55
|
-
* @private
|
|
56
|
-
*/
|
|
57
|
-
export declare const tooltipRendering: string;
|
|
58
|
-
/**
|
|
59
|
-
* Trigger after click on the treemap item.
|
|
60
|
-
*
|
|
61
|
-
* @private
|
|
62
|
-
*/
|
|
63
|
-
export declare const itemClick: string;
|
|
64
|
-
/**
|
|
65
|
-
* Trigger after mouse hover on the treemap item.
|
|
66
|
-
*
|
|
67
|
-
* @private
|
|
68
|
-
*/
|
|
69
|
-
export declare const itemMove: string;
|
|
70
|
-
/**
|
|
71
|
-
* Trigger after click on the treemap item.
|
|
72
|
-
*
|
|
73
|
-
* @private
|
|
74
|
-
*/
|
|
75
|
-
export declare const click: string;
|
|
76
|
-
/**
|
|
77
|
-
* Trigger after double click on the treemap item.
|
|
78
|
-
*
|
|
79
|
-
* @private
|
|
80
|
-
*/
|
|
81
|
-
export declare const doubleClick: string;
|
|
82
|
-
/**
|
|
83
|
-
* Trigger after right click on the treemap item.
|
|
84
|
-
*
|
|
85
|
-
* @private
|
|
86
|
-
*/
|
|
87
|
-
export declare const rightClick: string;
|
|
88
|
-
/**
|
|
89
|
-
* Trigger after mouse hover on the treemap item.
|
|
90
|
-
*
|
|
91
|
-
* @private
|
|
92
|
-
*/
|
|
93
|
-
export declare const mouseMove: string;
|
|
94
|
-
/**
|
|
95
|
-
* Trigger before each treemap item.
|
|
96
|
-
*
|
|
97
|
-
* @private
|
|
98
|
-
*/
|
|
99
|
-
export declare const legendItemRendering: string;
|
|
100
|
-
/**
|
|
101
|
-
* Trigger before legend items.
|
|
102
|
-
*
|
|
103
|
-
* @private
|
|
104
|
-
*/
|
|
105
|
-
export declare const legendRendering: string;
|
|
106
|
-
/**
|
|
107
|
-
* Trigger after resize the treemap.
|
|
108
|
-
*
|
|
109
|
-
* @private
|
|
110
|
-
*/
|
|
111
|
-
export declare const resize: string;
|
|
112
|
-
/**
|
|
113
|
-
* Define the font family in treemap.
|
|
114
|
-
*
|
|
115
|
-
* @private
|
|
116
|
-
*/
|
|
117
|
-
export declare const defaultFont: string;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TreeMap constants doc
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Triggers when the treemap is on load.
|
|
7
|
-
*
|
|
8
|
-
* @private
|
|
9
|
-
*/
|
|
10
|
-
export const load: string = 'load';
|
|
11
|
-
/**
|
|
12
|
-
* Triggers after treemap rendered.
|
|
13
|
-
*
|
|
14
|
-
* @private
|
|
15
|
-
*/
|
|
16
|
-
export const loaded: string = 'loaded';
|
|
17
|
-
/**
|
|
18
|
-
* Trigger before call the print method.
|
|
19
|
-
*
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
export const beforePrint: string = 'beforePrint';
|
|
23
|
-
/**
|
|
24
|
-
* Trigger before each treemap item rendered.
|
|
25
|
-
*
|
|
26
|
-
* @private
|
|
27
|
-
*/
|
|
28
|
-
export const itemRendering: string = 'itemRendering';
|
|
29
|
-
/**
|
|
30
|
-
* Trigger after click on treemap item.
|
|
31
|
-
*
|
|
32
|
-
* @private
|
|
33
|
-
*/
|
|
34
|
-
export const drillStart: string = 'drillStart';
|
|
35
|
-
/**
|
|
36
|
-
* Trigger after drill start event completed.
|
|
37
|
-
*
|
|
38
|
-
* @private
|
|
39
|
-
*/
|
|
40
|
-
export const drillEnd: string = 'drillEnd';
|
|
41
|
-
/**
|
|
42
|
-
* Trigger after select the treemap item.
|
|
43
|
-
*
|
|
44
|
-
* @private
|
|
45
|
-
*/
|
|
46
|
-
export const itemSelected: string = 'itemSelected';
|
|
47
|
-
/**
|
|
48
|
-
* Trigger after hover on the treemap item.
|
|
49
|
-
*
|
|
50
|
-
* @private
|
|
51
|
-
*/
|
|
52
|
-
export const itemHighlight: string = 'itemHighlight';
|
|
53
|
-
/**
|
|
54
|
-
* Trigger after mouse hover on the treemap item.
|
|
55
|
-
*
|
|
56
|
-
* @private
|
|
57
|
-
*/
|
|
58
|
-
export const tooltipRendering: string = 'tooltipRendering';
|
|
59
|
-
/**
|
|
60
|
-
* Trigger after click on the treemap item.
|
|
61
|
-
*
|
|
62
|
-
* @private
|
|
63
|
-
*/
|
|
64
|
-
export const itemClick: string = 'itemClick';
|
|
65
|
-
/**
|
|
66
|
-
* Trigger after mouse hover on the treemap item.
|
|
67
|
-
*
|
|
68
|
-
* @private
|
|
69
|
-
*/
|
|
70
|
-
export const itemMove: string = 'itemMove';
|
|
71
|
-
/**
|
|
72
|
-
* Trigger after click on the treemap item.
|
|
73
|
-
*
|
|
74
|
-
* @private
|
|
75
|
-
*/
|
|
76
|
-
export const click: string = 'click';
|
|
77
|
-
/**
|
|
78
|
-
* Trigger after double click on the treemap item.
|
|
79
|
-
*
|
|
80
|
-
* @private
|
|
81
|
-
*/
|
|
82
|
-
export const doubleClick: string = 'doubleClick';
|
|
83
|
-
/**
|
|
84
|
-
* Trigger after right click on the treemap item.
|
|
85
|
-
*
|
|
86
|
-
* @private
|
|
87
|
-
*/
|
|
88
|
-
export const rightClick: string = 'rightClick';
|
|
89
|
-
/**
|
|
90
|
-
* Trigger after mouse hover on the treemap item.
|
|
91
|
-
*
|
|
92
|
-
* @private
|
|
93
|
-
*/
|
|
94
|
-
export const mouseMove: string = 'mouseMove';
|
|
95
|
-
/**
|
|
96
|
-
* Trigger before each treemap item.
|
|
97
|
-
*
|
|
98
|
-
* @private
|
|
99
|
-
*/
|
|
100
|
-
export const legendItemRendering: string = 'legendItemRendering';
|
|
101
|
-
/**
|
|
102
|
-
* Trigger before legend items.
|
|
103
|
-
*
|
|
104
|
-
* @private
|
|
105
|
-
*/
|
|
106
|
-
export const legendRendering: string = 'legendRendering';
|
|
107
|
-
/**
|
|
108
|
-
* Trigger after resize the treemap.
|
|
109
|
-
*
|
|
110
|
-
* @private
|
|
111
|
-
*/
|
|
112
|
-
export const resize: string = 'resize';
|
|
113
|
-
/**
|
|
114
|
-
* Define the font family in treemap.
|
|
115
|
-
*
|
|
116
|
-
* @private
|
|
117
|
-
*/
|
|
118
|
-
export const defaultFont: string = 'Roboto, Segoe UI, Noto, Sans-serif';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { TreeMap } from '../../index';
|
|
2
|
-
import { ExportType } from '../utils/enum';
|
|
3
|
-
/**
|
|
4
|
-
* ImageExport module handles the export to image functionality for treemap.
|
|
5
|
-
*
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export declare class ImageExport {
|
|
9
|
-
/**
|
|
10
|
-
* Constructor for Maps
|
|
11
|
-
*
|
|
12
|
-
* @param {TreeMap} control - Specifies the treemap instance
|
|
13
|
-
*/
|
|
14
|
-
constructor(control: TreeMap);
|
|
15
|
-
/**
|
|
16
|
-
* This method is used to perform the export functionality for the rendered treemap.
|
|
17
|
-
*
|
|
18
|
-
* @param {TreeMap} treeMap - Specifies the treemap instance.
|
|
19
|
-
* @param {ExportType} type - Specifies the type of the image file.
|
|
20
|
-
* @param {string} fileName - Specifies the file name of the image file.
|
|
21
|
-
* @param {boolean} allowDownload - Specifies whether to download the file or not.
|
|
22
|
-
* @returns {Promise} - Returns the promise string.
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
export(treeMap: TreeMap, type: ExportType, fileName: string, allowDownload?: boolean): Promise<string>;
|
|
26
|
-
protected getModuleName(): string;
|
|
27
|
-
/**
|
|
28
|
-
* To destroy the ImageExport.
|
|
29
|
-
*
|
|
30
|
-
* @returns {void}
|
|
31
|
-
* @private
|
|
32
|
-
*/
|
|
33
|
-
destroy(): void;
|
|
34
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { createElement, Browser, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
2
|
-
import { TreeMap} from '../../index';
|
|
3
|
-
import { ExportType } from '../utils/enum';
|
|
4
|
-
import { triggerDownload } from '../utils/helper';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* ImageExport module handles the export to image functionality for treemap.
|
|
8
|
-
*
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
export class ImageExport {
|
|
12
|
-
/**
|
|
13
|
-
* Constructor for Maps
|
|
14
|
-
*
|
|
15
|
-
* @param {TreeMap} control - Specifies the treemap instance
|
|
16
|
-
*/
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
|
18
|
-
constructor(control: TreeMap) {
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* This method is used to perform the export functionality for the rendered treemap.
|
|
22
|
-
*
|
|
23
|
-
* @param {TreeMap} treeMap - Specifies the treemap instance.
|
|
24
|
-
* @param {ExportType} type - Specifies the type of the image file.
|
|
25
|
-
* @param {string} fileName - Specifies the file name of the image file.
|
|
26
|
-
* @param {boolean} allowDownload - Specifies whether to download the file or not.
|
|
27
|
-
* @returns {Promise} - Returns the promise string.
|
|
28
|
-
* @private
|
|
29
|
-
*/
|
|
30
|
-
public export(treeMap: TreeMap, type: ExportType, fileName: string, allowDownload ?: boolean): Promise<string> {
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
|
|
32
|
-
const promise: Promise<string> = new Promise((resolve: any, reject: any) => {
|
|
33
|
-
const element: HTMLCanvasElement = <HTMLCanvasElement>createElement('canvas', {
|
|
34
|
-
id: 'ej2-canvas',
|
|
35
|
-
|
|
36
|
-
attrs: {
|
|
37
|
-
'height': treeMap.availableSize.height.toString(),
|
|
38
|
-
'width': treeMap.availableSize.width.toString()
|
|
39
|
-
} });
|
|
40
|
-
const exportElement: HTMLElement = treeMap.svgObject.cloneNode(true) as HTMLElement;
|
|
41
|
-
const backgroundElement: HTMLElement = exportElement.childNodes[0] as HTMLElement;
|
|
42
|
-
if (!isNullOrUndefined(backgroundElement)) {
|
|
43
|
-
const backgroundColor: string = backgroundElement.getAttribute('fill');
|
|
44
|
-
if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Tailwind3' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3' ||
|
|
45
|
-
treeMap.theme === 'Fluent2')
|
|
46
|
-
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
47
|
-
(exportElement.childNodes[0] as HTMLElement).setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
48
|
-
} else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Tailwind3Dark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark' ||
|
|
49
|
-
treeMap.theme === 'Fluent2Dark' || treeMap.theme === 'Fluent2HighContrast')
|
|
50
|
-
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
51
|
-
(exportElement.childNodes[0] as HTMLElement).setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
const isDownload: boolean = !(Browser.userAgent.toString().indexOf('HeadlessChrome') > -1);
|
|
55
|
-
const svgData: string = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
|
|
56
|
-
exportElement.outerHTML +
|
|
57
|
-
'</svg>';
|
|
58
|
-
const url: string = window.URL.createObjectURL(
|
|
59
|
-
new Blob(
|
|
60
|
-
type === 'SVG' ? [svgData] :
|
|
61
|
-
[(new XMLSerializer()).serializeToString(exportElement)],
|
|
62
|
-
{ type: 'image/svg+xml' }
|
|
63
|
-
)
|
|
64
|
-
);
|
|
65
|
-
if (type === 'SVG' ) {
|
|
66
|
-
if (allowDownload) {
|
|
67
|
-
triggerDownload(
|
|
68
|
-
fileName, type,
|
|
69
|
-
url, isDownload
|
|
70
|
-
);
|
|
71
|
-
} else {
|
|
72
|
-
resolve(null);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
} else {
|
|
76
|
-
const image: HTMLImageElement = new Image();
|
|
77
|
-
const context: CanvasRenderingContext2D = element.getContext('2d');
|
|
78
|
-
image.onload = (() => {
|
|
79
|
-
context.drawImage(image, 0, 0);
|
|
80
|
-
window.URL.revokeObjectURL(url);
|
|
81
|
-
|
|
82
|
-
if (allowDownload) {
|
|
83
|
-
triggerDownload(fileName, type,
|
|
84
|
-
element.toDataURL('image/png').replace('image/png', 'image/octet-stream'),
|
|
85
|
-
isDownload );
|
|
86
|
-
} else {
|
|
87
|
-
|
|
88
|
-
if (type === 'JPEG') {
|
|
89
|
-
resolve(element.toDataURL('image/jpeg'));
|
|
90
|
-
} else if (type === 'PNG') {
|
|
91
|
-
resolve(element.toDataURL('image/png'));
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
});
|
|
97
|
-
image.src = url;
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
return promise;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
protected getModuleName(): string {
|
|
105
|
-
// Returns te module name
|
|
106
|
-
return 'ImageExport';
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* To destroy the ImageExport.
|
|
111
|
-
*
|
|
112
|
-
* @returns {void}
|
|
113
|
-
* @private
|
|
114
|
-
*/
|
|
115
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
116
|
-
public destroy(): void { }
|
|
117
|
-
}
|