@syncfusion/ej2-treemap 23.2.4 → 24.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.
@@ -270,7 +270,7 @@ __decorate$1([
270
270
  Property('')
271
271
  ], LegendSettings.prototype, "height", void 0);
272
272
  __decorate$1([
273
- Complex({ size: '12px', fontFamily: null, fontWeight: null }, Font)
273
+ Complex({ size: null, fontFamily: null, fontWeight: null }, Font)
274
274
  ], LegendSettings.prototype, "textStyle", void 0);
275
275
  __decorate$1([
276
276
  Property(null)
@@ -300,7 +300,7 @@ __decorate$1([
300
300
  Complex({}, CommonTitleSettings)
301
301
  ], LegendSettings.prototype, "title", void 0);
302
302
  __decorate$1([
303
- Complex({ size: '14px' }, Font)
303
+ Complex({ size: null, fontFamily: null, fontWeight: null }, Font)
304
304
  ], LegendSettings.prototype, "titleStyle", void 0);
305
305
  __decorate$1([
306
306
  Property('Bottom')
@@ -420,7 +420,7 @@ __decorate$1([
420
420
  Complex({}, Border)
421
421
  ], TooltipSettings.prototype, "border", void 0);
422
422
  __decorate$1([
423
- Complex({ fontFamily: defaultFont, size: null, fontWeight: null }, Font)
423
+ Complex({ fontFamily: null, size: null, fontWeight: null }, Font)
424
424
  ], TooltipSettings.prototype, "textStyle", void 0);
425
425
  /**
426
426
  * Sets and gets the options for customizing the selection of the leaf items in treemap.
@@ -1557,8 +1557,6 @@ function drawSymbol(location, shape, size, url, options, label) {
1557
1557
  const svgRenderer = new SvgRenderer('');
1558
1558
  const temp = renderLegendShape(location, size, shape, options, url);
1559
1559
  const htmlElement = svgRenderer['draw' + temp.functionName](temp.renderOption);
1560
- htmlElement.setAttribute('aria-label', label);
1561
- htmlElement.setAttribute('role', 'region');
1562
1560
  return htmlElement;
1563
1561
  }
1564
1562
  /**
@@ -2370,7 +2368,7 @@ class LayoutPanel {
2370
2368
  itemGroup.setAttribute('aria-label', item['name']);
2371
2369
  if ((this.treemap.enableDrillDown && isLeafItem) || (this.treemap.selectionSettings.enable || this.treemap.highlightSettings.enable)) {
2372
2370
  itemGroup.setAttribute('role', 'button');
2373
- itemGroup.setAttribute('tabindex', (this.treemap.tabIndex + i + 2).toString());
2371
+ itemGroup.setAttribute('tabindex', this.treemap.tabIndex.toString());
2374
2372
  itemGroup.style.cursor = this.treemap.highlightSettings.enable && !this.treemap.selectionSettings.enable && (this.treemap.enableDrillDown && item['groupIndex'] == (this.treemap.levels.length - 1)) ? 'default' :
2375
2373
  this.treemap.highlightSettings.enable && !this.treemap.selectionSettings.enable && !this.treemap.enableDrillDown ? 'default' : 'pointer';
2376
2374
  }
@@ -3341,7 +3339,7 @@ let TreeMap = class TreeMap extends Component {
3341
3339
  const element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
3342
3340
  element.setAttribute('aria-label', title.description || title.text);
3343
3341
  element.setAttribute('role', '');
3344
- element.setAttribute('tabindex', (this.tabIndex + (type === 'title' ? 1 : 2)).toString());
3342
+ element.setAttribute('tabindex', this.tabIndex.toString());
3345
3343
  if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
3346
3344
  height = (this.availableSize.height - titleBounds.y - titlePadding - this.margin.bottom);
3347
3345
  this.areaRect = new Rect(this.margin.left, titleBounds.y + titlePadding, width, height);
@@ -3710,14 +3708,8 @@ let TreeMap = class TreeMap extends Component {
3710
3708
  */
3711
3709
  addTabIndex() {
3712
3710
  this.element.setAttribute('aria-label', this.description || 'TreeMap Element');
3713
- if (this.enableDrillDown || (this.selectionSettings.enable || this.highlightSettings.enable)) {
3714
- this.element.setAttribute('role', 'button');
3715
- this.element.setAttribute('tabindex', this.tabIndex.toString());
3716
- this.element.style.cursor = this.highlightSettings.enable && !this.selectionSettings.enable && !this.enableDrillDown ? 'default' : 'pointer';
3717
- }
3718
- else {
3719
- this.element.setAttribute('role', 'region');
3720
- }
3711
+ this.element.setAttribute('role', 'region');
3712
+ this.element.setAttribute('tabindex', this.tabIndex.toString());
3721
3713
  }
3722
3714
  /**
3723
3715
  * This method handles the window resize event on treemap.
@@ -3861,6 +3853,9 @@ let TreeMap = class TreeMap extends Component {
3861
3853
  eventArgs = { cancel: false, name: itemMove, treemap: this, item: item, mouseEvent: e };
3862
3854
  this.trigger(itemMove, eventArgs);
3863
3855
  }
3856
+ else {
3857
+ this.element.style.cursor = 'default';
3858
+ }
3864
3859
  this.notify(Browser.touchMoveEvent, e);
3865
3860
  }
3866
3861
  /**
@@ -4372,7 +4367,7 @@ __decorate([
4372
4367
  Property(null)
4373
4368
  ], TreeMap.prototype, "description", void 0);
4374
4369
  __decorate([
4375
- Property(1)
4370
+ Property(0)
4376
4371
  ], TreeMap.prototype, "tabIndex", void 0);
4377
4372
  __decorate([
4378
4373
  Property(null)
@@ -4533,9 +4528,9 @@ class TreeMapLegend {
4533
4528
  * parseFloat(legend.width) : parseFloat(legend.width) : null;
4534
4529
  let legendHeight = (legend.height.length > 1) ? (legend.height.indexOf('%') > -1) ?
4535
4530
  (treemap.availableSize.height / 100) * parseFloat(legend.height) : parseFloat(legend.height) : null;
4536
- titleTextStyle.fontFamily = treemap.themeStyle.fontFamily || titleTextStyle.fontFamily;
4531
+ titleTextStyle.fontFamily = titleTextStyle.fontFamily || treemap.themeStyle.fontFamily;
4537
4532
  titleTextStyle.fontWeight = titleTextStyle.fontWeight || treemap.themeStyle.titleFontWeight;
4538
- titleTextStyle.size = treemap.themeStyle.legendFontSize || titleTextStyle.size;
4533
+ titleTextStyle.size = titleTextStyle.size || treemap.themeStyle.legendFontSize;
4539
4534
  const legendTitleSize = measureText(legendTitle, titleTextStyle);
4540
4535
  let startX = 0;
4541
4536
  let startY = 0;
@@ -5078,8 +5073,10 @@ class TreeMapLegend {
5078
5073
  for (let i = 0; i < this.totalPages[page]['Collection'].length; i++) {
5079
5074
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5080
5075
  const collection = this.totalPages[page]['Collection'][i];
5081
- const legendElement = render.createGroup({ id: treemap.element.id + '_Legend_Index_' + i });
5082
5076
  const legendText = collection['DisplayText'];
5077
+ const legendElement = render.createGroup({ id: treemap.element.id + '_Legend_Index_' + i });
5078
+ legendElement.setAttribute('aria-label', legendText + ' Legend');
5079
+ legendElement.setAttribute('role', 'region');
5083
5080
  const shapeId = treemap.element.id + '_Legend_Shape_Index_' + i;
5084
5081
  const textId = treemap.element.id + '_Legend_Text_Index_' + i;
5085
5082
  let shapeLocation = collection['Shape'];
@@ -6039,12 +6036,12 @@ class TreeMapTooltip {
6039
6036
  markerFill = item['options']['fill'];
6040
6037
  }
6041
6038
  if (this.treemap.enableRtl) {
6042
- tooltipContent = [SanitizeHtmlHelper.sanitize(textFormatter(this.tooltipSettings.format, toolTipData, this.treemap)) ||
6043
- SanitizeHtmlHelper.sanitize(formatValue(value, this.treemap) + ' : ' + this.treemap.weightValuePath.toString())];
6039
+ tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ? textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
6040
+ || formatValue(value, this.treemap) + ' : ' + this.treemap.weightValuePath.toString()];
6044
6041
  }
6045
6042
  else {
6046
- tooltipContent = [SanitizeHtmlHelper.sanitize(textFormatter(this.tooltipSettings.format, toolTipData, this.treemap)) ||
6047
- SanitizeHtmlHelper.sanitize(this.treemap.weightValuePath.toString() + ' : ' + formatValue(value, this.treemap))];
6043
+ tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ? textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
6044
+ || this.treemap.weightValuePath.toString() + ' : ' + formatValue(value, this.treemap)];
6048
6045
  }
6049
6046
  if (document.getElementById(this.tooltipId)) {
6050
6047
  tooltipEle = document.getElementById(this.tooltipId);
@@ -6060,7 +6057,7 @@ class TreeMapTooltip {
6060
6057
  location = getMousePosition(pageX, pageY, this.treemap.svgObject);
6061
6058
  location.y = (this.tooltipSettings.template) ? location.y + 10 : location.y;
6062
6059
  this.tooltipSettings.textStyle.size = this.tooltipSettings.textStyle.size || this.treemap.themeStyle.tooltipFontSize;
6063
- this.tooltipSettings.textStyle.fontFamily = this.treemap.themeStyle.fontFamily;
6060
+ this.tooltipSettings.textStyle.fontFamily = this.tooltipSettings.textStyle.fontFamily || this.treemap.themeStyle.fontFamily;
6064
6061
  this.tooltipSettings.textStyle.fontStyle = !isNullOrUndefined(this.tooltipSettings.textStyle.fontStyle) ? this.tooltipSettings.textStyle.fontStyle : 'Normal';
6065
6062
  this.tooltipSettings.textStyle.fontWeight = this.tooltipSettings.textStyle.fontWeight || this.treemap.themeStyle.fontWeight;
6066
6063
  this.tooltipSettings.textStyle.color = this.treemap.themeStyle.tooltipFontColor
@@ -6115,7 +6112,8 @@ class TreeMapTooltip {
6115
6112
  palette: [markerFill],
6116
6113
  areaBounds: this.treemap.areaRect,
6117
6114
  textStyle: args['textStyle'],
6118
- fill: this.treemap.tooltipSettings.fill ? this.treemap.tooltipSettings.fill : this.treemap.themeStyle.tooltipFillColor
6115
+ fill: this.treemap.tooltipSettings.fill ? this.treemap.tooltipSettings.fill : this.treemap.themeStyle.tooltipFillColor,
6116
+ enableShadow: true
6119
6117
  });
6120
6118
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6121
6119
  if (this.treemap.isVue || this.treemap.isVue3) {