@syncfusion/ej2-treemap 25.1.35 → 26.1.35

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.
@@ -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 (data) {
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();
@@ -406,19 +407,21 @@ var TreeMap = /** @class */ (function (_super) {
406
407
  if (dataCount === this.treemapLevelData.hierarchyData.length - 1) {
407
408
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
408
409
  var mainData_1 = this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];
409
- for (var k = 0; k < this.treemapLevelData.hierarchyData.length; k++) {
410
- childData = findChildren(this.treemapLevelData.hierarchyData[k])['values'];
411
- if (k !== 0 && childData) {
412
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
413
- childData.forEach(function (currentData) { mainData_1.push(currentData); });
414
- this.treemapLevelData.hierarchyData.splice(k, 1);
415
- k -= 1;
410
+ if (!isNullOrUndefined(mainData_1)) {
411
+ for (var k = 0; k < this.treemapLevelData.hierarchyData.length; k++) {
412
+ childData = findChildren(this.treemapLevelData.hierarchyData[k])['values'];
413
+ if (k !== 0 && childData) {
414
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
415
+ childData.forEach(function (currentData) { mainData_1.push(currentData); });
416
+ this.treemapLevelData.hierarchyData.splice(k, 1);
417
+ k -= 1;
418
+ }
419
+ }
420
+ mainData_1 = this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];
421
+ for (var l = 0; l < mainData_1.length; l++) {
422
+ newData[this.levels[0].groupPath] = mainData_1;
423
+ mainData_1[l]['parent'] = newData;
416
424
  }
417
- }
418
- mainData_1 = this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];
419
- for (var l = 0; l < mainData_1.length; l++) {
420
- newData[this.levels[0].groupPath] = mainData_1;
421
- mainData_1[l]['parent'] = newData;
422
425
  }
423
426
  }
424
427
  };
@@ -794,7 +797,7 @@ var TreeMap = /** @class */ (function (_super) {
794
797
  * @returns {any} - Returns label of the drilled level.
795
798
  * @private
796
799
  */
797
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
800
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
798
801
  TreeMap.prototype.calculateSelectedTextLevels = function (labelText, item) {
799
802
  //to find the levels by clicking the particular text both for drillDownView as true / false.
800
803
  var drillLevel;
@@ -820,7 +823,7 @@ var TreeMap = /** @class */ (function (_super) {
820
823
  * @returns {boolean} - check whether it is previous level or not.
821
824
  * @private
822
825
  */
823
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
826
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
824
827
  TreeMap.prototype.calculatePreviousLevelChildItems = function (drillLevelValues, item, directLevel) {
825
828
  //By clicking any child items drilldown to the particular level.
826
829
  //At the time store all the previous drilled level items in drilledItems
@@ -862,7 +865,7 @@ var TreeMap = /** @class */ (function (_super) {
862
865
  * @returns {any} - return the new drill down object.
863
866
  * @private
864
867
  */
865
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
868
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
866
869
  TreeMap.prototype.compareSelectedLabelWithDrillDownItems = function (drillLevelValues, item, i) {
867
870
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
868
871
  var drillLevelChild;
@@ -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) ? textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
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) ? textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
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)) {
@@ -88,10 +90,14 @@ var TreeMapTooltip = /** @class */ (function () {
88
90
  || this.tooltipSettings.textStyle.color;
89
91
  this.tooltipSettings.textStyle.opacity = this.treemap.themeStyle.tooltipTextOpacity
90
92
  || this.tooltipSettings.textStyle.opacity;
93
+ var border = {
94
+ width: this.tooltipSettings.border.width || this.treemap.themeStyle.tooltipBorderWidth || 0,
95
+ color: this.tooltipSettings.border.color || this.treemap.themeStyle.tooltipBorderColor || 'transparent'
96
+ };
91
97
  tootipArgs = {
92
98
  cancel: false, name: tooltipRendering, item: item,
93
99
  options: {
94
- location: location, text: tooltipContent, data: toolTipData,
100
+ location: location, text: tooltipContent, data: toolTipData, border: border,
95
101
  textStyle: this.tooltipSettings.textStyle, template: this.tooltipSettings.template
96
102
  },
97
103
  treemap: this.treemap,
@@ -125,6 +131,7 @@ var TreeMapTooltip = /** @class */ (function () {
125
131
  }
126
132
  if (!cancel) {
127
133
  this.svgTooltip = new Tooltip({
134
+ theme: this.treemap.theme,
128
135
  enable: true,
129
136
  header: '',
130
137
  data: args['data'],
@@ -137,6 +144,7 @@ var TreeMapTooltip = /** @class */ (function () {
137
144
  areaBounds: this.treemap.areaRect,
138
145
  textStyle: args['textStyle'],
139
146
  fill: this.treemap.tooltipSettings.fill ? this.treemap.tooltipSettings.fill : this.treemap.themeStyle.tooltipFillColor,
147
+ border: args['border'],
140
148
  enableShadow: true
141
149
  });
142
150
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -168,6 +176,7 @@ var TreeMapTooltip = /** @class */ (function () {
168
176
  // eslint-disable-next-line valid-jsdoc
169
177
  /**
170
178
  * To bind events for tooltip module
179
+ *
171
180
  * @private
172
181
  */
173
182
  TreeMapTooltip.prototype.addEventListener = function () {
@@ -180,6 +189,7 @@ var TreeMapTooltip = /** @class */ (function () {
180
189
  // eslint-disable-next-line valid-jsdoc
181
190
  /**
182
191
  * To unbind events for tooltip module
192
+ *
183
193
  * @private
184
194
  */
185
195
  TreeMapTooltip.prototype.removeEventListener = function () {
@@ -205,7 +205,13 @@ export declare type TreeMapTheme =
205
205
  /** Render a treemap with Material3 theme. */
206
206
  'Material3' |
207
207
  /** Render a treemap with Material3Dark theme. */
208
- 'Material3Dark';
208
+ 'Material3Dark' |
209
+ /** Render a treemap with Fluent2 theme. */
210
+ 'Fluent2' |
211
+ /** Render a treemap with Fluent2 dark theme. */
212
+ 'Fluent2Dark' |
213
+ /** Render a treemap with Fluent2 high contrast theme. */
214
+ 'Fluent2HighContrast';
209
215
  /**
210
216
  * Defines the rendering directions to render the treemap items in the treemap.
211
217
  */
@@ -220,6 +226,7 @@ export declare type RenderingMode =
220
226
  'TopLeftBottomRight';
221
227
  /**
222
228
  * Defines the shape of the marker in the tooltip of the treemap.
229
+ *
223
230
  * @private
224
231
  */
225
232
  export declare type MarkerShape =
@@ -1 +0,0 @@
1
-
@@ -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, label: string): Element;
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, label) {
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);
package/CHANGELOG.md DELETED
@@ -1,80 +0,0 @@
1
- <!-- markdownlint-disable MD010 -->
2
-
3
- <!-- markdownlint-disable MD030 -->
4
-
5
- <!-- markdownlint-disable MD004 -->
6
-
7
- # Changelog
8
-
9
- ## [Unreleased]
10
-
11
- ## 18.2.44 (2020-07-07)
12
-
13
- ### TreeMap
14
-
15
- #### New Features
16
-
17
- - `#280380` - `isResized` argument is exposed in the `loaded` event arguments for indicating that the component is resized.
18
-
19
- #### Bug Fixes
20
-
21
- - `#280380` - Color of the treemap item will be maintained when the fill color of the selection settings is not provided.
22
-
23
- ## 17.1.48 (2019-05-21)
24
-
25
- ### TreeMap
26
-
27
- #### Bug Fixes
28
-
29
- - `#I235721` - The issue with color value in individual nodes of levels in treemap has been resolved.
30
-
31
- ## 17.1.44 (2019-05-07)
32
-
33
- ### TreeMap
34
-
35
- #### Bug Fixes
36
-
37
- - `#I234615` - The issue with value from the "fill" property is not applied when we have both the "fill" and "colorValuePath" APIs has been fixed.
38
-
39
- ## 17.1.42 (2019-04-23)
40
-
41
- ### TreeMap
42
-
43
- #### Bug Fixes
44
-
45
- - `#I233284` – The issue of breaking the treemap, if data contains the "_" character in its value has been fixed.
46
-
47
- ## 17.1.32-beta (2019-03-13)
48
-
49
- ### TreeMap
50
-
51
- #### New Features
52
-
53
- - The right-to-left (RTL) rendering support has been provided.
54
- - Load on-demand option has been provided to load and render the child items dynamically.
55
- - Responsive support has been provided to the TreeMap legend.
56
- - The 'doubleClick', 'rightClick', and 'legendRendering' events have been provided in TreeMap.
57
-
58
- ## 16.4.40-beta (2018-12-10)
59
-
60
- ### TreeMap
61
-
62
- #### New Features
63
-
64
- - Support has been added for desaturation color mapping.
65
- - Support has been added to hide specific legend items and bind legend text from data source.
66
- - Support has been added for highlighting or selecting the legend items along with shapes.
67
- - Support has been added to bind colors for the items from the data source.
68
-
69
- ## 16.2.41 (2018-06-25)
70
-
71
- ### TreeMap
72
-
73
- The TreeMap is used to displayed the hierarchical or multi-level data to visualize the nested rectangles.
74
-
75
- - **Layout Mode** - TreeMap supports different type of layouts like Squarified, SliceAndDiceHorizontal, SliceAndDiceVertical and SliceAndDiceAuto.
76
- - **Legend** - TreeMap supports legend feature with different mode. Default and Interactive.
77
- - **LabelTemplate** - Leaf item labels can be customized by the label template.
78
- - **ColorMapping** - TreeMap supports the color mapping feature. It used to customize the leaf item fill colors based on range or values.
79
- - **User-Interactions** - TreeMap supports the Drilldown, Tooltip, Highlight and Selection user interaction features.
80
- - **Print and Export** - TreeMap supports printing and exporting as different file types.