@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.
@@ -1549,11 +1549,10 @@ function colorNameToHex(color) {
1549
1549
  * @param {Size} size - Specifies the size
1550
1550
  * @param {string} url - Specifies the url
1551
1551
  * @param {PathOption} options - Specifies the options
1552
- * @param {string} label - Specifies the label
1553
1552
  * @returns {Element} - Returns the element
1554
1553
  * @private
1555
1554
  */
1556
- function drawSymbol(location, shape, size, url, options, label) {
1555
+ function drawSymbol(location, shape, size, url, options) {
1557
1556
  const svgRenderer = new SvgRenderer('');
1558
1557
  const temp = renderLegendShape(location, size, shape, options, url);
1559
1558
  const htmlElement = svgRenderer['draw' + temp.functionName](temp.renderOption);
@@ -2366,10 +2365,11 @@ class LayoutPanel {
2366
2365
  }
2367
2366
  }
2368
2367
  itemGroup.setAttribute('aria-label', item['name']);
2369
- if ((this.treemap.enableDrillDown && isLeafItem) || (this.treemap.selectionSettings.enable || this.treemap.highlightSettings.enable)) {
2368
+ if ((this.treemap.enableDrillDown && isLeafItem) || (this.treemap.selectionSettings.enable ||
2369
+ this.treemap.highlightSettings.enable)) {
2370
2370
  itemGroup.setAttribute('role', 'button');
2371
2371
  itemGroup.setAttribute('tabindex', this.treemap.tabIndex.toString());
2372
- itemGroup.style.cursor = this.treemap.highlightSettings.enable && !this.treemap.selectionSettings.enable && (this.treemap.enableDrillDown && item['groupIndex'] == (this.treemap.levels.length - 1)) ? 'default' :
2372
+ itemGroup.style.cursor = this.treemap.highlightSettings.enable && !this.treemap.selectionSettings.enable && (this.treemap.enableDrillDown && item['groupIndex'] === (this.treemap.levels.length - 1)) ? 'default' :
2373
2373
  this.treemap.highlightSettings.enable && !this.treemap.selectionSettings.enable && !this.treemap.enableDrillDown ? 'default' : 'pointer';
2374
2374
  }
2375
2375
  else {
@@ -2899,6 +2899,7 @@ class Print {
2899
2899
  }
2900
2900
  else {
2901
2901
  const exportElement = treeMap.element.cloneNode(true);
2902
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2902
2903
  let backgroundElement = exportElement.getElementsByTagName('svg')[0];
2903
2904
  if (!isNullOrUndefined(backgroundElement)) {
2904
2905
  backgroundElement = backgroundElement.childNodes[0];
@@ -3208,9 +3209,10 @@ let TreeMap = class TreeMap extends Component {
3208
3209
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3209
3210
  fetchApiModule.onSuccess = (args) => {
3210
3211
  if (!isNullOrUndefined(args.type) && args.type === 'application/octet-stream') {
3211
- let reader = new FileReader();
3212
- let treemap = this;
3213
- reader.onload = function (data) {
3212
+ const reader = new FileReader();
3213
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
3214
+ const treemap = this;
3215
+ reader.onload = function () {
3214
3216
  args = JSON.parse(reader.result.toString());
3215
3217
  treemap.dataSource = args;
3216
3218
  treemap.renderTreeMapElements();
@@ -4475,9 +4477,10 @@ class TreeMapLegend {
4475
4477
  this.treemap = treemap;
4476
4478
  this.addEventListener();
4477
4479
  }
4478
- // eslint-disable-next-line valid-jsdoc
4479
4480
  /**
4480
4481
  * method for legend
4482
+ *
4483
+ * @returns {void}
4481
4484
  * @private
4482
4485
  */
4483
4486
  renderLegend() {
@@ -5001,6 +5004,7 @@ class TreeMapLegend {
5001
5004
  // eslint-disable-next-line valid-jsdoc
5002
5005
  /**
5003
5006
  * To draw the legend
5007
+ *
5004
5008
  * @private
5005
5009
  */
5006
5010
  drawLegend() {
@@ -5113,7 +5117,7 @@ class TreeMapLegend {
5113
5117
  };
5114
5118
  treemap.trigger(legendItemRendering, eventArgs, (observedArgs) => {
5115
5119
  const renderOptions = new PathOption(shapeId, observedArgs.fill, strokeWidth, isLineShape ? collection['Fill'] : strokeColor, legend.opacity, '');
5116
- legendElement.appendChild(drawSymbol(shapeLocation, observedArgs.shape, shapeSize, observedArgs.imageUrl, renderOptions, legendText));
5120
+ legendElement.appendChild(drawSymbol(shapeLocation, observedArgs.shape, shapeSize, observedArgs.imageUrl, renderOptions));
5117
5121
  textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'start', legendText, '', '');
5118
5122
  renderTextElement(textOptions, legend.textStyle, legend.textStyle.color || treemap.themeStyle.legendTextColor, legendElement);
5119
5123
  this.legendGroup.appendChild(legendElement);
@@ -5201,7 +5205,8 @@ class TreeMapLegend {
5201
5205
  const textSize = measureText(trimTitle, textStyle);
5202
5206
  if (legendTitle) {
5203
5207
  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, '');
5204
- let textElement = renderTextElement(textOptions, textStyle, textStyle.color || this.treemap.themeStyle.legendTitleColor, this.legendGroup);
5208
+ const textElement = renderTextElement(textOptions, textStyle, textStyle.color ||
5209
+ this.treemap.themeStyle.legendTitleColor, this.legendGroup);
5205
5210
  textElement.setAttribute('role', 'region');
5206
5211
  textElement.setAttribute('aria-label', legendTitle);
5207
5212
  }
@@ -5353,8 +5358,11 @@ class TreeMapLegend {
5353
5358
  this.translate = new Location(x, y);
5354
5359
  }
5355
5360
  }
5356
- // eslint-disable-next-line valid-jsdoc
5357
- /** @private */
5361
+ /**
5362
+ * @param {PointerEvent} e - Specifies the event.
5363
+ * @returns {void}
5364
+ * @private
5365
+ */
5358
5366
  mouseUpHandler(e) {
5359
5367
  this.renderInteractivePointer(e);
5360
5368
  clearTimeout(this.clearTimeout);
@@ -5363,6 +5371,7 @@ class TreeMapLegend {
5363
5371
  // eslint-disable-next-line valid-jsdoc
5364
5372
  /**
5365
5373
  * To remove the interactive pointer
5374
+ *
5366
5375
  * @private
5367
5376
  */
5368
5377
  removeInteractivePointer() {
@@ -5401,6 +5410,7 @@ class TreeMapLegend {
5401
5410
  // eslint-disable-next-line valid-jsdoc
5402
5411
  /**
5403
5412
  * To add the event listener
5413
+ *
5404
5414
  * @private
5405
5415
  */
5406
5416
  addEventListener() {
@@ -5413,6 +5423,7 @@ class TreeMapLegend {
5413
5423
  // eslint-disable-next-line valid-jsdoc
5414
5424
  /**
5415
5425
  * To remove the event listener
5426
+ *
5416
5427
  * @private
5417
5428
  */
5418
5429
  removeEventListener() {
@@ -6062,11 +6073,13 @@ class TreeMapTooltip {
6062
6073
  markerFill = item['options']['fill'];
6063
6074
  }
6064
6075
  if (this.treemap.enableRtl) {
6065
- tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ? textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
6076
+ tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
6077
+ textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
6066
6078
  || formatValue(value, this.treemap) + ' : ' + this.treemap.weightValuePath.toString()];
6067
6079
  }
6068
6080
  else {
6069
- tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ? textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
6081
+ tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
6082
+ textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
6070
6083
  || this.treemap.weightValuePath.toString() + ' : ' + formatValue(value, this.treemap)];
6071
6084
  }
6072
6085
  if (document.getElementById(this.tooltipId)) {
@@ -6170,6 +6183,7 @@ class TreeMapTooltip {
6170
6183
  // eslint-disable-next-line valid-jsdoc
6171
6184
  /**
6172
6185
  * To bind events for tooltip module
6186
+ *
6173
6187
  * @private
6174
6188
  */
6175
6189
  addEventListener() {
@@ -6182,6 +6196,7 @@ class TreeMapTooltip {
6182
6196
  // eslint-disable-next-line valid-jsdoc
6183
6197
  /**
6184
6198
  * To unbind events for tooltip module
6199
+ *
6185
6200
  * @private
6186
6201
  */
6187
6202
  removeEventListener() {