@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 19.4.52
3
+ * version : 20.1.59
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. 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@19.4.38",
3
+ "_id": "@syncfusion/ej2-treemap@20.1.55",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-H+Js+SzGqrSKAV8wVFkQd/E5hRfZn4/HOi0Q1BLJMDgdw+A0WCNzAJCnMNrF2ioHIXGbz31WN945/NubIepg6A==",
5
+ "_integrity": "sha512-nbQ59xsTxBxL8H/y1zL1gAY5Oype2tOXo17ja3raAjJTxhKgQ8my4Qay0j+2VOOc0nsnVw5pLTTzafTG8Qis6w==",
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": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treemap/-/ej2-treemap-19.4.38.tgz",
27
- "_shasum": "fb15aa7010c14ba2c7e4734fdb7ae8cb64214b95",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treemap/-/ej2-treemap-20.1.55.tgz",
27
+ "_shasum": "caa408c2bf1ad4b9a9dd9f75bfe0f62def65f82a",
28
28
  "_spec": "@syncfusion/ej2-treemap@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -35,12 +35,12 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~19.4.52",
39
- "@syncfusion/ej2-compression": "~19.4.52",
40
- "@syncfusion/ej2-data": "~19.4.52",
41
- "@syncfusion/ej2-file-utils": "~19.4.52",
42
- "@syncfusion/ej2-pdf-export": "~19.4.52",
43
- "@syncfusion/ej2-svg-base": "~19.4.52"
38
+ "@syncfusion/ej2-base": "~20.1.57",
39
+ "@syncfusion/ej2-compression": "~20.1.55",
40
+ "@syncfusion/ej2-data": "~20.1.55",
41
+ "@syncfusion/ej2-file-utils": "~20.1.55",
42
+ "@syncfusion/ej2-pdf-export": "~20.1.55",
43
+ "@syncfusion/ej2-svg-base": "~20.1.55"
44
44
  },
45
45
  "deprecated": false,
46
46
  "description": "Essential JS 2 TreeMap Components",
@@ -73,6 +73,6 @@
73
73
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
74
74
  },
75
75
  "typings": "index.d.ts",
76
- "version": "19.4.52",
76
+ "version": "20.1.59",
77
77
  "sideEffects": false
78
78
  }
@@ -775,7 +775,7 @@ var TreeMapLegend = /** @class */ (function () {
775
775
  var stroke = void 0;
776
776
  var strokeWidth = void 0;
777
777
  var legendElement = void 0;
778
- targetItem = treemap.layout.renderItems[parseFloat(target.id.split('_')[6])];
778
+ targetItem = treemap.layout.renderItems[parseFloat(target.id.split('_Item_Index_')[1])];
779
779
  var svgRect = treemap.svgObject.getBoundingClientRect();
780
780
  for (var i = 0; i < this.legendCollections.length; i++) {
781
781
  currentData = this.legendCollections[i];
@@ -42,8 +42,8 @@ var PdfExport = /** @class */ (function () {
42
42
  var backgroundElement = exportElement.childNodes[0];
43
43
  if (!isNullOrUndefined(backgroundElement)) {
44
44
  var backgroundColor = backgroundElement.getAttribute('fill');
45
- if ((_this.control.theme === 'Tailwind' || _this.control.theme === 'TailwindDark' || _this.control.theme === 'Bootstrap5' || _this.control.theme === 'Bootstrap5Dark')
46
- && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
45
+ if ((_this.control.theme === 'Tailwind' || _this.control.theme === 'TailwindDark' || _this.control.theme === 'Bootstrap5' || _this.control.theme === 'Bootstrap5Dark'
46
+ || _this.control.theme === 'Fluent' || _this.control.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
47
47
  exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
48
48
  }
49
49
  }
@@ -148,7 +148,7 @@ export function getThemeStyle(theme) {
148
148
  labelFontFamily: 'Helvetica Neue'
149
149
  };
150
150
  break;
151
- case 'fluentui':
151
+ case 'fluent':
152
152
  style = {
153
153
  backgroundColor: 'rgba(255,255,255, 0.0)',
154
154
  titleFontColor: '#201F1E',
@@ -165,7 +165,7 @@ export function getThemeStyle(theme) {
165
165
  labelFontFamily: 'Segoe UI'
166
166
  };
167
167
  break;
168
- case 'fluentuidark':
168
+ case 'fluentdark':
169
169
  style = {
170
170
  backgroundColor: 'rgba(255,255,255, 0.0)',
171
171
  titleFontColor: '#F3F2F1',
@@ -659,7 +659,7 @@ var TreeMap = /** @class */ (function (_super) {
659
659
  this.trigger(click, clickArgs);
660
660
  if (targetId.indexOf('_Item_Index') > -1) {
661
661
  e.preventDefault();
662
- itemIndex = parseFloat(targetId.split('_')[6]);
662
+ itemIndex = parseFloat(targetId.split('_Item_Index_')[1]);
663
663
  eventArgs = {
664
664
  cancel: false, name: itemClick, treemap: this, item: this.layout.renderItems[itemIndex], mouseEvent: e,
665
665
  groupIndex: this.layout.renderItems[itemIndex]['groupIndex'], groupName: this.layout.renderItems[itemIndex]['name'],
@@ -732,7 +732,7 @@ var TreeMap = /** @class */ (function (_super) {
732
732
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
733
733
  var childItems;
734
734
  if (targetId.indexOf('_Item_Index') > -1) {
735
- item = this.layout.renderItems[parseFloat(targetId.split('_')[6])];
735
+ item = this.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
736
736
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
737
737
  childItems = findChildren(item)['values'];
738
738
  this.element.style.cursor = (!item['isLeafItem'] && childItems && childItems.length > 0 && this.enableDrillDown) ?
@@ -860,7 +860,7 @@ var TreeMap = /** @class */ (function (_super) {
860
860
  if (e.cancelable) {
861
861
  e.preventDefault();
862
862
  }
863
- index = parseFloat(targetId.split('_')[6]);
863
+ index = parseFloat(targetId.split('_Item_Index_')[1]);
864
864
  item = this.layout.renderItems[index];
865
865
  var labelText = targetEle.innerHTML;
866
866
  if (this.enableBreadcrumb) {
@@ -43,14 +43,14 @@ var TreeMapHighlight = /** @class */ (function () {
43
43
  if (this.highLightId !== targetId) {
44
44
  treeMapElement = document.getElementById(treemap.element.id + '_TreeMap_' + treemap.layoutType + '_Layout');
45
45
  var selectionElements = document.getElementsByClassName('treeMapSelection');
46
- item = this.treemap.layout.renderItems[parseFloat(targetId.split('_')[6])];
46
+ item = this.treemap.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
47
47
  var index = void 0;
48
48
  if (this.treemap.legendSettings.visible) {
49
49
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
50
50
  var collection = this.treemap.treeMapLegendModule.legendCollections;
51
51
  var length_1 = this.treemap.treeMapLegendModule.legendCollections.length;
52
52
  index = getLegendIndex(length_1, item, treemap);
53
- this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById('container_Legend_Shape_Index_' + index) : document.getElementById('container_Legend_Index_' + index);
53
+ 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);
54
54
  if (this.shapeElement !== null && (selectionModule ? this.shapeElement.getAttribute('id') !== selectionModule.legendSelectId : true)) {
55
55
  if (selectionModule ? this.shapeElement !== selectionModule.shapeElement : true) {
56
56
  this.currentElement.push({ currentElement: this.shapeElement });
@@ -78,7 +78,7 @@ var TreeMapHighlight = /** @class */ (function () {
78
78
  for (var i = 0; i < treeMapElement.childElementCount; i++) {
79
79
  element = treeMapElement.childNodes[i];
80
80
  process = true;
81
- item = treemap.layout.renderItems[element.id.split('_')[6]];
81
+ item = treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])];
82
82
  for (var j = 0; j < selectionElements.length; j++) {
83
83
  if (element.id === selectionElements[j].id) {
84
84
  process = false;
@@ -116,7 +116,7 @@ var TreeMapHighlight = /** @class */ (function () {
116
116
  removeLegend(this.legendHighlightCollection, 'highlight');
117
117
  }
118
118
  this.shapeTarget = 'highlight';
119
- var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('_')[4]) : parseFloat(targetId.split('_')[3]);
119
+ var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('_Legend_Shape_Index_')[1]) : parseFloat(targetId.split('_Legend_Index_')[1]);
120
120
  var dataLength = this.treemap.treeMapLegendModule.legendCollections[index]['legendData'].length;
121
121
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
122
122
  var collection = this.treemap.treeMapLegendModule.legendCollections;
@@ -126,7 +126,7 @@ var TreeMapHighlight = /** @class */ (function () {
126
126
  if (this.treemap.treeMapLegendModule.legendCollections[index]['legendData'][i]['levelOrderName'] === this.treemap.layout.renderItems[j]['levelOrderName']) {
127
127
  itemIndex = j;
128
128
  groupIndex = this.treemap.layout.renderItems[j]['groupIndex'];
129
- var nodeEle = document.getElementById('container_Level_Index_' + groupIndex + '_Item_Index_' + itemIndex + '_RectPath');
129
+ var nodeEle = document.getElementById(this.treemap.element.id + '_Level_Index_' + groupIndex + '_Item_Index_' + itemIndex + '_RectPath');
130
130
  if (i === 0) {
131
131
  this.legendHighlightCollection = [];
132
132
  pushCollection(this.legendHighlightCollection, legendIndex, j, targetEle, nodeEle, this.treemap.layout.renderItems, collection);
@@ -250,7 +250,7 @@ var TreeMapSelection = /** @class */ (function () {
250
250
  e.preventDefault();
251
251
  if (this.treemap.selectionId !== targetId && this.legendSelect) {
252
252
  treeMapElement = document.getElementById(layoutID);
253
- item = treemap.layout.renderItems[parseFloat(targetId.split('_')[6])];
253
+ item = treemap.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
254
254
  var index = void 0;
255
255
  if (this.treemap.legendSettings.visible) {
256
256
  this.shapeSelect = false;
@@ -264,7 +264,7 @@ var TreeMapSelection = /** @class */ (function () {
264
264
  highlightModule.shapeHighlightCollection = [];
265
265
  }
266
266
  index = getLegendIndex(length_3, item, treemap);
267
- this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById('container_Legend_Shape_Index_' + index) : document.getElementById('container_Legend_Index_' + index);
267
+ 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);
268
268
  if (this.shapeElement !== null) {
269
269
  this.shapeSelectId = this.shapeElement.getAttribute('id');
270
270
  this.shapeSelectionCollection.push({ legendEle: this.shapeElement, oldFill: collection[index]['legendFill'],
@@ -277,7 +277,7 @@ var TreeMapSelection = /** @class */ (function () {
277
277
  orders = findHightLightItems(item, [], selection.mode, treemap);
278
278
  for (var i = 0; i < treeMapElement.childElementCount; i++) {
279
279
  element = treeMapElement.childNodes[i];
280
- item = treemap.layout.renderItems[element.id.split('_')[6]];
280
+ item = treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])];
281
281
  if (orders.indexOf(item['levelOrderName']) > -1) {
282
282
  selectionElements.push(element);
283
283
  treemap.levelSelection.push(element.id);
@@ -337,14 +337,14 @@ var TreeMapSelection = /** @class */ (function () {
337
337
  if (highlightModule) {
338
338
  highlightModule.shapeTarget = 'selection';
339
339
  }
340
- var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('_')[4]) : parseFloat(targetId.split('_')[3]);
340
+ var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('_Legend_Shape_Index_')[1]) : parseFloat(targetId.split('_Legend_Index_')[1]);
341
341
  var dataLength = this.treemap.treeMapLegendModule.legendCollections[index]['legendData'].length;
342
342
  for (var k = 0; k < dataLength; k++) {
343
343
  for (var l = 0; l < this.treemap.layout.renderItems.length; l++) {
344
344
  if (this.treemap.treeMapLegendModule.legendCollections[index]['legendData'][k]['levelOrderName'] === this.treemap.layout.renderItems[l]['levelOrderName']) {
345
345
  itemIndex = l;
346
346
  groupIndex = this.treemap.layout.renderItems[l]['groupIndex'];
347
- var nodeEle = document.getElementById('container_Level_Index_' + groupIndex + '_Item_Index_' + itemIndex + '_RectPath');
347
+ var nodeEle = document.getElementById(this.treemap.element.id + '_Level_Index_' + groupIndex + '_Item_Index_' + itemIndex + '_RectPath');
348
348
  if (k === 0) {
349
349
  pushCollection(this.legendSelectionCollection, legendIndex, l, targetEle_1, nodeEle, this.treemap.layout.renderItems, collection);
350
350
  length_4 = this.legendSelectionCollection.length;
@@ -396,7 +396,7 @@ var TreeMapSelection = /** @class */ (function () {
396
396
  var orders = findHightLightItems(item, [], selection.mode, this.treemap);
397
397
  for (var i = 0; i < treeMapElement.childElementCount; i++) {
398
398
  element = treeMapElement.childNodes[i];
399
- item = this.treemap.layout.renderItems[element.id.split('_')[6]];
399
+ item = this.treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])];
400
400
  if (orders.indexOf(item['levelOrderName']) > -1) {
401
401
  selectionElements.push(element);
402
402
  this.treemap.levelSelection.push(element.id);
@@ -412,7 +412,7 @@ var TreeMapSelection = /** @class */ (function () {
412
412
  this.shapeElement = undefined;
413
413
  removeShape(this.shapeSelectionCollection, 'selection');
414
414
  index = getLegendIndex(length_5, items[m], this.treemap);
415
- this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById('container_Legend_Shape_Index_' + index) : document.getElementById('container_Legend_Index_' + index);
415
+ 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);
416
416
  if (this.shapeElement !== null) {
417
417
  this.shapeSelectId = this.shapeElement.getAttribute('id');
418
418
  this.treemap.legendId.push(this.shapeSelectId);
@@ -54,7 +54,7 @@ var TreeMapTooltip = /** @class */ (function () {
54
54
  var tooltipContent = [];
55
55
  var markerFill;
56
56
  if (targetId.indexOf('_Item_Index') > -1) {
57
- item = this.treemap.layout.renderItems[parseFloat(targetId.split('_')[6])];
57
+ item = this.treemap.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
58
58
  if (!isNullOrUndefined(item)) {
59
59
  toolTipHeader = item['name'];
60
60
  value = item['weight'];
@@ -134,6 +134,10 @@ var TreeMapTooltip = /** @class */ (function () {
134
134
  textStyle: args['textStyle'],
135
135
  fill: this.treemap.tooltipSettings.fill ? this.treemap.tooltipSettings.fill : this.treemap.themeStyle.tooltipFillColor
136
136
  });
137
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
138
+ if (this.treemap.isVue || this.treemap.isVue3) {
139
+ this.svgTooltip.controlInstance = this.treemap;
140
+ }
137
141
  this.svgTooltip.opacity = this.treemap.themeStyle.tooltipFillOpacity || this.svgTooltip.opacity;
138
142
  this.svgTooltip.appendTo(tooltipEle);
139
143
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -197,7 +197,11 @@ export declare type TreeMapTheme =
197
197
  /** Render a treemap with Bootstrap5 theme. */
198
198
  'Bootstrap5' |
199
199
  /** Render a treemap with Bootstrap5 dark theme. */
200
- 'Bootstrap5Dark';
200
+ 'Bootstrap5Dark' |
201
+ /** Render a treemap with Fluent theme. */
202
+ 'Fluent' |
203
+ /** Render a treemap with Fluent dark theme. */
204
+ 'FluentDark';
201
205
  /**
202
206
  * Defines the rendering directions to render the treemap items in the treemap.
203
207
  */
@@ -762,7 +762,7 @@ export function removeClassNames(elements, type, treemap) {
762
762
  for (var j = 0; j < elements.length; j++) {
763
763
  element = isNullOrUndefined(elements[j].childNodes[0]) ? elements[j] :
764
764
  elements[j].childNodes[0];
765
- options = treemap.layout.renderItems[element.id.split('_')[6]]['options'];
765
+ options = treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])]['options'];
766
766
  applyOptions(element, options);
767
767
  elements[j].classList.remove(type);
768
768
  j -= 1;